flyctl
flyctl copied to clipboard
`fly deploy` fails when Fly Launch Machines scaled to zero and unmanaged Machines exist
Describe the bug
If you have "unmanaged" machines created with fly m run in an app that uses Fly Launch, you can't deploy after scaling all the Fly Launch Machines down to zero.
Notes
The quickest fix is if fly deploy just ignores the unmanaged Machines and doesn't error. But should we continue to allow unmanaged Machines in Fly Launch apps? Is having both Fly Launch-managed and unmanaged Machines in one app problematic?
Command output
fly deploy
Error: found 2 machines that are unmanaged. `fly deploy` only updates machines with fly_platform_version=v2 in their
metadata. Use `fly machine list` to list machines and `fly machine update --metadata fly_platform_version=v2 <machine id>` to
update individual machines with the metadata. Once done, `fly deploy` will update machines with the metadata based on your
fly.toml app configuration
Related This PR added the error during the switch to V2: https://github.com/superfly/flyctl/pull/1840
Update
A user saw this error when their Machine was unreachable due to a host issue... https://community.fly.io/t/error-found-1-machines-that-are-unmanaged/16444