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 1311884 - Error in communication with subscription manager as retry_after is "NoneType"
Summary: Error in communication with subscription manager as retry_after is "NoneType"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.8
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-25 09:39 UTC by Liushihui
Modified: 2016-12-01 00:35 UTC (History)
7 users (show)

Fixed In Version: virt-who-0.16-5.el6.noarch
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 23:57:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virt-who log (57.08 KB, text/plain)
2016-02-25 09:41 UTC, Liushihui
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0859 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2016-05-10 22:44:47 UTC

Description Liushihui 2016-02-25 09:39:09 UTC
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

Comment 1 Liushihui 2016-02-25 09:41:03 UTC
Created attachment 1130456 [details]
virt-who log

Comment 2 Radek Novacek 2016-02-25 09:45:25 UTC
This should be fixed in virt-who-0.16-5.el6.noarch.

Comment 4 Liushihui 2016-03-23 08:48:56 UTC
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.

Comment 6 errata-xmlrpc 2016-05-10 23:57:38 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://rhn.redhat.com/errata/RHEA-2016-0859.html


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