Currently, when rebuilding an instance with volume attached, the Nova compute manager will directly call
_detach_volume() which will skip the checks of volume status (volume_api.check_detach) and setting the
volume to 'detaching' (volume_api.begin_detaching) at Cinder side. This is different with the normal volume
detach process.
Besides, when rebuilding, we should only allow detaching the volume with in-use status, volume in status
such as 'retyping' should not allowed.
Currently, when rebuilding an instance with volume attached, the Nova compute manager will directly call api.check_ detach) and setting the api.begin_ detaching) at Cinder side. This is different with the normal volume
_detach_volume() which will skip the checks of volume status (volume_
volume to 'detaching' (volume_
detach process.
Besides, when rebuilding, we should only allow detaching the volume with in-use status, volume in status
such as 'retyping' should not allowed.