Cinders new attach API doesn't allow novas live-migrate cheat
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
John Griffith |
Bug Description
Currently the new cinder attachment_create method only allows creating attachments for volumes that are in available or downloading state. We intend to allow multiple attachments when multi-attach is ready to land and then manage everything off of attachment-id's, but for now we're not enabling that.
The problem is that Nova does a little trick when it performs things like live-migration and it actually sets up two attachments at the same time. So we need to provide some way for Nova to be able to create another attachment record even though the volume status is still "in-use". There's a number of things that can be done here like a new "migrating" status etc, but for now the best option might be to just check if the attachment is for the same instance-uuid and if it is, allow the creation of the new record.
The instance-uuid check was suggested from the Nova side as well: https:/ /github. com/openstack/ nova-specs/ blob/master/ specs/pike/ approved/ cinder- new-attach- apis.rst
We might end up with too many flags if we would go down that path, so I think experimenting with the instance-uuid direction should be good.