From 93dada2f8a20630d251d3e51782675ae29cd8b67 Mon Sep 17 00:00:00 2001 From: xing-yang Date: Tue, 13 Mar 2018 12:25:55 -0700 Subject: [PATCH] NFS plugin does not support ControllerServiceCapability Since NFS plugin does not support ControllerServiceCapability, set it to csi.ControllerServiceCapability_RPC_UNKNOWN. Also set ControllerServer to nil instead of using the default because ControllerServer is not implemented in NFS plugin. If this support is added in the future, capabilities need to be added accordingly. --- pkg/nfs/driver.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/nfs/driver.go b/pkg/nfs/driver.go index fbf4c9c8..4aa9ec87 100644 --- a/pkg/nfs/driver.go +++ b/pkg/nfs/driver.go @@ -51,6 +51,10 @@ func NewDriver(nodeID, endpoint string) *driver { csiDriver := csicommon.NewCSIDriver(driverName, version, nodeID) csiDriver.AddVolumeCapabilityAccessModes([]csi.VolumeCapability_AccessMode_Mode{csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER}) + // NFS plugin does not support ControllerServiceCapability now. + // If support is added, it should set to appropriate + // ControllerServiceCapability RPC types. + csiDriver.AddControllerServiceCapabilities([]csi.ControllerServiceCapability_RPC_Type{csi.ControllerServiceCapability_RPC_UNKNOWN}) d.csiDriver = csiDriver @@ -67,7 +71,8 @@ func (d *driver) Run() { s := csicommon.NewNonBlockingGRPCServer() s.Start(d.endpoint, csicommon.NewDefaultIdentityServer(d.csiDriver), - csicommon.NewDefaultControllerServer(d.csiDriver), + // NFS plugin has not implemented ControllerServer. + nil, NewNodeServer(d)) s.Wait() }