Bug 722977

Summary: virt_only pools are not removed from an owner if the physical pool no longer has a valid virt_limit
Product: [Community] Candlepin Reporter: Andrew Edwards <aedwards>
Component: candlepinAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED DUPLICATE QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 0.5CC: bkearney, dgoodwin, tpfromme
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-26 14:47:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 862910, 863175    

Description Andrew Edwards 2011-07-18 16:51:49 UTC
Description of problem:
virt_only pools are not removed from an owner if the physical pool no longer has a valid virt_limit

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

How reproducible:
100%

Steps to Reproduce:
1. add a pool to an owner with a virt_limit of 4
2. refreshPools on the owner
3. verify that virt_only pool is created
4. modify the original pool (created in step 1) such that its virt_limit is 0.
5. refreshPools on the owner
  
Actual results:
The virt_only pool created by candlepin will change it's expected quantity to 0 but still exist.

Expected results:
the virt_only pool created by candlepin is removed.

Additional info:

Comment 1 Devan Goodwin 2011-12-16 19:31:17 UTC
So if the refresh pools routine detects that the quantity has changed on the bonus pool, and the new virt limit is set to 0, we assume the bonus pool needs to be cleaned up and wipe it out. 

There is a very big caveat here, you cannot later set the virt limit back to something on the subscription, and refresh to get the bonus pool back. The bonus pool is for all intents and purposes permanently gone and will not be recreated unless you wipe out the physical pool as well. (using the delete pool routine)

I am also tempted to propose that we don't try to do this automatically, instead if this happens we stop setting virt_limit attribute on the subscription, and go manually delete the virt bonus pool.

Thoughts?

Comment 2 Devan Goodwin 2012-01-10 12:32:08 UTC
Andrew: are we set to just manually delete the pool when this happens? If so I will close this issue.

Comment 3 Andrew Edwards 2012-01-16 14:00:14 UTC
Devan,

After speaking with Amanda on this issue, we'd like for this to happen automatically. We do not control product changes and may not know when the virt limit attribute has been removed from a product.

Comment 4 Devan Goodwin 2013-03-26 14:47:33 UTC

*** This bug has been marked as a duplicate of bug 887287 ***