Error to import the content view exported on the Satellite.

Solution Verified - Updated

Environment

Satellite 6

Issue

Error to import an exported content view using Inter-Satellite Synchronization (ISS) feature.

Resolution

Copy the tarball file to the '/var/lib/pulp/katello-export' directory and execute the hammer import command with the fully qualified path.

# hammer content-view version import --export-tar /var/lib/pulp/katello-export/exported_CV_archive --organization-id Your_Organization_ID

NOTE: The path on the '--export-tar' option must be the fully qualified path of the tarball file. i.e. '/var/lib/pulp/katello-export/exported_CV_archive'

For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues

Root Cause

The tarball file has to be copied to the '/var/lib/pulp/katello-export' because of the permissions (Selinux and POSIX) requested to unpack the tarball and copy the rpm files to the repository.

Diagnostic Steps

Facing the following errors when importing an exported content view via hammer:

[root@dhcp182-23 ~]# hammer content-view version import --export-tar export-cv_case_02449795-7.tar --organization-id 1
[.....................................................................................................................................................................................] [100%]
No new packages.
Error: RPM1004: Error retrieving metadata: [Errno 13] Permission denied: '//./export-cv_case_02449795-7/ACME/content_views/cv_case_02449795/2.0/content/dist/rhel/server/7/7Server/x86_64/ansible/2.6/os/repodata/repomd.xml'
Could not import the content view:
  ansible-2.6.18-1.el7ae.noarch.rpm not available in repository Red_Hat_Ansible_Engine_2_6_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64
[root@dhcp182-23 ~]# hammer content-view version import --export-tar export-cv_case_02449795-7.tar --organization-id 1 
[.....................................................................................................................................................................................] [100%]
No new packages.
Error: RPM1004: Error retrieving metadata: [Errno 2] No such file or directory: '//./export-cv_case_02449795-7/ACME/content_views/cv_case_02449795/2.0/content/dist/rhel/server/7/7Server/x86_64/ansible/2.6/os/repodata/repomd.xml'
Could not import the content view:
  ansible-2.6.18-1.el7ae.noarch.rpm not available in repository Red_Hat_Ansible_Engine_2_6_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.