Skip to content

pc-agents: show T3's own start error; stop on a policy error; fork-only lockedSettings in README #266

Closed

Description

@scuttletoby

First real PC run of fork-kit/pc-agents: every wall passed, then T3 did not stay up.

What happened
T3 0.1.9 (upstream release) exited at start with ManagedPolicyFileError: "agentSlots.enabled" is not a setting this version can manage. It will not start until an administrator fixes this. It exited with status 77 (NOPERM), and systemd restarted it every 30 s. Setup only printed T3 did not start or stay up (T3 is activating), so the cause needed a manual journalctl read.

The machine file locked agentSlots.*, which only fork builds know. The README example does the same. No fork release with agent slots exists yet (the latest fork release, 11-14, was cut before agent slots landed).

Fix (small, general)

  1. When T3 does not stay up, setup prints T3's last error line from the unit's journal (or the main process's exit status), not only the unit state. Test: a fake T3 that exits 77 with a policy error -> setup's message carries that line.
  2. RestartPreventExitStatus=77 (T3's exit code for a policy it cannot apply) in the unit, so a bad policy stops at once instead of looping until the start limit. Test on the unit text, plus the fake.
  3. README: say that lockedSettings may only name settings the chosen t3Version knows; fork-only settings (agentSlots, usagePacing*, waitFor) need a fork build as t3Version/t3ReleaseBaseUrl. Change the example so it works on an upstream release (an empty lockedSettings, with the fork case as a note).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions