Hide Forgot
Description of problem: When configure virt-who run at remote libvirt mode to report hwuuid to server, it will show "NameError: global name 'virt' is not defined" Version-Release number of selected component (if applicable): virt-who-0.18-1.el6.noarch subscription-manager-1.18.5-1.el6.x86_64 python-rhsm-1.18.5-1.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. Register system to stage candlepin. 2. Configure virt-who report remote libvirt hwuuid info to stage candlepin. [root@hp-z220-10 ~]# cat /etc/virt-who.d/virt [libvirt] type=libvirt server=hp-z220-03.qe.lab.eng.nay.redhat.com username=root password= owner=7970632 env=7970632 hypervisor_id=hwuuid 3. Restart virt-who and check virt-who's log [root@hp-z220-10 ~]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log 2016-12-11 21:49:11,074 [virtwho.libvirt DEBUG] Libvirtd-1(21719):MainThread @virt.py:run:363 - Virt backend 'libvirt' started 2016-12-11 21:49:11,075 [virtwho.libvirt INFO] Libvirtd-1(21719):MainThread @libvirtd.py:_get_url:125 - Protocol is not specified in libvirt url, using qemu+ssh:// 2016-12-11 21:49:11,076 [virtwho.libvirt INFO] Libvirtd-1(21719):MainThread @libvirtd.py:_get_url:136 - Libvirt path is not specified in the url, using /system 2016-12-11 21:49:11,076 [virtwho.libvirt INFO] Libvirtd-1(21719):MainThread @libvirtd.py:_connect:157 - Using libvirt url: qemu+ssh://root.lab.eng.nay.redhat.com/system?no_tty=1 2016-12-11 21:49:11,430 [virtwho.libvirt ERROR] Libvirtd-1(21719):MainThread @virt.py:run:378 - Virt backend 'libvirt' fails with exception: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/virtwho/virt/virt.py", line 371, in run self._run() File "/usr/lib/python2.6/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 197, in _run report = self._get_report() File "/usr/lib/python2.6/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 223, in _get_report return HostGuestAssociationReport(self.config, self._getHostGuestMapping()) File "/usr/lib/python2.6/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 315, in _getHostGuestMapping host = Hypervisor(hypervisorId=self._remote_host_id(), File "/usr/lib/python2.6/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 287, in _remote_host_id raise virt.VirtError( NameError: global name 'virt' is not defined 2016-12-11 21:49:11,432 [virtwho.libvirt INFO] Libvirtd-1(21719):MainThread @virt.py:run:391 - Waiting 60 seconds before retrying backend 'libvirt' Actual results: Failed to send remote host's hwuuid to stage candlepin as "NameError: global name 'virt' is not defined" Expected results: It should send remote host's hwuuid to stage candlepin Additional info: When configure virt-who send hostname/uuid(hypervisor_id=hostname/uuid) to server ,it hasn't this problem
hwuuid is applicable to esx and rhevm only according to "man virt-who-config"
According to comment2, Although hwuuid is not supported on remote libvirtd mode, it shouldn't show these error info in the log, it should show remind info like "hypervisor hwuuid is not implemented in remote libvirtd backend ". Therefore, Modify the expected result and reopen it. Expected result: it should show remind info like "hypervisor hwuuid is not implemented in remote libvirtd backend "
Moving to POST as the fix has been merged upstream. Also moving to RHEL 6.10 as development for 6.9 is over.
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available. The official life cycle policy can be reviewed here: http://redhat.com/rhel/lifecycle This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: https://access.redhat.com/
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:1915