Skip to content

Commit cae2307

Browse files
committed
[vmware, ssvm] Scale down of ssvm
1 parent 4aaa850 commit cae2307

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

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
@@ -116,6 +116,9 @@ public interface StorageManager extends StorageService {
116116
ConfigKey<Integer> SecStorageMaxMigrateSessions = new ConfigKey<Integer>("Advanced", Integer.class, "secstorage.max.migrate.sessions", "2",
117117
"The max number of concurrent copy command execution sessions that an SSVM can handle", false, ConfigKey.Scope.Global);
118118

119+
ConfigKey<Boolean> SecStorageVMScaleDown = new ConfigKey<Boolean>("Advanced", Boolean.class, "secstorage.vm.scale.down", "false",
120+
"Setting this to 'true' will allow scaling down the number of SSVMs if the load criteria is met", true, ConfigKey.Scope.Global);
121+
119122
ConfigKey<Integer> MaxDataMigrationWaitTime = new ConfigKey<Integer>("Advanced", Integer.class, "max.data.migration.wait.time", "15",
120123
"Maximum wait time for a data migration task before spawning a new SSVM", false, ConfigKey.Scope.Global);
121124

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,6 +2959,7 @@ public ConfigKey<?>[] getConfigKeys() {
29592959
MaxNumberOfManagedClusteredFileSystems,
29602960
PRIMARY_STORAGE_DOWNLOAD_WAIT,
29612961
SecStorageMaxMigrateSessions,
2962+
SecStorageVMScaleDown,
29622963
MaxDataMigrationWaitTime
29632964
};
29642965
}

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.SecStorageVMScaleDown.value()) {
188+
scaleDownSSVMOnLoad(alreadyRunning, activeCmds, copyCmdsInPipeline);
189+
}
188190
return new Pair<AfterScanAction, Object>(AfterScanAction.nop, null);
189191
}
190192

0 commit comments

Comments
 (0)