Please consider this patch instead of the previously sent one "[PATCH stable-2.15] Add workaround for deepcopy bug".
Cheers, Helga On Wed, 18 Nov 2015 at 14:48 Helga Velroyen <[email protected]> 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] = \ > -- > 2.6.0.rc2.230.g3dd15c0 > > -- Helga Velroyen Software Engineer [email protected] Google Germany GmbH Dienerstraße 12 80331 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.
