diff --git a/docs/containers-storage.conf.5.md b/docs/containers-storage.conf.5.md index 6460fe9aec..cf12f31dda 100644 --- a/docs/containers-storage.conf.5.md +++ b/docs/containers-storage.conf.5.md @@ -55,8 +55,8 @@ The `storage.options` table supports the following options: old, the driver is not supported. But for kernels that have had the drivers backported, this flag allows users to override the checks -**fuse_program**="" - Specifies the path to a custom FUSE program to use instead for mounting the file system. +**mount_program**="" + Specifies the path to a custom program to use instead for mounting the file system. [storage.options.thinpool] diff --git a/drivers/overlay/overlay.go b/drivers/overlay/overlay.go index 5d5d61d9c8..fbe36f4a46 100644 --- a/drivers/overlay/overlay.go +++ b/drivers/overlay/overlay.go @@ -85,7 +85,7 @@ type overlayOptions struct { overrideKernelCheck bool imageStores []string quota quota.Quota - fuseProgram string + mountProgram string ostreeRepo string skipMountHome bool } @@ -153,7 +153,7 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap } var supportsDType bool - if opts.fuseProgram != "" { + if opts.mountProgram != "" { supportsDType = true } else { supportsDType, err = supportsOverlay(home, fsMagic, rootUID, rootGID) @@ -246,13 +246,13 @@ func parseOptions(options []string) (*overlayOptions, error) { } o.imageStores = append(o.imageStores, store) } - case ".fuse_program", "overlay.fuse_program", "overlay2.fuse_program": - logrus.Debugf("overlay: fuse_program=%s", val) + case ".mount_program", "overlay.mount_program", "overlay2.mount_program": + logrus.Debugf("overlay: mount_program=%s", val) _, err := os.Stat(val) if err != nil { - return nil, fmt.Errorf("overlay: can't stat FUSE program %s: %v", val, err) + return nil, fmt.Errorf("overlay: can't stat program %s: %v", val, err) } - o.fuseProgram = val + o.mountProgram = val case "overlay2.ostree_repo", "overlay.ostree_repo", ".ostree_repo": logrus.Debugf("overlay: ostree_repo=%s", val) if !ostree.OstreeSupport() { @@ -713,7 +713,7 @@ func (d *Driver) Get(id, mountLabel string) (_ string, retErr error) { // the page size. The mount syscall fails if the mount data cannot // fit within a page and relative links make the mount data much // smaller at the expense of requiring a fork exec to chroot. - if len(mountData) > pageSize || d.options.fuseProgram != "" { + if len(mountData) > pageSize || d.options.mountProgram != "" { //FIXME: We need to figure out to get this to work with additional stores opts = fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s", strings.Join(relLowers, ":"), path.Join(id, "diff"), path.Join(id, "work")) mountData = label.FormatMountLabel(opts, mountLabel) @@ -721,11 +721,11 @@ func (d *Driver) Get(id, mountLabel string) (_ string, retErr error) { return "", fmt.Errorf("cannot mount layer, mount label too large %d", len(mountData)) } - if d.options.fuseProgram != "" { + if d.options.mountProgram != "" { mount = func(source string, target string, mType string, flags uintptr, label string) error { - cmdRootless := exec.Command(d.options.fuseProgram, "-o", label, target) - cmdRootless.Dir = d.home - return cmdRootless.Run() + mountProgram := exec.Command(d.options.mountProgram, "-o", label, target) + mountProgram.Dir = d.home + return mountProgram.Run() } } else { mount = func(source string, target string, mType string, flags uintptr, label string) error { diff --git a/storage.conf b/storage.conf index 740cc15424..636fe72c8d 100644 --- a/storage.conf +++ b/storage.conf @@ -25,9 +25,9 @@ additionalimagestores = [ # certain container storage drivers. size = "" -# Path to a FUSE helper to use for mounting the file system instead of mounting it +# Path to an helper program to use for mounting the file system instead of mounting it # directly. -#fuse_program = "/usr/bin/fuse-overlayfs" +#mount_program = "/usr/bin/fuse-overlayfs" # OverrideKernelCheck tells the driver to ignore kernel checks based on kernel version override_kernel_check = "false" diff --git a/store.go b/store.go index 3b9bb734bd..bafe011bf4 100644 --- a/store.go +++ b/store.go @@ -2994,7 +2994,7 @@ type OptionsConfig struct { SkipMountHome string `toml:"skip_mount_home"` // Alternative program to use for the mount of the file system - FuseProgram string `toml:"fuse_program"` + MountProgram string `toml:"mount_program"` } // TOML-friendly explicit tables used for conversions. @@ -3089,8 +3089,8 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) { if config.Storage.Options.SkipMountHome != "" { storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.skip_mount_home=%s", config.Storage.Driver, config.Storage.Options.SkipMountHome)) } - if config.Storage.Options.FuseProgram != "" { - storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.fuse_program=%s", config.Storage.Driver, config.Storage.Options.FuseProgram)) + if config.Storage.Options.MountProgram != "" { + storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.mount_program=%s", config.Storage.Driver, config.Storage.Options.MountProgram)) } if config.Storage.Options.OverrideKernelCheck != "" { storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.override_kernel_check=%s", config.Storage.Driver, config.Storage.Options.OverrideKernelCheck))