Bug 2025049

Summary: Executing remove-pulp2 after a successful Satellite 6.10 upgrade breaks synchronizations and repositories.
Product: Red Hat Satellite Reporter: arivera
Component: Satellite MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: sganar
Severity: high Docs Contact:
Priority: high    
Version: 6.10.0CC: ahumbe, apatel, aupadhye, gtalreja, jbhatia, jkrajice, jsenkyri, jsherril, kgaikwad, ldelouw, mkalyat, momran, msunil, pcreech, pdwyer, rrajput, sadas, saydas, sganar
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2027815 (view as bug list) Environment:
Last Closed: 2022-07-05 14:30:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description arivera 2021-11-19 18:59:33 UTC
Description of problem:
Executing remove-pulp2 after a successful Satellite 6.10 upgrade breaks synchronizations and repositories. Keeping the pulp2 content will not break Red Hat repos and synchronizations.

Version-Release number of selected component (if applicable):
6.10.1

How reproducible:
Every time.

Steps to Reproduce:
1.After completing the satellite 6.10 upgrade run remove-pulp2 to cleanup content
2.Sync repos
3.Sync fails 


Actual results:
Repos sync with warning:
relation "pulp_2to3_migration_pulp2repository" does not exist
LINE 1: ...ation_pulp2repository"."pulp3_repository_id" FROM "pulp_2to3...

Expected results:
Repos should synchronize correctly

Additional info:

Comment 1 Justin Sherrill 2021-11-19 21:53:45 UTC
Do you still get this error after doing a 'satellite-maintain service restart' ?

Do you see a full traceback in 'journalctl -u pulpcore-worker@*'  ?

Comment 2 arivera 2021-11-19 22:19:11 UTC
Looks like running satellite-maintain service restart after removing the pulp2 content solved the issue. Restarting the satellite services after removing the pulp 2 content is not in the documentation.

Comment 3 Justin Sherrill 2021-11-22 03:12:01 UTC
Yep, we should have the command restart the appropriate services for you!  We will do that as part of a z-stream.  Thanks!

Comment 6 James Jeffers 2021-11-30 20:04:29 UTC
Created redmine issue https://projects.theforeman.org/issues/34045 from this bug

Comment 10 sganar 2021-12-30 08:21:13 UTC
Verified.

Tested on Satellite 6.9.8 Snap 1.0
Version: rubygem-foreman_maintain-1.0.1.el7sat.noarch (From Satellite7.0 Snap3.0)

Steps:
1. Sync a few custom repos with a few CDN repos, create and publish ContentView.
2. Migrate contents from Pulp2to3 and perform a Satellite upgrade to 6.10.
3. # satellite-maintain content remove-pulp2
4. Sync repos again after remove-pulp2

Observations:
Repos sync is successful.
"satellite-maintain content remove-pulp2" now restarts pulpcore services after pulp2 data removal, which solves the issue of syncing repos post-upgrade.

Comment 16 errata-xmlrpc 2022-07-05 14:30:29 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 (Moderate: Satellite 6.11 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:5498