mirror of
https://github.com/ceph/ceph
synced 2025-01-01 00:22:25 +00:00
install.upgrade: deepcopy() overrides before we modify it
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>
This commit is contained in:
parent
3e72dcb9f4
commit
92c57f17f4
@ -1,6 +1,7 @@
|
||||
from cStringIO import StringIO
|
||||
|
||||
import contextlib
|
||||
import copy
|
||||
import logging
|
||||
import time
|
||||
|
||||
@ -1023,7 +1024,7 @@ def upgrade(ctx, config):
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user