-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
htcondor: migrate to myschedd #260
Conversation
@@ -95,6 +94,8 @@ def execute(self): | |||
"""Execute / submit a job with HTCondor.""" | |||
os.chdir(self.workflow_workspace) | |||
initialize_krb5_token(workflow_uuid=self.workflow_uuid) | |||
globals()["htcondor"] = __import__("htcondor") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Perhaps move the import magic to the constructor, if it works OK there, because most people would expect this to happen at the class constructor stage.
-
Please leave a comment why we do this, so that we recall for later. Something like "# We need to import htcondor package later during runtime after the Kerberos environment is fully initialised, otherwise..." (The behaviour of
htcondor
package is not exactly Python-idiomatic...)
6c5940d
to
c37f778
Compare
Dockerfile
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete trailing whitespace after this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
etc/myschedd.yaml
Outdated
tzero: | ||
standard: | ||
- tbird02.cern.ch | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete final trailing blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
@@ -90,11 +89,15 @@ def __init__( | |||
self.workflow = self._get_workflow() | |||
self.unpacked_img = unpacked_img | |||
|
|||
# We need to import the htcondor package later during runtime after the Kerberos environment is fully initialised. | |||
# Without a valid Kerberos ticket, importing will exit with "ERROR: Unauthorized 401 - do you have authentication tokens? Error "/usr/bin/myschedd.sh |" | |||
initialize_krb5_token(workflow_uuid=self.workflow_uuid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Can you please add yourself to the
AUTHORS.rst
file? -
Can you add a note to the
CHANGES.rst
file about this change? For example: "Amends CERN HTCondor compute backend to use the new myschedd connection library"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
d555017
to
a177a9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on HTC, working fine.
The certificate update may be better done by installing upstream CERN certificate package, instead of maintaining our own copy here, but let's make another issue about that.
Migrate from using
cernbatchsubmit
tomyschedd
for submitting job to CERN HTCondor.In r-j-controller if you tried to import
htcondor
before having a valid kerberos ticket you gotHence changed the order and added the import into the method, is this okey to do?
closes #256