Bug 1934436

Summary: Creating listener with default edited timeout_* of something other than 50000 configured in octavia.conf does not work as expected.
Product: Red Hat OpenStack Reporter: Gregory Thiemonge <gthiemon>
Component: openstack-octaviaAssignee: Gregory Thiemonge <gthiemon>
Status: CLOSED ERRATA QA Contact: Bruna Bonguardo <bbonguar>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: bbonguar, bshephar, chrisbro, dhill, gferrazs, gthiemon, ihrachys, lpeer, mahmad, majopela, oschwart, pkundal, rbarrott, scohen
Target Milestone: z7Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-octavia-5.0.3-1.20210624083613.8c32d2e.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1934431 Environment:
Last Closed: 2021-12-09 20:18:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1934431    
Bug Blocks:    

Description Gregory Thiemonge 2021-03-03 09:17:33 UTC
+++ This bug was initially created as a clone of Bug #1934431 +++

+++ This bug was initially created as a clone of Bug #1933251 +++

Description of problem:
  Octaiva listener creation is not using the timeout_* specified in the octavia configuration.
~~~
timeout_client_data=200000    
timeout_member_connect=5000
timeout_member_data=200000
timeout_tcp_inspect=0
~~~
Default for `timeout_client_data` and `timeout_memebr_data` are 50000 in the `octavia.conf`


Version-Release number of selected component (if applicable):
Red Hat OpenStack Platform release 13.0.14 (Queens)

How reproducible:
Always

Steps to Reproduce:
1.Configure the `timeout_client_data` to 200000 (20 mins) in `/var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf` on the all controllers.
2.Restart all the octavia containers.
3.Create a LB
4.Create listener as per below commands. 

Commands
~~~
openstack loadbalancer create --name lb1 --vip-subnet-id private
openstack loadbalancer listener create --name listener1 --protocol HTTP --protocol-port 80 lb1
~~~

We can see that the timeout configured in the octavia configuration did not take effect.

~~~
(overcloud) [stack@undercloud-0 ~]$ openstack loadbalancer listener show e465904a-7a25-4d9a-a77a-a4472487f12a
+-----------------------------+--------------------------------------+
| Field                       | Value                                |
+-----------------------------+--------------------------------------+
| admin_state_up              | True                                 |
| connection_limit            | -1                                   |
| created_at                  | 2021-02-26T02:54:10                  |
| default_pool_id             | None                                 |
| default_tls_container_ref   | None                                 |
| description                 |                                      |
| id                          | e465904a-7a25-4d9a-a77a-a4472487f12a |
| insert_headers              | None                                 |
| l7policies                  |                                      |
| loadbalancers               | 649d7397-ca71-4844-a081-4c48fc3fb665 |
| name                        | listener1                            |
| operating_status            | ONLINE                               |
| project_id                  | 3c334781c3aa4ed3be6d247f7f5b0d8c     |
| protocol                    | HTTP                                 |
| protocol_port               | 80                                   |
| provisioning_status         | ACTIVE                               |
| sni_container_refs          | []                                   |
| timeout_client_data         | 50000                                |   <---HERE  Still 50000
| timeout_member_connect      | 5000                                 |
| timeout_member_data         | 50000                                |   <---HERE  Still 50000
| timeout_tcp_inspect         | 0                                    |
| updated_at                  | 2021-02-26T02:54:20                  |
| client_ca_tls_container_ref | None                                 |
| client_authentication       | NONE                                 |
| client_crl_container_ref    | None                                 |
| allowed_cidrs               | None                                 |
+-----------------------------+--------------------------------------+
~~~
DO NOTE:
  Creating a listener with `--timeout-client-data 200000` works as expected.

Expected results:
  These timeout settings specified in the configuration should be used as the defaults not `50000`. 

Additional info:
  Also not that this same issue is happening on Openstack 16.1
    Red Hat OpenStack Platform release 16.1.3 GA (Train)

Comment 4 Gregory Thiemonge 2021-07-15 06:19:50 UTC
*** Bug 1982254 has been marked as a duplicate of this bug. ***

Comment 25 Omer Schwartz 2021-11-23 10:03:18 UTC
Verified in:
(tester) [stack@undercloud-0 ~]$ cat /var/lib/rhos-release/latest-installed
16.1  -p RHOS-16.1-RHEL-8-20211112.n.1

