when nova-compute service is down, delete instance will call _local_delete in nova-api service, which will delete instance from DB,ternminate connection,detach volume and destroy bdm.
However,we set connector = {'ip': '127.0.0.1', 'initiator': 'iqn.fake'} while call ternminate connection, which result an exception, leading the volume status still "in used", attached to the instance, but the instance and bdm are deleted in nova db. all of this make DB inconsistent state, bdm is deleted in nova, but volume still in use from cinder.
Because the nova compute service is down, we can't get the correct connector of host. If we record the connector in bdm while attaching volume, the connector can be get from bdm when local_delete, which will lead success of ,ternminate connection,detach volume and so on.
Which version of OpenStack? Are there any stack traces?