FreeBSD Port: gld-1.4_1

Blaz Zupan blaz at si.FreeBSD.org
Wed Sep 1 12:56:15 PDT 2004


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


More information about the freebsd-ports mailing list