Skip to content

Commit

Permalink
rbd: check for valid UUID instead of name
Browse files Browse the repository at this point in the history
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 <ndevos@ibm.com>
  • Loading branch information
nixpanic committed Jul 25, 2024
1 parent f9ab14e commit a1c6e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rbd/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a1c6e2a

Please sign in to comment.