Bug 822057

Summary: Can't list what os release to use
Product: Red Hat Enterprise Linux 6 Reporter: Hui Wang <huiwang>
Component: subscription-managerAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 6.3CC: cduryee, esammons, jsefler, syeghiay
Target Milestone: rc   
Target Release: 6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 832118 833539 (view as bug list) Environment:
Last Closed: 2012-06-20 12:57:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 738066, 803375, 826592, 832118, 833539    

Description Hui Wang 2012-05-16 08:38:05 UTC
Description of problem:
Client can't list what os release to use when run "subscription-manager release --list" and report "Network error, unable to connect to server".

Version-Release number of selected component (if applicable):
katello-configure-0.3.3-2.el6_2.noarch
katello-headpin-all-0.2.6-4.el6_2.noarch
katello-common-0.3.1-1.el6_2.noarch
katello-cli-common-0.3.2-3.el6_2.noarch
katello-headpin-0.2.6-4.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
candlepin-0.6.2-1.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
candlepin-tomcat6-0.6.2-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
thumbslug-0.0.24-1.el6_2.noarch

How reproducible:
100%

Steps to Reproduce:
1.Register to sam (SAM-2012-05-15.1)
#subscription-manager register 
Username: admin
Password: 
The system has been registered with id: eb11c01e-a6a6-477f-a091-862e334f1446 
2.Subscribe subscription
# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               
3.List what os release to use
# subscription-manager release --list
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
  
Actual results:
# subscription-manager release --list
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

Expected results:
Can't list what os release to use as following:
#subscription-manager release --list
6.1
6.2
6.3
6Client
6Server
6ComputeNode
6Workstation

Additional info:
#cat /var/log/rhsm/rhsm.log
........
2012-05-16 16:09:02,697 [ERROR]  @managercli.py:101 - exception caught in subscription-manager
2012-05-16 16:09:02,698 [ERROR]  @managercli.py:102 - [Errno -2] Name or service not known
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 79, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 70, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1774, in main
    return cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 277, in main
    return_code = self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1045, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/share/rhsm/subscription_manager/release.py", line 94, in get_releases
    data = self.content_connection.get_versions(listing_path)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 215, in get_versions
    results = self._request("GET", handler, body="")
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 183, in _request
    conn.request("GET", handler, body="", headers={"Content-Length": "0"})
  File "/usr/lib64/python2.6/httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
    self.endheaders()
  File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
    self._send_output()
  File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.6/httplib.py", line 739, in send
    self.connect()
  File "/usr/lib64/python2.6/site-packages/M2Crypto/httpslib.py", line 51, in connect
    socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
gaierror: [Errno -2] Name or service not known

Comment 1 Eric Sammons 2012-05-16 17:45:22 UTC
What version of subscription-manager were you using?

Comment 2 Eric Sammons 2012-05-16 18:49:24 UTC
This release option appears to be specific to subscription-manager >= 0.99; however, as tested above it is not working.  However, in versions < 0.99 you will receive help to specify a supported module.

Comment 3 Hui Wang 2012-05-17 02:19:23 UTC
  (In reply to comment #1)
> What version of subscription-manager were you using?

I was used subscription-manager-0.99.17-1.el6.x86_64.rpm.

Comment 4 Chris Duryee 2012-05-21 19:57:12 UTC
a patch for this is under review

Comment 5 Chris Duryee 2012-05-22 13:27:59 UTC
6fea55a RHEL6.3 0.99.12+ for python-rhsm

Comment 6 Chris Duryee 2012-05-22 15:08:46 UTC
16848bf21 rhel6.3 0.99.18+ sub-mgr

Comment 8 Hui Wang 2012-05-23 09:38:35 UTC
Update the subscription-manager to 0.99.19 and verified the issue, the result is PASS.

Comment 11 John Sefler 2012-05-24 15:11:11 UTC
Moving to VERIFIED based on comment 8 verification using subscription-manager-0.99.19-1

Comment 13 errata-xmlrpc 2012-06-20 12:57:52 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-2012-0804.html