Merge "Correct attachment_complete call"
This commit is contained in:
commit
16b9d1f7ad
|
@ -717,7 +717,6 @@ class Store(glance_store.driver.Store):
|
|||
attachment = self.volume_api.attachment_update(
|
||||
client, attachment['id'], connector_prop,
|
||||
mountpoint='glance_store')
|
||||
self.volume_api.attachment_complete(client, attachment.id)
|
||||
volume = volume.manager.get(volume_id)
|
||||
connection_info = attachment.connection_info
|
||||
|
||||
|
@ -758,6 +757,10 @@ class Store(glance_store.driver.Store):
|
|||
device = connect_volume_nfs()
|
||||
else:
|
||||
device = conn.connect_volume(connection_info)
|
||||
|
||||
# Complete the attachment (marking the volume "in-use") after
|
||||
# the connection with os-brick is complete
|
||||
self.volume_api.attachment_complete(client, attachment.id)
|
||||
if (connection_info['driver_volume_type'] == 'rbd' and
|
||||
not conn.do_local_attach):
|
||||
yield device['path']
|
||||
|
|
|
@ -291,8 +291,6 @@ class TestCinderStore(base.StoreBaseTest,
|
|||
attach_update.assert_called_once_with(
|
||||
fake_client, fake_attachment_id,
|
||||
fake_conn_info, mountpoint='glance_store')
|
||||
attach_complete.assert_called_once_with(
|
||||
fake_client, fake_attachment_id)
|
||||
attach_delete.assert_called_once_with(
|
||||
fake_client, fake_attachment_id)
|
||||
|
||||
|
|
|
@ -324,8 +324,6 @@ class TestMultiCinderStore(base.MultiStoreBaseTest,
|
|||
attach_update.assert_called_once_with(
|
||||
fake_client, fake_attachment_id,
|
||||
fake_conn_info, mountpoint='glance_store')
|
||||
attach_complete.assert_called_once_with(
|
||||
fake_client, fake_attachment_id)
|
||||
attach_delete.assert_called_once_with(
|
||||
fake_client, fake_attachment_id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue