Merge "Fix Share Migration KeyError on dict.pop"
This commit is contained in:
commit
4b575e3282
@ -104,7 +104,7 @@ class DataManager(manager.Manager):
|
||||
context, share_ref, share_instance_id, dest_share_instance_id)
|
||||
raise exception.ShareDataCopyFailed(reason=msg)
|
||||
finally:
|
||||
self.busy_tasks_shares.pop(share_id)
|
||||
self.busy_tasks_shares.pop(share_id, None)
|
||||
|
||||
LOG.info(_LI(
|
||||
"Completed copy operation of migrating share content from share "
|
||||
|
@ -86,7 +86,8 @@ class DataManagerTestCase(test.TestCase):
|
||||
self.mock_object(data_utils, 'Copy',
|
||||
mock.Mock(return_value='fake_copy'))
|
||||
|
||||
self.manager.busy_tasks_shares[self.share['id']] = 'fake_copy'
|
||||
if exc is None:
|
||||
self.manager.busy_tasks_shares[self.share['id']] = 'fake_copy'
|
||||
|
||||
self.mock_object(self.manager, '_copy_share_data',
|
||||
mock.Mock(side_effect=exc))
|
||||
|
Loading…
Reference in New Issue
Block a user