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 2029384

Summary: subscription-manager syspurpose does not tab complete on --password option for submodules
Product: Red Hat Enterprise Linux 8 Reporter: Archana Pandey <arpandey>
Component: subscription-managerAssignee: mhorky
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 8.6CC: jsefler, mhorky, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.25-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2029927 (view as bug list) Environment:
Last Closed: 2022-05-10 15:22:58 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: 2029927    

Description Archana Pandey 2021-12-06 11:18:21 UTC
Description of problem: tab completion does not show suggestions for --password option for subscription-manager syspurpose submodules after providing value for --username option


Version-Release number of selected component (if applicable):

[root@kvm-01-guest12 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.el8
[root@kvm-01-guest12 ~]# 

How reproducible:


Steps to Reproduce:
[root@kvm-01-guest12 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Unknown

System Purpose Status: Unknown

[root@kvm-01-guest12 ~]# 
[root@kvm-01-guest12 ~]# subscription-manager syspurpose role --list --username rhel8account --<tab><tab>
--help           --noproxy        --proxy          --proxypassword  --proxyuser      --show           
[root@kvm-01-guest12 ~]#  ^^^^^ --password not shown in bash-completion


Actual results:
tab completion for --password not working for submodules(role/usage/service-level/addons)

Expected results:
tab completion should work for subscription-manager syspurpose submodules(role/usage/service-level/addons)

Additional info:

Comment 1 Archana Pandey 2021-12-15 12:03:03 UTC
pre-verification:

Verifying issue on jenkins build subscription-manager-1.28.24-1.git.33.9106cec.el8.x86_64

[root@kvm-08-guest14 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.git.33.9106cec.el8
[root@kvm-08-guest14 ~]#
[root@kvm-08-guest14 ~]# 
[root@kvm-08-guest14 ~]# subscription-manager syspurpose role --list --username qeAccount --
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          
[root@kvm-08-guest14 ~]# subscription-manager syspurpose role --list --username qeAccount --p
--password       --proxy          --proxypassword  --proxyuser      
^^^^^----------------------password option available on tab completion


[root@kvm-08-guest14 ~]# subscription-manager syspurpose service-level --list --username qeAccount --
--help           --list           --org            --proxy          --proxyuser      --set            --token          --username       
--insecure       --noproxy        --password       --proxypassword  --serverurl      --show           --unset          
[root@kvm-08-guest14 ~]# subscription-manager syspurpose service-level --list --username qeAccount --p
--password       --proxy          --proxypassword  --proxyuser    
^^^^^----------------------password option available on tab completion

[root@kvm-08-guest14 ~]# subscription-manager syspurpose usage --list --username qeAccount --
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          
[root@kvm-08-guest14 ~]# subscription-manager syspurpose usage --list --username qeAccount --p
--password       --proxy          --proxypassword  --proxyuser
^^^^^----------------------password option available on tab completion

  
[root@kvm-08-guest14 ~]# subscription-manager syspurpose addons --list --username qeAccount --
--add            --list           --org            --proxy          --proxyuser      --show           --unset          
--help           --noproxy        --password       --proxypassword  --remove         --token          --username       
[root@kvm-08-guest14 ~]# subscription-manager syspurpose addons --list --username qeAccount --p
--password       --proxy          --proxypassword  --proxyuser      
^^^^^----------------------password option available on tab completion

Based on the above observations, setting verified tested

pre-verification : PASSED

Comment 5 Archana Pandey 2022-01-11 11:03:55 UTC
verifying on subscription-manager-1.28.25-1.el8.x86_64

Beaker Test information:
                         HOSTNAME=ibm-x3650m4-01-vm-05.ibm2.lab.eng.bos.redhat.com
                            JOBID=6180347
                         RECIPEID=11270693
                    RESULT_SERVER=
                           DISTRO=RHEL-8.6.0-20220110.3
                     ARCHITECTURE=x86_64



[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.25-1.el8
[root@ibm-x3650m4-01-vm-05 ~]# 
[root@ibm-x3650m4-01-vm-05 ~]#  
[root@ibm-x3650m4-01-vm-05 ~]# rpm -qa --changelog subscription-manager | grep 2029384
- 2029384: Fix bash autocompletion (mhorky)
[root@ibm-x3650m4-01-vm-05 ~]# 
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose role --list --username rhelGA --<tab><tab>
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose role --list --username rhelGA --p<tab><tab>
--password       --proxy          --proxypassword  --proxyuser 
 ^^^^^----------------------password option present in tab completion
     
  
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose usage --list --username rhelGA --<tab><tab>
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose usage --list --username rhelGA --p<tab><tab>
--password       --proxy          --proxypassword  --proxyuser      
  ^^^^^----------------------password option present in tab completion
     
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose service-level --list --username rhelGA --<tab><tab>
--help           --list           --org            --proxy          --proxyuser      --set            --token          --username       
--insecure       --noproxy        --password       --proxypassword  --serverurl      --show           --unset               
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose service-level --list --username rhelGA --p<tab><tab>
--password       --proxy          --proxypassword  --proxyuser 
      ^^^^^----------------------password option present in tab completion

[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose addons --list --username rhelGA --<tab><tab>
--add            --list           --org            --proxy          --proxyuser      --show           --unset          
--help           --noproxy        --password       --proxypassword  --remove         --token          --username       
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager syspurpose addons --list --username rhelGA --p<tab><tab>
--password       --proxy          --proxypassword  --proxyuser 
  ^^^^^----------------------password option present in tab completion

tab completion for --password option working as expected for syspurpose sub-modules.
 
Verification : PASSED

Comment 7 errata-xmlrpc 2022-05-10 15:22:58 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 (subscription-manager bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2022:2047