Public bug reported:

Actually Pure-FTPd ra script does not work out of box on ubuntu, this is
for the following reasons:

- pid file in pure-ftpd wrapper is hard coded in /usr/sbin/pure-ftpd-
wrapper on line 173:

push(@options, '-g', '/var/run/pure-ftpd/pure-ftpd.pid');

- the directory /var/run/pure-ftpd is deleted on each reboot
- the init script for pure-ftpd create the directory
- the ra script does not create that directory and so fails to start pure-ftpd

there are the following solutions:

1) add something like this:

if [ ! -d `dirname $OCF_RESKEY_pidfile` ];then
        mkdir `dirname $OCF_RESKEY_pidfile`
fi 

at the beginning of the start function in the RA script

2) add something like this:

mkdir "/var/run/pure-ftpd", 0700 unless -d "/var/run/pure-ftpd";

after line 173 in the pure-ftpd wrapper script

3) change the wrapper script to make pid location configurable, so ra script 
can use a different pid file (probably require modifications to the ra script 
too)
4) make pure-ftpd init script lsb compliant and use it as lsb resource in 
pacemaker
5) make pure-ftpd init script upstart compliant and use it as upstart resource 
in pacemaker

** Affects: cluster-agents (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: cluster pacemaker

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to cluster-agents in Ubuntu.
https://bugs.launchpad.net/bugs/1017406

Title:
  Pure-FTPd RA script does not create the pid directory

Status in “cluster-agents” package in Ubuntu:
  New

Bug description:
  Actually Pure-FTPd ra script does not work out of box on ubuntu, this
  is for the following reasons:

  - pid file in pure-ftpd wrapper is hard coded in /usr/sbin/pure-ftpd-
  wrapper on line 173:

  push(@options, '-g', '/var/run/pure-ftpd/pure-ftpd.pid');

  - the directory /var/run/pure-ftpd is deleted on each reboot
  - the init script for pure-ftpd create the directory
  - the ra script does not create that directory and so fails to start pure-ftpd

  there are the following solutions:

  1) add something like this:

  if [ ! -d `dirname $OCF_RESKEY_pidfile` ];then
          mkdir `dirname $OCF_RESKEY_pidfile`
  fi 

  at the beginning of the start function in the RA script

  2) add something like this:

  mkdir "/var/run/pure-ftpd", 0700 unless -d "/var/run/pure-ftpd";

  after line 173 in the pure-ftpd wrapper script

  3) change the wrapper script to make pid location configurable, so ra script 
can use a different pid file (probably require modifications to the ra script 
too)
  4) make pure-ftpd init script lsb compliant and use it as lsb resource in 
pacemaker
  5) make pure-ftpd init script upstart compliant and use it as upstart 
resource in pacemaker

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cluster-agents/+bug/1017406/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help   : https://help.launchpad.net/ListHelp

Reply via email to