Skip to content

(bug) Legacy Railway preview setup fails on re-run: 'A volume is already mounted' treated as throttling #5671

Description

@mmabrouk

When the Railway preview setup job re-runs against an already-bootstrapped preview project, bootstrap fails even though the environment is healthy. The Postgres volume add returns:

A volume is already mounted on service Postgres in environment production
Volume add at /var/lib/postgresql/data for service 'Postgres' failed (Railway often throttles volume creation); retrying in 15s (attempt 1/3).
...
Failed to create volume at /var/lib/postgresql/data for service 'Postgres' after 3 attempts.

Expected: an already-mounted volume is the desired end state, so ensure_volume should treat this response as success (or its railway volume list pre-check should detect the existing volume; today it misses it and the refusal is misclassified as the volume-creation throttle).

Reproduce: run the preview chain for a PR once (green), then use "Re-run all jobs" on the same run. First runs on fresh projects are unaffected, which is why this only shows up on re-runs. Observed on runs 30767675762 and 30767675393 (2026-08-03).

Workaround: close and reopen the PR so cleanup deletes the project and bootstrap starts fresh.

Note: the clone-based preview redesign (#5650) retires this code path entirely; this issue matters only while the legacy path remains the default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions