Bug 803778 - subscription-manager modules with --servicelevel option should be ignored against older candlepin
subscription-manager modules with --servicelevel option should be ignored aga...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Michael Stead
Entitlement Bugs
:
Depends On:
Blocks: 738066
  Show dependency treegraph
 
Reported: 2012-03-15 11:55 EDT by John Sefler
Modified: 2012-06-20 09:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:07:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-03-15 11:55:16 EDT
Description of problem:
Based on sprint 40 planning, newer client functionality should fail gracefully against older candlepin servers

All of the subscription-manager modules that allow a --servicelevel option should echo to stdout a friendly message stating something like this:
"Option --servicelevel will be ignored when communicating to a candlepin server that does not support this feature."

This affects the following modules:
[root@hp-xw9300-01 ~]# subscription-manager register --help | grep servicelevel
  --servicelevel=SERVICE_LEVEL
[root@hp-xw9300-01 ~]# subscription-manager subscribe --help | grep servicelevel
  --servicelevel=SERVICE_LEVEL
And will soon affect the subscription-manager list module


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...



# subscription-manager subscribe --auto --servicelevel="foo"
Service level set to: foo
Installed Product Current Status:
ProductName:          	Red Hat Enterprise Linux Server
Status:               	Subscribed               

^^^
In this case the servicelevel of "foo" was clearly ignored because there is no servicelevel checking by the old candlepin server, therefore we should echo to stdout that this option is being ignored.
Comment 1 John Sefler 2012-03-15 11:58:26 EDT
Same issue with register module...

# subscription-manager register --username qa@redhat.com --autosubscribe --servicelevel=foo
Password: 
The system has been registered with id: 26b57605-1902-48e5-bd6a-65648f773682 
Service level set to: foo
Installed Product Current Status:
ProductName:          	Red Hat Enterprise Linux Server
Status:               	Subscribed               

^^^
Again the servicelevel of "foo" was clearly ignored because there is no
servicelevel checking by the old candlepin server, therefore we should echo to
stdout that this option is being ignored.
Comment 2 Michael Stead 2012-03-20 11:23:25 EDT
The list command does the filtering by service level client-side, and since subscriptions already have the 'support_level' property, it will work on older versions of candlepin.

Should it error out for consistency, or should we leave it be?

My vote would be to leave it as is.
Comment 3 Bryan Kearney 2012-03-20 11:42:17 EDT
+1 to leave it as is.
Comment 4 Michael Stead 2012-03-21 10:17:26 EDT
The main fix was done in commit 05dedb4b94d19fc435b7505188977390badabaaa which gracefully handles missing API call.

Messages were updated in commits in master branch:
68224fda443f2103c22ecc2c677d0f4539914752
6d24ee715e18a4625325125203b7b86136ce0b18

Available in subscription-manager-0.99.11-1+
Comment 5 Michael Stead 2012-03-21 10:18:22 EDT
As per comment 2, the list command was left as is. It should work fine on older candlepin.
Comment 8 Shwetha Kallesh 2012-03-26 07:49:23 EDT
Verfied against following RPM

[root@skallesh ~]# 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 ~]# subscription-manager subscribe --auto --servicelevel="foo"
ERROR: The --servicelevel option is not supported by the server. Did not perform autosubscribe.
[root@skallesh ~]# subscription-manager unregister
System has been un-registered.
[root@skallesh ~]# subscription-manager register --auto --servicelevel="foo"
Username: stage_test_1
Password: 
The system has been registered with id: e1b4fcb6-3bdc-4ea1-b910-0546185f1260 
ERROR: The --servicelevel option is not supported by the server. Did not perform autosubscribe.
Comment 10 errata-xmlrpc 2012-06-20 09:07:18 EDT
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.