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 2021982

Summary: the new subscription-manager syspurpose module is not tab completing
Product: Red Hat Enterprise Linux 8 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: mhorky
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: medium    
Version: 8.6CC: mhorky, redakkan, zpetrace
Target Milestone: rcKeywords: Triaged
Target Release: 8.6Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.24-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 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:

Description John Sefler 2021-11-10 13:57:30 UTC
Description of problem:

 As a continuation of the backporting effort for the new syspurpose module from the main branch to subscription-manager-1.28 branch for the benefit of RHEL8.6, the new "syspurpose" module does not appear in the tab completion list.


Version-Release number of selected component (if applicable):
[root@rhsm-auto86-client1 ~]# rpm -q subscription-manager bash-completion
subscription-manager-1.28.22-1.git.64.3aaa76d.el8.x86_64
bash-completion-2.7-5.el8.noarch


How reproducible:


Steps to Reproduce:
[root@rhsm-auto86-client1 ~]# subscription-manager --help
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules: 

  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
  refresh        Pull the latest subscription data from the server
  register       Register this system to the Customer Portal or another subscription management service
  release        Configure which operating system release to use
  remove         Remove all or specific subscriptions from this system
  status         Show status information for this system's subscriptions and products
  unregister     Unregister this system from the Customer Portal or another subscription management service

Other Modules:   

  addons         Deprecated, see 'syspurpose'
  auto-attach    Set if subscriptions are attached on a schedule (default of daily)
  clean          Remove all local system and subscription data without affecting the server
  config         List, set, or remove the configuration parameters in use by this system
  environments   Display the environments available for a user
  facts          View or update the detected system information
  identity       Display the identity certificate for this system or request a new one
  import         Import certificates which were provided outside of the tool
  orgs           Display the organizations against which a user can register a system
  plugins        View and configure with 'subscription-manager plugins'
  redeem         Attempt to redeem a subscription for a preconfigured system
  repo-override  Manage custom content repository settings
  repos          List the repositories which this system is entitled to use
  role           Deprecated, see 'syspurpose'
  service-level  Deprecated, see 'syspurpose'
  subscribe      Deprecated, see attach
  syspurpose     Convenient module for managing all system purpose settings
  unsubscribe    Deprecated, see remove
  usage          Deprecated, see 'syspurpose'
  version        Print version information

[root@rhsm-auto86-client1 ~]# subscription-manager <TAB><TAB>
addons         environments   import         refresh        repos          unregister
attach         facts          list           register       role           unsubscribe
auto-attach    -h             orgs           release        service-level  usage
clean          --help         plugins        remove         status         version
config         identity       redeem         repo-override  subscribe   



Actual results:
 After double hitting the <Tab> key, all of the primary and other modules above were listed except "syspurpose" which appears in the help list as expected.

Expected results:
 The "syspurpose" module should appear after typing "subscription-manager <TAB><TAB>"



Additional info:
 On a good note, the options and submodules under "subscription-manager syspurpose" are tab completing as expected...
[root@rhsm-auto86-client1 ~]# subscription-manager syspurpose <TAB><TAB>
addons           --noproxy        --proxyuser      --show
-h               --proxy          role             usage
--help           --proxypassword  service-level

Comment 1 Zdenek Petracek 2021-11-19 12:29:58 UTC
Version-Release number of selected component:
[root@kvm-02-guest10 ~]# rpm -q subscription-manager bash-completion
subscription-manager-1.28.24-1.git.3.437bba8.el8.x86_64
bash-completion-2.7-5.el8.noarch

SM version:
[root@kvm-02-guest10 ~]# 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.3.437bba8.el8

Pre-verification:
[root@kvm-02-guest10 ~]# subscription-manager --help
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules: 

  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
  refresh        Pull the latest subscription data from the server
  register       Register this system to the Customer Portal or another subscription management service
  release        Configure which operating system release to use
  remove         Remove all or specific subscriptions from this system
  status         Show status information for this system's subscriptions and products
  unregister     Unregister this system from the Customer Portal or another subscription management service

