Bug 1635261

Summary: Unreliable access to DB information
Product: Red Hat OpenStack Reporter: Luis Tomas Bolivar <ltomasbo>
Component: openstack-octaviaAssignee: Luis Tomas Bolivar <ltomasbo>
Status: CLOSED ERRATA QA Contact: Bruna Bonguardo <bbonguar>
Severity: medium Docs Contact:
Priority: medium    
Version: 15.0 (Stein)CC: ihrachys, jjoyce, lpeer, majopela, sclewis
Target Milestone: Upstream M1Keywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-octavia-4.0.2-0.20190614125808.4b912e4.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:19:11 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:
Bug Depends On:    
Bug Blocks: 1623087    

Description Luis Tomas Bolivar 2018-10-02 13:29:50 UTC
When creating a pool with an associated listener_id, sometimes this information is set, and sometimes it is not. Problem comes from https://github.com/openstack/octavia/blob/master/octavia/api/v2/controllers/pool.py#L244-L245 not setting the listeners property on db_pool pool object even if it is passed.

Pool model (https://github.com/openstack/octavia/blob/master/octavia/db/models.py#L257) is getting the listener information through a property that relies on the information existing on the listener (https://github.com/openstack/octavia/blob/master/octavia/db/models.py#L448).

I checked that even though listener.update gets executed here: https://github.com/openstack/octavia/blob/master/octavia/db/repositories.py#L226-L228

The subsequent pool.get call https://github.com/openstack/octavia/blob/master/octavia/db/repositories.py#L229 is not (always) getting the listeners information.

I tried making it part of the same transaction but it is not always helping: https://review.openstack.org/#/c/604152/

The next workaround solves the issue, though it is not fixing the initial problem of not accessing the latest information on the DB:
https://review.openstack.org/#/c/604417

Comment 6 errata-xmlrpc 2019-09-21 11:19:11 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/RHEA-2019:2811