Skip to content

Commit

Permalink
storage: allow to override .fuse_program from the conf file
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Jul 16, 2018
1 parent 9447ea9 commit b598b50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 6 additions & 0 deletions store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit b598b50

Please sign in to comment.