Problem:
On an air-gapped (isolated from outside Internet) installation of Foreman, I am attempting to sync a local repository that was brought in from a RHEL8 system that had a connection to the RHSM.
Upon syncing the repository within Foreman, I am met with the following error:
[Errno 2] No such file or directory: '/var/lib/pulp/imports/el8/rhel-8-for-x86_64-appstream-rpms/Packages/b/bpg-sans-regular-fonts-1.005-10.el8.noarch.rpm'
Expected outcome:
Foreman should be able to sync all of the packages and show all applicable Errata, Packages Groups, and Module Streams
Foreman and Proxy versions:
foreman-3.6.1-1.el8.noarch
foreman-proxy-3.6.1-1.el8.noarch
Distribution and version:
Red Hat Enterprise Linux release 8.8 (Ootpa)
4.18.0-477.13.1.el8_8.x86_64
Other relevant data:
-
I performed a repository sync on the RHEL8 system that is connected to the RHSM like so:
reposync --repoid=rhel-8-for-x86_64-appstream-rpms -m -n -g -p /mnt/yum-repo/el8/ --download-metadata --downloadcomps
reposync --repoid=rhel-8-for-x86_64-baseos-rpms -m -n -g -p /mnt/yum-repo/el8/ --download-metadata
Edit: I did not manually create a repo using createrepo_c based on guidance from this Red Hat article: Createrepo causes module conflict on RHEL 8 reposync - Red Hat Customer Portal
-
I brought the
el8
directory into the air-gapped Foreman server -
Placed the el8 directory within /var/lib/pulp/imports
-
Recursively changed the ownership on the el8 directory to pulp:pulp
-
Restored the SELinux context on the el8 directory
-
Created a new repository with the following settings:
Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Label: rhel-8-for-x86_64-appstream-rpms
Description: Blank
Type: yum
Upstream URL: file:///var/lib/pulp/imports/el8/rhel-8-for-x86_64-appstream-rpms
Verify SSL: Unchecked
Upstream Username: Blank
Upstream Password: Blank
Upstream Authentication Token: Blank
Download Policy: Immediate
Mirroring Policy: Complete Mirroring
HTTP Proxy Policy: Global Default (None)
Checksum: Default
Unprotected: Unchecked
SSL CA Cert: sslcacert
SSL Client Cert: sslclientcert
SSL Client Key: sslclientkey -
Once created, I selected Select Action → Sync Now
-
Received the error message as shown above