From 37136e9780a08aad00b49c7bb865c8faa325c676 Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Fri, 2 Dec 2016 14:36:46 -0800 Subject: [PATCH] Enable containerized mounter only for nfs and glusterfs types This change is to only enable containerized mounter for nfs and glusterfs types. For other types such as tmpfs, ext2/3/4 or empty type, we should still use mount from $PATH --- pkg/util/mount/mount_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 3fbedf75ae4..51e4515d4c0 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -74,9 +74,9 @@ func (mounter *Mounter) Mount(source string, target string, fstype string, optio } return doMount(mounterPath, source, target, fstype, bindRemountOpts) } - // These filesystem types are expected to be supported by the mount utility on the host across all Linux distros. - var defaultMounterFsTypes = sets.NewString("tmpfs", "ext4", "ext3", "ext2") - if !defaultMounterFsTypes.Has(fstype) { + // The list of filesystems that require containerized mounter on GCI image cluster + fsTypesNeedMounter := sets.NewString("nfs", "glusterfs") + if fsTypesNeedMounter.Has(fstype) { mounterPath = mounter.mounterPath } return doMount(mounterPath, source, target, fstype, options)