!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
22 Jun 2023
@lily:lily.flowers@lily:lily.flowers I suppose? Let me actually just introduce a sleep before sysroot.mount then. PCI should be settling before then anyway, but that would at least show that it's not just that the bootup is too fast 18:09:27
@lily:lily.flowers@lily:lily.flowersDamn. That also let it pass18:10:39
@lily:lily.flowers@lily:lily.flowersI guess it is something like that then18:12:11
@gdamjan:spodeli.org@gdamjan:spodeli.orgdoes the 9p_virtio appear somewhere in /sys/bus/virtio/devices/*18:16:15
@gdamjan:spodeli.org@gdamjan:spodeli.orgor maybe in /sys/bus/pci/devices/0000:0*18:17:22
@lily:lily.flowers@lily:lily.flowersProbably. I'll poke more in a minute. I suppose we need to add a dependency for the mounts for after 9p stuff settles18:17:24
@lily:lily.flowers@lily:lily.flowers * Probably. I'll poke more in a minute. I suppose we need to add a dependency for the mounts for after pci stuff settles18:17:34
@lily:lily.flowers@lily:lily.flowers (also, good guess btw that tmpfs mounts too fast gdamjan -- I suppose device-backed mounts already get a dependency on all of that settling through the .device units, so after sysroot.mount the 9pnet_virtio stuff never lost the race for the channels) 18:32:31
@gdamjan:spodeli.org@gdamjan:spodeli.orgdevice mounts probably get an fsck too :)18:38:08
@lily:lily.flowers@lily:lily.flowersNot necessarily (e.g. btrfs), but just waiting for the device to be available is probably enough I'm guessing. I'm doing more tests now to confirm what exactly needs to be waited on, because then we can configure an explicit dependency for the mounts18:39:21
@lily:lily.flowers@lily:lily.flowers Interesting, just even doing an ls /sys/bus/pci/devices is enough to make it pass 18:44:18
@gdamjan:spodeli.org@gdamjan:spodeli.orghah, it's milliseconds I bet18:44:40
@arianvp:matrix.orgArianCursed18:45:02
@arianvp:matrix.orgArianAbsolutely cursed18:45:05
@lily:lily.flowers@lily:lily.flowersUgh still trying to root out that one issue in between $dayjob stuff. I'm taking a break now, but I'll come back to it later. It's an interesting and cursed issue for sure20:43:47
@lily:lily.flowers@lily:lily.flowers ElvishJerricco: Should we go ahead and merge https://github.com/NixOS/nixpkgs/pull/237820 and https://github.com/NixOS/nixpkgs/pull/237823 or were you wanting more reviews on them? (or if anyone else here wants to review that is of course welcome) 20:44:24
@elvishjerricco:matrix.orgElvishJerriccothat's a lot of stuff I wasn't paying attention to in here today :P20:44:34
@elvishjerricco:matrix.orgElvishJerriccoI think it's fine to merge both of those20:45:25
@elvishjerricco:matrix.orgElvishJerricco
In reply to @lily:lily.flowers
Ugh still trying to root out that one issue in between $dayjob stuff. I'm taking a break now, but I'll come back to it later. It's an interesting and cursed issue for sure
any chance of a quick summary so I don't have to read all that scrollback for context?
20:46:18
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
any chance of a quick summary so I don't have to read all that scrollback for context?
9pfs over virtio can apparently be mounted too quickly before the virtio channels have populated. It's not a problem with slow, serial scripted stage-1 but is a problem with systemd-initrd when using a sysroot without a backing device (i.e. tmpfs) which would otherwise wait for enough dev stuff to settle before attempting to mount
20:48:30
@lily:lily.flowers@lily:lily.flowers

Haven't rooted out the exact thing it's relying on that isn't available, but you can replicate it with this config in a NixOS test:

{
  virtualisation.diskImage = null;
  boot.initrd.systemd.enable = true;
}
20:49:51
@elvishjerricco:matrix.orgElvishJerricco

before the virtio channels have populated

Guess I don't know enough about virtio to know what this means

20:50:15
@lily:lily.flowers@lily:lily.flowers (if you add a sleep prior to sysroot.mount or prior to the 9pfs mounts, then they work fine...) 20:50:28
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org

before the virtio channels have populated

Guess I don't know enough about virtio to know what this means

Like the communication channels between VM and host. It uses 9pfs over one of those channels to mount the host nix store
20:51:17
@elvishjerricco:matrix.orgElvishJerriccoso I guess the tl;dr is that if a 9p mount unit starts too early, some stuff isn't ready for it and everything breaks20:51:38
@lily:lily.flowers@lily:lily.flowersYep20:51:42
@lily:lily.flowers@lily:lily.flowers9p mount over virtio, but yeah20:51:55
@elvishjerricco:matrix.orgElvishJerriccointeresting20:52:14
@lily:lily.flowers@lily:lily.flowers(I doubt it's a case for 9p in general. But it's not like that FS gets used for anything but networked filesystems, so 🤷‍♀️)20:52:18
@lily:lily.flowers@lily:lily.flowers * (I doubt it's the case for 9p in general. But it's not like that FS gets used for anything but networked filesystems, so 🤷‍♀️)20:52:23

Show newer messages


Back to Room ListRoom Version: 6