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.
Description of problem:
Observed that user was allowed to set a bad value for --logging.default_log_level of config command. Once the bad value was set every subscription-manager commands failes with Attribute error
Version-Release number of selected component (if applicable):
subscription-manager-rhsm-certificates-1.21.5-5.el7.x86_64
subscription-manager-gui-1.21.5-5.el7.x86_64
subscription-manager-rhsm-1.21.5-5.el7.x86_64
subscription-manager-1.21.5-5.el7.x86_64
subscription-manager-initial-setup-addon-1.21.5-5.el7.x86_64
subscription-manager-cockpit-1.21.5-5.el7.noarch
subscription-manager-plugin-container-1.21.5-5.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1.set bad value for config
[root@dhcp35-40 ~]# subscription-manager config --logging.default_log_level=foo
List config
[root@dhcp35-40 ~]# subscription-manager config --list
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 9, in <module>
load_entry_point('subscription-manager==1.21.5', 'console_scripts', 'subscription-manager')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 60, in <module>
logutil.init_logger()
File "/usr/lib64/python2.7/site-packages/subscription_manager/logutil.py", line 151, in init_logger
logger.setLevel(getattr(logging, default_log_level.strip()))
AttributeError: 'module' object has no attribute 'foo'
version
[root@dhcp35-40 ~]# subscription-manager version
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 9, in <module>
load_entry_point('subscription-manager==1.21.5', 'console_scripts', 'subscription-manager')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 60, in <module>
logutil.init_logger()
File "/usr/lib64/python2.7/site-packages/subscription_manager/logutil.py", line 151, in init_logger
logger.setLevel(getattr(logging, default_log_level.strip()))
AttributeError: 'module' object has no attribute 'foo'
2.
3.
Actual results:
User was allowed to set a bad value for logging.default_log_level and that broke almost every subscription-manager commands
Expected results:
User should not be allowed to set bad values for default_log_level
Additional info:
Description of problem: Observed that user was allowed to set a bad value for --logging.default_log_level of config command. Once the bad value was set every subscription-manager commands failes with Attribute error Version-Release number of selected component (if applicable): subscription-manager-rhsm-certificates-1.21.5-5.el7.x86_64 subscription-manager-gui-1.21.5-5.el7.x86_64 subscription-manager-rhsm-1.21.5-5.el7.x86_64 subscription-manager-1.21.5-5.el7.x86_64 subscription-manager-initial-setup-addon-1.21.5-5.el7.x86_64 subscription-manager-cockpit-1.21.5-5.el7.noarch subscription-manager-plugin-container-1.21.5-5.el7.x86_64 How reproducible: always Steps to Reproduce: 1.set bad value for config [root@dhcp35-40 ~]# subscription-manager config --logging.default_log_level=foo List config [root@dhcp35-40 ~]# subscription-manager config --list Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 9, in <module> load_entry_point('subscription-manager==1.21.5', 'console_scripts', 'subscription-manager')() File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point return ep.load() File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 60, in <module> logutil.init_logger() File "/usr/lib64/python2.7/site-packages/subscription_manager/logutil.py", line 151, in init_logger logger.setLevel(getattr(logging, default_log_level.strip())) AttributeError: 'module' object has no attribute 'foo' version [root@dhcp35-40 ~]# subscription-manager version Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 9, in <module> load_entry_point('subscription-manager==1.21.5', 'console_scripts', 'subscription-manager')() File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point return ep.load() File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 60, in <module> logutil.init_logger() File "/usr/lib64/python2.7/site-packages/subscription_manager/logutil.py", line 151, in init_logger logger.setLevel(getattr(logging, default_log_level.strip())) AttributeError: 'module' object has no attribute 'foo' 2. 3. Actual results: User was allowed to set a bad value for logging.default_log_level and that broke almost every subscription-manager commands Expected results: User should not be allowed to set bad values for default_log_level Additional info: