3. restart service nova-compute when vm's task state is deleting.
When nova-compute is up, vm became deleted successful, but the bootable volume is still in-use state and can't delete it using cinder delete volume.
The error point is when nova-compute is up, "init_host" will go to delete the vm whose task state is "deleting", but the context using is got from "nova.context.get_admin_context()" function. There is no auth_token. When call "self.volume_api.terminate_connection(context, bdm.volume_id, connector)" in deleting vm process, it will throw "Ignoring EndpointNotFound: The service catalog is empty" error and can't detach the bootable volume.
the scenario:
1. create a vm using bootable volume.
2. delete this vm
3. restart service nova-compute when vm's task state is deleting.
When nova-compute is up, vm became deleted successful, but the bootable volume is still in-use state and can't delete it using cinder delete volume.
The error point is when nova-compute is up, "init_host" will go to delete the vm whose task state is "deleting", but the context using is got from "nova.context. get_admin_ context( )" function. There is no auth_token. When call "self.volume_ api.terminate_ connection( context, bdm.volume_id, connector)" in deleting vm process, it will throw "Ignoring EndpointNotFound: The service catalog is empty" error and can't detach the bootable volume.