Browse Source

Merge "compute: Use long_rpc_timeout in reserve_block_device_name" into stable/rocky

changes/25/698525/1
Zuul 2 months ago
parent
commit
d9474dde72
3 changed files with 6 additions and 1 deletions
  1. +3
    -1
      nova/compute/rpcapi.py
  2. +1
    -0
      nova/conf/rpc.py
  3. +2
    -0
      nova/tests/unit/compute/test_rpcapi.py

+ 3
- 1
nova/compute/rpcapi.py View File

@@ -919,7 +919,9 @@ class ComputeAPI(object):
version = '5.0'
client = self.router.client(ctxt)
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)

def backup_instance(self, ctxt, instance, image_id, backup_type,

+ 1
- 0
nova/conf/rpc.py View File

@@ -28,6 +28,7 @@ Operations with RPC calls that utilize this value:

* live migration
* scheduling
* volume attach

Related options:


+ 2
- 0
nova/tests/unit/compute/test_rpcapi.py View File

@@ -410,10 +410,12 @@ class ComputeRpcAPITestCase(test.NoDBTestCase):
limits=None, request_spec=None, version='5.0')

def test_reserve_block_device_name(self):
self.flags(long_rpc_timeout=1234)
self._test_compute_api('reserve_block_device_name', 'call',
instance=self.fake_instance_obj, device='device',
volume_id='id', disk_bus='ide', device_type='cdrom',
tag='foo', multiattach=True, version='5.0',
timeout=1234, call_monitor_timeout=60,
_return_value=objects_block_dev.BlockDeviceMapping())

def test_refresh_instance_security_rules(self):

Loading…
Cancel
Save