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 1663340 - [RFE] allow recreation of content views when importing
Summary: [RFE] allow recreation of content views when importing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium with 1 vote
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks: 1644596
TreeView+ depends on / blocked
 
Reported: 2019-01-03 22:41 UTC by Chris Duryee
Modified: 2021-11-16 14:08 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:08:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:08:40 UTC

Description Chris Duryee 2019-01-03 22:41:12 UTC
Description of problem:

Content view import/export currently will create a content view version, but not a CV. However, the info needed to recreate the CV (name + list of repos) is already in the exported data.

This RFE is to recreate the content view if it doesn't already exist, then create the CV version. Note that this needs to work for both composite and regular CVs.

Comment 4 Bryan Kearney 2019-01-07 21:10:04 UTC
Upstream bug assigned to cduryee

Comment 6 Bryan Kearney 2019-01-29 23:02:08 UTC
Upstream bug assigned to cduryee

Comment 7 Mike McCune 2019-04-04 04:21:04 UTC
This RFE should also cover the use case of importing and exporting just the Content View definitions themselves and not all the actual repository content.

If we feel this goes beyond the scope of this RFE we can spawn out another BZ but for now lets cover both use cases here.

Comment 8 Bryan Kearney 2019-04-15 22:00:47 UTC
Upstream bug assigned to chrobert

Comment 10 Bryan Kearney 2020-07-29 20:04:59 UTC
Upstream bug assigned to chrobert

Comment 13 Mike McCune 2021-03-11 18:51:10 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in one month's time. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 15 Lai 2021-06-22 17:43:32 UTC
Info: The primary cv export/import has already been verified via https://bugzilla.redhat.com/show_bug.cgi?id=1884212.  The only portion missing is verifying the composite import.  Please not that COMPOSITES CANNOT BE IMPORTED.  Instead, the composite cv will be converted to a regular content view, preserving the name and version, and will include all of the contents that was once under the composite.
Step to retest:

1. Spin up 2 Satellites (6.10 each)

#Export Satellite Portion

2. On satellite to export, import manifest
3. Administer -> Setting -> Search for "Default Red Hat Repository download policy" -> Set policy to "immediate"
4. Enable a several RH repos
5. Sync the repos
6. Create 2 cv and split up adding the repos from step 4 to the 2 cv
7. Create a composite content view and add the 2 cv from step 6
8. Publish the composite content view twice to get it to version 2.0
9. Run the export command: hammer content-export complete version --id <cv-id> --organization-id <org-id>
10. Verify that the export files are created in "/var/lib/pulp/exports/<organization name>/<cv name><export time stamp>

#Import Disconnected Satellite Portion

11. On the satellite to import the cv, import manifest that would have all the repos created in step 4
12. Set "Default Red Hat Repository download policy" to "immediate" just like step 3.
13. Set "Disconnected Mode" to "Yes" by going to Administer -> Setting -> Content Tab -> Disconnected Mode
14. SCP the files from the exported directory in step 8 to /var/lib/pulp/imports in the satellite in which you want to import
15. Provide write permission to the dir imported: chown -R pulp:pulp /var/lib/pulp/imports/<dir with import>
16. Verify that the files are present in /var/lib/pulp/imports/<dir with import>
17. Run the import command: hammer content-import version --organization-id 1 --path /var/lib/pulp/imports/<dir with import>
18. Verify that on the UI that the composite imported is turned into a content view with the correct version number.

Expected result:
9. Export should be successful
10. There should be 3 files created: export-<id>.tar.gz, export-<id>-toc.json, and metadata.json
16. There should be 3 files: export-<id>.tar.gz, export-<id>-toc.json, and metadata.json
17. Import should be successful
18. UI should show the name of the composite cv, but should now be a content view with all the contents from the composite imported over

Actual result:
9. Export is successful:
# hammer content-export complete version --id 2 --organization-id 1
[......................................................................................................................................] [100%]
Generated /var/lib/pulp/exports/Default_Organization/lai_composite/3.0/2021-06-22T09-27-52-04-00/metadata.json

10. There are 3 files created: export-<id>.tar.gz, export-<id>-toc.json, and metadata.json
16. There are 3 files: export-<id>.tar.gz, export-<id>-toc.json, and metadata.json
17. Import is successful:
# hammer content-import version --organization-id 1 --path /var/lib/pulp/imports/<dir with import>
[......................................................................................................................................] [100%]

18. UI shows the composite name turned into a content view with all the contents present.

Verified on 6.10_05

Comment 18 errata-xmlrpc 2021-11-16 14:08:27 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


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