Searching Red Hat repositories with the Mirror on Sync setting set to No
The Mirror on sync setting has been introduced in Satellite Server 6.2. After the upgrade from Satellite 6.1 to Satellite 6.2, Satellite sets this setting to No for the repositories that have been enabled in Satellite before the upgrade. For all the newly enabled repositories Satellite sets Mirror on Sync to Yes.
If your Red Hat Satellite is live from version 6.1, you might have the Mirror on Sync setting disabled for some Red Hat repositories. Having Mirror on Sync setting set to No for a Red Hat repository can cause problems, for example, it can result in the situation when a faulty package that was removed from the repository is still cached on your Satellite Server and promoted to hosts.
To search for Red Hat repositories with the Mirror on Sync setting set to No, enter the following command on your Satellite Server:
# for OUTPUT in $(hammer repository list --search 'Red Hat' | grep -oP '^\d+'); do hammer repository info --id $OUTPUT; done | grep -P -B 7 'Mirror on Sync:\s+no'
To configure the Mirror on Sync setting, complete the following steps:
For Web UI Users
- In the Satellite web UI, navigate to Content > Products.
- Click the required product.
- Click the Repository tab.
- Click the required repository.
- In the Sync Settings area, select the Mirror on Sync check box.
- Click Save.
For the CLI Users
Set Mirror on Sync to Yes using the repository ID:
# hammer repository update --id 1 --mirror-on-sync Yes
Verify that the Mirror on Sync is set to yes:
# hammer repository info --id 1