Merge lp:~thedac/charm-helpers/dualstack into lp:charm-helpers

Proposed by David Ames
Status: Merged
Merged at revision: 781
Proposed branch: lp:~thedac/charm-helpers/dualstack
Merge into: lp:charm-helpers
Diff against target: 37 lines (+0/-4)
3 files modified
charmhelpers/contrib/openstack/context.py (+0/-1)
charmhelpers/contrib/openstack/templates/haproxy.cfg (+0/-2)
tests/contrib/openstack/test_os_contexts.py (+0/-1)
To merge this branch: bzr merge lp:~thedac/charm-helpers/dualstack
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Review via email: mp+328256@code.launchpad.net

Description of the change

Allow IPv4/IPv6 Dual Stack

Always listen on both IPv4 and IPv6 to allow dual stack connectivity.

To post a comment you must log in.
Revision history for this message
David Ames (thedac) wrote :

Do not merge until all tests on https://review.openstack.org/#/c/487623/ pass.

Revision history for this message
David Ames (thedac) wrote :

This is ready. Initial tests have passed on https://review.openstack.org/#/c/487623/ and it is going through a full now.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/openstack/context.py'
--- charmhelpers/contrib/openstack/context.py 2017-08-08 22:54:19 +0000
+++ charmhelpers/contrib/openstack/context.py 2017-08-10 15:38:01 +0000
@@ -622,7 +622,6 @@
622 ctxt['haproxy_connect_timeout'] = config('haproxy-connect-timeout')622 ctxt['haproxy_connect_timeout'] = config('haproxy-connect-timeout')
623623
624 if config('prefer-ipv6'):624 if config('prefer-ipv6'):
625 ctxt['ipv6'] = True
626 ctxt['local_host'] = 'ip6-localhost'625 ctxt['local_host'] = 'ip6-localhost'
627 ctxt['haproxy_host'] = '::'626 ctxt['haproxy_host'] = '::'
628 else:627 else:
629628
=== modified file 'charmhelpers/contrib/openstack/templates/haproxy.cfg'
--- charmhelpers/contrib/openstack/templates/haproxy.cfg 2017-06-09 16:19:13 +0000
+++ charmhelpers/contrib/openstack/templates/haproxy.cfg 2017-08-10 15:38:01 +0000
@@ -48,9 +48,7 @@
48{% for service, ports in service_ports.items() -%}48{% for service, ports in service_ports.items() -%}
49frontend tcp-in_{{ service }}49frontend tcp-in_{{ service }}
50 bind *:{{ ports[0] }}50 bind *:{{ ports[0] }}
51 {% if ipv6 -%}
52 bind :::{{ ports[0] }}51 bind :::{{ ports[0] }}
53 {% endif -%}
54 {% for frontend in frontends -%}52 {% for frontend in frontends -%}
55 acl net_{{ frontend }} dst {{ frontends[frontend]['network'] }}53 acl net_{{ frontend }} dst {{ frontends[frontend]['network'] }}
56 use_backend {{ service }}_{{ frontend }} if net_{{ frontend }}54 use_backend {{ service }}_{{ frontend }} if net_{{ frontend }}
5755
=== modified file 'tests/contrib/openstack/test_os_contexts.py'
--- tests/contrib/openstack/test_os_contexts.py 2017-08-08 22:54:19 +0000
+++ tests/contrib/openstack/test_os_contexts.py 2017-08-10 15:38:01 +0000
@@ -1857,7 +1857,6 @@
1857 'haproxy_host': '::',1857 'haproxy_host': '::',
1858 'stat_password': 'testpassword',1858 'stat_password': 'testpassword',
1859 'stat_port': '8888',1859 'stat_port': '8888',
1860 'ipv6': True
1861 }1860 }
1862 # the context gets generated.1861 # the context gets generated.
1863 self.assertEquals(ex, result)1862 self.assertEquals(ex, result)

Subscribers

People subscribed via source and target branches