[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Issue getting started with Python Condor bindings (Jamie Rajewski)



Hi Josh,

I found the mistake and it was a dumb one; I had shelled into the submit node container as root to install the bindings for testing, and forgot that root cannot submit jobs (which I saw when I tried to just use condor_submit).

I then logged in to the same place as a regular user and it worked just fine.

Thank you!

On Aug 27 2020, at 7:21 am, htcondor-users-request@xxxxxxxxxxx wrote:
Send HTCondor-users mailing list submissions to
htcondor-users@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
or, via email, send a message with subject or body 'help' to
htcondor-users-request@xxxxxxxxxxx

You can reach the person managing the list at
htcondor-users-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of HTCondor-users digest..."


Today's Topics:

1. Issue getting started with Python Condor bindings (Jamie Rajewski)
2. Best way to personalize `condor_ssh_to_job_shell_setup`
(Joan Josep Piles-Contreras)
3. Re: Issue getting started with Python Condor bindings
(Josh Karpel)


----------------------------------------------------------------------

Message: 1
Date: Wed, 26 Aug 2020 12:54:33 -0600
From: Jamie Rajewski <jrajewsk@xxxxxxxxxxx>
To: "=?utf-8?Q?htcondor-users=40cs.wisc.edu?="
<htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Issue getting started with Python Condor
bindings
Message-ID: <8ABF1CFB-F5AF-4FFB-8AE4-24FEB65CF9AD@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Hi,

I was going through the tutorials for the API when I figured I may as well test them on our own cluster running Condor 8.8.9. I installed the API version corresponding to our Condor version for both python2 (2.7.5) and 3 (3.6.8).
I tried the following test example in a file labelled condor.py, first in python2:

import htcondor
import classad

schedd = htcondor.Schedd()
sub = htcondor.Submit()
sub['executable'] = '/bin/sleep'
sub['arguments'] = '5m'

with schedd.transaction() as txn:
sub.queue(txn, 10)
but got an error:

Traceback (most recent call last):
File "condor.py", line 12, in <module>
sub.queue(txn, 10)
RuntimeError: Failed to abort transaction.
terminate called after throwing an instance of 'boost::python::error_already_set'
Aborted (core dumped)
I then re-ran it in python3 and got a similar but slightly more detailed exception:
Traceback (most recent call last):
File "condor.py", line 12, in <module>
sub.queue(txn, 10)
RuntimeError: Failed to create new proc ID.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "condor.py", line 12, in <module>
sub.queue(txn, 10)
RuntimeError: Failed to abort transaction.
terminate called after throwing an instance of 'boost::python::error_already_set'
Aborted (core dumped)
I checked to ensure that the scheduler was correctly found (it was, and this is running on the schedd node too). Any ideas?

Thank you!
Jamie Rajewski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www-auth.cs.wisc.edu/lists/htcondor-users/attachments/20200826/a8b89a2d/attachment.html>

------------------------------

Message: 2
Date: Thu, 27 Aug 2020 14:09:54 +0200
From: Joan Josep Piles-Contreras <jpiles@xxxxxxxxxxxxxxxx>
To: "htcondor-users@xxxxxxxxxxx" <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Best way to personalize
`condor_ssh_to_job_shell_setup`
Message-ID: <b43b3c84-3af7-bf2e-7439-fe22a286c9ab@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi,

What would be the best way to personalize
`/usr/lib/condor/libexec/condor_ssh_to_job_shell_setup`? So far, we're
modifying the file directly, but this also means that we have to
remember to redo the modifications after each upgrade (we use ubuntu,
and it gets overwritten each time).

Ideally we'd like either to hook into that file to add a few commands,
or to be able to run a different one altogether (that would eventually
call the system-provided version).

We have found a knob for SSH_TO_JOB_SSHD_CONFIG_TEMPLATE, but not for
the final shell setup.

The background is that we have some specific setup to do before each
session, setting some environment variables, and while it works with a
custom job wrapper for "normal" jobs, the environment setup gets lost
with the new ssh session.

Best,

Joan

--
Dr. Joan Josep Piles-Contreras
ZWE Scientific Computing
Max Planck Institute for Intelligent Systems
(p) +49 7071 601 1750

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5189 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://www-auth.cs.wisc.edu/lists/htcondor-users/attachments/20200827/f752bdbf/attachment.p7s>

------------------------------

Message: 3
Date: Thu, 27 Aug 2020 08:18:48 -0500
From: Josh Karpel <karpel@xxxxxxxx>
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Issue getting started with Python Condor
bindings
Message-ID:
<CALHnOrC3tvrkxfJbAM1XNjt_qf8OsjeqaxYUqLQbCFiAnChqkA@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Hi Jamie,

Are you able to submit jobs using the condor_submit and submit file
workflow? Anything interesting in the schedd logs after you try to submit
through Python?

My only other thought right now is that the tutorial are nominally written
for the 8.9 series, but I don't see anything in your code that would be
different between 8.8 and 8.9.


Josh Karpel
karpel@xxxxxxxx


On Wed, Aug 26, 2020 at 1:56 PM Jamie Rajewski <jrajewsk@xxxxxxxxxxx> wrote:

> Hi,
>
> I was going through the tutorials for the API when I figured I may as well
> test them on our own cluster running Condor 8.8.9. I installed the API
> version corresponding to our Condor version for both python2 (2.7.5) and 3
> (3.6.8).
>
> I tried the following test example in a file labelled condor.py, first in
> python2:
>
> import htcondor
> import classad
>
> schedd = htcondor.Schedd()
> sub = htcondor.Submit()
> sub['executable'] = '/bin/sleep'
> sub['arguments'] = '5m'
>
> with schedd.transaction() as txn:
> sub.queue(txn, 10)
>
> but got an error:
>
> Traceback (most recent call last):
> File "condor.py", line 12, in <module>
> sub.queue(txn, 10)
> RuntimeError: Failed to abort transaction.
> terminate called after throwing an instance of 'boost::python::error_already_set'
> Aborted (core dumped)
>
> I then re-ran it in python3 and got a similar but slightly more detailed
> exception:
>
> Traceback (most recent call last):
> File "condor.py", line 12, in <module>
> sub.queue(txn, 10)
> RuntimeError: Failed to create new proc ID.
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "condor.py", line 12, in <module>
> sub.queue(txn, 10)
> RuntimeError: Failed to abort transaction.
> terminate called after throwing an instance of 'boost::python::error_already_set'
> Aborted (core dumped)
>
> I checked to ensure that the scheduler was correctly found (it was, and
> this is running on the schedd node too). Any ideas?
>
> Thank you!
>
> Jamie Rajewski
>
> [image: Sent from Mailspring]
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with
> a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www-auth.cs.wisc.edu/lists/htcondor-users/attachments/20200827/55258904/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
HTCondor-users mailing list
HTCondor-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

------------------------------

End of HTCondor-users Digest, Vol 81, Issue 33
**********************************************
Sent from Mailspring