Mailing List Archive

restarting automaticaly the Wackamole service
This is a multi-part message in MIME format.

------=_NextPart_000_00A9_01C20880.7629EB50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have two servers running with Wackamole. When one of them fails the =
other takes its IP. Thats all right. The problem cames when I restore =
the Server. It cannot run Wackamole automaticaly, so the other still =
have its IP.=20
I whish that the wackamole service will start automaticaly but I can=B4t =
do it. I added a line like this=20

/usr/local/bin/spread -c /usr/local/bin/spread.conf=20
sleep 10
/usr/local/sbin/wackamole

at the /etc/rc.d/rc.local file but it doesn=B4t work. Please help me. =
Thanks.

------=_NextPart_000_00A9_01C20880.7629EB50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have two servers running with =
Wackamole. When one=20
of them fails the other takes its&nbsp;IP. Thats all right. The problem =
cames=20
when I restore the Server. It cannot run Wackamole automaticaly, so the =
other=20
still have its IP. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I whish that&nbsp;the wackamole service =
will start=20
automaticaly but I can=B4t do it. I added a line like this </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/usr/local/bin/spread -c =
/usr/local/bin/spread.conf=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>sleep 10</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>/usr/local/sbin/wackamole</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>at the /etc/rc.d/rc.local file but it =
doesn=B4t work.=20
Please help me. Thanks.</FONT></DIV></BODY></HTML>

------=_NextPart_000_00A9_01C20880.7629EB50--
restarting automaticaly the Wackamole service [ In reply to ]
Noel Cornejo wrote:

> /usr/local/bin/spread -c /usr/local/bin/spread.conf
> sleep 10
> /usr/local/sbin/wackamole

I have something like this in my rc.local scripts on my FreeBSD boxes.

/usr/local/sbin/spread -n `hostname` &
sleep 10
/usr/local/sbin/wackamole

Works fine for me.

A really neat feature for Spread would be to have it setsid and fork
only after it drops in to state 1, gstate 1. This way, any services
could be started at boot after spread is started and will be sure it is
up and connectable.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
Re[2]: restarting automaticaly the Wackamole service [ In reply to ]
Hi Theo,

I really am not sure what the problem is.

I run Spread and immediately I run a client program (sptuser) that
connects and joins a group.

Spread takes a few seconds to complete the membership, but once it
does, the client gets a response for the join. Is your case different?

In general, forking, setsid, etc. are things I would usually avoid if not
necessary in order to keep the code simple and portable to any kind of
environment (not only unix).

Cheers,

:) Yair.

Theo> A really neat feature for Spread would be to have it setsid and fork
Theo> only after it drops in to state 1, gstate 1. This way, any services
Theo> could be started at boot after spread is started and will be sure it is
Theo> up and connectable.
restarting automaticaly the Wackamole service [ In reply to ]
Yair Amir wrote:

>Hi Theo,
>
>I really am not sure what the problem is.
>
>I run Spread and immediately I run a client program (sptuser) that
>connects and joins a group.
>
You don't want that trigger that behaviour with wackamole. If Spread
starts and hasn't performed a daemon membership yet (comes up alone at
first), then wackamole will start, see no peers and then assume all the
IP address which will confuse everyone tremendously. You really only
want wackamole to work on stable, settled Spread rings. Hence the 10
seconds -- which works "most" of the time for me. On some machines I
set it up to 1 minute.

>Spread takes a few seconds to complete the membership, but once it
>does, the client gets a response for the join. Is your case different?
>
On some of my machine it can take 15 - 30 seconds to complete the daemon
memebership join.

>In general, forking, setsid, etc. are things I would usually avoid if not
>necessary in order to keep the code simple and portable to any kind of
>environment (not only unix).
>
>
All of the code now "knows" if it is unix by arch.h. And the autoconf
patches I supplied make it very easy to use setsid and fork only if they
are available.

