]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume util.prepare use keyfile from stdin for mkfs in filestore
authorAlfredo Deza <adeza@redhat.com>
Wed, 7 Mar 2018 16:56:45 +0000 (11:56 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 8 Mar 2018 20:34:17 +0000 (15:34 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/util/prepare.py

index 3e1a77f90add0e6776a252c05e3bf1fa5d7154aa..3b5eb7fa719e2c88c48013208cc2f994dc2067ed 100644 (file)
@@ -298,7 +298,7 @@ def osd_mkfs_bluestore(osd_id, fsid, keyring=None, wal=False, db=False):
     process.call(command, stdin=keyring, show_command=True)
 
 
-def osd_mkfs_filestore(osd_id, fsid):
+def osd_mkfs_filestore(osd_id, fsid, keyring):
     """
     Create the files for the OSD to function. A normal call will look like:
 
@@ -318,7 +318,7 @@ def osd_mkfs_filestore(osd_id, fsid):
     system.chown(journal)
     system.chown(path)
 
-    process.run([
+    command = [
         'ceph-osd',
         '--cluster', conf.cluster,
         # undocumented flag, sets the `type` file to contain 'filestore'
@@ -326,9 +326,11 @@ def osd_mkfs_filestore(osd_id, fsid):
         '--mkfs',
         '-i', osd_id,
         '--monmap', monmap,
+        '--keyfile', '-', # goes through stdin
         '--osd-data', path,
         '--osd-journal', journal,
         '--osd-uuid', fsid,
         '--setuser', 'ceph',
         '--setgroup', 'ceph'
-    ])
+    ]
+    process.call(command, stdin=keyring, terminal_verbose=True, show_command=True)