Problem:
Our /var/lib/pulp is taking too much space, so in order to try to recover some back we tried to activate mirror-on-sync so on the next sync the rpms that had multiple versions would be eliminated.
We ran this script to try to enable the option on all repos:
#!/bin/bash
declare -a repo_list=$(hammer repository list | awk '/^[0-9]/ {print $1}')
for i in ${repo_list[@]}; do
hammer repository update --id "$i" --mirror-on-sync true
done
Apparently all repos were updated - we got a message saying the repo was updated for each one.
Since then the repos were synced and Content Views were published.
Today, when registering new hosts, we found that only one repo appears on the new hosts.
We made no changes to the products neither to the Content Views.
We doubled checked and altough the hammer repository update … apparently worked all the repos we checked have the mirror-on-sync set to false.
Some extra weird behavior:
- some older hosts subscribed exactly the same can still “see” all the content view repos and install rpms from them
- if we had a new repo to the product and content view it appears right away on the hosts (after publishing the CV)
Foreman and Proxy versions:
Foreman version: 3.2.1
Foreman and Proxy plugin versions:
Plugins:
- foreman-tasks 6.0.1
- foreman_host_reports 1.0.2
- foreman_puppet 3.0.7
- foreman_remote_execution 6.0.0
- katello 4.4.1
Distribution and version:
CentOS Linux release 7.9.2009 (Core)
Other relevant data:
We tried several sync methods on the repos that “disappeared” but none made the repos appear on new machines.
We also ran the hammer repository update command for the repo that was added and that appeared right away but it did not make it “disappear” (even after syncing and publishing a new CV)