Before change:
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_1 sudo cat /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf | grep timeout_
Warning: Permanently added '192.168.24.28' (ECDSA) to the list of known hosts.
timeout_client_data=50000
timeout_member_connect=5000
timeout_member_data=50000
timeout_tcp_inspect=0
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_2 sudo cat /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf | grep timeout_
Warning: Permanently added '192.168.24.10' (ECDSA) to the list of known hosts.
timeout_client_data=50000
timeout_member_connect=5000
timeout_member_data=50000
timeout_tcp_inspect=0
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_0 sudo cat /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf | grep timeout_
Warning: Permanently added '192.168.24.24' (ECDSA) to the list of known hosts.
timeout_client_data=50000
timeout_member_connect=5000
timeout_member_data=50000
timeout_tcp_inspect=0

1.Configure both the `timeout_client_data` & `timeout_member_data` to 200000 (20 mins) in `/var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf` on the all controllers:
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_1 sudo cat /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf | grep timeout_
Warning: Permanently added '192.168.24.28' (ECDSA) to the list of known hosts.
timeout_client_data=200000
timeout_member_connect=5000
timeout_member_data=200000
timeout_tcp_inspect=0
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_2 sudo cat /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf | grep timeout_
Warning: Permanently added '192.168.24.10' (ECDSA) to the list of known hosts.
timeout_client_data=200000
timeout_member_connect=5000
timeout_member_data=200000
timeout_tcp_inspect=0
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_0 sudo cat /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf | grep timeout_
Warning: Permanently added '192.168.24.24' (ECDSA) to the list of known hosts.
timeout_client_data=200000
timeout_member_connect=5000
timeout_member_data=200000
timeout_tcp_inspect=0

2. Restart all the octavia containers:
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_1 sudo podman restart octavia_api octavia_driver_agent octavia_health_manager octavia_housekeeping octavia_worker
Warning: Permanently added '192.168.24.28' (ECDSA) to the list of known hosts.
19a7b479d34e5451c338e4aaaeb67e5cc93543f8ec5316e1a6011af3a230d533
646bc259143db3f4a7ffb415c2e30b79197ddff25b43169aef44104972b7dfd6
b62e8cb3d077cdfc5b68fceab16e8360c1109d9bccfdb673de1fc884d742f42f
306db1e93abc0fef4f25e4a82df700260186e9cf10ca45bbe011adab8c95c34c
643319394ffe678f9122e5d9f5cecc9060d8d9ee7ecd38fb25e1967f557170ef
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_2 sudo podman restart octavia_api octavia_driver_agent octavia_health_manager octavia_housekeeping octavia_worker
Warning: Permanently added '192.168.24.10' (ECDSA) to the list of known hosts.
c5ff2d1de4321cfd1dc61b2e49dc34d1f61a442d05f353d7d54131e065d2a856
d012f38fbc98f0c2953b72ef330552083a0fcd95e6b1e5cb1d00900fa3bea268
88c45a3292595f459529961f66d9285dc60a1189b26de685d5e7b5d6398be147
dbdff679e32986d9cd752e41eef5292759da4c35b0db8e267bae257499210ad8
08ade0428859891a60c27a6642568f71a597626ae40c7cd761e07cfecb4ba302
(undercloud) [stack@undercloud-0 ~]$ ssh heat-admin@$CONTROLLER_0 sudo podman restart octavia_api octavia_driver_agent octavia_health_manager octavia_housekeeping octavia_worker
Warning: Permanently added '192.168.24.24' (ECDSA) to the list of known hosts.
30dfd11867d19664fddb15ec530488f93fea12a454ef45d6f9a0b0889424962f
ec362dc38580d2c0a69bad4f9ed2dc1706c7dc1161c5890c3ea4670051097ffa
848ebafe2e65087bf82890499e35491028df521d072eee77b48425d0be58a388
d0245f1db6307a22342e924fade1b7c525fadc02651d503fb0932d7bff89fe4c
d807753260986184a07b9c0f37e364acb3ce87787a9b842862bcdf09fb90b8c9

