Skip to content

Commit a8cc261

Browse files
authored
[vmware, ssvm] Scale down of ssvm (apache#6042)
* [vmware, ssvm] Scale down of ssvm * address comments - change variable name
1 parent 027e603 commit a8cc261

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

engine/components-api/src/main/java/com/cloud/storage/StorageManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ public interface StorageManager extends StorageService {
143143
ConfigKey<Integer> SecStorageMaxMigrateSessions = new ConfigKey<Integer>("Advanced", Integer.class, "secstorage.max.migrate.sessions", "2",
144144
"The max number of concurrent copy command execution sessions that an SSVM can handle", false, ConfigKey.Scope.Global);
145145

146+
ConfigKey<Boolean> SecStorageVMAutoScaleDown = new ConfigKey<Boolean>("Advanced", Boolean.class, "secstorage.vm.auto.scale.down", "false",
147+
"Setting this to 'true' will auto scale down SSVMs", true, ConfigKey.Scope.Global);
148+
146149
ConfigKey<Integer> MaxDataMigrationWaitTime = new ConfigKey<Integer>("Advanced", Integer.class, "max.data.migration.wait.time", "15",
147150
"Maximum wait time for a data migration task before spawning a new SSVM", false, ConfigKey.Scope.Global);
148151
ConfigKey<Boolean> DiskProvisioningStrictness = new ConfigKey<Boolean>("Storage", Boolean.class, "disk.provisioning.type.strictness", "false",

server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3331,7 +3331,8 @@ public ConfigKey<?>[] getConfigKeys() {
33313331
SecStorageMaxMigrateSessions,
33323332
MaxDataMigrationWaitTime,
33333333
DiskProvisioningStrictness,
3334-
PreferredStoragePool
3334+
PreferredStoragePool,
3335+
SecStorageVMAutoScaleDown
33353336
};
33363337
}
33373338

services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/PremiumSecondaryStorageManagerImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ else if (!copyCmdsInPipeline.isEmpty() && copyCmdsInPipeline.size() >= halfLimi
184184
return new Pair<AfterScanAction, Object>(AfterScanAction.expand, SecondaryStorageVm.Role.commandExecutor);
185185

186186
}
187-
scaleDownSSVMOnLoad(alreadyRunning, activeCmds, copyCmdsInPipeline);
187+
if (StorageManager.SecStorageVMAutoScaleDown.value()) {
188+
scaleDownSSVMOnLoad(alreadyRunning, activeCmds, copyCmdsInPipeline);
189+
}
188190
return new Pair<AfterScanAction, Object>(AfterScanAction.nop, null);
189191
}
190192

0 commit comments

Comments
 (0)