Skip to content

bug(init): init --up leaks db instances out of state.json on an EC2 eventual-consistency race #833

Description

@rustyrazorblade

Problem: init --up aborted when the db group's status-check wait hit a transient InvalidInstanceID.NotFound (EC2 eventual consistency), and the 3 created db instances were left out of state.json — alive in AWS but invisible to status and down (orphaned spend).

Root cause: EC2InstanceService.waitForInstanceStatusOk() uses a raw Ec2Waiter with no RetryUtil.withEc2InstanceRetry wrapper (unlike the already-hardened describeInstances()), and partially-created instances aren't persisted.

Fix: retry the status-check waiter through InvalidInstanceID.NotFound; persist partially-created instances so down/status can reclaim them.

Found during the TiDB×sysbench load-test investigation (2026-07-21). See the run's final report for full context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority 3 — low / somedaybugSomething isn't workingstatus:readyGroomed; awaiting activation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions