Bug 2112352 - 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.11.2
Assignee: wclark
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-29 13:01 UTC by Odilon Sousa
Modified: 2022-08-30 19:43 UTC (History)
1 user (show)

Fixed In Version: tfm-rubygem-katello-4.3.0.46-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2106000
Environment:
Last Closed: 2022-08-30 19:43:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35193 0 Normal Closed Manifest Refresh should ensure environment-content association 2022-07-29 13:01:33 UTC
Red Hat Product Errata RHBA-2022:6233 0 None None None 2022-08-30 19:43:20 UTC

Description Odilon Sousa 2022-07-29 13:01:21 UTC
+++ This bug was initially created as a clone of Bug #2106000 +++

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:

--- Additional comment from  on 2022-07-11T13:56:28Z 

Created redmine issue https://projects.theforeman.org/issues/35193 from this bug

--- Additional comment from  on 2022-07-11T16:05:12Z 

Upstream bug assigned to wclark

--- Additional comment from  on 2022-07-11T16:05:14Z 

Upstream bug assigned to wclark

--- Additional comment from  on 2022-07-16T20:04:54Z 

Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35193 has been resolved.

--- Additional comment from  on 2022-07-20T01:04:54Z 

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

--- Additional comment from  on 2022-07-25T15:05:50Z 

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

--- Additional comment from  on 2022-07-25T15:08:23Z 

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 2 Bryan Kearney 2022-07-29 16:05:28 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35193 has been resolved.

Comment 4 Lai 2022-08-08 23:44:04 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.11.2_01 on rhel7 and rhel8

Comment 9 errata-xmlrpc 2022-08-30 19:43:07 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 (Satellite 6.11.2 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:6233


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