diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-09-14 02:46:16 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-09-14 02:46:16 +0000 |
| commit | c8c121f5c3c864ed88645b4cf1a442bc9b59db9a (patch) | |
| tree | 0d0ee667025f31fc29576ade330ad8ec2d20f41a | |
| parent | 9d791c1225d4923a8e25060490b931c669e4424d (diff) | |
| parent | b107450cf9e89c5d93b989371b3a5f66810dbf9f (diff) | |
Merge "Add more useful logging around the unmount fail case."
| -rw-r--r-- | nova/virt/disk/guestfs.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nova/virt/disk/guestfs.py b/nova/virt/disk/guestfs.py index 42ec7d2ee..21e33b1d7 100644 --- a/nova/virt/disk/guestfs.py +++ b/nova/virt/disk/guestfs.py @@ -112,6 +112,10 @@ class Mount(mount.Mount): wait_cmd = 'until ! ps -C guestmount -o args= | grep -qF "%s"; ' wait_cmd += 'do sleep .2; done' wait_cmd %= self.mount_dir - utils.execute('timeout', '10s', 'sh', '-c', wait_cmd) - - self.mounted = False + try: + utils.execute('timeout', '10s', 'sh', '-c', wait_cmd) + self.mounted = False + except exception.ProcessExecutionError: + msg = _("Failed to umount image at %s, guestmount was " + "still running after 10s") % (self.mount_dir) + raise exception.NovaException(msg) |
