Skip to content
Browse files

Solve a race condition with monitor op starting slave before change m…

…aster
  • Loading branch information...
1 parent 3f91cff commit be82f13680ca61d759819c4da5c37064c26183c5 @y-trudeau committed Nov 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 heartbeat/mysql
View
2 heartbeat/mysql
@@ -631,7 +631,7 @@ set_master() {
# reset with RESET MASTER.
ocf_run $MYSQL $MYSQL_OPTIONS_REPL \
- -e "CHANGE MASTER TO MASTER_HOST='$new_master', \
+ -e "STOP SLAVE;CHANGE MASTER TO MASTER_HOST='$new_master', \
MASTER_USER='$OCF_RESKEY_replication_user', \
MASTER_PASSWORD='$OCF_RESKEY_replication_passwd' $master_params"
}

0 comments on commit be82f13

Please sign in to comment.
Something went wrong with that request. Please try again.