diff --git a/pkg/hostpath/nodeserver.go b/pkg/hostpath/nodeserver.go index 238eccc0a..7429746fa 100644 --- a/pkg/hostpath/nodeserver.go +++ b/pkg/hostpath/nodeserver.go @@ -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 }