mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-04 12:02:13 +02:00
Flatcar prepares /etc/hostname from the initrd through afterburn. After switching root, systemd-networkd fetches a dhcp lease with the correct hostname already. This publishes the hostname to the vnet DNS server as well. When WALinuxAgent starts, it tries to do the same steps: configure the hostname, bounce the link to force dhcp lease renewal. This has caused issues in the past with multi-nic configurations but also with networked services that are trying to use the network (etcd/flanneld). The link bouncing by WALinuxAgent is not necessary because of Flatcars boot design, so return without bouncing the link. Tested that DNS from other VMs in the same vnet works. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>