needs-restarting: Don't suggest restarting NEED_REBOOT services (RHEL-98293)#616
Open
m-blaha wants to merge 1 commit into
Open
needs-restarting: Don't suggest restarting NEED_REBOOT services (RHEL-98293)#616m-blaha wants to merge 1 commit into
m-blaha wants to merge 1 commit into
Conversation
…-98293) "needs-restarting -s" used to list dbus-broker.service for restart after package updates like glibc. Restarting dbus-broker breaks system logins, firewalld, and other D-Bus clients. Two layers of filtering are added to the -s output: 1. Stale files from NEED_REBOOT packages updated since boot are skipped. This reuses the existing -r (reboothint) check. 2. Services whose binary belongs to a NEED_REBOOT package are excluded. This covers the case where a service like dbus-broker is stale due to a non-NEED_REBOOT dependency (e.g. libselinux). The -r mode now also detects services that cannot be safely restarted and includes them in the reboot recommendation. Default mode (no flags) is unchanged — all stale PIDs are reported. Signed-off-by: Marek Blaha <mblaha@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"needs-restarting -s" used to list dbus-broker.service for restart after package updates like glibc. Restarting dbus-broker breaks system logins, firewalld, and other D-Bus clients.
Two layers of filtering are added to the -s output:
Stale files from NEED_REBOOT packages updated since boot are skipped. This reuses the existing -r (reboothint) check.
Services whose binary belongs to a NEED_REBOOT package are excluded. This covers the case where a service like dbus-broker is stale due to a non-NEED_REBOOT dependency (e.g. libselinux).
The -r mode now also detects services that cannot be safely restarted and includes them in the reboot recommendation.
Default mode (no flags) is unchanged — all stale PIDs are reported.