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 1149286

Summary: tab-completion for rhn-migrate-classic-to-rhsm is completely wrong after several options were changed
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: rc   
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:15:28 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-03 16:29:09 UTC
Description of problem:
The tab completion options no longer match the help options for rhn-migrate-classic-to-rhsm.


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 ~]# rhn-migrate-classic-to-rhsm --help | grep "  -"
  -h, --help            show this help message and exit
  -n, --no-auto         don't execute the auto-attach option while registering
  -s SERVICE_LEVEL, --service-level=SERVICE_LEVEL
  --no-proxy            don't use legacy proxy settings with destination
  --org=ORG             organization to register to
  --environment=ENVIRONMENT
  -f, --force           ignore channels not available on destination server
  --legacy-user=LEGACY_USER
  --legacy-password=LEGACY_PASSWORD
  --destination-url=DESTINATION_URL
  --destination-user=DESTINATION_USER
  --destination-password=DESTINATION_PASSWORD
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm -<TAB><TAB>
--environment                    --no-proxy
-f                               --org
--force                          --redhat-password
-g                               --redhat-user
--gui                            -s
-h                               --serverurl
--help                           --servicelevel
-n                               --subscription-service-password
--no-auto                        --subscription-service-user
[root@jsefler-os7 ~]#


Actual results:
above

Expected results:
All of the options presented by the <TAB><TAB> completion should match the list of options reported by rhn-migrate-classic-to-rhsm --help.  As shown above, they currently do not match anymore.

Additional info:

Comment 1 Chris "Ceiu" Rog 2014-10-24 13:58:02 UTC
commit cc3558626fcb16bd6e79211e9b3bf40dcaaa79a8
Merge: 35b4fd6 ebc1499
Author: Devan Goodwin <dgoodwin>
Date:   Thu Oct 23 11:36:04 2014 -0300

    Merge pull request #1048 from candlepin/crog/1149286-c
    
    1149286: Updated autocompletion for RHN migration script.

Comment 2 John Sefler 2014-10-31 20:57:18 UTC
Don't forget to remove the -g and --gui options from the tab completion of rhn-migrate-classic-to-rhsm.  These two options have been removed.

Still failing in subscription-manager-migration-1.13.7-1

Comment 3 Chris "Ceiu" Rog 2014-12-03 16:08:48 UTC
commit aa2f54993d50fe67276590222e81701949e270fe
Author: Chris Rog <crog>
Date:   Tue Dec 2 13:09:31 2014 -0500

    1149286: Removed obsolete CLI options from auto-completion
    
    - The -g and -gui options have been removed from the migration tool's
      auto-completion script.

Comment 5 John Sefler 2014-12-12 18:39:16 UTC
Verifying version....
[root@jsefler-os7 ~]# rpm -q subscription-manager
subscription-manager-1.13.12-1.el7.x86_64

[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm --help | grep "  -"
  -h, --help            show this help message and exit
  -n, --no-auto         don't execute the auto-attach option while registering
  -s SERVICE_LEVEL, --servicelevel=SERVICE_LEVEL
  --no-proxy            don't use legacy proxy settings with destination
  --org=ORG             organization to register to
  --environment=ENVIRONMENT
  -f, --force           ignore channels not available on destination server
  --legacy-user=LEGACY_USER
  --legacy-password=LEGACY_PASSWORD
  --destination-url=DESTINATION_URL
  --destination-user=DESTINATION_USER
  --destination-password=DESTINATION_PASSWORD
[root@jsefler-os7 ~]# 
[root@jsefler-os7 ~]# rhn-migrate-classic-to-rhsm -<TAB><TAB>
--destination-password  -h                      --no-proxy
--destination-url       --help                  --org
--destination-user      --legacy-password       -s
--environment           --legacy-user           --servicelevel
-f                      -n                      
--force                 --no-auto   
[root@jsefler-os7 ~]# 

VERIFIED: All of the current rhn-migrate-classic-to-rhsm help options bash-complete as expected.

Comment 7 errata-xmlrpc 2015-03-05 13:15:28 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