Cisco Optical Network Controller Installation Guide, Releases 26.x.x

PDF

Cisco Optical Network Controller Installation Guide, Releases 26.x.x

Perform a switchover in a geo-redundant Cisco Optical Network Controller deployment

Want to summarize with AI?

Log in

Use this procedure to perform a switchover in a geo-redundant Cisco Optical Network Controller deployment. It helps you complete the related installation workflow and confirm the deployment state before continuing.


Switch active and standby roles in a geo-redundant deployment.

Use this procedure when you need to move the active role to another cluster.

Before you begin

  • Verify that a geo-redundant Cisco Optical Network Controller deployment is configured.

  • Verify that the DB replication is streaming and DB Lag is 0 bytes using the sedo supercluster status command.
    sedo supercluster status
    ┌──────────────────────────────────────────────────────────────────────────────────────┐
    │ Supercluster Status          │
    ├──────────────────┬───────────────────────────────────────────────────────────────────┤
    │ Cluster ID       │ QgQV2uXgP1udqshlIssyTwf3LZzEyRh6I3z5MH8almA                       │
    │ Cluster Name     │ cluster1  │
    │ Cluster Role     │ worker    │
    │ Peers            │ cluster2 (worker, jaWeN9BdXUUTxvofwt6Hukt6OQXIUaqo4NxN6zHYDc)     │
    │                  │ cluster3 (arbitrator, SUCrwqQjXToG5GKBwckcg_CtzgHstQigaEM1X0988E) │
    │ Mode             │ Running   │
    │ Current Active   │ cluster1  │
    │ Previous Active  │           │
    │ Standby Clusters │ cluster2  │
    │ Last Switchover  │           │
    │ Last Failover    │           │
    │ Last Seen        │ controller-0.cluster2: 2025-03-19 11:16:57.051 +0000 UTC          │
    │                  │ controller-0.cluster3: 2025-03-19 11:16:57.047 +0000 UTC          │
    │                  │ controller-0.cluster1: 2025-03-19 11:16:57.051 +0000 UTC          │
    │ Last Peer Error  │           │
    │ Server Error     │           │
    │ DB Replication   │ disconnected │DB Lag           │ 0 bytes   │
    └──────────────────┴───────────────────────────────────────────────────────────────────┘
    

Follow these steps to perform a switchover in a geo-redundant deployment.

Procedure

1.

Run the sedo supercluster switchover <target-active-cluster-name> command and confirm when prompted.

Note
When you perform a dynamic switchover of the active cluster using the sedo supercluster switchover command, the Cisco Optical Network Controller UI may display an HTTP 500 Internal Server Error for up to four minutes while the system stabilizes again.

Example:

nxf@node:~$ sudo sedo supercluster switchover cluster2
Are you sure you want to initiate supercluster switchover to cluster "cluster2"? [y/n]y
The switchover takes place and WebUI displays a message that says Switchover happened. Please refresh the page., and the WebUI update takes about 20 seconds.
2.

Use the sedo supercluster status command to SSH in to the new active node and view the supercluster status.

sedo supercluster status
┌──────────────────────────────────────────────────────────────────────────────────────┐
│ Supercluster Status          │
├──────────────────┬───────────────────────────────────────────────────────────────────┤
│ Cluster ID       │ jaWeN9BdXUUTxvofwt6Hukt6OQXIUaqo4NxN6zHYDc                        │
│ Cluster Name     │ cluster2  │
│ Cluster Role     │ worker    │
│ Peers            │ cluster1 (worker, QgQV2uXgP1udqshlIssyTwf3LZzEyRh6I3z5MH8almA)    │
│                  │ cluster3 (arbitrator, SUCrwqQjXToG5GKBwckcg_CtzgHstQigaEM1X0988E) │
│ Mode             │ Running   │
│ Current Active   │ cluster2  │
│ Previous Active  │ cluster1  │
│ Standby Clusters │ cluster1  │
│ Last Switchover  │ 2025-03-19 11:20:49.705 +0000 UTC     │
│ Last Failover    │           │
│ Last Seen        │ controller-0.cluster1: 2025-03-19 11:24:07.056 +0000 UTC          │
│                  │ controller-0.cluster2: 2025-03-19 11:24:07.058 +0000 UTC          │
│                  │ controller-0.cluster3: 2025-03-19 11:24:07.058 +0000 UTC          │
│ Last Peer Error  │           │
│ Server Error     │           │
│ DB Replication   │ streaming │DB Lag           │ 0 bytes   │
└──────────────────┴───────────────────────────────────────────────────────────────────┘

The DB replication status changes from disconnected to streaming as the switchover process progresses. Database replication is complete when the DB Replication status is streaming and DB Lag is 0 bytes.

Note

A switchover alarm is raised by Cisco Optical Network Controller during the switchover process. The alarm is cleared after the switchover. You can see the alarm details under Alarm History in the alarms app.

3.

(Optional) Use the raft API to get the supercluster status.

Example:

nxf@node:~$ kubectl exec -it onc-devicemanager-service-0 -- curl -X GET http://controller.nxf-system.svc.cluster.local/api/v1/raft/status

The API response gives you the information from the sedo supercluster status command.

  • Do not perform a switchover until the DB replication status is Streaming and DB Lag is 0 bytes after the previous switchover. This typically takes five minutes. Performing a switchover before replication is fully synchronized can result in data loss or data corruption.

  • If you perform a switchover while a delete operation was in progress, you must repeat the deleted operation on the new active after the switchover. This restriction applies to node and circuit delete operations.

  • If the active cluster goes down for some reason, a failover takes place. During a failover, the web UI becomes unavailable for up to a minute, and the system raises the switchover alarm.

The active role switches to the target cluster and status reflects the change.