Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1573172

Summary: Failed to get mapping info - virt-who - KeyError: 'config.network.dnsConfig.hostName' [rhel-7.5.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: virt-whoAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: ahumbe, asakpal, candlepin-bugs, csnyder, dbragalo, khowell, patalber, rajukuma, salmy, shbharad, shyan, wpinheir, wpoteat, yuefliu
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1569299 Environment:
Last Closed: 2018-05-14 16:13:46 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: 1569299    
Bug Blocks:    

Description Oneata Mircea Teodor 2018-04-30 11:57:45 UTC
This bug has been copied from bug #1569299 and has been proposed to be backported to 7.5 z-stream (EUS).

Comment 3 Shuai Yan 2018-05-03 06:37:17 UTC
rhel: 7.5 (Maipo)
satellite: build: 6.3.1

Before upgrading:
    virt-who: virt-who-0.21.5-1.el7.noarch
using a changed key like: 'xxx_config.network.dnsConfig.hostName'
got log:
2018-05-03 02:20:37,617 [virtwho.main DEBUG] MainProcess(30787):Thread-2 @esx.py:_prepare:132 - Creating ESX event filter
2018-05-03 02:20:38,420 [virtwho.main ERROR] MainProcess(30787):Thread-2 @virt.py:run:388 - Thread 'esx' fails with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 379, in run
    self._run()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 215, in _run
    assoc = self.getHostGuestMapping()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 262, in getHostGuestMapping
    uuid = host['xxx_config.network.dnsConfig.hostName']
KeyError: 'xxx_config.network.dnsConfig.hostName'


Upgrading virt-who:
[root@sgi-uv2-01 ~]# rpm -Uvh ./virt-who-0.21.7-1.el7_5.noarch.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:virt-who-0.21.7-1.el7_5          ################################# [ 50%]
Cleaning up / removing...
   2:virt-who-0.21.5-1.el7            ################################# [100%]



After upgrading:
    virt-who: virt-who-0.21.7-1.el7_5.noarch
using a change key like 'xxx_config.network.dnsConfig.hostName'
got log:
2018-05-03 02:28:29,965 [virtwho.main DEBUG] MainProcess(30826):Thread-2 @esx.py:_prepare:129 - Log into ESX
2018-05-03 02:28:31,793 [virtwho.main DEBUG] MainProcess(30826):Thread-2 @esx.py:_prepare:132 - Creating ESX event filter
2018-05-03 02:28:32,549 [virtwho.main DEBUG] MainProcess(30826):Thread-2 @esx.py:getHostGuestMapping:268 - Host 'host-179' doesn't have hypervisor_id property
2018-05-03 02:28:32,549 [virtwho.main DEBUG] MainProcess(30826):Thread-2 @esx.py:getHostGuestMapping:268 - Host 'host-173' doesn't have hypervisor_id property
2018-05-03 02:28:32,549 [virtwho.main INFO] MainProcess(30826):Thread-2 @virt.py:_send_data:922 - Report for config "esx" gathered, placing in datastore


After upgrading virt-who, and run virt-who again, we cannot get the error log as before. 
So mark this as VERIFIED.

Comment 6 errata-xmlrpc 2018-05-14 16:13:46 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/RHBA-2018:1409