[ClusterLabs] Antw: Re: [Question] Question about mysql RA.
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Thu Nov 5 07:11:59 UTC 2015
>>> Ken Gaillot <kgaillot at redhat.com> schrieb am 04.11.2015 um 16:44 in Nachricht
<563A27C2.5090003 at redhat.com>:
> On 11/04/2015 04:36 AM, renayama19661014 at ybb.ne.jp 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: Users at clusterlabs.org
> 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
More information about the Users
mailing list