diff --git a/pkg/cephfs/util.go b/pkg/cephfs/util.go index faebe127f..344e885bc 100644 --- a/pkg/cephfs/util.go +++ b/pkg/cephfs/util.go @@ -110,10 +110,16 @@ func (cs *controllerServer) validateCreateVolumeRequest(req *csi.CreateVolumeReq return status.Error(codes.InvalidArgument, "Volume Name cannot be empty") } - if req.GetVolumeCapabilities() == nil { + reqCaps := req.GetVolumeCapabilities() + if reqCaps == nil { return status.Error(codes.InvalidArgument, "Volume Capabilities cannot be empty") } + for _, cap := range reqCaps { + if cap.GetBlock() != nil { + return status.Error(codes.Unimplemented, "block volume not supported") + } + } return nil }