From 74d434c3b74a94e1cf3360d06edcb3cfd120c892 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 25 Jul 2024 11:02:48 +0200 Subject: [PATCH] rbd: check for valid UUID instead of name It seems to be possible that the UUID was found, but the name is not set. Checking on UUID makes the CreateVolumeGroup operation more idempotent. Signed-off-by: Niels de Vos --- internal/rbd/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rbd/manager.go b/internal/rbd/manager.go index 50e278ce6..48b5130d9 100644 --- a/internal/rbd/manager.go +++ b/internal/rbd/manager.go @@ -192,7 +192,7 @@ func (mgr *rbdManager) CreateVolumeGroup(ctx context.Context, name string) (type } var uuid string - if vgData != nil && vgData.GroupName != "" { + if vgData != nil && vgData.GroupUUID != "" { uuid = vgData.GroupUUID } else { log.DebugLog(ctx, "the journal does not contain a reservation for a volume group with name %q yet", name)