[ClusterLabs] Antw: proftpd resource agent - fix for a start/monitor race condition

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Wed Mar 25 12:52:06 UTC 2015


>>> Matthias Ferdinand <mf at 14v.de> schrieb am 25.03.2015 um 11:40 in Nachricht
<20150325104031.GG22086 at hektik>:
> Hello,
> 
> the proftpd resource agent sometimes shows a race condition:
> 
> if startup of the proftpd binary is slow, the pacemaker monitor
> operation immediately following the start operation may not yet find
> the pid-file from proftpd, and then it will signal failure. Subsequent

Personally I feel this should be fixed in proftp: The process should not exit
unless the PID file was created. It seems the child process creates the PID
file, not the parent...

> retries of the start operation then keep failing because the tcp sockets
> are already used by the initial proftpd (which was never stopped).

Doesn't pacemaker try a stop operation in case of failure first? I'm not
sure.

> 
> 
> Fix (copied from the apache resource agent): after invoking the proftpd
> binary, do not return to caller until the monitor operation (called
> from within the RA itself) shows "success". Handling startup timeouts is
> left to the cluster manager.

I think you can also tell pacemaker not to call monitoring unless n seconds
have passed since start operation. Of course any fixed timeout is
unreliable...

> 
> 
> Regards
> Matthias Ferdinand
> -- 
> one4vision GmbH                    Fon +49 681 96727 - 60
> Residenz am Schlossgarten          Fax +49 681 96727 - 69
> Talstraße 34-42                    info at one4vision.de 
> D-66119 Saarbrücken                http://www.one4vision.de 
> HRB 11751                          verantwortl. Geschäftsführer:
> Amtsgericht Saarbrücken            Christof Allmann, Christoph Harth







More information about the Users mailing list