-
Notifications
You must be signed in to change notification settings - Fork 58
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
Replace dhclient with systemd-networkd #50
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@skbeh That's weird. The reason why I used sysetmd-networkd in the first place was to solve the problem of dhclient not being able to assign IPv6 address and configure routes properly (see #45). I've intentionally kept the provided configuration file as simple as possible, and in my tests it worked fine for IPv4-only, IPv6-only, and IPv4-IPv6 scenarios. |
I still see dhclient being documented as the recommended DHCP client for GCE. See https://cloud.google.com/compute/docs/import/configuring-imported-images:
So I'm not sure whether it's a good idea to switch the default yet. Given the ISC DHCP client is end-of-life, I would expect GCE to move on to a different recommendation at some point. But probably we should only move when that happens (eg when the Debian GCE image switches to something else). |
@aofei I reattempted using systemd-networkd with your provided config, and it works fine. |
It's just whatever the distro is using. For example Ubuntu has been using systemd-networkd for a while, including the official GCE images for Ubuntu. If arch is on systemd-networkd now it should be fine to update image builders accordingly. |
@aofei There's no reason to only enable DHCP for eth0. If the instance has more than one interfaces, the more interfaces will be failed to get IP address. It should be set to |
i don't think that's true. the guest agent handles all secondary interfaces |
I am not sure how the guest agent interacts with systemd-networkd. Does the guest agent configure the interfaces? |
@skbeh the guest agent uses a simple logic of invoking dhclient once for all secondary interfaces. this is configurable to an extent |
If |
there's an argument to be made. the official supported distros (ubuntu, centos etc) all rely on the guest agent since arch is not officially supported by gcp i think it's up to this repo maintainers to make that decision. but if you want to differ from how the other distros do it, at least the dhclient behavior of the guest agent should be disabled |
Fixes #45, #49