[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] question about defining a special execute node

> Lets say we want sotware PackageA and it needs to be version >= 1.1.
> On a machine that has this software you'd do:
> HAS_PackageA = True
> PackageA_Version = 1.0
> STARTD_ATTRS = $(STARTD_ATTRS), HAS_PackageA, PackageA_Version
> That tells the machine to advertise the existence of PackageA and it's
> version in it's ClassAd.

Just to "top that up", as I've recently been looking to have something
similar done on machines not under my control that comprise the Condor
Grid I do control, it is possible to have Condor machines run a
script (or program) so as to create their local config on the fly.

Suppose that you know that most of your machines have Package A and
that of the ones that do, some have 1.0 and some 1.1, you could run
a script that tested for both existence and version (latter left as
an exercise) and then defined the various ClassAds.

For example, this .BAT file (remember them) checks for the existence
of the MATLAB Compiler Runtime on a windows box and sets a relevant
ClassAd accordingly.

$ cat hasmcr.bat
@echo off
if exist c:\"program files\matlab\matlab compiler runtime" goto :exists
echo HAS_MCR = False
goto :end
echo HAS_MCR = True
goto :end

Note that it defines (echoes back) both the ClassAd "HAS_MCR" and
the bit making it visible for the condor daemon that needs to see

If that .BAT file is used in place of a static local config file,
using Condor's dynamic config syntax, the default

LOCAL_CONFIG_FILE = $(LOCAL_DIR)/condor_config.local

 becoming say

LOCAL_CONFIG_FILE = $(LOCAL_DIR)/etc/hasmcr.bat|

then only the machines that have it will report they have it,
and so job requests that say they need it won't end up on
machines that don't have it and just black hole.

This, for me, has to be a lot better than assuming that just
because you are told the software is on a machine, it is, and
is surely better than editing every static config file across
your Condor real estate by hand.

Check out this bit of the manual (as of 7.2.4) Executing a Program to Produce Configuration Macros

Kevin M. Buckley                                  Room:  CO327
School of Engineering and                         Phone: +64 4 463 5971
 Computer Science
Victoria University of Wellington
New Zealand