Bug 993424

Summary: Repository and Distributor delete needs to check notify_agent on bindings and use the forced unbind accordingly.
Product: [Retired] Pulp Reporter: Jeff Ortel <jortel>
Component: API/integrationAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.2 BetaCC: mhrivnak
Target Milestone: ---Keywords: Triaged
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-09 14:30:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Ortel 2013-08-05 21:54:34 UTC
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 22:04:16 UTC
https://github.com/pulp/pulp/pull/615

Comment 2 Jeff Ortel 2013-09-18 23:58:45 UTC
build: 2.3.0-0.14.alpha

Comment 3 Preethi Thomas 2013-09-19 16:24:47 UTC
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 14:30:34 UTC
Pulp 2.3 released.