>>> Ken Gaillot <[email protected]> schrieb am 04.11.2015 um 16:44 in >>> Nachricht <[email protected]>: > On 11/04/2015 04:36 AM, [email protected] wrote: [...] >> pid=`cat $OCF_RESKEY_pid 2> /dev/null ` >> /bin/kill $pid > /dev/null > > I think before this line, the RA should do a "kill -0" to check whether > the PID is running, and return $OCF_SUCCESS if not. That way, we can > still return an error if the real kill fails.
And remove the stale PID file if there is no such pid. For very busy systems one could use ps for that PID to see whether the PID belongs to the expected process. There is a small chance that a PID exists, but does not belong to the expected process... > >> rc=$? >> if [ $rc != 0 ]; then >> ocf_exit_reason "MySQL couldn't be stopped" >> return $OCF_ERR_GENERIC >> fi >> (snip) >> --------------------------------------------------------- >> >> The mysql RA does such a code from old days. >> * http://hg.linux-ha.org/agents/file/67234f982ab7/heartbeat/mysql >> >> Does mysql RA know the reason becoming this made? >> Possibly is it a factor to be conscious of mysql cluster? >> >> I think about a patch of this movement of mysql RA. >> I want to know the detailed reason. >> >> Best Regards, >> Hideo Yamauchi. > > > _______________________________________________ > Users mailing list: [email protected] > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org _______________________________________________ Users mailing list: [email protected] http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
