mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
Fix Cephfs plugin to return false to ValidateVolumeCapabilities if Block volume is specified
Cephfs doesn't have a feature to provide Block Volume, therefore it should return false to ValidateVolumeCapabilities if Block Volume is specified. Fixes #44
This commit is contained in:
parent
0df9e8e794
commit
753dbc2303
@ -185,5 +185,11 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
||||
func (cs *controllerServer) ValidateVolumeCapabilities(
|
||||
ctx context.Context,
|
||||
req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) {
|
||||
// Cephfs doesn't support Block volume
|
||||
for _, cap := range req.VolumeCapabilities {
|
||||
if cap.GetBlock() != nil {
|
||||
return &csi.ValidateVolumeCapabilitiesResponse{Supported: false, Message: ""}, nil
|
||||
}
|
||||
}
|
||||
return &csi.ValidateVolumeCapabilitiesResponse{Supported: true}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user