Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
After syncing a repository and some contents have changed, Satellite will trigger an empty Capsule sync task which doesn't sync any repositores.
It appears to be the contents_changed flag not parsing into an action incorrectly. See the code below:
In file "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.56/app/lib/actions/katello/repository/sync.rb"
----------------------------------
...
plan_self(:id => repo.id, :sync_result => output, :skip_metadata_check => skip_metadata_check, :validate_contents => validate_contents,
:contents_changed => contents_changed) <========= This will always be "nil" as it is not getting from the output.
...
...
def contents_changed
input['contents_changed'] <=========
end
-----------------------------------
Checking the upstream code, it appears that this issue has been fixed together with other issue[1] in the pull request below:
https://github.com/Katello/katello/pull/9931/files#diff-558aee5ae708f4471204806fef76de73707e6b4745ab4d348e8075953420d6ccR58
[1] https://projects.theforeman.org/issues/34414
Created attachment 1886127[details]
Hotfix RPM for Satellite 6.10.6
HOTFIX RPM is available for Satellite 6.10.3
INSTALL INSTRUCTIONS:
1. Take a complete backup or snapshot of Satellite 6.10.3 server
2. Download the hotfix RPM attached to this BZ and copy it to Satellite server
3. # yum install ./tfm-rubygem-katello-4.1.1.57-2.HOTFIXRHBZ2089580.el7sat.noarch.rpm --disableplugin=foreman-protector
4. # satellite-maintain service restart
CORRECTION: the above comment has inconsistent Satellite versions due to copy & paste error on my part. To clarify, this hotfix is applicable to Satellite 6.10.6 only.
Created attachment 1893266[details]
Updated Hotfix RPM for Satellite 6.10.6
A new Hotfix RPM is available, which fixes both the Capsule Sync issue described here as well as the Errata Mail issue described in https://bugzilla.redhat.com/show_bug.cgi?id=2044314
INSTALL INSTRUCTIONS:
1. Take a complete backup or snapshot of Satellite 6.10.6 server
2. Download the hotfix RPM attached to this BZ and copy it to Satellite server
3. # yum install ./tfm-rubygem-katello-4.1.1.57-3.HOTFIXRHBZ2089580.el7sat.noarch.rpm --disableplugin=foreman-protector
4. # satellite-maintain service restart
An important note about this bug and hotfix: This bug affects only repositories in the Library environment + Default Organization View. Capsule syncs following CV publish/promote should not be affected by this issue. The intended behavior of 'Optimized' Capsule syncs, for the Library environment + Default Organization View, is that repositories are only synced on Capsules when some change is detected in the repo, as compared to the last time it was synced on Satellite. This Hotfix restores that intended behavior. Some repository syncs on Satellite may however find no changes since the last sync (even though the Capsules are still behind Satellite) and therefore still not trigger the automatic syncs on Capsules even with the Hotfix installed.
To ensure all repositories in the Library + Default Org View are up to date on all Capsules, regardless of whether the most recent syncs on Satellite detect any changes in the repository, use this approach:
1. Install the Hotfix using the steps in the above comment. ( https://bugzilla.redhat.com/show_bug.cgi?id=2089580#c12 ). This will ensure that when repository syncs on Satellite do detect changes, those changes are propagated out to any Capsules with the Library environment assigned.
2. Clear smart proxy sync histories for all root repositories on Satellite with this command:
# echo "Katello::RootRepository.all.map(&:id).each { |repo_id| Katello::Repository.find(repo_id).clear_smart_proxy_sync_histories }" |foreman-rake console
3. Run 'Optimized' syncs of each Capsule.
Comment 14Waldirio M Pinheiro
2022-06-29 17:35:17 UTC
*** Bug 2098271 has been marked as a duplicate of this bug. ***
Correction to the above script in comment #13 above. Step 2. (clear smart proxy sync histories) should use this command instead:
# echo "Katello::Repository.where(content_view_version_id: 1).each(&:clear_smart_proxy_sync_histories)" |foreman-rake console
This will better target all repositories in the "Default Organization View"
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 (Satellite 6.10.7 Async Bug Fix Update), 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/RHBA-2022:5516
Description of problem: After syncing a repository and some contents have changed, Satellite will trigger an empty Capsule sync task which doesn't sync any repositores. It appears to be the contents_changed flag not parsing into an action incorrectly. See the code below: In file "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.56/app/lib/actions/katello/repository/sync.rb" ---------------------------------- ... plan_self(:id => repo.id, :sync_result => output, :skip_metadata_check => skip_metadata_check, :validate_contents => validate_contents, :contents_changed => contents_changed) <========= This will always be "nil" as it is not getting from the output. ... ... def contents_changed input['contents_changed'] <========= end ----------------------------------- Checking the upstream code, it appears that this issue has been fixed together with other issue[1] in the pull request below: https://github.com/Katello/katello/pull/9931/files#diff-558aee5ae708f4471204806fef76de73707e6b4745ab4d348e8075953420d6ccR58 [1] https://projects.theforeman.org/issues/34414