Skip to content

Commit

Permalink
CSI: Verify that NodePublishVolume request contains access mode
Browse files Browse the repository at this point in the history
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
  • Loading branch information
olljanat committed Feb 7, 2023
1 parent fc8d4e6 commit a73eb42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent/csi/plugin/plugin.go
Expand Up @@ -290,6 +290,9 @@ func (np *nodePlugin) NodePublishVolume(ctx context.Context, req *api.VolumeAssi
if len(req.VolumeID) == 0 {
return status.Error(codes.InvalidArgument, "Volume ID missing in request")
}
if len(req.AccessMode) == 0 {
return status.Error(codes.InvalidArgument, "AccessMode missing in request")
}

np.mu.Lock()
defer np.mu.Unlock()
Expand Down

0 comments on commit a73eb42

Please sign in to comment.