Skip to content

One stuck reconcile blocks project handoffs #169

Backlog

Description

@ecv

Problem

When a project leaves or comes back, the fleet manager waits for its running reconciles to finish before it tears down or replaces the old runtime. That wait has no time limit.

A reconcile that ignores cancellation holds the wait open forever. Every later handoff of the same cluster then waits behind it, and nothing logs which project is stuck. The manager has to restart to recover.

Outcome

The wait gives up after a set time. It logs the project and records a metric, so a stuck handoff is visible and the next handoff can proceed.

Found in review of #154, which merged with this open.

Activity

  1. added
    tech-debt
    on Nov 24, 2026
  2. ecv commented on Nov 24, 2026

    @ecv
    ContributorAuthor

    Evidence on main (ba5b6b3): ProjectRuntime.drain() in internal/manager/projects.go:77 cancels the engage context, then takes reconcileMu.Lock() in a goroutine with no deadline. stop() blocks on <-r.drain(), and unbindLocked calls stop() while holding the per-cluster engagement token, so every later Engage of that cluster name waits on it.

  3. changed the title [-]A stuck reconcile blocks every later fleet project handoff[/-] [+]One stuck reconcile blocks project handoffs[/+] on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions