From cfdff1ae46b0fb55e7626ada8648e58e4dfea8d2 Mon Sep 17 00:00:00 2001 From: Balu Dontu Date: Mon, 21 Aug 2017 18:06:29 -0700 Subject: [PATCH] Multi-Attach volume fix for vSphere --- pkg/controller/volume/attachdetach/reconciler/reconciler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/controller/volume/attachdetach/reconciler/reconciler.go b/pkg/controller/volume/attachdetach/reconciler/reconciler.go index d70a59db1fb1a..26133bb3bcd5e 100644 --- a/pkg/controller/volume/attachdetach/reconciler/reconciler.go +++ b/pkg/controller/volume/attachdetach/reconciler/reconciler.go @@ -148,6 +148,11 @@ func (rc *reconciler) isMultiAttachForbidden(volumeSpec *volume.Spec) bool { // Only if this volume is a persistent volume, we have reliable information on wether it's allowed or not to // multi-attach. We trust in the individual volume implementations to not allow unsupported access modes if volumeSpec.PersistentVolume != nil { + // Check for persistent volume types which do not fail when trying to multi-attach + if volumeSpec.PersistentVolume.Spec.VsphereVolume != nil { + return false + } + if len(volumeSpec.PersistentVolume.Spec.AccessModes) == 0 { // No access mode specified so we don't know for sure. Let the attacher fail if needed return false