mirror of https://github.com/k3s-io/k3s
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: Humble Chirammal <hchiramm@redhat.com>pull/8/head
parent
69176615e5
commit
d4480d4f32
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue