cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rafaelweingartner commented on a change in pull request #2493: CLOUDSTACK-10326: Prevent hosts fall into Maintenance when there are running VMs on it
Date Fri, 16 Mar 2018 14:59:43 GMT
rafaelweingartner commented on a change in pull request #2493: CLOUDSTACK-10326: Prevent hosts
fall into Maintenance when there are running VMs on it
URL: https://github.com/apache/cloudstack/pull/2493#discussion_r175036445
 
 

 ##########
 File path: server/src/com/cloud/resource/ResourceManagerImpl.java
 ##########
 @@ -1296,7 +1296,8 @@ public boolean checkAndMaintain(final long hostId) {
             if (host.getType() != Host.Type.Storage) {
                 final List<VMInstanceVO> vos = _vmDao.listByHostId(hostId);
                 final List<VMInstanceVO> vosMigrating = _vmDao.listVmsMigratingFromHost(hostId);
-                if (vos.isEmpty() && vosMigrating.isEmpty()) {
+                final List<VMInstanceVO> failedMigratedVms = _vmDao.listRunningVmsByHostAndLastHostSameId(hostId);
+                if (vos.isEmpty() && vosMigrating.isEmpty() && failedMigratedVms.isEmpty())
{
 
 Review comment:
   And also unit testing....

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message