Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove the last traces of the "override_kernel_check" option
The logic that depended on override_kernel_check was changed to test for
the feature at runtime, so we don't need to be suggesting to people that
they need to set this option, or that the option is even a thing.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
  • Loading branch information
nalind committed Jan 16, 2019
1 parent 263351e commit bd6cac9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 deletions.
5 changes: 0 additions & 5 deletions docs/containers-storage.conf.5.md
Expand Up @@ -52,11 +52,6 @@ The `storage.options` table supports the following options:
**size**=""
Maximum size of a container image. This flag can be used to set quota on the size of container images. (default: 10GB)

**override_kernel_check**=""
Tell storage drivers to ignore kernel version checks. Some storage drivers assume that if a kernel is too
old, the driver is not supported. But for kernels that have had the drivers backported, this flag
allows users to override the checks

**mount_program**=""
Specifies the path to a custom program to use instead for mounting the file system.

Expand Down
19 changes: 6 additions & 13 deletions drivers/overlay/overlay.go
Expand Up @@ -85,13 +85,12 @@ const (
)

type overlayOptions struct {
overrideKernelCheck bool
imageStores []string
quota quota.Quota
mountProgram string
ostreeRepo string
skipMountHome bool
mountOptions string
imageStores []string
quota quota.Quota
mountProgram string
ostreeRepo string
skipMountHome bool
mountOptions string
}

// Driver contains information about the home directory and the list of active mounts that are created using this driver.
Expand Down Expand Up @@ -226,12 +225,6 @@ func parseOptions(options []string) (*overlayOptions, error) {
}
key = strings.ToLower(key)
switch key {
case ".override_kernel_check", "overlay.override_kernel_check", "overlay2.override_kernel_check":
logrus.Debugf("overlay: override_kernelcheck=%s", val)
o.overrideKernelCheck, err = strconv.ParseBool(val)
if err != nil {
return nil, err
}
case ".mountopt", "overlay.mountopt", "overlay2.mountopt":
o.mountOptions = val
case ".size", "overlay.size", "overlay2.size":
Expand Down
3 changes: 0 additions & 3 deletions storage.conf
Expand Up @@ -29,9 +29,6 @@ size = ""
# directly.
#mount_program = "/usr/bin/fuse-overlayfs"

# OverrideKernelCheck tells the driver to ignore kernel checks based on kernel version
override_kernel_check = "false"

# mountopt specifies comma separated list of extra mount options
mountopt = "nodev"

Expand Down
6 changes: 0 additions & 6 deletions store.go
Expand Up @@ -3064,9 +3064,6 @@ type OptionsConfig struct {
// Size
Size string `toml:"size"`

// OverrideKernelCheck
OverrideKernelCheck string `toml:"override_kernel_check"`

// RemapUIDs is a list of default UID mappings to use for layers.
RemapUIDs string `toml:"remap-uids"`
// RemapGIDs is a list of default GID mappings to use for layers.
Expand Down Expand Up @@ -3191,9 +3188,6 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) {
if config.Storage.Options.MountOpt != "" {
storeOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf("%s.mountopt=%s", config.Storage.Driver, config.Storage.Options.MountOpt))
}
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.RemapUser != "" && config.Storage.Options.RemapGroup == "" {
config.Storage.Options.RemapGroup = config.Storage.Options.RemapUser
}
Expand Down

0 comments on commit bd6cac9

Please sign in to comment.