From 719cc1cc28c32db8225cf5f2b387dc2315ae9ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dulko?= Date: Wed, 13 Jun 2018 20:00:03 +0200 Subject: [PATCH] Provide data timeouts for K8s API LB Octavia (and LBaaS v2) defaults to 50 seconds as data timeout for connections. This is obviously not acceptable for our Watcher connections that hang watching on K8s API for a long time. As Octavia recently made this configurable, this commit extends that timeout to an hour, easily enough to run of all Tempest tests. Change-Id: I3fe24355acf0943d78f2d9760877ad594f36715e Closes-Bug: 1773340 --- devstack/lib/kuryr_kubernetes | 5 +++++ devstack/plugin.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/devstack/lib/kuryr_kubernetes b/devstack/lib/kuryr_kubernetes index b722d69e5..91dcc4b57 100644 --- a/devstack/lib/kuryr_kubernetes +++ b/devstack/lib/kuryr_kubernetes @@ -913,6 +913,7 @@ function create_load_balancer { # name: Name to give to the load balancer listener. # protocol: Whether it is HTTP, HTTPS, TCP, etc. # port: The TCP port number to listen to. +# data_timeouts: Octavia's timeouts for client and server inactivity. # lb: Id or name of the Load Balancer we want to add the Listener to. # project_id: Id of the the project where this listener belongs function create_load_balancer_listener { @@ -920,6 +921,7 @@ function create_load_balancer_listener { local protocol local port local lb + local data_timeouts local max_timeout local project_id @@ -928,6 +930,7 @@ function create_load_balancer_listener { port="$3" lb="$4" project_id="$5" + data_timeouts="$6" max_timeout=1200 # Octavia needs the LB to be active for the listener @@ -937,6 +940,8 @@ function create_load_balancer_listener { openstack loadbalancer listener create --name "$name" \ --protocol "$protocol" \ --protocol-port "$port" \ + --timeout-client-data "$data_timeouts" \ + --timeout-member-data "$data_timeouts" \ "$lb" else neutron lbaas-listener-create --name "$name" \ diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 3d925607e..74a9ef472 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -237,7 +237,7 @@ function create_k8s_api_service { create_load_balancer "$lb_name" "$KURYR_NEUTRON_DEFAULT_SERVICE_SUBNET"\ "$project_id" "$k8s_api_clusterip" - create_load_balancer_listener default/kubernetes:443 HTTPS 443 "$lb_name" "$project_id" + create_load_balancer_listener default/kubernetes:443 HTTPS 443 "$lb_name" "$project_id" 3600000 create_load_balancer_pool default/kubernetes:443 HTTPS ROUND_ROBIN \ default/kubernetes:443 "$project_id" "$lb_name"