Bug 834108 - Subscription Manager Register : Hangs with invalid IP Address
Subscription Manager Register : Hangs with invalid IP Address
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python-rhsm (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michael Stead
Entitlement Bugs
:
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-06-20 16:15 EDT by Sharath Dwaral
Modified: 2015-03-22 21:14 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: A very long default timeout setting in a library. Consequence: clients using python-rhsm appeared to hang Fix: Set the default timeout to a more reasonable value. Result: clients using python-rhsm are now more responsive.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-08 02:17:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Time out dialog box when invalid IP and port number are entered (30.59 KB, image/png)
2012-07-16 17:59 EDT, Sharath Dwaral
no flags Details

  None (edit)
Description Sharath Dwaral 2012-06-20 16:15:01 EDT
Description of problem:
The CLI and GUI hangs when an invalid IP Address is provided as proxy hostname and an arbitrary valid port number (with in the range 0-65535)

Version-Release number of selected component (if applicable):
RHEL 5.9
# rpm -qa | grep subscription-manager
subscription-manager-migration-1.0.4-1.git.0.0fe81f8.el5
subscription-manager-1.0.4-1.git.0.0fe81f8.el5
subscription-manager-migration-data-1.11.1.1-1.git.2.c7fbafe.el5
subscription-manager-gui-1.0.4-1.git.0.0fe81f8.el5
subscription-manager-firstboot-1.0.4-1.git.0.0fe81f8.el5
# rpm -qa | grep python-rhsm
python-rhsm-1.0.2-1.git.1.4659671.el5

How reproducible:
Always

Steps to Reproduce:

IN CLI 

1. Unregister subscription manager
   # subscription-manager unregister

2. vim /etc/rhsm/rhsm.conf

   # an http proxy server to use
   proxy_hostname = 

   # port for http proxy server
   proxy_port = 

   enter an invalid proxy hostname and port number 
   (eg:123.123.123.123 and 1234)

3. # subscription-manager register --username=USERNAME --password=PASSWORD --org=ORGANISATION
    

IN GUI

1. # subscription-manageer-gui
2. Click on system on window tab
3. Click on configure proxy
4. Check the option "I would like to connect via HTTP proxy"
5. Enter 123.123.123.123:1234 in the text box
6. Click close
7. Click Register
  
Actual results:
It hangs in both CLI and GUI

Expected results:
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
Comment 1 RHEL Product and Program Management 2012-06-20 16:27:14 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 2 Michael Stead 2012-07-10 12:37:45 EDT
httplib in python <= 2.4 seems to have a very long timeout of around 3 mins.
When an invalid proxy or server address is configured, this feels way to long
in both the CLI and UI.
    
Set the default timeout to 60 seconds, but only on python 2.4 or less. This matches more recent versions of python.

This is the best we can do for EL5.


Fixed: 3d80c4794bcb45951823da3bbb97b2a252c81e24 (master)
Available in: python-rhsm-1.0.4-1
Comment 4 RHEL Product and Program Management 2012-07-12 10:39:16 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 5 Sharath Dwaral 2012-07-16 17:59:03 EDT
Created attachment 598526 [details]
Time out dialog box when invalid IP and port number are entered

Version:
# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-1.0.9-1.git.22.35b5155.el5
python-rhsm-1.0.3-1.git.2.47dc8f4.el5
subscription-manager-migration-data-1.11.2.2-1.git.0.2eea155.el5
subscription-manager-migration-1.0.9-1.git.22.35b5155.el5
subscription-manager-gui-1.0.9-1.git.22.35b5155.el5
subscription-manager-firstboot-1.0.9-1.git.22.35b5155.el5

Verification:

IN CLI 

1. Unregister subscription manager
   # subscription-manager unregister

2. vim /etc/rhsm/rhsm.conf

   # an http proxy server to use
   proxy_hostname = 

   # port for http proxy server
   proxy_port = 

   enter an invalid proxy hostname and port number 
   (eg:123.123.123.123 and 1234)

3. # subscription-manager register --username=USERNAME --password=PASSWORD --org=ORGANISATION

Result:

Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

IN GUI

1. # subscription-manageer-gui
2. Click on Register
3. Click on configure proxy
4. Check the option "I would like to connect via HTTP proxy"
5. Enter 123.123.123.123:1234 in the text box
6. Click close
7. Click Next

Result
Please refer Attachment

Moving bug to VERIFED
Comment 7 errata-xmlrpc 2013-01-08 02:17:21 EST
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-2013-0039.html

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