Fix check_instance_shared_storage() call
In the RPC 6.0 bump, we re-ordered the data and instance parameters in the client, without changing the order of the caller. This causes us to pass the instance to the virt driver call instead of the data structure, thus failing the check all the time (and barfing a traceback). This just fixes that re-ordering. Since all of our direct testing of this is done using dispatch-by-name, we didn't see a unit test fail because of it, but the error was visible in the logs of an integration run. There is one evacuate test that asserts the ordering is as we expect, which this fixes. Given the time constraints of RC1, I'm considering that to be enough coverage, but we probably need a better test that covers the seam between manager and rpcapi here. Change-Id: Ie7e06776315e5e82e7d320919f1781fa2164398a Closes-Bug: #1921399
This commit is contained in:
parent
572ae578bb
commit
4a285b1fb9
|
@ -794,7 +794,7 @@ class ComputeManager(manager.Manager):
|
||||||
if data:
|
if data:
|
||||||
shared_storage = (self.compute_rpcapi.
|
shared_storage = (self.compute_rpcapi.
|
||||||
check_instance_shared_storage(context,
|
check_instance_shared_storage(context,
|
||||||
instance, data, host=host))
|
data, instance=instance, host=host))
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
LOG.debug('Hypervisor driver does not support '
|
LOG.debug('Hypervisor driver does not support '
|
||||||
'instance shared storage check, '
|
'instance shared storage check, '
|
||||||
|
|
|
@ -7654,8 +7654,9 @@ class ComputeTestCase(BaseTestCase,
|
||||||
mock_get_blk.assert_called_once_with(fake_context, evacuated_instance)
|
mock_get_blk.assert_called_once_with(fake_context, evacuated_instance)
|
||||||
mock_check_local.assert_called_once_with(fake_context,
|
mock_check_local.assert_called_once_with(fake_context,
|
||||||
evacuated_instance)
|
evacuated_instance)
|
||||||
mock_check.assert_called_once_with(fake_context, evacuated_instance,
|
mock_check.assert_called_once_with(fake_context,
|
||||||
{'filename': 'tmpfilename'},
|
{'filename': 'tmpfilename'},
|
||||||
|
instance=evacuated_instance,
|
||||||
host=None)
|
host=None)
|
||||||
mock_check_clean.assert_called_once_with(fake_context,
|
mock_check_clean.assert_called_once_with(fake_context,
|
||||||
{'filename': 'tmpfilename'})
|
{'filename': 'tmpfilename'})
|
||||||
|
|
Loading…
Reference in New Issue