Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] flush stale machine classads
- Date: Thu, 6 Mar 2014 16:09:00 -0600
- From: Brian Bockelman <bbockelm@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] flush stale machine classads
What's that? You *dare* me to write such a script in python?
Challenge accepted!
#!/usr/bin/python
import optparse
import htcondor
parser = optparse.OptionParser()
parser.add_option("-p", "--pool", dest="pool", default="")
parser.add_option("-c", "--const", dest="constraint", default="true")
opts, args = parser.parse_args()
coll = htcondor.Collector(opts.pool)
ads = coll.query(htcondor.AdTypes.Startd, opts.constraint, ['MyAddress', 'Name'])
coll.advertise(ads, "INVALIDATE_STARTD_ADS")
Use your power wisely my friend...
On Mar 6, 2014, at 8:37 AM, Greg Thain <gthain@xxxxxxxxxxx> wrote:
> On 03/06/2014 07:04 AM, Pek Daniel wrote:
>> Hi,
>>
>> My question is: how can I "invalidate" stale machine classads by hand
>> immediately without having to change the value of CLASSAD_LIFETIME?
>>
>
> Assuming you have permissions to do so, you can create a minimal startd ad with
> just the Name and MyAddresss attributes for the slot you'd like to invalidate, and
> pass that to condor_advertise INVALIIDATE_STARTD_ADS:
>
>
> condor_status slot1@some_machine -l | egrep '(^MyAddr|^Name)' | condor_advertise INVALIDATE_STARTD_ADS
>
> -Greg
> _______________________________________________
> 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/