From: Rongqi Sun Date: Wed, 1 Mar 2023 08:15:26 +0000 (+0800) Subject: cephadm: eliminate duplication of [global] section when applying set-extra-ceph-conf X-Git-Tag: v18.1.0~130^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f15943e0428d04c33ce9a2f04a5cbacfce0fe647;p=ceph.git cephadm: eliminate duplication of [global] section when applying set-extra-ceph-conf Signed-off-by: Rongqi Sun (cherry picked from commit ece7ccccc915392bced60c07703eb82142874516) --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 4d90bfcaf051c..9b45acaa08736 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: