]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: bootstrap: deploy initial mon via deploy_daemon() 31869/head
authorSage Weil <sage@redhat.com>
Mon, 2 Dec 2019 19:32:03 +0000 (13:32 -0600)
committerSage Weil <sage@redhat.com>
Tue, 3 Dec 2019 16:13:38 +0000 (10:13 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon/ceph-daemon

index 2b3d06a6bde7ad70fb3641b28785ae4de08bed79..2b748b6f0e1fc7507bb2e0143d009a984d7e36c1 100755 (executable)
@@ -565,9 +565,11 @@ def extract_uid_gid():
 
 def deploy_daemon(fsid, daemon_type, daemon_id, c, uid, gid,
                   config, keyring):
-    # type: (str, str, Union[int, str], CephContainer, int, int, str, str) -> None
-    if daemon_type == 'mon' and not os.path.exists(get_data_dir(fsid, 'mon',
-                                                                daemon_id)):
+    # type: (str, str, Union[int, str], CephContainer, int, int, Optional[str], Optional[str]) -> None
+    if daemon_type == 'mon' and not os.path.exists(
+            get_data_dir(fsid, 'mon', daemon_id)):
+        assert config
+        assert keyring
         # tmp keyring file
         tmp_keyring = tempfile.NamedTemporaryFile(mode='w')
         os.fchmod(tmp_keyring.fileno(), 0o600)
@@ -1112,8 +1114,8 @@ def command_bootstrap():
         f.write(config)
 
     mon_c = get_container(fsid, 'mon', mon_id)
-    deploy_daemon_units(fsid, uid, gid, 'mon', mon_id, mon_c)
-    update_firewalld(daemon_type)
+    deploy_daemon(fsid, 'mon', mon_id, mon_c, uid, gid,
+                  config=None, keyring=None)
 
     # client.admin key + config to issue various CLI commands
     tmp_admin_keyring = tempfile.NamedTemporaryFile(mode='w')