I have a volume which is shown as attached to a destroyed machine. This prevents me from destroying the volume or attaching it to another machine.
Interestingly the error message I get when trying to destroy the volume tells me it is attached to a different machine to the one shown through fly volumes show. Both of the machines have been destroyed.
This all came about when I tried to use the machines API to unmount a volume from one machine and mount it on another.
> fly volume list
ID STATE NAME SIZE REGION ZONE ENCRYPTED ATTACHED VM CREATED AT
vol_5podq4q1q2nvg8w1 created shared 50GB lhr 81b8 true 1781113a9d40d8 5 days ago
> fly volume destroy vol_5podq4q1q2nvg8w1
Error failed destroying volume: volume is currently bound to machine: 3d8d5d2b276d89
> fly machine list
No machines are available on this app ...
Would you mind trying again? We’ve deployed a fix that checks for the machine state if a volume is still showing as claimed. The underlying issue looks to be where a machine config has a volume and then a machine update occurs without declaring a volume and leaves the claim around.
@sh4rk I’ve resolved the issue so you should be able to use the volume again with a new machine. There’s an edge case where once a machine is created, you cannot later add a volume because there’s no guarantee (right now) that the volume and machine will be on the same underlying host. We’ll likely get a fix in soon to prevent updating a machine with a volume if the initial version did not define one (or defined a different one).