Update to volume-resize logic

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ffa4d732
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ffa4d732
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ffa4d732

Branch: refs/heads/saml2
Commit: ffa4d73290599390aea586517e12daab92e8ae64
Parents: 8d08178
Author: Mike Tutkowski <mike.tutkow...@solidfire.com>
Authored: Wed Aug 20 13:18:06 2014 -0600
Committer: Mike Tutkowski <mike.tutkow...@solidfire.com>
Committed: Wed Aug 20 13:18:33 2014 -0600

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ffa4d732/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java 
b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 11d1f73..fa104ed 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -998,7 +998,7 @@ public class VolumeApiServiceImpl extends ManagerBase 
implements VolumeApiServic
             StoragePoolVO storagePool = 
_storagePoolDao.findById(vol.getPoolId());
 
             if (currentSize != newSize && storagePool.isManaged()) {
-                if (hosts.length > 0) {
+                if (hosts != null && hosts.length > 0) {
                     volService.resizeVolumeOnHypervisor(volumeId, newSize, 
hosts[0], instanceName);
                 }
 

Reply via email to