Revert use of 'relation-get private-address'
This commit is contained in:
parent
96a37c9493
commit
5bf7673c24
@ -85,7 +85,7 @@ function cluster_joined {
|
|||||||
juju-log "rabbitmq-server: ERROR Could not find cookie at $ERLANG_COOKIE"
|
juju-log "rabbitmq-server: ERROR Could not find cookie at $ERLANG_COOKIE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
relation-set cookie=$(cat $ERLANG_COOKIE)
|
relation-set cookie="$(cat $ERLANG_COOKIE)" host="$(hostname)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function cluster_changed {
|
function cluster_changed {
|
||||||
@ -94,11 +94,11 @@ function cluster_changed {
|
|||||||
|
|
||||||
[[ $local_unit_id -lt $remote_unit_id ]] && echo "Relation lesser" && exit 0
|
[[ $local_unit_id -lt $remote_unit_id ]] && echo "Relation lesser" && exit 0
|
||||||
|
|
||||||
local remote_host=$(relation-get private-address)
|
local remote_host=$(relation-get host)
|
||||||
local cookie_value=$(relation-get cookie)
|
local cookie_value=$(relation-get cookie)
|
||||||
|
|
||||||
[[ -z "$remote_host" ]] || [[ -z "$cookie_value" ]] && \
|
[[ -z "$remote_host" ]] || [[ -z "$cookie_value" ]] && \
|
||||||
juju-log "rabbimtq-server: remote_host||cookie_value not yet set." \
|
juju-log "rabbimtq-server: remote_host||cookie_value not yet set." &&
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
# Sync the erlang cookie to that of remote host.
|
# Sync the erlang cookie to that of remote host.
|
||||||
|
Loading…
Reference in New Issue
Block a user