Bug 1749344

Summary: [OSP15][Octavia]- house keeper is not deleting DB entries for deleted LBs according to the configured times.
Product: Red Hat OpenStack Reporter: Alexander Stafeyev <astafeye>
Component: openstack-octaviaAssignee: Gregory Thiemonge <gthiemon>
Status: CLOSED ERRATA QA Contact: Bruna Bonguardo <bbonguar>
Severity: medium Docs Contact:
Priority: medium    
Version: 15.0 (Stein)CC: cgoncalves, gthiemon, ihrachys, lpeer, majopela, scohen
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-octavia-4.1.1-0.20191128103129.567a388.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-05 11:58:53 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 Alexander Stafeyev 2019-09-05 12:04:55 UTC
Description of problem:
Deleted VMs are not deleted according to the configured expiry time. 


()[root@controller-2 /]# exit
[root@controller-2 ~]# grep -i expir /var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf 
# Amphora expiry age in seconds. Default is 1 week
amphora_expiry_age = 60
# Load balancer expiry age in seconds. Default is 1 week
load_balancer_expiry_age = 60
[root@controller-2 ~]# 



http://paste.openstack.org/show/771287/


How reproducible:
100%

Steps to Reproduce:
1. Change the amphora and LB expiry time to 60 ( instead of 604800)
2. restart he octavia housekeeper docker. 
3. create and delete LB 
4. Wait 60 seconds and check the DB octavia LB table . 


Actual results:
Entries are not deleted .

Expected results:
Entries should be deleted. 


Additional info:


http://paste.openstack.org/show/771287/

podman exec -it galera-bundle-podman-2 /bin/bash

()[root@controller-2 /]# date 
Thu Sep  5 11:59:59 UTC 2019
()[root@controller-2 /]# mysql octavia -u octavia -pHSGmfFYrhn9HYObpHQpVJjd83  -e "select * from  load_balancer" | grep HK
85cdc4a3fc924852aa7c3d69efdb4ebb	5c5e99c6-fab6-4037-89a6-9b3acc38726b	HK-test	NULL	DELETED	ONLINE	1	SINGLE	NULL2019-09-05 11:40:42	2019-09-05 11:44:13	amphora	NULL
85cdc4a3fc924852aa7c3d69efdb4ebb	8fbc70bf-3491-47f1-ad71-9e8a57890aca	HK-test	NULL	DELETED	ONLINE	1	SINGLE	NULL2019-09-05 11:41:02	2019-09-05 11:44:17	amphora	NULL
85cdc4a3fc924852aa7c3d69efdb4ebb	bd48748f-300a-4c29-b3b2-60af521bce4a	HK-test	NULL	DELETED	ONLINE	1	SINGLE	NULL2019-09-05 11:40:53	2019-09-05 11:44:14	amphora	NULL
()[root@controller-2 /]# 


Those LBs are deleted for more then 10 min. 

openstack LB table is empty, openstack amphora table is empty. 


https://opendev.org/openstack/octavia/src/branch/master/octavia/db/repositories.py#L199

Comment 8 errata-xmlrpc 2020-03-05 11:58:53 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, 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/RHSA-2020:0721