cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/master to afb31fa
Date Wed, 14 May 2014 22:00:49 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 8d9bdb19b -> afb31fa09


CLOUDSTACK-6660: Dont assume every vm will have a root volume now.
(cherry picked from commit 076bbdcfe86d6886ab1ecfc513b02a323a995307)


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

Branch: refs/heads/master
Commit: afb31fa09f92930ab3fee40cd08a15a48152cb15
Parents: 8d9bdb1
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Wed May 14 14:59:54 2014 -0700
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Wed May 14 15:00:34 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/afb31fa0/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index d323e98..a563fad 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -1854,7 +1854,16 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
             saveUsageEvent(vmInstance);
 
             // take care of the root volume as well.
-            _volumeService.updateDisplay(_volsDao.findByInstanceAndType(id, Volume.Type.ROOT).get(0),
isDisplayVm);
+            List<VolumeVO> rootVols = _volsDao.findByInstanceAndType(id, Volume.Type.ROOT);
+            if(!rootVols.isEmpty()){
+                _volumeService.updateDisplay(rootVols.get(0), isDisplayVm);
+            }
+
+            // take care of the data volumes as well.
+            List<VolumeVO> dataVols = _volsDao.findByInstanceAndType(id, Volume.Type.DATADISK);
+            for(Volume dataVol : dataVols){
+                _volumeService.updateDisplay(dataVol, isDisplayVm);
+            }
 
         }
 


Mime
View raw message