Skip to content

Commit b1819ed

Browse files
systemd prototyping (#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: D87582955
1 parent 4d2e334 commit b1819ed

File tree

2 files changed

+698
-5
lines changed

2 files changed

+698
-5
lines changed

hyperactor_mesh/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ serde_bytes = "0.11"
7474
serde_json = { version = "1.0.140", features = ["alloc", "float_roundtrip", "raw_value", "unbounded_depth"] }
7575
serde_multipart = { version = "0.0.0", path = "../serde_multipart" }
7676
strum = { version = "0.27.1", features = ["derive"] }
77+
systemd = { version = "0.10.1", optional = true }
7778
tempfile = "3.22"
7879
thiserror = "2.0.12"
7980
tokio = { version = "1.47.1", features = ["full", "test-util", "tracing"] }
@@ -92,5 +93,9 @@ proptest = "1.5"
9293
timed_test = { version = "0.0.0", path = "../timed_test" }
9394
tracing-test = { version = "0.2.3", features = ["no-env-filter"] }
9495

96+
[features]
97+
default = []
98+
systemd = ["dep:systemd"]
99+
95100
[lints]
96101
rust = { unexpected_cfgs = { check-cfg = ["cfg(fbcode_build)"], level = "warn" } }

0 commit comments

Comments
 (0)