Resolve volume names to IDs on the server - #5125
Merged
Merged
Conversation
rianmcguirefly
force-pushed
the
rm/place-with-vol-names
branch
4 times, most recently
from
August 26, 2026 04:33
55fb57d to
fa5f944
Compare
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
force-pushed
the
rm/place-with-vol-names
branch
from
August 27, 2026 04:41
fa5f944 to
baefdd7
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
deployandscalecommands attach detached named volumes.scale, avoiding races between name-based and ID-based launches.Related to:
https://github.com/superfly/machines-meta/issues/9
Documentation