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

Mark Hymers mhy at debian.org
Wed Apr 25 19:52:11 UTC 2007


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} "$@"
======================================================================

(I don't want to just source /etc/default/gridengine as that'd overwrite
both SGE_ROOT and SGE_CELL if you already had one of them set in the
environment).  As to adding /etc/gridengine/* to the default search
path, I'm still trying to work out if I think it's a good idea or not.
Initially I'm kinda tempted to go with the shell wrapper solution and
set up a default config in the debian default place which the admin can
override as necessary (especially as this way we don't need any code
changes).  This would mean leaving the bootstrap file in /var/... though

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

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)
 * 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

Mark

-- 
Mark Hymers <mhy at debian dot org>

"Don't make idle promises.... Sorry, threats.  Can you have idle promises?"
     One of my housemates thinking clearly at 8am
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-gridengine-devel/attachments/20070425/6aec1d71/attachment.pgp


More information about the Pkg-gridengine-devel mailing list