From 82cf2599bc0815a061483dba98f85af42a547618 Mon Sep 17 00:00:00 2001 From: Peter Stachowski Date: Mon, 19 Dec 2016 10:12:21 -0800 Subject: [PATCH] Print error on resize failure Code was added to guestagent/volume.py to return the actual error if one occurs in the guest. This is an exploratory changereq to try and determine what's causing the resize-volume failures in the gate. Change-Id: I82f95171ed3b655a6478e11571c3edb015bc1554 Closes-Bug: #1651213 --- trove/guestagent/volume.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trove/guestagent/volume.py b/trove/guestagent/volume.py index 2558b0bf60..da14438c8f 100644 --- a/trove/guestagent/volume.py +++ b/trove/guestagent/volume.py @@ -15,6 +15,7 @@ import os from tempfile import NamedTemporaryFile +import traceback from oslo_log import log as logging import pexpect @@ -131,8 +132,11 @@ class VolumeDevice(object): run_as_root=True, root_helper="sudo") except ProcessExecutionError: LOG.exception(_("Error resizing file system.")) - raise GuestError(original_message=_( - "Error resizing the filesystem: %s") % self.device_path) + msg = _("Error resizing the filesystem with device '%(dev)s'.\n" + "Exc: %(exc)s") % ( + {'dev': self.device_path, + 'exc': traceback.format_exc()}) + raise GuestError(original_message=msg) def unmount(self, mount_point): if operating_system.is_mount(mount_point):