You are here: RPM Installation > Upgrading > Upgrading Moab Accounting Manager (RPM)

3.26 Upgrading Moab Accounting Manager (RPM)

This topic provides instructions to upgrade Moab Accounting Manager to the latest release version using the RPM upgrade method. It includes instructions for migrating your database schema to a new version if necessary.

Because many system-level files and directories are accessed during the installation, the instructions in this guide should be executed with root privileges.

You will see that the instructions execute commands as the root user. Please note that the same commands will work for a non-root user with the sudo command.

3.26.1 Upgrade Steps

Do the following:

  1. If you installed MAM Server on its own host or if MAM Server is the first component being upgraded on a host with other RPM installations, complete the steps to prepare the host.

    Do the same as needed for the MAM GUI Host and each MAM Client Host.

    See 3.19 Preparing for RPM Upgrades for more information.

  2. Upgrade MAM Server. See 3.26.2 Upgrade MAM Server.
  3. Upgrade MAM GUI. See 3.26.2.A Upgrade Remote MAM GUI.
  4. Upgrade MAM Web Services. See 3.26.2.B Upgrade Remote MAM Web Services.
  5. Upgrade MAM Clients. See 3.26.2.C Upgrade Remote MAM Clients.

3.26.2 Upgrade MAM Server

You must complete all the previous upgrade steps in this topic before upgrading MAM Server. See the list of steps at the beginning of this topic.

On the MAM Server Host, do the following:

  1. Stop MAM.
    [root]# service mam stop
  2. Install the upgrade.

    The MAM RPM name has changed between version 8.1 and 9.0. The RPM obsoleted process removes the old RPM and installs the new RPM separately; this results in removing the mam user and not preserving the customized configuration files. A special process must be followed when upgrading from an RPM version prior to 9.0.

    • If you are upgrading MAM from an RPM version prior to 9.0, do the following:
      for i in /opt/mam/etc/{gold,goldd,goldg,site}.conf
      do
      cp -p ${i} ${i}.rpmsave
      done
      rpm -e --nopostun moab-hpc-enterprise-suite moab-hpc-accounting-manager
      yum install moab-accounting-manager
      for i in /opt/mam/etc/mam-*.conf
      do
      cp -p ${i} ${i}.rpmnew
      done
      \cp -f /opt/mam/etc/gold.conf.rpmsave /opt/mam/etc/mam-client.conf
      \cp -f /opt/mam/etc/goldd.conf.rpmsave /opt/mam/etc/mam-server.conf
      \cp -f /opt/mam/etc/goldg.conf.rpmsave /opt/mam/etc/mam-gui.conf
      					\cp -f /opt/mam/etc/site.conf.rpmsave /opt/mam/etc/mam-site.conf
    • If you are upgrading MAM from an RPM version at or after 9.0, do the following:
      [root]# yum update moab-accounting-manager
    • If installing on RHEL, you may need to enable optional RHEL repositories in order to find some of the dependent packages.

      For example (for the current RHEL 7 repositories):

      [root]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
      [root]# yum install yum-utils
      [root]# yum-config-manager --disable epel
      [root]# yum install --enablerepo=epel,rhel-7-server-optional-rpms moab-accounting-manager
  3. Compare your existing configuration files (/opt/mam/etc/mam‑*.conf) with those distributed with the new release (/opt/mam/etc/mam‑*.conf.rpmnew) and merge the differing lines into your configuration files.
  4. Start the mam service.
    [root]# service mam start
  5. If you are upgrading MAM from a version prior to 8.0, add the new mam user as a MAM Accounting Admin.
    [root]# su -c "mam-create-user -u mam -d \"Accounting Admin\"" moab
    [root]# su -c "mam-modify-role -r SystemAdmin --add-user mam" moab
    [root]# perl -p -i -e 's/moab/mam/ if /^super.user/' /opt/mam/etc/mam-server.conf
  6. If your PostgreSQL database version is prior to version 9.1, update the postgresql configuration to avoid interpreting backslashes as escape characters.
    [root]# vi /var/lib/pgsql/data/postgresql.conf
    				
    standard_conforming_strings = on
    
    [root]# service postgresql restart
  7. If upgrading MAM from a version prior to 9.1, migrate the Moab Accounting Manager database from your current version to 9.1.
    1. Run one or more migration scripts. You must run every incremental migration script between the version you are currently using and the new version (9.1). The migration scripts are located in the /usr/share/moab-accounting-manager/ directory. These scripts are designed to be rerunnable, so if you encounter a failure, resolve the failure and rerun the migration script. If you are unable to resolve the failure and complete the migration, contact Support.

      The migration scripts must be run as the mam user.

      For example, if you are migrating from Moab Accounting Manager version 7.2, you must run six migration scripts: the first to migrate the database schema from 7.2 to 7.3, the second to migrate from 7.3 to 7.5, the third to migrate the database schema from 7.5 to 8.0, the fourth to migrate the database schema from 8.0 to 8.1, the fifth to migrate the database schema from 8.1 to 9.0, and the sixth to migrate the database schema from 9.0 to 9.1.

      [root]# su - mam
      
      [mam]$ /usr/share/moab-accounting-manager/migrate_7.2-7.3.pl
      [mam]$ /usr/share/moab-accounting-manager/migrate_7.3-7.5.pl
      [mam]$ /usr/share/moab-accounting-manager/migrate_7.5-8.0.pl
      [mam]$ /usr/share/moab-accounting-manager/migrate_8.0-8.1.pl
      [mam]$ /usr/share/moab-accounting-manager/migrate_8.1-9.0.pl
      [mam]$ /usr/share/moab-accounting-manager/migrate_9.0-9.1.pl
    2. Verify that the resulting database schema version is 9.1.

      [mam]$ mam-shell System Query
      
      Name                    Version Description
      ----------------------- ------- ------------------
      Moab Accounting Manager 9.1     Commercial Release
  8. Verify that the executables have been upgraded to 9.1.0.

    [mam]$ mam-server -v
    
    Moab Accounting Manager version 9.1.0
  9. If you are upgrading MAM from a version prior to 9.1.0, and you wish to use MAM Web Services, perform the following procedure:

