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 c4aa7ad commit 759aab1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 3 additions & 4 deletions docs/containers-storage.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ 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.

[storage.options.thinpool]

Storage Options for thinpool
Expand Down Expand Up @@ -89,10 +92,6 @@ Tells driver to wipe device (directlvm_device) even if device already has a file

Specifies the filesystem type to use for the base device. (default: xfs)

**fuse_program**=""

Specifies the path to a custom FUSE program to use instead for mounting the file system.

**log_level**=""

Sets the log level of devicemapper.
Expand Down
4 changes: 4 additions & 0 deletions storage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ 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
7 changes: 5 additions & 2 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 @@ -3086,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.OverrideKernelCheck != "" {
storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.override_kernel_check=%s", config.Storage.Driver, config.Storage.Options.OverrideKernelCheck))
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 759aab1

Please sign in to comment.