Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 2004 21:56:07 +0200 (CEST)
From:      Blaz Zupan <blaz@si.FreeBSD.org>
To:        Jack Raats <jack@raats.org>
Cc:        ports@FreeBSD.org
Subject:   Re: FreeBSD Port: gld-1.4_1
Message-ID:  <20040901214918.A61983@titanic.medinet.si>
In-Reply-To: <000301c4901e$0cee77f0$9d00000a@jara2>
References:  <000301c4901e$0cee77f0$9d00000a@jara2>

next in thread | previous in thread | raw e-mail | index | archive | help
> It still doesn't boot up properly. I think I've found the error. Your boot
> up script is working fine but GLD isn't started if the mysqld is n't
> working!

Duh, of course, I could have come up with that earlier....

> So if at bootup time the mysql server is started first than your script is
> OK, but if the GLD server is booted before the mysql server , than it
> doesn't work.

I didn't notice in on my setup, because we run mysql on a separate box, so the
sql server is usually up when gld is restarted.

> I'll hope you'll find a way to solve this problem!

Unfortunatelly there is no clean solution for this problem. There is no way to
specify dependencies in the startup scripts. The FreeBSD 5.X rcorder command
does support this, but this does not work for 4.X systems and also most
startup scripts for other ports (like for example mysql-server) are not yet
converted to rc.subr.

The only solution I see for now is a hack. We replace the gld invocation with
a script that runs gld in a loop. If the daemon fails, the script sleeps a
couple of seconds and restarts the daemon. This is repeated for example up to
five times, then we give up. This way we have enough time so that mysql is up
and running and gld is started correctly. The downside is that we would always
have a additional process running (the shell that is running the loop around
gld). Also, I don't see how we would differentiate between a process that was
intentionally killed and a process that has not started up because mysql was
not started. Maybe this would be better handled by modifying gld itself and
adding an option so that it soft-fails when it cannot connect to the mysql
server and retries again. I'll contact the author and see if he has any
suggestions.

Other suggestions on how to solve this problem will be very much appreciated.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040901214918.A61983>