jobsub_q --better-analyze often asks wrong schedd for job info
The jobsub_q command, for example:
jobsub_q -G mu2e --better-analyze --jobid firstname.lastname@example.org
Is trying to ask schedd jobsub03.fnal.gov to analyze why job 2898203.0 has not started.
There is intermediate code between the above jobsub_q command and the resulting condor_q command that finds the least busy schedd (there are currently 3) and directs the query to that one. In the above example I found this in the log:
condor_q -allusers -nobatch -name jobsub02.fnal.gov -better-analyze -constraint 'True && True && regexp("jobsub03.fnal.gov#2898203\.0#.*",GlobalJobId) && True'.
-name jobsub02.fnal.gov should be -name jobsub03.fnal.gov. This got through CI as we only have one schedd on our test setup.
#2 Updated by Shreyas Bhat 11 months ago
So this looks good, but I'm wondering if lines 267-279 can be more cleanly and clearly accomplished with regex matching, since we're trying to extract the schedd there. Perhaps something like:
if a_filter: jobid_cnst_regex = re.compile('JobsubJobId==\"\d+(?:\.\d+)?@(.+)\"') match = jobid_cnst_regex.search(a_filter) if match is not None and match.groups(): s_list = list(match.groups(1))
What are your thoughts on that?