On Tue, Dec 17, 2013 at 02:39:52AM +0100, Timur I. Bakeyev wrote:
> Hi, guys!
>
> Any reaction, please?
Probably best to add a helper to ocf-functions, say,
# require_run_dir <mode> user:group path
require_run_dir()
{
local mode=$1 owner=$2 path=$3
local $varrun=@@__varrun_or_whatever_autofoo_calls_it__@@
case $path in
$varrun/*) : nothing ;;
*)
path=$varrun/$path ;;
esac
test -d $path && return 0
[ $(id -u) = 0 ] || return 1
# (or some helper function mkdir_p, in case we doubt -p is available...)
mkdir -p $path && chown $owner $path && chmod $mode $path
}
Then use that early in the various resource agents,
maybe where the defaults are defined.
Yes?
Lars Ellenberg
> > Hi, all!
> >
> > Recent Debian(and Ubuntu?) started to use tmpfs based /run directory for
> > the PID files, some of the RA scripts fail to check/store PID files, if
> > they been kept in subdirectories of the {/var}/run directory.
> >
> > By first glance I could spot at least at least named, zabbixserver,
> > mysql, mysql-proxy and lxc scripts, which store their PIDs in such
> > subdirectories. Also, apache2 may have to deal with that, I'm not sure.
> >
> > I've raised an issue:
> >
> > https://github.com/ClusterLabs/resource-agents/issues/351
> >
> > Maybe corresponding maintainers/interested developers could take a look
> > onto that.
> >
> > As of myself I've experienced failure of the RA named in the Debian wheezy
> > environment, so had to patch RA named accordingly:
> >
> > https://github.com/ClusterLabs/resource-agents/issues/350
> >
> > Serge, please have a look and comment/commit if appropriate :)
> >
> > With best regards,
> > Timur Bakeyev.
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/