{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/24023","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/24023/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/24023/comments","events_url":"https://api.github.com/repos/docker/docker/issues/24023/events","html_url":"https://github.com/docker/docker/issues/24023","id":162604426,"number":24023,"title":"kernel version check in overlay2 is too strict","user":{"login":"nathwill","id":371597,"avatar_url":"https://avatars.githubusercontent.com/u/371597?v=3","gravatar_id":"","url":"https://api.github.com/users/nathwill","html_url":"https://github.com/nathwill","followers_url":"https://api.github.com/users/nathwill/followers","following_url":"https://api.github.com/users/nathwill/following{/other_user}","gists_url":"https://api.github.com/users/nathwill/gists{/gist_id}","starred_url":"https://api.github.com/users/nathwill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathwill/subscriptions","organizations_url":"https://api.github.com/users/nathwill/orgs","repos_url":"https://api.github.com/users/nathwill/repos","events_url":"https://api.github.com/users/nathwill/events{/privacy}","received_events_url":"https://api.github.com/users/nathwill/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-28T05:20:03Z","updated_at":"2016-06-28T06:15:01Z","closed_at":null,"body":"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:\r\n\r\n```bash\r\n[root@docker-centos-72 ~]# uname -r\r\n3.10.0-327.el7.x86_64\r\n[root@docker-centos-72 ~]# mkdir -pv /lower1 /lower2 /lower3 /merged\r\nmkdir: created directory ‘/lower1’\r\nmkdir: created directory ‘/lower2’\r\nmkdir: created directory ‘/lower3’\r\nmkdir: created directory ‘/merged’\r\n[root@docker-centos-72 ~]# touch /lower1/1.txt /lower2/2.txt /lower3/3.txt\r\n[root@docker-centos-72 ~]#   mount -t overlay overlay -olowerdir=/lower1:/lower2:/lower3 /merged\r\n[root@docker-centos-72 ~]# ls /merged/\r\n1.txt  2.txt  3.txt\r\n```\r\n\r\nbut 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\"`.\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:      1.12.0-rc2\r\n API version:  1.24\r\n Go version:   go1.6.2\r\n Git commit:   906eacd\r\n Built:        \r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n\r\nServer:\r\n Version:      1.12.0-rc2\r\n API version:  1.24\r\n Go version:   go1.6.2\r\n Git commit:   906eacd\r\n Built:        \r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n```\r\n\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\n[root@docker-centos-72 ~]# docker info\r\nCannot connect to the Docker daemon. Is the docker daemon running on this host?\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\n\r\ntested in VirtualBox\r\n\r\n**Steps to reproduce the issue:**\r\n1. install docker 1.12 rc on EL 7.2\r\n2. run docker daemon with `--storage-driver=overlay2`\r\n3. observe error\r\n\r\n**Describe the results you received:**\r\n\r\ndocker daemon start failure due to initialization check for kernel version >= 4.0 when running docker with overlay2 storage driver on EL 7.2\r\n\r\n**Describe the results you expected:**\r\n\r\nsuccess running docker with overlay2 storage driver on EL 7.2\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/228958074","html_url":"https://github.com/docker/docker/issues/24023#issuecomment-228958074","issue_url":"https://api.github.com/repos/docker/docker/issues/24023","id":228958074,"user":{"login":"nathwill","id":371597,"avatar_url":"https://avatars.githubusercontent.com/u/371597?v=3","gravatar_id":"","url":"https://api.github.com/users/nathwill","html_url":"https://github.com/nathwill","followers_url":"https://api.github.com/users/nathwill/followers","following_url":"https://api.github.com/users/nathwill/following{/other_user}","gists_url":"https://api.github.com/users/nathwill/gists{/gist_id}","starred_url":"https://api.github.com/users/nathwill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathwill/subscriptions","organizations_url":"https://api.github.com/users/nathwill/orgs","repos_url":"https://api.github.com/users/nathwill/repos","events_url":"https://api.github.com/users/nathwill/events{/privacy}","received_events_url":"https://api.github.com/users/nathwill/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T06:15:01Z","updated_at":"2016-06-28T06:15:01Z","body":"ok, i went ahead and created a dev-build with the check in question commented out and confirmed that the daemon does work with overlay2 on the EL 7.2 kernel.\r\n\r\nHere's the test diff:\r\n\r\n```diff\r\ndiff --git a/daemon/graphdriver/overlay2/overlay.go b/daemon/graphdriver/overlay2/overlay.go\r\nindex b48bcb9..e77db09 100644\r\n--- a/daemon/graphdriver/overlay2/overlay.go\r\n+++ b/daemon/graphdriver/overlay2/overlay.go\r\n@@ -21,7 +21,7 @@ import (\r\n        \"github.com/docker/docker/pkg/directory\"\r\n        \"github.com/docker/docker/pkg/idtools\"\r\n        \"github.com/docker/docker/pkg/mount\"\r\n-       \"github.com/docker/docker/pkg/parsers/kernel\"\r\n+//     \"github.com/docker/docker/pkg/parsers/kernel\"\r\n \r\n        \"github.com/opencontainers/runc/libcontainer/label\"\r\n )\r\n@@ -98,13 +98,13 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap\r\n        }\r\n \r\n        // require kernel 4.0.0 to ensure multiple lower dirs are supported\r\n-       v, err := kernel.GetKernelVersion()\r\n-       if err != nil {\r\n-               return nil, err\r\n-       }\r\n-       if kernel.CompareKernelVersion(*v, kernel.VersionInfo{Kernel: 4, Major: 0, Minor: 0}) < 0 {\r\n-               return nil, graphdriver.ErrNotSupported\r\n-       }\r\n+//     v, err := kernel.GetKernelVersion()\r\n+//     if err != nil {\r\n+//             return nil, err\r\n+//     }\r\n+//     if kernel.CompareKernelVersion(*v, kernel.VersionInfo{Kernel: 4, Major: 0, Minor: 0}) < 0 {\r\n+//             return nil, graphdriver.ErrNotSupported\r\n+//     }\r\n \r\n        fsMagic, err := graphdriver.GetFSMagic(home)\r\n        if err != nil {\r\n```\r\n\r\nand here's the result:\r\n\r\n```bash\r\n[root@docker-centos-72 ~]# uname -r\r\n3.10.0-327.el7.x86_64\r\n[root@docker-centos-72 ~]# docker info\r\nContainers: 1\r\n Running: 0\r\n Paused: 0\r\n Stopped: 1\r\nImages: 1\r\nServer Version: 1.12.0-dev\r\nStorage Driver: overlay2\r\n Backing Filesystem: xfs\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: host overlay bridge null\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nSecurity Options: seccomp\r\nKernel Version: 3.10.0-327.el7.x86_64\r\nOperating System: CentOS Linux 7 (Core)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 489 MiB\r\nName: docker-centos-72\r\nID: OUEU:JR7F:V6HH:ZGTB:7KNN:HMOQ:ZCXK:NUEU:AC3J:AZ4W:ZUGI:WNUY\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: bridge-nf-call-iptables is disabled\r\nWARNING: bridge-nf-call-ip6tables is disabled\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n[root@docker-centos-72 ~]# docker run ubuntu date\r\nTue Jun 28 06:12:22 UTC 2016\r\n```\r\n\r\nobviously checking for support for the required functionality is desirable, though, so i'm not really sure what the answer here should be 😕 "}}
{"actor":{"display_login":"nathwill"}}