Skip to content

Commit f628dc9

Browse files
committed
Use CONF.long_rpc_timeout in post_live_migration_at_destination
Just like in pre_live_migration and check_can_live_migrate_destination, post_live_migration_at_destination can take a long time depending on how many volumes and ports are attached to the server, so this change makes the hard timeout use our long_rpc_timeout and the heartbeat uses the normal rpc_response_timeout. Change-Id: I289fa4658388e840dc6508ba694d02d232b37fbd
1 parent 4c37ff7 commit f628dc9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

nova/compute/rpcapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ def post_live_migration_at_destination(self, ctxt, instance,
694694
block_migration, host):
695695
version = '5.0'
696696
cctxt = self.router.client(ctxt).prepare(
697-
server=host, version=version)
697+
server=host, version=version,
698+
call_monitor_timeout=CONF.rpc_response_timeout,
699+
timeout=CONF.long_rpc_timeout)
698700
return cctxt.call(ctxt, 'post_live_migration_at_destination',
699701
instance=instance, block_migration=block_migration)
700702

nova/tests/unit/compute/test_rpcapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,11 @@ def test_live_migration_abort(self):
342342
migration_id='1', version='5.0')
343343

344344
def test_post_live_migration_at_destination(self):
345+
self.flags(long_rpc_timeout=1234)
345346
self._test_compute_api('post_live_migration_at_destination', 'call',
346347
instance=self.fake_instance_obj,
347-
block_migration='block_migration', host='host', version='5.0')
348+
block_migration='block_migration', host='host', version='5.0',
349+
timeout=1234, call_monitor_timeout=60)
348350

349351
def test_pause_instance(self):
350352
self._test_compute_api('pause_instance', 'cast',

0 commit comments

Comments
 (0)