Bug 1721397

Summary: RHEL8 Amphora image fails tempest tests due to a Python3 issue
Product: Red Hat OpenStack Reporter: Nir Magnezi <nmagnezi>
Component: openstack-octaviaAssignee: Carlos Goncalves <cgoncalves>
Status: CLOSED ERRATA QA Contact: Bruna Bonguardo <bbonguar>
Severity: high Docs Contact:
Priority: high    
Version: 15.0 (Stein)CC: astafeye, cgoncalves, ihrachys, lpeer, majopela, scohen, twilson
Target Milestone: betaKeywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-octavia-4.0.2-0.20190618180410.0598806.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:23:21 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:
Attachments:
Description Flags
tempest.log none

Description Nir Magnezi 2019-06-18 08:19:28 UTC
Description of problem:
================
The RHEL8 based amphora image currently fails on five tempest tests:

octavia_tempest_plugin.tests.api.v2.test_l7policy.L7PolicyAPITest.test_l7policy_list
octavia_tempest_plugin.tests.api.v2.test_l7policy.L7PolicyAPITest.test_l7policy_show
octavia_tempest_plugin.tests.api.v2.test_l7policy.L7PolicyAPITest.test_l7policy_update
octavia_tempest_plugin.tests.api.v2.test_listener.ListenerAPITest.test_listener_list
octavia_tempest_plugin.tests.api.v2.test_load_balancer.LoadBalancerAPITest.test_load_balancer_ipv6_create


Captured the following Trace from a working Amphora:

ERROR flask.app Traceback (most recent call last):
ERROR flask.app   File "/usr/lib/python3.6/site-packages/octavia/amphorae/backends/agent/api_server/listener.py", line 260, in start_stop_listener
ERROR flask.app     subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
ERROR flask.app   File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
ERROR flask.app     **kwargs).stdout
ERROR flask.app   File "/usr/lib64/python3.6/subprocess.py", line 438, in run
ERROR flask.app     output=stdout, stderr=stderr)
ERROR flask.app subprocess.CalledProcessError: Command '['/usr/sbin/service', 'haproxy-33b98b82-087c-4d3f-92f8-fe905244d0b2', 'reload']' returned non-zero exit status 1.
ERRPR flask.app
ERROR flask.app During handling of the above exception, another exception occurred:
ERROR flask.app
ERROR flask.app Traceback (most recent call last):
ERROR flask.app   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
ERROR flask.app     response = self.full_dispatch_request()
ERROR flask.app   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
ERROR flask.app     rv = self.handle_user_exception(e)
ERROR flask.app   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
ERROR flask.app     reraise(exc_type, exc_value, tb)
ERROR flask.app   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
ERROR flask.app     raise value
ERROR flask.app   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
ERROR flask.app     rv = self.dispatch_request()
ERROR flask.app   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
ERROR flask.app     return self.view_functions[rule.endpoint](**req.view_args)
ERROR flask.app   File "/usr/lib/python3.6/site-packages/octavia/amphorae/backends/agent/api_server/server.py", line 153, in start_stop_listener
ERROR flask.app     return self._listener.start_stop_listener(listener_id, action)
flask.app   File "/usr/lib/python3.6/site-packages/octavia/amphorae/backends/agent/api_server/listener.py", line 262, in start_stop_listener
ERROR flask.app     if 'Job is already running' not in e.output:
ERROR flask.app TypeError: a bytes-like object is required, not 'str'

Possible fix: https://review.opendev.org/#/c/665698/

Version-Release number of selected component (if applicable):
==========================================
OSP15: octavia-amphora-image-x86_64-15.0-20190614.3.el8ost.noarch

How reproducible:
============
Always

Steps to Reproduce:
Run octavia-tempest-plugin tests against an RHEL8 based amphora image  ==> topology=SINGLE

Actual results:
=======
As mentioned above, five failed tests.


Expected results:
=========
All tests should pass


Additional info:
========
Note that SELinux is enforcing, but no AVCs were detected.

Comment 1 Nir Magnezi 2019-06-18 08:20:37 UTC
Created attachment 1581602 [details]
tempest.log

Comment 11 errata-xmlrpc 2019-09-21 11:23:21 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