pt-online-schema-change - using dsn only picks up last IP address given
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Invalid
|
Undecided
|
Unassigned |
Bug Description
We have a Master and 2 Slaves
Master = 192.168.192.138
Slave 1 = 192.168.192.137
Slave 2 = 192.168.192.136
When issuing the following....
pt-online-
it appears to only pick up the last IP address in the string - i.e. -> "h=192.168.192.136" (which is a slave) and only modifies the
schema on that system. Debug shows an empty DSN string ??
Is this only suppose to connect to the MASTER ??? and thus find the Slaves from that??
I see in the documentation - it specifies to have multiple IP addresses in the "table" - if you want to monitor the hosts for REPLICATION LAG time. So are we suppose to only utilize the MASTER IP Address on the command line?
i.e. - like this ?
pt-online-
Changed in percona-toolkit: | |
status: | New → Invalid |
Hello Dave,
Yes, you are only supposed to specify the Master IP. The tool will perform the changes there.
It will also , by default, automatically detect all slaves to check for lag, and pause if it detects lag.
Almost all of this behaviour can be altered with the options, like you did in your example.
--check-interval=5 will make it pause for 5 seconds (instead of the default 1) if it detects lag.
--max-lag=10 will only pause the tool if lag is greater than 10, (instead of the default 1)
If you only want to check for lag in one slave and ignore others, you can specify it with --check-slave-lag <dsn>
Finally there is the --recursion-method , which simply specifies which method to use to detect slaves. This option is not required as it has default values which usually work well.
It is here where you probably saw the special DSN method to specify which slaves to monitor.
You usually do not have to worry about this unless you are having trouble detecting slaves or only want to monitor a subset of slaves.
Regards