Commit: 80a0b7e5233ac75638dd49bfbb396bdb21a6aa21
Author: Matt Riedemann <email address hidden>
Date: Wed Jun 24 11:25:01 2015
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').
NOTE(mriedem): The block_device conflicts are due to using dot
notation when accessing object fields and in kilo the context is
no longer passed to bdm.save(). The test conflicts are due to moving
the test modules in kilo and passing the context on save().
Closes-Bug: #1457041
(cherry picked from commit bbf6348997fee02f9dadd556565f44005e2c7f23)
Change-Id: Ib95c8f7b66aca0c4ac7b92d140cbeb5e85c2717f
(cherry picked from commit 80cb5ad5d63efb9a53f128deef6e5fbeebdb93ee)
Reviewed: https:/ /review. fuel-infra. org/8404 ci/fuel- 6.0-updates/ 2014.2
Submitter: Vitaly Sedelnik <email address hidden>
Branch: openstack-
Commit: 80a0b7e5233ac75 638dd49bfbb396b db21a6aa21
Author: Matt Riedemann <email address hidden>
Date: Wed Jun 24 11:25:01 2015
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').
NOTE(mriedem): The block_device conflicts are due to using dot
notation when accessing object fields and in kilo the context is
no longer passed to bdm.save(). The test conflicts are due to moving
the test modules in kilo and passing the context on save().
Closes-Bug: #1457041
(cherry picked from commit bbf6348997fee02 f9dadd556565f44 005e2c7f23) c4ac7b92d140cbe b5e85c2717f a53f128deef6e5f beebdb93ee)
Change-Id: Ib95c8f7b66aca0
(cherry picked from commit 80cb5ad5d63efb9