cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/4.2 to cf62be6
Date Thu, 08 Aug 2013 21:01:11 GMT
Updated Branches:
  refs/heads/4.2 784a9d45d -> cf62be657


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/cf62be65
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cf62be65
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cf62be65

Branch: refs/heads/4.2
Commit: cf62be6571e03ba4c5cf3b5d7f5612838a4913ae
Parents: 784a9d4
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Aug 8 13:52:48 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Thu Aug 8 14:01:11 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/cf62be65/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 3310d64..419e0b4 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1244,7 +1244,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) {
@@ -1265,11 +1270,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;


Mime
View raw message