Description of problem: After host and guest have registered to SAM server ,In the SAM server, Can't see the host's consumer uuid in the guest info Version-Release number of selected component (if applicable): katello-headpin-1.4.3-9.el6sam_splice.noarch candlepin-0.8.21-1.el6sam.noarch subscription-manager-1.8.20-1.el5 python-rhsm-1.8.16-1.el5 virt-who-0.7-9.el5 How reproducible: Always Steps to Reproduce: 1.Configure the virt-who(virt-who running in the libvirt mode) # vi /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=5 2.Restart the virt-who service, # service virt-who restart 3.Registered host and guest to samserver with the same username and password # subscription-manager register --username=admin --password=admin 4.Get the guests' and host's consummer uuid and record them: In the guest,get the guest's consumer uuid = 2dd3527f-cedb-418a-9bd8-902e9ee4763f: # subscription-manager identity Current identity is: 2dd3527f-cedb-418a-9bd8-902e9ee4763f name: dhcp-66-102-65.englab.nay.redhat.com org name: ACME_Corporation org id: 8ac28d2340a922640140a923840a0001 In the host, get the host's consumer uuid = aadbeb31-22d5-42ae-8f28-939da4c953ea: # subscription-manager identity Current identity is: aadbeb31-22d5-42ae-8f28-939da4c953ea name: hp-z220-04.qe.lab.eng.nay.redhat.com org name: ACME_Corporation org ID: ACME_Corporation # subscription-manager identity 5.Check the host consummer uuid on SAM server side. #curl -u admin:admin -k https://$samIP/sam/api/consumers/$guest_consumer_uuid > virtuuid " Check if the host's consumer uuid are in the guest info (virtuuid file), please see the virtuuid file in the attachment. Actual results: It hasn't contain the host consumer uuid in the guest info(file:virtuuid) Expected results: It should display the host consumer uuid in the guest info(file:virtuuid) Additional info: It can get the guest's consumer uuid in the host info(file: correct_associate_uuid which in the attachment) Test Env: SAM server: 10.66.12.135
Created attachment 789519 [details] virtuuid
Created attachment 789520 [details] correct_associate_uuid
Is this working for some guests but not others? Is this something that was working and is not now?
Depending on the answer to the questions in comment3, this might be an RFE for katello. If required, the host consumer can be fetched with the following candlepin API call -- the host uuid can be extracted and appended to the katello repsonse. GET /consumers/$guest_uuid/host
(In reply to Tom McKay from comment #3) > Is this working for some guests but not others? ---> Only the guest which has registered to SAM server should work Is this something that was working and is not now? ---> Yes, SAM-1.3-20130624.0 hasn't this problem. Then in the SAM-1.3.0-RHEL-6-20130808.0, it has occur a new bug995968 which is related to this problem, After bug995968 fixed, This problem still exist.
This issue still exist in SAM-1.3.0-RHEL-6-snapshot5. After comparing with old SAM (SAM-1.3-20130624.0), I found that old SAM will add guest info to host consumer, and will add host info to guest consumer, but latest SAM add a blank guest info to guest consumer which caused this bug, please see the marked section in attachment, thanks.
Created attachment 794624 [details] guest consumer info
Note to developers: Looking at attachment in comment #7, something changed in how consumer json is being generated in katello. Previously the host information was included, then it was removed.
This issue should be fixed 1. check host identity on host # subscription-manager identity -> 69950bed-79c1-451d-b88b-05b424673141 2. check guest identity on guest # subscription-manager identity -> 721eb6f7-5034-4148-8608-7836987e8c09 3. run curl with host identity, check guest identity whether exist # curl -u virt-who-test:redhat -k https://subscription.rhn.stage.redhat.com/subscription/consumers/[Host Identity]]/guests |python -mjson.tool 4. run curl with guest identity, check host identity whether exist # curl -u virt-who-test:redhat -k https://subscription.rhn.stage.redhat.com/subscription/consumers/[Guest Identity]/host |python -mjson.tool