Skip to content

Commit d8a2a32

Browse files
committed
Get the schedd's PER_JOB_HISTORY_DIR but don't require a running schedd
1 parent c287206 commit d8a2a32

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

osg_configure/configure_modules/gratia.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,11 @@ def _verify_gratia_dirs_for_htcondor_ce_probe(self):
450450
self.logger.error("DataFolder setting in %s must end in a /", config_location)
451451
valid = False
452452

453-
# PER_JOB_HISTORY_DIR comes from the schedd, so if condor's not
454-
# running, we can't get a value (SOFTWARE-1564)
455453
history_dir = self._get_condor_ce_history_dir()
456454
if not history_dir:
457455
self.logger.warning(textwrap.fill(
458456
"""Could not verify DataFolder correctness: unable to get PER_JOB_HISTORY_DIR
459-
from the running schedd. This may be caused by the condor-ce schedd not running
460-
or by PER_JOB_HISTORY_DIR not being defined."""
457+
for the schedd. This may be caused by PER_JOB_HISTORY_DIR not being defined."""
461458
))
462459
return valid
463460

@@ -467,7 +464,7 @@ def _verify_gratia_dirs_for_htcondor_ce_probe(self):
467464
config_location, data_folder)
468465
return False
469466
elif not os.path.exists(history_dir):
470-
self.logger.error("condor-ce PER_JOB_HISTORY_DIR (%s) points to a nonexistent location", history_dir)
467+
self.logger.error("condor-ce schedd's PER_JOB_HISTORY_DIR (%s) points to a nonexistent location", history_dir)
471468
return False
472469
else:
473470
try:
@@ -478,12 +475,12 @@ def _verify_gratia_dirs_for_htcondor_ce_probe(self):
478475
return False
479476
except OSError as e:
480477
self.logger.error(
481-
"Error comparing DataFolder setting in %s (%s) and condor PER_JOB_HISTORY_DIR %s:\n%s",
478+
"Error comparing DataFolder setting in %s (%s) and condor-ce PER_JOB_HISTORY_DIR %s:\n%s",
482479
config_location, data_folder, history_dir, e)
483480
return False
484481

485482
def _get_condor_ce_history_dir(self):
486-
cmd = [CONDOR_CE_CONFIG_VAL, '-schedd', 'PER_JOB_HISTORY_DIR']
483+
cmd = [CONDOR_CE_CONFIG_VAL, '-subsystem', 'SCHEDD', 'PER_JOB_HISTORY_DIR']
487484
try:
488485
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="latin-1")
489486
history_dir, errtext = process.communicate()

0 commit comments

Comments
 (0)