Issue #3255
closedpulp-consumer does not remove binding if repo is no longer available on server
Description
Hi,
as per documentation at https://docs.pulpproject.org/user-guide/consumer-client/bind.html#unbind
the 'pulp-consumer rpm unbind --force --repo-id=foo' should remove the binding on client without any interaction with the server. But pulp-consumer still connects to server and checks for existance.
Environment:
RHEL 7.4
pulp-server-2.14.3-1.el7.noarch
pulp-consumer-client-2.14.3-1.el7.noarch
Expected result:
# pulp-consumer rpm unbind --repo-id=foobar
Unbind tasks successfully created:
Task Id: d8cab7f5-c2a6-4425-a70d-465bc1388f07
Actual result:
# pulp-consumer -vvv rpm unbind --repo-id=foobar
2018-01-08 15:19:21,669 - DEBUG - sending DELETE request to /pulp/api/v2/consumers/pulpserver/bindings/foobar/yum_distributor/
2018-01-08 15:19:21,713 - INFO - DELETE request to /pulp/api/v2/consumers/pulpserver/bindings/foobar/yum_distributor/ with parameters {"force": false}
2018-01-08 15:19:21,713 - INFO - Response status : 404
2018-01-08 15:19:21,713 - INFO - Response body :
{
"exception": null,
"traceback": null,
"_href": "/pulp/api/v2/consumers/pulpserver/bindings/foobar/yum_distributor/",
"error_message": "Missing resource(s): repo_id=foobar, distributor_id=yum_distributor",
"http_request_method": "DELETE",
"http_status": 404,
"error": {
"code": "PLP0009",
"data": {
"resources": {
"repo_id": "foobar",
"distributor_id": "yum_distributor"
}
},
"description": "Missing resource(s): repo_id=foobar, distributor_id=yum_distributor",
"sub_errors": []
},
"resources": {
"repo_id": "foobar",
"distributor_id": "yum_distributor"
}
}
Repository [foobar] does not exist on the server
Thanks.
Updated by ipanova@redhat.com over 6 years ago
are you sure that in this case you still have the binding?
usually when the repo is removed, bindings are removed as well.
Regular unbind:
1. Unbind the consumer from the repo on the server (mark the binding on the server as
deleted.)
2. Request that the consumer (agent) perform the unbind.
3. Delete the binding on the server.
Force unbind:
1. Delete the binding on the server.
2. Request that the consumer (agent) perform the unbind.
https://docs.pulpproject.org/dev-guide/integration/rest-api/consumer/bind.html#unbind-a-consumer
Updated by dkliban@redhat.com over 6 years ago
- Status changed from NEW to CLOSED - NOTABUG
Please re-open if the commend above doesnt' resolve the issue for you.