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:
system.chown(journal)
system.chown(path)
- process.run([
+ command = [
'ceph-osd',
'--cluster', conf.cluster,
# undocumented flag, sets the `type` file to contain 'filestore'
'--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)