!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
22 Mar 2022
@arianvp:matrix.org@arianvp:matrix.orgthat way we can signal that a module is experimental; but also not break the API per se...11:34:18
@arianvp:matrix.org@arianvp:matrix.org(Unless needed of course)11:34:23
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI guess hiding the options should suffice11:34:43
@arianvp:matrix.org@arianvp:matrix.org e.g. you change. v1alpha1.initrd.mkInitrd to. v1beta1.initramfs.makeInitramfs and it gets trnslated by an alias and prints a deprecation notice or something 11:35:06
@arianvp:matrix.org@arianvp:matrix.orgmaybe an interesting RFC to write :P11:35:25
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deNot sure if the scope of the change is big enough for this to be important. I have no idea what state of the code will be in when we ship 22.05, but I don't think that it will be stable enough for like 90% of the users. 22.11 is probably the release where this will shine11:36:34
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deWhich is why I want the basics to be as complete as possible. I don't know how common that is for other people to do but if I have a very extensible and complete base, I can develop on my local machines and extend in what I need before upstreaming it to nixpkgs. It's just feels so much better working from the stable release (since most of my prod machines are on the release) than to switch to unstable (or even master) just for testing11:37:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @janne.hess:helsinki-systems.de
Okay pennae explained why it doesn't work. We won't make it work easily and since it's a temporary measure, I created this: https://github.com/NixOS/nixpkgs/commit/2aeb4967ae36bb127e3512ba6db8050edb3bedec
I wanted to cherry pick that but it doesn't appear to be on any branch
17:27:01
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de

does this work?

$ git fetch origin 2aeb4967ae36bb127e3512ba6db8050edb3bedec
From github.com:nixos/nixpkgs
 * branch                    2aeb4967ae36bb127e3512ba6db8050edb3bedec -> FETCH_HEAD
17:31:50
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHuh, did not know you could do that. Cool18:11:59
23 Mar 2022
@ckie:ckie.devckie (they/them) joined the room.13:11:27
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deStarted to make the handover between systemds more possible: https://github.com/NixOS/nixpkgs/pull/16545315:00:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHuh, yea that definitely helps20:40:21
@ckie:ckie.devckie (they/them)i never thought i'd see plural systemd22:23:20
24 Mar 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Janne Heß: And just for clarification, you're not worried about systemdMinimal existing at a different path than systemd, right? Because as long as the path we switch to is /run/current-system/systemd/lib/systemd/systemd, the serialization stuff should work? 04:26:03
@flokli:matrix.orgflokli ElvishJerricco: I really think we should try to use the systemctl switch-root command. Some of the IgnoreOnIsolate stuff etc. might just not be needed if we do that 09:50:45
@flokli:matrix.orgflokliI commented https://github.com/NixOS/nixpkgs/pull/164943#discussion_r83411408709:51:04
@flokli:matrix.orgflokliAnd we should probably conditionalize some of the stuff in stage 2, if it's already handled by systemd? dunno…09:53:24
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @flokli:matrix.org
ElvishJerricco: I really think we should try to use the systemctl switch-root command. Some of the IgnoreOnIsolate stuff etc. might just not be needed if we do that
We are
10:01:50
@flokli:matrix.orgflokliLink?10:02:14
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
Janne Heß: And just for clarification, you're not worried about systemdMinimal existing at a different path than systemd, right? Because as long as the path we switch to is /run/current-system/systemd/lib/systemd/systemd, the serialization stuff should work?
I'm not worried, no. If it doesn't work, I can try a workaround (there are some things), and if none of these work, there's still patching systemd ;)
10:02:31
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @flokli:matrix.org
Link?
https://github.com/NixOS/nixpkgs/pull/164943/files#diff-68fef76b66b99ee77baba62969a434c1f912c2fcf8765bfc884b7aa5b0e70d35R34
10:03:00
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de (actually I hope that's correct - I just saw it when using systemctl cat in the initrd) 10:04:26
@flokli:matrix.orgflokliOh lol11:06:44
@flokli:matrix.orgflokli

I looked at the vm test logs. It seems we do switch systemd two times?

machine # [  OK  ] Finished Cleanup udev Database.
machine # [  OK  ] Reached target Switch Root.
machine #          Starting Switch Root...
machine # [    1.881830] systemd-journald[73]: Received SIGTERM from PID 1 (systemd).
machine # 
machine # <<< NixOS Stage 2 >>>
machine # 
machine # [    1.967187] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: none.
machine # [    1.970678] booting system configuration /nix/store/c2birzmvm77j79lh5njrz18z2nrjg50i-nixos-system-machine-22.05.git.82102fc37da
machine # running activation script...
machine # setting up /etc...
machine # starting systemd...
machine # [    4.579760] systemd[1]: Inserted module 'autofs4'
machine # [    4.603075] systemd[1]: systemd 249.7 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
11:07:46
@flokli:matrix.orgflokli Hmh, I think initrd-switch-root.service fails. It'd run systemctl --no-block switch-root /sysroot, but we don't use /sysroot inside the initrd, but /mnt-root. 11:11:23
@flokli:matrix.orgflokli(I put this back in the issue)11:21:50
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deOkay so looking at the handover stuff -- it's probably too much for the initial PR. I'll still continue to work on it but I think the currently open PR can go without it. I have the handovering mostly running but there's still stuff to test and figure out (for example why journald doesn't start…). It's not extremely important for the initial MVP and getting the MVP in is important to allow for collaborative development13:15:57
@arianvp:matrix.org@arianvp:matrix.orgSounds good to me. Could you add a list of caveats; future work? I am only loosely following so hard for me to understand what it means what's missing in the handover13:36:52
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI can create an issue and maybe a github project as well for future issues an prs15:22:31

Show newer messages


Back to Room ListRoom Version: 6