!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

79 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5127 Servers

Load older messages


SenderMessageTime
31 May 2023
@elvishjerricco:matrix.orgElvishJerriccook so looking at my system that has zfs on luks: It looks like the zfs import service is starting before we reach cryptsetup.target, which is odd11:54:34
@copadium:matrix.orgCopa DiumAlso are you sure the emergency shell times out? In my journal it looks like there's just a second zfs-import-rpool-start that spawns a second emergency shell when it fails11:55:01
@elvishjerricco:matrix.orgElvishJerricco
In reply to @copadium:matrix.org
Also are you sure the emergency shell times out? In my journal it looks like there's just a second zfs-import-rpool-start that spawns a second emergency shell when it fails
Oh I see. That's weird
11:55:22
@copadium:matrix.orgCopa DiumWould the full log be helpful to you?11:55:56
@elvishjerricco:matrix.orgElvishJerriccopossibly?11:56:02
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
but it's harmless
(Well it's not harmless exactly if you do have plymouth because plymouth crashes instead of gracefully exits when entering emergency shell right now. I have a branch with a two line fix though..... just need to find time in the next week for nixpkgs work)
11:56:10
@elvishjerricco:matrix.orgElvishJerricco oh that's why that happens? wut 11:56:37
@lily:lily.flowers@lily:lily.flowers(Not that that's fatal or anything. But kinda silly)11:56:45
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
oh that's why that happens? wut
Yeah plymouth expects systemd to stop it when entering emergency shell. That seems extraordinarily dumb to have that inter-project dependency. Systemd assumes plymouth is in its install bindir which is also silly
11:57:43
@copadium:matrix.orgCopa DiumAlso interesting is that the ssh daemon is killed when the emergency shell enters, which is weird :D11:58:02
@lily:lily.flowers@lily:lily.flowersMy fix just adds plymouth-quit-wait to be wanted by and before emergency and rescue shells11:58:13
@copadium:matrix.orgCopa DiumDo you have a preferred pastebin like service around here?11:58:26
@lily:lily.flowers@lily:lily.flowers
In reply to @copadium:matrix.org
Do you have a preferred pastebin like service around here?
(One that works and preferably without ads for me. Otherwise I really don't care myself, but I imagine ElvishJerricco is more likely to be looking at them since I'm on mobile and really need to be getting ready to leave for $dayjob)
11:59:25
@elvishjerricco:matrix.orgElvishJerricco
In reply to @copadium:matrix.org
Also interesting is that the ssh daemon is killed when the emergency shell enters, which is weird :D
Yea, I considered adding boot.initrd.systemd.targets.emergency.wants = ["network.target"]; when initrd networking is enabled, but ultimately decided against it. You can totally add that to your config though to keep networking up in an emergency
11:59:48
@elvishjerricco:matrix.orgElvishJerriccoer, actually, I guess sshd.service isn't wanted by network.target...12:00:36
@elvishjerricco:matrix.orgElvishJerriccoso that wouldn't actually work12:01:09
@gdamjan:spodeli.org@gdamjan:spodeli.orgyou can add that too :)12:01:47
@copadium:matrix.orgCopa Dium
In reply to @elvishjerricco:matrix.org
possibly?
https://hastebin.skyra.pw/itupozaruc.yaml
12:02:25
@elvishjerricco:matrix.orgElvishJerricco ok so there's initrd-fs.target: Triggering OnFailure= dependencies. three different times 12:03:57
@elvishjerricco:matrix.orgElvishJerricco and finally initrd-switch-root.service: Triggering OnFailure= dependencies. once 12:04:09
@elvishjerricco:matrix.orgElvishJerriccothat's all odd12:04:16
@elvishjerricco:matrix.orgElvishJerricco oh actually zfs-import-rpool.service starts and fails 3 times as well 12:07:56
@elvishjerricco:matrix.orgElvishJerriccoI wonder if this has anything to do with it: https://github.com/NixOS/nixpkgs/pull/22720812:14:55
@elvishjerricco:matrix.orgElvishJerriccobleh; still extremely sleepy. I need to like... actually wake up before I start messing with this any more12:17:43
@oddlama:matrix.orgoddlamaIs there a way to inject udev rules into the initrd? I have some interfaces that I usually rename in stage2, but apparently the rules are not applied if the interface is already configured in stage120:06:29
@elvishjerricco:matrix.orgElvishJerricco

Ok so the zfs import service appears not to be ordered after cryptsetup.target. Then, when it fails, initrd-fs.target fails and local-fs.target is finally reached, and two things happen simultaneously: 1) initrd-parse-etc.service starts, which reloads the daemon and starts initrd-fs.target again, and 2) emergency mode is entered. So now that initrd-fs.target is starting again, the zfs import service starts one more time, and again will fail when you timeout. After the second failure, initrd.target is reached, and it attempts to move on to initrd-cleanup.service, which isolates initrd-switch-root.target. This kills the emergency mode. Finally, initrd-swithc-root.service fails, re-entering emergency mode.

Two unexplained things. 1) Why does Copa Dium's log have three attempts at zfs-import-${pool}.service, when I only have two in my test? 2) In my test, there's an additional, third attempt to mount the root fs because initrd-switch-root.service depends on initrd-fs.target, but for some reason this doesn't start zfs-import-${pool}.service a third time.

21:59:18
@elvishjerricco:matrix.orgElvishJerricco anyway, I think we just need to add after = ["cryptsetup.target"];, which I could swear we already had :P 22:00:07
@elvishjerricco:matrix.orgElvishJerriccoand yea, that does appear to fix it22:06:39
@elvishjerricco:matrix.orgElvishJerricconow testing what happens when you let it time out with ext4 instead of zfs22:06:54
@elvishjerricco:matrix.orgElvishJerricco I think zfs no longer has a timeout problem because of the ordering Before=sysroot.mount 22:07:11

Show newer messages


Back to Room ListRoom Version: 6