Skip to content

Commit

Permalink
Merge branch 'bosco-cluster-remote-hosts' into bosco-cluster-remote-h…
Browse files Browse the repository at this point in the history
…osts.master
  • Loading branch information
edquist committed Nov 14, 2019
2 parents 5c6626b + 789f165 commit ee4237a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ install(PROGRAMS
contrib/apelscripts/condor_blah.sh
contrib/apelscripts/condor_batch.sh
contrib/bdii/htcondor-ce-provider
contrib/bosco/bosco-cluster-remote-hosts.py
contrib/bosco/bosco-cluster-remote-hosts.sh
DESTINATION ${SHARE_INSTALL_PREFIX}/condor-ce)

install(PROGRAMS
Expand Down
20 changes: 20 additions & 0 deletions contrib/bosco/bosco-cluster-remote-hosts.py
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])

9 changes: 9 additions & 0 deletions contrib/bosco/bosco-cluster-remote-hosts.sh
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

1 change: 1 addition & 0 deletions rpm/htcondor-ce.spec
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ install -m 0755 -d -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
%config(noreplace) %{_sysconfdir}/condor-ce/config.d/02-ce-bosco.conf
%{_datadir}/condor-ce/config.d/02-ce-bosco-defaults.conf
%config %{_datadir}/condor-ce/config.d/51-gratia.conf
%dir %{_sysconfdir}/condor-ce/bosco_override

%files client

Expand Down

0 comments on commit ee4237a

Please sign in to comment.