← Back to team overview

maas-devel team mailing list archive

Re: RFC: "Serialising" power actions

 

On Tue, Sep 16, 2014 at 7:09 PM, Julian Edwards <
julian.edwards@xxxxxxxxxxxxx> wrote:

> 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.
>

Yes please :)


>  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.
>

+1


>
>  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.
>

Obviously this stuff isn't my call, but let me encourage you guys to error
on the side of being as accurate as possible and absolutely consistent.
That's going to be far less cumbersome than the fact that I can't do
something (cancel a power operation) which honestly I shouldn't be able to
do anyway because it isn't really possible. The approach mentioned above
takes the conservative route which I appreciate.

Thanks for all the back and forth and discussion - it's great to see
everyone really wanting to get this right.

-Dean

References