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
1=== modified file 'hooks/lib/openstack-common'
2--- hooks/lib/openstack-common 2013-03-13 11:08:28 +0000
3+++ hooks/lib/openstack-common 2013-03-15 18:46:17 +0000
4@@ -329,6 +329,8 @@
5 # assumes the name of the peer relation is 'cluster' and that every
6 # service unit in the peer relation is running the same services.
7 #
8+# Services that do not specify :mode in parameter will default to http.
9+#
10 # Example
11 # configure_haproxy cinder_api:8776:8756:tcp nova_api:8774:8764:http
12 ##########################################################################
13@@ -369,6 +371,7 @@
14 local haproxy_listen_port=$(echo $service | cut -d : -f 2)
15 local api_listen_port=$(echo $service | cut -d : -f 3)
16 local mode=$(echo $service | cut -d : -f 4)
17+ [[ -z "$mode" ]] && mode="http"
18 juju-log "Adding haproxy configuration entry for $service "\
19 "($haproxy_listen_port -> $api_listen_port)"
20 cat >> $HAPROXY_CFG << EOF

Subscribers

People subscribed via source and target branches