File tree Expand file tree Collapse file tree
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -556,12 +556,17 @@ public boolean needRecycle(String workerTag) {
556556 // "until we have found out a VMware API that can check if there are pending tasks on the subject VM"
557557 // but as we expire jobs and those stale worker VMs stay around untill an MS reboot we opt in to have them removed anyway
558558 Long hungWorkerTimeout = 2 * (AsyncJobManagerImpl .JobExpireMinutes .value () + AsyncJobManagerImpl .JobCancelThresholdMinutes .value ()) * MILISECONDS_PER_MINUTE ;
559- if (s_vmwareCleanOldWorderVMs .value () && System .currentTimeMillis () - startTick > hungWorkerTimeout ) {
559+ Long letsSayNow = System .currentTimeMillis ();
560+ if (s_vmwareCleanOldWorderVMs .value () && letsSayNow - startTick > hungWorkerTimeout ) {
560561 if (s_logger .isInfoEnabled ()) {
561562 s_logger .info ("Worker VM expired, seconds elapsed: " + (System .currentTimeMillis () - startTick ) / 1000 );
562563 }
563564 return true ;
564565 }
566+ if (s_logger .isTraceEnabled ()) {
567+ s_logger .trace ("Worker VM with tag '" + workerTag + "' does not need recycling, yet." +
568+ "But in " + (startTick + hungWorkerTimeout - letsSayNow ) + " milisecs, though" );
569+ }
565570 return false ;
566571 }
567572
You can’t perform that action at this time.
0 commit comments