Bug 716990

Summary: subscription-manager list --available throws traceback
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.2CC: spandey
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-27 22:04:46 UTC Type: ---
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: 682238    

Description John Sefler 2011-06-27 16:59:02 UTC
Description of problem:
Cannot list available pools after registering as testuser1 against onpremises candlepin deployed with TESTDATA=1


Version-Release number of selected component (if applicable):
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.1-1.git.264.7cc914b.el6.x86_64
[root@jsefler-onprem-62candlepin proxy]# git branch
  0.3
* master
[root@jsefler-onprem-62candlepin proxy]# git show-ref | grep master
70e2d46fe53aefa75b42a8c0b82debc22ce94250 refs/heads/master
70e2d46fe53aefa75b42a8c0b82debc22ce94250 refs/remotes/origin/master


How reproducible:


Steps to Reproduce:
[root@jsefler-onprem-62server ~]# subscription-manager register --username=testuser1 --password=password --owner=admin
admin
822346d4-fef7-492a-8354-974428d307ed jsefler-onprem-62server.usersys.redhat.com
[root@jsefler-onprem-62server ~]# subscription-manager list --available
consumer: admin not found

^^^ DID NOT EXPECT THAT (EXPECTED A LIST OF POOLS)
  

Additional info:
# tail -f /var/log/rhsm/rhsm.log


2011-06-27 12:53:29,904 [INFO]  @connection.py:320 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-06-27 12:53:29,904 [INFO]  @connection.py:330 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2011-06-27 12:53:30,066 [DEBUG]  @certlib.py:659 - Sorting product and entitlement cert status for: 2011-06-27 12:53:30.065978
2011-06-27 12:53:30,099 [DEBUG]  @certlib.py:677 - Installed product IDs: ['100000000000060', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2011-06-27 12:53:30,099 [DEBUG]  @certlib.py:668 - valid entitled products: []
2011-06-27 12:53:30,099 [DEBUG]  @certlib.py:669 - expired entitled products: []
2011-06-27 12:53:30,101 [INFO]  @connection.py:168 - work in insecure mode ?:False
2011-06-27 12:53:30,101 [INFO]  @connection.py:172 - loading ca pem certificates from: /etc/rhsm/ca/
2011-06-27 12:53:30,101 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/fakamai-cp1.pem'
2011-06-27 12:53:30,102 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-06-27 12:53:30,102 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/redhat-uep.pem'
2011-06-27 12:53:30,103 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/candlepin-stage.pem'
2011-06-27 12:53:30,319 [INFO]  @connection.py:199 - status code: 200
2011-06-27 12:53:30,323 [INFO]  @connection.py:168 - work in insecure mode ?:False
2011-06-27 12:53:30,323 [INFO]  @connection.py:172 - loading ca pem certificates from: /etc/rhsm/ca/
2011-06-27 12:53:30,324 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/fakamai-cp1.pem'
2011-06-27 12:53:30,325 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-06-27 12:53:30,326 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/redhat-uep.pem'
2011-06-27 12:53:30,327 [INFO]  @connection.py:156 - loading ca certificate '/etc/rhsm/ca/candlepin-stage.pem'
2011-06-27 12:53:30,469 [INFO]  @connection.py:199 - status code: 404
2011-06-27 12:53:30,471 [ERROR]  @managercli.py:50 - exception caught in subscription-manager
2011-06-27 12:53:30,471 [ERROR]  @managercli.py:51 - consumer: admin not found
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 78, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 69, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 933, in main
    cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 197, in main
    self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 815, in _do_command
    facts, self.options.all, on_date)
  File "/usr/share/rhsm/subscription_manager/managerlib.py", line 374, in getAvailableEntitlements
    dlist = list_pools(cpserver, consumer_uuid, facts, all, active_on)
  File "/usr/share/rhsm/subscription_manager/managerlib.py", line 355, in list_pools
    return uep.getPoolsList(ownerid, consumer_uuid, all, active_on)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 503, in getPoolsList
    results = self.conn.request_get(method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 222, in request_get
    return self._request("GET", method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 200, in _request
    self.validateResponse(result)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 219, in validateResponse
    parsed['displayMessage'])
RestlibException: consumer: admin not found

Comment 2 John Sefler 2011-06-27 17:24:01 UTC
[root@jsefler-onprem-62server ~]# rpm -q python-rhsm
python-rhsm-0.96.5-1.git.4.46b31eb.el6.noarch

Comment 3 Bryan Kearney 2011-06-27 17:25:02 UTC
what version of python-rhsm do you have?

Comment 4 John Sefler 2011-06-27 22:04:46 UTC
Closing as NOTABUG...
My versions of python-rhsm and subscription-manager where incompatible.

The following versions do NOT throw a traceback on list --available...

[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.2-1.git.6.a062826.el6.x86_64
[root@jsefler-onprem-62server ~]# rpm -q python-rhsm
python-rhsm-0.96.5-1.git.4.46b31eb.el6.noarch