mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
Add staging target path validation to nodeserver
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
dc04362ac5
commit
3e2d2787b6
@ -180,6 +180,10 @@ func validateNodePublishVolumeRequest(req *csi.NodePublishVolumeRequest) error {
|
|||||||
return errors.New("target path missing in request")
|
return errors.New("target path missing in request")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if req.GetStagingTargetPath() == "" {
|
||||||
|
return errors.New("staging target path missing in request")
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,9 +41,6 @@ type NodeServer struct {
|
|||||||
mounter mount.Interface
|
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
|
// NodePublishVolume mounts the volume mounted to the device path to the target
|
||||||
// path
|
// path
|
||||||
func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {
|
func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user