]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fix section name for mon options in ceph.conf 32681/head
authorSage Weil <sage@redhat.com>
Thu, 16 Jan 2020 15:05:50 +0000 (09:05 -0600)
committerSage Weil <sage@redhat.com>
Thu, 16 Jan 2020 15:05:50 +0000 (09:05 -0600)
If name is not explicitly specified, we were putting the options in
the [mon.] section instead of [mon.$name].

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/cephadm/module.py

index 0e6d0b338668ebde41b672f59a074853c610b3a7..51708690dfa0f2e0d0dca79565af796ad5d7e9f9 100644 (file)
@@ -1131,7 +1131,10 @@ class CephadmOrchestrator(MgrModule, orchestrator.Orchestrator):
         """
         Create a new monitor on the given host.
         """
-        self.log.info("create_mon({}:{}): starting".format(host, network))
+        name = name or host
+
+        self.log.info("create_mon({}:{}): starting mon.{}".format(
+            host, network, name))
 
         # get mon. key
         ret, keyring, err = self.mon_command({
@@ -1150,7 +1153,7 @@ class CephadmOrchestrator(MgrModule, orchestrator.Orchestrator):
         else:
             raise RuntimeError('Must specify a CIDR network, ceph addrvec, or plain IP: \'%s\'' % network)
 
-        return self._create_daemon('mon', name or host, host, keyring,
+        return self._create_daemon('mon', name, host, keyring,
                                    extra_config=extra_config)
 
     def update_mons(self, spec):