diff --git a/pkg/cephfs/util.go b/pkg/cephfs/util.go index 069122d9d..25e0e2db5 100644 --- a/pkg/cephfs/util.go +++ b/pkg/cephfs/util.go @@ -177,6 +177,10 @@ func validateNodePublishVolumeRequest(req *csi.NodePublishVolumeRequest) error { return errors.New("target path missing in request") } + if req.GetStagingTargetPath() == "" { + return errors.New("staging target path missing in request") + } + return nil } diff --git a/pkg/rbd/nodeserver.go b/pkg/rbd/nodeserver.go index ded1c99ee..20c7a8b09 100644 --- a/pkg/rbd/nodeserver.go +++ b/pkg/rbd/nodeserver.go @@ -41,9 +41,6 @@ type NodeServer struct { mounter mount.Interface } -//TODO remove both stage and unstage methods -//once https://github.com/kubernetes-csi/drivers/pull/145 is merged - // NodePublishVolume mounts the volume mounted to the device path to the target // path func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {