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 1223334

Summary: subscription-manager auto attach not set the service-level as the subscription-manager-gui does
Product: Red Hat Enterprise Linux 6 Reporter: xingge <gxing>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: ldai, wpoteat
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-21 18:37:44 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: 1125249    

Description xingge 2015-05-20 11:04:02 UTC
Description of problem:
After use subscription-manager-gui to auto attach the system the service-level will be set to a proper value, but use subscription-manager CLI to auto attach the system the service level will remain unset.

Version-Release number of selected component (if applicable):
subscription-manager-1.14.6-1.el6.x86_64
subscription-manager-firstboot-1.14.6-1.el6.x86_64
subscription-manager-gui-1.14.6-1.el6.x86_64
python-rhsm-1.14.2-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.register the system
2.use CLI to auto attach the system
#subscription-manager attach --auto
3.check the service level

Actual results:
[root@dhcp-128-89 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed
[root@dhcp-128-89 ~]# subscription-manager service-level --show
Service level preference not set

Expected results:
[root@dhcp-128-89 ~]# subscription-manager service-level --show
Current service level: Premium

Cause the subscription the system attached need the service-level to be PREMIUM
[root@dhcp-128-89 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:            Oracle Java (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Beta
SKU:                 RH0103708
Contract:
Account:             5563898
Serial:              3391431771917036791
Pool ID:             8a99f98a4cc85a36014cda1507e85b15
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Premium        <---------the service-level should be set
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              04/20/2015
Ends:                04/20/2016
System Type:         Virtual

Additional info:

Comment 1 William Poteat 2015-05-21 15:43:55 UTC
GUI is designed to be inteactive and forces a service level decision. The command line is designed to be explicit with each command. If you want to auto attach at a specific service level, you need to explicitly indicate it. Otherwise it will simply match the subscription it finds to fulfill the auto-attach.

The consumer's service level is not set based on an attached subscription in either case. It is only based on the administrator's decision.

I suggest using the following command to specify level

subscription-manager register --auto-attach --servicelevel=Premium

Comment 2 William Poteat 2015-05-21 18:36:37 UTC
Please disregard Comment 1

The issue in general is that the config --remove command takes the entry out of the config file. The entry cannot be replaced in the original casing because the .ini parser will only deal in lowercase.

If the entry has been previously removed, it must be manually inserted into the file. Going forward with the code change associated, the entry will not be removed when the --remove command is called. The entry will be set to the default in the file.

Comment 3 William Poteat 2015-05-21 18:37:44 UTC
Comment 2 is for anther bug.