Skip to content

Commit 913baa6

Browse files
nvazquezLocharla, Sandeep
authored andcommitted
Fix Linstor shrink qcow2 volumes (apache#12387)
1 parent 15e2e82 commit 913baa6

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
@@ -2459,7 +2459,8 @@ private void validateVolumeResizeWithSize(VolumeVO volume, long currentSize, Lon
24592459
}
24602460
}
24612461

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

0 commit comments

Comments
 (0)