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

Re: [HTCondor-users] variation on HAS_MY_SOFTWARE classad parameter setup

Even better and I got us bumped up to v8.2.8 in July, so this is available to me.

   Thank You for the extra time and  explanation of how and when the line is parsed.


From: "John Knoeller (TJ)" <johnkn@xxxxxxxxxxx>
Reply-To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Date: Thursday, July 2, 2015 at 12:45 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] variation on HAS_MY_SOFTWARE classad parameter setup

Yes. As of HTCondor 8.2.x you can do this.  The 8.2.x and late config parser supports include scripts.

Include : $(LIBEXEC)/test_for_my_software.sh |

The trailing | tells the include statement that test_for_my_software.sh is an executable.   The script should write
to stdout  statements in config syntax.   So it might be something like

if [ -e my_software ]; then echo MY_SOFTWARE=true; fi

Note that this script will run *every* time that a HTCondor daemon starts or reconfigs, and also whenever a condor tool
such as condor_status or condor_submit executes.  With tools The current directory can vary so the path to the script must be absolute.

You can have the script execute only when the startd is parsing the config, by wrapping it in a if/else config statements.

if $(IsStartd)
  Include : $(LIBEXEC)/test_for_my_software.sh |

But be aware, if you do this, the script will not execute when you run condor_config_val unless you use the -subsystem argument
to condor_config_val so that it reads the config as if it were the startd.

Run these commands to see what I mean.

condor_config_val -dump ^Is ^My

condor_config_val -subsystem startd -dump ^Is ^My


On 7/2/2015 11:00 AM, Mary Romelfanger wrote:

This is a follow on question to a discussion that we had with a couple of you guys at the conference.

We would like to add a local variation of a HAS_MY_SOFTWARE parameter to our local configuration files, so that we can use the matching Requirements = statement in our submit files.

The question is — we are using virtual machines that come and go, and software that occasionally moves from one virtual machine to a different machine, and with that we currently have just two condor_config.local files that we create links to as we install HTCondor on a machine.   In this case the software is one of our side packages and is typically only running on one machine.  The jobs that need that package need to be directed to that one machine.

Is there any way to put a test into the condor_config.local file to test to see if the software is running on that machine so set HAS_MY_SOFTWARE = True?
   I was envisioning something like testing if a file exists?      But I am not finding any if options in the config file?

And if this is not possible I am open to any suggestions for any other way to add this classed parameter other than creating another set of condor_config.local files and then having a more complex installation decision tree for the HTCondor installer.     I really would prefer a solution that tests the machine and finds the one that has the software running when HTCondor is started.

Mary Romelfanger
Sr. Systems Software Engineer
{o,o}      Phone 410-338-6708
/)__)     Cell      443-244-0191
-"-"-          mary@xxxxxxxxx

Space Telescope Science Institute
3700 San Martin Drive
Baltimore, MD 21218

HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: