-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bosco-cluster-remote-hosts' into bosco-cluster-remote-h…
…osts.master
- Loading branch information
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/python | ||
|
||
import os | ||
import subprocess | ||
|
||
try: | ||
import classad | ||
import htcondor | ||
except ImportError: | ||
sys.exit("ERROR: Could not load HTCondor Python bindings. " | ||
"Ensure the 'htcondor' and 'classad' are in PYTHONPATH") | ||
|
||
jre = classad.parseAds('JOB_ROUTER_ENTRIES') | ||
grs = ( x["GridResource"] for x in jre ) | ||
rhosts = ( x.split()[1:3] for x in grs ) | ||
|
||
for batchtype, rhost in rhosts: | ||
subprocess.call(['bosco_cluster', '-o', os.getenv("OVERRIDE_DIR"), | ||
rhost, batchtype]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Source condor-ce environment | ||
[ -f /usr/share/condor-ce/condor_ce_env_bootstrap ] && | ||
. /usr/share/condor-ce/condor_ce_env_bootstrap | ||
|
||
export OVERRIDE_DIR=/etc/condor-ce/bosco_override | ||
/usr/share/condor-ce/bosco-cluster-remote-hosts.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters