diff --git a/CHANGES.md b/CHANGES.md index 731e85e5..f35e44fe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,11 @@ Notable changes between versions. * Use `strict` Fedora CoreOS Config (FCC) snippet parsing ([#755](https://github.com/poseidon/typhoon/pull/755)) +#### AWS + +* Fix Kubelet service race with hostname update ([#766](https://github.com/poseidon/typhoon/pull/766)) + * Wait for a hostname to avoid Kubelet trying to register as `localhost` + ### Flatcar Linux * Use `strict` Container Linux Config (CLC) snippet parsing ([#755](https://github.com/poseidon/typhoon/pull/755)) diff --git a/aws/fedora-coreos/kubernetes/fcc/controller.yaml b/aws/fedora-coreos/kubernetes/fcc/controller.yaml index 5e0119b2..2bc88e1e 100644 --- a/aws/fedora-coreos/kubernetes/fcc/controller.yaml +++ b/aws/fedora-coreos/kubernetes/fcc/controller.yaml @@ -38,11 +38,12 @@ systemd: enabled: true contents: | [Unit] - Description=Wait for DNS entries + Description=Wait for DNS and hostname Before=kubelet.service [Service] Type=oneshot RemainAfterExit=true + ExecStartPre=/bin/sh -c 'while [ `hostname -s` == "localhost" ]; do sleep 1; done;' ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done' [Install] RequiredBy=kubelet.service diff --git a/aws/fedora-coreos/kubernetes/workers/fcc/worker.yaml b/aws/fedora-coreos/kubernetes/workers/fcc/worker.yaml index 3febec95..a5645dea 100644 --- a/aws/fedora-coreos/kubernetes/workers/fcc/worker.yaml +++ b/aws/fedora-coreos/kubernetes/workers/fcc/worker.yaml @@ -9,11 +9,12 @@ systemd: enabled: true contents: | [Unit] - Description=Wait for DNS entries + Description=Wait for DNS and hostname Before=kubelet.service [Service] Type=oneshot RemainAfterExit=true + ExecStartPre=/bin/sh -c 'while [ `hostname -s` == "localhost" ]; do sleep 1; done;' ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done' [Install] RequiredBy=kubelet.service