fix CLOUDSTACK-1944 Destruction of a VM with StaticNAT/FW throws a NullPointerException during VM Expunge

This commit is contained in:
Mice Xia 2013-04-24 20:10:35 +08:00
parent 39f772eee8
commit 8ff442bbeb
1 changed files with 1 additions and 0 deletions

View File

@ -1520,6 +1520,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
@Override
public void run() {
UserContext.registerContext(_accountMgr.getSystemUser().getId(), _accountMgr.getSystemAccount(), null, false);
GlobalLock scanLock = GlobalLock.getInternLock("UserVMExpunge");
try {
if (scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {