Bug 1618689 - [OSP13][Octavia] octavia-api fails to start with IPv6
Summary: [OSP13][Octavia] octavia-api fails to start with IPv6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: z7
: 13.0 (Queens)
Assignee: Brent Eagles
QA Contact: Bruna Bonguardo
URL:
Whiteboard:
Depends On: 1647409
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-17 10:43 UTC by Rafal Szmigiel
Modified: 2019-09-10 14:12 UTC (History)
7 users (show)

Fixed In Version: openstack-tripleo-heat-templates-8.3.1-23.el7ost puppet-tripleo-8.4.1-7.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-10 13:03:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Python 24209 0 None None None 2019-02-11 13:42:44 UTC
Red Hat Product Errata RHBA-2019:1738 0 None None None 2019-07-10 13:04:57 UTC

Description Rafal Szmigiel 2018-08-17 10:43:45 UTC
Description of problem:

After deploying OSP13 with IPv6 enabled in InternalAPI network I can observe that OctaviaAPI doesn't start throwing the following error:

2018-08-17 08:52:56.446 1 INFO octavia.common.config [-] Logging enabled!
2018-08-17 08:52:56.446 1 INFO octavia.common.config [-] /usr/bin/octavia-api version 2.0.1
2018-08-17 08:52:56.456 1 WARNING oslo_config.cfg [-] Option "auth_uri" from group "keystone_authtoken" is deprecated for removal (The auth_uri option is deprecated in favor of www_authenticate_uri and will be removed in the S  release.).  Its value may be silently ignored in the future.
2018-08-17 08:52:56.458 1 WARNING oslo_config.cfg [-] Option "auth_uri" from group "keystone_authtoken" is deprecated. Use option "www_authenticate_uri" from group "keystone_authtoken".
2018-08-17 08:52:56.873 1 WARNING octavia.api.root_controller [-] Both v1 and v2.0 API endpoints are enabled -- it is a security risk to expose the v1 endpoint publicly,so please make sure access to it is secured.
2018-08-17 08:52:56.882 1 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
2018-08-17 08:52:56.899 1 INFO octavia.cmd.api [-] Starting API server on fd6c:547f:85c:c035::1:d:9876
2018-08-17 08:52:56.900 1 CRITICAL octavia [-] Unhandled error: gaierror: [Errno -9] Address family for hostname not supported
2018-08-17 08:52:56.900 1 ERROR octavia Traceback (most recent call last):
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/bin/octavia-api", line 10, in <module>
2018-08-17 08:52:56.900 1 ERROR octavia     sys.exit(main())
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib/python2.7/site-packages/octavia/cmd/api.py", line 38, in main
2018-08-17 08:52:56.900 1 ERROR octavia     srv = simple_server.make_server(host, port, app)
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 144, in make_server
2018-08-17 08:52:56.900 1 ERROR octavia     server = server_class((host, port), handler_class)
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib64/python2.7/SocketServer.py", line 419, in __init__
2018-08-17 08:52:56.900 1 ERROR octavia     self.server_bind()
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 48, in server_bind
2018-08-17 08:52:56.900 1 ERROR octavia     HTTPServer.server_bind(self)
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind
2018-08-17 08:52:56.900 1 ERROR octavia     SocketServer.TCPServer.server_bind(self)
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib64/python2.7/SocketServer.py", line 430, in server_bind
2018-08-17 08:52:56.900 1 ERROR octavia     self.socket.bind(self.server_address)
2018-08-17 08:52:56.900 1 ERROR octavia   File "/usr/lib64/python2.7/socket.py", line 224, in meth
2018-08-17 08:52:56.900 1 ERROR octavia     return getattr(self._sock,name)(*args)
2018-08-17 08:52:56.900 1 ERROR octavia gaierror: [Errno -9] Address family for hostname not supported
2018-08-17 08:52:56.900 1 ERROR octavia 


Version-Release number of selected component (if applicable):

[root@overcloud-controller-0 nova]# rpm -qa | grep -i octavia
puppet-octavia-12.4.0-2.el7ost.noarch
openstack-octavia-health-manager-2.0.1-5.el7ost.noarch
python2-octaviaclient-1.4.0-1.el7ost.noarch
openstack-octavia-worker-2.0.1-5.el7ost.noarch
openstack-octavia-common-2.0.1-5.el7ost.noarch
openstack-octavia-api-2.0.1-5.el7ost.noarch
python-octavia-2.0.1-5.el7ost.noarch
openstack-octavia-housekeeping-2.0.1-5.el7ost.noarch


How reproducible:
All the time with IPv6 enabled in InternalAPI network.

Steps to Reproduce:
1. Deploy OSP13 following RH's official docs with enabled IPv6 in InternalAPI and Octavia
2. Notice that Octavia API container isn't running (restarting in a loop)
3. Curse under your breath


Actual results:
Octavia API fails to bind to IPv6 address.

Expected results:
Octavia API (and other services) are properly binding to IPv6 address.

Additional info:

Comment 3 Carlos Goncalves 2019-02-11 13:41:28 UTC
octavia-api runs under Pythons's SimpleHTTPServer which doesn't support binding to IPv6 -- https://bugs.python.org/issue24209

[cgoncalves@codfish ~] $ python3 -m http.server -b ::
Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.7/http/server.py", line 1262, in <module>
    test(HandlerClass=handler_class, port=args.port, bind=args.bind)
  File "/usr/lib64/python3.7/http/server.py", line 1230, in test
    with ServerClass(server_address, HandlerClass) as httpd:
  File "/usr/lib64/python3.7/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib64/python3.7/http/server.py", line 137, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/lib64/python3.7/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
socket.gaierror: [Errno -9] Address family for hostname not supported
[cgoncalves@codfish ~] $

SimpleHTTPServer should be replaced with Apache httpd. This would also allow us to drop the TLS proxy container introduced post-GA.

Comment 8 Carlos Goncalves 2019-03-24 14:17:33 UTC
Patches in RHBZ #1647409 will also cover this BZ.

Comment 18 errata-xmlrpc 2019-07-10 13:03:16 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/RHBA-2019:1738


Note You need to log in before you can comment on or make changes to this bug.