From e5022657a8dc1fe21fc4f5f7b74bb1d6b07aab3c Mon Sep 17 00:00:00 2001
From: Vitaliy Filippov <vitalif@yourcmc.ru>
Date: Tue, 14 Sep 2021 13:36:35 +0300
Subject: [PATCH] Oops, of course it should be RWM

---
 pkg/driver/controllerserver.go | 3 +--
 pkg/driver/driver.go           | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go
index 144b2f3..f3243e9 100644
--- a/pkg/driver/controllerserver.go
+++ b/pkg/driver/controllerserver.go
@@ -170,9 +170,8 @@ func (cs *controllerServer) ValidateVolumeCapabilities(ctx context.Context, req
 		return nil, status.Error(codes.NotFound, fmt.Sprintf("bucket of volume with id %s does not exist", req.GetVolumeId()))
 	}
 
-	// We currently only support RWO
 	supportedAccessMode := &csi.VolumeCapability_AccessMode{
-		Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
+		Mode: csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER,
 	}
 
 	for _, capability := range req.VolumeCapabilities {
diff --git a/pkg/driver/driver.go b/pkg/driver/driver.go
index 5553da1..3e24bf3 100644
--- a/pkg/driver/driver.go
+++ b/pkg/driver/driver.go
@@ -75,7 +75,7 @@ func (s3 *driver) Run() {
 	// Initialize default library driver
 
 	s3.driver.AddControllerServiceCapabilities([]csi.ControllerServiceCapability_RPC_Type{csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME})
-	s3.driver.AddVolumeCapabilityAccessModes([]csi.VolumeCapability_AccessMode_Mode{csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER})
+	s3.driver.AddVolumeCapabilityAccessModes([]csi.VolumeCapability_AccessMode_Mode{csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER})
 
 	// Create GRPC servers
 	s3.ids = s3.newIdentityServer(s3.driver)