From e03be24a4ff9b882d4329059fd1f04963d9ba2c5 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 31 Jul 2018 16:46:41 -0400 Subject: [PATCH] ceph-volume util do not use stdin for luminous Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/util/prepare.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ceph-volume/ceph_volume/util/prepare.py b/src/ceph-volume/ceph_volume/util/prepare.py index c1fd5e64d34ad..dbd2a079d7951 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__) @@ -365,13 +365,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 ) -- 2.39.5