6 Jun 2023 |
@elvishjerricco:matrix.org | But you have to pull it in with Wants to have that work | 13:50:16 |
oddlama | Ahh. Since I just blindly copied the check-flush service from the existing test, why would wanting network-pre not apply to the existing test case? | 13:51:35 |
@elvishjerricco:matrix.org | That probably is a mistake in the existing code :P Until I looked into this yesterday, I assumed network-pre.target was wanted by multi-user.target or network.target or something like that, but that appears not to be the case | 13:53:06 |
oddlama | Okay that's fair. I just assumed it was something specific to my test that would require that. | 13:53:33 |
@elvishjerricco:matrix.org | It's listed as a "passive" unit in man systemd.special , which I'm pretty sure means it's expected to be wanted explicitly by anything that needs it | 13:54:25 |
oddlama | Okay the first noticeable difference between the two systems is in systemctl status systemd-networkd.socket .
broken system:
● systemd-networkd.socket - Network Service Netlink Socket
Loaded: loaded (/etc/systemd/system/systemd-networkd.socket; enabled; preset: enabled)
Drop-In: /nix/store/8wz1d5jpc0wnjlvl2fy6ap7cdfd8s5d8-system-units/systemd-networkd.socket.d
└─overrides.conf
Active: active (listening) since Tue 2023-06-06 15:53:04 CEST; 28min ago
Triggers: ● systemd-networkd.service
Docs: man:systemd-networkd.service(8)
man:rtnetlink(7)
Listen: route 1361 (Netlink)
CGroup: /system.slice/systemd-networkd.socket
Jun 06 15:53:04 sentinel systemd[1]: systemd-networkd.socket: Installed new job systemd-networkd.socket/start as 274
working system:
● systemd-networkd.socket - Network Service Netlink Socket
Loaded: loaded (/etc/systemd/system/systemd-networkd.socket; enabled; preset: enabled)
Drop-In: /nix/store/vmjrc7h55f6vvms0xa91bb0v5skc8yfp-system-units/systemd-networkd.socket.d
└─overrides.conf
Active: active (running) since Tue 2023-06-06 16:11:42 CEST; 8min ago
Triggers: ● systemd-networkd.service
Docs: man:systemd-networkd.service(8)
man:rtnetlink(7)
Listen: route 1361 (Netlink)
CGroup: /system.slice/systemd-networkd.socket
Jun 06 16:11:42 ward systemd[1]: systemd-networkd.socket: Installed new job systemd-networkd.socket/start as 287
Jun 06 16:11:44 ward systemd[1]: systemd-networkd.socket: Incoming traffic
Jun 06 16:11:44 ward systemd[1]: systemd-networkd.socket: Changed listening -> running
| 14:25:35 |
oddlama | This is also pretty much the last thing related to networkd printed in the debug logs on the non-functioning system. The working system starts networkd afterwards so there's of course more. | 14:27:13 |
@elvishjerricco:matrix.org | I don't even remember what exactly systemd-networkd.socket is for... | 14:28:04 |
@elvishjerricco:matrix.org | like normally, when someone tries to read or write a systemd socket, the corresponding service is started | 14:29:00 |
@elvishjerricco:matrix.org | but like shouldn't systemd-networkd be actively started? Rather than in response to something else opening the socket? | 14:29:20 |
oddlama | That's what I would have thought too | 14:29:52 |
oddlama | But on the working system it is definitely the socket service which starts networkd | 14:30:08 |
oddlama | Which could be wrong and just lead to a working system by accident | 14:30:28 |
@elvishjerricco:matrix.org | I wonder what creates the incoming traffic | 14:30:28 |
oddlama | Probably mdns | 14:30:33 |
oddlama | The working server is in my home network | 14:30:46 |
oddlama | The non working one is a hetzner server with a public ipv4 and no other machines on the network | 14:31:04 |
@elvishjerricco:matrix.org | Hm, something tells me that the reference to man:rtnetlink(7) in the docs section of that unit is relevant | 14:32:43 |
@elvishjerricco:matrix.org | hmm: ListenNetlink=route 1361 | 14:36:25 |
@elvishjerricco:matrix.org | oddlama: Maybe you're missing a kernel module relating to this? | 14:36:38 |
@elvishjerricco:matrix.org | but that's weird because in nixos we have a wants relationship from multi-user.target on systemd-networkd.service | 14:37:27 |
oddlama | In reply to @elvishjerricco:matrix.org oddlama: Maybe you're missing a kernel module relating to this? Since this is stage2 I don't see how that could be a problem.. Which module would you have in mind? | 14:39:34 |
oddlama | Hard to find any information about route 1361 | 14:39:42 |
@elvishjerricco:matrix.org | no clue :P | 14:39:45 |
oddlama | occurrs exactly once in systemd's source, in networkd.socket :/ | 14:39:59 |
oddlama | * occurs exactly once in systemd's source, in networkd.socket :/ | 14:40:05 |
oddlama | In reply to @elvishjerricco:matrix.org but that's weird because in nixos we have a wants relationship from multi-user.target on systemd-networkd.service where is that relationship defined? | 14:42:13 |
@elvishjerricco:matrix.org | https://github.com/NixOS/nixpkgs/blob/5c31944c1d468476f7827943dd636b34478db22b/nixos/modules/system/boot/networkd.nix#L3129 | 14:42:43 |
@elvishjerricco:matrix.org | oddlama: Something else kinda weird is that on my system that has networkd enabled in both stage 1 and stage 2, I don't see the same messages from the socket unit about "Incoming traffic" | 14:44:21 |
@elvishjerricco:matrix.org | your default.target is multi-user.target , right? :P | 14:45:03 |