Remove debug cruft, reconfigure image-service relations for HTTPS as well.
This commit is contained in:
parent
3a6aa505d9
commit
4b3c5892e5
|
@ -125,30 +125,31 @@ configure_https() {
|
|||
# servers
|
||||
service_ctl glance-api stop
|
||||
if [[ -n "$(peer_units)" ]] || is_clustered ; then
|
||||
echo "configure_https clustered."
|
||||
# haproxy may already be configured. need to push it back in the request
|
||||
# pipeline in preparation for a change from:
|
||||
# from: haproxy (9292) -> glance_api (9282)
|
||||
# to: ssl (9292) -> haproxy (9291) -> glance_api (9272)
|
||||
local next_server=$(determine_haproxy_port 9292)
|
||||
local api_port=$(determine_api_port 9292)
|
||||
echo "configure_haproxy glance_api:$next_server:$api_port"
|
||||
configure_haproxy "glance_api:$next_server:$api_port"
|
||||
else
|
||||
echo "configure_https NOT clustered."
|
||||
# if not clustered, the glance-api is next in the pipeline.
|
||||
local api_port=$(determine_api_port 9292)
|
||||
local next_server=$api_port
|
||||
fi
|
||||
echo "CONF PIPELINE: 9292 -> $next_server -> $api_port"
|
||||
|
||||
# setup https to point to either haproxy or directly to api server, depending.
|
||||
setup_https 9292:$next_server
|
||||
|
||||
# configure servers to listen on new ports accordingly.
|
||||
set_or_update bind_port "$api_port" "api"
|
||||
service_ctl all start
|
||||
|
||||
# (re)configure ks endpoint accordingly
|
||||
# (re)configure ks endpoint accordingly in ks and nova.
|
||||
for r_id in "$(relation-ids identity-service)" ; do
|
||||
keystone_joined "$r_id"
|
||||
done
|
||||
for r_id in "$(relation-ids image-service)" ; do
|
||||
image-service_joined "$r_id"
|
||||
done
|
||||
}
|
||||
|
|
|
@ -95,16 +95,15 @@ function db_changed {
|
|||
|
||||
function image-service_joined {
|
||||
# Check to see if unit is potential leader
|
||||
local r_id="$r_id"
|
||||
[[ -n "$r_id" ]] && r_id="-r $r_id"
|
||||
eligible_leader 'res_glance_vip' || return 0
|
||||
bind_port=9292
|
||||
if is_clustered; then
|
||||
bind_port=$(($bind_port + 10000))
|
||||
bind_host=`config-get vip`
|
||||
else
|
||||
bind_host=`unit-get private-address`
|
||||
fi
|
||||
juju-log "glance: image-service_joined: To peer glance-api-server=$bind_host:$bind_port"
|
||||
relation-set glance-api-server="$bind_host:$bind_port"
|
||||
https && scheme="https" || scheme="http"
|
||||
is_clustered && local host=$(config-get vip) ||
|
||||
local host=$(unit-get private-address)
|
||||
url="$scheme://$host:9292"
|
||||
juju-log "glance: image-service_joined: To peer glance-api-server=$url"
|
||||
relation-set $r_id glance-api-server="$url"
|
||||
}
|
||||
|
||||
function object-store_joined {
|
||||
|
|
Loading…
Reference in New Issue