Commit d4480d4f authored by Humble Chirammal's avatar Humble Chirammal

Remove `auto_unmount` mount option from pv spec annotation to setup() func.

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>
parent 69176615
......@@ -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, "auto_unmount")
mountOptions := volutil.JoinMountOptions(b.mountOptions, options)
// 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
if len(pv.Spec.AccessModes) == 0 {
pv.Spec.AccessModes = p.plugin.GetAccessModes()
}
pv.Spec.MountOptions = p.options.MountOptions
gidStr := strconv.FormatInt(int64(gid), 10)
......@@ -728,7 +733,6 @@ func (p *glusterfsVolumeProvisioner) Provision(selectedNode *v1.Node, allowedTop
volutil.VolumeDynamicallyCreatedByKey: heketiAnn,
glusterTypeAnn: "file",
"Description": glusterDescAnn,
v1.MountOptionAnnotation: "auto_unmount",
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