From bca71ec16953791bf0980fca4c55817ded8885b2 Mon Sep 17 00:00:00 2001 From: Likitha Shetty Date: Wed, 1 Oct 2014 14:30:52 +0530 Subject: [PATCH] CLOUDSTACK-6969. Data Volume Shrink operation failing with "Unexpected Exception". --- server/src/com/cloud/storage/VolumeApiServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java index d89ea4f7ebe..e089b77a37c 100644 --- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java @@ -1046,12 +1046,17 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic } else { _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, volume.isDisplayVolume(), new Long(currentSize - newSize)); } + return volume; } catch (InterruptedException e) { s_logger.warn("failed get resize volume result", e); + throw new CloudRuntimeException(e.getMessage()); } catch (ExecutionException e) { s_logger.warn("failed get resize volume result", e); + throw new CloudRuntimeException(e.getMessage()); + } catch (Exception e) { + s_logger.warn("failed get resize volume result", e); + throw new CloudRuntimeException(e.getMessage()); } - return volume; } @Override