[Linux-HA] MySQL OCF RA robustness

Christian Rishøj christian at rishoj.net
Tue Feb 5 09:32:11 MST 2008


On 4 Feb 2008, at 19:31, Dejan Muhamedagic wrote:

> Hi,
>
> On Sun, Feb 03, 2008 at 04:17:02AM +0100, Christian Rish?j wrote:
>>
>> Hi,
>>
>> Please consider the following patch for the MySQL OCF resource agent:
>>
>> --- mysql.orig	2008-02-03 03:43:45.933966300 +0100
>> +++ mysql	2008-02-03 04:09:00.706816303 +0100
>> @@ -268,6 +268,20 @@
>>         chown -R $OCF_RESKEY_user:$OCF_RESKEY_group  
>> $OCF_RESKEY_datadir
>>     fi
>>
>> +    pid_dir=`dirname $OCF_RESKEY_pid`
>> +    if [ ! -d $pid_dir ] ; then
>> +	ocf_log info "Creating PID dir: $pid_dir"
>> +	mkdir -p $pid_dir
>> +	chown $OCF_RESKEY_user:$OCF_RESKEY_group $pid_dir
>> +    fi
>> +
>> +    socket_dir=`dirname $OCF_RESKEY_socket`
>> +    if [ ! -d $socket_dir ] ; then
>> +	ocf_log info "Creating socket dir: $socket_dir"
>> +	mkdir -p $socket_dir
>> +	chown $OCF_RESKEY_user:$OCF_RESKEY_group $socket_dir
>> +    fi
>> +
>>     # Uncomment to perform permission clensing
>>     # - not convinced this should be enabled by default
>>     #
>>
>> The RA was unable to start MySQL on my Ubuntu servers because the / 
>> var/run
>> directory seemingly is purged at boot time.
>
> Strange that even directories are being purged. Anyway...
>
> The patch looks sane. Many thanks. Now, if you could please send
> it as an attachement I'd appreciate :)

Done.

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mysql_create_dirs.patch
Type: application/octet-stream
Size: 730 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha/attachments/20080205/7ff52380/mysql_create_dirs.obj
-------------- next part --------------




>
> Cheers,
>
> Dejan
>
>> WIth best regards
>> Christian
>>
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA at lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list