Skip to content
Maintenance: stuck state lock

Maintenance: stuck state lock

maintenance-stuck-state-lock.mp4 (1:10, 720p, with sound): where state lives, and why you never unlock blind. It shows the intended flow; the lock ID and timestamps are illustrative.

TimeStepWhat happens
0:00Wave 1 is applyingcell-01 is replacing its nodes with module 0.2.2.
0:061 · The runner disappears mid-applyThe job dies; the lock it took on cell-01’s state stays.
0:162 · The next pipelineError: Error acquiring the state lock, with Lock Info: ID, Path, Operation, Who, Created.
0:283 · Check firstConfirm nothing is still applying to cell-01. Unlocking under a live apply can corrupt the state.
0:384 · Release the lockDELETE /projects/:id/terraform/state/cell-01/lock on the GitLab API, or tofu force-unlock <ID>.
0:505 · Plan, review, applyA fresh plan shows what the interrupted apply left undone.
1:02ResolvedNo code change: one lock released, one plan reviewed, one apply.

Editing

Last updated on