Description of problem: We have seen a few bugs where the environment-content association in Candlepin gets somehow lost or corrupted, for example https://bugzilla.redhat.com/show_bug.cgi?id=2064979 and https://bugzilla.redhat.com/show_bug.cgi?id=1931027 Katello tracks the info it needs to recreate this data on Candlepin back-end but it is not accessible to the user without re-promoting Content Views, which is painful and contains many steps not actually necessary to fix the issue Building the same logic into Manifest Refresh makes sense as this is often when the issue occurs / can potentially repair before it ever becomes a problem Version-Release number of selected component (if applicable): How reproducible: 100% (using https://bugzilla.redhat.com/show_bug.cgi?id=2064979 ) Steps to Reproduce: ( https://bugzilla.redhat.com/show_bug.cgi?id=2064979 ) 1. Create a lifecycle path and content view, publish and promote some CV versions 2. Register the client in some LCE and CV 3. Enable repos on the client, try to install some package 4. Remove all subscriptions from the manifest and refresh it 5. Refresh the manifest a 2nd time (to produce the conditions of https://bugzilla.redhat.com/show_bug.cgi?id=2064979 ) 6. Add subscriptions back to the manifest 7. Refresh the manifest again, one or more times 8. Sub-man refresh and re-subscribe the client, try to enable repos and install the same package as before 9. Register some new client in same CV and LCE, try to enable repos and install the same package as before Actual results: 1. Client remained registered in the same CV and LCE but could not enable repositories or download package, due to entitlement certificate not providing content in this CV/LVE 2. Newly registered client has same issue Expected results: 1. Manifest Refresh task should Warn the user if content access was removed in some CV/LVE 2. Once new entitlements are added and manifest is refreshed again, entitlement cert should provide the same repository access in this CV/LCE as it did as before the backend Candlepin issue occurred -- without requiring CV version repromotion Additional info:
Created redmine issue https://projects.theforeman.org/issues/35193 from this bug
Upstream bug assigned to wclark
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35193 has been resolved.
Created attachment 1898223 [details] Hotfix RPM for Satellite 6.10.7 A Hotfix RPM is available for this fix on Satellite version 6.10.7, which causes the RefreshManifest task to ensure Candlepin's environment-contents are populated from Katello's ContentViewEnvironments. INSTALL INSTRUCTIONS: 1. Take a complete backup or snapshot of Satellite 6.10.7 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.60-2.HOTFIXRHBZ2106000.el7sat.noarch.rpm --disableplugin=foreman-protector 4. # satellite-maintain service restart 5. Refresh Satellite Manifest and monitor task to completion to benefit from the change
Created attachment 1899193 [details] Hotfix RPM for Satellite 6.11.0 on RHEL7 A Hotfix RPM is available for this fix on Satellite version 6.11.0 on RHEL7, which causes the RefreshManifest task to ensure Candlepin's environment-contents are populated from Katello's ContentViewEnvironments. INSTALL INSTRUCTIONS: 1. Take a complete backup or snapshot of Satellite 6.11.0 server 2. Download the hotfix RPM for Satellite 6.11.0 on RHEL7 attached to this BZ and copy it to Satellite server 3. # yum install ./tfm-rubygem-katello-4.3.0.42-2.HOTFIXRHBZ2106000.el7sat.noarch.rpm --disableplugin=foreman-protector 4. # satellite-maintain service restart 5. Refresh Satellite Manifest and monitor task to completion to benefit from the change
Created attachment 1899194 [details] Hotfix RPM for Satellite 6.11.0 on RHEL8 A Hotfix RPM is available for this fix on Satellite version 6.11.0 on RHEL8, which causes the RefreshManifest task to ensure Candlepin's environment-contents are populated from Katello's ContentViewEnvironments. INSTALL INSTRUCTIONS: 1. Take a complete backup or snapshot of Satellite 6.11.0 server 2. Download the hotfix RPM for Satellite 6.11.0 on RHEL8 attached to this BZ and copy it to Satellite server 3. # dnf install ./rubygem-katello-4.3.0.42-2.HOTFIXRHBZ2106000.el8sat.noarch.rpm --disableplugin=foreman-protector 4. # satellite-maintain service restart 5. Refresh Satellite Manifest and monitor task to completion to benefit from the change
Steps to retest: 1. Create a lifecycle path and content view, publish and promote some CV versions 2. Register the client in some LCE and CV 3. Enable repos on the client, try to install some package 4. Remove all subscriptions from the manifest and refresh it 5. Refresh the manifest a 2nd time (to produce the conditions of https://bugzilla.redhat.com/show_bug.cgi?id=2064979 ) 6. Add subscriptions back to the manifest 7. Refresh the manifest again, one or more times 8. Sub-man refresh and re-subscribe the client, try to enable repos and install the same package as before 9. Register some new client in same CV and LCE, try to enable repos and install the same package as before Actual results: 1. The repo already exists in the client and the message shows that. You are also able to install different packages without issues 2. Able to successfully install the repos without issues. Verified on 6.12 snap 4
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.12 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-2022:8506