Nova can occasionally fail to carry out server actions which require
calls to neutron API if haproxy happens to close a connection after
idle time if an incoming request attempts to re-use the connection
while it is being torn down.
In order to be more resilient to this scenario, we can add a config
option for neutron client to retry requests, similar to our existing
CONF.cinder.http_retries and CONF.glance.num_retries options.
Because we create our neutron client [1] using a keystoneauth1 session
[2], we can set the 'connect_retries' keyword argument to let
keystoneauth1 handle connection retries.
Reviewed: https:/ /review. opendev. org/715010 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=71971c20629 2232fff389dedbf 412d780f0a557a
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 71971c206292232 fff389dedbf412d 780f0a557a
Author: melanie witt <email address hidden>
Date: Wed Mar 11 02:26:52 2020 +0000
Add config option for neutron client retries
Nova can occasionally fail to carry out server actions which require
calls to neutron API if haproxy happens to close a connection after
idle time if an incoming request attempts to re-use the connection
while it is being torn down.
In order to be more resilient to this scenario, we can add a config cinder. http_retries and CONF.glance. num_retries options.
option for neutron client to retry requests, similar to our existing
CONF.
Because we create our neutron client [1] using a keystoneauth1 session
[2], we can set the 'connect_retries' keyword argument to let
keystoneauth1 handle connection retries.
Closes-Bug: #1866937
[1] https:/ /github. com/openstack/ nova/blob/ 57459c3429ce629 75cebd0cd709367 85bdf2f3a4/ nova/network/ neutron. py#L226- L237 /docs.openstack .org/keystoneau th/latest/ api/keystoneaut h1.session. html#keystoneau th1.session. Session
[2] https:/
Change-Id: Ifb3afb13aff7e1 03c2e80ade817d0 e63b624604a d162e3e42879580 7386abf1cb)
(cherry picked from commit 0e34ed9733e3f23