From: Alfredo Deza Date: Tue, 31 Jul 2018 20:46:41 +0000 (-0400) Subject: ceph-volume util do not use stdin for luminous X-Git-Tag: v13.2.2~118^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11e9b173f838b22f65a35096e87548d6351d36f0;p=ceph.git ceph-volume util do not use stdin for luminous Signed-off-by: Alfredo Deza (cherry picked from commit e03be24a4ff9b882d4329059fd1f04963d9ba2c5) --- diff --git a/src/ceph-volume/ceph_volume/util/prepare.py b/src/ceph-volume/ceph_volume/util/prepare.py index ae16c18310204..3ea86ad23bd06 100644 --- a/src/ceph-volume/ceph_volume/util/prepare.py +++ b/src/ceph-volume/ceph_volume/util/prepare.py @@ -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 )