Fix issue with etcd-member failing to resolve peers

* When restarting masters, `etcd-member.service` may fail to lookup peers if
/etc/resolv.conf hasn't been populated yet. Require the wait-for-dns.service.
This commit is contained in:
Vincent Palmer 2017-12-04 09:04:31 +01:00 committed by Dalton Hubble
parent e623439eec
commit ce49a93d5d
4 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ systemd:
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done' ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
[Install] [Install]
RequiredBy=kubelet.service RequiredBy=kubelet.service
RequiredBy=etcd-member.service
- name: kubelet.service - name: kubelet.service
enable: true enable: true
contents: | contents: |

View File

@ -50,6 +50,7 @@ systemd:
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done' ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
[Install] [Install]
RequiredBy=kubelet.service RequiredBy=kubelet.service
RequiredBy=etcd-member.service
- name: kubelet.service - name: kubelet.service
contents: | contents: |
[Unit] [Unit]

View File

@ -50,6 +50,7 @@ systemd:
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done' ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
[Install] [Install]
RequiredBy=kubelet.service RequiredBy=kubelet.service
RequiredBy=etcd-member.service
- name: kubelet.service - name: kubelet.service
contents: | contents: |
[Unit] [Unit]

View File

@ -41,6 +41,7 @@ systemd:
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done' ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
[Install] [Install]
RequiredBy=kubelet.service RequiredBy=kubelet.service
RequiredBy=etcd-member.service
- name: kubelet.service - name: kubelet.service
enable: true enable: true
contents: | contents: |