Bug 1946795

Summary: Do the orphans cleanup before switchover to pulp3
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: Content ViewsAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: egolov, jsherril, ttereshc
Target Milestone: 6.9.1Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.26-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-26 17:36:58 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 Vladimír Sedmík 2021-04-06 21:04:51 UTC
Description of problem:
Orphaned content (migrated and then removed) causes failures for the final switchover to pulp3. The remediation is a cleanup prior to the switchover.


Version-Release number of selected component (if applicable):
6.9.0 snap 19.1


How reproducible:
always


Steps to Reproduce:
1. Have a SAT with yum/docker/file CVs published, run migration to pulp3.
2. Remove some of the CVs, run migration to pulp3 again.
3. Finally, run the switchover.


Actual results:
The switchover fails because of orphaned content.


Expected results:
The switchover task should handle the orphaned content.


Additional info:
The error is almost the same as BZ#1946339, however, the underlaying issue is a bit different and could be treated separately.

Comment 1 Tanya Tereshchenko 2021-04-07 08:33:12 UTC
I believe pulp part is capable of handling orphaned content.
Are you talking about orphans form Katello or Pulp side?
Switchover is also a Katello operation. 

The component is set to Pulp. There is nothing in this BZ, Pulp team can start working with.
Please provide logs and/or more context where the problem occurs, thanks.

Comment 2 Vladimír Sedmík 2021-04-07 12:15:55 UTC
Hello Tanya, I'm sorry for the confusion, I was rather talking about the Katello side and didn't distinguish it properly.

Moving to the `Content Views` component as it relates to missing CVs and adding jsherrill, who already investigated the reproducer, to the CC list.

(The fix meant for this BZ was to run foreman-rake katello:delete_orphaned_content prior to the actual switchover.)

Comment 3 Justin Sherrill 2021-04-12 21:15:45 UTC
Created redmine issue https://projects.theforeman.org/issues/32302 from this bug

Comment 4 Bryan Kearney 2021-04-13 10:17:41 UTC
Upstream bug assigned to jsherril

Comment 5 Bryan Kearney 2021-04-13 10:17:44 UTC
Upstream bug assigned to jsherril

Comment 7 Vladimír Sedmík 2021-04-19 09:12:27 UTC
Verified on 6.9.1 snap 2, tfm-rubygem-katello-3.18.1.27-1.el7sat.noarch

[root@satellite ~]# foreman-rake katello:pulp3_content_switchover
Checking for valid Katello configuraton.
Content Switchover completed successfully

After complete switchover all services were running, ping and health check was ok.

Comment 12 errata-xmlrpc 2021-04-26 17:36:58 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.9.1 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-2021:1371