From ef862a774877cdfd356e46fd0c014cdab1371619 Mon Sep 17 00:00:00 2001 From: Naoki Kanno Date: Mon, 14 Aug 2023 14:02:54 +0900 Subject: [PATCH] CtrlVlmDfn: Fix size-check for meta-pools with resize volume case This is a workaround, not an actual fix. This workaround skips the size-check for meta-pools instead of correctly checking also for the volume-definition modify case. --- .../controller/CtrlVlmDfnModifyApiCallHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/CtrlVlmDfnModifyApiCallHandler.java b/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/CtrlVlmDfnModifyApiCallHandler.java index c6ffd93b1..aef839c7c 100644 --- a/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/CtrlVlmDfnModifyApiCallHandler.java +++ b/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/CtrlVlmDfnModifyApiCallHandler.java @@ -644,7 +644,12 @@ private void ensureAllStorPoolsHaveEnoughFreeSpace(VolumeDefinition vlmDfnRef, l while (rscIt.hasNext()) { Resource rsc = rscIt.next(); - Set storPools = LayerVlmUtils.getStorPools(rsc, apiCtx, true); + /* + * TODO: improve this size check of metadata. + * Metadata size check skipped by workaround "withMetaStoragePools=false". + * This might fail later if a meta-pool runs out of space on the satellite. + */ + Set storPools = LayerVlmUtils.getStorPools(rsc, apiCtx, false); for (StorPool sp : storPools) { if (!sp.getDeviceProviderKind().usesThinProvisioning())