-
Bug
-
Resolution: Done
-
Normal
-
6.10.4
-
0
-
False
-
-
False
-
CLOSED
-
1,950
-
Platform
-
-
-
Moderate
-
None
Description of problem:
The command 'satellite-maintain packages check-update' fails when there are no packages to be updated.
—
I, 2022-04-08 13:28:47-0400 #9496 INFO – : Running foreman-maintain command with arguments [["packages", "check-update"]]
I, 2022-04-08 13:28:47-0400 #9496 INFO – : === Scenario 'Check for available package updates' started ===
I, 2022-04-08 13:28:47-0400 #9496 INFO – : — Execution step 'Check for available package updates' [packages-check-update] started —
D, 2022-04-08 13:28:47-0400 #9496 DEBUG – : Running command yum -y --disableplugin=foreman-protector check-update with stdin nil
D, 2022-04-08 13:29:06-0400 #9496 DEBUG – : output of the command:
Loaded plugins: product-id, search-disabled-repos, subscription-manager
E, 2022-04-08 13:29:06-0400 #9496 ERROR – : Failed executing yum -y --disableplugin=foreman-protector check-update , exit status 0:
Loaded plugins: product-id, search-disabled-repos, subscription-manager (ForemanMaintain::Error::ExecutionError)
—
How reproducible:
100%
Steps to Reproduce:
1. Update all the rpms
2. Run:
~~~
satellite-maintain packages check-update
~~~
Actual results:
~~~
satellite-maintain packages check-update
Running Check for available package updates
================================================================================
Check for available package updates: [FAIL]
Failed executing yum -y --disableplugin=foreman-protector check-update , exit status 0:
Loaded plugins: product-id, search-disabled-repos, subscription-manager
--------------------------------------------------------------------------------
Scenario [Check for available package updates] failed.
The following steps ended up in failing state:
[packages-check-update]
Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="packages-check-update"
~~~
Expected results:
The tasks should not fail if there are no RPM's to be updated
Additional info:
The RC=100 is expected when 'yum update-check' finds a RPM. On the other hand, the RC=0 is expected when no RPM's are returned(Operation was successful). And the code should handle both RC's.