Skip to content

Commit

Permalink
htcondor: migrate to myschedd
Browse files Browse the repository at this point in the history
  • Loading branch information
Adelina Lintuluoto committed Jul 7, 2020
1 parent 04042bf commit 6c5940d
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 20 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ RUN if echo "$COMPUTE_BACKENDS" | grep -q "htcondorcern"; then \
export DEBIAN_FRONTEND=noninteractive ;\
apt-get -yq install wget alien gnupg2 ;\
wget -O ngbauth-submit.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/ngbauth-submit-0.23-1.el7.noarch.rpm; \
wget -O cernbatchsubmit.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/cernbatchsubmit-0.1.0-1.el7.x86_64.rpm; \
yes | alien -i cernbatchsubmit.rpm; \
wget -O myschedd.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/myschedd-1.5-1.el7.x86_64.rpm; \
yes | alien -i myschedd.rpm; \
yes | alien -i ngbauth-submit.rpm; \
wget -qO - http://research.cs.wisc.edu/htcondor/debian/HTCondor-Release.gpg.key | apt-key add -; \
echo "deb https://research.cs.wisc.edu/htcondor/debian/8.9/buster buster contrib" >>/etc/apt/sources.list; \
Expand All @@ -42,7 +42,9 @@ RUN if echo "$COMPUTE_BACKENDS" | grep -q "slurmcern"; then \
--no-install-recommends; \
fi

ADD etc/cernsubmit.yaml /etc/condor/
RUN mkdir -p /etc/myschedd
ADD etc/myschedd.yaml /etc/myschedd/

ADD etc/10_cernsubmit.config /etc/condor/config.d/

ADD etc/ngbauth-submit /etc/sysconfig/
Expand Down
9 changes: 7 additions & 2 deletions etc/10_cernsubmit.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
CONDOR_HOST = tweetybird04.cern.ch
LOCAL_CONFIG_FILE = /usr/bin/cernbatchsubmit|
CONDOR_HOST = tweetybird03.cern.ch, tweetybird04.cern.ch

SKIP_LOCAL_CONFIG_FILE=$ENV(SKIP_LOCAL_CONFIG_FILE:FALSE)
if ! $(SKIP_LOCAL_CONFIG_FILE)
LOCAL_CONFIG_FILE = /usr/bin/myschedd.sh |
endif

SEC_CLIENT_AUTHENTICATION_METHODS = KERBEROS
SEC_CREDENTIAL_PRODUCER = /usr/bin/batch_krb5_credential
FILESYSTEM_DOMAIN = cern.ch
Expand Down
Binary file modified etc/cernroot.crt
Binary file not shown.
13 changes: 0 additions & 13 deletions etc/cernsubmit.yaml

This file was deleted.

24 changes: 24 additions & 0 deletions etc/myschedd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
wtfis:
endpoint: https://wtfis.cern.ch:9008
resolve_url: true
bump:
maxrunningjobs: 8000
pools:
share:
standard:
- bigbird08.cern.ch
- bigbird09.cern.ch
- bigbird10.cern.ch
- bigbird11.cern.ch
- bigbird12.cern.ch
- bigbird13.cern.ch
- bigbird14.cern.ch
- bigbird15.cern.ch
- bigbird16.cern.ch
- bigbird17.cern.ch
- bigbird18.cern.ch
- bigbird19.cern.ch
tzero:
standard:
- tbird02.cern.ch

5 changes: 3 additions & 2 deletions reana_job_controller/htcondorcern_job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from shutil import copyfile

import classad
import htcondor
from flask import current_app
from reana_db.database import Session
from reana_db.models import Workflow
Expand Down Expand Up @@ -90,11 +89,13 @@ def __init__(
self.workflow = self._get_workflow()
self.unpacked_img = unpacked_img

initialize_krb5_token(workflow_uuid=self.workflow_uuid)
globals()["htcondor"] = __import__("htcondor")

@JobManager.execution_hook
def execute(self):
"""Execute / submit a job with HTCondor."""
os.chdir(self.workflow_workspace)
initialize_krb5_token(workflow_uuid=self.workflow_uuid)
job_ad = classad.ClassAd()
job_ad["JobDescription"] = (
self.workflow.get_full_workflow_name() + "_" + self.job_name
Expand Down

0 comments on commit 6c5940d

Please sign in to comment.