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<Allain.legacy@windriver.com>

Change-Id: I170113c2946cc95308edcb1a703a99c71e50b6f9
Related-Bug: #1805769
Story: 2004456
Task: 28171
This commit is contained in:
nicky 2018-12-19 16:07:05 +08:00 committed by nicky
parent 4acd609a4a
commit f1592c42d9
2 changed files with 8 additions and 0 deletions

View File

@ -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.')),
]

View File

@ -0,0 +1,5 @@
---
features:
- Add config option ``rpc_response_max_timeout``
to configure the maximum time waiting for an
RPC response.