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 2022792

Summary: Log level Suggestion "NOSET" is not a valid option
Product: Red Hat Enterprise Linux 9 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: jsefler, mhorky, ptoscano, rhsm-qe, zpetrace
Target Milestone: rcKeywords: Triaged
Target Release: 9.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.29.21-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1983074 Environment:
Last Closed: 2022-05-17 15:58:19 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: 1983074    
Bug Blocks:    

Description Rehana 2021-11-12 15:23:51 UTC
+++ This bug was initially created as a clone of Bug #1983074 +++

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:

--- Additional comment from Pino Toscano on 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".

--- Additional comment from Zdenek Petracek on 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 1 Zdenek Petracek 2021-11-16 11:09:43 UTC
Version:
[root@kvm-01-guest22 ~]# 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.7.c749f0c.el9

Pre-verification 1:
[root@kvm-01-guest22 ~]# 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 --> PASSED

Comment 6 Zdenek Petracek 2021-11-26 13:26:44 UTC
Version:
[root@kvm-04-guest24 ~]# 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.el9

Verification:
[root@kvm-04-guest24 ~]# 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 8 errata-xmlrpc 2022-05-17 15:58:19 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