[Maas-devel] RFC: "Serialising" power actions
Julian Edwards
julian.edwards at canonical.com
Wed Sep 17 00:09:42 UTC 2014
On Tuesday 16 Sep 2014 21:01:57 Graham Binns wrote:
> I've had a good look at the code this evening and I'm happy to start
> hacking on this in the morning unless there are strong objections — Word of
> God appreciated, please.
I have severe reservations with the approach discussed, which boil down to:
* superseding power actions is undesirable
* you cannot rely on cancellation of an outstanding operation (in what state
would it leave the machine?)
* Storing state in the pserv without a means to recover it is a recipe for
disaster
Here's my counter proposal again, which I think is a lot simpler:
1 Already implemented: pserv is dumb and just issues power commands as
requested, with a callback to the region for failure and success.
2 We do not allow concurrent power operations while an outstanding one is in
progress (ie wait for the callback), although you could detect a request that
is the same as the outstanding one and respond without an error.
3 We add a new column to Node to indicate the desired power state (if it's
different from the current one it indicates an outstanding operation). This
has the bonus of being something you can display in the UI.
4 If the pserv (or its link) goes down, when it comes back up we need to
either re-issue the outstanding power requests or request the current state
and correct it as necessary. This is potentially work that can be deferred
for now, but it cannot be left out altogether.
So in terms of work to do, it's quite easy and quick.
J
More information about the Maas-devel
mailing list