Bug 993424 - Repository and Distributor delete needs to check notify_agent on bindings and use the forced unbind accordingly.
Repository and Distributor delete needs to check notify_agent on bindings and...
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: API/integration (Show other bugs)
2.2 Beta
Unspecified Unspecified
high Severity unspecified
: ---
: 2.3.0
Assigned To: Jeff Ortel
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-05 17:54 EDT by Jeff Ortel
Modified: 2013-12-09 09:30 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 09:30:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Ortel 2013-08-05 17:54:34 EDT
Description of problem:

Repository and distributor delete itineraries needs to check binding.notify_agent on bindings and use the forced/unforced unbind accordingly.  Some bindings, such as node bindings, do not require agent participation.  The result of using the unforced unbind for these is that the bindings don't ever get confirmed and thus don't ever get completely deleted.

See consumer delete itinerary.

Version-Release number of selected component (if applicable):

2.2


How reproducible:

always


Steps to Reproduce:
1.  bind a node to a repository
2.  delete the repository.
3.  query the mongodb consumer_bindings and note bindings exist with deleted=True.

Steps to Reproduce:
1.  bind a node to a repository
2.  disable the repository
3.  query the mongodb consumer_bindings and note bindings exist with deleted=True.

Actual results:

Bindings exist forever with deleted=True

Expected results:

Bindings deleted immediately.

Additional info:
Comment 1 Jeff Ortel 2013-09-16 18:04:16 EDT
https://github.com/pulp/pulp/pull/615
Comment 2 Jeff Ortel 2013-09-18 19:58:45 EDT
build: 2.3.0-0.14.alpha
Comment 3 Preethi Thomas 2013-09-19 12:24:47 EDT
verified

[root@pulp-v2-server ~]# pulp-admin node bind --repo-id rhel6-2 --node-id node1
Node bind succeeded.

Note: Repository [ rhel6-2 ] will be included in node synchronization.

[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# mongo
MongoDB shell version: 2.2.6
connecting to: test
> use pulp_database
switched to db pulp_database
> db.consumer_bindings.find()
{ "_id" : ObjectId("523b35e6d669f05146000024"), "notify_agent" : false, "repo_id" : "rhel6-2", "consumer_id" : "node1", "_ns" : "consumer_bindings", "deleted" : false, "consumer_actions" : [ ], "binding_config" : { "strategy" : "additive" }, "distributor_id" : "nodes_http_distributor", "id" : "523b35e6d669f05146000024" }
> exit
bye
[root@pulp-v2-server ~]# pulp-admin rpm repo delete --repo-id rhel6-2
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...

[-]
Running...

Repository [rhel6-2] successfully deleted


[root@pulp-v2-server ~]# mongo
MongoDB shell version: 2.2.6
connecting to: test
> use pulp_database
switched to db pulp_database
> db.consumer_bindings.find()
> exit
bye
[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.14.alpha.el6.noarch
[root@pulp-v2-server ~]#
Comment 4 Preethi Thomas 2013-12-09 09:30:34 EST
Pulp 2.3 released.

Note You need to log in before you can comment on or make changes to this bug.