Red Hat Bugzilla – Bug 1286945
Properly handle http 429 error code
Last modified: 2016-11-30 19:36:14 EST
Candlepin has recently introduced rate-limitation for host-guest associations. It returns HTTP error code 429 when the guests (including virt-who) are sending request too often. The clients should increase checking-in interval when they get this error code. Unfortunately current version of virt-who in RHEL-7 can't handle this kind of reply and it fails with following error: > 2015-11-18 15:11:29,132 [INFO] @subscriptionmanager.py:124 - Sending update > in hosts-to-guests mapping: {inferno.mitre.org: > [42203c35-09bc-cf00-6d2a-c60b55231418, 42205d69-c1f5-cda7-d93d-131dbabf7a67, > 42202abf-3785-791d-b000-12cabc19f92b, 42205f24-2... blah blah > 2015-11-18 15:11:30,038 [ERROR] @virtwho.py:123 - Error in communication > with subscription manager: > Traceback (most recent call last): > File "/usr/share/virt-who/virtwho.py", line 105, in send > self._sendGuestAssociation(report) > File "/usr/share/virt-who/virtwho.py", line 134, in _sendGuestAssociation > result = manager.hypervisorCheckIn(report.config, report.association, > report.config.type) > File > "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", > line 134, in hypervisorCheckIn > return self.connection.hypervisorCheckIn(config.owner, config.env, > mapping) > File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 815, in > hypervisorCheckIn > return self.conn.request_post(url, host_guest_mapping) > File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 605, in > request_post > return self._request("POST", method, params) > File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 530, in > _request > self.validateResponse(result, request_type, handler) > File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 589, in > validateResponse > raise NetworkException(response['status']) > NetworkException: Network error code: 429 Support for this error code has been added in virt-who upstream and needs to be backported to RHEL-7. This affects lots of customers.
Is there somewhere I can find what the checking-in internal minimum is? I had mine set to 5 minutes previously. I've changed it to 1 hour just now to see if that resolves the issue but I'd really like the interval to be shorter than a hour.
Fixed in virt-who-0.17-1.el7.
verified with virt-who-0.17-6.el7.noarch
There is a typo in the Doc Text: HTTOP -> HTTP, otherwise looks good. Thanks.
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/RHBA-2016-2387.html