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

Re: [HTCondor-users] (no subject)



import htcondor
coll = htcondor.Collector("<your.master.host.domain>")
schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd)Â
print(schedd_ad['MyAddress'])

schedd = htcondor.Schedd(schedd_ad)
sub = htcondor.Submit()
sub['executable'] = '/bin/sleep'
sub['arguments'] = '5m'
with schedd.transaction() as txn:
ÂÂÂ sub.queue(txn, 10)

This is not working for me still i can see same error:
with schedd.transaction() as txn:
RuntimeError: Failed to connect to schedd.

Instead i also tried schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd)Â ÂÂ
deafult Schedd is located and i see:Â<10.70.45.95:9618?addrs=10.70.45.95-9618&noUDP&sock=15064_809e_3>
Â

On Wed, Dec 4, 2019 at 3:57 PM Beyer, Christoph <christoph.beyer@xxxxxxx> wrote:
Hi,

I am a total loss when it comes to python but I did play around a little bit with the bindings and this works for me:


import htcondor
coll = htcondor.Collector("<your.master.host.domain>")
schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd, "<your.sched.host.domain>")
print(schedd_ad['MyAddress'])

schedd = htcondor.Schedd(schedd_ad)
sub = htcondor.Submit()
sub['executable'] = '/bin/sleep'
sub['arguments'] = '5m'
with schedd.transaction() as txn:
ÂÂÂ sub.queue(txn, 10)

I do have a htmap example as well somewhere if you want to try that too ...

--
Christoph Beyer
DESY Hamburg
IT-Department

Notkestr. 85
Building 02b, Room 009
22607 Hamburg

phone:+49-(0)40-8998-2317
mail: christoph.beyer@xxxxxxx


Von: "Htcondor user" <htcondor.user@xxxxxxxxx>
An: "htcondor-users" <htcondor-users@xxxxxxxxxxx>
Gesendet: Mittwoch, 4. Dezember 2019 11:14:26
Betreff: Re: [HTCondor-users] (no subject)

HiÂchristoph,

Thanks for quick response.

coll = htcondor.Collector("10.70.29.170")Â # Create the object representing the collector.Â
schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd) # Locate the default schedd.
print (schedd_ad['MyAddress'])

master_param = htcondor.RemoteParam(schedd_ad)
print (master_param)

schedd = htcondor.Schedd(schedd_ad) #Create the object representing the schedd.
print (schedd)

sub = htcondor.Submit({"executable": "/bin/sleep", "arguments": "5m"})

with schedd.transaction() as txn:
 Âprint(sub.queue(txn))

i can see :Â

<htcondor.htcondor.RemoteParam object at 0x7f9dcb084c38>

<htcondor.htcondor.Schedd object at 0x7f8eef5e7ca8>

Even after getting Schedd object still i am gettingÂRuntimeError: Failed to connect to schedd

I understand schedd daemon is running, but i am not able to connect to that daemon.Â

Am i missing something? Is there any steps to connect to schedd


Thanks.

On Wed, Dec 4, 2019 at 2:37 PM Beyer, Christoph <christoph.beyer@xxxxxxx> wrote:
Hi,

I did not check this myself but it is on my todo list:

In HTCondor, a configuration prefix may indicate that a setting is specific to that daemon. By default, the Python bindingâs prefix is TOOL.

see:

So I guess

TOOL_CONDOR_HOSTetc.

should do the trick ?

Best
Christoph

--
Christoph Beyer
DESY Hamburg
IT-Department

Notkestr. 85
Building 02b, Room 009
22607 Hamburg

phone:+49-(0)40-8998-2317
mail: christoph.beyer@xxxxxxx


Von: "Htcondor user" <htcondor.user@xxxxxxxxx>
An: "htcondor-users" <htcondor-users@xxxxxxxxxxx>
Gesendet: Mittwoch, 4. Dezember 2019 06:31:20
Betreff: [HTCondor-users] (no subject)

Hi All,
Just a week back i started learning htcondor. My questions may be silly / very basic level sorry for that.

I installed a Htcondor on my windows machine, i want to make my windows machine as aÂ"Central Manger"
Â
From my linux VM, using python bindings i want toÂ"submit"Â jobs on my windowsÂ"central manger"

I have 2 problems:
1) IÂ wroteÂ
coll = htcondor.Collector("10.70.29.170")
schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd)
schedd = htcondor.Schedd(schedd_ad)

while creating collector object i directly passed my windows ip address to accessÂcollector daemon, it worked.

I want Same functionality (access collector, schedd daemon in linux vm) through condor_config file: I tried to write condor_config file as below:
CONDOR_HOST =Â
COLLECTOR_HOST= windows ip
DAEMON_LIST = MASTER, STARTD, SCHEDD
LOCAL_DIR = C:\condorÂÂ

but this didÂnot work. can any one help me withÂcondor_config file. what setup i am missing?

2)Â
coll = htcondor.Collector("10.70.29.170")
schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd)
schedd = htcondor.Schedd(schedd_ad)
print (schedd)

Output<htcondor.htcondor.Schedd object at 0x7f52781c5e68>
Â
now collector, schedd daemon's are running in my linux vm. but, when i do:

sub = htcondor.Submit({"executable": "/bin/sleep", "arguments": "5m"})
with schedd.transaction() as txn:
 Âprint(sub.queue(txn))Â

I can see a error:ÂÂRuntimeError: Failed to connect to schedd.    Â

Do i need to make any other configuration to connect to schedd?Â


Thanks in advance.

_______________________________________________
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/
_______________________________________________
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/

_______________________________________________
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/
_______________________________________________
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/