cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
975
Views
4
Helpful
3
Replies

Verifying whether CDB is in sync

mareis
Cisco Employee
Cisco Employee

In an HA setup, what would be the best way to identify that CDB is in sync? Is ‘waiting-for-replication-sync=false’ from ‘sh ncs-state datastore running’ on the master a reliable way to tell that? Should we compare the transaction-ids?

1 Accepted Solution

Accepted Solutions

Jan Lindblad
Cisco Employee
Cisco Employee

Yes, if the CDBs give you the same transaction ID, then they are in sync. Or at least they were. As always, this may have changed by the time you have figured out that they were in sync

waiting-for-replication-sync should be a good indicator at most times, but I guess there are corner cases where the CDBs may be out of sync even when the master is not waiting for sync to happen. E.g. initially before the slave relationship has been fully established or if it has ended (slave evicted).

As long as you leave the HA sync/async mode in nso.conf in sync mode (default), the CDB instances will never be further apart than at most one transaction, and NSO can replay that transaction if required.

Don't set HA to async mode unless you know perfectly well what you are doing. You might be building a Low Availability system instead :/


View solution in original post

3 Replies 3

Jan Lindblad
Cisco Employee
Cisco Employee

Yes, if the CDBs give you the same transaction ID, then they are in sync. Or at least they were. As always, this may have changed by the time you have figured out that they were in sync

waiting-for-replication-sync should be a good indicator at most times, but I guess there are corner cases where the CDBs may be out of sync even when the master is not waiting for sync to happen. E.g. initially before the slave relationship has been fully established or if it has ended (slave evicted).

As long as you leave the HA sync/async mode in nso.conf in sync mode (default), the CDB instances will never be further apart than at most one transaction, and NSO can replay that transaction if required.

Don't set HA to async mode unless you know perfectly well what you are doing. You might be building a Low Availability system instead :/


Thank you Jan. This is in the context of forcing a switchover for maintenance purposes. In order to avoid what you highlighted in the first paragraph, I understand that it is best to set master to RO, then check sync status before proceeding with the switchover.

Yes, sounds like a good idea, in order to raise the dependability/avoid a race condition. And if that waiting-for-replication-sync is true, you can be pretty sure they are (were) not in sync. You can probably have that as a first check before you even turn the node RO.