Tuesday 22 October 2013

Upgrade / Install Red Hat Satellite v5.6


  • Documentation:  https://access.redhat.com/site/documentation/Red_Hat_Satellite/
  • Installation Media:  https://rhn.redhat.com/rhn/software/channel/downloads/Download.do?cid=18952
  • RHN Software Channel:   
  • New Satellite Certificate:   https://access.redhat.com/home under Subscriptions → RHN Classic → Entitlements.

Problems with the Official Documentation

  • Manual says to install "rhn-upgrade" package from the "Red Hat Satellite Channel" but it does not say which version of the channel, 5.5 or 5.6.  I am going to assume that the upgrade will subscribe an RHN Connected Red Hat Satellite Server to the new Software Channel, there this must be the ?
  • The upgrade installs the "postgres" package for you but you need the directory /var/lib/pgsql to be owned by postgres with group of postgres and a mode of 0700 and the SELinux context set to "".  Maybe it is easy to pre-emptively install postgres?

Upgrade Red Hat Satellite

"Chapter 6. Upgrades"  of the "Red Hat Satellite 5.6 Installation Guide" covers this process in detail.  My summary is as follows:

  • Update RHEL.
  • Ensure there are no outstanding Red Hat Satellite database schema updates. 
  • Ensure that when the directory /var/lib/pgsql comes to exist it will have sufficient free space to accommodate the equivalent contents of /rhnsat.
  • Install "postgres" package to ensure the correct permissions before the Red Hat Satellite installer can complain about it.
  • Upgrade as per the manual
  • Rebuild the Cobbler Distro Trees:  /etc/sysconfig/rhn/satellite-upgrade/scripts/regenerate-repodata -a
  •  


hmm....sorry run out of time tonight.  maybe later this week!

Monday 21 October 2013

Red Hat Satellite Integrity Checker

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/