Hide Forgot
Description of problem: During the process of registering rhel host to rhevm4.0, virt-who will show "AttributeError: 'NoneType' object has no attribute 'text'" when virt-who run at rhevm mode Version-Release number of selected component (if applicable): virt-who-0.17-10.el7.noarch subscription-manager-1.17.10-1.el7.x86_64 python-rhsm-1.17.6-1.el7.x86_64 How reproducible: Always Steps to Reproduce: 1.Register system to Satellite 2.Configure virt-who run at rhevm mode and restart virt-who service [root@hp-z220-05 virt-who.d]# vim /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 [root@hp-z220-05 virt-who.d]# cat rhevm [test-rhevm1] type=rhevm server=https://tyan-gt24-04.rhts.eng.bos.redhat.com:443/ovirt-engine/ username=admin@internal password=red2015 owner=ACME_Corporation env=Library 3. In rhevm webUI, add a rhel host to rhevm, check virt-who's log. [root@hp-z220-05 virt-who.d]# tail -f /var/log/rhsm/rhsm.log 2016-09-01 01:43:17,688 [virtwho.test-rhevm1 ERROR] RhevM-1(4255):MainThread @virt.py:run:379 - Virt backend 'test-rhevm1' fails with exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 372, in run self._run() File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 409, in _run report = self._get_report() File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 334, in _get_report return HostGuestAssociationReport(self.config, self.getHostGuestMapping()) File "/usr/lib/python2.7/site-packages/virtwho/virt/rhevm/rhevm.py", line 155, in getHostGuestMapping sockets = host.find('cpu').find('topology').find('sockets').text AttributeError: 'NoneType' object has no attribute 'text' 2016-09-01 01:43:17,688 [virtwho.test-rhevm1 INFO] RhevM-1(4255):MainThread @virt.py:run:392 - Waiting 60 seconds before retrying backend 'test-rhevm1' Actual results: It will show "AttributeError" every interval(60s) until registered to rhevm successfully Expected results: It shouldn't show any error info during register rhel hosts. Additional info:
The fix here should be to detect when a system is not registered and we are using a rhevm backend and output a better log message saying that the cause of the failure is a lack of registration.
Where is there a rhevm instance to test against during development? I would like to request the configuration used for reproduction of this bug. The config given in comment 0 does not work for me today. (I wonder if the rhevm instance specified exists any longer?) Thanks for your help!
It hasn't reproduced on latest virt-who-0.19-4.el7.noarch. Therefore, close it. Thanks.