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



Thanks TJ, 
that helped moving forward but now the startd seems to want some quotes.

This was reported by Edgar after using 
SINGULARITY_PATH = "/my path that can have spaces/singularity"
SINGULARITY = $F(SINGULARITY_PATH)

08/05/20 06:41:26 (pid:13786) slot1: Changing state and activity: Claimed/Idle -> Preempting/Vacating
08/05/20 06:41:26 (pid:13786) slot1: State change: No preempting claim, returning to owner
08/05/20 06:41:26 (pid:13786) CONFIGURATION PROBLEM: Failed to insert ClassAd attribute SINGULARITY = /cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity.  The most common reason for this is that you forgot to quote a string value in the list of attributes being added to the STARTD ad.
08/05/20 06:41:26 (pid:13786) slot1: CONFIGURATION PROBLEM: Failed to insert ClassAd attribute SINGULARITY = /cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity.  The most common reason for this is that you forgot to quote a string value in the list of attributes being added to the slot1 ad.
08/05/20 06:41:26 (pid:13786) slot1: Changing state and activity: Preempting/Vacating -> Owner/Idle
08/05/20 06:41:26 (pid:13786) slot1: State change: IS_OWNER is false

Is SINGULARITY something special?
Should we add back the quotes in some other way?

Thanks,
Marco


> On Aug 5, 2020, at 9:06 AM, John M Knoeller <johnkn@xxxxxxxxxxx> wrote:
> 
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.cs.wisc.edu_mailman_listinfo_htcondor-2Dusers&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=EF06-Wh4L9CNLgD8bnIjNQ&m=oA3ZUKgQhlE69YU5xGEOPWx5RC_OZ404JKv3Ho1XNc4&s=ZNWlLV8N6DuN-HHEYSELLZfHrmmMRx-dazc-sYE6alU&e= 
> 
> The archives can be found at:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.cs.wisc.edu_archive_htcondor-2Dusers_&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=EF06-Wh4L9CNLgD8bnIjNQ&m=oA3ZUKgQhlE69YU5xGEOPWx5RC_OZ404JKv3Ho1XNc4&s=iTgRxPaZ7-MkQ0Oeh4ceK3y-xOOIseC212tzRXze5RQ&e= 
> 
> _______________________________________________
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.cs.wisc.edu_mailman_listinfo_htcondor-2Dusers&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=EF06-Wh4L9CNLgD8bnIjNQ&m=oA3ZUKgQhlE69YU5xGEOPWx5RC_OZ404JKv3Ho1XNc4&s=ZNWlLV8N6DuN-HHEYSELLZfHrmmMRx-dazc-sYE6alU&e= 
> 
> The archives can be found at:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.cs.wisc.edu_archive_htcondor-2Dusers_&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=EF06-Wh4L9CNLgD8bnIjNQ&m=oA3ZUKgQhlE69YU5xGEOPWx5RC_OZ404JKv3Ho1XNc4&s=iTgRxPaZ7-MkQ0Oeh4ceK3y-xOOIseC212tzRXze5RQ&e=