Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1001169

Summary: subscription-manager CLI attach --auto will not persist the unsetting of the service-level
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: bkearney, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 21:28:05 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: 862910    

Description John Sefler 2013-08-26 15:16:30 UTC
Description of problem:
When calling subscription-manager attach --auto --service-level="", the service level should be unset before attempting the auto attachment.  This is not happening.


Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.9.3-1.el6
python-rhsm: 1.9.3-1.el6


How reproducible:


Steps to Reproduce:
[root@jsefler-6 ~]# subscription-manager register --serverurl=https://subscription.rhn.stage.redhat.com:443/subscription --username=qa
Password: 
The system has been registered with ID: 501dd142-4952-4f26-b9cd-aac1572948e5 
[root@jsefler-6 ~]# subscription-manager service-level --list
+-------------------------------------------+
               Available Service Levels
+-------------------------------------------+
None
Premium
Self-support
Standard
[root@jsefler-6 ~]# subscription-manager service-level --set=Standard
Service level set to: Standard
[root@jsefler-6 ~]# subscription-manager attach --auto --servicelevel=""
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Not Subscribed

[root@jsefler-6 ~]# subscription-manager service-level
Current service level: Standard                     <============== WRONG
[root@jsefler-6 ~]# subscription-manager service-level --set=""
Service level preference has been unset
[root@jsefler-6 ~]# subscription-manager service-level
Service level preference not set                    <============== CORRECT

Comment 1 Carter Kozak 2013-08-29 18:46:28 UTC
commit 4c00469a5992a6e91df0f344b4559cee60309281
Author: ckozak <ckozak>
Date:   Mon Aug 26 11:51:37 2013 -0400

    1001169: fix pythonic empty string identity problems

Comment 3 John Sefler 2013-09-15 17:54:24 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.9.6-1.el6.x86_64
python-rhsm-1.9.6-1.el6.x86_64

[root@jsefler-6 ~]# subscription-manager register --serverurl=https://subscription.rhn.stage.redhat.com:443/subscription --username=qa
Password: 
The system has been registered with ID: 28fecaea-e28f-44d8-b58f-3cea9e9708ad 
[root@jsefler-6 ~]# subscription-manager service-level --list
+-------------------------------------------+
               Available Service Levels
+-------------------------------------------+
None
PREMIUM
Self-Support
Standard
[root@jsefler-6 ~]# subscription-manager service-level --set=Standard
Service level set to: Standard
[root@jsefler-6 ~]# subscription-manager attach --auto --servicelevel=""
Service level set to:               <=========  VERIFIED: servicelevel was unset
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@jsefler-6 ~]# subscription-manager service-level
Service level preference not set    <=========  VERIFIED: servicelevel was unset
[root@jsefler-6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4
                   guests)
Provides:          Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Beta
SKU:               RH0103708
Contract:          10014848
Account:           477931
Serial:            4888036419779628206
Pool ID:           8a99f9843c1bef8f013c1f81284004ae
Active:            True
Quantity Used:     1
Service Level:     Premium       <=========  VERIFIED: any auto attached 
Service Type:      L1-L3                     servicelevel is expected when unset
Status Details:    
Starts:            12/31/2012
Ends:              12/31/2013

[root@jsefler-6 ~]# 


Moving to VERIFIED

Comment 4 errata-xmlrpc 2013-11-21 21:28:05 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-1659.html