Skip to content

Commit cf65404

Browse files
committed
replace 'random' with VolumeAllocationAlgorithm.getDefaultValue()
1 parent 2934295 commit cf65404

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,11 +2041,11 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
20412041

20422042
@Override
20432043
public boolean start() {
2044-
if (configDepot.isNewConfig(VolumeOrchestrationService.VolumeAllocationAlgorithm)) {
2044+
if (configDepot.isNewConfig(VolumeAllocationAlgorithm)) {
20452045
String vmAllocationAlgo = DeploymentClusterPlanner.VmAllocationAlgorithm.value();
2046-
if (com.cloud.utils.StringUtils.isNotEmpty(vmAllocationAlgo) && !"random".equalsIgnoreCase(vmAllocationAlgo)) {
2047-
logger.debug("Updating value for configuration: {} to {}", VolumeOrchestrationService.VolumeAllocationAlgorithm.key(), vmAllocationAlgo);
2048-
configurationDao.update(VolumeOrchestrationService.VolumeAllocationAlgorithm.key(), vmAllocationAlgo);
2046+
if (com.cloud.utils.StringUtils.isNotEmpty(vmAllocationAlgo) && !VolumeAllocationAlgorithm.defaultValue().equalsIgnoreCase(vmAllocationAlgo)) {
2047+
logger.debug("Updating value for configuration: {} to {}", VolumeAllocationAlgorithm.key(), vmAllocationAlgo);
2048+
configurationDao.update(VolumeAllocationAlgorithm.key(), vmAllocationAlgo);
20492049
}
20502050
}
20512051
return true;

0 commit comments

Comments
 (0)