Skip to content

Commit 1a5b7c3

Browse files
authored
engine/orchestration: display numeric value instead of variable name (#3818)
If the disk size of the vm to be created is greater than the volume size, then the exception message should display the numeric value instead of variable name
1 parent f72f39c commit 1a5b7c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ public boolean validateVolumeSizeRange(long size) {
645645
if (size < 0 || (size > 0 && size < (1024 * 1024 * 1024))) {
646646
throw new InvalidParameterValueException("Please specify a size of at least 1 GB.");
647647
} else if (size > (MaxVolumeSize.value() * 1024 * 1024 * 1024)) {
648-
throw new InvalidParameterValueException("volume size " + size + ", but the maximum size allowed is " + MaxVolumeSize + " GB.");
648+
throw new InvalidParameterValueException("volume size " + size + ", but the maximum size allowed is " + MaxVolumeSize.value() + " GB.");
649649
}
650650

651651
return true;

0 commit comments

Comments
 (0)