How to fix broken symlink issue of Red Hat repository in Red Hat Satellite 6?
Environment
- Red Hat Satellite 6.x threw 6.9
- pulp-adm deprecated in sat6.10
Issue
-
Broken symlinks for "Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.3" and "Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.9" repository in Red Hat Satellite 6.
"/var/lib/pulp/published/yum/http/repos/<Organization>/Library/content/dist/rhel/server/7/7.3/x86_64/kickstart/" "/var/lib/pulp/published/yum/https/repos/<Organization>/Library/content/dist/rhel/server/6/6.9/x86_64/kickstart/". -
Syncing the repository with parameter force_post_sync_actions set to
trueand thereafter re-publishing the content view didn't fix the broken sysmlinks.
Resolution
-
Execute: Sat 6.2 to 6.9: pulp-admin is a last resort , it may be better to open a case then use pulp-adm
Warning: The pulp-admin command can easily corrupt your database or put the pulp or katello databases out of sync. The use of pulp-admin outside the scope and direction of Red Hat Global Support Services is unsupported.
Notice: The command is intended to be used as a workaround or debugging tool for Satellite6 issues. The tool itself offers some functionality not integrated with Satellite6. I.e. some pulp-admin commands might not work on Satellite6.
-
The below commands to may fix the broken symlink issue where
repo_idis the repository ID of the broken symlink.# pulp-admin repo download --repo-id <repo_id> --verify-all -
How to find the repository ID?
-
Use below command to list the repositories along with
Id.# pulp-admin repo list +----------------------------------------------------------------------+ Repositories +----------------------------------------------------------------------+ Id: Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4 Display Name: Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4 Description: None Content Unit Counts: Erratum: 2578 Package Category: 9 Package Environment: 6 Package Group: 75 Rpm: 18040 Yum Repo Metadata File: 1 -
Copy the
Idfrom the above command and use it in the below command.# pulp-admin repo download --repo-id "Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4" --verify-all
-
-
DO NOT USE pulp-adm on sat 6.10 : As this should never occur as sat 6.10 has NO symlinks . As pulp-adm is a WIP for pulp3.
For more KB articles/solutions related to Red Hat Satellite 6.x Repository Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Repository Issues.
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.