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

Re: [Condor-users] Copying job attrs into slot attrs



> Is there a way for copying a Job attribute over to the slot
> that it is running?

You bet. STARTD_EXPRS is what you want. See:

http://www.cs.wisc.edu/condor/manual/v7.2/3_3Configuration.html#16323

> I'm trying to configure a job policy that depends on how many
> slots are using a local resource.
>
> I've looked at STARTD_SLOT_ATTRS but I can't see a way of
> updating a slot attribute without using START_CRON_ etc.
> dynamic updates. The problem here is that I then depend on
> update intervals I might miss an update.
>
> By copying a job attribute over the policy can then simply
> count how many jobs on that machine are using a resource.
> Any thoughts?

You'll have to look at the value of this attribute for each slot. Each slot will get a unique instance of this attribute. You can cross-advertise these values in each slot using STARTD_SLOT_EXPRS. This makes a value that's slot specific appear in every other slot, prefixed with the string "slot#_".

So if you had:

STARTD_EXPRS = ClusterID
STARTD_SLOT_EXPRS = ClusterID

Then on a 2 slot machine, Slot 1 would have:

        ClusterID = 8908
        slot2_ClusterID = 123

And Slot 2 would have:

        ClusterID = 123
        slot1_ClusterID = 8908

- Ian

Confidentiality Notice.
This message may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution,  or copying  of this message, or any attachments, is strictly prohibited.  If you have received this message in error, please advise the sender by reply e-mail, and delete the message and any attachments.  Thank you.