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

network: don't manage the loopback interface #24

Merged
merged 1 commit into from
May 17, 2021

Conversation

pothos
Copy link
Member

@pothos pothos commented May 14, 2021

The default network configuration is DHCP and was also applied to the
loopback interface. This resulted in the loopback interface being in a
"managed" state in networkd and sometimes caused the IP address to be
deconfigured, resulting in errors when something tries to make use of
the loopback interface, like resolved
(see https://flaviutamas.com/2019/fixing-name-resolution-after-sleep).
Exclude the loopback interface from the default configuration to make
it "unmanaged".

Also see flatcar/init#40

How to use

See if systemd-resolved[55175]: Failed to listen on UDP socket 127.0.0.53:53: Cannot assign requested address messages are gone in the case of endless loops in the initramfs (e.g., due to a non-reachable ignition URL), and if nothing else breaks because of the change

Testing done

for all platforms

The default network configuration is DHCP and was also applied to the
loopback interface. This resulted in the loopback interface being in a
"managed" state in networkd and sometimes caused the IP address to be
deconfigured, resulting in errors when something tries to make use of
the loopback interface, like resolved
(see https://flaviutamas.com/2019/fixing-name-resolution-after-sleep).
Exclude the loopback interface from the default configuration to make
it "unmanaged".
@pothos pothos force-pushed the kai/networkd-unmanaged-lo branch from 1d44d7f to 84af887 Compare May 14, 2021 14:13
@pothos pothos changed the title network: don't try to use DHCP on the loopback interface network: don't manage the loopback interface May 14, 2021
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request May 14, 2021
This pulls in a change in the systemd network unit to ignore the
loopback interface instead of managing its state which sometimes causes
the address to be lost.
flatcar/bootengine#24
@pothos
Copy link
Member Author

pothos commented May 17, 2021

I can still reproduce the systemd-resolved[55175]: Failed to listen on UDP socket 127.0.0.53:53: Cannot assign requested address error when giving an invalid ignition.config.url but maybe this is introduced by some other reason (the initramfs systemd restarts?). Anyway, not having the DHCP networkd configuration applied for lo is still saner than the current way.

@pothos pothos merged commit 0e0592b into flatcar-master May 17, 2021
@pothos pothos deleted the kai/networkd-unmanaged-lo branch May 17, 2021 13:27
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request May 17, 2021
This pulls in a change in the systemd network unit to ignore the
loopback interface instead of managing its state which sometimes causes
the address to be lost.
flatcar/bootengine#24
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.

2 participants