From: Alfredo Deza Date: Wed, 24 Jul 2013 17:30:37 +0000 (-0400) Subject: get better errors when failing on mds create X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Fmds-errors;p=ceph-deploy.git get better errors when failing on mds create Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/mds.py b/ceph_deploy/mds.py index b8f1a03..4f01059 100644 --- a/ceph_deploy/mds.py +++ b/ceph_deploy/mds.py @@ -87,7 +87,7 @@ def create_mds( keypath = os.path.join(path, 'keyring') - subprocess.check_call( + proc = subprocess.Popen( args=[ 'ceph', '--cluster', cluster, @@ -100,7 +100,13 @@ def create_mds( '-o', os.path.join(keypath), ], - ) + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + out, err = proc.communicate() + return_status = proc.wait() + if return_status > 0: + raise RuntimeError(err.strip()) with file(os.path.join(path, 'done'), 'wb') as f: pass