To clarify, the volume should stay in-use when a VM is shutoff.
Certainly seems like libvirt driver needs to check instance if instance is running before making the above call. Probably need to make sure we lock on the instance for the duration of the operation to make sure we don't hit races where the VM turns on half way through, etc.
Anyways, assuming this still reproduces, it's worth a look still.
To clarify, the volume should stay in-use when a VM is shutoff.
Certainly seems like libvirt driver needs to check instance if instance is running before making the above call. Probably need to make sure we lock on the instance for the duration of the operation to make sure we don't hit races where the VM turns on half way through, etc.
Anyways, assuming this still reproduces, it's worth a look still.