[Linux-HA] MySQL OCF RA robustness

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Feb 4 11:31:41 MST 2008


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 :)

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


More information about the Linux-HA mailing list