Hide Forgot
Description of problem: When virt-who communicate with stage candlepin, if virt-who received 429, it will show "Error in communication with subscription manager" is cause by "TypeError: int() argument must be a string or a number, not 'NoneType'" Version-Release number of selected component (if applicable): virt-who-0.16-4.el6.noarch subscription-manager-1.16.8-2.el6.x86_64 python-rhsm-1.16.6-1.el6.x86_64 How reproducible: Always Steps to Reproduce: 1.Register system to stage candlepin 2.Configure virt-who monitor esx and hyperv as the following: [root@sgi-xe500-01 ~]# cat /etc/virt-who.d/virt [test-esx1] type=esx server=10.73.2.95 username=Administrator password=Welcome1! owner=ACME_Corporation env=Library hypervisor_id=hostname [root@sgi-xe500-01 ~]# cat /etc/sysconfig/virt-who | grep -v ^# | grep -v ^$ VIRTWHO_DEBUG=1 VIRTWHO_INTERVAL=2 VIRTWHO_HYPERV=1 VIRTWHO_HYPERV_OWNER=ACME_Corporation VIRTWHO_HYPERV_ENV=Library VIRTWHO_HYPERV_SERVER=10.73.5.212 VIRTWHO_HYPERV_USERNAME=administrator VIRTWHO_HYPERV_PASSWORD=Welcome1 3. Restart virt-who service and monitor virt-who's log [root@sgi-xe500-01 ~]# service virt-who restart [root@sgi-xe500-01 ~]# tail -f /var/log/rhsm/rhsm.log Actual results: When virt-who received 429 code, it will show error info as the following: 2016-02-25 03:08:33,202 [virtwho.main ERROR] MainProcess(1469):MainThread @virtwho.py:send:214 - Error in communication with subscription manager: Traceback (most recent call last): File "/usr/share/virt-who/virtwho.py", line 197, in send self._sendGuestAssociation(report) File "/usr/share/virt-who/virtwho.py", line 224, in _sendGuestAssociation manager.hypervisorCheckIn(report, self.options) File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 198, in hypervisorCheckIn retry_after = int(getattr(e, 'headers', {}).get('Retry-After')) TypeError: int() argument must be a string or a number, not 'NoneType' 2016-02-25 03:08:33,202 [virtwho.main DEBUG] MainProcess(1469):MainThread @virtwho.py:send_current_report:166 - Report from "env/cmdline" failed to sent Expected results: It shouldn't show TypeError exception in virt-who log, Retry-After should get correct type. Additional info: Please see the detail error info in attachment virt-who.log
Created attachment 1130456 [details] virt-who log
This should be fixed in virt-who-0.16-5.el6.noarch.
Verified it on virt-who-0.16-7.el6 since it will show normal log when virt-who received 429 from candlepin. Therefore, verify it. Verified version: virt-who-0.16-7.el6 subscription-manager-1.16.8-7.el6.x86_64 python-rhsm-1.16.6-1.el6.x86_64 Verified process: 1.Register system to stage candlepin 2.Configure virt-who monitor esx and hyperv as the following: [root@sgi-xe500-01 ~]# cat /etc/virt-who.d/virt [test-esx1] type=esx server=10.73.2.95 username=Administrator password=Welcome1! owner=ACME_Corporation env=Library hypervisor_id=hostname [root@sgi-xe500-01 ~]# cat /etc/sysconfig/virt-who | grep -v ^# | grep -v ^$ VIRTWHO_DEBUG=1 VIRTWHO_INTERVAL=2 VIRTWHO_HYPERV=1 VIRTWHO_HYPERV_OWNER=ACME_Corporation VIRTWHO_HYPERV_ENV=Library VIRTWHO_HYPERV_SERVER=10.73.5.212 VIRTWHO_HYPERV_USERNAME=administrator VIRTWHO_HYPERV_PASSWORD=Welcome1 3. Restart virt-who service and monitor virt-who's log [root@sgi-xe500-01 ~]# service virt-who restart [root@sgi-xe500-01 ~]# tail -f /var/log/rhsm/rhsm.log 2016-03-23 04:45:32,966 [virtwho.main DEBUG] MainProcess(22631):MainThread @virtwho.py:send_report:175 - 429 received, waiting 60 seconds until sending again Result: It will show normal log when received 429.
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://rhn.redhat.com/errata/RHEA-2016-0859.html