You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/08/08 23:00:55 UTC
git commit: updated refs/heads/master to 958c2b2
Updated Branches:
refs/heads/master 4976a67bf -> 958c2b204
CLOUDSTACK-4141: resizeVolume - read the result of AsyncCallFuture execution. If false, return null to the API caller
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/958c2b20
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/958c2b20
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/958c2b20
Branch: refs/heads/master
Commit: 958c2b20404e15d305db0286d902f895cd61a4ec
Parents: 4976a67
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Thu Aug 8 13:52:48 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Thu Aug 8 13:53:58 2013 -0700
----------------------------------------------------------------------
server/src/com/cloud/storage/VolumeManagerImpl.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/958c2b20/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 86e6a5a..9e5ee07 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1245,7 +1245,12 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
vol.addPayload(payload);
AsyncCallFuture<VolumeApiResult> future = volService.resize(vol);
- future.get();
+ VolumeApiResult result = future.get();
+ if (result.isFailed()) {
+ s_logger.warn("Failed to resize the volume " + volume);
+ return null;
+ }
+
volume = _volsDao.findById(volume.getId());
if (newDiskOffering != null) {
@@ -1266,11 +1271,11 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
}
return volume;
} catch (InterruptedException e) {
- s_logger.debug("failed get resize volume result", e);
+ s_logger.warn("failed get resize volume result", e);
} catch (ExecutionException e) {
- s_logger.debug("failed get resize volume result", e);
+ s_logger.warn("failed get resize volume result", e);
} catch (Exception e) {
- s_logger.debug("failed get resize volume result", e);
+ s_logger.warn("failed get resize volume result", e);
}
return null;