CoderWorkspacePool: use after the last read can still be bound or deleted on a delete retry
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 28/100
Direzione di ricerca
Read the two threads on PR #404 first, then bindClaims in internal/controller/coderworkspacepool_claim.go and cleanupStep in internal/controller/coderworkspacepoolmember_cleanup.go to see where each check sits relative to the delete/bind boundary. Before writing anything, answer the open question in the issue: does Coder move last_used_at on a failed delete build? A failed-delete test against the member cleanup path is the place to establish that. Done means both paths re-check use at the boundary, existing reconciler tests still pass, and the residual flush-delay window is documented.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Two paths can still hand out or delete a pool workspace that someone used after the member's last read of Coder. Codex found both on #404. Both exist on main and are outside #349, which #404 fixes.
- Bind uses stored status.
bindClaims(internal/controller/coderworkspacepool_claim.go) picks members by their storedReadyandUsedconditions. A member readslast_used_atonce a minute. Use after that read and before the next one is not in status yet, so a new claim can bind the workspace. The resourceVersion precondition cannot see a change in Coder. Thread: https://github.com/coder/coder-k8s/pull/404#discussion_r4424757093 - No use check before a delete retry.
cleanupStep(internal/controller/coderworkspacepoolmember_cleanup.go) runs the last use check only before the first delete build (DeleteBuildID == "" && DeleteAttempts == 0). If that build fails or is canceled and someone uses the workspace during the retry backoff, the retry deletes it. Thread: https://github.com/coder/coder-k8s/pull/404#discussion_r4424757101
Neither path can close the gap fully. Coder records use up to one usage flush (about 60 s) late, and it has no conditional delete or bind. The fixes narrow the window to that flush delay.
Possible fix
- Read the workspace from Coder at the bind boundary and skip a member whose
last_used_atis past itsreadyLastUsedAt. - Run the last use check before every new delete build, not only the first. Check first whether Coder moves
last_used_aton a failed delete build. If it does, every failed delete would release its member (a leak, the fail-safe side).
Trigger
Before #153 PR 12 registers the pool reconcilers.
Owner: maintainer desk.
Refs #153
Refs #404
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh
- Lingua principale
- Go
- Stelle
- 5
- Fork
- 3
- Merge medio
- 2h 49m
- PR unite (30g)
- 206
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/coder-k8s
-
CoderWorkspacePool: count bound and used members only when their owner matches the pool's ownerAperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di coder/coder-k8s
Issue simili
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
[mesheryctl] design delete fails when passing file or URL as positional argumentForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertacomponent/mesheryctl kind/bug language/go
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
meshery/meshery#22772 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
backend security size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
limitlessprojects/Go-Hybrid#3342 ·
I maintainer di solito rispondono entro 1 giorno
-
status/ready type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
buildpacks/pack#2733 ·
I maintainer di solito rispondono entro 1 giorno