Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue warning if reboot needed but exit with success #790

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Dec 8, 2023

When a reboot is required we want to bring attention to it via a warning but we do not want to fail the upgrade. This introduces a new option to issue a informational warning that still exits 0.

When a reboot is required we want to bring attention to it via a warning
but we do not want to fail the upgrade. This introduces a new option
to issue a informational warning that still exits 0.
@ehelms
Copy link
Member Author

ehelms commented Dec 8, 2023

Results in the following output:

================================================================================
Clean old Kernel and initramfs files from tftp-boot:                  [OK]
--------------------------------------------------------------------------------
Check number of fact names in database:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:           [OK]
--------------------------------------------------------------------------------
Check for paused tasks:                                               [OK]
--------------------------------------------------------------------------------
Check whether system is self-registered or not:                       [OK]
--------------------------------------------------------------------------------
Check if system needs reboot:                                         [WARNING]
Updating Subscription Management repositories.
Core libraries or services have been updated since boot-up:
  * dbus
  * dbus-daemon
  * glibc
  * kernel
  * linux-firmware
  * systemd
  * zlib (dependency of dbus. Recommending reboot of dbus)

Reboot is required to fully utilize these updates.
More information: https://access.redhat.com/solutions/27943
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
Upgrade finished.
[root@ ~]# $?
-bash: 0: command not found

@ehelms ehelms merged commit acb2719 into theforeman:master Dec 14, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants