| 19 Mar 2025 |
@lotte:chir.rs | i was confused on that front | 10:25:29 |
@lotte:chir.rs | i was wondering how to depend on container@postgres.service and actually have another service/container start when postgres is ready? | 10:25:57 |
magic_rb | In reply to @elvishjerricco:matrix.org do other container systems integrate as nicely with systemd as nspawn does? e.g. nspawn will use sd_notify to signal when the container is ready, so that you can order units after container@foo.service and have that mean the right thing Not really i guess, but its not impossible to get working. You can use SDNOTIFY the socket from within the container to signal ready when you reach multi-user.target manually | 10:26:13 |
magic_rb | I had to script that for NixNG as its not running systemd so systemd wont do it itself | 10:26:30 |
ElvishJerricco | I think it'll signal that it's started when default.target is reached | 10:26:38 |
magic_rb | Also i think systemd on the inside doesnt care at all about the outside runtime. Itll signal ready if it sees the socket, so it might just work | 10:26:53 |
magic_rb | I seem to recall that from reading the code | 10:27:06 |
ElvishJerricco | neat | 10:27:14 |
@lotte:chir.rs | which like i didn’t see much documentation on this so i thought this was simply unsupported | 10:27:25 |
magic_rb | Ill try with runc, will add it to my infinite list of side projects | 10:27:36 |
@lotte:chir.rs | even though, honestly, kinda important | 10:27:36 |
ElvishJerricco | yea it wouldn't surprise me if systemd just knows how to do this stuff implicitly and nspawn isn't actually doing anything special | 10:27:43 |
magic_rb | There might be quirks if we go for rootless, but nothing that couldnt be solved | 10:28:07 |
steveej | what i really like about systemd-nspawn is the integration with machinectl and journalctl -M and journalctl -m | 10:36:35 |