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

Re: [HTCondor-users] Trapping condor_hold in Python scripts on Windows



Also, I have already seen all the link that you have sent to me.
Can you just tell me what wrong with my config file, please ??
I come from SLURM, that surely why I am lost.

Also, how do you want to proceed with your python code ?
If it is already a big code, why not try a control file system ? Same as radios for example.
If it i a little script, then may be you can multi-process it and build a listener for the "sended network order".
I use these a lot with zmq, also other message interface might be better for you.

Ah, yes, for the linkage python, I will connect that with cygwin python for jobs.
For Htcondor request, if possible, first something on my raspberry or in my development server on the production cluster.

Thanks.
Best Regards.
Benjamin.



2015-08-10 20:01 GMT+02:00 Benjamin LIPERE <benjamin.lipere123@xxxxxxxxx>:
All explanation and config in the joint document.

Thanks for your help !!
Best Regards.
Benjamin.

2015-08-10 19:59 GMT+02:00 Benjamin LIPERE <benjamin.lipere123@xxxxxxxxx>:
Thanks for your answer.

I have the condor-8.2.8 on Windows and linux and it work.
I think it is my config files and an error on condor credential.

If I have these, I am all setup.
Thanks for your help !!
Best Regards.
Benjamin.

2015-08-10 19:04 GMT+02:00 John (TJ) Knoeller <johnkn@xxxxxxxxxxx>:
You can get an installer for HTCondor for Windows and the sources here:
https://research.cs.wisc.edu/htcondor/downloads/

I would recommend that you install 8.3.7 as it is close to what will in the upcoming new stable 8.4 release and
has working bindings for python 2.7 on Windows.ÂÂ

The sources are also mirrored on github.
https://github.com/htcondor/htcondor

And we have a wiki if you need help figuring out how to build, or settings up various configurations.
https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki


On 8/10/2015 11:39 AM, Benjamin LIPERE wrote:
Hello.

Sorry to be a bother (I am a Newbie).
But you said three world that interest me, Windows, Python, HTcondor.
I have resources for help you on anything like that, and I am a python developer.
Can you help start with HTcondor, and I will have a look to your problem.

I may have a way or two to reproduce SIGNAL for your script.
I am interested in testing the method too !

So can we work together on that, please ??

Thank you very much.
Best Regards.
Benjamin.



2015-08-10 18:00 GMT+02:00 John (TJ) Knoeller <johnkn@xxxxxxxxxxx>:
Windows doesn't actually have signals, so HTCondor simulates them when talking to it's own daemons
by sending socket messages - so when the starter log on windows says 'Got SIGTERM' it's lying.
what it really got was a daemon command message.

We can't do the same thing for jobs though, for windows jobs we send a WM_CLOSE message to the job.
So you want to somehow catch the WM_CLOSE in python and treat it like a SIGTERM.

I would imagine that this would involve somehow getting python to register a ConsoleControlHandler callback
https://msdn.microsoft.com/en-us/library/ms686016(VS.85).aspx

-tj


On 8/7/2015 2:16 PM, Ben Cotton wrote:
Has anyone had any luck trapping when a Python script is placed on
hold on Windows? My proof-of-concept script below works on Linux, but
not on Windows, despite the fact that the starterlog suggests that it
should:

08/07/15 14:53:10 (pid:7952) Got SIGTERM. Performing graceful shutdown.

import os
import signal
import sys
import time

def cleanShutdown(signal, frame):
  Â'''A method to handle shutdowns. This is necessary to prevent the agent from
  Âhanging on a HTCondor shutdown, since the shutdown script sends SIGQUIT
  Âinstead of SIGTERM.'''

  Âprint 'Received signal %i, shutting down server' % signal
  Âsys.exit(0)

# Capture SIGINT and SIGQUIT
signal.signal(signal.SIGINT,cleanShutdown)
signal.signal(signal.SIGTERM,cleanShutdown)
if os.name != 'nt':
  Âsignal.signal(signal.SIGQUIT,cleanShutdown)

time.sleep(900)


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



--
LIPERE Benjamin
Le logis de paille
87270, Chaptelat
FRANCE
06 26 14 35 20
benjamin.lipere123@xxxxxxxxx


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



--
LIPERE Benjamin
Le logis de paille
87270, Chaptelat
FRANCE
06 26 14 35 20
benjamin.lipere123@xxxxxxxxx



--
LIPERE Benjamin
Le logis de paille
87270, Chaptelat
FRANCE
06 26 14 35 20
benjamin.lipere123@xxxxxxxxx



--
LIPERE Benjamin
Le logis de paille
87270, Chaptelat
FRANCE
06 26 14 35 20
benjamin.lipere123@xxxxxxxxx