Merge lp:~hopem/charm-helpers/fix-precise-haproxy-ipv6 into lp:charm-helpers

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 278
Proposed branch: lp:~hopem/charm-helpers/fix-precise-haproxy-ipv6
Merge into: lp:charm-helpers
Diff against target: 37 lines (+4/-0)
3 files modified
charmhelpers/contrib/openstack/context.py (+1/-0)
charmhelpers/contrib/openstack/templates/haproxy.cfg (+2/-0)
tests/contrib/openstack/test_os_contexts.py (+1/-0)
To merge this branch: bzr merge lp:~hopem/charm-helpers/fix-precise-haproxy-ipv6
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+245217@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/openstack/context.py'
2--- charmhelpers/contrib/openstack/context.py 2014-12-11 13:47:52 +0000
3+++ charmhelpers/contrib/openstack/context.py 2014-12-19 17:31:01 +0000
4@@ -491,6 +491,7 @@
5 ctxt['haproxy_client_timeout'] = config('haproxy-client-timeout')
6
7 if config('prefer-ipv6'):
8+ ctxt['ipv6'] = True
9 ctxt['local_host'] = 'ip6-localhost'
10 ctxt['haproxy_host'] = '::'
11 ctxt['stat_port'] = ':::8888'
12
13=== modified file 'charmhelpers/contrib/openstack/templates/haproxy.cfg'
14--- charmhelpers/contrib/openstack/templates/haproxy.cfg 2014-11-25 15:04:52 +0000
15+++ charmhelpers/contrib/openstack/templates/haproxy.cfg 2014-12-19 17:31:01 +0000
16@@ -38,7 +38,9 @@
17 {% for service, ports in service_ports.items() -%}
18 frontend tcp-in_{{ service }}
19 bind *:{{ ports[0] }}
20+ {% if ipv6 -%}
21 bind :::{{ ports[0] }}
22+ {% endif -%}
23 {% for frontend in frontends -%}
24 acl net_{{ frontend }} dst {{ frontends[frontend]['network'] }}
25 use_backend {{ service }}_{{ frontend }} if net_{{ frontend }}
26
27=== modified file 'tests/contrib/openstack/test_os_contexts.py'
28--- tests/contrib/openstack/test_os_contexts.py 2014-12-11 13:47:52 +0000
29+++ tests/contrib/openstack/test_os_contexts.py 2014-12-19 17:31:01 +0000
30@@ -1205,6 +1205,7 @@
31 'haproxy_client_timeout': 50000,
32 'haproxy_host': '::',
33 'stat_port': ':::8888',
34+ 'ipv6': True
35 }
36 # the context gets generated.
37 self.assertEquals(ex, result)

Subscribers

People subscribed via source and target branches