...
| Code Block | ||||
|---|---|---|---|---|
| ||||
sudo /usr/local/omk/bin/ophad cmd consumer failover <Poller Cluster ID> |
Scenario 3 : Deleting the nats streams (Main Primary)
All vms: (Main Pri, Sec Pri, Pollers, Mirrors)
Code Block sudo systemctl stop ophadMain Primary: Delete all streams
Code Block nats stream delete --user omkadmin --password op42opha42If jq is installed on Main Primary, this below snippet can be used to automate deletion of all nats streams:
Code Block for stream_name in $(nats stream list --user omkadmin --password op42opha42 --json | jq -r '.[]'); do nats stream rm --force --user omkadmin --password op42opha42 "$stream_name"; doneVerify to check if all streams have been deleted
Code Block nats stream info --user omkadmin --password op42opha42 nats: error: could not pick a Stream to operate on: no Streams are defined
3. All vms (Main Pri, Sec Pri, Pollers, Mirrors) - Restart the services for the changes made to opCommon.json to get reflected.
| Code Block | ||||
|---|---|---|---|---|
| ||||
sudo systemctl restart ophad omkd opeventsd opchartsd |
Scenario 4 : (Replication mode) If the main-primary were to go down in replication mode.
Switching Main and Secondary Primary Servers
...