@@ -426,7 +426,7 @@ def _configure_htcondor_ce_probe(self):
426
426
return False
427
427
return True
428
428
429
- def _verify_gratia_dirs_for_htcondor_ce_probe (self ):
429
+ def _verify_gratia_dirs_for_htcondor_ce_probe (self ) -> bool :
430
430
"""
431
431
Verify that the condor per_job_history directory and the DataFolder
432
432
directory are the same and warn if admin if the two don't match
@@ -442,21 +442,20 @@ def _verify_gratia_dirs_for_htcondor_ce_probe(self):
442
442
if not match :
443
443
return True
444
444
445
- valid = True
446
445
data_folder = match .group (1 )
447
446
data_folder = data_folder .strip ('" \t ' )
448
447
# Per Gratia-126 DataFolder must end in / otherwise gratia won't find certinfo files
449
448
if not data_folder .endswith ('/' ):
450
449
self .logger .error ("DataFolder setting in %s must end in a /" , config_location )
451
- valid = False
450
+ return False
452
451
453
452
history_dir = self ._get_condor_ce_history_dir ()
454
453
if not history_dir :
455
- self .logger .warning (textwrap .fill (
454
+ self .logger .error (textwrap .fill (
456
455
"""Could not verify DataFolder correctness: unable to get PER_JOB_HISTORY_DIR
457
456
for the schedd. This may be caused by PER_JOB_HISTORY_DIR not being defined."""
458
457
))
459
- return valid
458
+ return False
460
459
461
460
# os.path.samefile will die if the paths don't exist so check that explicitly (SOFTWARE-1735)
462
461
if not os .path .exists (data_folder ):
@@ -468,7 +467,9 @@ def _verify_gratia_dirs_for_htcondor_ce_probe(self):
468
467
return False
469
468
else :
470
469
try :
471
- if not os .path .samefile (data_folder , history_dir ):
470
+ if os .path .samefile (data_folder , history_dir ):
471
+ return True
472
+ else :
472
473
self .logger .error ("DataFolder setting in %s (%s) and condor-ce PER_JOB_HISTORY_DIR (%s) "
473
474
"do not match, these settings must match!" ,
474
475
config_location , data_folder , history_dir )
0 commit comments