]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite.run.collect_jobs(): deepcopy base_config
authorDan Mick <dan.mick@redhat.com>
Tue, 28 Jun 2016 23:50:45 +0000 (16:50 -0700)
committerDan Mick <dan.mick@redhat.com>
Thu, 30 Jun 2016 21:58:09 +0000 (14:58 -0700)
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 <dan.mick@redhat.com>
teuthology/suite/run.py

index a105865566b64825370e0a05151ed64797f7e779..1b3529961a215bbe13140f8d109c1e5d6ec7ee8d 100644 (file)
@@ -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