Merge "Log more info when mke2fs fails on a guest"
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index 2e233c5..8f5faef 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -16,6 +16,7 @@
from oslo_log import log as logging
from tempest_lib.common import ssh
+import tempest_lib.exceptions
from tempest import config
from tempest import exceptions
@@ -178,4 +179,10 @@
def make_fs(self, dev_name, fs='ext4'):
cmd_mkfs = 'sudo /usr/sbin/mke2fs -t %s /dev/%s' % (fs, dev_name)
- self.exec_command(cmd_mkfs)
+ try:
+ self.exec_command(cmd_mkfs)
+ except tempest_lib.exceptions.SSHExecCommandFailed:
+ LOG.error("Couldn't mke2fs")
+ cmd_why = 'sudo ls -lR /dev'
+ LOG.info("Contents of /dev: %s" % self.exec_command(cmd_why))
+ raise