]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: eliminate duplication of [global] section when applying set-extra-ceph-conf
authorRongqi Sun <sunrongqi@huawei.com>
Wed, 1 Mar 2023 08:15:26 +0000 (16:15 +0800)
committerAdam King <adking@redhat.com>
Tue, 25 Apr 2023 12:36:55 +0000 (08:36 -0400)
Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
(cherry picked from commit ece7ccccc915392bced60c07703eb82142874516)

src/pybind/mgr/cephadm/module.py

index 4d90bfcaf051cad8333a2763879b595f62285edc..9b45acaa08736a5e94d2b7ffaeac0515e56c8e03 100644 (file)
@@ -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: