Skip to content

Commit 1090e7a

Browse files
nvazquezdhslove
authored andcommitted
Fix Linstor shrink qcow2 volumes (apache#12387)
1 parent a6b0bec commit 1090e7a

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
@@ -2505,7 +2505,8 @@ private void validateVolumeResizeWithSize(VolumeVO volume, long currentSize, Lon
25052505
}
25062506
}
25072507

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

0 commit comments

Comments
 (0)