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

Re: [HTCondor-users] Are file paths in the config macros strings or expressions?



In HTCondor config files, you would leave the path unquoted.    The config parser will remove leading and trailing whitespace from values, but it will not remove internal spaces or change any other character 

If you have a config value that is quoted and you want to remove the quotes,  the $F() macro expansion will do that

   SINGULARITY_PATH = "/my path that can have spaces/singularity"
   SINGLULARITY = $F(SINGULARITY_PATH)

In the above configuration fragment SINGULARITY_PATH is quoted, but SINGULARITY is not. 

-tj

-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Marco Mambelli
Sent: Tuesday, August 4, 2020 10:40 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Cc: Edgar Fajardo <emfajard@xxxxxxxx>
Subject: [HTCondor-users] Are file paths in the config macros strings or expressions?

Greetings,
I'm not sure what is the correct way to handle file paths (e.g. the one to the singularity binary) in the condor config macros
Should they be strings (quoted) or expressions (left unquoted)?

In a specific case I have a variable, SINGULARITY_PATH that contains the path to the singularity binary.
So I'd like to define SINGULARITY using that variable:
SINGULARITY = $(SINGULARITY_PATH)

Should it be:
SINGULARITY_PATH = "/my path that can have spaces/singularity"
or
SINGULARITY_PATH = /my path that can have spaces/singularity
?

It seems that the quotes are causing problems, are interpreted literally:
'"/cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity" --version' did not exit successfully (code 11018); the first line of output was ''

But I'm not sure the path w/o quotes would be protected against corner cases in the file path (spaces, unusual characters)

Any advice?

Thanks,
Marco


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

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