pt-online-schema-change - using dsn only picks up last IP address given

Bug #1460783 reported by Dave Gregg
6
This bug affects 1 person
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-schema-change h=192.168.192.138,h=192.168.192.137,h=192.168.192.136,D=menagerie,t=MyGuests --check-interval=5 --max-lag=10 --alter "modify email varchar(256);" --execute

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-schema-change h=192.168.192.138,D=menagerie,t=MyGuests --check-interval=5 --max-lag=10 --alter "modify email varchar(256);" --execute

Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

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

tags: added: pt-online-schema-change
Changed in percona-toolkit:
status: New → Invalid
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1286

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.