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 1983074 - Log level Suggestion "NOSET" is not a valid option
Summary: Log level Suggestion "NOSET" is not a valid option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: 8.6
Assignee: mhorky
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 2022792
TreeView+ depends on / blocked
 
Reported: 2021-07-16 12:31 UTC by Rehana
Modified: 2022-05-10 16:39 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.28.24-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2022792 (view as bug list)
Environment:
Last Closed: 2022-05-10 15:22:56 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2750 0 None Merged 1983074: Remove invalid log level 2021-09-17 12:27:43 UTC
Github candlepin subscription-manager pull 2751 0 None Merged [1.28] 1983074: Remove invalid log level 2021-09-17 12:27:43 UTC
Red Hat Product Errata RHBA-2022:2047 0 None None None 2022-05-10 15:23:20 UTC

Description Rehana 2021-07-16 12:31:01 UTC
Description of problem:
Log level Suggestion "NOSET" is not a valid option 

Version-Release number of selected component (if applicable):
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.19-1
subscription management rules: 5.41
subscription-manager: 1.28.19-1.el8

How reproducible:


Steps to Reproduce:

# subscription-manager config --logging.default_log_level=foo
Invalid Log Level: foo, setting to INFO for this run.
Please use:  subscription-manager config --logging.default_log_level=<Log Level> to set the default_log_level to a valid value.
Valid Values: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOSET

# subscription-manager config --logging.default_log_level=NOSET
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.28.19', 'console_scripts', 'subscription-manager')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 62, in <module>
    logutil.init_logger()
  File "/usr/lib64/python3.6/site-packages/rhsm/logutil.py", line 196, in init_logger
    logger.setLevel(getattr(logging, default_log_level.strip()))
AttributeError: module 'logging' has no attribute 'NOSET'

Actual results:
NOSET is not a valid option 

Expected results:
As per the discussion with Dev, this is a typo and should be changed to "NOTSET"   . This issue exists on both RHEL 8.5/ 9 Beta 

Additional info:

Comment 1 Pino Toscano 2021-11-04 10:45:59 UTC
> Expected results:
> As per the discussion with Dev, this is a typo and should be changed to "NOTSET"   . This issue exists on both RHEL 8.5/ 9 Beta 

After an initial discussion, we decided that "NOTSET" is simply an internal Python constant that has no meaning for users.
Hence, the expected result is that the list of valid values does _not_ show "NOSET" or "NOTSET".

Comment 2 Zdenek Petracek 2021-11-04 10:56:10 UTC
Pre-verifying version:
[root@kvm-06-guest07 ~]# 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.22-1.git.0.5118d85.el8

Pre-verifying:
[root@kvm-06-guest07 ~]# subscription-manager config --logging.default_log_level=foo
Invalid Log Level: foo, setting to INFO for this run.
Please use:  subscription-manager config --logging.default_log_level=<Log Level> to set the default_log_level to a valid value.
Valid Values: CRITICAL, ERROR, WARNING, INFO, DEBUG

//The value NOTSET or NOSET is not shown anymore as it has no meaning for users

Comment 7 Zdenek Petracek 2021-11-25 13:27:52 UTC
Version:
[root@kvm-01-guest08 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.el8

Verification 1:
[root@kvm-01-guest08 ~]# subscription-manager config --logging.default_log_level=foo
Invalid Log Level: foo, setting to INFO for this run.
Please use:  subscription-manager config --logging.default_log_level=<Log Level> to set the default_log_level to a valid value.
Valid Values: CRITICAL, ERROR, WARNING, INFO, DEBUG

--> PASSED

Comment 9 errata-xmlrpc 2022-05-10 15:22:56 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


Note You need to log in before you can comment on or make changes to this bug.