The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

1.6 Upgrading a Spacewalk Server

To upgrade a Spacewalk 2.0 server to Spacewalk 2.2:

  1. Back up the Spacewalk configuration files in the following directories:

    • /etc/jabberd

    • /etc/rhn

    • /etc/sysconfig/rhn

    • server SSL build directory, typically /root/ssl-build

    For example, you could use the tar command to create a backup:

    # tar -cvf preSWupgrade.tar /etc/jabberd /etc/rhn /etc/sysconfig/rhn /root/ssl-build
  2. Back up the Spacewalk database.

    For more information on how to use the Recovery Manager (RMAN) to create a backup, see:

  3. Disable access to the Spacewalk Server 2.0 packages and enable access to the Spacewalk Server 2.2 packages.

    • If the Spacewalk server is registered as a client of itself:

      1. Create a Spacewalk Server 2.2 channel as a child of the Oracle Linux 6 base channel.

      2. Create a Spacewalk Server 2.2 repository that accesses the Spacewalk Server 2.2 channel on the Oracle Linux yum server (https://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/server/x86_64/), using the same GPG settings as for Oracle Linux 6.

      3. Associate the Spacewalk Server 2.2 repository with the Spacewalk Server 2.2 channel and synchronize the repository's packages from the Oracle Linux yum server.

      4. Change the channel subscription of the Spacewalk server in Spacewalk from the Spacewalk Server 2.0 channel to the Spacewalk Server 2.2 channel.

    • If the Spacewalk server is configured to obtain Spacewalk Server 2.0 packages from the Oracle Linux yum server:

      1. Disable the Spacewalk Server 2.0 repository in the yum repository configuration file, or delete your Spacewalk Server 2.0 .repo file.

      2. Download the latest yum repository configuration file (https://yum.oracle.com/public-yum-ol6.repo) to the yum repositories directory (by default /etc/yum.repos.d) and enable the ol6_spacewalk22_server repository in that file.

        Alternatively, create a yum repository configuration file, for example /etc/yum.repos.d/spacewalk22.repo, with the following content:

        [ol6_spacewalk22_server]
        name=Spacewalk Server 2.2 for Oracle Linux 6 ($basearch)
        baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/server/$basearch/
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
        gpgcheck=1
        enabled=1
  4. Upgrade the Spacewalk packages.

    # yum upgrade

    You can safely ignore any SELinux restorecon messages that are displayed when the packages are installed.

  5. Install the rpmconf package and use the rpmconf command to copy any customizations you want to preserve to the upgraded configuration files.

    # yum install rpmconf
    # rpmconf -a
  6. Stop the Spacewalk services.

    # spacewalk-service stop
    Shutting down spacewalk services...
    Stopping RHN Taskomatic...
    Stopped RHN Taskomatic.
    Stopping cobbler daemon:                                   [  OK  ]
    Stopping rhn-search...
    Stopped rhn-search.
    Shutting down osa-dispatcher:                              [  OK  ]
    Stopping httpd:                                            [  OK  ]
    Stopping tomcat6:                                          [  OK  ]
    Terminating jabberd processes ...
    Stopping s2s:                                              [  OK  ]
    Stopping c2s:                                              [  OK  ]
    Stopping sm:                                               [  OK  ]
    Stopping router:                                           [  OK  ]
    Done.
  7. Upgrade the Spacewalk database schema.

    1. On the Oracle Database server, log in as a database administrator (typically, SYSDBA) and verify that the database is running.

      $ sqlplus / as SYSDBA
      
      SQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 2 11:25:42 2015
      
      Copyright (c) 1982, 2014, Oracle.  All rights reserved.
      
      
      Connected to:
      Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
      With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
      
      SQL>
    2. Grant the additional system privileges CREATE TABLE and CREATE TRIGGER to the Spacewalk database user.

      SQL> grant create table, create trigger to sw_user;

    3. On the Spacewalk server, enter the following command to upgrade the database schema.

      # /usr/bin/spacewalk-schema-upgrade

      The output of the spacewalk-schema-upgrade command confirms whether or not the schema upgrade was successful. In the event of a failure:

      • Check the log files in the /var/log/spacewalk/schema-upgrade directory to establish the cause.

      • Restore the database from the backup.

      • Fix the cause of the problem, for example by extending the tablespaces if there is insufficient space.

      • Upgrade the database schema.

  8. Upgrade the Spacewalk configuration for the Oracle Database.

    # spacewalk-setup --disconnected --external-oracle --upgrade

    If you previously customized the Spacewalk installation, for example in the file /etc/rhn/rhn.conf, restore the customizations from your backup.

  9. (Optional) Enable monitoring and the monitoring scout.

    Note

    Monitoring is a deprecated feature that will be removed in a future release.

    • To enable monitoring without enabling the monitoring scout, enter:

      # /usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl

    • To enable monitoring and the monitoring scout, enter:

      # /usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl --enable-scout

  10. Restart the Spacewalk services.

    # spacewalk-service start
    Starting spacewalk services...
    Initializing jabberd processes ...
    Starting router:                                           [  OK  ]
    Starting sm:                                               [  OK  ]
    Starting c2s:                                              [  OK  ]
    Starting s2s:                                              [  OK  ]
    Starting tomcat6:                                          [  OK  ]
    Waiting for tomcat to be ready ...
    Starting httpd:                                            [  OK  ]
    Starting osa-dispatcher:                                   [  OK  ]
    Starting rhn-search...
    Starting cobbler daemon:                                   [  OK  ]
    Starting RHN Taskomatic...
    Done.