Skip to content

Commit

Permalink
node: Add capability check in NodeStageVolume
Browse files Browse the repository at this point in the history
This fixes the csi-sanity failures for hostpath driver.
  • Loading branch information
darkowlzz committed Mar 24, 2019
1 parent 136a97a commit 9c69661
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/hostpath/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ func (ns *nodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
if len(req.GetStagingTargetPath()) == 0 {
return nil, status.Error(codes.InvalidArgument, "Target path missing in request")
}
if req.GetVolumeCapability() == nil {
return nil, status.Error(codes.InvalidArgument, "Volume Capability missing in request")
}

return &csi.NodeStageVolumeResponse{}, nil
}
Expand Down

0 comments on commit 9c69661

Please sign in to comment.