Skip to content

Commit

Permalink
ceph-volume util do not use stdin for luminous
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit e03be24)
  • Loading branch information
Alfredo Deza committed Aug 1, 2018
1 parent eaee6d3 commit 11e9b17
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/ceph-volume/ceph_volume/util/prepare.py
Expand Up @@ -7,7 +7,7 @@
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__)
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit 11e9b17

Please sign in to comment.