From bb4318d70666ea8acc47c2ebbbc4008b222162ef Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 31 Oct 2019 10:14:51 -0500 Subject: [PATCH] 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 --- src/ceph-daemon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ceph-daemon b/src/ceph-daemon index a5c708e96558..34c3798095cc 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) -- 2.47.3