Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1933251

Summary: [RHOSP13][Octavia] 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: chrisbro <chrisbro>
Component: openstack-octaviaAssignee: Gregory Thiemonge <gthiemon>
Status: CLOSED EOL QA Contact: Omer Schwartz <oschwart>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: bshephar, gthiemon, ihrachys, lpeer, mahmad, majopela, nate.johnston, oschwart, pmannidi, rbarrott, scohen
Target Milestone: z15Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)Flags: rbarrott: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-octavia-5.1.1-0.20210304135826.ec60849.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1934431 (view as bug list) Environment:
Last Closed: 2021-08-18 08:29:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chrisbro@redhat.com 2021-02-26 10:19:23 UTC
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 1 Brendan Shephard 2021-02-28 22:21:27 UTC
Hey Chris,


Are you able to share your config file where those settings were changed?
/var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf

And is it also possible to enable debug:
crudini --set /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf DEFAULT debug true

Then recreate that LB and attach the debug logs?


I'll work on recreating the issue as well. But since you've already done it, if we can get the debug logs that might have some potentially useful information. 

The change to allow this parameter to be configured was made here:
https://opendev.org/openstack/octavia/commit/8923935df2e1677b038e01cc12a2355acff477c9

Comment 4 Brendan Shephard 2021-02-28 23:02:43 UTC
It looks like that commit might have been a DOWNSTREAM only backport. I can't see that particular path in the queens-eol branch
❯ git checkout queens-eol                                                                                                                                                                                                                ─╯
Previous HEAD position was 89a2f6e0 Fix urgent amphora two-way auth security bug
HEAD is now at 5528268e Fix uncaught DB exception when trying to get a spare amphora
    ~/Documents/slow_storage/Code/OpenStack/octavia/octavia   #queens-eol                                                                                                                                            08:48:10  ─╮
❯ ag timeout_client_data  
❯

But I can confirm that this is also an issue in upstream current as well:

(overcloud) [stack@tripleo-director templates]$ openstack loadbalancer listener show 7dc4b8da-0756-4fda-871e-e74649dfe8f3 -c name -c timeout_client_data -f yaml
name: listener1
timeout_client_data: 50000

[root@overcloud-controller-0 ~]# crudini --get /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf haproxy_amphora timeout_client_data 
200000


[root@overcloud-controller-0 ~]# podman exec -it octavia_api rpm -qa | grep octavia
python3-octavia-7.1.0-0.20210209011848.a822f30.el8.noarch
python3-ovn-octavia-provider-0.4.0-0.20210202181357.ae455d3.el8.noarch
python3-octavia-lib-2.3.0-0.20210128085215.0bc8c6a.el8.noarch
openstack-octavia-api-7.1.0-0.20210209011848.a822f30.el8.noarch
python3-octaviaclient-2.2.0-0.20201112084714.78c08ed.el8.noarch
openstack-octavia-common-7.1.0-0.20210209011848.a822f30.el8.noarch

Comment 5 Gregory Thiemonge 2021-03-01 07:28:51 UTC
Hi,

I confirm that there's a bug there (it affects upstream octavia), overriding timeout values for listeners in the config file doesn't work.

Please note that there are 2 workarounds for this issue:
- timeout values can be specified in the API during listener creation:
  openstack loadbalancer listener create --name listener1 --protocol HTTP --protocol-port 80 --timeout-client-data 200000 lb1
- timeout values can be updated in an existing listener:
  openstack loadbalancer listener set --timeout-client-data 200000 listener2

I'm working on a fix.

Comment 27 Richard Barrott 2021-06-23 00:23:51 UTC
Hi team,
Do we have any update on this?
>The packages in the previous hotfix (March) are still more recent than the packages that are provided by OSP13z16, I wonder if the hotfix can be re-applied there. I will test it.

-Richard

Comment 28 Gregory Thiemonge 2021-06-28 08:31:11 UTC
(In reply to Richard Barrott from comment #27)
> Hi team,
> Do we have any update on this?
> >The packages in the previous hotfix (March) are still more recent than the packages that are provided by OSP13z16, I wonder if the hotfix can be re-applied there. I will test it.
> 
> -Richard

Hi,

I tested it this morning, I applied the previous hotfix in OSP13z16 and verified that the listener creation uses the parameters from the configuration file, it works fine.