3.26.2.A Upgrade Remote MAM GUI

If you are using the MAM GUI and the MAM GUI Host is different from the MAM Server Host, then do the following on the MAM GUI Host:

  1. Install the upgrade.
    • If you are upgrading the MAM RPM from a version prior to 9.0, do the following:
      cp -p /opt/mam/etc/goldg.conf /opt/mam/etc/goldg.conf.rpmsave
      rpm -e --nopostun moab-hpc-accounting-manager
      yum install moab-accounting-manager
      cp -p /opt/mam/etc/mam-gui.conf /opt/mam/etc/mam-gui.conf.rpmnew
      \cp -f /opt/mam/etc/goldg.conf.rpmsave /opt/mam/etc/mam-gui.conf
    • If you are upgrading the MAM RPM from a version at or after 9.0, do the following:
      [root]# yum update moab-accounting-manager
  2. Compare your current gui configuration file (/opt/mam/etc/mam-gui.conf) with the one distributed with the new release (/opt/mam/etc/mam-gui.conf.rpmnew) and merge the differing lines into your current configuration file.

3.26.2.B Upgrade Remote MAM Web Services

If you are using MAM Web Services and the MAM Web Services Host is different from the MAM Server Host, then do the following on the MAM Web Services Host:

  1. Install the upgrade.
    [root]# yum update moab-accounting-manager
  2. Compare your current web services configuration file (/opt/mam/etc/mam-ws.conf) with the one distributed with the new release (/opt/mam/etc/mam-ws.conf.rpmnew) and merge the differing lines into your current configuration file.
  3. Restart the HTTP server daemon.
    [root]# service httpd restart

3.26.2.C Upgrade Remote MAM Clients

If you are have any MAM Client Hosts that are different from the MAM Server Host or MAM GUI Hosts, then do the following on each MAM Client Host:

  1. Install the upgrade.
    • If you are upgrading the MAM RPM from a version prior to 9.0, do the following:
      cp -p /opt/mam/etc/gold.conf /opt/mam/etc/gold.conf.rpmsave
      rpm -e --nopostun moab-hpc-accounting-manager
      yum install moab-accounting-manager
      cp -p /opt/mam/etc/mam-client.conf /opt/mam/etc/mam-client.conf.rpmnew
      \cp -f /opt/mam/etc/gold.conf.rpmsave /opt/mam/etc/mam-client.conf
    • If you are upgrading the MAM RPM from a version at or after 9.0, do the following:
      [root]# yum update moab-accounting-manager
  2. Compare your current client configuration file (/opt/mam/etc/mam-client.conf) with the one distributed with the new release (/opt/mam/etc/mam-client.conf.rpmnew) and merge the differing lines into your current configuration file.

© 2016 Adaptive Computing