]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume util do not use stdin for luminous
authorAlfredo Deza <adeza@redhat.com>
Tue, 31 Jul 2018 20:46:41 +0000 (16:46 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 1 Aug 2018 15:21:18 +0000 (11:21 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit e03be24a4ff9b882d4329059fd1f04963d9ba2c5)

src/ceph-volume/ceph_volume/util/prepare.py

index ae16c18310204ea81621981bcf45c2489b9dccaa..3ea86ad23bd062b55ce40b5490a16367cced6eee 100644 (file)
@@ -7,7 +7,7 @@ the single-call helper
 import os
 import logging
 import json
-from ceph_volume import process, conf
+from ceph_volume import process, conf, __release__
 from ceph_volume.util import system, constants
 
 logger = logging.getLogger(__name__)
@@ -367,13 +367,20 @@ def osd_mkfs_filestore(osd_id, fsid, keyring):
         '--mkfs',
         '-i', osd_id,
         '--monmap', monmap,
-        '--keyfile', '-', # goes through stdin
+    ]
+
+    if __release__ != 'luminous':
+        # goes through stdin
+        command.extend(['--keyfile', '-'])
+
+    command.extend([
         '--osd-data', path,
         '--osd-journal', journal,
         '--osd-uuid', fsid,
         '--setuser', 'ceph',
         '--setgroup', 'ceph'
-    ]
+    ])
+
     _, _, returncode = process.call(
         command, stdin=keyring, terminal_verbose=True, show_command=True
     )