Merge "compute: Use long_rpc_timeout in reserve_block_device_name"
This commit is contained in:
@@ -1170,7 +1170,9 @@ class ComputeAPI(object):
|
|||||||
version = '5.0'
|
version = '5.0'
|
||||||
client = self.router.client(ctxt)
|
client = self.router.client(ctxt)
|
||||||
cctxt = client.prepare(server=_compute_host(None, instance),
|
cctxt = client.prepare(server=_compute_host(None, instance),
|
||||||
version=version)
|
version=version,
|
||||||
|
call_monitor_timeout=CONF.rpc_response_timeout,
|
||||||
|
timeout=CONF.long_rpc_timeout)
|
||||||
return cctxt.call(ctxt, 'reserve_block_device_name', **kw)
|
return cctxt.call(ctxt, 'reserve_block_device_name', **kw)
|
||||||
|
|
||||||
def backup_instance(self, ctxt, instance, image_id, backup_type,
|
def backup_instance(self, ctxt, instance, image_id, backup_type,
|
||||||
|
@@ -32,6 +32,7 @@ Operations with RPC calls that utilize this value:
|
|||||||
* image pre-caching
|
* image pre-caching
|
||||||
* snapshot-based / cross-cell resize
|
* snapshot-based / cross-cell resize
|
||||||
* resize / cold migration
|
* resize / cold migration
|
||||||
|
* volume attach
|
||||||
|
|
||||||
Related options:
|
Related options:
|
||||||
|
|
||||||
|
@@ -617,10 +617,12 @@ class ComputeRpcAPITestCase(test.NoDBTestCase):
|
|||||||
limits=None, request_spec=None, version='5.0')
|
limits=None, request_spec=None, version='5.0')
|
||||||
|
|
||||||
def test_reserve_block_device_name(self):
|
def test_reserve_block_device_name(self):
|
||||||
|
self.flags(long_rpc_timeout=1234)
|
||||||
self._test_compute_api('reserve_block_device_name', 'call',
|
self._test_compute_api('reserve_block_device_name', 'call',
|
||||||
instance=self.fake_instance_obj, device='device',
|
instance=self.fake_instance_obj, device='device',
|
||||||
volume_id='id', disk_bus='ide', device_type='cdrom',
|
volume_id='id', disk_bus='ide', device_type='cdrom',
|
||||||
tag='foo', multiattach=True, version='5.0',
|
tag='foo', multiattach=True, version='5.0',
|
||||||
|
timeout=1234, call_monitor_timeout=60,
|
||||||
_return_value=objects_block_dev.BlockDeviceMapping())
|
_return_value=objects_block_dev.BlockDeviceMapping())
|
||||||
|
|
||||||
def test_refresh_instance_security_rules(self):
|
def test_refresh_instance_security_rules(self):
|
||||||
|
Reference in New Issue
Block a user