Block configure_qunatum_networking if no amqp relation exists.

This commit is contained in:
Adam Gandelman 2013-03-08 16:14:10 -08:00
parent a2ad2140a0
commit dc82f72fd4
3 changed files with 13 additions and 2 deletions

View File

@ -97,6 +97,7 @@ function configure_quantum_networking {
if [ "$(config-get conf-ext-net)" != "no" ] &&
[ "$QUANTUM_PLUGIN" == "ovs" ] &&
[ -f /etc/quantum/novarc ] &&
[ -n "$(relation-ids amqp)" ] &&
[ -n "$(relation-ids shared-db)" ]; then
juju-log "Configuring external networking for quantum"
# Use helper to create external network gateway

View File

@ -133,6 +133,12 @@ function amqp_changed {
fi
determine_services && service_ctl all restart
if [ "$NET_MANAGER" == "Quantum" ] && \
eligible_leader 'res_nova_vip' || \
! is_clustered; then
configure_quantum_networking
fi
}
function db_joined {
@ -176,9 +182,13 @@ function db_changed {
eligible_leader 'res_nova_vip' && /usr/bin/nova-manage db sync
service_ctl all start
if [ "$NET_MANAGER" == "Quantum" ]; then
if [ "$NET_MANAGER" == "Quantum" ] && \
eligible_leader 'res_nova_vip' || \
! is_clustered; then
configure_quantum_networking
fi
trigger_remote_service_restarts
}

View File

@ -1 +1 @@
230
231