commit 6fb2ef96d6aaf9ca0ad394fd7621ef1e6003f5a1
Author: Matt Riedemann <email address hidden>
Date: Wed Mar 18 12:42:42 2015 -0700
Save bdm.connection_info before calling volume_api.attach_volume
There is a race in attach/detach of a volume where the volume status
goes to 'in-use' before the bdm.connection_info data is stored in the
database. Since attach is a cast, the caller can see the volume go to
'in-use' and immediately try to detach the volume and blow up in the
compute manager because bdm.connection_info isn't set stored in the
database.
This fixes the issue by saving the connection_info immediately before
calling volume_api.attach_volume (which sets the volume status to
'in-use').
Reviewed: https:/ /review. openstack. org/164330 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=6fb2ef96d6a af9ca0ad394fd76 21ef1e6003f5a1
Committed: https:/
Submitter: Jenkins
Branch: master
commit 6fb2ef96d6aaf9c a0ad394fd7621ef 1e6003f5a1
Author: Matt Riedemann <email address hidden>
Date: Wed Mar 18 12:42:42 2015 -0700
Save bdm.connection_info before calling volume_ api.attach_ volume
There is a race in attach/detach of a volume where the volume status
goes to 'in-use' before the bdm.connection_info data is stored in the
database. Since attach is a cast, the caller can see the volume go to
'in-use' and immediately try to detach the volume and blow up in the
compute manager because bdm.connection_info isn't set stored in the
database.
This fixes the issue by saving the connection_info immediately before api.attach_ volume (which sets the volume status to
calling volume_
'in-use').
Closes-Bug: #1327218
Change-Id: Ib95c8f7b66aca0 c4ac7b92d140cbe b5e85c2717f