!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

631 Members
NixOS ❤️ systemd172 Servers

Load older messages


SenderMessageTime
19 Feb 2025
@arianvp:matrix.orgArianBiggest problem is sd-path.h which i still dont understand why it was added. Pointless complexity that isn't used internally07:37:06
@arianvp:matrix.orgArianIt causes a cyclic dependency between libsystemd and libsystemd-shared and libsystemd-core and cyclic dependency between libsystemd and some binaries iirc07:37:43
@arianvp:matrix.orgArianBasically turns it into one big mess. I don't understand why we have cycle detection in multiple output derivations though. Robert told me they might remove that feature from nix. But it never happened07:38:18
@arianvp:matrix.orgArianSo yeh if we want it we need to either make nix support cyclic outputs (which should be fine from correctness standpoint I think?) or we need to **heavily** patch systemd07:38:49
@arianvp:matrix.orgArian* So yeh if we want it we need to either make nix support cyclic outputs (which should be fine from correctness standpoint I think?) or we need to **heavily** patch systemd07:39:16
@arianvp:matrix.orgArian* We had multiple outputs build before but it broke with the introduction of sd-path07:39:40
@arianvp:matrix.orgArianAh but nix is multiple derivations? In that case heavy patching is the only solution. To get rid of the cycles between all of systemd's components 07:40:36
@elvishjerricco:matrix.orgElvishJerricco
In reply to @arianvp:matrix.org
Ah but nix is multiple derivations? In that case heavy patching is the only solution. To get rid of the cycles between all of systemd's components
If we can do it in a way that seems like a benefit to upstream, then this isn't a problem
09:28:23
@elvishjerricco:matrix.orgElvishJerriccoI'd have to understand that cyclic dependency better09:29:13
@elvishjerricco:matrix.orgElvishJerriccoCyclic dependencies in general sound like a bad idea, so I imagine getting rid of it would be good for upstream too09:29:35
@elvishjerricco:matrix.orgElvishJerricco The systemd-repart.create-root test appears to be failing nondeterministically: https://hydra.nixos.org/build/290085282 11:04:53
@elvishjerricco:matrix.orgElvishJerricco I think that means systemd-fsck-root.service and systemd-repart.service are racing? 11:05:23
@denkn:denkn.at@denkn:denkn.at
In reply to @arianvp:matrix.org
Though the ordering will happen after The ready notification of course
Thanks, yes, I call ready immidiatly, after starting, before the first bigger thing will be done. With ordering you meant, dependencies to this service, right?
13:20:15
@arianvp:matrix.orgArian
In reply to @elvishjerricco:matrix.org
I'd have to understand that cyclic dependency better

The whole path situation in systemd is a mess anyway. They're not using $prefix consistently . E.g. tmpfiles looks in /usr/lib

Given we could load all config from /etc anyway perhaps it's worth getting rid of all the $prefix dependencies in path lookups. Then sd-path stops having cyclic dependency

14:20:42
@arianvp:matrix.orgArianRun the `systemd-path` executable. You'll immediately understand the cyclic dependency due to the output it prints 14:21:36
@sss:matrix.dark-alexandr.netsss 20:06:14
20 Feb 2025
@thursdaddy:matrix.orgthursdaddy set a profile picture.00:14:02
21 Feb 2025
@cleverca22:matrix.orgcleverca22having to fight systemd recovery mode today somebody setup fstab to mount a device that didnt exist, on a headless machine systemd had a panic attack, and refused to run ssh until somebody logged in on the "physical terminal" with the root pw (none was set), so the machine was basically bricked for 5 months, lol05:06:44
@cleverca22:matrix.orgcleverca22 i know i can just set options = [ "nofail" ]; but then it just entirely ignores the mount-point, and starts services on the wrong disk 05:07:17
@cleverca22:matrix.orgcleverca22how can i make systemd not have a total panic attack, but also not start certain services?05:07:35
@elvishjerricco:matrix.orgElvishJerricco cleverca22: You can use x-systemd.required-by=sshd.service,x-systemd.before=sshd.service as file system options 05:59:33
@elvishjerricco:matrix.orgElvishJerricco see the systemd.mount manpage 05:59:43
@elvishjerricco:matrix.orgElvishJerricco but x-systemd.required-by=sshd.service will basically remove the normal dependencies and just make the mount a dependency of sshd.service 06:00:07
@elvishjerricco:matrix.orgElvishJerricco (sshd was a bad example because I think that's the opposite of what you want but I think you get the point :P) 06:00:37
@elvishjerricco:matrix.orgElvishJerricco x-systemd.required-by= will make it so that the mount is not required by loca-fs.target, but instead just by the value of the option 06:01:41
@elvishjerricco:matrix.orgElvishJerriccomeaning if it fails, it won't send the system to emergency mode06:01:54
@elvishjerricco:matrix.orgElvishJerricco but of course a required-by relationship isn't an ordering relationship, hence why I also mentioned x-systemd.before= 06:02:38
@cleverca22:matrix.orgcleverca22 ElvishJerricco: ah, RequiresMountsFor is what i wanted, and does work 06:09:18
@cleverca22:matrix.orgcleverca22 but only if its in unitConfig, doh 06:09:23
@cleverca22:matrix.orgcleverca22 service.d/overrides.conf:18: Unknown key name 'RequiresMountsFor' in section 'Service', ignoring. 06:09:34

Show newer messages


Back to Room ListRoom Version: 6