LGTM, thanks
On 11/18/2015 02:48 PM, 'Helga Velroyen' via ganeti-devel wrote:
Due to a bug in python, deepcopy does not work on
the dictionaries we use for SSH updates. This patch
replaces the use of deepcopy by the built-in copy
function of dictionaries.
Signed-off-by: Helga Velroyen <[email protected]>
---
lib/backend.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/backend.py b/lib/backend.py
index ce5bb6a..d470060 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -60,7 +60,6 @@ import stat
import tempfile
import time
import zlib
-import copy
import contextlib
import collections
@@ -1586,7 +1585,7 @@ def AddNodeSshKeyBulk(node_list,
base_data[constants.SSHS_SSH_AUTHORIZED_KEYS] = \
(constants.SSHS_ADD, keys_by_uuid_auth)
- pot_mc_data = copy.deepcopy(base_data)
+ pot_mc_data = base_data.copy()
keys_by_uuid_pub = ssh.QueryPubKeyFile(
[node_info.uuid for node_info in node_list
if node_info.to_public_keys],
@@ -1740,7 +1739,7 @@ def RemoveNodeSshKey(node_uuid, node_name,
dircheck=False)
ssh.RemoveAuthorizedKeys(auth_key_file, keys[node_uuid])
- pot_mc_data = copy.deepcopy(base_data)
+ pot_mc_data = base_data.copy()
if from_public_keys:
pot_mc_data[constants.SSHS_SSH_PUBLIC_KEYS] = \