Merge lp:~james-page/charms/precise/nova-cloud-controller/ha-support into lp:~openstack-charmers/charms/precise/nova-cloud-controller/ha-support

Proposed by James Page
Status: Merged
Merged at revision: 65
Proposed branch: lp:~james-page/charms/precise/nova-cloud-controller/ha-support
Merge into: lp:~openstack-charmers/charms/precise/nova-cloud-controller/ha-support
Diff against target: 98 lines (+15/-23)
2 files modified
hooks/nova-cloud-controller-common (+9/-8)
hooks/nova-cloud-controller-relations (+6/-15)
To merge this branch: bzr merge lp:~james-page/charms/precise/nova-cloud-controller/ha-support
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+153183@code.launchpad.net

Description of the change

Two key changes:

1) refactoring of configure_quantum_networking

This need to run on all nodes to set the nova floating_ip pool; if the node is an eligible_leader then it also creates the external networking.

2) MySQL HA

Use db_host instead of private-address as this will be set to the VIP

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nova-cloud-controller-common'
2--- hooks/nova-cloud-controller-common 2013-03-09 00:14:10 +0000
3+++ hooks/nova-cloud-controller-common 2013-03-13 16:13:25 +0000
4@@ -95,18 +95,19 @@
5 function configure_quantum_networking {
6 determine_quantum_config
7 if [ "$(config-get conf-ext-net)" != "no" ] &&
8- [ "$QUANTUM_PLUGIN" == "ovs" ] &&
9 [ -f /etc/quantum/novarc ] &&
10 [ -n "$(relation-ids amqp)" ] &&
11 [ -n "$(relation-ids shared-db)" ]; then
12 juju-log "Configuring external networking for quantum"
13- # Use helper to create external network gateway
14- # and router using generated credentials
15- . /etc/quantum/novarc
16- quantum-ext-net -g $(config-get ext-net-gateway) \
17- -c $(config-get ext-net-cidr) \
18- -f $(config-get pool-floating-start):$(config-get pool-floating-end) \
19- $(config-get ext-net-name)
20+ if eligible_leader "res_nova_vip"; then
21+ # Use helper to create external network gateway
22+ # and router using generated credentials
23+ . /etc/quantum/novarc
24+ quantum-ext-net -g $(config-get ext-net-gateway) \
25+ -c $(config-get ext-net-cidr) \
26+ -f $(config-get pool-floating-start):$(config-get pool-floating-end) \
27+ $(config-get ext-net-name)
28+ fi
29 set_or_update "default_floating_pool" "$(config-get ext-net-name)"
30 fi
31 }
32
33=== modified file 'hooks/nova-cloud-controller-relations'
34--- hooks/nova-cloud-controller-relations 2013-03-11 09:30:55 +0000
35+++ hooks/nova-cloud-controller-relations 2013-03-13 16:13:25 +0000
36@@ -70,9 +70,7 @@
37
38 set_config_flags
39
40- if [ "$NET_MANAGER" == "Quantum" ] && \
41- eligible_leader 'res_nova_vip' || \
42- ! is_clustered; then
43+ if [ "$NET_MANAGER" == "Quantum" ]; then
44 configure_quantum_networking
45 fi
46
47@@ -134,9 +132,7 @@
48
49 determine_services && service_ctl all restart
50
51- if [ "$NET_MANAGER" == "Quantum" ] && \
52- eligible_leader 'res_nova_vip' || \
53- ! is_clustered; then
54+ if [ "$NET_MANAGER" == "Quantum" ]; then
55 configure_quantum_networking
56 fi
57 }
58@@ -156,7 +152,7 @@
59 }
60
61 function db_changed {
62- local db_host=`relation-get private-address`
63+ local db_host=`relation-get db_host`
64 local db_password=`relation-get nova_password`
65
66 if [[ -z $db_host ]] || [[ -z $db_password ]] ; then
67@@ -183,9 +179,7 @@
68
69 service_ctl all start
70
71- if [ "$NET_MANAGER" == "Quantum" ] && \
72- eligible_leader 'res_nova_vip' || \
73- ! is_clustered; then
74+ if [ "$NET_MANAGER" == "Quantum" ]; then
75 configure_quantum_networking
76 fi
77
78@@ -351,9 +345,7 @@
79 if [ "$NET_MANAGER" == "Quantum" ]; then
80 # if first time here, config quantum before setting up
81 # https.
82- if [[ -z "$clustered" ]] && eligible_leader ; then
83- configure_quantum_networking
84- fi
85+ configure_quantum_networking
86 # ripple out changes to identity to connected services
87 # which use cloud-controller as source of information for
88 # keystone
89@@ -377,8 +369,7 @@
90 # if this changed event happens as a result of clustered VIP
91 # reconfigure, configure_https needs to update VIP certificate
92 # before quantumclient is used.
93- if [[ "$NET_MANAGER" == "Quantum" ]] &&
94- [[ -n "$clustered" ]] && eligible_leader 'res_nova_vip' ; then
95+ if [[ "$NET_MANAGER" == "Quantum" ]]; then
96 configure_quantum_networking
97 fi
98 }

Subscribers

People subscribed via source and target branches