From b598b50bcdd76cafa4d8078764a77a0ee7c65cc4 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 16 Jul 2018 11:24:15 +0200 Subject: [PATCH] storage: allow to override .fuse_program from the conf file Signed-off-by: Giuseppe Scrivano --- storage.conf | 5 +++++ store.go | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/storage.conf b/storage.conf index e1c0d2c449..8ba047300d 100644 --- a/storage.conf +++ b/storage.conf @@ -25,6 +25,11 @@ additionalimagestores = [ # certain container storage drivers. size = "" +# Path to a FUSE helper to use for mounting the file system instead of mounting it +# directly. +#fuse_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 a0135f2866..05e220bbc0 100644 --- a/store.go +++ b/store.go @@ -2992,6 +2992,9 @@ type OptionsConfig struct { // Do not create a bind mount on the storage home SkipMountHome string `toml:"skip_mount_home"` + + // Alternative program to use for the mount of the file system + FuseProgram string `toml:"fuse_program"` } // TOML-friendly explicit tables used for conversions. @@ -3084,6 +3087,9 @@ 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.OverrideKernelCheck != "" { storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.override_kernel_check=%s", config.Storage.Driver, config.Storage.Options.OverrideKernelCheck)) }