From f1592c42d9649e8da952021aa1f6e7a4a127cd48 Mon Sep 17 00:00:00 2001 From: nicky Date: Wed, 19 Dec 2018 16:07:05 +0800 Subject: [PATCH] Add a new configuration parameter rpc_response_max_timeout A new parameter rpc_response_max_timeout is added and registered into neutron.conf. The rpc_response_max_timeout plays a role of the ceiling of timeout seconds when waiting for the response of a remote rpc server. During an RPC call, the waiting time starts from the existing parameter rpc_response_timeout(default 60s) and doubled each time until it reaches the ceiling which is currently set as 10 times rpc_response_timeout. It seems to be less flexible since user cannot directly change the ceiling value unless he/she changes the rpc_response_timeout. By adding rpc_response_max_timeout, user can now modify it without changing any other parameters. Co-Authored-By: Allain Legacy Change-Id: I170113c2946cc95308edcb1a703a99c71e50b6f9 Related-Bug: #1805769 Story: 2004456 Task: 28171 --- neutron/conf/service.py | 3 +++ ...add-rpc_response_max_timeout-option-cfaad5ef6af31632.yaml | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/add-rpc_response_max_timeout-option-cfaad5ef6af31632.yaml diff --git a/neutron/conf/service.py b/neutron/conf/service.py index 6c8626d7601..d68e0229b5f 100644 --- a/neutron/conf/service.py +++ b/neutron/conf/service.py @@ -39,6 +39,9 @@ service_opts = [ help=_('Range of seconds to randomly delay when starting the ' 'periodic task scheduler to reduce stampeding. ' '(Disable by setting to 0)')), + cfg.IntOpt('rpc_response_max_timeout', + default=600, + help=_('Maximum seconds to wait for a response from a call.')), ] diff --git a/releasenotes/notes/add-rpc_response_max_timeout-option-cfaad5ef6af31632.yaml b/releasenotes/notes/add-rpc_response_max_timeout-option-cfaad5ef6af31632.yaml new file mode 100644 index 00000000000..a3aeccbc170 --- /dev/null +++ b/releasenotes/notes/add-rpc_response_max_timeout-option-cfaad5ef6af31632.yaml @@ -0,0 +1,5 @@ +--- +features: + - Add config option ``rpc_response_max_timeout`` + to configure the maximum time waiting for an + RPC response.