Follow

InfiniMetrics 1.8.x VMs are running on Ubuntu 14.04, while previous versions were using Ubuntu 10.04. Since the upgrade mechanism cannot perform this OS upgrade, use the procedure below to upgrade manually.

Data that were collected by an existing InfiniMetrics VM is preserved.

Step-by-step guide

On the existing InfiniMetrics VM:

  1. SSH to the VM as root, password is nfinidat1
  2. Stop the metrics collection services: manage infinimetrics_services stop

  3. Dump the whole database to file: su - postgres -c "pg_dumpall -c -v -f /tmp/db.sql"

Moving to the new VM:

  1. Install a new InfiniMetrics 1.8.x VM
  2. SSH to the new VM as root, password is nfinidat1
  3. Copy the database dump: scp old-infinimetrics-vm:/tmp/db.sql /tmp/db.sql
  4. Stop the web server: service gunicorn stop
  5. Restore the database: su - postgres -c "psql -f /tmp/db.sql"   (warning) This can take a while

  6. The following steps are needed specifically for version 1.5.0 (skip if you were using 1.5.1 or later): 
    1. Open an ipython shell: manage shell
    2. Enter the following command: %cpaste

    3. Paste the script listed below into the shell, including the two dashes on the last line. The script will run and perform some database schema updates.

    4. Exit the shell by pressing Ctrl+D
  7. Apply remaining database schema changes and other updates: infinimetrics setup    (warning) This can take a while

  8. Visit the new InfiniMetrics's GUI via your browser.
    If the metrics collection service is not running for any of the systems: 
    1. Click the message and then the "Try to fix" button.
    2. Verify that all systems are showing the old data, and new data is being collected.

Python script for step 6:

from django.db import connections
from infinimetrics.infinibox_stats.models import *
for alias in connections:
    if alias != 'default':
        print alias
        try:
            with connections[alias].schema_editor() as schema_editor:
                schema_editor.create_model(MonitoredCacheStats)
                schema_editor.create_model(CacheStats)
                schema_editor.remove_field(CacheStats, CacheStats._meta.fields[3])
                schema_editor.create_model(MonitoredDestageStats)
                schema_editor.create_model(DestageStats)
                schema_editor.remove_field(DestageStats, DestageStats._meta.fields[3])
        except:
            print '   FAILED - perhaps a rerun'
--
 
Was this article helpful?
0 out of 0 found this helpful

0 out of 0 found this helpful

Comments