From: Dan Mick Date: Tue, 28 Jun 2016 23:50:45 +0000 (-0700) Subject: suite.run.collect_jobs(): deepcopy base_config X-Git-Tag: 1.1.0~582^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f14d117888a04d3e1a23a5ea6b98cc90e7290709;p=teuthology.git suite.run.collect_jobs(): deepcopy base_config deep_merge, despite the name, doesn't do fully deep merging; it recurses through the whole object, but does not deepcopy component objects at the lowest level. This meant that self.base_config could be corrupted by the second deep_merge (if base_config contained keys that were augmented by parsed_yaml, which was often the case, for things like overrides). Signed-off-by: Dan Mick --- diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index a105865566..1b3529961a 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -343,8 +343,7 @@ class Run(object): sha1 = self.base_config.sha1 if config.suite_verify_ceph_hash: - full_job_config = dict() - deep_merge(full_job_config, self.base_config.to_dict()) + full_job_config = copy.deepcopy(self.base_config.to_dict()) deep_merge(full_job_config, parsed_yaml) flavor = util.get_install_task_flavor(full_job_config) # Get package versions for this sha1, os_type and flavor. If