Skip to content

needs-restarting: Don't suggest restarting NEED_REBOOT services (RHEL-98293)#616

Open
m-blaha wants to merge 1 commit into
rpm-software-management:masterfrom
m-blaha:reboot-services
Open

needs-restarting: Don't suggest restarting NEED_REBOOT services (RHEL-98293)#616
m-blaha wants to merge 1 commit into
rpm-software-management:masterfrom
m-blaha:reboot-services

Conversation

@m-blaha
Copy link
Copy Markdown
Member

@m-blaha m-blaha commented May 12, 2026

"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.

@m-blaha m-blaha requested a review from a team as a code owner May 12, 2026 12:05
@m-blaha m-blaha requested a review from evan-goode May 12, 2026 12:05
@m-blaha m-blaha changed the title reboot services needs-restarting: Don't suggest restarting NEED_REBOOT services (RHEL-98293) May 12, 2026
…-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>
@m-blaha m-blaha force-pushed the reboot-services branch from 64a095f to 486855d Compare May 14, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant