RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1458674 - "KeyError: 'guestIds'" occurs after trigger guest when virt-who run against stage candlepin 2.0
Summary: "KeyError: 'guestIds'" occurs after trigger guest when virt-who run against s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.4
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Chris Snyder
QA Contact: Eko
URL:
Whiteboard:
: 1463996 (view as bug list)
Depends On:
Blocks: 1462942 1463996 1464129 1464133 1469737
TreeView+ depends on / blocked
 
Reported: 2017-06-05 07:56 UTC by yuefliu
Modified: 2021-09-09 12:20 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the virt-who service expected an outdated data format from the hypervisor check-ins. Consequently, virt-who in some cases failed to send the guest-hypervisor mappings and logged a "KeyError: 'guestIds'" message. The data format expected by virt-who has been updated, which prevents the described problem from occurring.
Clone Of:
: 1462942 1463996 1464129 1464133 1469737 (view as bug list)
Environment:
Last Closed: 2018-04-10 16:19:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github virt-who virt-who pull 75 0 None closed 1458674: Update use of result data to match the new async api 2020-08-04 21:05:40 UTC
Red Hat Product Errata RHEA-2018:0895 0 None None None 2018-04-10 16:21:04 UTC

Comment 4 Eko 2017-06-08 03:28:23 UTC
Hi Chris,
Most of our automation cases depend on the H/g message in rhsm.log, we need to check:
 - how many guests are listed for this hypervisors? make sure the dependence of H/g is expected.
 - what is the guest's state if poweron/poeroff/resume?

so if the guest info removed from rhsm.log, we can't know which guest has the poweron/poeroff/resume event, and also don't know the guest state is right or not?

is it possible that show the H/g info in rhsm.log before send to candlepin?
 - virt-who list the H/g info firstly
 - and then start to send
 - return send state, success or not

Comment 6 Eko 2017-06-09 01:27:38 UTC
ok, I absolutely agree with you, move it to 7.5, thanks.

Comment 7 Eko 2017-06-09 07:08:14 UTC
Hi Chris,
I have run the regression test for virt-who-0.17-12.el7_3 z stream build with stage candlepin2.0, 
the test results made me a little afraid, if KeyError: 'guestIds' arise, virt-who will be terminated. 

I suggest we remove the codes from virtwho/manager/subscriptionmanager/subscriptionmanager.py for virt-who-0.17-12.el7_3 and virt-who-0.19-5.el7 both packages.

As you said, these codes only used to log the report state, from my test result, it will not influence the h/g json info in rhsm.log when I removed the below code segment: 

            #for updated in resultData.get('updated', []):
            #   guests = [x['guestId'] for x in updated['guestIds']]
            #   self.logger.debug("Updated host %s with guests: [%s]",
            #                     updated['uuid'],
            #                     ", ".join(guests))
            #for created in resultData.get('created', []):
            #    guests = [x['guestId'] for x in created['guestIds']]
            #    self.logger.debug("Created host: %s with guests: [%s]",
            #                      created['uuid'],
            #                      ", ".join(guests))

Comment 10 Eko 2017-06-12 08:02:58 UTC
Hi Chris,

Thanks for the clear explanation, I agree with you, move it to RHEL7.5

Comment 11 Chris Snyder 2017-06-13 02:20:13 UTC
Adding a PR with the removal of the use of the guestIds key against upstream master.

We can proceed with fixing this additional places once we have this fix approved and tested.

Eko,

Could I please get a qa_ack on this bug. Thank you!


Cheers,
Chris

Comment 12 Chris Snyder 2017-06-19 18:22:39 UTC
This has been fixed in virt-who upstream and will be pulled into the first build for RHEL 7.5. Moving this to MODIFIED.

Comment 13 Kevin Howell 2017-06-26 14:45:40 UTC
*** Bug 1463996 has been marked as a duplicate of this bug. ***

Comment 15 yuefliu 2017-07-31 07:24:28 UTC
Have fixed the clone Bug 1469737 with virt-who-0.19-6.el7_4.noarch for rhel7.4.z, and will verify it in the first build for RHEL 7.5.

Comment 18 yuefliu 2017-12-05 08:37:32 UTC
Verified the bug with virt-who-0.21.1-1.el7.noarch, no the issue reproduce.

Comment 21 errata-xmlrpc 2018-04-10 16:19:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0895


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