Initially the goal was to get rid of the intermediate states for attach (on the Cinder side) so a volume would go to 'in-use' straight away, but in your example now that we've added reserve back into the mix I suspect your volume is in an "attaching" or "reserved" state for a brief period when the second call is made. That check referenced above is only checking 'in-use', 'downloading' etc NOT reserved or attaching so I suspect that may be the problem.
I'm not sure but I think our race may be here: /github. com/openstack/ cinder/ blob/master/ cinder/ volume/ api.py# L2084
https:/
Initially the goal was to get rid of the intermediate states for attach (on the Cinder side) so a volume would go to 'in-use' straight away, but in your example now that we've added reserve back into the mix I suspect your volume is in an "attaching" or "reserved" state for a brief period when the second call is made. That check referenced above is only checking 'in-use', 'downloading' etc NOT reserved or attaching so I suspect that may be the problem.