This fixes issue 1033. After a failed execution of hooks
during a node-add operation, a stray SSH key was left on
the master.

This was not trivial to solve and thus this patch series
does it in these steps:
- Introduce a callback to LUs that is called in case the
  preparation hooks fail.
- Implement an RPC operation that removes stray keys.
- Implement a HookAbortCallback for the LUNodeAdd which
  triggers an RPC call to clean up the stray key.

Helga Velroyen (4):
  Add useful hints to hooks documentation
  Introduce HooksAbortCallBack
  Light-weight SSH key removal
  Clean up after failed node-add-pre hooks

 doc/hooks.rst                      | 12 +++++++++-
 lib/backend.py                     | 34 +++++++++++++++++++++++++++
 lib/cmdlib/base.py                 | 24 +++++++++++++++++++
 lib/cmdlib/node.py                 | 18 +++++++++++++++
 lib/mcpu.py                        | 11 ++++++++-
 lib/rpc_defs.py                    |  3 +++
 lib/server/noded.py                |  8 +++++++
 test/py/ganeti.backend_unittest.py | 47 ++++++++++++++++++++++++++++++++++++++
 8 files changed, 155 insertions(+), 2 deletions(-)

-- 
2.6.0.rc2.230.g3dd15c0

Reply via email to