mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: move internal/rbd/errors.go to internal/rbd/errors pacakge
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -22,21 +22,16 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ceph/go-ceph/rados"
|
||||
librados "github.com/ceph/go-ceph/rados"
|
||||
librbd "github.com/ceph/go-ceph/rbd"
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"github.com/csi-addons/spec/lib/go/volumegroup"
|
||||
|
||||
rbderrors "github.com/ceph/ceph-csi/internal/rbd/errors"
|
||||
"github.com/ceph/ceph-csi/internal/rbd/types"
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrRBDGroupNotConnected = fmt.Errorf("%w: RBD group is not connected", librados.ErrNotConnected)
|
||||
ErrRBDGroupNotFound = fmt.Errorf("%w: RBD group not found", librbd.ErrNotFound)
|
||||
)
|
||||
|
||||
// volumeGroup handles all requests for 'rbd group' operations.
|
||||
type volumeGroup struct {
|
||||
commonVolumeGroup
|
||||
@ -77,7 +72,7 @@ func GetVolumeGroup(
|
||||
|
||||
attrs, err := vg.getVolumeGroupAttributes(ctx)
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrRBDGroupNotFound) {
|
||||
if errors.Is(err, rbderrors.ErrGroupNotFound) {
|
||||
log.ErrorLog(ctx, "%v, returning empty volume group %q", vg, err)
|
||||
|
||||
return vg, err
|
||||
|
Reference in New Issue
Block a user