From db736e082f732080e6a62b0fdefbe018065209c2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 2 Dec 2019 13:32:03 -0600 Subject: [PATCH] ceph-daemon: bootstrap: deploy initial mon via deploy_daemon() Signed-off-by: Sage Weil --- src/ceph-daemon/ceph-daemon | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ceph-daemon/ceph-daemon b/src/ceph-daemon/ceph-daemon index 2b3d06a6bde..2b748b6f0e1 100755 --- a/src/ceph-daemon/ceph-daemon +++ b/src/ceph-daemon/ceph-daemon @@ -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') -- 2.39.5