Page MenuHomePhabricator

switchover.py

Authored By
jcrespo
Jun 13 2018, 10:35 AM
Size
1 KB
Referenced Files
None
Subscribers
None

switchover.py

jynus@merida:~/wmfmariadbpy/wmfmariadbpy$ sudo python3 switchover.py 127.0.0.1 127.0.0.1:3311
Setting master in read only mode...
Waiting for replica to catch up...
Slave caught up to the master after waiting 0.002250194549560547 seconds
Servers sync at master: merida-bin.000004:343 slave: merida-bin.000004:343
Stopping slave...
Setting up replica as read-write...
All commands where successful, current status: original master read_only: 1 / original slave read_only: 0
Trying to invert replication direction...
All switchover steps were successful
jynus@merida:~/wmfmariadbpy/wmfmariadbpy$ sudo python3 switchover.py 127.0.0.1:3311 127.0.0.1
Setting master in read only mode...
Waiting for replica to catch up...
Slave caught up to the master after waiting 0.0023310184478759766 seconds
Servers sync at master: merida-bin.000004:343 slave: merida-bin.000004:343
Stopping slave...
Setting up replica as read-write...
All commands where successful, current status: original master read_only: 1 / original slave read_only: 0
Trying to invert replication direction...
All switchover steps were successful

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6020823
Default Alt Text
switchover.py (1 KB)

Event Timeline