]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: document allocateUnit limitation on D-Bus fallback path
authorChristian Brauner <brauner@kernel.org>
Mon, 6 Apr 2026 18:27:09 +0000 (20:27 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 Apr 2026 19:42:15 +0000 (21:42 +0200)
The D-Bus registration methods (RegisterMachineEx, RegisterMachineWithNetwork)
do not support the allocateUnit feature that the varlink path provides.
When varlink is unavailable and registration falls back to D-Bus, machined
discovers the caller's existing cgroup unit instead of creating a dedicated
scope. Callers that skip client-side scope allocation (relying on the
server to do it via allocateUnit) will end up without a dedicated scope
on the D-Bus fallback path.

Document this limitation at the fallback site so callers are aware.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
src/shared/machine-register.c

index d6e76db85c9fc001f66fafcd5c31816b7b3aa4e6..2f18fa8cf9546f55d413e206931c92cf74ec0a7c 100644 (file)
@@ -176,7 +176,11 @@ int register_machine(
                 log_debug_errno(r, "Failed to connect to machined via varlink%s%s, falling back to D-Bus: %m",
                                 p ? " on " : "", strempty(p));
 
-                /* In case we are running with an older machined, fall back to D-Bus. */
+                /* In case we are running with an older machined, fall back to D-Bus. Note that the D-Bus
+                 * methods do not support the allocateUnit feature — machined will look up the caller's
+                 * existing cgroup unit instead of creating a dedicated scope. Callers that skip client-side
+                 * scope allocation when allocate_unit is set should be aware that on the D-Bus path no scope
+                 * will be created at all. */
                 if (!bus)
                         return log_debug_errno(SYNTHETIC_ERRNO(ESRCH), "Varlink connection to machined not available and no bus provided.");