Updates:
        Status: Fixed
        Labels: -Milestone-Release2.11 Milestone-Release2.17

Comment #3 on issue 1033 by [email protected]: Failed node-add-pre hook leaves stray ssh keys
https://code.google.com/p/ganeti/issues/detail?id=1033

Fixed with:

commit 5029b47b39bce096d9a626d2a3b6c95e1b2ab7b7
Author: Helga Velroyen <[email protected]>
Date:   Tue Jan 12 13:38:32 2016 +0100

    Clean up after failed node-add-pre hooks

    If the pre hooks of a node adding operation fail, so far
    a stray key of the node to be added was left on the
    master node. This patch makes sure it is cleaned up
    in case of a hook failure.

    Signed-off-by: Helga Velroyen <[email protected]>
    Reviewed-by: Klaus Aehlig <[email protected]>

commit 3394a8c000fe018088ff6a3efabed099150b4795
Author: Helga Velroyen <[email protected]>
Date:   Tue Jan 12 14:57:47 2016 +0100

    Light-weight SSH key removal

    This patch adds an RPC call, which is a very light-weight
    version of removing an SSH key from the cluster. It simply
    only removes it from the public key file of the master.

    This is used later to clean up in case the pre-hooks for
    adding a node fail. When adding a node with 'gnt-node add',
    the client code in gnt_node adds the key to the public
    key file. If the hooks fail, so far this key was not
    cleaned up and manual intervention was necessary.

    To avoid any abuse of the RPC call, it includes a safety
    check which makes sure that only keys of nodes that are
    not in the cluster anymore (and thus are stray keys).

    Signed-off-by: Helga Velroyen <[email protected]>
    Reviewed-by: Klaus Aehlig <[email protected]>

commit d9ee31db4ef471a484e14ee61c3d6b26c97194f7
Author: Helga Velroyen <[email protected]>
Date:   Tue Jan 12 13:49:59 2016 +0100

    Introduce HooksAbortCallBack

    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]>
    Reviewed-by: Klaus Aehlig <[email protected]>


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Reply via email to