Issue re-deploying an app mounted with volume

Hello, I am new here, and am trying to wrap my head around how volumes work in general. I am getting this error when I attempt to re-deploying an app mounted with volume:

Error: failed to create green machines: failed to launch VM: failed_precondition: volume already claimed by machine 123xxxxxxx456

I took the following steps:

  1. Launched an app (fly launch) with the following segment in fly.toml

source = “volume”
destination = “/home/volume”

  1. Redeploy the app (fly deploy) with a new image

I don’t really understand what I am doing wrong - I tried manually creating duplicates of the same volume (fly volume create volume -a appname) but that didn’t work either. Do I have to manually destroy the old machine to unbind that volume before I re-deploy?

Ok found the issue

bluegreen : For every running Machine, a new one is booted alongside it in the same region. Once all of the new Machines pass health checks, traffic gets migrated to the new Machines and the old Machines are destroyed. If your app is scaled to 2 or more Machines, this strategy can reduce deploy time by running tasks in parallel. You need to configure at least one health check to use the bluegreen strategy. The bluegreen strategy doesn’t work if Machines have volumes attached.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.