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 1862431

Summary: 'subscription-manager config' used to default to return 'subscription-manager config --list'
Product: Red Hat Enterprise Linux 8 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: medium    
Version: 8.3CC: achadha, arahaman, arpandey, jhnidek, ktordeur, peter.vreman, rankumar, redakkan, stefan.jermann
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 13:32:41 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: 1842946    

Description John Sefler 2020-07-31 12:32:25 UTC
Description of problem:

The default behavior when passing no arguments to the 'subscription-manager config' module was to return 'subscription-manager config --list'.

With the current build of subscription-manager, nothing is returned.  Like other subscription-manager modules, when no option is passed, there is usually a default and for the config module, the default used to be "--list".  Is this a new expected behavior?  Arguably, a better response is to display the --help information as the default rather than nothing.


Version-Release number of selected component (if applicable):
[root@hpe-dl380pgen8-02-vm-11 ~]# rpm -q subscription-manager
subscription-manager-1.27.11-1.el8.x86_64


How reproducible:


Steps to Reproduce:
[root@hpe-dl380pgen8-02-vm-11 ~]# subscription-manager config --list
[server]
   hostname = subscription.rhsm.stage.redhat.com
   insecure = [0]
   no_proxy = []
   port = [443]
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_scheme = [http]
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   auto_enable_yum_plugins = [1]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   inotify = [1]
   manage_repos = [1]
   package_profile_on_trans = [0]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   repomd_gpg_url = []
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]
   disable = [0]
   splay = [1]

[rhsmd]
   processtimeout = 300

[logging]
   default_log_level = DEBUG

[] - Default value in use


[root@hpe-dl380pgen8-02-vm-11 ~]# subscription-manager config
[root@hpe-dl380pgen8-02-vm-11 ~]# 


Actual results:
  above

Expected results:
  expected "subscription-manager config" to return the same response as "subscription-manager config --list"



Additional info:

Comment 1 John Sefler 2020-08-10 18:20:05 UTC
For historical reference, here is the original RFE that requested that executing 'subscription-manager config' module should default to the same behavior as 'subscription-manager config --list'.  See https://bugzilla.redhat.com/show_bug.cgi?id=811594#c5

Bug 811594 - [RFE] facts command should default to list

Comment 2 John Sefler 2020-09-17 16:36:32 UTC
Interestingly, this bug appears to be fixed in 1.27.15-1 and was broken in 1.27.14-1.
One of the following commits from the changelog must have fixed this bug too...

[root@kvm-05-guest01 ~]# rpm -q subscription-manager
subscription-manager-1.27.15-1.el8.x86_64

[root@kvm-05-guest01 ~]# rpm -q subscription-manager --changelog  | head
* Thu Aug 20 2020 Christopher Snyder <csnyder> 1.27.15-1
- 1615429: Fix sorting of plugin hooks (csnyder)
- 1820534: Update translations (csnyder)
- 1841601: Set default encoding properly; ENT-2499 (jhnidek)
- 1839199: More rhsmd cleanup (wpoteat)
- 1869725: Do not print traceback, when profile upload failed; ENT-2754
  (jhnidek)

[root@kvm-05-guest01 ~]# subscription-manager config
[server]
   hostname = [subscription.rhsm.redhat.com]
   insecure = [0]
   no_proxy = []
   port = [443]
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_scheme = [http]
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   auto_enable_yum_plugins = [1]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   inotify = [1]
   manage_repos = [1]
   package_profile_on_trans = [0]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   repomd_gpg_url = []
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]
   disable = [0]
   splay = [1]

[logging]
   default_log_level = [INFO]

[] - Default value in use


VERIFIED: subscription-manager config once again defaults to the --list result.

Comment 3 Archana Pandey 2020-09-29 06:24:20 UTC
Early Testing

Reproducer:

[root@localhost /]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.18-1
subscription management rules: 5.41
subscription-manager: 1.27.14-1.el8
[root@localhost /]# subscription-manager config
[root@localhost /]#                                     <<<<<<<<<<<<< no output produced

Also in older master scratcch build :

root@localhost /]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.18-1
subscription management rules: 5.41
subscription-manager: 1.28.1-1.git.4.02c6050.el8

[root@localhost /]# subscription-manager config
[root@localhost /]#                                       <<<<<<<<<<<<< no output produced

================================================================================================================

Verifying in latest master scratch build:

