From ca506693ad99b63f18676934cefd07fae06307f1 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 16 Feb 2021 18:37:35 -0800 Subject: [PATCH] qa: deep merge top level overrides for fuse/kclient This allows for array/dict configs like mntopts to accumulate changes from multiple yaml fragments. Signed-off-by: Patrick Donnelly (cherry picked from commit 88f74dbfa634b904253fc14ab4787e51a7a4f9c4) --- qa/tasks/ceph_fuse.py | 4 +--- qa/tasks/kclient.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/qa/tasks/ceph_fuse.py b/qa/tasks/ceph_fuse.py index 4057428916743..d2db2973220d9 100644 --- a/qa/tasks/ceph_fuse.py +++ b/qa/tasks/ceph_fuse.py @@ -108,9 +108,7 @@ def task(ctx, config): if client_config is None: client_config = {} # top level overrides - for k, v in top_overrides.items(): - if v is not None: - client_config[k] = v + misc.deep_merge(client_config, top_overrides) # mount specific overrides client_config_overrides = overrides.get(entity) misc.deep_merge(client_config, client_config_overrides) diff --git a/qa/tasks/kclient.py b/qa/tasks/kclient.py index be75286bd0dc8..d7bc9fa835b55 100644 --- a/qa/tasks/kclient.py +++ b/qa/tasks/kclient.py @@ -84,9 +84,7 @@ def task(ctx, config): if client_config is None: client_config = {} # top level overrides - for k, v in top_overrides.items(): - if v is not None: - client_config[k] = v + deep_merge(client_config, top_overrides) # mount specific overrides client_config_overrides = overrides.get(entity) deep_merge(client_config, client_config_overrides) -- 2.39.5