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

Re: [HTCondor-users] Drain HTCondor worker by setting instance metadata value



Is it possible to change instance metadata on OpenStack VMs once they have already been launched?

With other clouds that is not possible.


Steve Timm



From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Todd Tannenbaum <tannenba@xxxxxxxxxxx>
Sent: Tuesday, September 5, 2017 11:28:37 AM
To: HTCondor-Users Mail List; Sveinung Rundhovde
Subject: Re: [HTCondor-users] Drain HTCondor worker by setting instance metadata value
 
On 9/3/2017 12:36 PM, Sveinung Rundhovde wrote:
> Hi,
>
> I am setting up a system with a HTCondor pool running on OpenStack. I am
> trying to create a mechanism that enables draining workers by setting a
> value in their metadata to true (data made available to the VM via a
> URL). It should also be possible to make them start accepting jobs again
> by resetting this value.
>
> So far I have come up with a couple of solutions that work, but not as
> well as I would like.
>
> The first is to use job hooks....
[snip]
> Is there a better way to do this?
>

Instead of twiddling with START expressions, you may find it easier to
have a script simply invoke the condor_drain command-line tool, aka
    condor_drain <machine-name>
to start a node draining, and then to cancel the draining activity and
start accepting jobs again, do
    condor_drain -cancel <machine-name>

See
   http://research.cs.wisc.edu/htcondor/manual/current/condor_drain.html

Your script to invoke condor_drain could be centralized (i.e. run on the
central manager), or distributed.

Also the same functionality is available via the HTCondor Python APIs,
specifically methods drainJobs() and cancelDrainJobs() in the Startd class.

regards,
Todd
_______________________________________________
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/