3.Create a LB:
(tester) [stack@undercloud-0 ~]$ openstack loadbalancer create --name lb1 --vip-subnet-id int_sub
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| admin_state_up      | True                                 |
| created_at          | 2021-11-23T09:57:37                  |
| description         |                                      |
| flavor_id           | None                                 |
| id                  | a542511c-81f5-4ced-a1cd-37e9df93b73e |
| listeners           |                                      |
| name                | lb1                                  |
| operating_status    | OFFLINE                              |
| pools               |                                      |
| project_id          | 35093968e0974aa38286f9e3f3844c94     |
| provider            | amphora                              |
| provisioning_status | PENDING_CREATE                       |
| updated_at          | None                                 |
| vip_address         | 192.168.1.47                         |
| vip_network_id      | 41fdec99-be5a-418a-bbe1-00243ec6dc0b |
| vip_port_id         | 51241662-f983-4603-9333-ccedc272172b |
| vip_qos_policy_id   | None                                 |
| vip_subnet_id       | 9f61cd95-6530-48db-a8b1-5cfccdc1a3b9 |
+---------------------+--------------------------------------+
(tester) [stack@undercloud-0 ~]$ openstack loadbalancer listener create --name listener1 --protocol HTTP --protocol-port 80 lb1
+-----------------------------+--------------------------------------+
| Field                       | Value                                |
+-----------------------------+--------------------------------------+
| admin_state_up              | True                                 |
| connection_limit            | -1                                   |
| created_at                  | 2021-11-23T09:59:55                  |
| default_pool_id             | None                                 |
| default_tls_container_ref   | None                                 |
| description                 |                                      |
| id                          | a0f0725c-4af1-41c2-ad1a-afede8698a2a |
| insert_headers              | None                                 |
| l7policies                  |                                      |
| loadbalancers               | a542511c-81f5-4ced-a1cd-37e9df93b73e |
| name                        | listener1                            |
| operating_status            | OFFLINE                              |
| project_id                  | 35093968e0974aa38286f9e3f3844c94     |
| protocol                    | HTTP                                 |
| protocol_port               | 80                                   |
| provisioning_status         | PENDING_CREATE                       |
| sni_container_refs          | []                                   |
| timeout_client_data         | 200000                               |
| timeout_member_connect      | 5000                                 |
| timeout_member_data         | 200000                               |
| timeout_tcp_inspect         | 0                                    |
| updated_at                  | None                                 |
| client_ca_tls_container_ref | None                                 |
| client_authentication       | NONE                                 |
| client_crl_container_ref    | None                                 |
| allowed_cidrs               | None                                 |
+-----------------------------+--------------------------------------+
(tester) [stack@undercloud-0 ~]$ openstack loadbalancer listener show listener1
+-----------------------------+--------------------------------------+
| Field                       | Value                                |
+-----------------------------+--------------------------------------+
| admin_state_up              | True                                 |
| connection_limit            | -1                                   |
| created_at                  | 2021-11-23T09:59:55                  |
| default_pool_id             | None                                 |
| default_tls_container_ref   | None                                 |
| description                 |                                      |
| id                          | a0f0725c-4af1-41c2-ad1a-afede8698a2a |
| insert_headers              | None                                 |
| l7policies                  |                                      |
| loadbalancers               | a542511c-81f5-4ced-a1cd-37e9df93b73e |
| name                        | listener1                            |
| operating_status            | ONLINE                               |
| project_id                  | 35093968e0974aa38286f9e3f3844c94     |
| protocol                    | HTTP                                 |
| protocol_port               | 80                                   |
| provisioning_status         | ACTIVE                               |
| sni_container_refs          | []                                   |
| timeout_client_data         | 200000                               |
| timeout_member_connect      | 5000                                 |
| timeout_member_data         | 200000                               |
| timeout_tcp_inspect         | 0                                    |
| updated_at                  | 2021-11-23T10:00:03                  |
| client_ca_tls_container_ref | None                                 |
| client_authentication       | NONE                                 |
| client_crl_container_ref    | None                                 |
| allowed_cidrs               | None                                 |
+-----------------------------+--------------------------------------+

We can see that the listener is created with both timeout_client_data & timeout_member_data of 200000 as expected.

Moving the bug to VERIFIED.

Comment 32 errata-xmlrpc 2021-12-09 20:18:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.7 (Train) bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:3762