[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?



Hi,

as a rule of thumb, configuration always uses values verbatim. It is the systems those values are passed *to* that might interpret them. E.g. if it goes to ClassAds then values are expected expressions.

Is the value used just in the config? Donât quote the string. Is the value passed to a ClassAd? Do quote the string.
The configuration syntax seems to be only sensitive to comments (`#`), line-continuations (`\/n`) and macros (`$(...)`).

So in your case,
SINGULARITY_PATH = /my path that can have spaces/singularity
should be fine.

In the interest of other tools that may fail to digest this path, it might be best to avoid such paths to begin with, however.

Cheers,
Max

On 5. Aug 2020, at 09:56, ervikrant06@xxxxxxxxx wrote:

We are using all paths without quotes and never encountered issues while accessing them in variables however our paths don't contain spaces. 

Following simple conf indicates that space doesn't cause an issue however wait for expert opinion on this topic. 

test1.node:/etc/condor/config.d# grep -i "test" 100-vaggarwal
TEST = /spare/test 1
TEST1 = $(TEST)
test1.node :/etc/condor/config.d# condor_config_val test1
/spare/test 1
test1.node :/etc/condor/config.d#

Thanks & Regards,
Vikrant Aggarwal


On Wed, Aug 5, 2020 at 9:10 AM Marco Mambelli <marcom@xxxxxxxx> wrote:
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/
_______________________________________________
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/

Attachment: smime.p7s
Description: S/MIME cryptographic signature