Preserve socket activation for instance-control readiness
Remove edge's Wants on instance-control so its startup probe runs after the edge cgroup exists. Keep shutdown ordering and the 120-second stop budget. Assert that edge neither Wants nor Requires control and regenerate the Task 1 and Task 2 census chain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t1.md+3 −3docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t2.md+1 −1internal/host/units/carlos-edge.service+3 −3internal/host/units/carlos-instance-control.service+3 −3internal/host/units_shutdown_test.go+8 −1internal/provision/testdata/plan14-root-reads-chain.tsv+2 −2internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t1.tsv+4 −4
Intent
<task-notification> <task-id>b4vnjhyg2</task-id> <tool-use-id>toolu_01MVJe7mGrk34vaWvLYR5iCV</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/c23f0319-4761-45f6-bac7-f9471c7b9ab1/tasks/b4vnjhyg2.output</output-file> <status>completed</status> <summary>Background command "W=/home/paulca/amadan.net/carlos/platform/.claude/worktrees/ha-graceful/.superpowers/sdd/2026-11-08-region-ha-graceful-terminate; echo "Task 3: review Needs fixes (driver: present ignores clean; absent/both don't prove agent alive at t_term) + 4 minors; fix round 1/5 dispatched (driver-only, no launches)" >> $W/progress.md; until [ -f $W/task-3-fix1.done ]; do sleep 20; done; echo fix done" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 27.9 g CO₂e (3,454,711 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-graceful-terminate, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t1.md b/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t1.md| index c9b735721..a56c36192 100644 |
| --- a/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t1.md |
| +++ b/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t1.md |
| @@ -4,8 +4,8 @@ Ruling `census-ruling-region-ha-graceful-terminate-t1`. The independent reviewer |
| | unit | change | read sites | what changed | |
| |---|---|---|---| |
| -| `internal/host/units/carlos-edge.service` `external` | body | unchanged (1) | Region HA T1/DR-4: start instance-control with the edge and order edge after its service, socket and D-Bus so stop proofs remain available during edge shutdown; set TimeoutStopSec=120. Static unit names only; no new input, command, path, capability or root read. Instance template ordering is unchanged. | |
| -| `internal/host/units/carlos-instance-control.service` `external` | body | unchanged (1) | Region HA T1/DR-4 fix round 1: order control after nftables.service so startup hairpin recovery waits for the loaded ruleset; no Wants or Requires added. Update the startup and shutdown lifetime comment. Static unit ordering only; no new root read, input, path, command or capability. | |
| +| `internal/host/units/carlos-edge.service` `external` | body | unchanged (1) | Region HA T1/DR-4 fix round 2: keep edge after control service, socket and D-Bus with TimeoutStopSec=120, but do not Want or Require control: its start probe needs the edge cgroup, so the agent socket-activates it after edge starts. Static ordering only; no new root read, input, command, path or capability. Instance templates unchanged. | |
| +| `internal/host/units/carlos-instance-control.service` `external` | body | unchanged (1) | Region HA T1/DR-4 fixes: retain After=nftables.service for startup hairpin recovery without adding Wants or Requires; describe socket activation by the agent and availability through edge stop. No new root read, input, path, command or capability. | |
| Envelopes re-pinned: `internal/activator`, `internal/host/units`. |
| @@ -16,6 +16,6 @@ Recorded dispositions, which each change must still satisfy: |
| - `internal/host/units/carlos-edge.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input |
| - `internal/host/units/carlos-instance-control.service` `external`: authority, task B3,C,D,E1,J4. Basis: root-input;kept=B3,C,D,E1;scope=protected-decision-only;rev3=census-ruling-agent-start-demo-3;basis=Correct the runtime-write comment to include escaped demo snapshot .mount units alongside per-generation drop-ins; service directives are unchanged. |
| -Seal: `9cdff432a5de2ffeaa147fdafd6a486c61c27a0c38f77466bddc86b149332c7d` → `a2014042114a4dd671e52a07bbb686b9ef4b6aa97798cc95e1095680c66fd9b2`. |
| +Seal: `9cdff432a5de2ffeaa147fdafd6a486c61c27a0c38f77466bddc86b149332c7d` → `3273ecae03559a8d450027f4cdf4dff24af9c54705231bc4f7c77b72582b517c`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t1.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t2.md b/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t2.md| index 816ed2f5c..5cd9ec5b6 100644 |
| --- a/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t2.md |
| +++ b/docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t2.md |
| @@ -20,6 +20,6 @@ Recorded dispositions, which each change must still satisfy: |
| - `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority. |
| - `internal/host/claimfilesseed_shutdown.go` `joinAgentShutdown`: authority, task C,J4. Basis: rev3=PROPOSED-seed; FS-R7/9; agent; seed-active joined shutdown shares bounded cleanup; inactive seed has no seed join and starts a fresh 60-second service context after both startup joins |
| -Seal: `a2014042114a4dd671e52a07bbb686b9ef4b6aa97798cc95e1095680c66fd9b2` → `506b0a9bbaca58f56bfbd9ceff3747bccf7c5575207a94b26f5637613a37c1f0`. |
| +Seal: `3273ecae03559a8d450027f4cdf4dff24af9c54705231bc4f7c77b72582b517c` → `687cf7744aecdf8a238dcdb80562b0ef191b3e247c28851de44c01866dbeca13`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/host/units/carlos-edge.service b/internal/host/units/carlos-edge.service| index 08ddc2787..1b2d7a031 100644 |
| --- a/internal/host/units/carlos-edge.service |
| +++ b/internal/host/units/carlos-edge.service |
| @@ -13,9 +13,9 @@ Requires=data-instances.mount run-carlos-instances.mount run-carlos-logs.mount |
| # and D-Bus available until the edge has stopped: their RPCs and reads prove |
| # termination before HA leases can be released (region HA T1/DR-4). |
| After=network-online.target data-instances.mount run-carlos-instances.mount run-carlos-logs.mount carlos-instance-control.socket carlos-instance-control.service dbus.service |
| -# Start control at boot: a socket with a pending stop job refuses activation, |
| -# so shutdown cannot rely on socket-starting the service (region HA T1/DR-4). |
| -Wants=network-online.target carlos-instance-control.service |
| +# Control's start probe needs the edge's cgroup. Let the agent's first |
| +# request socket-activate control after the edge starts (region HA T1/DR-4). |
| +Wants=network-online.target |
| [Service] |
| # Optional host-wide config (0600, root-owned): CARLOS_HIBERNATE_*, |
diff --git a/internal/host/units/carlos-instance-control.service b/internal/host/units/carlos-instance-control.service| index 4c781661e..b294a0111 100644 |
| --- a/internal/host/units/carlos-instance-control.service |
| +++ b/internal/host/units/carlos-instance-control.service |
| @@ -1,6 +1,6 @@ |
| -# The root instance-control service (isolated-exec design §5). The edge's |
| -# Wants= starts it at boot, and it stays up through the edge's stop |
| -# (region HA T1/DR-4). The socket still activates it if it is not running. |
| +# The root instance-control service (isolated-exec design §5). The agent |
| +# socket-activates it after the edge starts, and it stays up through the |
| +# edge's stop (T1/DR-4 ordering). |
| # Its whole job is |
| # systemctl start/stop/set-property on the three instance templates' units |
| # and their host slices, on the agent's request, plus running the readiness |
diff --git a/internal/host/units_shutdown_test.go b/internal/host/units_shutdown_test.go| index b40c63b19..1e3d5dd5e 100644 |
| --- a/internal/host/units_shutdown_test.go |
| +++ b/internal/host/units_shutdown_test.go |
| @@ -52,7 +52,7 @@ func TestEdgeShutdownKeepsControlAvailable(t *testing.T) { |
| } |
| delete(units, "carlos-edge-group.conf") |
| for key, wants := range map[string][]string{ |
| - "[Unit]Wants": {"carlos-instance-control.service"}, |
| + "[Unit]Wants": {"network-online.target"}, |
| "[Unit]After": {"carlos-instance-control.service", "carlos-instance-control.socket", "dbus.service", "nftables.service"}, |
| } { |
| for _, want := range wants { |
| @@ -65,6 +65,13 @@ func TestEdgeShutdownKeepsControlAvailable(t *testing.T) { |
| t.Errorf("%s TimeoutStopSec = %v, want 120", edge, got) |
| } |
| const control = "carlos-instance-control.service" |
| + // The probe at control start needs the edge's cgroup, so the agent |
| + // socket-activates control after the edge starts. |
| + for _, key := range []string{"[Unit]Wants", "[Unit]Requires"} { |
| + if slices.Contains(units[edge][key], control) { |
| + t.Errorf("%s must not add %s=%s: control's start probe needs the edge's cgroup", edge, key, control) |
| + } |
| + } |
| if !slices.Contains(units[control]["[Unit]After"], "nftables.service") { |
| t.Errorf("%s must order startup after nftables.service for hairpin recovery", control) |
| } |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 128f64336..e036b3fc3 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -120,5 +120,5 @@ plan14-root-reads-claim-countdown.tsv 5b31785441c6a48ddae93e9f3c0f8962f7983b55d8 |
| plan14-root-reads-region-ha-dr2.tsv 7247af7f4de84593d83c6f60c0147d0a04836146197dd60c2ed2bf78919cad22 |
| plan14-root-reads-dr1-left-link.tsv 160744b3062d0ab9a0cb3c7be3a391ae38cf89ffe410ddd5d179e0c3cb509b66 |
| plan14-root-reads-claim-source.tsv 9cdff432a5de2ffeaa147fdafd6a486c61c27a0c38f77466bddc86b149332c7d |
| -plan14-root-reads-region-ha-graceful-terminate-t1.tsv a2014042114a4dd671e52a07bbb686b9ef4b6aa97798cc95e1095680c66fd9b2 |
| -plan14-root-reads-region-ha-graceful-terminate-t2.tsv 506b0a9bbaca58f56bfbd9ceff3747bccf7c5575207a94b26f5637613a37c1f0 |
| +plan14-root-reads-region-ha-graceful-terminate-t1.tsv 3273ecae03559a8d450027f4cdf4dff24af9c54705231bc4f7c77b72582b517c |
| +plan14-root-reads-region-ha-graceful-terminate-t2.tsv 687cf7744aecdf8a238dcdb80562b0ef191b3e247c28851de44c01866dbeca13 |
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t1.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t1.tsv| index 22d2e36a3..bb71afb29 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t1.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-region-ha-graceful-terminate-t1.tsv |
| @@ -1,7 +1,7 @@ |
| # Census overlay region-ha-graceful-terminate-t1, written by census-propose (#369). census-ruling-region-ha-graceful-terminate-t1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-region-ha-graceful-terminate-t1.md. |
| # 2 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -@legacy f88f2eb6e612286bcea895a993c42bde3c90a1b3d6048dbb0bb63dc88f4445eb internal/host/units/carlos-edge.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4: start instance-control with the edge and order edge after its service, socket and D-Bus so stop proofs remain available during edge shutdown; set TimeoutStopSec=120. Static unit names only; no new input, command, path, capability or root read. Instance template ordering is unchanged. file:external@0 282d2bf1ab94c34139fea7d355a57368bd8f4d5ed0e4c31910808023e97b0d5a |
| -internal/host/units/carlos-edge.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4: start instance-control with the edge and order edge after its service, socket and D-Bus so stop proofs remain available during edge shutdown; set TimeoutStopSec=120. Static unit names only; no new input, command, path, capability or root read. Instance template ordering is unchanged. file:external@0 282d2bf1ab94c34139fea7d355a57368bd8f4d5ed0e4c31910808023e97b0d5a |
| -internal/host/units/carlos-instance-control.service external authority B3,C,D,E1,J4 root-input;kept=B3,C,D,E1;scope=protected-decision-only;rev3=census-ruling-agent-start-demo-3;basis=Correct the runtime-write comment to include escaped demo snapshot .mount units alongside per-generation drop-ins; service directives are unchanged.;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 fix round 1: order control after nftables.service so startup hairpin recovery waits for the loaded ruleset; no Wants or Requires added. Update the startup and shutdown lifetime comment. Static unit ordering only; no new root read, input, path, command or capability. file:external@0 4d3e0383f099cfb3e09bbf8676c50b3ebeaa4360389218fa932e118fbc550b97 |
| +@legacy 1a917d3b2b5f31cff4133f996d9ce0fc60c27fd9c41cda21d21253b0c7df2de6 internal/host/units/carlos-edge.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 fix round 2: keep edge after control service, socket and D-Bus with TimeoutStopSec=120, but do not Want or Require control: its start probe needs the edge cgroup, so the agent socket-activates it after edge starts. Static ordering only; no new root read, input, command, path or capability. Instance templates unchanged. file:external@0 6389ef660a0c78e8be24008dc470b2b067d17c6c09740304961ad72635b122cd |
| +internal/host/units/carlos-edge.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 fix round 2: keep edge after control service, socket and D-Bus with TimeoutStopSec=120, but do not Want or Require control: its start probe needs the edge cgroup, so the agent socket-activates it after edge starts. Static ordering only; no new root read, input, command, path or capability. Instance templates unchanged. file:external@0 6389ef660a0c78e8be24008dc470b2b067d17c6c09740304961ad72635b122cd |
| +internal/host/units/carlos-instance-control.service external authority B3,C,D,E1,J4 root-input;kept=B3,C,D,E1;scope=protected-decision-only;rev3=census-ruling-agent-start-demo-3;basis=Correct the runtime-write comment to include escaped demo snapshot .mount units alongside per-generation drop-ins; service directives are unchanged.;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 fixes: retain After=nftables.service for startup hairpin recovery without adding Wants or Requires; describe socket activation by the agent and availability through edge stop. No new root read, input, path, command or capability. file:external@0 bb1f7d683fb0d4fe0610037e6f7e32db4c7b0ea3c3c28cfec6590c8a27d0c552 |
| @coverage internal/activator 98723d85739969db615d6b0f589fa04a31e62dc80d3b64d3b1094b5edf3eeade |
| -@coverage internal/host/units bb64c804f6d030a72c420040e350ac29a36b74178528616bc6653c3ddf083876 |
| +@coverage internal/host/units 73dea994495c57e8bc6a12c624b7c6fbd87a6dbdc894d21401e45ecc700dca4c |