Bug 2254492

Summary: Satellite upgrade warning message shows Scenario as failed.
Product: Red Hat Satellite Reporter: Avnish Kumar <avnkumar>
Component: UpgradesAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.15.0CC: egolov, ehelms, lpramuk, pmoranka, rlavi, zhunting
Target Milestone: 6.15.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.4.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-23 17:16:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Avnish Kumar 2023-12-14 08:52:50 UTC
Description of problem:
Satellite 6.15 upgrade <packages-check-for-reboot> warning message shows Scenario [Checks after upgrading to Satellite 6.15.z] as failed.

Version-Release number of selected component (if applicable):
Satellite 6.15 

How reproducible:
Try to upgrade the Satellite 6.15
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# satellite-maintain upgrade run --target-version 6.15.z
--------------------------------------------------------------------------------
Check if system needs reboot:                                         [WARNING]
Updating Subscription Management repositories.
Core libraries or services have been updated since boot-up:
  * kernel

Reboot is required to fully utilize these updates.
More information: https://access.redhat.com/solutions/27943
--------------------------------------------------------------------------------
Scenario [Checks after upgrading to Satellite 6.15.z] failed.

The following steps ended up in warning state:

  [packages-check-for-reboot]

The steps in warning state itself might not mean there is an error,
but it should be reviewed to ensure the behavior is expected
--------------------------------------------------------------------------------
Upgrade finished.


# reboot
# satellite-maintain upgrade run --target-version 6.15.z
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Upgrade finished.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Actual results: Below message is confusing and need to re-run upgrade again:

~~~~
Scenario [Checks after upgrading to Satellite 6.15.z] failed.
~~~~

Expected results: Can we remove the below messages? we can --whitelist=packages-check-for-reboot, but it will also include additional efforts.

~~~~
Scenario [Checks after upgrading to Satellite 6.15.z] failed.

The following steps ended up in warning state:

  [packages-check-for-reboot]

The steps in warning state itself might not mean there is an error,
but it should be reviewed to ensure the behavior is expected
~~~~~

Additional info: Also we have additional steps in doc to check reboot:

6. Determine if the system needs a reboot: # dnf needs-restarting --reboothint
7. If the previous command told you to reboot, then reboot the system: # reboot

Comment 1 Eric Helms 2023-12-14 16:40:20 UTC
An update to the output is in progress, and new example output can be seen at https://github.com/theforeman/foreman_maintain/pull/790

Comment 2 Eric Helms 2023-12-21 14:25:08 UTC
*** Bug 2255285 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Pramuk 2024-01-08 11:02:16 UTC
VERIFIED.

@Satellite 6.15.0 Snap 5
rubygem-foreman_maintain-1.4.4-1.el8sat.noarch

by the following reproducer:

1) Upgrade so that kernel or dbus gets upgraded
# satellite-maintain upgrade run -y -w repositories-validate,repositories-setup --target-version 6.15
...
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.

2) Check for zero RC of the successful upgrade command
# echo $?
0

>>> though satellite-maintain upgrade run messages a user "there is reboot required" the return code indicates that the command has finished successfully (RC=0)

Comment 6 errata-xmlrpc 2024-04-23 17:16:19 UTC
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 (Important: Satellite 6.15.0 release), 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/RHSA-2024:2010