Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2129296 - Incremental export of Content View broken by syncable export
Summary: Incremental export of Content View broken by syncable export
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.15.0
Assignee: Partha Aji
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-23 08:55 UTC by Radek Mynar
Modified: 2024-07-12 08:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-23 17:12:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-17257 0 None None None 2023-04-20 15:27:43 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:12:43 UTC

Description Radek Mynar 2022-09-23 08:55:56 UTC
Description of problem:
Performing a syncable complete export of Content View breaks continuity of importable incremental exports

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

How reproducible:
always

Steps to Reproduce:
1. Create an export organization (or use default) and add some content
2. Create a ContentView, publish new version and perform a complete version export
hammer content-export complete version --organization ExportOrg --content-view TestView --version 1.0
3. Publish new ContentView version and perform a complete syncable version export
hammer content-export complete version --organization ExportOrg --content-view TestView --version 2.0 --format syncable
4. Publish new ContentView version and perform an incremental version export
hammer content-export incremental version --organization ExportOrg --content-view TestView --version 3.0
5. Create an import organization
6. Copy exported content into pulp import directory (cp -R /var/lib/pulp/exports/ExportOrg/TestView /var/lib/pulp/imports/, chown -R pulp:pulp /var/lib/pulp/imports/TestView/)
7. Import complete ContentView version 1.0
hammer content-import version --organization "ImportOrg" --path /var/lib/pulp/imports/TestView/1.0/...
8. Attempt to import version 3.0
hammer content-import version --organization "ImportOrg" --path /var/lib/pulp/imports/TestView/3.0/...

Actual results:
  Could not import the archive.:
    Prior Content View Version specified in the metadata - 'TestView 2.0' does not exist. Please import the metadata for 'TestView 2.0' before importing 'TestView 3.0'

Expected results:
Version 3.0 is imported (just as if no export of 2.0 was done).
Performing a syncable export should not break continuity of importable incremental exports.

Additional info:
Similar issue with repository and library export was resolved in bz 2118431

Comment 1 Brad Buckingham 2023-10-30 11:29:29 UTC
Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set.

Comment 2 Partha Aji 2023-11-14 22:42:54 UTC
This is working as designed. 
The user does
hammer content-export complete version --organization ExportOrg --content-view TestView --version 1.0
hammer content-export complete version --organization ExportOrg --content-view TestView --version 2.0 --format=syncable
hammer content-export incremental version --organization ExportOrg --content-view TestView --version 3.0

and then in the import sat does

hammer content-import version --organization ImportOrg --path=/var/lib/pulp/<..>/1.0
hammer content-import version --organization ImportOrg --path=/var/lib/pulp/<..>/3.0

The error reported by the incremental export makes sense. 
You have to import version 2.0 before importing version 3.0 because the incremental export was between version 2.0 and 3.0. .

Comment 3 Radek Mynar 2023-11-15 13:26:21 UTC
I tried to do similar export/import process as described in steps to reproduce. The only difference was that I skipped the syncable export. Here's the list of commands:

hammer organization create --name "ExportOrg"
hammer product create --name "TestProd" --organization "ExportOrg"
hammer repository create --content-type yum --product "TestProd" --name "TestYumRepo0" --url "<yum_repo_url0>" --organization "ExportOrg"
hammer repository create --content-type yum --product "TestProd" --name "TestYumRepo1" --url "<yum_repo_url1>" --organization "ExportOrg"
hammer repository create --content-type yum --product "TestProd" --name "TestYumRepo2" --url "<yum_repo_url2>" --organization "ExportOrg"
hammer repository synchronize --product "TestProd" --name "TestYumRepo0" --organization "ExportOrg"
hammer repository synchronize --product "TestProd" --name "TestYumRepo1" --organization "ExportOrg"
hammer repository synchronize --product "TestProd" --name "TestYumRepo2" --organization "ExportOrg"
hammer content-view create --name "TestView" --organization "ExportOrg"
hammer content-view add-repository --repository "TestYumRepo0" --product "TestProd" --name "TestView" --organization "ExportOrg"
hammer content-view publish --name "TestView" --organization "ExportOrg"
hammer content-export complete version --content-view "TestView" --version "1.0" --organization "ExportOrg"
hammer content-view add-repository --repository "TestYumRepo1" --product "TestProd" --name "TestView" --organization "ExportOrg"
hammer content-view publish --name "TestView" --organization "ExportOrg"
# don't perform the syncable export here
hammer content-view add-repository --repository "TestYumRepo2" --product "TestProd" --name "TestView" --organization "ExportOrg"
hammer content-view publish --name "TestView" --organization "ExportOrg"
hammer content-export incremental version --content-view "TestView" --version "3.0" --organization "ExportOrg"
cp -R /var/lib/pulp/exports/ExportOrg/TestView /var/lib/pulp/imports/
chown -R pulp:pulp /var/lib/pulp/imports/TestView/
hammer organization create --name "ImportOrg"
ls -lha /var/lib/pulp/imports/TestView/
hammer content-import version --organization "ImportOrg" --path /var/lib/pulp/imports/TestView/1.0/<timestamp>/
hammer content-import version --organization "ImportOrg" --path /var/lib/pulp/imports/TestView/3.0/<timestamp>/

No error appears during import. As a result ImportOrg contains content view "TestView" with 2 versions - "1.0" and "3.0". 

Please consider reopening.

Comment 4 Partha Aji 2023-11-15 15:35:15 UTC
Hmm ok the CV versions in the  import org  will match the CV versions from export. So the behavior you see there is correct because
1) You did a Complete export of version 1.0
2) You then did an incremental export from version 1.0 -> 3.0
3) Then you imported version 1.0
4) Finally imported version 3.0 incrementally
5) As long as the contents of version 3 match we should be good.

Can you please reverify and reopen if I am missing something ?

Comment 5 Sam Bible 2024-01-23 15:58:09 UTC
Verified on 6.15 - Snap 5

Steps to Verify:
1. Following Radek's command list above you:
  - Create a CV, add a repo and publish
  - Do a complete Export
  - Add another repo and publish 2.0 
  - Add another repo and publish 3.0
  - Export incrementally version 3.0
  - Import both into a new Org

Expected Results:
Version 1.0 and 3.0 have the appropriate repos, and import correctly.

Actual Results:
Version 1.0 and 3.0 have the appropriate repos, and import correctly.

Comment 8 errata-xmlrpc 2024-04-23 17:12:42 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 (Important: Satellite 6.15.0 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-2024:2010


Note You need to log in before you can comment on or make changes to this bug.