Fix: add register --force flag to bypass already-registered skip
Summary
-
Production fix:
registersilently no-ops whenTentacle:Registered=truewas previously persisted, breaking operators who re-run register to update roles / environment / api-key. -
Fix: add opt-in
--forceflag. When passed,LinuxTentacleFlavor.ResolveRegistrarbypasses the skip path and actually POSTs to the server. -
Backward compat preserved: default behavior unchanged.
systemd runkeeps the skip (correct for boot-time idempotency).
Why this matters
Caught by Linux C3h E2E (PR #250 iteration 3). Operator-impact: every fleet-automation pipeline that re-applies register for role updates was thinking it succeeded but the server's machine record stayed stale.
Files changed
| File | Change |
|---|---|
Abstractions/TentacleFlavorModels.cs |
Add ForceRegistration bool to TentacleFlavorContext
|
Flavors/LinuxTentacle/LinuxTentacleFlavor.cs |
ResolveRegistrar takes forceRegistration parameter; skips the skip when true |
Commands/RegisterCommand.cs |
Add ExtractForceFlag helper; thread --force through TentacleFlavorContext
|
Test plan
-
dotnet buildgreen -
CI: existing 172 E2E tests still pass (C3h's NoOp pin uses log-line prefix that's unchanged by my new wording) -
Future: tighten C3h to also pin --forceactually triggers a real second register (separate follow-up PR)