Fix Linstor shrink qcow2 volumes (#12387)

This commit is contained in:
Nicolas Vazquez 2026-01-09 05:48:04 -03:00 committed by GitHub
parent 750290b8ae
commit 9a38e75abd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -2420,7 +2420,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
}
}
if (volume != null && ImageFormat.QCOW2.equals(volume.getFormat()) && !Volume.State.Allocated.equals(volume.getState()) && !StoragePoolType.StorPool.equals(volume.getPoolType())) {
if (volume != null && ImageFormat.QCOW2.equals(volume.getFormat()) && !Volume.State.Allocated.equals(volume.getState()) &&
!Arrays.asList(StoragePoolType.StorPool, StoragePoolType.Linstor).contains(volume.getPoolType())) {
String message = "Unable to shrink volumes of type QCOW2";
logger.warn(message);
throw new InvalidParameterValueException(message);