Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[⚠️ Requires recreating the snapshots to benefit from the fix] Properly guide cloud-init to use NetworkManager #792

Merged

Conversation

riemervdzee
Copy link
Contributor

@riemervdzee riemervdzee commented May 7, 2023

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#L381

By 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 in cloudinit_write_files_common for example.

Signed-off-by: Riemer van der Zee <riemervdzee@gmail.com>
Copy link
Contributor

@valkenburg-prevue-ch valkenburg-prevue-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me from a code perspective, haven't tested.

Copy link
Collaborator

@mysticaltech mysticaltech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking stunning! Will run a quick basic test and merge later tonight.

@mysticaltech mysticaltech changed the base branch from master to staging May 8, 2023 20:14
@mysticaltech mysticaltech merged commit 0dc1589 into kube-hetzner:staging May 8, 2023
1 check passed
@mysticaltech mysticaltech changed the title Properly guide cloud-init to use NetworkManager [⚠️ Requires recreating the snapshots to benefit from the fix] Properly guide cloud-init to use NetworkManager May 8, 2023
@mysticaltech
Copy link
Collaborator

⭐ FYI people, here's how to upgrade existing clusters #794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants