From 021419d6656d5ddd73880e6fcc6b7bf633de7454 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 7 May 2018 09:00:00 -0700 Subject: [PATCH] Use oslo.messaging per-call monitoring This change makes nova configure oslo.messaging's active call monitoring feature if the operator increases the rpc_response_timeout configuration option beyond the default of 60 seconds. If this happens, oslo.messaging will heartbeat actively-running calls to indicate that they are still running, avoiding a false timeout at the shorter interval, while still detecting actual dead-service failures before the longer timeout value. In addition, this adds a long_rpc_timeout configuration option that we can use for known-to-run-long operations separately from the base rpc_response_timeout value, and pre_live_migration() is changed to use this, as it is known to suffer from early false timeouts. Depends-On: Iecb7bef61b3b8145126ead1f74dbaadd7d97b407 Change-Id: Icb0bdc6d4ce4524341e70e737eafcb25f346d197 --- lower-constraints.txt | 2 +- nova/conf/__init__.py | 2 ++ nova/tests/fixtures.py | 6 ++++-- requirements.txt | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 97a98fe81..482f9012a 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -81,7 +81,7 @@ oslo.context==2.19.2 oslo.db==4.27.0 oslo.i18n==3.15.3 oslo.log==3.36.0 -oslo.messaging==5.29.0 +oslo.messaging==6.3.0 oslo.middleware==3.31.0 oslo.policy==1.35.0 oslo.privsep==1.23.0 diff --git a/nova/conf/__init__.py b/nova/conf/__init__.py index 377435add..7649e3d66 100644 --- a/nova/conf/__init__.py +++ b/nova/conf/__init__.py @@ -55,6 +55,7 @@ from nova.conf import powervm from nova.conf import quota from nova.conf import rdp from nova.conf import remote_debug +from nova.conf import rpc from nova.conf import scheduler from nova.conf import serial_console from nova.conf import service @@ -107,6 +108,7 @@ placement.register_opts(CONF) powervm.register_opts(CONF) quota.register_opts(CONF) rdp.register_opts(CONF) +rpc.register_opts(CONF) scheduler.register_opts(CONF) serial_console.register_opts(CONF) service.register_opts(CONF) diff --git a/nova/tests/fixtures.py b/nova/tests/fixtures.py index 7aa5e816b..162f7e403 100644 --- a/nova/tests/fixtures.py +++ b/nova/tests/fixtures.py @@ -484,13 +484,15 @@ class CellDatabases(fixtures.Fixture): executor='eventlet', serializer=serializer) - def _wrap_get_client(self, target, version_cap=None, serializer=None): + def _wrap_get_client(self, target, version_cap=None, serializer=None, + call_monitor_timeout=None): """Mirror rpc.get_client() but with our special sauce.""" serializer = CheatingSerializer(serializer) return messaging.RPCClient(rpc.TRANSPORT, target, version_cap=version_cap, - serializer=serializer) + serializer=serializer, + call_monitor_timeout=call_monitor_timeout) def add_cell_database(self, connection_str, default=False): """Add a cell database to the fixture. diff --git a/requirements.txt b/requirements.txt index 5dc08840c..a4034ef58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,7 +43,7 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 oslo.db>=4.27.0 # Apache-2.0 oslo.rootwrap>=5.8.0 # Apache-2.0 -oslo.messaging>=5.29.0 # Apache-2.0 +oslo.messaging>=6.3.0 # Apache-2.0 oslo.policy>=1.35.0 # Apache-2.0 oslo.privsep>=1.23.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0