<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 16, 2014 at 7:09 PM, Julian Edwards <span dir="ltr"><<a href="mailto:julian.edwards@canonical.com" target="_blank">julian.edwards@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tuesday 16 Sep 2014 21:01:57 Graham Binns wrote:<br>
> I've had a good look at the code this evening and I'm happy to start<br>
> hacking on this in the morning unless there are strong objections — Word of<br>
> God appreciated, please.<br>
<br>
</span>I have severe reservations with the approach discussed, which boil down to:<br>
<br>
* superseding power actions is undesirable<br>
* you cannot rely on cancellation of an outstanding operation (in what state<br>
would it leave the machine?)<br>
* Storing state in the pserv without a means to recover it is a recipe for<br>
disaster<br>
<br>
Here's my counter proposal again, which I think is a lot simpler:<br>
<br>
1 Already implemented: pserv is dumb and just issues power commands as<br>
requested, with a callback to the region for failure and success.<br>
<br>
2 We do not allow concurrent power operations while an outstanding one is in<br>
progress (ie wait for the callback), although you could detect a request that<br>
is the same as the outstanding one and respond without an error.<br></blockquote><div><br></div><div>Yes please :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> 3 We add a new column to Node to indicate the desired power state (if it's<br>
different from the current one it indicates an outstanding operation). This<br>
has the bonus of being something you can display in the UI.<br></blockquote><div><br></div><div>+1</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
4 If the pserv (or its link) goes down, when it comes back up we need to<br>
either re-issue the outstanding power requests or request the current state<br>
and correct it as necessary. This is potentially work that can be deferred<br>
for now, but it cannot be left out altogether.<br></blockquote><div><br></div><div>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.</div><div><br></div><div>Thanks for all the back and forth and discussion - it's great to see everyone really wanting to get this right.</div><div><br></div><div>-Dean </div></div></div></div>