OpenContrail 3.2: Restore the Cassandra database

OpenContrail 3.2: Restore the Cassandra databaseΒΆ

You may need to restore the Cassandra database after a hardware or software failure.

To restore the Cassandra database:

  1. Log in to the Salt Master node.

  2. Add the following lines to cluster/opencontrail/control_init.yml:

    cassandra:
      backup:
        client:
          enabled: true
          restore_latest: 1
          restore_from: remote
    

    where:

    • restore_latest can have, for example, the following values:
      • 1, which means restoring the database from the last complete backup.
      • 2, which means restoring the database from the second latest complete backup.
    • restore_from can have the local or remote values. The remote value uses scp to get the files from the cassandra server.
  3. Restore the Cassandra database using the Jenkins web UI:

    1. Add the upgrade pipeline to DriveTrain:

      1. Add the following lines to cluster/cicd/control/leader.yml:

        classes:
        - system.jenkins.client.job.deploy.update.restore_cassandra
        
      2. Run the salt -C 'I@jenkins:client' state.sls jenkins.client state.

    2. Log in to the Jenkins web UI.

    3. Open the cassandra - restore pipeline.

    4. Specify the following parameters:

      Parameter Description and values
      SALT_MASTER_CREDENTIALS The Salt Master credentials to use for connection, defaults to salt.
      SALT_MASTER_URL The Salt Master node host URL with the salt-api port, defaults to the jenkins_salt_api_url parameter. For example, http://172.18.170.27:6969.
    5. Click Deploy.