Bug 2106000 - Manifest Refresh should ensure environment-content association
Summary: Manifest Refresh should ensure environment-content association
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Lifecycle Environments
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.12.0
Assignee: wclark
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-11 13:52 UTC by wclark
Modified: 2022-11-16 13:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2112352 (view as bug list)
Environment:
Last Closed: 2022-11-16 13:34:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Hotfix RPM for Satellite 6.10.7 (9.30 MB, application/x-rpm)
2022-07-20 01:04 UTC, wclark
no flags Details
Hotfix RPM for Satellite 6.11.0 on RHEL7 (10.56 MB, application/x-rpm)
2022-07-25 15:05 UTC, wclark
no flags Details
Hotfix RPM for Satellite 6.11.0 on RHEL8 (10.50 MB, application/x-rpm)
2022-07-25 15:08 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35193 0 Normal New Manifest Refresh should ensure environment-content association 2022-07-11 13:56:28 UTC
Red Hat Issue Tracker SAT-11476 0 None None None 2022-10-21 15:43:10 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:30 UTC

Description wclark 2022-07-11 13:52:41 UTC
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:

Comment 1 wclark 2022-07-11 13:56:28 UTC
Created redmine issue https://projects.theforeman.org/issues/35193 from this bug

Comment 2 Bryan Kearney 2022-07-11 16:05:12 UTC
Upstream bug assigned to wclark

Comment 3 Bryan Kearney 2022-07-11 16:05:14 UTC
Upstream bug assigned to wclark

Comment 4 Bryan Kearney 2022-07-16 20:04:54 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35193 has been resolved.

Comment 5 wclark 2022-07-20 01:04:54 UTC
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

Comment 6 wclark 2022-07-25 15:05:50 UTC
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

Comment 7 wclark 2022-07-25 15:08:23 UTC
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

Comment 8 Lai 2022-08-04 20:54:10 UTC
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

Comment 13 errata-xmlrpc 2022-11-16 13:34:16 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.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


Note You need to log in before you can comment on or make changes to this bug.