Bug 2172564

Summary: Incremental syncable content export of a file repo is not incremental
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: VERIFIED --- QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: ahumbe, dalley, dkliban, ggainey, paji, rchan, rlavi
Target Milestone: 6.14.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pulpcore-3.18.21-1, pulpcore-3.21.11-1, pulpcore-3.22.8-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 2023-02-22 14:49:15 UTC
Description of problem:
Incremental syncable content export of a file repo always export full content of the repository.


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


How reproducible:
always


Steps to Reproduce:
1) Create a file repo, sync it.
2) Export complete: hammer content-export complete library --format syncable --organization-id 1
3) Check the export path.
4) Upload one file into the repo.
5) Export incremental: hammer content-export incremental library --format syncable --organization-id 1
6) Check the export path.


Actual results:

3)
[root@sat ~]# ll /var/lib/pulp/exports/Default_Organization/Export-Library-SYNCABLE/1.0/2023-02-21T10-24-55-05-00/custom/Files/X/
total 16
-rw-r--r--. 3 pulp pulp 1024 Feb 21 10:01 1.iso
-rw-r--r--. 3 pulp pulp 1024 Feb 21 10:01 2.iso
-rw-r--r--. 3 pulp pulp 1024 Feb 21 10:01 3.iso
-rw-r--r--. 2 pulp pulp  228 Feb 21 10:01 PULP_MANIFEST

6)
[root@sat ~]# ll /var/lib/pulp/exports/Default_Organization/Export-Library-SYNCABLE/2.0/2023-02-21T10-30-45-05-00/custom/Files/X/
total 20
-rw-r--r--. 3 pulp pulp 1024 Feb 21 10:01 1.iso
-rw-r--r--. 3 pulp pulp 1024 Feb 21 10:01 2.iso
-rw-r--r--. 3 pulp pulp 1024 Feb 21 10:01 3.iso
-rw-r--r--. 2 pulp pulp 1024 Feb 21 10:27 7.iso
-rw-r--r--. 2 pulp pulp  304 Feb 21 10:27 PULP_MANIFEST


Expected results:
1.iso, 2.iso, 3.iso should be missing in the incremental export.


Additional information:
Same behaviour seen for 'repository' and 'version' syncable exports.

Comment 1 Grant Gainey 2023-02-23 14:13:41 UTC
Can we see what Satellite is sending to Pulp in this context?

Comment 2 Grant Gainey 2023-02-23 16:02:45 UTC
I have verified that if you ask for an incremental export using the pulp API directly, it works. I used start_repository_version and repository_version. So we def need to see what Satellite is actually asking pulp to do, to figure out what's going on w/ this test.

Comment 3 Grant Gainey 2023-02-23 16:04:50 UTC
Moving to IIS

Comment 4 Partha Aji 2023-04-14 20:22:15 UTC
I can definitely reproduce the bug in my test evironment. I have not however tried with the pulp api directly. More investigation is needed (so adding team triage)

Comment 5 Partha Aji 2023-07-15 02:12:52 UTC
This is a pulp issue. The steps used in https://bugzilla.redhat.com/show_bug.cgi?id=2172564#c2 is not using a publication. It is using a repository_version and start_repository_version. Katello however uses a publication and start_repository_version which is where the bug occurs. Attached the associated Pulpcore issue and Pulpcore PR on Github.

Comment 7 Vladimír Sedmík 2023-07-31 09:31:43 UTC
Verified in 6.14.0 snap 9 (python39-pulpcore-3.22.9-1.1.el8pc.noarch)

Following steps from comment#0 the actual result meets the expected one:

3)
[root@sat ~]# ll /var/lib/pulp/exports/Default_Organization/Export-Library-SYNCABLE/1.0/2023-07-31T05-17-28-04-00/custom/Files/X/
total 16
-rw-r--r--. 2 pulp pulp 1024 Jul 31 05:16 1.iso
-rw-r--r--. 2 pulp pulp 1024 Jul 31 05:16 2.iso
-rw-r--r--. 2 pulp pulp 1024 Jul 31 05:16 3.iso
-rw-r--r--. 2 pulp pulp  228 Jul 31 05:16 PULP_MANIFEST

6)
[root@sat ~]# ll /var/lib/pulp/exports/Default_Organization/Export-Library-SYNCABLE/2.0/2023-07-31T05-20-06-04-00/custom/Files/X/
total 8
-rw-r--r--. 2 pulp pulp 1024 Jul 31 05:18 7.iso
-rw-r--r--. 2 pulp pulp  304 Jul 31 05:18 PULP_MANIFEST