Setup a regular job to test the integrity of the Satellite's database records and the RPM repository. spacewalk-data-fsck comes with Red Hat Satellite and it does not produce much output even with the verbose switch. It really does take a whole day to run so schedule it accordingly.
I use the "-r" switch so it deletes any stray packages that are no-longer in the database. I don't know if that can get someone into trouble on some edge case with custom packages or something. The "satellite-sync" is run after to replace any packages that were deleted because there was a consistency issue with either the database record or the package itself.
cat <<EOF > /usr/local/sbin/satellite-integrity-checker.sh
#!/bin/bash
spacewalk-data-fsck -v -r &>/tmp/spacewalk-data-fsck.output
satellite-sync &>/tmp/satellite-sync.output
EOF
chmod 755 /usr/local/sbin/satellite-integrity-checker.sh
ln -s
/usr/local/sbin/satellite-integrity-checker.sh /etc/cron.weekly/
No comments:
Post a Comment