fe26a52024
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
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
# Copyright 2018 OpenStack Foundation
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
from oslo_config import cfg
|
|
|
|
rpc_opts = [
|
|
cfg.IntOpt("long_rpc_timeout",
|
|
default=1800,
|
|
help="""
|
|
This option allows setting an alternate timeout value for RPC calls
|
|
that have the potential to take a long time. If set, RPC calls to
|
|
other services will use this value for the timeout (in seconds)
|
|
instead of the global rpc_response_timeout value.
|
|
|
|
Operations with RPC calls that utilize this value:
|
|
|
|
* live migration
|
|
|
|
Related options:
|
|
|
|
* rpc_response_timeout
|
|
"""),
|
|
]
|
|
|
|
|
|
ALL_OPTS = rpc_opts
|
|
|
|
|
|
def register_opts(conf):
|
|
conf.register_opts(ALL_OPTS)
|
|
|
|
|
|
def list_opts():
|
|
return {'DEFAULT': ALL_OPTS}
|