| Summary: | rhn_check hangs forever when sat not available | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Miroslav Suchý <msuchy> |
| Component: | rhnlib | Assignee: | Milan Zázrivec <mzazrivec> |
| Status: | CLOSED ERRATA | QA Contact: | Martin Minar <mminar> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 6.2 | CC: | jhutar, luc, mkoci, mminar, msuchy, msvoboda |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | rhnlib-2.5.22-11.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Due to an error in the rhnlib code, network operations would have become unresponsive when an HTTP connection to Red Hat Network (RHN) or RHN Satellite became idle. The code has been modified to use timeout for HTTP connections. Network operations are now terminated after predefined time interval and can be restarted.
|
Story Points: | --- |
| Clone Of: | 630875 | Environment: | |
| Last Closed: | 2011-12-06 16:50:07 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 630875 | ||
| Bug Blocks: | |||
|
Description
Miroslav Suchý
2011-03-16 10:20:17 UTC
Note for developer:
The change will be here:
--- /usr/lib/python2.6/site-packages/rhn/connections.py.orig 2011-03-16 11:37:41.369889498 +0100
+++ /usr/lib/python2.6/site-packages/rhn/connections.py 2011-03-16 11:24:46.604918969 +0100
@@ -64,7 +64,7 @@
response_class = HTTPResponse
def __init__(self, host, port=None):
- httplib.HTTPConnection.__init__(self, host, port)
+ httplib.HTTPConnection.__init__(self, host, port, timeout=30)
self._cb_rs = []
self._cb_ws = []
self._cb_ex = []
The change must be done in all classes in this module. And of course - it will be nice to set timeout in /etc/sysconfig/rhn/up2date config file. However rhnlib package has no way to read this file. So the timeout value will need to propagate from code from rhn-client-tools packages, which use rhn.connections module (it may be several layers).
spacewalk.git master: 6c2a93bcb7efa9873aee956f0cf7355177d4cc59 satellite.git CLIENT-RHEL-6: ae670a56be85d4ef50720d829dda71066640e88c
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause: A bug in rhnlib code.
Consequence: Network operations would hang forever in cases when connection to RHN / RHN Satellite would be established but idle.
Fix: Establish a timeout for HTTP connections to RHN / RHN Satellite.
Result: Idle HTTP connections would timeout after a predefined time interval.
Verified with rhnlib-2.5.22-11.el6. Notes: 1. Problem is only with http (port 80) version. 2. Used "nc -l 0.0.0.0 80" reproducer. 3. Old version didn't timeout. 4. New version: [root@XYZ ~]# time rhn_check -vv Could not retrieve action from <RetryServer for dell-pe-sc1435-02.rhts.englab.brq.redhat.com/XMLRPC>. Possible networking problem? real 2m0.382s user 0m0.110s sys 0m0.030s
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Diffed Contents:
@@ -1,7 +1 @@
-Cause: A bug in rhnlib code.
+Due to an error in the rhnlib code, network operations would have become unresponsive when an HTTP connection to Red Hat Network (RHN) or RHN Satellite became idle. The code has been modified to use timeout for HTTP connections. Network operations are now terminated after predefined time interval and can be restarted.-
-Consequence: Network operations would hang forever in cases when connection to RHN / RHN Satellite would be established but idle.
-
-Fix: Establish a timeout for HTTP connections to RHN / RHN Satellite.
-
-Result: Idle HTTP connections would timeout after a predefined time interval.
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. http://rhn.redhat.com/errata/RHBA-2011-1665.html |