Merge lp:~gandelman-a/charms/precise/openstack-dashboard/haproxy_mode_default into lp:~openstack-charmers/charms/precise/openstack-dashboard/ha-support

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 29
Proposed branch: lp:~gandelman-a/charms/precise/openstack-dashboard/haproxy_mode_default
Merge into: lp:~openstack-charmers/charms/precise/openstack-dashboard/ha-support
Diff against target: 20 lines (+3/-0)
1 file modified
hooks/lib/openstack-common (+3/-0)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/openstack-dashboard/haproxy_mode_default
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+153613@code.launchpad.net

Description of the change

Was about to sync these changes into the helpers branch but realized we can default the mode and avoid having to update the interface on all charms that use this currently, allowing a quick sync.

To post a comment you must log in.
Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/lib/openstack-common'
--- hooks/lib/openstack-common 2013-03-13 11:08:28 +0000
+++ hooks/lib/openstack-common 2013-03-15 18:46:17 +0000
@@ -329,6 +329,8 @@
329# assumes the name of the peer relation is 'cluster' and that every329# assumes the name of the peer relation is 'cluster' and that every
330# service unit in the peer relation is running the same services.330# service unit in the peer relation is running the same services.
331#331#
332# Services that do not specify :mode in parameter will default to http.
333#
332# Example334# Example
333# configure_haproxy cinder_api:8776:8756:tcp nova_api:8774:8764:http335# configure_haproxy cinder_api:8776:8756:tcp nova_api:8774:8764:http
334##########################################################################336##########################################################################
@@ -369,6 +371,7 @@
369 local haproxy_listen_port=$(echo $service | cut -d : -f 2)371 local haproxy_listen_port=$(echo $service | cut -d : -f 2)
370 local api_listen_port=$(echo $service | cut -d : -f 3)372 local api_listen_port=$(echo $service | cut -d : -f 3)
371 local mode=$(echo $service | cut -d : -f 4)373 local mode=$(echo $service | cut -d : -f 4)
374 [[ -z "$mode" ]] && mode="http"
372 juju-log "Adding haproxy configuration entry for $service "\375 juju-log "Adding haproxy configuration entry for $service "\
373 "($haproxy_listen_port -> $api_listen_port)"376 "($haproxy_listen_port -> $api_listen_port)"
374 cat >> $HAPROXY_CFG << EOF377 cat >> $HAPROXY_CFG << EOF

Subscribers

People subscribed via source and target branches