Since we modify the dict, make sure it is a deep copy.
Otherwise, a sequence like:
- install.upgrade:
all:
branch: dumpling
...
- install.upgrade:
all: null
will delete the overrides keys in the first upgrade call and
then not have them at all in the second.
Signed-off-by: Sage Weil <sage@inktank.com>
from cStringIO import StringIO
import contextlib
+import copy
import logging
import time
if not node:
node = {}
- this_overrides = install_overrides
+ this_overrides = copy.deepcopy(install_overrides)
if 'sha1' in node or 'tag' in node or 'branch' in node:
log.info('config contains sha1|tag|branch, removing those keys from override')
this_overrides.pop('sha1', None)