restarting ipropd-master

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

restarting ipropd-master

Antoine Jacoutot
Hi...

I was playing a bit with ipropd (master/slave) to see if I could replace
hprop (which I've been suing for a while). I like the idea of
incremental propagation, but there's a real stopper for me:
- each time the ipropd-master process dies, stop, restart... I have to
restart _all_ the ipropd-slave once the master is back.
Is there any workaround to this ? Can't the slaves stay up even when the
master is not available ?
I though about adding ipropd to inetd.conf but I'm really _not_ sure
this is the right way to go.

Thanks in advance.
Regards,

Antoine
Reply | Threaded
Open this post in threaded view
|

Re: restarting ipropd-master

Dr A V Le Blanc
On Mon, Oct 10, 2005 at 05:04:54PM +0200, Antoine Jacoutot wrote:
> I was playing a bit with ipropd (master/slave) to see if I could replace
> hprop (which I've been suing for a while). I like the idea of
> incremental propagation, but there's a real stopper for me:
> - each time the ipropd-master process dies, stop, restart... I have to
> restart _all_ the ipropd-slave once the master is back.
> Is there any workaround to this ? Can't the slaves stay up even when the
> master is not available ?
> I though about adding ipropd to inetd.conf but I'm really _not_ sure
> this is the right way to go.

I run a cron job on the slaves that checks and restarts the
ipropd-slave once the master is back.

     -- Owen
     [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: restarting ipropd-master

Antoine Jacoutot
Dr A V Le Blanc wrote:
> I run a cron job on the slaves that checks and restarts the
> ipropd-slave once the master is back.

Thanks, I think this is indeed the right way to go for now.
How do you check if the master is back, do you just ping the master
computer or do you connect to it's iprod port ?

Antoine
Reply | Threaded
Open this post in threaded view
|

Re: restarting ipropd-master

Dr A V Le Blanc
On Tue, Oct 11, 2005 at 09:53:04AM +0200, Antoine Jacoutot wrote:
> Thanks, I think this is indeed the right way to go for now.
> How do you check if the master is back, do you just ping the master
> computer or do you connect to it's iprod port ?

Well, it's Linux, even Debian, specific, but I do this:

     if [ -r /var/run/ipropd-slave.pid ] ; then
       if [ -r /proc/`cat /var/run/ipropd-slave.pid`/stat ];then exit 0;fi
     fi
     restart ipropd-slave

If there is no /var/run/ipropd-slave.pid, then ipropd-slave isn't
running, and so should be started.  If it is there, then I check
in /proc to see that it's still running, and if so I exit.

To restart ipropd-slave, I do this:

     . /etc/default/heimdal-kdc
     start-stop-daemon --start --quiet --background --make-pidfile \
      --pidfile /var/run/ipropd-slave.pid --exec /usr/sbin/ipropd-slave \
      -- "$SLAVE_PARAMS"

which is Debian specific, I'm sure.

     -- Owen
     [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: restarting ipropd-master

Love Hörnquist Åstrand
In reply to this post by Antoine Jacoutot

Antoine Jacoutot <[hidden email]> writes:

> Hi...
>
> I was playing a bit with ipropd (master/slave) to see if I could
> replace hprop (which I've been suing for a while). I like the idea of
> incremental propagation, but there's a real stopper for me:
> - each time the ipropd-master process dies, stop, restart... I have to
>   restart _all_ the ipropd-slave once the master is back.
> Is there any workaround to this ? Can't the slaves stay up even when
> the master is not available ?
> I though about adding ipropd to inetd.conf but I'm really _not_ sure
> this is the right way to go.
iprop-slave is somewhat agressiv in calling exit(3) on failure to talk the
master. That should probably change, but as Owen points out, its quite easy
to retry in a shell script.

Love


attachment0 (487 bytes) Download Attachment