[root@localhost /]# rpm -qa subscription-manager
subscription-manager-1.28.3-1.git.10.32f43d9.el8.x86_64

[root@localhost /]# subscription-manager config
[server]
   hostname = [subscription.rhsm.redhat.com]
   insecure = [0]
   no_proxy = []
   port = [443]
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_scheme = [http]
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   auto_enable_yum_plugins = [1]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   inotify = [1]
   manage_repos = [1]
   no_insights = [0]
   package_profile_on_trans = [0]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   repomd_gpg_url = []
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]
   disable = [0]
   splay = [1]

[logging]
   default_log_level = [INFO]

[] - Default value in use


[root@localhost /]# 
[root@localhost /]# diff <(subscription-manager config --list) <(subscription-manager config)
[root@localhost /]# 

VERIFIED: subscription-manager config defaults to the --list output

Comment 5 Archana Pandey 2020-11-02 14:53:42 UTC
Early testing :

verifying against dev build : subscription-manager-1.28.5-1.el8.x86_64

[root@kvm-03-guest14 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.5-1.el8
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# rpm -qa subscription-manager --changelog | grep 1862431
- 1862431: option validation error from unexpected config entry; ENT-2712
[root@kvm-03-guest14 ~]# 
[root@kvm-03-guest14 ~]# subscription-manager config
[server]
   hostname = subscription.rhsm.stage.redhat.com
   insecure = [0]
   no_proxy = []
   port = [443]
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_scheme = [http]
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   auto_enable_yum_plugins = [1]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   inotify = [1]
   manage_repos = [1]
   package_profile_on_trans = [0]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   repomd_gpg_url = []
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]
   disable = [0]
   splay = [1]

[logging]
   default_log_level = DEBUG

[] - Default value in use


[root@kvm-03-guest14 ~]# diff <(subscription-manager config --list) <(subscription-manager config)
[root@kvm-03-guest14 ~]# 

Actual results:  "subscription-manager config" returns the same response as "subscription-manager config --list"

Based on above observation updating verified field to Tested

Comment 8 John Sefler 2020-11-12 15:36:30 UTC
Verification with nightly compose RHEL-8.4.0-20201112.n.1 ...

      Beaker Test information:
                         HOSTNAME=kvm-02-guest10.hv2.lab.eng.bos.redhat.com
                            JOBID=4725191
                         RECIPEID=9051109
                    RESULT_SERVER=
                           DISTRO=RHEL-8.4.0-20201112.n.1
                     ARCHITECTURE=x86_64

      Job Whiteboard: Reserve Workflow provision of distro RHEL-8.4.0-20201112.n.1 on any lab system for 86400 seconds

      Recipe Whiteboard: 
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
[root@kvm-02-guest10 ~]#
[root@kvm-02-guest10 ~]# rpm -q subscription-manager
subscription-manager-1.28.5-1.el8.x86_64
[root@kvm-02-guest10 ~]# 
[root@kvm-02-guest10 ~]# rpm -q subscription-manager --changelog | grep 1862431
- 1862431: option validation error from unexpected config entry; ENT-2712
[root@kvm-02-guest10 ~]# 
[root@kvm-02-guest10 ~]# subscription-manager config
[server]
   hostname = [subscription.rhsm.redhat.com]
   insecure = [0]
   no_proxy = []
   port = [443]
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_scheme = [http]
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   auto_enable_yum_plugins = [1]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   inotify = [1]
   manage_repos = [1]
   package_profile_on_trans = [0]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   repomd_gpg_url = []
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]
   disable = [0]
   splay = [1]

[logging]
   default_log_level = [INFO]

[] - Default value in use


[root@kvm-02-guest10 ~]# 
[root@kvm-02-guest10 ~]# subscription-manager config > /tmp/config.txt
[root@kvm-02-guest10 ~]# subscription-manager config --list > /tmp/configlist.txt
[root@kvm-02-guest10 ~]# diff /tmp/config.txt /tmp/configlist.txt
[root@kvm-02-guest10 ~]# 

VERIFIED: "subscription-manager config" returns the same results as "subscription-manager config --list" as expected and as Verified:Tested in comment 5.
Changing status to VERIFIED

Comment 9 Rehana 2021-01-05 14:40:28 UTC
*** Bug 1910348 has been marked as a duplicate of this bug. ***

Comment 10 Brad Buckingham 2021-04-15 14:23:33 UTC
*** Bug 1946883 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2021-05-18 13:32:41 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-2021:1575