Repository navigation
fix(gateway): report busctl-incompatible when busctl rejects --json - #144046
JamieJ5926 wants to merge 6 commits into
Conversation
On systemd < 240 busctl has no --json flag, so every manager inspection fails and install conservatively refuses with a generic SERVICE_DEFINITION_UNKNOWN. Detect the tool-invocation failure and surface a distinct busctl-incompatible reason with remediation instead of conflating it with an uninspectable definition. Fixes openclaw#142940 (minimum remediation path).
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR is superseded by the merged compatibility repair at #146022, which restores systemd 239 installation instead of retaining the refusal with a clearer diagnostic. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Retain the shipped compatibility reader and close this superseded diagnostic-only PR. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Retain the shipped compatibility reader and close this superseded diagnostic-only PR. Do we have a high-confidence way to reproduce the issue? The historical failure is supported by the original report, but current main handles its exact unsupported-option response through legacy inspection; no target code was executed during this review. Is this the best way to solve the issue? The merged compatibility repair solves the central installation problem more completely than retaining refusal and advising an operating-system upgrade. Security review: Security review cleared: The patch retains refusal before writes and exposes static explanations without forwarding native stderr. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning medium; reviewed against a9b40cf325e8. |
|
Maintainer note on the remaining red (no code action requested from me): head 7fda6f7 shows 163 pass / 1 fail. The single fail is checks-node-changed-extensions-bundle-4 in run 34491603625 (job 102919819301): a timing-flake assertion (vi.waitFor release-called-once) in extensions/openrouter/music-generation-provider.test.ts, 1284/1285 passing in that shard. This PR's full diff is 8 files, all under src/daemon/* and src/cli/daemon-cli/* (install.ts, install.test.ts, service-types.ts, systemd-definition-mutation.ts, systemd-definition-mutation.test.ts, systemd-service-files.ts, systemd-unavailable.ts, systemd-unavailable.test.ts) — none under extensions/*. The consequential openclaw/ci-gate fail follows the shard fail. I cannot rerun it (needs admin: gh run rerun --failed was denied). A shard rerun should clear it. |
Gateway installation and reinstallation now work on systemd 239 by reading legacy busctl text output when that version rejects --json=short. The existing effective-command reader retains routing, authority checks, deadlines, drop-ins, and environment semantics; unverifiable definitions still refuse installation. Closes #142940 Refs #144046 Contributor native systemd 239 proof covers successful fresh installs and reinstalls, preserved overrides, and refusal controls. Exact-head CI is green; independent maintainer review and ClawSweeper found no actionable findings. Packaged CLI parsing, real Gateway health, and updater/private-peer compatibility are outside this proof. Co-authored-by: PollyBot13 <[email protected]>
Gateway installation and reinstallation now work on systemd 239 by reading legacy busctl text output when that version rejects --json=short. The existing effective-command reader retains routing, authority checks, deadlines, drop-ins, and environment semantics; unverifiable definitions still refuse installation. Closes openclaw#142940 Refs openclaw#144046 Contributor native systemd 239 proof covers successful fresh installs and reinstalls, preserved overrides, and refusal controls. Exact-head CI is green; independent maintainer review and ClawSweeper found no actionable findings. Packaged CLI parsing, real Gateway health, and updater/private-peer compatibility are outside this proof. Co-authored-by: PollyBot13 <[email protected]>
| existingServiceCommand = await service.readCommand(process.env, { requireEffective: true }); | ||
| } catch { | ||
| } catch (error) { | ||
| if (hasErrnoCode(error, BUSCTL_JSON_UNSUPPORTED_CODE)) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
ClawSweeper recorded closeout evidence for this proposed close.
|
Fixes #142940 (minimum remediation path from the issue).
What Problem This Solves
On hosts with systemd older than 240, busctl has no --json flag, so every manager inspection subprocess fails at argument parsing. Install conflated that tool-invocation failure with an uninspectable definition and refused with generic SERVICE_DEFINITION_UNKNOWN, leaving systemd 239 users (RHEL 8 family, Alibaba Cloud Linux 8) with no actionable error.
Change
No persisted data model changes: the marker and reason exist only in memory during inspection.
Evidence
Scope note
This is the issue's sanctioned minimum: install still refuses on systemd < 240, but now with an actionable error instead of a generic one. A full legacy-output fallback (parsing pre-JSON busctl text) needs a systemd 239 fixture host and is left for a follow-up.