CLOUDSTACK-4659: Vmware allows destroying VM that has pending tasks, worker VM GC actually relies on the assumption that Vmware is protected from that which is a false assumption. Recycle Worker VM only it is from previous session

This commit is contained in:
Kelven Yang 2013-09-20 10:59:06 -07:00
parent 159d798a19
commit 08c3b6596d

View File

@ -575,12 +575,16 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
s_logger.info("Worker VM's owner management server has changed runid, recycle it"); s_logger.info("Worker VM's owner management server has changed runid, recycle it");
return true; return true;
} }
// disable time-out check until we have found out a VMware API that can check if
// there are pending tasks on the subject VM
/*
if(System.currentTimeMillis() - startTick > _hungWorkerTimeout) { if(System.currentTimeMillis() - startTick > _hungWorkerTimeout) {
if(s_logger.isInfoEnabled()) if(s_logger.isInfoEnabled())
s_logger.info("Worker VM expired, seconds elapsed: " + (System.currentTimeMillis() - startTick) / 1000); s_logger.info("Worker VM expired, seconds elapsed: " + (System.currentTimeMillis() - startTick) / 1000);
return true; return true;
} }
*/
return false; return false;
} }