Commit 69092fd
systemd prototyping (meta-pytorch#1960)
Summary:
this is research into using systemd to manage transient units and surface their output.
this change wires up an optional systemd feature in hyperactor_mesh and teaches BUCK to build with that feature. GitHub / OSS builds never enable the feature and so avoid depending on libsystemd being present on the runners.
in rust, src/systemd.rs gains more transient units tests: experiments with log aggregation.
the journald-based test is gated on `target_os = "linux"` and the `systemd` feature and then soft-fails if the journal or D-Bus session aren't available; this reflects the reality that GitHub CI and Meta devgpu/devvm journal configuration don't let us rely on that path.
in response, this diff explores a more robust approach where units write to file descriptors we pass in over D-Bus (via `UnixStream::pair` and `Fd`), and we aggregate logs from one or many units in-process using async readers.
this gives us a workable story for "systemd for unit management, Unix sockets for log transport" even where journald isn't practically usable.
Differential Revision: D875829551 parent 426225e commit 69092fd
2 files changed
+698
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
0 commit comments