Cassandra

MidoNet exchanges connection tracking and NAT information directly between its Agents, but also stores this data in Cassandra as a backup.

Whilst normal packet processing does not require access to Cassandra, it is necessary to support port migrations and to keep connections working across Agent reboots. Agents pull this information from Cassandra anytime they bind a new local interface to the virtual topology.

If you do not rely on above, a full data backup of Cassandra is not required.

 Backup

  1. Stop Cassandra

    On all NSDB nodes, stop the Cassandra service:

    Ubuntu:

    # service cassandra stop

    RHEL:

    # systemctl stop cassandra.service
  2. Backup Cassandra Configuration

    On all NSDB nodes, make a copy of the Cassandra configuration:

    Ubuntu:

    # cp /etc/cassandra/cassandra.yaml /tmp/cass_backup/config/

    RHEL:

    # cp /etc/cassandra/conf/cassandra.yaml /tmp/cass_backup/config/
  3. Backup Cassandra Data

    On all NSDB nodes, make a copy of the Cassandra data:

    # cp -r /var/lib/cassandra/* /tmp/cass_backup/data/
  4. Restart Cassandra

    On all NSDB nodes, start the Cassandra service:

    # service cassandra start
    # systemctl start cassandra.service

 Restore

  1. Stop Cassandra

    On all NSDB nodes, stop the Cassandra service:

    # service cassandra stop
    # systemctl stop cassandra.service
  2. Restore Cassandra Configuration

    On all NSDB nodes, restore the Cassandra configuration from your backup:

    Ubuntu:

    # cp /tmp/cass_backup/config/cassandra.yaml /etc/cassandra/

    RHEL:

    # cp /tmp/cass_backup/config/cassandra.yaml /etc/cassandra/conf/
  3. Restore Cassandra Data

    On all NSDB nodes, restore the Cassandra data from your backup:

    # rm -r /var/lib/cassandra/*
    # cp -r /tmp/cass_backup/data/* /var/lib/cassandra/
  4. Restart Cassandra

    On all NSDB nodes, start the Cassandra service:

    Ubuntu:

    # service cassandra start

    RHEL:

    # systemctl start cassandra.service
  5. Verify Cassandra Operation

    On all NSDB nodes, verify that Cassandra is operating properly.

    A basic check can be done by executing the nodetool status command. This will reply with UN (Up / Normal) in the first column if the servers are running in a non-error state:

    $ nodetool --host 127.0.0.1 status
    [...]
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    --  Address    Load       Tokens  Owns   Host ID                               Rack
    UN  192.0.2.1  123.45 KB  256     33.3%  11111111-2222-3333-4444-555555555555  rack1
    UN  192.0.2.2  234.56 KB  256     33.3%  22222222-3333-4444-5555-666666666666  rack1
    UN  192.0.2.3  345.67 KB  256     33.4%  33333333-4444-5555-6666-777777777777  rack1
Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.


loading table of contents...