Red Hat has released RHN Satellite version 5.5. It is a release that is mainly a bug-fix release, but has some interesting new features as well. Here comes a brief guide how to update your RHN Satellite to the latest version. It is not a official guide, so if you trash your Satellite, it is not my fault…
As always, before you upgrade the RHN Satellite, you need to order a new certificate. Open a Support case at Red Hat and tell them you need a new certificate for Version .5.5.
You also need to download the ISO file for the upgrade as the packages are only available in the software channel after the upgrade and activation. You can download the ISO at Red Hats download site. Of course you need to choose the architecture that matches your environment. Note that there is only one ISO available for each architecture, not two as it was before. The ISO comes with the embedded database. If you need to use an external database, use the
--external-db parameter with
Ensure you have a working backup of your database before starting with the upgrade. Do this as follows:
su - oracle db-control backup /your/back/up/directory db-control verify /your/back/up/directory
A backup of your
/etc/rhn directory is also a good idea, just for the case something is going wrong:
cp -rp /etc/rhn /etc/rhn-$(date +"%F")
Ensure your database has enough free table space left. For the DATA_TBS and the UNDO_TBS it should be at least 1Gbyte, better are 2Gbyte. The following example shows an example:
[root@rhns ~]# su - oracle -bash-4.1$ db-control report Tablespace Size Used Avail Use% DATA_TBS 16.1G 12.6G 3.5G 78% SYSAUX 500M 182.6M 317.3M 37% SYSTEM 400M 254.1M 145.8M 64% TEMP_TBS 1000M 0B 1000M 0% UNDO_TBS 3.9G 474.7M 3.4G 12% USERS 128M 64K 127.9M 0% -bash-4.1$
You can grow the table spaces if needed by fire
db-control extend UNDO_TBS.
It is also very important to have enoght free space in the /rhnsat filesystem, db-control gather-stats needs some extra space. At least 2 Gbyte to be on the safe side.
Having a look to the official upgrade guide is strongly recommended.
First you need to loop-back mount the ISO image and
cd into the mountpoint:
[root@rhns ~]# mount satellite-5.5.0-20120911-rhel-6-x86_64.iso /mnt -o loop [root@rhns ~]# cd /mnt [root@rhns mnt]#
Next step is to install the rhn-upgrade package.
[root@rhns mnt]# yum -y install rhn-upgrade Loaded plugins: product-id, rhnplugin, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package rhn-upgrade.noarch 0:126.96.36.199-1.el6sat will be installed --> Finished Dependency Resolution Dependencies Resolved ===================================================================================================== Package Arch Version Repository Size ===================================================================================================== Installing: rhn-upgrade noarch 188.8.131.52-1.el6sat redhat-rhn-satellite-5.4-server-x86_64-6 38 k Transaction Summary ===================================================================================================== Install 1 Package(s) Total download size: 38 k Installed size: 0 Downloading Packages: rhn-upgrade-184.108.40.206-1.el6sat.noarch.rpm | 38 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : rhn-upgrade-220.127.116.11-1.el6sat.noarch 1/1 Installed products updated. Verifying : rhn-upgrade-18.104.22.168-1.el6sat.noarch 1/1 Installed: rhn-upgrade.noarch 0:22.214.171.124-1.el6sat Complete! [root@rhns mnt]#
The package contains documents and scripts to help you with the upgrade. They are located in the directory
/etc/sysconfig/rhn/satellite-upgrade. Read those documents carefully before proceeding with the upgrade.
Lets do it… run the installer script with the
--upgrade parameter, bold red letters are interactive input.
[root@rhns mnt]# ./install.pl --upgrade * Starting the Red Hat Network Satellite installer. * Performing pre-install checks. * Pre-install checks complete. Beginning installation. * RHN Registration. ** Registration: System is already registered with RHN. Not re-registering. * Upgrade flag passed. Stopping necessary services. * Purging conflicting packages. * Checking for uninstalled prerequisites. ** Checking if yum is available ... There are some packages from Red Hat Enterprise Linux that are not part of the @base group that Satellite will require to be installed on this system. The installer will try resolve the dependencies automatically. However, you may want to install these prerequisites manually. Do you want the installer to resolve dependencies [y/N]? y * Applying updates. * Installing RHN packages. Warning: yum did not install the following packages: geronimo-specs-compat * Now running spacewalk-setup. * Setting up Oracle environment. * Setting up database. ** Database: Upgrading the database server to latest Oracle 10g: ** Database: This is a long process that is logged in: ** Database: /var/log/rhn/upgrade_db.log *** Progress: ############################################################## ** Database: Setting up database connection for Oracle backend. ** Database: Testing database connection. ** Database: Populating database. ** Database: Skipping database population. * Setting up users and groups. ** GPG: Initializing GPG and importing key. * Performing initial configuration. * Activating RHN Satellite. ** Certificate not activated. ** Upgrade process requires the certificate to be activated after the schema is upgraded. * Enabling Monitoring. * Configuring apache SSL virtual host. Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? y * Configuring tomcat. ** /etc/tomcat6/tomcat6.conf has been backed up to tomcat6.conf-swsave ** /etc/tomcat6/server.xml has been backed up to server.xml-swsave Reversed (or previously applied) patch detected! Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file web.xml.rej * Configuring jabberd. * Creating SSL certificates. ** Skipping SSL certificate generation. * Deploying configuration files. * Update configuration in database. * Setting up Cobbler.. cobblerd does not appear to be running/accessible Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]? y cobblerd does not appear to be running/accessible This portion of the RHN Satellite upgrade process has successfully completed. Please refer to appropriate upgrade document in /etc/sysconfig/rhn/satellite-upgrade for any remaining steps in the process. [root@rhns mnt]#
Now some database actions are needed. Make sure your Satellite is stopped and only the database is running:
service oracle start
You need to create schema statistics:
su - oracle -bash-4.1$ db-control gather-stats Gathering statistics... WARNING: this may be a very slow process. done. -bash-4.1$
Now it is time to upgrade the database schema
[root@rhns mnt]# spacewalk-schema-upgrade Schema upgrade: [satellite-schema-126.96.36.199-1.el6sat] -> [satellite-schema-188.8.131.52-1.el6sat] Searching for upgrade path: [satellite-schema-184.108.40.206-1] -> [satellite-schema-220.127.116.11-1] Searching for upgrade path: [satellite-schema-18.104.22.168] -> [satellite-schema-22.214.171.124] Searching for upgrade path: [satellite-schema-5.4.0] -> [satellite-schema-5.5.0] Searching for upgrade path: [satellite-schema-5.4] -> [satellite-schema-5.5] The path: [satellite-schema-5.4] -> [satellite-schema-5.5] Planning to run spacewalk-sql with [/var/log/spacewalk/schema-upgrade/20120922-132500-script.sql] Hit Enter to continue or Ctrl+C to interrupt: Enter Executing spacewalk-sql, the log is in [/var/log/spacewalk/schema-upgrade/20120922-132500-to-satellite-schema-5.5.log]. The database schema was upgraded to version [satellite-schema-126.96.36.199-1.el6sat]. [root@rhns mnt]#
Now it is time to activate your RHN Satellite to be able to receive updates for the Satellite and running satellite-sync
[root@rhns ~]# rhn-satellite-activate --ignore-version-mismatch --rhn-cert=/root/rhns-cert55.cert RHN_PARENT: satellite.rhn.redhat.com [root@rhns ~]#
To rebuild the search index please run
service rhn-search cleanindex
[root@rhns ~]# service rhn-search cleanindex Stopping rhn-search... rhn-search was not running. Starting rhn-search... [root@rhns ~]#
Before restarting the RHN Satellite, check if any updates are available for it.
yum -y update
Afterward, please check if there is another database schema update available. If the output looks as following, you are safe.
[root@rhns ~]# spacewalk-schema-upgrade Schema upgrade: [satellite-schema-188.8.131.52-1.el6sat] -> [satellite-schema-184.108.40.206-1.el6sat] Your database schema already matches the schema package version [satellite-schema-220.127.116.11-1.el6sat]. [root@rhns ~]#
As a verification that the upgrade is fine, run a
satellite-sync to sync some new content and update a registered server. If you have more than one Satellite, run a ISS (Inter Satellite Sync) for proofing its functionality.
If something goes wrong with the database update, before reverting to a backup, first check the Oracle alert file
/rhnsat/admin/rhnsat/bdump/alert_rhnsat.log to figure out what went wrong. Another good place to have a look at are the trace files located in