Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • NMIS 9.4.0
  • opAddress 2.2.0
  • opCharts 4.4.0
  • opConfig 4.4.0
  • opEvents 4.2.0
  • opHA 3.5.0
  • opReports 4.4.0

Note: opReports and Open-AudIT do not use MongoDB.

...

Table of Contents


The Process

The process is structured as follows:

  1. Prerequisites
  2. Upgrade Preparation
  3. Upgrade from MongoDB 3.4 to MongoDB 4.2
  4. Services Restart
  5. Clean-up

Prerequisites for Upgrading MongoDB 3.4 to MongoDB 4.2

...

This command does not do anything however, the output will show us the running shell and server that is running.

mongo -u <username> -p <password> --authenticationDatabase=admin --eval 'quit()' | grep MongoDB

Result will look like below, we are looking for the two version numbers to be 3.4.x

If the versions do not match there may be an issue with your running installation and you should not proceed until this is resolved.

MongoDB shell version v3.4.24
MongoDB server version: 3.4.24

MongoDB Storage Engine

Verify storage engine by running

mongo -u <username> -p <password> --authenticationDatabase=admin --quiet --eval 'db.serverStatus().storageEngine'

The "name" line should have "wiredTiger" in order to proceed.

{
        "name" : "wiredTiger",
        "supportsCommittedReads" : true,
        "readOnly" : false,
        "persistent" : true
}

If this mongo cli command does not work you can try the following to determine the storage engine in use

grep -i "active storage" /var/log/mongodb/mongod.log

Example correct log output - notice the log entry declares the storage engine to be using "wiredTiger"

2022-06-28T07:53:33.568+0000 I -        [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.

If the system is not using wiredTiger the data migration process should follow a different process. Refer to the following link.

...

An example of the update/upgrade cycle for Ubuntu Linux is as follows:

apt-get update && apt-get upgrade -y

Check for any errors and address as required.

...

The following commands are used to complete this task

/usr/local/omk/bin/checkomkdaemons.sh stop
systemctl stop nmis9d

These commands offer minimal feedback, confirm that the nmis9d process has halted as follows:
Example Command and Output

user@servername:~/installers# systemctl status nmis9d
● nmis9d.service - Opmantek NMIS9 Daemon
     Loaded: loaded (/etc/systemd/system/nmis9d.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Fri 2022-07-01 00:31:59 UTC; 1min 31s ago
    Process: 8852 ExecStart=/usr/local/nmis9/bin/nmisd (code=exited, status=0/SUCCESS)
   Main PID: 8856 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 9528)
     Memory: 26.4M
     CGroup: /system.slice/nmis9d.service
 
Jul 01 00:30:14 ferny systemd[1]: Starting Opmantek NMIS9 Daemon...
Jul 01 00:30:15 ferny systemd[1]: Started Opmantek NMIS9 Daemon.
Jul 01 00:31:58 ferny systemd[1]: Stopping Opmantek NMIS9 Daemon...
Jul 01 00:31:59 ferny systemd[1]: nmis9d.service: Succeeded.
Jul 01 00:31:59 ferny systemd[1]: Stopped Opmantek NMIS9 Daemon.


Upgrade from MongoDB 3.4 to MongoDB 4.2

...

The following commands are used to complete this task

/usr/local/omk/bin/checkomkdaemons.sh start
systemctl start nmis9d

You can now browse to your instance of NMIS:

...