Comment 9 for bug 1762687

Revision history for this message
Matt Riedemann (mriedem) wrote :

This is the validation logic in cinder-api when creating an attachment record:

https://github.com/openstack/cinder/blob/d9242027c1235b63bcff15c2afd392bb9c28c2d7/cinder/volume/api.py#L2084-L2106

I wonder if the vref at this point is stale:

https://github.com/openstack/cinder/blob/d9242027c1235b63bcff15c2afd392bb9c28c2d7/cinder/volume/api.py#L2097

Because if the instance we're trying to attach does not match the instance already attached, this should be true:

   if attachment.instance_uuid != instance_uuid:
       override = False
       break

And then we should fail. I can push a Cinder patch for this, but don't have a reliable recreate at the moment.