Given an existing EMG 7.1 installation, the following steps provide an upgrade to EMG 7.2. This can be done in multiple phases. It requires an active support agreement with an updated license file. All commands should be run as the user "emg", or the non-root user used for the EMG installation.
Everything in this section can be done in advance, without disturbing the existing installation.
- Add BACKEND=TC in the top part of the server.cfg file. This ensures EMG 7.2 will use the existing storage backend, in case you want to downgrade back to EMG 7.1.
- Do not add DLR_TO_SAME_IP yet.
- Make sure the current emgd binary is called emgd-7.1.x-nnnnn or something similar, where x and nnnnn matches the output from "emgd -v".
- Download the new EMG binaries, and unpack them in a new directory.
- Copy the new binaries into the bin directory, renaming them from emgXXX into emgXXX-7.2.0-50785, again using the exact version information from "emgd -v" from the new binary.
- Copy emgclient, emgd, emgload, emgpdu, emgsend, emgsink and emgstat into the same format emgXXX-7.1.n-nnnnn, using the old version information.
- You can run "emgd -upgradesql" to see the optional database schema updates.
- Check the output from "ulimit -a". The number of open files must be at least twice the total number of connector instances. If this is not the case, run "ulimit -n" to change it. Please also add that command to the /etc/rc.local file, before it starts the EMG Watchdog.
Starting the new version
- Remove emgclient, emgd, emgload, emgpdu, emgsend, emgsink and emgstat, and replace them with symbolic links to the new binaries. Each binary requries a command such as the one below.
rm -f emgd ; ln -s emgd-7.2.0-50785 emgd
- Kill the EMG Watchdog processes.
- Copy all the remaining EMG binaries to $EMGDIR/bin.
- Run "emgd -stop" to stop the currently running emgd.
- Run "emgd".
- Check the log/general for any warnings or errors, and make any necessary adjustments.
- Check the output from "emgstat".
- Restart the EMG Watchdog, using the same command as in /etc/rc.local.
Now you use the new features such as "emgstat --nz" to see only connectors with traffic, and "emgstat --plugin" to see a list of configured plugins and their activity.
Downgrade to EMG 7.1
If there are any significant issues, it is possible to downgrade back to version by simply changing the "emgXXX" symbolic links, pointing to the 7.1 versions. Then run "emgd -stop ; emgd".
The 7.2 tools are backwards compatible with 7.1, so you only need to change "emgd".
Committing to EMG 7.2
At some point in the future, you may want to commit to the new version. After these steps, going back to 7.1 is more difficult.
- To upgrade the database schema, first make a copy of the existing EMG database. This makes it possible to see the time required to run the commands given by "emgd -upgradesql".
- If the time spent is not acceptable, the upgrade may need to be done in multiple steps. Please consult with your local database administrator.
- Comment out the BACKEND line in the server.cfg.
- Now you may set DLR_TO_SAME_IP on the relevant connectors, if needed.
- Change the database sections to use the new format: ADDRESS=username:password@host:port/dbname. This makes it possible to multiple ip's for the same database profile.
- Run "emgd -stop".
- Update the database schema, either by running the commands shown earlier, or by running "emgd -upgradedb".
- Run "emgd".
The existing data will be read from the old files, but everything new will be stored in the new format. These new files are stored in $EMGDIR/spool/leveldb, and the old files are removed automatically when they are empty.