Bug 2227903

Summary: Can't rerun a failed content-import task if it was exported using chunks
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: VERIFIED --- QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: high    
Version: 6.12.1CC: ahumbe, dalley, dkliban, ggainey, osousa, paji, rchan, shwsingh, vsedmik
Target Milestone: 6.12.5Keywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pulpcore-3.18.19 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2173757 Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Vladimír Sedmík 2023-08-08 14:06:06 UTC
Verified in 6.12.5 snap 2 (python39-pulpcore-3.18.25-1.el8pc.noarch)

Steps to verify:

On export SAT:
1) Set immediate download policy, uploaded manifest.
2) Synced RH repo big enough to be chunked (rhel-9-for-x86_64-baseos-rpms).
3) Exported complete Library using chunks:
# hammer content-export complete library --organization-id 1 --chunk-size-gb 1

On import SAT:
1) Set immediate download policy, uploaded manifest, set "Export Sync" in CDN configuration.
2) Created import dir, copied the content from the export SAT, updated owner. 
# rsync -aPz root@$EXP_SAT:/var/lib/pulp/exports/Default_Organization/Export-Library/1.0/$TIME/ /var/lib/pulp/imports/$TIME/
# chown -R pulp:pulp /var/lib/pulp/imports/
3) Started the import and once the chunks were gone (merged into single tar.gz), restarted the services:
# hammer content-import library --organization="Default Organization" --path="/var/lib/pulp/imports/$TIME/"
# foreman-maintain service restart
4) Started the import again and let it finish -> the task succeeded.
5) Checked that the imported content matched the export.