cluster_changed: Only exec hook when peer units are present.

This commit is contained in:
Adam Gandelman 2013-02-19 16:37:30 -08:00
parent 51ed559723
commit 8324432aea
2 changed files with 3 additions and 4 deletions

View File

@ -286,11 +286,10 @@ function config_changed() {
}
function cluster_changed() {
echo "CLUSTER CHANGED"
[[ -z "$(peer_units)" ]] &&
juju-log "cluster_changed() with no peers." && exit 0
local haproxy_port=$(determine_haproxy_port 9292)
local backend_port=$(determine_api_port 9292)
echo "haproxy_port: $haproxy_port"
echo "backend_port: $backend_port"
service glance-api stop
configure_haproxy "glance_api:$haproxy_port:$backend_port"
set_or_update bind_port "$backend_port" "api"

View File

@ -1 +1 @@
124
125