diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java index 4af0c806060b..381b0a3204da 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java @@ -23,9 +23,18 @@ import org.apache.cloudstack.api.response.MigrationResponse; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService.TemplateApiResult; +import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.storage.ImageStoreService.MigrationPolicy; public interface StorageOrchestrationService { + + ConfigKey ImageStoreImbalanceThreshold = new ConfigKey<>("Advanced", Double.class, + "image.store.imbalance.threshold", + "0.3", + "The storage imbalance threshold that is compared with the standard deviation percentage for a storage utilization metric. " + + "The value is a percentage in decimal format.", + true, ConfigKey.Scope.Global); + MigrationResponse migrateData(Long srcDataStoreId, List destDatastores, MigrationPolicy migrationPolicy); MigrationResponse migrateResources(Long srcImgStoreId, Long destImgStoreId, List templateIdList, List snapshotIdList); diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java index 933b4e0c5ce6..a6e91c0e36c7 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java @@ -116,14 +116,6 @@ public class StorageOrchestrator extends ManagerBase implements StorageOrchestra @Inject DataCenterDao dcDao; - - ConfigKey ImageStoreImbalanceThreshold = new ConfigKey<>("Advanced", Double.class, - "image.store.imbalance.threshold", - "0.3", - "The storage imbalance threshold that is compared with the standard deviation percentage for a storage utilization metric. " + - "The value is a percentage in decimal format.", - true, ConfigKey.Scope.Global); - Integer numConcurrentCopyTasksPerSSVM = 2; private final Map zoneExecutorMap = new HashMap<>(); diff --git a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java index c1eb21849934..42a481f55bc5 100644 --- a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java @@ -92,11 +92,14 @@ import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd; import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd; import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd; +import org.apache.cloudstack.backup.BackupManager; import org.apache.cloudstack.cluster.ClusterDrsService; import org.apache.cloudstack.config.ApiServiceConfiguration; import org.apache.cloudstack.config.Configuration; import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.diagnostics.DiagnosticsServiceImpl; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.cloudstack.engine.orchestration.service.StorageOrchestrationService; import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; import org.apache.cloudstack.framework.config.ConfigDepot; @@ -622,6 +625,8 @@ protected void weightBasedParametersForValidation() { weightBasedParametersForValidation.add(AlertManager.StorageAllocatedCapacityThreshold.key()); weightBasedParametersForValidation.add(AlertManager.StorageCapacityThreshold.key()); weightBasedParametersForValidation.add(AlertManager.MemoryCapacityThreshold.key()); + weightBasedParametersForValidation.add(AlertManager.Ipv6SubnetCapacityThreshold.key()); + weightBasedParametersForValidation.add(BackupManager.BackupStorageCapacityThreshold.key()); weightBasedParametersForValidation.add(Config.PublicIpCapacityThreshold.key()); weightBasedParametersForValidation.add(Config.PrivateIpCapacityThreshold.key()); weightBasedParametersForValidation.add(Config.SecondaryStorageCapacityThreshold.key()); @@ -639,6 +644,9 @@ protected void weightBasedParametersForValidation() { weightBasedParametersForValidation.add(ClusterDrsService.ClusterDrsImbalanceThreshold.key()); weightBasedParametersForValidation.add(ClusterDrsService.ClusterDrsImbalanceSkipThreshold.key()); weightBasedParametersForValidation.add(ConfigurationManager.HostCapacityTypeCpuMemoryWeight.key()); + weightBasedParametersForValidation.add(DiagnosticsServiceImpl.DiskQuotaPercentageThreshold.key()); + weightBasedParametersForValidation.add(StorageManager.ObjectStorageCapacityThreshold.key()); + weightBasedParametersForValidation.add(StorageOrchestrationService.ImageStoreImbalanceThreshold.key()); } protected void overProvisioningFactorsForValidation() { diff --git a/server/src/main/java/com/cloud/storage/ImageStoreServiceImpl.java b/server/src/main/java/com/cloud/storage/ImageStoreServiceImpl.java index 67f2e0ab7a42..9f98e291fc2c 100644 --- a/server/src/main/java/com/cloud/storage/ImageStoreServiceImpl.java +++ b/server/src/main/java/com/cloud/storage/ImageStoreServiceImpl.java @@ -32,7 +32,6 @@ import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.orchestration.service.StorageOrchestrationService; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; -import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.jobs.AsyncJobManager; import org.apache.cloudstack.storage.ImageStoreService; import org.apache.cloudstack.storage.datastore.db.ImageStoreDao; @@ -57,18 +56,6 @@ public class ImageStoreServiceImpl extends ManagerBase implements ImageStoreServ @Inject public UUIDManager uuidMgr; - ConfigKey ImageStoreImbalanceThreshold = new ConfigKey<>("Advanced", Double.class, - "image.store.imbalance.threshold", - "0.3", - "The storage imbalance threshold that is compared with the standard deviation percentage for a storage utilization metric. " + - "The value is a percentage in decimal format.", - true, ConfigKey.Scope.Global); - - - public Integer numConcurrentCopyTasksPerSSVM = null; - - - @Override public boolean configure(String name, Map params) throws ConfigurationException { return true; diff --git a/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java b/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java index 5e812b5fea8a..15ebaec70977 100644 --- a/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java +++ b/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java @@ -113,7 +113,7 @@ public class DiagnosticsServiceImpl extends ManagerBase implements PluggableServ private static final ConfigKey MaximumFileAgeforGarbageCollection = new ConfigKey<>("Advanced", Long.class, "diagnostics.data.max.file.age", "86400", "Sets the maximum time in seconds a file can stay in secondary storage before it is deleted.", true, EnableGarbageCollector.key()); - private static final ConfigKey DiskQuotaPercentageThreshold = new ConfigKey<>("Advanced", Double.class, + public static final ConfigKey DiskQuotaPercentageThreshold = new ConfigKey<>("Advanced", Double.class, "diagnostics.data.disable.threshold", "0.9", "Sets the secondary storage disk utilisation percentage for file retrieval. " + "Used to look for suitable secondary storage with enough space, otherwise an exception is " +