Change neutron backend's timeout in haproxy to 10 minutes

When client makes some heavy API requests to the Neutron API, like
e.g. some bulk request to create many ports at once it may happen that
Neutron will process the request for much longer than 2 minutes, which
is default server timeout in the haproxy's configuration for backends.
It happens e.g. with Kuryr.

Because of that, haproxy returns to the client HTTP 504 but Neutron API
is still processing API requests and finally it finishes properly.
But client may then try to retry to request which failed with 504 error
thus finally it may end up with duplicated resources created.

To avoid that, this patch increases server timeout for the neutron api
backend to 10 minutes.

Conflicts:
    manifests/haproxy.pp

Closes: rhbz#2083245
Change-Id: I0b59053618247d2a6d62d1c9e69173f3ff1d2922
(cherry picked from commit bb002c9d97)
(cherry picked from commit 47e76e9d6e)
This commit is contained in:
Slawek Kaplonski 2022-05-30 13:20:38 +00:00 committed by Takashi Kajinami
parent 941ad1a056
commit d82e0da5a7

View File

@ -985,6 +985,10 @@ class tripleo::haproxy (
public_ssl_port => $ports[neutron_api_ssl_port],
service_network => $neutron_network,
member_options => union($haproxy_member_options, $internal_tls_member_options),
listen_options => merge($default_listen_options, {
'timeout client' => '10m',
'timeout server' => '10m',
}),
}
}