Skip to content

Commit

Permalink
rbd: have GetVolumeGroup() return an empty volume group if it was n…
Browse files Browse the repository at this point in the history
…ot found

Signed-off-by: Niels de Vos <[email protected]>
  • Loading branch information
nixpanic committed Oct 1, 2024
1 parent b258654 commit 3e5713f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/rbd/group/volume_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func GetVolumeGroup(

attrs, err := vg.getVolumeGroupAttributes(ctx)
if err != nil {
if errors.Is(librbd.ErrNotFound, err) {
log.DebugLog(ctx, "%v, returning empty volume group %q", vg, err)

return vg, err
}

return nil, fmt.Errorf("failed to get volume attributes for id %q: %w", vg, err)
}

Expand Down

0 comments on commit 3e5713f

Please sign in to comment.