Other Modules:   

  addons         Deprecated, see 'syspurpose'
  auto-attach    Set if subscriptions are attached on a schedule (default of daily)
  clean          Remove all local system and subscription data without affecting the server
  config         List, set, or remove the configuration parameters in use by this system
  environments   Display the environments available for a user
  facts          View or update the detected system information
  identity       Display the identity certificate for this system or request a new one
  import         Import certificates which were provided outside of the tool
  orgs           Display the organizations against which a user can register a system
  plugins        View and configure with 'subscription-manager plugins'
  redeem         Attempt to redeem a subscription for a preconfigured system
  repo-override  Manage custom content repository settings
  repos          List the repositories which this system is entitled to use
  role           Deprecated, see 'syspurpose'
  service-level  Deprecated, see 'syspurpose'
  subscribe      Deprecated, see attach
  syspurpose     Convenient module for managing all system purpose settings
  unsubscribe    Deprecated, see remove
  usage          Deprecated, see 'syspurpose'
  version        Print version information

[root@kvm-02-guest10 ~]# subscription-manager <tab><tab>
addons         clean          facts          identity       orgs           refresh        remove         role           subscribe      unsubscribe
attach         config         -h             import         plugins        register       repo-override  service-level  syspurpose     usage
auto-attach    environments   --help         list           redeem         release        repos          status         unregister     version
^^ now it lists every option including syspurpose --> PASSED

[root@kvm-02-guest10 ~]# subscription-manager s<tab><tab>
service-level  status         subscribe      syspurpose

Comment 6 Zdenek Petracek 2021-11-25 12:14:34 UTC
Version-Release number of selected component:
[root@kvm-01-guest08 ~]# rpm -q subscription-manager bash-completion
subscription-manager-1.28.24-1.el8.x86_64
bash-completion-2.7-5.el8.noarch

Version:
[root@kvm-01-guest08 ~]# 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

Pre-verification:
[root@kvm-01-guest08 ~]# subscription-manager --help
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules: 

  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
  refresh        Pull the latest subscription data from the server
  register       Register this system to the Customer Portal or another subscription management service
  release        Configure which operating system release to use
  remove         Remove all or specific subscriptions from this system
  status         Show status information for this system's subscriptions and products
  unregister     Unregister this system from the Customer Portal or another subscription management service

Other Modules:   

  addons         Deprecated, see 'syspurpose'
  auto-attach    Set if subscriptions are attached on a schedule (default of daily)
  clean          Remove all local system and subscription data without affecting the server
  config         List, set, or remove the configuration parameters in use by this system
  environments   Display the environments available for a user
  facts          View or update the detected system information
  identity       Display the identity certificate for this system or request a new one
  import         Import certificates which were provided outside of the tool
  orgs           Display the organizations against which a user can register a system
  plugins        View and configure with 'subscription-manager plugins'
  redeem         Attempt to redeem a subscription for a preconfigured system
  repo-override  Manage custom content repository settings
  repos          List the repositories which this system is entitled to use
  role           Deprecated, see 'syspurpose'
  service-level  Deprecated, see 'syspurpose'
  subscribe      Deprecated, see attach
  syspurpose     Convenient module for managing all system purpose settings
  unsubscribe    Deprecated, see remove
  usage          Deprecated, see 'syspurpose'
  version        Print version information

Tab completing:
[root@kvm-01-guest08 ~]# subscription-manager <tab><tab>
addons         config         --help         orgs           register       repos          subscribe      usage
attach         environments   identity       plugins        release        role           syspurpose     version
auto-attach    facts          import         redeem         remove         service-level  unregister     
clean          -h             list           refresh        repo-override  status         unsubscribe    
^^ all the options are tab completing --> PASSED

[root@kvm-01-guest08 ~]# subscription-manager s<tab><tab>
service-level  status         subscribe      syspurpose     
--> PASSED

Comment 8 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