Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionBenjamin Kielhold
2023-08-17 15:32:32 UTC
Description of problem:
-----
Attempting to import a content view version on a disconnected satellite server with the incorrect user/group permissions results in an error output that describes the "directory <dir> does not exist". The actual issue is due to lack of permissions.
Version-Release number of selected component (if applicable):
-----
Satellite Versions Tested
- 6.13.0
- 6.12
- 6.11.5.4
How reproducible:
-----
100%
Steps to Reproduce:
1. Create a Content View as per the documentation for the specified version of Satellite. Verifying that the `Import_Only` value is set to True.
2. Verify that repositories to be added are set to `Immediate` download policy.
3. Sync repositories to be added to the Content View.
4. Add the repositories to the Content View and Publish version.
5. Export the CV version
6. When importing the CV, do not change the user/group permissions to pulp:pulp (In testing, I used root:root)
7. Attempt to import the CV version
Actual results:
-----
[root@sat613 ~]# hammer content-import version --path /var/lib/pulp/imports/Org/CVDiscTesting/1.0/2023-08-17T10-59-50-04-00/ --organization-id 1
Could not import the archive.:
directory /var/lib/pulp/imports/Org/CVDiscTesting/1.0/2023-08-17T10-59-50-04-00 does not exist
Verifying content present:
[root@sat613 ~]# ls -l /var/lib/pulp/imports/Org/CVDiscTesting/1.0/2023-08-17T10-59-50-04-00/
total 483444
-rw-r--r--. 1 root root 495035182 Aug 17 11:04 export-739832e8-8163-481e-85d4-244beab02bc5-20230817_1459.tar.gz
-rw-r--r--. 1 root root 333 Aug 17 11:04 export-739832e8-8163-481e-85d4-244beab02bc5-20230817_1459-toc.json
-rw-r--r--. 1 root root 1129 Aug 17 11:04 metadata.json
Expected results:
-----
[root@sat613 ~]# hammer content-import version --path /var/lib/pulp/imports/Org/CVDiscTesting/1.0/2023-08-17T10-59-50-04-00/ --organization-id 1
The above command should notify via an output that the user/group permissions are not set correctly (as in pulp:pulp) and that the user should verify.
Regards,
Benjamin
Comment 1Joniel Pasqualetto
2023-08-17 16:07:42 UTC
Verified in 6.15.0 snap 4.0 (python3.11-pulpcore-3.39.2-2.el8pc.noarch):
The error message received on import in case of insufficient permissions looks correct, in case of missing directory I would expect something like 'No such file or directory', but the received 'Unable to find' does the job too.
With correct permissions the import succeeded (checked automation for snap 5.0 where the 0 chunk-size issue was fixed).
[root@satellite ~]# ll /var/lib/pulp/imports/sjmntUJd/QaTiSrwnHt/1.0/2024-01-05T03-38-45-05-00/
total 260
-rw-r--r--. 1 root root 256000 Jan 5 03:38 export-018cd8c6-5503-7dea-a167-edfbcb73ae64-20240105_0838.tar
-rw-r--r--. 1 root root 241 Jan 5 03:38 export-018cd8c6-5503-7dea-a167-edfbcb73ae64-20240105_0838-toc.json
-rw-r--r--. 1 root root 975 Jan 5 03:38 metadata.json
[root@satellite ~]# hammer content-import version --organization-id 4 --path /var/lib/pulp/imports/sjmntUJd/QaTiSrwnHt/1.0/2024-01-05T03-38-45-05-00/
Could not import the archive.:
[Errno 13] Permission denied: '/var/lib/pulp/imports/sjmntUJd/QaTiSrwnHt/1.0/2024-01-05T03-38-45-05-00'
[root@satellite ~]# rm -rf /var/lib/pulp/imports/*
[root@satellite ~]# hammer content-import version --organization-id 4 --path /var/lib/pulp/imports/sjmntUJd/QaTiSrwnHt/1.0/2024-01-05T03-38-45-05-00/
Could not import the archive.:
Error: Unable to find '/var/lib/pulp/imports/sjmntUJd/QaTiSrwnHt/1.0/2024-01-05T03-38-45-05-00/metadata.json'. If the metadata.json file is at a different location provide it to the --metadata-file option
See: 'hammer content-import version --help'.
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