[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Condor-devel] Inconsistency in collector plug-in (API).
- Date: Wed, 11 Jul 2012 11:44:41 -0500 (CDT)
- From: Todd L Miller <tlmiller@xxxxxxxxxxx>
- Subject: [Condor-devel] Inconsistency in collector plug-in (API).
The collector passes query ads to the plug-in. However, the
offline & absent ad plugin return immediately upon encountering an ad for
which a hash key can not be made. This means that queries to the
collector that don't specify single machines are silently ignored by the
offline / absent ad plugin (and probably others). In particular, if an
admin wishes to force a certain set of machines offline or absent, s/he
will probably write a query ad with a constraint (e.g., all the machines
in this cluster), and be unable to do so.
Rather than just document this as a misfeature, we would like to
change the API so that update() and invalidate() are called not once with
a query ad, but once per ad being update()d or invalidate()d. Doing this
would obviously remove the need for plugins to duplicate the
query-processing code, ensuring that both types of query ads (and any we
might add in the future) are handled uniformly.
This change would also allow us to add a meaningful return value
to invalidate(), where the plug-in returning false would mean "don't
invalidate this ad". (It's not at all clear that "don't update this ad"
makes sense, but we could add that as well.) This would permit users (the
BaTLab, in particular) to track machines that leave the pool, even if they
do so "cleanly" -- that is, are killed with SIGTERM rather than SIGKILL.
Please let us know what you think.
(On another, related note, it appears that expire() already
functions this way, but isn't part of the official API. Should we merge
it in as well?)
- Todd L Miller