Bug 1964593

Summary: [pulp3] on_demand distribution trees with no images are not migrated
Product: Red Hat Satellite Reporter: Tanya Tereshchenko <ttereshc>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: ggainey, jjeffers, osousa, rchan, ttereshc
Target Milestone: 6.9.4Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pulp_2to3_migration-0.11.2-1.el7pc Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1973359 (view as bug list) Environment:
Last Closed: 2021-07-29 12:58:50 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 Tanya Tereshchenko 2021-05-25 18:48:35 UTC
Description of problem:

If a distribution tree was synced with on_demand policy to pulp2 and has no images , it won't be migrated at all. The repository in Pulp 3 will have all content except a distribution tree.

The only sign of it in the logs is
rq[21594]: pulp: pulp_2to3_migration.app.plugin.content:WARNING: On_demand content cannot be migrated without an entry in the lazy catalog, pulp2 unit_id: dbb90f9a-5f26-4477-b361-a8dfc22fc27e

where pulp2 unit_id refers to the on_demand distribution tree.

So far, only CentOS 8 kickstart repos are known to create a kickstart repo without a single image.
CentOS 8 BaseOS has images, other repos which are supposed to be variants or addons, but were created as separate independent repos, have no images, e.g. CentOS 8 Appstream, PowerTools, HighAvailability.

To reproduce:

 - sync one of the following to pulp2 with policy on_demand
    * AppStream, http://mirror.centos.org/centos/8/AppStream/x86_64/os/
    * PowerTools, http://mirror.centos.org/centos/8/PowerTools/x86_64/os/
    * HighAvailability, http://mirror.centos.org/centos/8/HighAvailability/x86_64/os/
 - migrate to pulp 3

Comment 1 pulp-infra@redhat.com 2021-05-25 18:50:12 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2021-05-25 18:50:13 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-05-27 19:49:20 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-06-04 19:28:10 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-06-04 20:58:45 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 6 pulp-infra@redhat.com 2021-06-14 15:08:26 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 7 Lai 2021-07-07 19:16:25 UTC
Steps to test

1. Create a product with the following custom repos and ensure that they are set to "on demand": centos8 appstream, centos08 powertool, centos08 highavailability
2. Sync repos
3. Perform migration
4. Check results

Expected:
Repos should migrate successfull

Actual:
Repos migrated successfully without issues.

Also checked pulp cli and they did migrate successfully.

Verified on 6.9.4_01 with python3-pulp-2to3-migration-0.11.2-1.el7pc.noarch

Comment 12 errata-xmlrpc 2021-07-29 12:58:50 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.4 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:2948

Comment 13 errata-xmlrpc 2021-07-29 13:02:56 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.4 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:2948