[Linux-ha-dev] OCF RA for rsync daemon Active-Passive setup
Thomas Guyot-Sionnest
Thomas at zango.com
Thu Oct 26 11:49:14 MDT 2006
> -----Original Message-----
> From: linux-ha-dev-bounces at lists.linux-ha.org
> [mailto:linux-ha-dev-bounces at lists.linux-ha.org] On Behalf Of
> David Lee
> Sent: October 26, 2006 11:00
> To: High-Availability Linux Development List
> Subject: Re: [Linux-ha-dev] OCF RA for rsync daemon
> Active-Passive setup
>
> [...]
>
> The "-C" flag to "ps" is non-portable. Something else would
> be needed if
> this code were staying.
>
> The "ps" program is notoriously OS-dependent (non-portable).
>
> Such things raise a wider question about code fragments across RAs
> (existing and future) which might be similar to each other and/or have
> potential portability issues.
>
> Do we perhaps need some higher level shell functions in an OCF library
> that would be available to all RAs and enable them to perform certain
> commonly-wanted functionality (e.g. "ps -C"), especially when
> that desired
> functionality lures unwary programmers into known
> non-portability traps?
>
> To give a poor (probably verging on incorrect) example: a
> shell function
> "ps_C" that would do "ps -C" on systems that support it, and something
> equivalent (possibly involving autoconf) on systems that don't.
>
Just a suggestion:
kill -0 <PID> 2>/dev/null
It won't allow you to make sure the pid is not taken my another process, but
that's a fairly small risk. It can be mitigated by either mounting
$HA_VARRUNDIR/rsctmp as tmpfs or removing these files on bootup before
starting heartbeat.
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3076 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20061026/47b60ae8/smime.bin
More information about the Linux-HA-Dev
mailing list