From c425b9b46461d32a80ad0d3786eb7d8250231f11 Mon Sep 17 00:00:00 2001 From: Nathan Samson Date: Fri, 22 Jul 2016 01:27:38 +0200 Subject: [PATCH] fix(*): Use cgroupfs driver in both host and builder docker. The (CorOS) default of systemd might have some problems. See also https://github.com/coreos/bugs/issues/1435 https://github.com/docker/docker/issues/21444 and https://github.com/docker/docker/issues/21678 --- builder/docker/docker.go | 2 ++ contrib/coreos/user-data.example | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/builder/docker/docker.go b/builder/docker/docker.go index 793d7ebf7a..fef909611e 100644 --- a/builder/docker/docker.go +++ b/builder/docker/docker.go @@ -72,6 +72,8 @@ func Start(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) { "192.168.0.0/16", "--insecure-registry", "100.64.0.0/10", + "--exec-opt", + "native.cgroupdriver=cgroupfs", } // For overlay-ish filesystems, force the overlay to kick in if it exists. diff --git a/contrib/coreos/user-data.example b/contrib/coreos/user-data.example index 4e9267f4d0..1334dcff29 100644 --- a/contrib/coreos/user-data.example +++ b/contrib/coreos/user-data.example @@ -43,6 +43,10 @@ coreos: enable: false - name: docker.service drop-ins: + - name: 00-reset-environment.conf + content: | + [Service] + Environment= - name: 10-require-flannel.conf content: | [Unit] @@ -52,6 +56,10 @@ coreos: content: | [Service] Environment="DOCKER_OPTS=--insecure-registry 10.0.0.0/8 --insecure-registry 172.16.0.0/12 --insecure-registry 192.168.0.0/16 --insecure-registry 100.64.0.0/10" + - name: 60-cgroup-driver.conf + content: | + [Service] + Environment="DOCKER_CGROUPS=--exec-opt native.cgroupdriver=cgroupfs" - name: flanneld.service command: start drop-ins: