From 8d8e7c1b38b08128c78048713a8aaee803d761de Mon Sep 17 00:00:00 2001 From: Balu Dontu Date: Wed, 23 Aug 2017 14:44:50 -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 e66253cfd0ff5..66169be4f908c 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