[Pkg-gridengine-devel] pkg-gridengine first steps

Michael Banck mbanck at debian.org
Thu Apr 26 11:29:29 UTC 2007


Hi,

On Wed, Apr 25, 2007 at 08:52:11PM +0100, Mark Hymers wrote:
> On Wed, 25, Apr, 2007 at 06:25:00PM +0200, Michael Banck spoke thus..
> > This patch seems to work for me:
> > -      answer_list_add_sprintf(alpp, STATUS_ESEMANTIC, ANSWER_QUALITY_CRITICAL, MSG_SGEROOTNOTSET);
> > -      DRETURN(AE_ERROR);
> > +      sge_root = "/var/lib/gridengine";
> <snip>
> > 
> > The next thing clients need is the act_qmaster file, i.e. the qmaster
> > hostname.  I propose we change the code slightly to first check
> > /etc/gridengine/act_qmaster and (if that is not available) then
> > $SGE_ROOT/$SGE_CELL/$COMMON/act_qmaster as now:
> <snip>
> > The last thing they need is $SGE_ROOT/$SGE_CELL/$COMMON/bootstrap,
> > though I am not quite sure why (could be that they just have one init
> > routine for everything and don't bother).  This is probably the hardest,
> > as bootstrap probably shouldn't vary among the machines on a cluster.
> 
> I'm a little confused.  Why do this instead of putting the binaries in
> /usr/lib/gridengine and having a wrapper script with symlinks which
> makes sure that the environment is set up suitably.  Something like:
> 
> ======================================================================
> #!/bin/sh
> 
> # SGE Wrapper script to ensure correct environment variables are set
> 
> # For each of SGE_ROOT, SGE_CELL:
> # 1) If the environment variable is set; use it
> # 2) If not, look in /etc/default/gridengine
> # 3) If still nothing, fall back to Debian defaults
> 
> DEFAULT_SGE_ROOT=/var/lib/gridengine
> DEFAULT_SGE_CELL=default
> CONFIG_PATH=/home/mark/ge
> PROG=`basename $0`
> 
> if [ -z ${SGE_ROOT} ]; then
>     S=`grep ^SGE_ROOT ${CONFIG_PATH} | cut -d= -f2-`
>     if [ -z ${S} ]; then
>         SGE_ROOT=${DEFAULT_SGE_ROOT}
>     else
>         SGE_ROOT=${S}
>     fi
> fi
> 
> if [ -z ${SGE_CELL} ]; then
>     S=`grep ^SGE_CELL ${CONFIG_PATH} | cut -d= -f2-`
>     if [ -z ${S} ]; then
>         SGE_CELL=${DEFAULT_SGE_CELL}
>     else
>         SGE_CELL=${S}
>     fi
> fi
> 
> export SGE_ROOT SGE_CELL
> 
> exec /usr/lib/gridengine/${PROG} "$@"

OK, that looks good to me as well.  Maybe I just generally don't like
wrapper scripts that much, it feels a bit like working around strange
upstream decisions to me.

But yeah, it's probably much better than hacking around in their source,
plus probably more future-proof.

I'll move the client binaries to /usr/lib/gridengine then, I guess the
script should be hardlinked from one to all the other q* tools in
/usr/bin, right?

> > BTW, I checked in debian/file_structure where I've outlined a rough
> > first draft of which files/directories go into which package, can you
> > guys please review it and change it as necessary?
> 
> Looks good to me in the main.  I think that we certainly do want to ship
> sge_shadowd (though I don't have it set up at work, I intend to as soon
> as I can move our cluster master to Debian :-) ).

OK.
 
> I can do the init scripts and check them into SVN is people want (just
> asking to avoid duplicating work).  There are two or three init scripts
> as far as I can tell:
>  * start up master / scheduling daemon (/etc/init.d/gridengine-qmaster)
>  * start up execution daemon (/etc/init.d/gridengine-execd)
 
Yes please, I had a very short stab at adopting the general skel init.d
scripts, but didn't do much there, just go ahead.

>  * start up backup master daemon... (/etc/init.d/gridengine-qshadow ?)
>    or should this be configurable in /etc/default/gridengine?  Maybe a
>    SGE_QMASTER=master / slave type variable

I have no opinion on this, just do whatever you think is right, I'd say.


Michael



More information about the Pkg-gridengine-devel mailing list