Skip to content

kernel version check in overlay2 is too strict #24023

@nathwill

Description

@nathwill

the kernel version check in the overlay2 driver appears to be unnecessarily restrictive for the case where the overlay driver support for multiple lower dirs has been backported, as it has in EL 7. from what i can tell, the 3.10 kernel in EL7 does support multiple lower directories, so should be supported. Here's my replication of the kernel docs' description of support for this feature in an EL 7.2 test-kitchen VM:

[root@docker-centos-72 ~]# uname -r
3.10.0-327.el7.x86_64
[root@docker-centos-72 ~]# mkdir -pv /lower1 /lower2 /lower3 /merged
mkdir: created directory ‘/lower1’
mkdir: created directory ‘/lower2’
mkdir: created directory ‘/lower3’
mkdir: created directory ‘/merged’
[root@docker-centos-72 ~]# touch /lower1/1.txt /lower2/2.txt /lower3/3.txt
[root@docker-centos-72 ~]#   mount -t overlay overlay -olowerdir=/lower1:/lower2:/lower3 /merged
[root@docker-centos-72 ~]# ls /merged/
1.txt  2.txt  3.txt

but on starting the daemon, it fails with error: time="2016-06-28T05:17:20.646178896Z" level=fatal msg="Error starting daemon: error initializing graphdriver: driver not supported".

Output of docker version:

Client:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd
 Built:        
 OS/Arch:      linux/amd64
 Experimental: true

Server:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd
 Built:        
 OS/Arch:      linux/amd64
 Experimental: true

Output of docker info:

[root@docker-centos-72 ~]# docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Additional environment details (AWS, VirtualBox, physical, etc.):

tested in VirtualBox

Steps to reproduce the issue:

  1. install docker 1.12 rc on EL 7.2
  2. run docker daemon with --storage-driver=overlay2
  3. observe error

Describe the results you received:

docker daemon start failure due to initialization check for kernel version >= 4.0 when running docker with overlay2 storage driver on EL 7.2

Describe the results you expected:

success running docker with overlay2 storage driver on EL 7.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions