bug 9272: fixed the race condition bug when we tried to remove vm from SG after it was expunged (expunge interval was really small, 60 sec).

status 9272: resolved fixed

When do search for vm, do includingRemoved search.
This commit is contained in:
alena 2011-04-04 15:15:21 -07:00
parent 10e2dba837
commit f2921b7f15

View File

@ -1337,7 +1337,7 @@ public class SecurityGroupManagerImpl implements SecurityGroupManager, SecurityG
@Override
public boolean isVmSecurityGroupEnabled(Long vmId) {
VirtualMachine vm = _vmDao.findById(vmId);
VirtualMachine vm = _vmDao.findByIdIncludingRemoved(vmId);
List<NicProfile> nics = _networkMgr.getNicProfiles(vm);
for (NicProfile nic : nics) {
if (nic.isSecurityGroupEnabled() && vm.getHypervisorType() != HypervisorType.VMware) {