<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 16, 2014 at 6:43 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 11:42:48 Gavin Panella wrote:<br>
> On 15 September 2014 22:34, Graham Binns wrote:<br>
> ...<br>
><br>
> > 1: The current power action blocks all others until it as completed. Other<br>
> > power actions will be queued and executed in turn.<br>
> > - or -<br>
> > 2: Each power action supersedes any action that is currently executing —<br>
> > the existing action is cancelled and then the new action is run.<br>
> > - or -<br>
> > 3. We track the current ("now") and "next" actions for the node, but drop<br>
> > every action that comes in once those two slots are full.<br>
><br>
> I think #1 is wrong; apart from stress-testing I can't think of a<br>
> situation where I'd want every panic-and-frustration-induced click of<br>
> the power buttons in the UI to be recorded and acted upon. I just want<br>
> it to do the last one.<br>
><br>
> #3 is like #2, but you have to wait for the currently executing command<br>
> to finish. Boring!<br>
><br>
> I think #2 is the right starting point. In addition:<br>
<br>
</span>I disagree. You'll be back in the scenario where important power ops are<br>
ignored (and is a bug that I just fixed).<br>
<br>
For example, a machine is slow to power down and doesn't finish before a power<br>
up is issued. MAAS expects the node to have rebooted, but in fact it hasn't<br>
and at best will sit there not doing anything, at worst will reboot with old<br>
data.<br>
<br>
Effectively you've issued two power commands both of which were ignored.<br>
<br>
We *must* wait for an outstanding power op to finish one way or another,<br>
whether it fails or it succeeds.<br></blockquote><div><br></div><div>Agreed. As stated, you can't really cancel an executed command in a meaningful way so any solution that has canceling as part of the process doesn't make sense to me.</div><div><br></div><div>-Dean</div><div><br></div></div></div></div>