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.
.The `yum needs-restarting -s` command now correctly displays the list of systemd services
Previously, when you used the `needs-restarting` command with the `-s` or `--services` option, an error occurred when a non-systemd or malfunctioning process was detected. With this update, the `yum needs-restarting -s` command ignores such processes and displays a warning instead with the list of affected systemd services.
Descriptionjose-angel.orueta
2022-08-30 10:45:56 UTC
Description of problem:
The "dnf needs-restarting -s" command fail when a mysql container is running in the same host and a "systemd-libs" update has been donwloaded by dnf-automatic.
The command seems to identify the MySQL container like a service.
Steps to Reproduce:
1. Deploy a MySQL container mapping the /var/lib/mysql to a volume.
2. dnf-automatic donwloads a new version of "systemd-libs" package.
3. Execute "dnf needs-restarting -s".
Actual results:
[root@xxxxxxx ~]# dnf needs-restarting -s
Traceback (most recent call last):
File "/usr/bin/dnf", line 58, in <module>
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 201, in user_main
errcode = main(args)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 67, in main
return _main(base, args, cli_class, option_parser_class)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 106, in _main
return cli_run(cli, base)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 122, in cli_run
cli.run()
File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1055, in run
return self.command.run()
File "/usr/lib/python3.6/site-packages/dnf-plugins/needs_restarting.py", line 278, in run
names = set([get_service_dbus(pid) for pid in sorted(stale_pids)])
File "/usr/lib/python3.6/site-packages/dnf-plugins/needs_restarting.py", line 278, in <listcomp>
names = set([get_service_dbus(pid) for pid in sorted(stale_pids)])
File "/usr/lib/python3.6/site-packages/dnf-plugins/needs_restarting.py", line 142, in get_service_dbus
systemd_manager_interface.GetUnitByPID(pid)
File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.systemd1.NoUnitForPID: PID 1456 does not belong to any loaded unit.
Expected results:
Additional info:
"dnf needs-restarting -r" shows the following result:
Core libraries or services have been updated since boot-up:
* systemd
Reboot is required to fully utilize these updates.
More information: https://access.redhat.com/solutions/27943
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 (dnf-plugins-core 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-2023:7125
Description of problem: The "dnf needs-restarting -s" command fail when a mysql container is running in the same host and a "systemd-libs" update has been donwloaded by dnf-automatic. The command seems to identify the MySQL container like a service. Steps to Reproduce: 1. Deploy a MySQL container mapping the /var/lib/mysql to a volume. 2. dnf-automatic donwloads a new version of "systemd-libs" package. 3. Execute "dnf needs-restarting -s". Actual results: [root@xxxxxxx ~]# dnf needs-restarting -s Traceback (most recent call last): File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 201, in user_main errcode = main(args) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 67, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 106, in _main return cli_run(cli, base) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 122, in cli_run cli.run() File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1055, in run return self.command.run() File "/usr/lib/python3.6/site-packages/dnf-plugins/needs_restarting.py", line 278, in run names = set([get_service_dbus(pid) for pid in sorted(stale_pids)]) File "/usr/lib/python3.6/site-packages/dnf-plugins/needs_restarting.py", line 278, in <listcomp> names = set([get_service_dbus(pid) for pid in sorted(stale_pids)]) File "/usr/lib/python3.6/site-packages/dnf-plugins/needs_restarting.py", line 142, in get_service_dbus systemd_manager_interface.GetUnitByPID(pid) File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 70, in __call__ return self._proxy_method(*args, **keywords) File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 145, in __call__ **keywords) File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.systemd1.NoUnitForPID: PID 1456 does not belong to any loaded unit. Expected results: Additional info: "dnf needs-restarting -r" shows the following result: Core libraries or services have been updated since boot-up: * systemd Reboot is required to fully utilize these updates. More information: https://access.redhat.com/solutions/27943