Bug 803762 - subscription-manager service-level --show fails against older candlepin
Summary: subscription-manager service-level --show fails against older candlepin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Michael Stead
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On: 803756
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2012-03-15 15:28 UTC by John Sefler
Modified: 2012-06-20 13:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:07:15 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0804 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Description John Sefler 2012-03-15 15:28:30 UTC
Description of problem:
Based on sprint 40 planning, newer client functionality should fail gracefully against older candlepin servers


Version-Release number of selected component (if applicable):
[root@hp-xw9300-01 ~]# rpm -q subscription-manager
subscription-manager-0.99.9-1.el6.x86_64


How reproducible:


Steps to Reproduce:
deploy an older candlepin server (than 0.5.5 ish?)
configure client to use the older candlepin and register etc...

[root@hp-xw9300-01 ~]# subscription-manager service-level --show
'serviceLevel'


^^^ Expected that to fail more gracefully with a message stating something to the effect this service-level query functionality is not supported by the older candlepin server to which you are registered.




[root@hp-xw9300-01 ~]# tail -f /var/log/rhsm/rhsm.log

2012-03-15 11:23:40,341 [INFO]  @connection.py:389 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-03-15 11:23:40,341 [INFO]  @connection.py:400 - Connection Built: host: subscription.rhn.stage.redhat.com, port: 443, handler: /subscription
2012-03-15 11:23:40,344 [INFO]  @connection.py:389 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-03-15 11:23:40,344 [INFO]  @connection.py:400 - Connection Built: host: subscription.rhn.stage.redhat.com, port: 443, handler: /subscription
2012-03-15 11:23:40,347 [DEBUG]  @connection.py:217 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-03-15 11:23:40,347 [DEBUG]  @connection.py:200 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-03-15 11:23:40,348 [DEBUG]  @connection.py:200 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-03-15 11:23:40,349 [DEBUG]  @connection.py:238 - Making request: GET /subscription/consumers/fd350157-136c-4ce7-83a0-768808f11ed4
2012-03-15 11:23:41,240 [DEBUG]  @connection.py:252 - Response status: 200
2012-03-15 11:23:41,241 [ERROR]  @managercli.py:94 - Error: Unable to retrieve service levels.
2012-03-15 11:23:41,242 [ERROR]  @managercli.py:95 - 'serviceLevel'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 591, in _do_command
    self.show_service_level()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 606, in show_service_level
    service_level = consumer['serviceLevel'] or ""
KeyError: 'serviceLevel'

Comment 1 Michael Stead 2012-03-21 14:11:24 UTC
Fixed by 5e981d0b9639a89bbc00e8f1add247f3ff049aae in master branch.

Available in subscription-manager-0.99.11+

Comment 2 Michael Stead 2012-03-21 14:13:28 UTC
Commit mentioned above is a string change, the main fix was done in commit 05dedb4b94d19fc435b7505188977390badabaaa

Comment 5 Shwetha Kallesh 2012-03-26 11:26:46 UTC
Moving to verified

RPM used:
[root@skallesh product]# rpm -qa | grep subscription-manager
subscription-manager-debuginfo-0.99.12-1.el6.x86_64
subscription-manager-gnome-0.99.12-1.el6.x86_64
subscription-manager-0.99.12-1.el6.x86_64
subscription-manager-migration-0.99.12-1.el6.x86_64
subscription-manager-firstboot-0.99.12-1.el6.x86_64
subscription-manager-migration-data-1.12.1.1-1.git.6.ea6813e.el6.noarch


[root@skallesh pki]# subscription-manager register 
Username: stage_test_1
Password: 
The system has been registered with id: 4649f6b8-a802-4233-b1d0-f4972b9c70f8 


[root@skallesh product]# subscription-manager service-level --show
ERROR: The service-level command is not supported by the server.

Comment 7 errata-xmlrpc 2012-06-20 13:07:15 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


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