]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-daemon: make 'deploy' on mon only to mkfs step is mon doesn't yet exist
authorSage Weil <sage@redhat.com>
Thu, 31 Oct 2019 15:14:51 +0000 (10:14 -0500)
committerSage Weil <sage@redhat.com>
Mon, 4 Nov 2019 14:03:48 +0000 (08:03 -0600)
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 <sage@redhat.com>
src/ceph-daemon

index a5c708e9655813e98e976e84945a83989648f729..34c3798095ccd16c34372ec54a6f0bbcf7e15b7d 100755 (executable)
@@ -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)