Server 1 Server 2
╔════════════════════╗ ╔════════════════════╗
║ mysql-customer1-p1 ║ ║ mysql-customer1-p2 ║
║ ║ ║ ║
┌─────────┬─╨────────────────────╨────╨────────────────────╨─┐
Cluster 1 │ MYSQLD1 │ MASTER SLAVE │
└─────────┴─╥────────────────────╥────╥────────────────────╥─┘
║ ▲ ║ ║ ▲ ║
4 Instances ────────╫──────────┼─────────╫────╫─────────┤ ║
║ ▼ ║ ║ ▼ ║
┌─────────┬─╨────────────────────╨────╨────────────────────╨─┐
Cluster 2 │ MYSQLD2 │ MASTER SLAVE │
└─────────┴─╥────────────────────╥────╥────────────────────╥─┘
║ ║ ║ ║
╚════════════════════╝ ╚════════════════════╝CREATE DATABASE IF NOT EXISTS meta;
CREATE TABLE IF NOT EXISTS meta.cluster (
anchor TINYINT NOT NULL,
server_alias VARCHAR(128) CHARSET ascii NOT NULL DEFAULT '',
instance_name VARCHAR(128) CHARSET ascii NOT NULL DEFAULT '',
cluster_domain VARCHAR(128) CHARSET ascii NOT NULL DEFAULT '',
repl_user VARCHAR(128) CHARSET ascii NOT NULL DEFAULT '',
repl_pass VARCHAR(128) CHARSET ascii NOT NULL DEFAULT '',
PRIMARY KEY (anchor)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
"DetectClusterAliasQuery": "SELECT CONCAT(server_alias, ':', instance_name) FROM meta.cluster WHERE anchor=1",
"DetectClusterDomainQuery": "SELECT cluster_domain FROM meta.cluster WHERE anchor=1",
"DetectInstanceAliasQuery": "SELECT instance_name FROM meta.cluster WHERE anchor=1", server_name port server_alias instance_alias
╒════════╧═══════╕ ╒═╧═╕ ╒═════════╧════════╕ ╒══╧══╕
mysql-customer1-p1:33005 mysql-customer1-prod:mysqld5
╘═══════════╤══════════╛ ╘═════════════╤════════════╛
instance_name cluster_aliasserver_name server_alias instances_alias
================ ==================== =========================
mysql-customer1-p1 mysql-customer1-prod mysqld1, mysqld2, ...
mysql-customer1-p2 mysql-customer1-prod mysqld1, mysqld2, ...
mysql-customer2-p1 mysql-customer2-prod mysqld1, mysqld2, ...
mysql-customer2-p2 mysql-customer2-prod mysqld1, mysqld2, ...
mysql-test-t1 mysql-customer1-test mysqld1, mysqld2, ...
mysql-test-t2 mysql-customer1-test mysqld1, mysqld2, ...
mysql-test-t3 mysql-customer2-test mysqld1, mysqld2, ...
mysql-test-t4 mysql-customer2-test mysqld1, mysqld2, ...orchestrator -c graceful-master-takeover -alias mysql-customer1-prod:mysqld1 -d mysql-customer1-p1:330012019-07-15 09:58:29 FATAL GracefulMasterTakeover: indicated designated instance mysql-customer1-p1:33001 must be directly replicating from the master mysql-customer1-p1:33001--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
server_name server_alias instances_alias
================ ==================== =========================
mysql-customer1-p1 mysql-customer1-prod mysqld1, mysqld2, ...
mysql-customer1-p2 mysql-customer1-prod mysqld1, mysqld2, ...
mysql-customer2-p1 mysql-customer2-prod mysqld1, mysqld2, ...
mysql-customer2-p2 mysql-customer2-prod mysqld1, mysqld2, ...
mysql-test-t1 mysql-customer1-test mysqld1, mysqld2, ...
mysql-test-t2 mysql-customer1-test mysqld1, mysqld2, ...
mysql-test-t3 mysql-customer2-test mysqld1, mysqld2, ...
mysql-test-t4 mysql-customer2-test mysqld1, mysqld2, ...--replicate-ignore-db=meta ? I don't like this idea, I'm using GTID and it will insert errant transaction...
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/5fef5b7e-ae7a-453a-82a1-0eff8acb3f4a%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
orchestrator-client -c api -path all-instances | jq -r '.[] | select(.DataCenter == "DC1") | .Key.Hostname' | sort | uniq
> mysql-customer1-p1
> mysql-customer2-p1
> mysql-test-t1
> mysql-test-t3
orchestrator-client -c api -path all-instances | jq -r '.[] | {Hostname: .Key.Hostname, DataCenter}'
{
"Hostname": "mysql-test-t1",
"DataCenter": "DC1"
}
{
"Hostname": "mysql-test-t2",
"DataCenter": "DC2"
}
...
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/5fef5b7e-ae7a-453a-82a1-0eff8acb3f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/a6648de9-4146-4326-9cb8-6f1f8a3bf967%40googlegroups.com.
orchestrator -c graceful-master-takeover -i mysql-customer1-t1:33005 -d mysql-customer1-t2:33005
2019-07-18 ERROR Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and cluster_name='mysql-customer1-t2:33005'' at line 6
2019-07-18 ERROR Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and cluster_name='mysql-customer1-t2:33005'' at line 6
mysql-test-t1:33005
mysqld5-bin.000010:1563orchestrator-client -c api -path graceful-master-takeover/mysql-customer1-t2/33006/mysql-customer1-t1/33006 | jq -r '.[].Code, .Message'
#Already master
GracefulMasterTakeover: indicated designated instance mysql-customer1-t1:33006 must be directly replicating from the master mysql-customer1-t1:33006
# Success
OK
graceful-master-takeover: successor promoted
(syslog also report the SQL syntax error here)
# Failure (network down)
[looooong pause]
dial tcp 192.168.100.101:33006: connect: no route to host
# Failure (slave stopped too long for master to have binlog anymore)
Start SLAVE UNTIL is past coordinates: mysql-test-t2:33006
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/5fef5b7e-ae7a-453a-82a1-0eff8acb3f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/5fef5b7e-ae7a-453a-82a1-0eff8acb3f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/a6648de9-4146-4326-9cb8-6f1f8a3bf967%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-my...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/aa65d58b-ef01-4512-98e4-7ae5665ceef0%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/1d9708ab-6a60-454e-8b8b-4c937e99af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/5fef5b7e-ae7a-453a-82a1-0eff8acb3f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orchestrator-mysql/a6648de9-4146-4326-9cb8-6f1f8a3bf967%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "orchestrator-mysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orchestrator-mysql+unsub...@googlegroups.com.