mirror of https://github.com/apache/cloudstack.git
for the last host
This commit is contained in:
parent
bc4357f7dd
commit
213ea43f63
|
|
@ -2081,7 +2081,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory,
|
|||
List<HostVO> hosts = _hostDao.listBy(host.getClusterId(), host.getPodId(), host.getDataCenterId());
|
||||
|
||||
for (final VMInstanceVO vm : vms) {
|
||||
if( hosts == null || hosts.isEmpty()) {
|
||||
if( hosts == null || hosts.size() <= 1) {
|
||||
// for the last host in this cluster, stop all the VMs
|
||||
_haMgr.scheduleStop(vm, hostId, WorkType.ForceStop);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue