From b3349f53cdd4edc18d53e3471a4c20e084979ba9 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Thu, 15 Sep 2022 17:16:11 -0700 Subject: [PATCH] Respect snap_name parameter for in-progress backups --- .../controller/backup/CtrlBackupApiCallHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/backup/CtrlBackupApiCallHandler.java b/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/backup/CtrlBackupApiCallHandler.java index 2a59b8097..bf44b568e 100644 --- a/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/backup/CtrlBackupApiCallHandler.java +++ b/controller/src/main/java/com/linbit/linstor/core/apicallhandler/controller/backup/CtrlBackupApiCallHandler.java @@ -751,6 +751,12 @@ public Pair, Set> listBackups( String rscName = rscDfn.getName().displayValue; String snapName = snapDfn.getName().displayValue; + if (snapNameRef != null && !snapNameRef.isEmpty() && snapNameRef.equals(snapName)) + { + // Doesn't match the requested snapshot name, skip it. + continue; + } + String s3Suffix = snapDfn.getProps(peerCtx).getProp( ApiConsts.KEY_BACKUP_S3_SUFFIX, ApiConsts.NAMESPC_BACKUP_SHIPPING