From 47e76e9d6e16028c0e45f84f5741fb480d81e7ae Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Mon, 30 May 2022 13:20:38 +0000 Subject: [PATCH] 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. Closes: rhbz#2083245 Change-Id: I0b59053618247d2a6d62d1c9e69173f3ff1d2922 (cherry picked from commit bb002c9d972411dc9baff0556c0810a3003b8d78) --- manifests/haproxy.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index d19a7f14d..b8de6af00 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -866,11 +866,13 @@ class tripleo::haproxy ( if $neutron { $neutron_frontend_opts = { - 'option' => [ 'httplog', 'forwardfor' ] + 'timeout client' => '10m', + 'option' => [ 'httplog', 'forwardfor' ] } $neutron_backend_opts = { - 'balance' => $haproxy_lb_mode_longrunning, - 'option' => [ 'httpchk GET /healthcheck' ] + 'timeout server' => '10m', + 'balance' => $haproxy_lb_mode_longrunning, + 'option' => [ 'httpchk GET /healthcheck' ] } $neutron_listen_opts = merge_hash_values($neutron_frontend_opts, $neutron_backend_opts)