Unverified Commit 158998b8 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #66612 from humblec/enable-mountoptions

Automatic merge from submit-queue (batch tested with PRs 66373, 66612). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove `auto_unmount` mount option from pv spec annotation. At present, `auto_unmount` option is recorded at PV annotation of glusterfs PV. Due to the preference given in MountOptionFromSpec() for annotation mount options over sc supplied mount options(Ref PR# https://github.com/kubernetes/kubernetes/pull/66576), the sc supplied mount options are not honoured in glusterfs plugin eventhough the driver returns `true` for storage class mountoptions support at probe. This patch removes `auto_unmount` option from annotation of the pv spec Signed-off-by: 's avatarHumble Chirammal <hchiramm@redhat.com> **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 4378a999 d4480d4f
...@@ -322,7 +322,11 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { ...@@ -322,7 +322,11 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error {
} }
} }
//Add backup-volfile-servers and auto_unmount options.
options = append(options, "backup-volfile-servers="+dstrings.Join(addrlist[:], ":")) options = append(options, "backup-volfile-servers="+dstrings.Join(addrlist[:], ":"))
options = append(options, "auto_unmount")
mountOptions := volutil.JoinMountOptions(b.mountOptions, options) mountOptions := volutil.JoinMountOptions(b.mountOptions, options)
// with `backup-volfile-servers` mount option in place, it is not required to // with `backup-volfile-servers` mount option in place, it is not required to
...@@ -719,6 +723,7 @@ func (p *glusterfsVolumeProvisioner) Provision(selectedNode *v1.Node, allowedTop ...@@ -719,6 +723,7 @@ func (p *glusterfsVolumeProvisioner) Provision(selectedNode *v1.Node, allowedTop
if len(pv.Spec.AccessModes) == 0 { if len(pv.Spec.AccessModes) == 0 {
pv.Spec.AccessModes = p.plugin.GetAccessModes() pv.Spec.AccessModes = p.plugin.GetAccessModes()
} }
pv.Spec.MountOptions = p.options.MountOptions pv.Spec.MountOptions = p.options.MountOptions
gidStr := strconv.FormatInt(int64(gid), 10) gidStr := strconv.FormatInt(int64(gid), 10)
...@@ -728,7 +733,6 @@ func (p *glusterfsVolumeProvisioner) Provision(selectedNode *v1.Node, allowedTop ...@@ -728,7 +733,6 @@ func (p *glusterfsVolumeProvisioner) Provision(selectedNode *v1.Node, allowedTop
volutil.VolumeDynamicallyCreatedByKey: heketiAnn, volutil.VolumeDynamicallyCreatedByKey: heketiAnn,
glusterTypeAnn: "file", glusterTypeAnn: "file",
"Description": glusterDescAnn, "Description": glusterDescAnn,
v1.MountOptionAnnotation: "auto_unmount",
heketiVolIDAnn: volID, heketiVolIDAnn: volID,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment