From cd48dfa322c37f995b63b93696ed276be1b1d231 Mon Sep 17 00:00:00 2001 From: Thom May Date: Thu, 11 Dec 2014 16:12:01 +0000 Subject: [PATCH] Set flannel options explicitly Setting environment options in a systemd overlay is not getting honoured; presumably because those options aren't passed through docker to flanneld. To work around this, pass arguments explicitly, using an environment file. --- .../app-admin/flannel/files/flanneld.service | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld.service b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld.service index 4f9d260c55..0b0cb4d4e1 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld.service +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld.service @@ -16,8 +16,13 @@ Environment="FLANNEL_VER={{flannel_ver}}" LimitNOFILE=1048576 LimitNPROC=1048576 ExecStartPre=/usr/bin/mkdir -p /run/flannel +ExecStartPre=/usr/bin/touch /run/flannel/options.env -ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock /usr/bin/docker run --net=host --privileged=true --rm -v /run/flannel:/run/flannel -e NOTIFY_SOCKET=/run/flannel/sd.sock quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true +ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \ + /usr/bin/docker run --net=host --privileged=true --rm \ + -v /run/flannel:/run/flannel -e NOTIFY_SOCKET=/run/flannel/sd.sock \ + --env-file=/run/flannel/options.env \ + quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true # Update docker options ExecStartPost=/bin/bash -c ' \