From 79fd0e509c8838e03264f1a4b87baeaa210a4362 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Thu, 22 Nov 2018 15:07:11 +0800 Subject: [PATCH] Fix controller publish in readonly mode Plugin's PUBLISH_READONLY capability should be verified before publishing volume in readonly mode. --- pkg/sanity/controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/sanity/controller.go b/pkg/sanity/controller.go index 022e1e6d..9cc80853 100644 --- a/pkg/sanity/controller.go +++ b/pkg/sanity/controller.go @@ -953,6 +953,9 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }) It("should fail when the volume is already published but is incompatible", func() { + if !isControllerCapabilitySupported(c, csi.ControllerServiceCapability_RPC_PUBLISH_READONLY) { + Skip("ControllerPublishVolume.readonly field not supported") + } // Create Volume First By("creating a single node writer volume")