Bug 1995276

Summary: Artifacts don't get properly linked with Content after a repo is switched from on-demand to immediate
Product: Red Hat Satellite Reporter: David Davis <daviddavis>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: unspecified    
Version: NightlyCC: ggainey, osousa, pcreech, rchan, rmynar, ttereshc
Target Milestone: 6.10.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pulpcore-3.14.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:13:21 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 David Davis 2021-08-18 17:43:06 UTC
Description of problem:

After an on-demand sync, switching a repository from on-demand to immediate doesn't properly associate its content to the new artifacts in Pulp. This is perhaps most easily observed when exporting (see reproducer steps).


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

Satellite 6.10 snap 13


How reproducible:

100%


Steps to Reproduce:
1. Download some content on-demand
2. Switch the repo to immediate
3. Perform an export

Actual results:

The export is smaller than expected because it's missing artifacts.


Expected results:

The export contains the artifacts.


Additional info:

Comment 1 David Davis 2021-08-18 17:45:39 UTC
Here are more detailed reproducer steps:

1. Create an on-demand repo and sync it
2. Switch the repo to immediate and sync again
3. Perform an export of the repo


Actual results:

The export is smaller than expected because it's missing artifacts.


Expected results:

The export contains the artifacts.

Comment 2 Lai 2021-08-18 17:51:44 UTC
Adding a workaround for this issue.

Don't sync on-demand first.  Go straight to immediate for any export testing.

Comment 3 pulp-infra@redhat.com 2021-08-18 18:09:22 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-08-18 18:09:23 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-08-20 01:47:16 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2021-08-23 21:07:04 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2021-08-23 21:07:05 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 8 pulp-infra@redhat.com 2021-08-24 16:11:17 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2021-08-24 17:14:58 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 10 pulp-infra@redhat.com 2021-08-24 18:08:56 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 11 Lai 2021-08-30 18:30:01 UTC
Steps to test

1. Create an on-demand repo and sync it
2. Switch the repo to immediate and sync again
3. Perform an export of the repo: hammer content-export complete version --id <cvv-id> --organization-id <org_id>
4. Check the size of the dir and compare it with another sat with an export that does have immediate sync

Expected:
The dir size should be the same.

Actual:
The dir size of both exports are the same.

This is resyncing immediate
# du -sh /var/lib/pulp/exports/Default_Organization/test/1.0/2021-08-30T14-09-31-04-00/
359M	/var/lib/pulp/exports/Default_Organization/test/1.0/2021-08-30T14-09-31-04-00/

This is one already in immediate
# du -sh /var/lib/pulp/exports/Default_Organization/Export-Library/1.0/2021-08-30T14-22-57-04-00
359M	/var/lib/pulp/exports/Default_Organization/Export-Library/1.0/2021-08-30T14-22-57-04-00

I've also tested them on complete library and it works as expected.

Comment 14 errata-xmlrpc 2021-11-16 14:13:21 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.10 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-2021:4702