Azure / azure-init

A minimal provisioning agent designed for Azure Linux VMs.
MIT License
7 stars 10 forks source link

libazureinit currently does not bounce DHCP to publish hostname to Azure platform DNS #68

Open anhvoms opened 4 months ago

anhvoms commented 4 months ago

Description

Due to starting late (after network-online), azure-init ends up setting the computer name after DHCP. This has the side effect of not registering the correct hostname to DNS (as the image's stale hostname was what got sent in DHCP).

Impact

Hostname lookup for this VM will fail for other VMs that are in the same VNET or part of VNET peering.

Additional Information

This won't be an issue if we solve #35. Otherwise we'll have to restart network stack (e.g., NetworkManager)

pothos commented 2 months ago

In Flatcar we also wanted to disable the if-up-down because we thought that setting on boot is enough but it is not: With waagent listing for internal hostname changes it also supports changes after boot to be propagated to Azure. Since the if-up-down is causing too much disruption I'm now trying out to explicitly trigger a new DHCP request which is a no-op for the interface state but propagates the hostname. For systemd-networkd the command is networkctl reconfigure IFACE (I first tried networkctl forcerenew IFACE and it didn't seem to work according to the unit logs).