Skip to content

Commit 9a38e75

Browse files
authored
Fix Linstor shrink qcow2 volumes (#12387)
1 parent 750290b commit 9a38e75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2420,7 +2420,8 @@ private void validateVolumeResizeWithSize(VolumeVO volume, long currentSize, Lon
24202420
}
24212421
}
24222422

2423-
if (volume != null && ImageFormat.QCOW2.equals(volume.getFormat()) && !Volume.State.Allocated.equals(volume.getState()) && !StoragePoolType.StorPool.equals(volume.getPoolType())) {
2423+
if (volume != null && ImageFormat.QCOW2.equals(volume.getFormat()) && !Volume.State.Allocated.equals(volume.getState()) &&
2424+
!Arrays.asList(StoragePoolType.StorPool, StoragePoolType.Linstor).contains(volume.getPoolType())) {
24242425
String message = "Unable to shrink volumes of type QCOW2";
24252426
logger.warn(message);
24262427
throw new InvalidParameterValueException(message);

0 commit comments

Comments
 (0)