Comment 58 for bug 2004555

Revision history for this message
Gorka Eguileor (gorka) wrote : Re: [ussuri] Wrong volume attachment - volumes overlapping when connected through iscsi on host

Hi Dan,

> how cinder can redirect or check with nova for a regular volume detach?

The code is using the the "service_token" field from the context to detect if the request is coming from an OpenStack service (nova or glance), and if that's the case it processes the request.

If it's not coming from a service it does a couple of checks to allow manual cleanup requests. So it allows user delete attachment calls under the following circumstances:

- If the attachment record doesn't have an instance id.
- If the attachment record doesn't have connection information.
- If it has an instance, but the instance doesn't exist in Nova.
- If the attachment record in Nova's instance has a different ID from the one in the attachment.