This patch catches an IOError when a node is removed from a cluster and the SSH files of the node are messed up. Previously, this caused the removal to fail, which is not exactly what you want when removing a messed up node.
Signed-off-by: Helga Velroyen <[email protected]> Reviewed-by: Klaus Aehlig <[email protected]> Cherry-picked-from: a856040abc755b4 Signed-off-by: Helga Velroyen <[email protected]> --- lib/backend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/backend.py b/lib/backend.py index a5da270..376e278 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -565,6 +565,8 @@ def LeaveCluster(modify_ssh_setup): utils.RemoveFile(pub_key) except errors.OpExecError: logging.exception("Error while processing ssh files") + except IOError: + logging.exception("At least one SSH file was not accessible.") try: utils.RemoveFile(pathutils.CONFD_HMAC_KEY) -- 2.6.0.rc2.230.g3dd15c0
