Bug 834108 - Subscription Manager Register : Hangs with invalid IP Address
Summary: Subscription Manager Register : Hangs with invalid IP Address
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python-rhsm
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michael Stead
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-06-20 20:15 UTC by Sharath Dwaral
Modified: 2015-03-23 01:14 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-01-08 07:17:21 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0039 0 normal SHIPPED_LIVE python-rhsm bug fix update 2013-01-07 15:28:26 UTC

Description Sharath Dwaral 2012-06-20 20:15:01 UTC
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 Program Management 2012-06-20 20:27:14 UTC
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 16:37:45 UTC
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 Program Management 2012-07-12 14:39:16 UTC
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 21:59:03 UTC
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 07:17:21 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.

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.