Bug 738678

Summary: subscription-manager facts --update will override virt.guests made by virt-who
Product: [Community] Candlepin Reporter: Keqin Hong <khong>
Component: candlepinAssignee: Michael Stead <mstead>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.5CC: cduryee, mstead, yuzheng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-09 11:36:08 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: 682238    

Description Keqin Hong 2011-09-15 14:12:19 UTC
Description of problem:
Current facts collected by virt-who doesn't include virt.guests. As such, subscription-manager facts --update will override virt.guests fact in candlepin posted by virt-who.

Version-Release number of selected component (if applicable):
subscription-manager-0.96.8-1.el6.x86_64
python-rhsm-0.96.10-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Open debug for virt-who and enable daemon env var 
#/etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
2. service virt-who start
3. subscription-manager facts --update 
4. run virt-who again
  
Actual results:
after step 4, you will virt-who see virt.guests fact have been changed in candlepin. As a result, it will add virt.guests fact and post facts again to candlepin.

Expected results:
sub-man facts --update should override what virt.guests fact virt-who added

Additional info:
virt-who will not update facts to candlepin if it sees no changes in virt.guests fact.

Comment 1 Keqin Hong 2011-09-15 14:15:56 UTC
>Expected results:
>sub-man facts --update should override what virt.guests fact virt-who added
sorry, should be
sub-man facts --update should NOT override virt.guests fact virt-who added

Comment 2 Michael Stead 2011-09-27 14:39:15 UTC
This should be addressed by the fix for 737935, once virt-who is modified to use the new API.

Leaving it as ASSIGNED until virt-who update is done. I'll verify once this happens and move to MODIFIED.

Comment 3 Michael Stead 2011-10-05 19:27:11 UTC
Since virt-who no longer updates consumer facts, and instead stores them on the consumer; this bug is no longer an issue.

Comment 5 Michael Stead 2011-10-08 16:35:03 UTC
When this bug was submitted, virt-who would send the list of guestId to candlepin, and candlepin would store them in a fact named virt.guests.

This logic has changed as of virt-who commit:
8ccfc5ec3006f4fee71e549217a4d335163aded6

Since virt-who is no longer updating facts, no overwrite happens.

The new logic is as follows:

Once candlepin receives the list of guest IDs from virt-who, it now stores them on the consumer as guestIds in a seperate database table (cp_consumer_guests), and will appear in the consumer's JSON as guestIds.

Comment 6 Keqin Hong 2011-10-09 11:36:08 UTC
Following the new design, this bug no longer exist.