Spread is supposed to be a daemon... Like it or not, daemons on unix
should setsid and fork... it's just they way things are -- as dictated
by Stevens ;-) Otherwise the process is susceptable to receiving
unwanted signals from its parent process and has a controlling terminal
(which it should not).

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
Re[2]: restarting automaticaly the Wackamole service [ In reply to ]
Theo,

>>Hi Theo,
>>
>>I really am not sure what the problem is.
>>
>>I run Spread and immediately I run a client program (sptuser) that
>>connects and joins a group.
>>
Theo> You don't want that trigger that behaviour with wackamole. If Spread
Theo> starts and hasn't performed a daemon membership yet (comes up alone at
Theo> first), then wackamole will start, see no peers and then assume all the
Theo> IP address which will confuse everyone tremendously.

Are you absolutely sure that this is what happens?
If so, this is a bug in Wackamole. The way it should be is that Wackamole
starts, and is STUCK waiting for the membership change. I see no reason
why Wackamole takes any IP address before getting the first membership.

So let find out first if Wackamole takes any IP addresses before getting
the first membership (in this case this is a bug in Wackamole) or that
there is some other problem that should be addressed.

:) Yair.
Re[2]: restarting automaticaly the Wackamole service [ In reply to ]
On Friday, May 31, 2002, at 08:24 PM, Yair Amir wrote:
> Are you absolutely sure that this is what happens?
> If so, this is a bug in Wackamole. The way it should be is that
> Wackamole
> starts, and is STUCK waiting for the membership change. I see no reason
> why Wackamole takes any IP address before getting the first membership.
>
> So let find out first if Wackamole takes any IP addresses before getting
> the first membership (in this case this is a bug in Wackamole) or that
> there is some other problem that should be addressed.

Wackamole does not take any IP addresses until it received its own join
message -- confirmed. It looks to be operating correctly in that
respect.

It must be some other weird issue with with "spread &" returning too
quickly and the subsequent applications failing. Spread should really
setsid and fork after it is available for use like all other Unix
applications. It is a trivial modification to make.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
Re[2]: restarting automaticaly the Wackamole service [ In reply to ]
Okey, the problem is now resolve.
It´s seems to be the time that Spread takes to iniciate. Now I have the
lines below in the rc.local
/usr/local/bin/spread &
sleep 15
/usr/local/sbin/wackamole
And it´s works. Wackamole takes the IP and release when the other machine is
running. Thanks a lot. bye :D
----- Original Message -----
From: "Theo Schlossnagle" <jesus@omniti.com>
To: <wackamole-users@lists.backhand.org>
Sent: Saturday, June 01, 2002 4:22 AM
Subject: Re: Re[2]: [Wackamole-users] restarting automaticaly the Wackamole
service


>
> On Friday, May 31, 2002, at 08:24 PM, Yair Amir wrote:
> > Are you absolutely sure that this is what happens?
> > If so, this is a bug in Wackamole. The way it should be is that
> > Wackamole
> > starts, and is STUCK waiting for the membership change. I see no reason
> > why Wackamole takes any IP address before getting the first membership.
> >
> > So let find out first if Wackamole takes any IP addresses before getting
> > the first membership (in this case this is a bug in Wackamole) or that
> > there is some other problem that should be addressed.
>
> Wackamole does not take any IP addresses until it received its own join
> message -- confirmed. It looks to be operating correctly in that
> respect.
>
> It must be some other weird issue with with "spread &" returning too
> quickly and the subsequent applications failing. Spread should really
> setsid and fork after it is available for use like all other Unix
> applications. It is a trivial modification to make.
>
> --
> Theo Schlossnagle
> Principal Consultant
> OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
> Phone: +1 301 776 6376 Fax: +1 410 880 4879
> 1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
> 2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
>
>
> _______________________________________________
> wackamole-users mailing list
> wackamole-users@lists.backhand.org
> http://lists.backhand.org/mailman/listinfo/wackamole-users
>