From 6b3b9b1abda8d44a7d4cbef442a37cbd4be7415e Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 6 Apr 2026 20:27:09 +0200 Subject: [PATCH] shared: document allocateUnit limitation on D-Bus fallback path 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) --- src/shared/machine-register.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/machine-register.c b/src/shared/machine-register.c index d6e76db85c..2f18fa8cf9 100644 --- a/src/shared/machine-register.c +++ b/src/shared/machine-register.c @@ -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.");