fix: gitea controller
This commit is contained in:
@@ -595,6 +595,24 @@ server identity, current image/profile, and current IP before fetching a fresh
|
||||
destination-repository token and bootstrapping a new runner name. Old runner
|
||||
registration and filesystem are never reused.
|
||||
|
||||
Runner allocation and Gitea task assignment are separate identities. Bootstrap
|
||||
installs and registers with the daemon stopped, resolves the exact repository
|
||||
runner registration, persists its numeric `runner_id`, and only then starts the
|
||||
daemon over the pinned SSH channel. Webhooks and unfiltered paginated polling
|
||||
bind lifecycle by exact repository plus `runner_id`; terminal `runner_name` is
|
||||
not authoritative because Gitea may already have deleted the ephemeral runner
|
||||
row. If a runner consumes a different queued job, controller first persists a
|
||||
`transfer_pending` intent, moves VM lifecycle to the actual job, and restores
|
||||
the allocation-origin job as VM-less deferred work. Reconciliation replays this
|
||||
ordered transfer before TTL, orphan, capacity, or deferred sweeps, and duplicate
|
||||
crash-intermediate records count as one VM.
|
||||
|
||||
Pre-upgrade records without `runner_id` use exact live runner-name lookup once.
|
||||
If registration is authoritatively absent and complete repository job polling
|
||||
proves no job is active, VM moves to durable synthetic cleanup ownership while
|
||||
origin is restored to deferred. Any malformed, ambiguous, repository-mismatched,
|
||||
or unavailable identity data leaves state and VM untouched for later retry.
|
||||
|
||||
For every creation and reuse rebuild, the controller generates a unique SSH
|
||||
host key, injects it through authenticated Hetzner `user_data`, and pins that
|
||||
exact public key before sending a registration token. Shared image host keys
|
||||
|
||||
Reference in New Issue
Block a user