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

Re: [Condor-users] Executing a Program to Produce Configuration Macros on windows



Just to make certain, $(LOCAL_DIR)/etc/hasmcr.bat| is the only value you have set to LOCAL_CONFIG_FILE, there are no other config files added, like the default condor_config.local?  Cause I just tried your batch script on my test machine and condor_restart reported no errors.

On Mon, Jan 10, 2011 at 9:04 PM, <Kevin.Buckley@xxxxxxxxxxxxx> wrote:
Hi there,

I may be trying to be too clever by half here but I do think
this should actually work.

I am tying to automate the publishing of a ClassAd based on
the existence of a directory on a windows machine, whilst
our underlying windows grid gets homogenised so that we
won't have to care about this.

The info in the manual section

 3.3.1.4 Executing a Program to Produce Configuration Macros

looked promising so I have been trying

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

where the .BAT file in question does this:

@echo off
if exist c:\"program files\matlab\matlab compiler runtime" goto :exists
echo HAS_MCR = False
goto :end
:exists
echo HAS_MCR = True
:end
echo STARTD_ATTRS = HAS_MCR


If I submit that .BAT file as a Condor job, I get the required result
(or not, depending on whether the MCR has been rolled out to a given
machine or not yet!)

However, when I look at the logs for the one machine I can get admin
access to, and so alter the config file to include its invocation as
a program, I see that something has failed the condor_restart invocation
telling me

Configuration Error File <C:\condor/etc/hasmcr.bat|>: command terminated
with exit code 255
Configuration Error Line 0 while reading config source
C:\condor/etc/hasmcr.bat|

Furthermore, if I am logged on as a local administartor on the machine
in question and try to run the batch file from a DOS-box, I see

c:\"program files\matlab\matlab compiler runtime" was unexpected at this time


This suggests to me (though I make no claim to being a windows expert,
as I try and avoid windows if at all possible) that the command
extensions that would allow the "if exists" to operate are not
accessible to the admin user that the condor binaries run as.


Any clues/pointers, from a Condor perspective, that might help get
around this, assuming it should work in the first place?
Kevin

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

_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/