[GE users] Starting qlicserver as a daemon

Richard Ems Richard.Ems at cape-horn-eng.com
Mon Nov 19 14:23:33 GMT 2007


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

Olesen, Mark wrote:
> Hi Richard,
> 
>> I'm trying to start qlicserver as a daemon, and this works on the
>> console, but as soon as I start it from an init script it dies after
>> one run.
> 
> This is a feature and not a bug. The qlicserver cannot (should not) be run
> as a daemon on its own. If a qmaster goes down in a controlled or
> uncontrolled manner, we don't want the qlicserver to query it, or bombard it
> with potentially incorrect qconf commands. Failover considerations also
> speak against invoking it as a daemon. How does the original qmaster know to
> shutdown the qlicserver when a shadow master takes over?

No idea about this, but in my case I have no shadow master.

> 
> The only slightly recommended way to use qlicerver as a daemon is to start
> it at the beginning of a load sensor script running on the qmaster.
> The qlicserver daemon mode actually watches its parent process and will kill
> itself off when the parent is gone. This seems to be a reasonable means of
> tying the qlicserver and the qmaster somewhat together. I suppose it'd also
> be possible to get the sge_qmaster pid and monitor that instead, but nobody
> has seemed to care thus far.

So, I have changed in qlicserver the line

my $ppid = getppid();             # get ppid *before* forking

to

chomp ($ppid = `pidof sge_qmaster`)

and this seems to work. If I stop the sge_qmaster then the qlicserver
stops also.

Many thanks Mark, and also many thanks for qlicserver, it works very
good! 8)

Richard


-- 
Richard Ems       mail: Richard.Ems at Cape-Horn-Eng.com

Cape Horn Engineering S.L.
C/ Dr. J.J. Dómine 1, 5? piso
46011 Valencia
Tel : +34 96 3242923 / Fax 924

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list