Merge branch '4.16' into main

This commit is contained in:
Suresh Kumar Anaparti 2022-02-25 16:04:35 +05:30
commit cb2ddc45ac
No known key found for this signature in database
GPG Key ID: D7CEAE3A9E71D0AA
3 changed files with 8 additions and 2 deletions

View File

@ -143,6 +143,9 @@ public interface StorageManager extends StorageService {
ConfigKey<Integer> SecStorageMaxMigrateSessions = new ConfigKey<Integer>("Advanced", Integer.class, "secstorage.max.migrate.sessions", "2",
"The max number of concurrent copy command execution sessions that an SSVM can handle", false, ConfigKey.Scope.Global);
ConfigKey<Boolean> SecStorageVMAutoScaleDown = new ConfigKey<Boolean>("Advanced", Boolean.class, "secstorage.vm.auto.scale.down", "false",
"Setting this to 'true' will auto scale down SSVMs", true, ConfigKey.Scope.Global);
ConfigKey<Integer> MaxDataMigrationWaitTime = new ConfigKey<Integer>("Advanced", Integer.class, "max.data.migration.wait.time", "15",
"Maximum wait time for a data migration task before spawning a new SSVM", false, ConfigKey.Scope.Global);
ConfigKey<Boolean> DiskProvisioningStrictness = new ConfigKey<Boolean>("Storage", Boolean.class, "disk.provisioning.type.strictness", "false",

View File

@ -3339,7 +3339,8 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
SecStorageMaxMigrateSessions,
MaxDataMigrationWaitTime,
DiskProvisioningStrictness,
PreferredStoragePool
PreferredStoragePool,
SecStorageVMAutoScaleDown
};
}

View File

@ -184,7 +184,9 @@ public class PremiumSecondaryStorageManagerImpl extends SecondaryStorageManagerI
return new Pair<AfterScanAction, Object>(AfterScanAction.expand, SecondaryStorageVm.Role.commandExecutor);
}
scaleDownSSVMOnLoad(alreadyRunning, activeCmds, copyCmdsInPipeline);
if (StorageManager.SecStorageVMAutoScaleDown.value()) {
scaleDownSSVMOnLoad(alreadyRunning, activeCmds, copyCmdsInPipeline);
}
return new Pair<AfterScanAction, Object>(AfterScanAction.nop, null);
}