fermitools / jobsub_lite

jobsub_lite is a wrapper for HTCondor job submission
Apache License 2.0
1 stars 7 forks source link

CVMFS logs in job logs are not properly retrieved #574

Closed vitodb closed 3 weeks ago

vitodb commented 1 month ago

In jobsub stderr logs CVMFS logs are not properly retrieved. For example in this job stderr log toward the bottom there is:

cvmfs info:
sed: -e expression #1, char 31: unterminated address regex
marcmengel commented 1 month ago

This would almost certainly be the sed filter line set at https://github.com/fermitools/jobsub_lite/blob/master/templates/simple/simple.sh#L455

so one possibility I see right away is in the simple.sh template https://github.com/fermitools/jobsub_lite/blob/master/templates/simple/simple.sh#L443 we have a "dune" where we ought to have a {{group}} when trying to get the second latest log message, So this might work for "dune" but not others(?).

vitodb commented 1 month ago

Other than replacing "dune" with {{group}} as mentioned by Marc, I think we need another change in this line https://github.com/fermitools/jobsub_lite/blob/master/templates/simple/simple.sh#L443 here for the code

second_latest_rev_re=$( echo "$dummyline"; attr -g logbuffer /cvmfs/dune.opensciencegrid.org/ | 

only the attr output is passed through the pipe and folloing chained commands, this is causing the variable second_latest_rev_re to be on two lines. Later on this variable is used in https://github.com/fermitools/jobsub_lite/blob/master/templates/simple/simple.sh#L455 and being second_latest_rev_re on two lines is breaking the sed expression.

I think line 443 should be replaced by:

second_latest_rev_re=$( (echo "$dummyline"; attr -g logbuffer /cvmfs/dune.opensciencegrid.org/) | 

to let the "echo" output to go through the pipe and the other chained commands.