Skip to content

Fixes #1092 - Adds CheckForReboot in packages update scenario#1093

Merged
ehelms merged 1 commit into
theforeman:masterfrom
sayan3296:restarting
Jun 17, 2026
Merged

Fixes #1092 - Adds CheckForReboot in packages update scenario#1093
ehelms merged 1 commit into
theforeman:masterfrom
sayan3296:restarting

Conversation

@sayan3296

@sayan3296 sayan3296 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Attempting to fix #1092

When executing "foreman-maintain packages update", it does everything else fine, but it never shows whether a system reboot would be needed or not, and that is something important.

With Procedures::Packages::CheckForReboot included in that action, this now correctly shows whether a reboot is required or not.

Example:

When not needed:

--------------------------------------------------------------------------------
Unlock packages:                                                      [OK]
--------------------------------------------------------------------------------
Update package(s) :                                                   [OK]
--------------------------------------------------------------------------------
Running satellite-installer :                                         [OK]
--------------------------------------------------------------------------------
Check if system needs reboot:                                         [OK]
Updating Subscription Management repositories.
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.
--------------------------------------------------------------------------------
Check status of version locking of packages: 
  Automatic locking of package versions is enabled in installer.
  Packages are locked.                                                [OK]
--------------------------------------------------------------------------------

And when needed:

--------------------------------------------------------------------------------
Unlock packages:                                                      [OK]
--------------------------------------------------------------------------------
Update package(s) :                                                   [OK]
--------------------------------------------------------------------------------
Running foreman-installer :                                           [OK]
--------------------------------------------------------------------------------
Check if system needs reboot:                                         [WARNING]
Updating Subscription Management repositories.
Core libraries or services have been updated since boot-up:
  * glibc
  * kernel
  * linux-firmware
  * microcode_ctl
  * systemd

Reboot is required to fully utilize these updates.
More information: https://access.redhat.com/solutions/27943
--------------------------------------------------------------------------------
Check status of version locking of packages: 
  Automatic locking of package versions is enabled in installer.
  Packages are locked.                                                [OK]
--------------------------------------------------------------------------------

Assisted-By: Claude Sonnet 4.6

@sayan3296

Copy link
Copy Markdown
Contributor Author

The Redmine issues check seems to still be expecting a redmine issue and even traced an issue with id 1092 ( https://projects.theforeman.org/issues/1092 )

Should i edit that Redmine issue and remove the PR from there ( if it allows me to do ) ?

@ehelms ehelms merged commit 6ef5e62 into theforeman:master Jun 17, 2026
8 checks passed
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.

The "packages update" action never shows whether a reboot is needed or not

2 participants