On Tue, Jan 12, 2016 at 04:03:30PM +0100, 'Helga Velroyen' via ganeti-devel 
wrote:
> There is currently no way to clean up anything after (pre)
> hooks failed. LUs have a hook that is called after the hooks
> finish successfully, but any exception that aborts the hook
> execution is bubbled up till mcpu and then ignored.
> 
> This patch introduces another callback called
> 'HooksAbortCallBack'. Similar to 'HooksCallBack', this
> callback is called after the hook execution, but in this
> case only if the execution fails with an exception.
> 
> After the hook is called, the exception is rethrown in
> order to maintain the control flow as it was before.
> 
> Signed-off-by: Helga Velroyen <[email protected]>
> ---
>  lib/cmdlib/base.py | 24 ++++++++++++++++++++++++
>  lib/mcpu.py        | 11 ++++++++++-
>  2 files changed, 34 insertions(+), 1 deletion(-)

LGTM

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to