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

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Mar 25 13:30:27 UTC 2015


Hi,

On Wed, Mar 25, 2015 at 01:52:06PM +0100, Ulrich Windl wrote:
> >>> 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...

Could be. But afaik there're no guarantees on when the pid file's
created.

> > 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.

I think it should try to stop it first, but I'm not sure either.

> > 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...

Right. The patch fixes it properly.

Thanks,

Dejan

> > 
> > 
> > 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
> 
> 
> 
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Users mailing list