From: Sage Weil Date: Thu, 31 Oct 2019 15:14:51 +0000 (-0500) Subject: ceph-daemon: make 'deploy' on mon only to mkfs step is mon doesn't yet exist X-Git-Tag: v15.1.0~1055^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bb4318d70666ea8acc47c2ebbbc4008b222162ef;p=ceph-ci.git ceph-daemon: make 'deploy' on mon only to mkfs step is mon doesn't yet exist This allows us to (re)deploy a mon container like the other daemon types, which means rewriting the config, keyring, and systemd unit(s). Signed-off-by: Sage Weil --- diff --git a/src/ceph-daemon b/src/ceph-daemon index a5c708e9655..34c3798095c 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -416,7 +416,8 @@ def extract_uid_gid(): def deploy_daemon(fsid, daemon_type, daemon_id, c, uid, gid, config=None, keyring=None): - if daemon_type == 'mon': + if daemon_type == 'mon' and not os.path.exists(get_data_dir(fsid, 'mon', + daemon_id)): # tmp keyring file tmp_keyring = tempfile.NamedTemporaryFile(mode='w') os.fchmod(tmp_keyring.fileno(), 0o600)