Last active
October 3, 2016 23:48
-
-
Save spacepluk/a14f10cfed3756c0f1f079e73cdc6c9a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 426024c6e2cc424fc958fab9245fc131ff67579a | |
| Author: Oscar Morante <oscar.morante@mirada.tv> | |
| Date: Thu Sep 15 21:54:59 2016 +0300 | |
| Workaround for systemd #1312 | |
| diff --git a/multi-node/aws/pkg/config/templates/cloud-config-controller b/multi-node/aws/pkg/config/templates/cloud-config-controller | |
| index 24fa5b9..f5a4226 100644 | |
| --- a/multi-node/aws/pkg/config/templates/cloud-config-controller | |
| +++ b/multi-node/aws/pkg/config/templates/cloud-config-controller | |
| @@ -21,8 +21,8 @@ coreos: | |
| - name: 40-flannel.conf | |
| content: | | |
| [Unit] | |
| - Requires=flanneld.service | |
| - After=flanneld.service | |
| + Wants=flanneld.service | |
| + ExecStartPre=systemctl is-active flanneld.service | |
| [Service] | |
| EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env | |
| @@ -90,8 +90,8 @@ coreos: | |
| [Unit] | |
| Description=Load rkt stage1 images | |
| Documentation=http://github.com/coreos/rkt | |
| - Requires=network-online.target | |
| - After=network-online.target | |
| + Wants=network-online.target | |
| + ExecStartPre=systemctl is-active network-online.target | |
| Before=rkt-api.service | |
| [Service] | |
| Type=oneshot | |
| @@ -107,8 +107,8 @@ coreos: | |
| content: | | |
| [Unit] | |
| Description=Calico per-host agent | |
| - Requires=network-online.target | |
| - After=network-online.target | |
| + Wants=network-online.target | |
| + ExecStartPre=systemctl is-active network-online.target | |
| [Service] | |
| Slice=machine.slice | |
| @@ -137,8 +137,8 @@ coreos: | |
| [Unit] | |
| Description=decrypt kubelet tls assets using amazon kms | |
| Before=kubelet.service | |
| - After=docker.service | |
| - Requires=docker.service | |
| + ExecStartPre=systemctl is-active docker.service | |
| + Wants=docker.service | |
| [Service] | |
| Type=oneshot | |
| @@ -152,8 +152,8 @@ coreos: | |
| command: start | |
| content: | | |
| [Unit] | |
| - Requires=kubelet.service docker.service | |
| - After=kubelet.service docker.service | |
| + Wants=kubelet.service docker.service | |
| + ExecStartPre=systemctl is-active kubelet.service docker.service | |
| [Service] | |
| Type=simple | |
| @@ -167,8 +167,8 @@ coreos: | |
| command: start | |
| content: | | |
| [Unit] | |
| - Requires=kubelet.service docker.service | |
| - After=kubelet.service docker.service | |
| + Wants=kubelet.service docker.service | |
| + ExecStartPre=systemctl is-active kubelet.service docker.service | |
| [Service] | |
| Type=simple | |
| diff --git a/multi-node/aws/pkg/config/templates/cloud-config-worker b/multi-node/aws/pkg/config/templates/cloud-config-worker | |
| index 6f919d9..0a39ad1 100644 | |
| --- a/multi-node/aws/pkg/config/templates/cloud-config-worker | |
| +++ b/multi-node/aws/pkg/config/templates/cloud-config-worker | |
| @@ -11,8 +11,8 @@ coreos: | |
| - name: 40-flannel.conf | |
| content: | | |
| [Unit] | |
| - Requires=flanneld.service | |
| - After=flanneld.service | |
| + Wants=flanneld.service | |
| + ExecStartPre=systemctl is-active flanneld.service | |
| [Service] | |
| EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env | |
| @@ -74,8 +74,8 @@ coreos: | |
| [Unit] | |
| Description=Load rkt stage1 images | |
| Documentation=http://github.com/coreos/rkt | |
| - Requires=network-online.target | |
| - After=network-online.target | |
| + Wants=network-online.target | |
| + ExecStartPre=systemctl is-active network-online.target | |
| Before=rkt-api.service | |
| [Service] | |
| Type=oneshot | |
| @@ -91,8 +91,8 @@ coreos: | |
| content: | | |
| [Unit] | |
| Description=Calico per-host agent | |
| - Requires=network-online.target | |
| - After=network-online.target | |
| + Wants=network-online.target | |
| + ExecStartPre=systemctl is-active network-online.target | |
| [Service] | |
| Slice=machine.slice | |
| @@ -121,8 +121,8 @@ coreos: | |
| [Unit] | |
| Description=decrypt kubelet tls assets using amazon kms | |
| Before=kubelet.service | |
| - After=docker.service | |
| - Requires=docker.service | |
| + ExecStartPre=systemctl is-active docker.service | |
| + Wants=docker.service | |
| [Service] | |
| Type=oneshot |
Author
Hi,
No problem :) I didn't notice that. Did you fix it in your PR?
@spacepluk Definitely yes! FYI, the PR can be located at coreos/coreos-kubernetes#697
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, thanks for sharing this!
Sorry for being nit-picky but
ExecStartPres in[Unit]sections seem to be ignored by systemd.You will want to move these to
[Service]sections.Relevant logs follows. See
Unknown lvalue 'ExecStartPre' in section 'Unit'messages indicating systemd is ignoring them.