6.46 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.

6.46.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.
  2. Do the same as needed for the MAM GUI Host and each MAM Client Host.

    See 6.31 Preparing the Host – Typical Method or 6.30 Preparing the Host – Offline Method.

  3. Upgrade MAM Server. See 6.46.1.A Upgrade MAM Server.
  4. Upgrade MAM GUI. See 6.46.1.B Upgrade MAM GUI.
  5. Upgrade MAM Clients. See 6.46.1.C Upgrade MAM Clients.

6.46.1.A 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
    [root]# systemctl stop mam.service
    [root]# systemctl stop mam.service
  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*
    [root]# zypper update 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
    [root]# systemctl daemon-reload
    [root]# systemctl start mam.service
    [root]# systemctl daemon-reload
    [root]# systemctl start mam.service
  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. Migrate the Moab Accounting Manager database from your current version to 9.0, running the migration script.
    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.0). 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 five 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, and the fifth to migrate the database schema from 8.1 to 9.0.

      [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
    2. Verify that the resulting database schema version is 9.0.

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

      [mam]$ mam-server -v
      
      Moab Accounting Manager version 9.0.3

6.46.1.B Upgrade 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*
    [root]# zypper 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.

6.46.1.C Upgrade 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*
    [root]# zypper 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.

© 2017 Adaptive Computing