[⚠️ Requires recreating the snapshots to benefit from the fix] Properly guide cloud-init to use NetworkManager #792
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Cloud-init does not generate the connections config correctly for NetworkManager as stated in issue #772. By creating the necessary file, cloud-init will properly configure NetworkManager and resolve the IPv6 issue on our Nodes. IPv6 for Pods is step two.
Detailed info
Cloud-init correctly reads the configuration given by Hetzner, but incorrectly detects systemd-network as the network service instead of the actual NetworkManager. This is due to a missing
/etc/NetworkManager/NetworkManager.conf
file, which is required according to cloud-init's source code: https://github.com/canonical/cloud-init/blob/main/cloudinit/net/network_manager.py#L381By creating this file before generating the network config, cloud-init is correctly guided to use NetworkManager and a valid file is written to
/etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection
. The NetworkManager.conf file creation is performed in the packer file because the network configuration is generated early in the process, making it too late to create the file incloudinit_write_files_common
for example.