mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
nfs: return gRPC status from CephFS CreateVolume failure
The NFS Controller returns a non-gRPC error in case the CreateVolume call for the CephFS volume fails. It is better to return the gRPC-error that the CephFS Controller passed along. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
8655a55b2e
commit
2b71aac752
@ -18,7 +18,6 @@ package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/cephfs"
|
||||
"github.com/ceph/ceph-csi/internal/cephfs/store"
|
||||
@ -75,7 +74,7 @@ func (cs *Server) CreateVolume(
|
||||
req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) {
|
||||
res, err := cs.backendServer.CreateVolume(ctx, req)
|
||||
if err != nil {
|
||||
return res, fmt.Errorf("failed to create CephFS volume: %w", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
backend := res.Volume
|
||||
|
Loading…
Reference in New Issue
Block a user