[Pacemaker] Pure-FTPd resource script is wrong (at least on ubuntu and probably debian)

Mailing List SVR lists at svrinformatica.it
Sat Nov 12 00:28:03 CET 2011


For your info in mysql RA script there is the following (mysql_start 
function):

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

no problem if you want to keep the pure-ftpd ra script as is, however I 
think if a RA script allow to pass a pidfile (and it can be any 
location) the RA script should make sure that the service it start can 
create that pid since if the service doesn't create the pid the RA 
monitor fails. I think this is a responsability of the start script 
(init script and RA script).



bye
Nicola


Il 11/11/2011 13:43, Raoul Bhatia [IPAX] ha scritto:
> hi!
>
> as i'm quote familiar with the pure-ftpd script, i'm stepping into
> this conversation.
>
> On 2011-11-10 18:40, Mailing List SVR wrote:
>> 1) I have this primitive:
>>
>> primitive ftp_service ocf:heartbeat:Pure-FTPd \
>> params script="/usr/sbin/pure-ftpd-wrapper" daemon_type="postgresql"
>> pidfile="/var/run/pure-ftpd/pure-ftpd.pid" \
>> op monitor interval="40s" timeout="20s" \
>> op start interval="0" timeout="20s" \
>> op stop interval="0" timeout="20s"
>
> looks good.
>
>
>> please note that I'm passing pidfile parameter to the RA script and that
>> on debian/ubuntu pidfile is hardcoded to
>> "/var/run/pure-ftpd/pure-ftpd.pid" so this is the only available choice
>
> what do you mean by that? where is the pidfile hardcoded?
>
> you mean in /usr/sbin/pure-ftpd-wrapper line 172?
>
> well, then this is, imho, the problem of debian/ubuntu's warpper
> script not creating the correct directory.
>
> > # force PID file to /var/run/pure-ftpd/pure-ftpd.pid
> > push(@options, '-g', '/var/run/pure-ftpd/pure-ftpd.pid');
>
> /var/run/pure-ftpd/ is created by the init script "on the fly".
> this patch comes from http://bugs.debian.org/506077 and might as well
> be replaced/complemented by additional checks in the, debian specific,
> wrapper script.
>
> you better send a corresponding bugreport - or even better a patch -
> to Stefan Hornburg (Racke) <racke at linuxia.de> and/or the debian/ubuntu
> bugtracker.
>
> there is "nothing" that the resource agent can be blamed for.
>
>> the directory /var/run/pure-ftpd is deleted every time I reboot the
>> server and I don't like to create it in rc.local
>
> btw, is this a supported/common configuration? i've never used this
> approach
>
> cheers,
> raoul
>
> ps. stefan, this discussion is about debian bug 506077 and the hard
> coded pidfile in /usr/sbin/pure-ftpd-wrapper and resulting implications
> for the "resource agents" in a linux-ha environment.
> feel free to directly contact me offlist if you need any more
> information on this.
>
> this discussion's thread can be found at
> http://www.gossamer-threads.com/lists/linuxha/pacemaker/76107




More information about the Pacemaker mailing list