mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 06:10:22 +00:00
rbd: have GetVolumeGroup()
return an empty volume group if it was not found
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
5d5171c7d7
commit
4b13e9132b
@ -74,6 +74,12 @@ func GetVolumeGroup(
|
|||||||
|
|
||||||
attrs, err := vg.getVolumeGroupAttributes(ctx)
|
attrs, err := vg.getVolumeGroupAttributes(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, librbd.ErrNotFound) {
|
||||||
|
log.ErrorLog(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)
|
return nil, fmt.Errorf("failed to get volume attributes for id %q: %w", vg, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user