mirror of https://github.com/apache/cloudstack.git
host affinity: fix vm cannot be started if a vm is stopped in the affinity group (#6936)
This commit is contained in:
parent
cf32f77e3d
commit
d182eacf86
|
|
@ -81,7 +81,9 @@ public class HostAffinityProcessor extends AffinityProcessorBase implements Affi
|
|||
Set<Long> hostIds = new HashSet<>();
|
||||
for (Long groupVMId : vmIds) {
|
||||
VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId);
|
||||
hostIds.add(groupVM.getHostId());
|
||||
if (groupVM != null && groupVM.getHostId() != null) {
|
||||
hostIds.add(groupVM.getHostId());
|
||||
}
|
||||
}
|
||||
return hostIds;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue