mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-18 04:10:22 +00:00
cephfs: use rados.ErrNotFound in subvolume info
go-ceph rados.ErrNotFound for not found errors,cephcsi need to check same for not found errors. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
a0283ef7f9
commit
2232067e99
@ -85,7 +85,7 @@ func (vo *volumeOptions) getSubVolumeInfo(ctx context.Context, volID volumeID) (
|
||||
info, err := fsa.SubVolumeInfo(vo.FsName, vo.SubvolumeGroup, string(volID))
|
||||
if err != nil {
|
||||
util.ErrorLog(ctx, "failed to get subvolume info for the vol %s: %s", string(volID), err)
|
||||
if strings.HasPrefix(err.Error(), volumeNotFound) {
|
||||
if errors.Is(err, rados.ErrNotFound) {
|
||||
return nil, ErrVolumeNotFound
|
||||
}
|
||||
// In case the error is other than invalid command return error to the caller.
|
||||
|
Loading…
Reference in New Issue
Block a user