From f15943e0428d04c33ce9a2f04a5cbacfce0fe647 Mon Sep 17 00:00:00 2001 From: Rongqi Sun Date: Wed, 1 Mar 2023 16:15:26 +0800 Subject: [PATCH] cephadm: eliminate duplication of [global] section when applying set-extra-ceph-conf Signed-off-by: Rongqi Sun (cherry picked from commit ece7ccccc915392bced60c07703eb82142874516) --- src/pybind/mgr/cephadm/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 4d90bfcaf05..9b45acaa087 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1905,7 +1905,7 @@ Then run the following: }) extra = self.extra_ceph_conf().conf if extra: - config += '\n\n' + extra.strip() + '\n' + config += extra.strip().replace('[global]','') + '\n' return config def _invalidate_daemons_and_kick_serve(self, filter_host: Optional[str] = None) -> None: -- 2.39.5