percona/percona-pacemaker-agents — pull request #35 by grypyrg (2014-10-24 00:22:38+00:00)
Title: pid file checks are invalid in mysql_start and mysql_stop

MySQL does not yet create the PID file when innodb recovery (and...) is happening.
If the 'start' timeouts, then the cluster will do a stop.

But the 'stop' can fail too, as the pid file might not yet be created.

Next to that, when cleaning up the errors (pcs resource cleanup) fast enough, it can even start a second mysqld instance, which will get a lot of errors of course as 2 mysqld instances are running.

This fix will avoid that mysql_stop() will not be able to kill mysql and therefore avoids having multiple instances running