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
Some systemd fixes revolving dbus and socket activation of systemd services #88158
Conversation
@GrahamcOfBorg test systemd-timesyncd systemd-networkd systemd-networkd-vrf networking.networkd systemd |
I'm not sure why the networkd-vrf test failed on @GrahamcOfBorg test systemd-timesyncd systemd-networkd systemd-networkd-vrf networking.networkd systemd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise (but haven't tested myself so far)
Closing in favour of #89064. |
Reopened as per #89064 (comment). |
There was a problem hiding this 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 - it appears to fix the network loss on nixos-rebuild.
I'll let someone else with a little more knowledge on systemd merge though.
Probably should be backported to nixos-20.03.
@arianvp can you address the changes requested in this PR? As #89064 (comment) hasn't received any feedback, I propose merging this one first, and then doing #89064 later. |
@matthewbauer This has been broken for quite some time, it's not a regression with 20.03. If we still merge this to 20.03, IMHO it should get at least a month of testing in nixos-unstable before thinking about backporting. |
Hmmm... yeah it definitely was a regression that I started noticing since 19.03 or 19.09. It doesn't always happen, so maybe I shouldn't be so sure this actually fixed it. It seems like a rebuild that touches network configuration options make it more likely. |
This will make dbus socket activation for it work When `systemd-resolved` is restarted; this would lead to unavailability of DNS lookups. You're supposed to use DBUS socket activation to buffer resolved requests; such that restarts happen without downtime
With this systemd buffers netlink messages in early boot from the kernel itself; and passes them on to networkd for processing once it's started. Makes sure no routing messages are missed. Also makes an alias so that dbus can activate this unit. Upstream has this too.
Upstream has this alias too; so that dbus activation works. What I don't fully understand is why this would ever be useful given this unit is already started way in early boot; even before dbus is up. But lets just keep behaviour similar to upstream and then ask these questions to upstream.
I addressed the required changes and will merge this in now. |
Motivation for this change
Resolved wasnt being activated by dbus; which caused DNS errors to occur shortly after or during
nixos-rebuild switch
'ing . I took the time to fix the activation for all upstream systemd services.Also fixed socket activation for
systemd-networkd
. so that it can be activated by netlink messages.Second try of #87263
Fixes #85855
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)