<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 11, 2014 at 3:00 PM, Stuart Bishop <span dir="ltr"><<a href="mailto:stuart.bishop@canonical.com" target="_blank">stuart.bishop@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 11 August 2014 18:20, William Reade <<a href="mailto:william.reade@canonical.com">william.reade@canonical.com</a>> wrote:<br>

<br>
> I'd like to explore your use cases a bit more to see if we can find a clean<br>
> solution to your problems that doesn't go too far down the (2) road that I'm<br>
> nervous about. (The try-again-later mechanism is much smaller and cleaner<br>
> and I think we can accommodate that one pretty easily, fwiw -- but what are<br>
> the other problems you want to solve?)<br>
<br>
</div>Memory related settings in PostgreSQL will only take effect when the<br>
database is bounced. I need to avoid bouncing the primary database:<br>
 1) when backups are in progress.<br>
 2) when a hot standby unit is being rebuilt from the primary.<br>
<br>
Being able to have a hook abort and be retried later would let me<br>
avoid blocking.<br></blockquote><div><br></div><div>Hmm. The trouble here is that releasing the execution lock would *also* free up the machine agent to be rebooted -- the benefits of being able to run other hooks while you wait don't feel quite so compelling to me now.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A locking service would be useful too for units to signal certain<br>
operations (with locks automatically released when the hooks that took<br>
them exit). The in-progress update to the Cassandra charm has<br>
convoluted logic in its peer relation hooks to do rolling restarts of<br>
all the nodes, and I imagine MongoDB, Swift and many others have the<br>
same issue to solve.<br></blockquote><div><br></div><div>I see -- to get rolling restarts you'd need to spread an awful lot of finicky logic across the peer relation hooks. I'm expecting to address this issue by allowing leaders to run actions on their minions. ie as leader, you can just run the action and wait for it to succeed or fail before continuing, all inside a single hook. Sane/helpful?</div>
<div><br></div><div>Cheers</div><div>William</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Stuart Bishop <<a href="mailto:stuart.bishop@canonical.com">stuart.bishop@canonical.com</a>><br>
</font></span></blockquote></div><br></div></div>