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: v17.2.7~376^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0519eb4d96befddd128e963d9ed18263c0098804;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 9b708d52bc92..8e468e3c8d4a 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1827,7 +1827,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: