From 7af354f080d573a5e60e33c5a63900a372de90b4 Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Mon, 10 Mar 2014 15:39:37 +0800 Subject: [PATCH] Fix authorized_keys file becomes incorrect after removing a compute node and then add a new node. --- hooks/nova_cc_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/nova_cc_utils.py b/hooks/nova_cc_utils.py index 9eb15113..c8b37df8 100644 --- a/hooks/nova_cc_utils.py +++ b/hooks/nova_cc_utils.py @@ -449,7 +449,7 @@ def ssh_compute_remove(public_key, user=None): [keys.remove(key) for key in keys if key == public_key] with open(authorized_keys(user), 'w') as _keys: - _keys.write('\n'.join(keys)) + _keys.write('\n'.join(keys) + '\n') def determine_endpoints(url):