# Template configuring Torque client. # It should not be executed on Torque server unique template common/torque2/client/config; # This variable is normally defined as part of VO configuration variable CE_SHARED_HOMES ?= false; # This variable defines directory for customization points (scripts) used by WMS variable GLITE_WMS_LOCAL_CUSTOMIZATION_DIR ?= GLITE_LOCATION + '/etc/wms'; # Variable to force MOM startup even if the current node is node in # worker node list. variable TORQUE_FORCE_MOM_STARTUP ?= false; # pbs-monitoring frequency. # Must be specified as valid cron values variable PBS_MONITORING_INTERVAL_MINUTE ?= "*/15"; # include configuration common to client and server include { 'common/torque2/config' }; # ---------------------------------------------------------------------------- # chkconfig # ---------------------------------------------------------------------------- include { 'components/chkconfig/config' }; # Variable to define where is the working area for jobs on WN. # Default value used if TORQUE_TMPDIR not previously defined. # If TORQUE_TMPDIR is null, don't define Torque client tmpdir attribue. variable TORQUE_TMPDIR = if ( exists(TORQUE_TMPDIR) && (is_defined(TORQUE_TMPDIR) || is_null(TORQUE_TMPDIR)) ) { SELF; } else { TORQUE_CONFIG_DIR+"/tmpdir"; }; # Enable and start MOM service only if the node is listed as a worker # node in site configuration, except if TORQUE_FORCE_MOM_STARTUP is true. # This is done to avoid potential error messages on Torque master when # client tries to contact server. "/software/components/chkconfig/service/pbs_mom" = { wn_list = nlist(); if ( exists(WORKER_NODES_NLIST[FULL_HOSTNAME]) || TORQUE_FORCE_MOM_STARTUP ) { SELF['on'] = ''; SELF['off'] = null; } else { SELF['on'] = null; SELF['off'] = ''; }; SELF['startstop'] = true; SELF; }; # ---------------------------------------------------------------------------- # Configuring munge # ---------------------------------------------------------------------------- include { 'common/torque2/munge/config' }; # ---------------------------------------------------------------------------- # Configure NFS mount points for CREAM CE sandbox directory if requested. # NFS sharing of CREAM CE sandbox directory is enabled with variable # CREAM_SANDBOX_MPOINTS which can contain one entry per CE host sharing its # sandbox directory with WNs. # Sharing is disabled if variable CREAM_SANDBOX_SHARED_FS is defined with a # value different than 'nfs[34]'. # ---------------------------------------------------------------------------- include { 'common/nfs/cream-sandbox' }; # ---------------------------------------------------------------------------- # pbsclient # ---------------------------------------------------------------------------- include { 'components/pbsclient/config' }; include { 'components/profile/config' }; "/software/components/pbsclient/configPath" = 'mom_priv/config'; "/software/components/pbsclient/behaviour" = "OpenPBS"; "/software/components/pbsclient/initScriptPath" = "/etc/init.d/pbs_mom"; "/software/components/pbsclient/restricted" = list(TORQUE_SERVER_HOST); "/software/components/pbsclient/logEvent" = 255; "/software/components/pbsclient/tmpdir" = TORQUE_TMPDIR; # Report working area usage/size for easier monitoring "/software/components/pbsclient/resources" = if ( !is_null(TORQUE_TMPDIR) ) { push('size[fs='+TORQUE_TMPDIR+']'); } else { return(null); }; # If WN_SHARED_AREAS is defined, add all the filesystems defined # to directpaths as home directories are not necessarily under /home. # Entries not related to home directory are not really needed but there # is no side effect to add them. "/software/components/pbsclient/directPaths" = { if ( is_defined(WN_SHARED_AREAS) ) { if ( !is_nlist(WN_SHARED_AREAS) ) { error("WN_SHARED_AREAS must be a nlist"); }; foreach(e_mnt_point;mnt_path;WN_SHARED_AREAS) { mnt_point = unescape(e_mnt_point); SELF[length(SELF)] = nlist("locations",'*.'+DOMAIN+':'+mnt_point, "path",mnt_point, ); # When TORQUE_SERVER_PRIV_HOST is defined, ## add an explicit entry to $usecp with TORQUE_SERVER_HOST if (exists(TORQUE_SERVER_PRIV_HOST) && is_defined(TORQUE_SERVER_PRIV_HOST)) { SELF[length(SELF)] = nlist("locations",TORQUE_SERVER_HOST+':'+mnt_point, "path",mnt_point, ); }; }; }; # If WN_SHARED_AREAS is not defined or is empty (but CE_SHARED_HOME is true), # add /home to SELF for backward compatibility if ( (length(SELF) == 0) && is_defined(CE_SHARED_HOME) && CE_SHARED_HOME ) { debug('WN_SHARED_AREAS undefined or empty but CE_SHARED_HOME true: add /home to Torque directPaths'); SELF[length(SELF)] = nlist("locations",'*.'+DOMAIN+':/home', "path","/home" ); }; # If CREAM_SANDBOX_MPOINTS is defined, add an entry for each corresponding CE sandbox if ( is_defined(CREAM_SANDBOX_MPOINTS) ) { foreach (ce;mpoint;CREAM_SANDBOX_MPOINTS) { if ( is_defined(CREAM_SANDBOX_DIRS[ce]) ) { sandbox_path = CREAM_SANDBOX_DIRS[ce]; } else if ( is_defined(CREAM_SANDBOX_DIRS['DEFAULT']) ) { sandbox_path = CREAM_SANDBOX_DIRS['DEFAULT']; }; if ( exists(sandbox_path) ) { debug('Adding Torque directPaths entry for CE '+ce+' sandbox ('+sandbox_path+' mounted on '+mpoint+')'); SELF[length(SELF)] = nlist("locations",ce+':'+sandbox_path, "path",mpoint, ); } else { error('CREAM CE '+ce+' sandbox directory undefined (check variable CREAM_SANDBOX_MPOINTS)'); }; }; }; if ( length(SELF) == 0 ) { null; } else { SELF; }; }; # ---------------------------------------------------------------------------- # Configuration of EDG_WL_SCRATCH # # EDG_WL_SCRATCH will be set to the PBS tmpdir if $TMPDIR is defined # and the PBS_NODEFILE is not defined. That is, it will be defined # for non-MPI jobs. This is done in the profile.d scripts below. # # In addition, current directory is defined to $TMPDIR for non-MPI jobs # in gLite WMS custmization point 1 (cp_1.sh) as gWMS job wrapper no longer # does it. # ---------------------------------------------------------------------------- include { 'components/filecopy/config' }; include { 'components/profile/config' }; variable CONTENTS = <