!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
28 Jan 2023
@lily:lily.flowers@lily:lily.flowers (and they use SYSTEMD_IN_INITRD to override detection and control behavior in unit tests) 23:52:27
@lily:lily.flowers@lily:lily.flowers * (and they use SYSTEMD_IN_INITRD env var to override detection and control behavior in unit tests) 23:52:34
@lily:lily.flowers@lily:lily.flowers(I gave up trying to run said tests on NixOS. They made way too many assumptions. I just have a Fedora VM I use)23:53:12
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAll my testing when working on systemd is with NixOS tests :P23:53:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIf they ask me to write real tests I will23:53:47
@lily:lily.flowers@lily:lily.flowersI have been making nixos tests too. But I mean for running their unit test suite23:53:50
@lily:lily.flowers@lily:lily.flowers(since I really didn't want to end up with a regression in that when I touched it and added a test)23:54:08
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea I just... don't wanna :P23:54:06
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthat's fair23:54:20
29 Jan 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @elvishjerricco:matrix.org
I'm basically talking about making the cmdline stuff use literally the existing code path as the fstab stuff, but then move the cmdline specific stuff into if (ininitrd() && path_equals(p, "/sysroot"))
Lily Foster: So would your PR be subsumed by this? Aside from the nice work you did on the test stuff of course
00:05:10
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
Lily Foster: So would your PR be subsumed by this? Aside from the nice work you did on the test stuff of course
Yes
00:15:03
@lily:lily.flowers@lily:lily.flowersAnd I'm 100% happy to let it be subsumed00:15:17
@lily:lily.flowers@lily:lily.flowersThat was mostly a quick hack anyway since I wanted it to work and regardless if I wasn't the one to make a whole refactoring PR, that one would ostensibly be stuck in review much longer00:16:07
@lily:lily.flowers@lily:lily.flowers* That was mostly a quick hack anyway since I wanted it to work and regardless if I wasn't the one to make a whole refactoring PR, such a PR would ostensibly be stuck in review much longer00:16:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAs for the hibernate issue, how to do we short-term-fix this in the meantime?00:16:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I guess we can add an override on systemd-hibernate-resume@.service that says Before=sysroot.mount? 00:16:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgoh but yea I meant to say I'll probably try making those two systemd PRs tonight/tomorrow. 1) cmdline <-> fstab, 2) local-fs-pre ordering00:17:50
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
I guess we can add an override on systemd-hibernate-resume@.service that says Before=sysroot.mount?
It needs to be before all mounts though, and I'm not sure that would be guaranteed in all cases with Before=sysroot.mount. If you'll have a PR ready with the local-fs-pre fix, I'd be more inclined to fetchpatch it (assuming it's either a simple enough diff or has received positive feedback from the systemd folks) since that's much simpler and also easy to remember to remove later
02:43:49
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Lily Foster: well the issue with a patch is that it has to go through staging. It's not exactly hard to remove, and there are no mounts that come before sysroot other than those manually configured by people who know what they're doing 02:45:33
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * Lily Foster: well the issue with a patch is that it has to go through staging. The Before ordering is not exactly hard to remove, and there are no mounts that come before sysroot other than those manually configured by people who know what they're doing 02:46:07
@lily:lily.flowers@lily:lily.flowersAh, true I didn't think about staging. I'd say that override is fine enough then if it solves that one person's problem02:46:39
@lily:lily.flowers@lily:lily.flowersIt's better than the current status of things I suppose02:46:55
@lily:lily.flowers@lily:lily.flowersI already do similar overrides in my personal config to fix some ordering issues anyway, so it wouldn't cause any problem to add that afaik https://github.com/lilyinstarlight/foosteros/blob/da1db4765c6326537ba8f6aefc30870ff3bda15c/config/base.nix#L112-L12602:48:42
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
Lily Foster: well the issue with a patch is that it has to go through staging. The Before ordering is not exactly hard to remove, and there are no mounts that come before sysroot other than those manually configured by people who know what they're doing
(I was meaning easy to remove as in the patch would fail to apply once a fix is in systemd or that code otherwise changed, and prompt whoever was doing the systemd package update to remove it. A Before override can more easily be forgotten to move)
02:49:51
@lily:lily.flowers@lily:lily.flowers* (I was meaning easy to remove as in the patch would fail to apply once a fix is in systemd or that code otherwise changed, and prompt whoever was doing the systemd package update to remove it. A `Before` override can more easily be forgotten to remove)02:50:08
@lily:lily.flowers@lily:lily.flowers(But it's also not that big a deal either way, I think the override is probably fine as a short-term fix, especially because rebuilds)02:51:22
2 Feb 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgCan I get a thumbs up from someone on this PR? https://github.com/NixOS/nixpkgs/pull/21404815:26:18
4 Feb 2023
@jaen:matrix.orgjaen joined the room.20:22:46
@jaen:matrix.orgjaenShould I expect systemd stage1 to reasonably boot? I have ZFS-in-LVM-in-LUKS setup (LVM is there for separate swap, I've read that swap on ZFS is rather spotty with hibernation and under memory pressure) with separate header and an encrypted keyfile (having the boot pendrive is one factor, knowing the password is the other). This all works with the current stage1, though it needed a bit of `preLVM` and `pre`/`postDeviceCommands` trickery to decrypt the keyfile, use it to open the LUKS container and close it afterwards. This doesn't work OOtB with systemd-based stage1 - what it basically does is that it seems to go `Finished NixOS Activation.` and then immediately starts stopping all the targets for some reason I can't discern, where it ultimately hands on stopping the keyfile unit- which is not all that surprising, given aforementioned options are not supported, but I tried using things like `keyscript` (it seems to be ignored, is it not supported on NixOS?) and whatever I could find on the intarwebs to set it up by manually writing th crypttab, but it didn't seem to help. Any pointers?20:24:10
@jaen:matrix.orgjaen* Should I expect systemd stage1 to reasonably boot with more complex configs? I have ZFS-in-LVM-in-LUKS setup (LVM is there for separate swap, I've read that swap on ZFS is rather spotty with hibernation and under memory pressure) with separate header and an encrypted keyfile (having the boot pendrive is one factor, knowing the password is the other). This all works with the current stage1, though it needed a bit of `preLVM` and `pre`/`postDeviceCommands` trickery to decrypt the keyfile, use it to open the LUKS container and close it afterwards. This doesn't work OOtB with systemd-based stage1 - what it basically does is that it seems to go `Finished NixOS Activation.` and then immediately starts stopping all the targets for some reason I can't discern, where it ultimately hands on stopping the keyfile unit- which is not all that surprising, given aforementioned options are not supported, but I tried using things like `keyscript` (it seems to be ignored, is it not supported on NixOS?) and whatever I could find on the intarwebs to set it up by manually writing th crypttab, but it didn't seem to help. Any pointers?20:24:38

Show newer messages


Back to Room ListRoom Version: 6