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 2029927

Summary: subscription-manager syspurpose does not tab complete on --password option for submodules
Product: Red Hat Enterprise Linux 9 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: mhorky
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 9.0CC: arpandey, candlepin-bugs, cdonnell, jhnidek, mhorky, redakkan, rhsm-qe
Target Milestone: rcKeywords: Triaged
Target Release: 9.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.29.23-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2029384 Environment:
Last Closed: 2022-05-17 15:58:31 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: 2029384    
Bug Blocks:    

Description Rehana 2021-12-07 15:12:48 UTC
+++ This bug was initially created as a clone of Bug #2029384 +++

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 14:27:52 UTC
pre-verification

verifying on :

[root@kvm-02-guest17 ~]# 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.29.21-1.git.50.9be8a87.el9
[root@kvm-02-guest17 ~]#        
[root@kvm-02-guest17 ~]# subscription-manager syspurpose role --list -
-h               --list           --org            --proxy          --proxyuser      --show           --unset          
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
[root@kvm-02-guest17 ~]# subscription-manager syspurpose role --list --username -
-h               --list           --org            --proxy          --proxyuser      --show           --unset          
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
[root@kvm-02-guest17 ~]# subscription-manager syspurpose role --list --username rhel9GA 
addons           -h               --help           --noproxy        --proxy          --proxypassword  --proxyuser      role             service-level    --show           usage
[root@kvm-02-guest17 ~]# subscription-manager syspurpose role --list --username rhel9GA 
addons           -h               --help           --noproxy        --proxy          --proxypassword  --proxyuser      role             service-level    --show           usage
[root@kvm-02-guest17 ~]# subscription-manager syspurpose role --list --username rhel9GA --
--help           --noproxy        --proxy          --proxypassword  --proxyuser      --show    << -----password option is not shown on tab completion

Based on above results setting Failed QA
@mhorky

Comment 3 Archana Pandey 2021-12-17 06:22:17 UTC
Pre-verifying : subscription-manager-1.29.21-1.git.62.f0ba623.el9.x86_64

[root@kvm-02-guest17 ~]# 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.29.21-1.git.62.f0ba623.el9
[root@kvm-02-guest17 ~]# 
[root@kvm-02-guest17 ~]# bash
[root@kvm-02-guest17 ~]# 
[root@kvm-02-guest17 ~]# 
[root@kvm-02-guest17 ~]# subscription-manager syspurpose role --list --username rhel9GA --<tab><tab>
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          
                                      ^^^^--------------- --password option is shown on tab-completion   


[root@kvm-02-guest17 ~]# subscription-manager syspurpose usage --list --username rhel9GA --<tab><tab>
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          
                                     ^^^------------ --password option is shown on tab-completion 


[root@kvm-02-guest17 ~]# subscription-manager syspurpose service-level --list --username rhel9GA --<tab><tab>
--help           --list           --org            --proxy          --proxyuser      --set            --token          --username       
--insecure       --noproxy        --password       --proxypassword  --serverurl      --show           --unset          
                                      ^^^------------ --password option is shown on tab-completion 

[root@kvm-02-guest17 ~]# subscription-manager syspurpose addons --list --username rhel9GA --<tab><tab>
--add            --list           --org            --proxy          --proxyuser      --show           --unset          
--help           --noproxy        --password       --proxypassword  --remove         --token          --username       
                                                     ^^^------------ --password option is shown on tab-completion 


Verification: --password option is present in bash-completion for all  syspurpose sub-modules
Based on the above observation setting verified field to tested

Comment 6 Rehana 2022-01-31 12:03:45 UTC
Verifying on :

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.22-1
subscription management rules: 5.41
subscription-manager: 1.29.23-1.el9

# rpm -qa subscription-manager --changelog | grep 2029927
- 2029927: Fix bash autocompletion (mhorky)
- 2029927: Fix bash autocompletion (mhorky)

# subscription-manager syspurpose role --list --username sca_rhsm_1 --
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          

# subscription-manager syspurpose usage --list --username sca_rhsm_1 --
--help           --noproxy        --password       --proxypassword  --set            --token          --username       
--list           --org            --proxy          --proxyuser      --show           --unset          

# subscription-manager syspurpose service-level --list --username sca_rhsm_1 --
--help           --list           --org            --proxy          --proxyuser      --set            --token          --username       
--insecure       --noproxy        --password       --proxypassword  --serverurl      --show           --unset          

# subscription-manager syspurpose addons --list --username sca_rhsm_1 --
--add            --list           --org            --proxy          --proxyuser      --show           --unset          
--help           --noproxy        --password       --proxypassword  --remove         --token          --username       


Based on the observations, verifying the bug.

Comment 8 errata-xmlrpc 2022-05-17 15:58:31 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 (new packages: subscription-manager), 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:3984