CE-110 default interval of 0 minutes means do not mark for cleaning

This commit is contained in:
Daan Hoogland 2017-04-18 16:04:00 +02:00
parent c10c342d9e
commit 16b34c9a11
2 changed files with 4 additions and 2 deletions

View File

@ -33,7 +33,7 @@ public interface VmwareManager {
public static final ConfigKey<Long> s_vmwareNicHotplugWaitTimeout = new ConfigKey<Long>("Advanced", Long.class, "vmware.nic.hotplug.wait.timeout", "15000",
"Wait timeout (milli seconds) for hot plugged NIC of VM to be detected by guest OS.", false, ConfigKey.Scope.Global);
public static final ConfigKey<Long> templateCleanupInterval = new ConfigKey<Long>("Advanced", Long.class, "vmware.full.clone.template.cleanup.period", "1440",
public static final ConfigKey<Long> templateCleanupInterval = new ConfigKey<Long>("Advanced", Long.class, "vmware.full.clone.template.cleanup.period", "0",
"period (in minutes) between the start of template cleanup jobs for vmware full cloned templates.", false, ConfigKey.Scope.Global);
public static final ConfigKey<Boolean> s_vmwareCleanOldWorderVMs = new ConfigKey<Boolean>("Advanced", Boolean.class, "vmware.clean.old.worker.vms", "false",

View File

@ -1284,7 +1284,9 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
if(s_logger.isDebugEnabled()) {
s_logger.debug("checking to see if we should schedule a job to search for fully cloned templates to clean-up");
}
if(StorageManager.StorageCleanupEnabled.value() && StorageManager.TemplateCleanupEnabled.value()) {
if(StorageManager.StorageCleanupEnabled.value() &&
StorageManager.TemplateCleanupEnabled.value() &&
templateCleanupInterval.value() > 0) {
try {
if (s_logger.isInfoEnabled()) {
s_logger.info("scheduling job to search for fully cloned templates to clean-up once per " + templateCleanupInterval.value() + " minutes.");