Skip to content

Resolve volume names to IDs on the server - #5125

Merged
rianmcguirefly merged 3 commits into
masterfrom
rm/place-with-vol-names
Aug 27, 2026
Merged

Resolve volume names to IDs on the server#5125
rianmcguirefly merged 3 commits into
masterfrom
rm/place-with-vol-names

Conversation

@rianmcguirefly

@rianmcguirefly rianmcguirefly commented Aug 25, 2026

Copy link
Copy Markdown
Member

Change Summary

What and Why:

Apps may have a pool of detached volumes with the same name and expect a new Machine to use any eligible member of that pool.

Previously, flyctl resolved the name to one volume ID before launching the Machine. Because that ID pins placement to that volume’s host, the launch could fail when that host lacked capacity, even when another same-named volume could accommodate the Machine. This caused deploy and scaling failures.

How:

  • Send volume names, rather than preselected volume IDs, when deploy and scale commands attach detached named volumes.
  • Track reusable volume capacity as counts keyed by name and region, rather than IDs.
  • Treat existing and newly created same-name volumes as one pool during scale, avoiding races between name-based and ID-based launches.

Related to:
https://github.com/superfly/machines-meta/issues/9


Documentation

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

@rianmcguirefly
rianmcguirefly force-pushed the rm/place-with-vol-names branch 4 times, most recently from 55fb57d to fa5f944 Compare August 26, 2026 04:33
@rianmcguirefly
rianmcguirefly marked this pull request as ready for review August 26, 2026 04:33
Volume availability was checked independently for each
process group and, on first deploy, without regard to region.
This could count the same unattached volume more than once or
treat a volume outside the primary region as usable. Reserve
volumes from a shared name-and-region pool so each Machine
has a distinct eligible volume and first deploy creates any
regional deficit.
When a scale plan mixes existing and newly created same-name volumes,
a name-based launch can claim a new volume before the launch
targeting that volume by ID. The ID-based launch then fails even
though the pool has enough capacity.

Treat same-name volumes as fungible by doing normal scale launches
by volume name, including after creating any deficit. Keep
explicit-ID attachment for --with-new-volumes because that
flag promises each Machine a newly created volume.
@rianmcguirefly
rianmcguirefly force-pushed the rm/place-with-vol-names branch from fa5f944 to baefdd7 Compare August 27, 2026 04:41
@rianmcguirefly
rianmcguirefly merged commit 4f70d98 into master Aug 27, 2026
41 of 43 checks passed
@rianmcguirefly
rianmcguirefly deleted the rm/place-with-vol-names branch August 27, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant