How do I perform an auxiliary database switchover?

Purpose
CAUTION 

CAUTION

Data Loss

Performing an auxiliary database switchover may result in an data-collection interruption of up to 30 minutes.

Ensure that you perform the switchover directly after the completion of the most recent copy-cluster operation, as described in the procedure.

Perform this procedure to switch the primary and standby roles of a geo-redundant auxiliary database.

The switchover operation can be performed only when all standby nodes are up and the copy-cluster operation is successful; the copy cluster status is not copy failed, copying, or unavailable.

If the auxiliary database backup is running, the switchover operation must not be performed until the backup is complete.

Steps
Perform an auxiliary database switchover from the NSP UI
 

As an NSP administrator, choose System Health from the NSP main menu on the NSP UI.


Go to the Auxiliary Database Clusters section.


Review the copy cluster status information.

If a copy-cluster operation is in progress, wait until the operation completes.

If not, identify the most recent copy-cluster completion time.

Note: To minimize data loss during a switchover, you must perform the switchover as soon as possible after the completion of a copy-cluster operation.


Click the Show nodes button in the standby cluster section.

Review the status information to confirm all standby cluster nodes statuses are ready.


Hover over the png1.png More icon on the right side of the cluster and Make active.

A warning dialog box appears.


Click Proceed to continue with the switchover.

Wait about 10 minutes.

The roles reverse; the former standby cluster assumes the primary role.

End of steps

Steps
Perform an auxiliary database switchover in a CLI
 

Log in to a station that has access to the NSP system.


Open a console window.


A copy-cluster operation is invoked every 30 minutes to replicate the recent data from the primary to the standby auxiliary database cluster.

You must identify the status of the most recent copy-cluster operation in order to determine when to perform the switchover.

Issue the following RESTCONF API call:

Note: In order to issue a RESTCONF API call, you require a token; see the My First NSP API Client tutorial on the Network Developer Portal for information.

GET https://address/restconf/data/auxdb:/auxdb-agent

where address is the NSP advertised address

The auxiliary database cluster status is displayed; a copy-cluster operation is in progress when the status is RUNNING, and is complete when the status is SUCCESS.


Review the status information; if a copy-cluster operation is in progress, return to Step 3; otherwise, identify the most recent copy-cluster completion time.

Note: To minimize data loss during a switchover, you must perform the switchover as soon as possible after the completion of a copy-cluster operation.


Issue the following RESTCONF API call:

GET https://address/restconf/data/auxdb:/clusters

where address is the NSP advertised address

The auxiliary database cluster node status is displayed; a standby cluster node is reachable when the node status is READY, and is unreachable when the node status is DOWN.


Review the status information to confirm all standby cluster nodes statuses are ready.


Plan to perform the auxiliary database switchover as soon as possible after the completion of a copy-cluster operation.


At the time planned in Step 7, perform the switchover by issuing the following RESTCONF API call:

POST https://address/restconf/data/auxdb:/clusters/cluster=cluster_ID/activate

where

address is the NSP advertised address

cluster_ID is the target-cluster value in the Step 3 command output

The request body is required to send the call to switch over now:

{

    "auxdb:input" : {

    }

}

End of steps