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 1149007

Summary: broken --service-level option in rhn-migrate-rhn-classic-to-rhsm
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Chris "Ceiu" Rog <crog>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.1CC: crog, wpoteat
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:18:09 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: 1005618    

Description John Sefler 2014-10-02 21:56:55 UTC
Description of problem:
During the sat5to6 migration effort, several of the command line options of rhn-migrate-rhn-classic-to-rhsm were changed.  Among them was "--servicelevel" changed to "--service-level".  Unfortunately the new "--service-level" fails when you try to use it with a message stating "error: no such option: --service-level".


Version-Release number of selected component (if applicable):
[root@jsefler-os7 ~]# rpm -q subscription-manager-migration
subscription-manager-migration-1.13.3-1.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-os7 ~]# rhnreg_ks --serverUrl=https://sat-56-server.usersys.redhat.com/XMLRPC --username=admin --password=***** --profilename=rhsm-automation.jsefler-os7.usersys.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm --help | grep service  -s SERVICE_LEVEL, --service-level=SERVICE_LEVEL
                        service level to follow when attaching subscriptions,
                        for no service level use --servicelevel=""
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm --destination-url=https://subscription.rhn.stage.redhat.com:443/subscription --legacy-user=admin --destination-user=stage_auto_testuser --service-level=STANDARD
Legacy password: 
Destination password: 

Retrieving existing legacy subscription information...

+-----------------------------------------------------+
System is currently subscribed to these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

+-----------------------------------------------------+
Installing product certificates for these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

Product certificates installed successfully to /etc/pki/product.

Preparing to unregister system from legacy server...
System successfully unregistered from legacy server.

Attempting to register system to destination server...
Usage: subscription-manager register [OPTIONS]

subscription-manager: error: no such option: --service-level

Unable to register.
For further assistance, please contact Red Hat Global Support Services.
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm --destination-url=https://subscription.rhn.stage.redhat.com:443/subscription --legacy-user=admin --destination-user=stage_auto_testuser --servicelevel=STANDARD
Usage: rhn-migrate-classic-to-rhsm [OPTIONS]

rhn-migrate-classic-to-rhsm: error: no such option: --servicelevel
[root@jsefler-os7 ~]# 




Actual results:
1. subscription-manager: error: no such option: --service-level
2. for no service level use --servicelevel=""

Expected results:
Expected the newly renamed "--service-level" to be honored when running rhn-migrate-classic-to-rhsm.
Also expected the help message to be updated to "--service-level".

Additional info:
Notice that neither the new "--service-level" nor the old "--servicelevel" is honored.

Comment 2 Chris "Ceiu" Rog 2014-11-14 17:56:36 UTC
commit 2b32d4423cd8dbe4ca7c4d1aa31252346cefd764
Merge: cd0ff8d e53f036
Author: Devan Goodwin <dgoodwin>
Date:   Tue Nov 4 09:44:18 2014 -0400

    Merge pull request #1058 from candlepin/alikins/1157761_servicelevel
    
    1157761: revert to "--serverlevel"

Comment 4 John Sefler 2014-11-26 20:15:58 UTC
Verifying Version...
[root@jsefler-os7 ~]# rpm -q subscription-manager-migration
subscription-manager-migration-1.13.9-1.el7.x86_64


[root@jsefler-os7 ~]# rhnreg_ks --serverUrl=https://sat-56-server.usersys.redhat.com/XMLRPC --username=admin --password=*** --profilename=rhsm-automation.jsefler-os7.usersys.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm --help | grep service
  -s SERVICE_LEVEL, --servicelevel=SERVICE_LEVEL
                        service level to follow when attaching subscriptions,
                        for no service level use --servicelevel=""
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm --destination-url=https://subscription.rhn.stage.redhat.com:443/subscription --legacy-user=admin --destination-user=stage_auto_testuser --servicelevel=STANDARD
Legacy password: 
Destination password: 

Retrieving existing legacy subscription information...

+-----------------------------------------------------+
System is currently subscribed to these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

+-----------------------------------------------------+
Installing product certificates for these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

Product certificates installed successfully to /etc/pki/product.

Preparing to unregister system from legacy server...
System successfully unregistered from legacy server.

Attempting to register system to destination server...
The system has been registered with ID: 4b412809-7d4b-4182-94c5-5708ab84a4d6 
Service level set to: STANDARD

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

System 'jsefler-os7.usersys.redhat.com' successfully registered.

[root@jsefler-os7 ~]# 

VERIFIED: The --service-level option has successfully been reverted back to --service-level

Comment 6 errata-xmlrpc 2015-03-05 13:18:09 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.

https://rhn.redhat.com/errata/RHBA-2015-0502.html