Description of problem:
Have a RHEL 8.1 client registered to Satellite 6.6, go to Hosts => Content Hosts => select RHEL 8.1 client => tab Packages, choose Applicable and click on "Update All Packages"
First run: 7 packages out of 25 got updated, foreman task Actions::Katello::Host::Package::Update finished successfully.
Package profile for the client didn't get updated, still see 25 Applicable packages, yum check-update is showing 18 available updates.
Second run: Clicked on "Update All Packages", foreman task Actions::Katello::Host::Package::Update finished successfully again, very quickly, looks like nothing was updated on the client at all. yum check-update returns again 18 available updates.
Checking which message is sent to katello-agent:
while true; do cp /var/lib/gofer/messaging/pending/katello/* tmp; sleep 0.0001; done
And then click on Update All Packages, got following file, during second run:
# cat 1576069770-369455-0000.json | json_reformat
Version-Release number of selected component (if applicable):
# rpm -qa | egrep "katello-agent|dnf"
How reproducible: 100 %
Steps to Reproduce:
1. Provisioned RHEL 8.1 trough Satellite 6.6
2. Clock on Update All Packages, task finished successfully, however only 7 packages out of 25 got updated and package profile for the client did not get updated on Satellite side, task Actions::Katello::Host::UploadProfiles finished sucessfully
First run of Update All Packages on RHEL 8.1 client updated only 7 packages out of 25, package profile on Satellite didn't get updated. Second run of Update All Packages didn't update any package.
"Update All Packages" updates all packages on RHEL 8.1 :)
I think https://bugzilla.redhat.com/show_bug.cgi?id=1713417 fixed just "errata install" scenario but the bugfix should be extended to cover this call flow as well.
Checking codefix of bz1713417 : https://github.com/Katello/katello-host-tools/pull/98/files makes a different condition to call
But in case of "Update All Packages", both patterns and advisories are empty lists. Removing the "if patterns:" condition and letting lib.upgrade(patterns) to be executed every time, packages are updated.
But I am not 100% sure if this cant break something - what is the expected behaviour of the "update" method called on empty lists?
- to update nothing? (then katello should enumerate all packages to update in the RMI request / enumerate the unit_keys)
- or update everything? (then my patch proposal is sane)
Requesting review of the author of the original patch.
Connecting redmine issue https://projects.theforeman.org/issues/28909 from this bug
Upstream bug assigned to email@example.com
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28909 has been resolved.
Clearing the needinfo, since a patch was submitted/merged upstream.
*** Bug 1805059 has been marked as a duplicate of this bug. ***
*** Bug 1824909 has been marked as a duplicate of this bug. ***
*** Bug 1829866 has been marked as a duplicate of this bug. ***
Tested on Satellite 6.8 Snap 8 using the reproducer from the initial report. Registered a RHEL 8.1 content host and executed "Update All Packages" on the "Packages->Applicable" page. All packages were successfully updated. The "Actions::Katello::Host::UploadProfiles" task was performed successfully, no more packages to update were listed.
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.8 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.