Closed vitalyisaev2 closed 8 years ago
Hi @vitalyisaev2
You can read box.info.replication['status']. I do it like this:
tnt = tarantool.Connection(host, port)
replication_status = tnt.eval("return box.info.replication['status']")
if replication_status != 'follow':
...
@racktear thanks for a prompt response!
If the one would like to create two master-master replicas, how the verification should be performed? Both replicas must return follow
state?
Yes, both replicas should be in the "follow" state.
I use python to set up master-master replication between 2 instances. The only "catch" is that one of the instances must be initially created with box.cfg{replication_source=...} for them to have the same cluster ID. Then I connect to another instance, set up its replication_source dynamically and wait until both replicas switch to "follow" state.
Thanks again. Good point!
Hello, I use
tarantool-python
for the purposes of Tarantool cluster management. I've faced with a misleading (from my point of view) behavior when I setreplication_source
for a particular Tarantool node.But in Tarantool logs I see that the error actually happened:
Since no error was returned, could anyone please explain, if there are any convenient methods in Python API to check that replication really works.
Versions used: