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__)
'--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
)