summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-03-25 14:36:41 +0100
committerSage Weil <sage@inktank.com>2013-04-26 13:40:06 -0700
commitbd8bb984806a1dbc3514c3a2a8980a03cfb2bc23 (patch)
tree9fc7b16295681f5202fe5c9c32dbbd8cd2921b9f
parent970348fc46a7e100731ffdc63d20f343dcb1b787 (diff)
downloadceph-bd8bb984806a1dbc3514c3a2a8980a03cfb2bc23.tar.gz
ceph-disk: print subprocess.CalledProcessError on error
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 543327b1f2a9efe8083bb196433c4bcf83883269)
-rwxr-xr-xsrc/ceph-disk6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 4d78507706d..f8c18b41d49 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -461,7 +461,7 @@ def dmcrypt_map(
return dev
except subprocess.CalledProcessError as e:
- raise Error('unable to map device', rawdev)
+ raise Error('unable to map device', rawdev, e)
def dmcrypt_unmap(
@@ -477,7 +477,7 @@ def dmcrypt_unmap(
subprocess.check_call(args)
except subprocess.CalledProcessError as e:
- raise Error('unable to unmap device', _uuid)
+ raise Error('unable to unmap device', _uuid, e)
def mount(
@@ -548,7 +548,7 @@ def get_free_partition_index(dev):
],
)
except subprocess.CalledProcessError as e:
- print 'cannot read partition index; assume it isn\'t present\n'
+ print 'cannot read partition index; assume it isn\'t present\n (Error: %s)' % e
return 1
if not lines: