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:
When attempting to run "/etc/cron.daily/rhsmd", an import error is thrown...
[root@hpe-dl380pgen8-02-vm-4 ~]# /etc/cron.daily/rhsmd
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.py", line 43, in excepthook_base
sys.exit(0)
AttributeError: 'NoneType' object has no attribute 'exit'
Original exception was:
Traceback (most recent call last):
File "/usr/libexec/rhsmd", line 9, in <module>
load_entry_point('subscription-manager==1.24.32', 'console_scripts', 'rhsmd')()
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/rhsm_d.py", line 55, in <module>
import psutil
ImportError: No module named psutil
This is a regression from RHEL-7.8 and I suspect the following cherry-picked commit is the offender....
https://gitlab.sat.engineering.redhat.com/satellite6/subscription-manager/-/commit/44dd059d345b98044ace9704baa43745e61750aa
This commit introduced a new "import psutil" in src/subscription_manager/scripts/rhsm_d.py that was not present on rhel-7.8 and is now failing on rhel7.9.
Version-Release number of selected component (if applicable):
[root@hpe-dl380pgen8-02-vm-4 ~]# rpm -q --whatprovides /etc/cron.daily/rhsmd
subscription-manager-1.24.32-1.el7.x86_64
How reproducible:
Steps to Reproduce:
1. /etc/cron.daily/rhsmd
2.
3.
Actual results:
ImportError: No module named psutil
Expected results:
no error
Additional info:
Reproducer:
[root@kvm-07-guest13 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.9.27-1
subscription management rules: 5.37
subscription-manager: 1.24.36
[root@kvm-07-guest13 ~]# /etc/cron.daily/rhsmd
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.py", line 43, in excepthook_base
sys.exit(0)
AttributeError: 'NoneType' object has no attribute 'exit'
Original exception was:
Traceback (most recent call last):
File "/usr/libexec/rhsmd", line 9, in <module>
load_entry_point('subscription-manager==1.24.36', 'console_scripts', 'rhsmd')()
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/rhsm_d.py", line 55, in <module>
import psutil
ImportError: No module named psutil
^C
[root@kvm-07-guest13 ~]# /usr/libexec/rhsmd --help
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.py", line 43, in excepthook_base
sys.exit(0)
AttributeError: 'NoneType' object has no attribute 'exit'
Original exception was:
Traceback (most recent call last):
File "/usr/libexec/rhsmd", line 9, in <module>
load_entry_point('subscription-manager==1.24.36', 'console_scripts', 'rhsmd')()
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/rhsm_d.py", line 55, in <module>
import psutil
ImportError: No module named psutil
Verification :
Moving bug to verified as I dont see any error message
[root@hpe-dl380pgen8-02-vm-1 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.11-1
subscription management rules: 5.40
subscription-manager: 1.24.37
[root@hpe-dl380pgen8-02-vm-1 ~]# /etc/cron.daily/rhsmd
[root@hpe-dl380pgen8-02-vm-1 ~]# /usr/libexec/rhsmd --help
Usage: rhsmd [OPTIONS]
Options:
-h, --help show this help message and exit
-d, --debug Display debug messages
-k, --keep-alive Stay running (don't shut down after the first dbus
call)
-s, --syslog Run standalone and log result to syslog
-f FORCE_SIGNAL, --force-signal=FORCE_SIGNAL
Force firing of a signal (valid, expired, warning,
partial, classic or registration_required)
-i, --immediate Fire forced signal immediately (requires --force-
signal)
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 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-2020:3866
Description of problem: When attempting to run "/etc/cron.daily/rhsmd", an import error is thrown... [root@hpe-dl380pgen8-02-vm-4 ~]# /etc/cron.daily/rhsmd Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.py", line 43, in excepthook_base sys.exit(0) AttributeError: 'NoneType' object has no attribute 'exit' Original exception was: Traceback (most recent call last): File "/usr/libexec/rhsmd", line 9, in <module> load_entry_point('subscription-manager==1.24.32', 'console_scripts', 'rhsmd')() 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/rhsm_d.py", line 55, in <module> import psutil ImportError: No module named psutil This is a regression from RHEL-7.8 and I suspect the following cherry-picked commit is the offender.... https://gitlab.sat.engineering.redhat.com/satellite6/subscription-manager/-/commit/44dd059d345b98044ace9704baa43745e61750aa This commit introduced a new "import psutil" in src/subscription_manager/scripts/rhsm_d.py that was not present on rhel-7.8 and is now failing on rhel7.9. Version-Release number of selected component (if applicable): [root@hpe-dl380pgen8-02-vm-4 ~]# rpm -q --whatprovides /etc/cron.daily/rhsmd subscription-manager-1.24.32-1.el7.x86_64 How reproducible: Steps to Reproduce: 1. /etc/cron.daily/rhsmd 2. 3. Actual results: ImportError: No module named psutil Expected results: no error Additional info: