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

Proposed by James Page
Status: Merged
Merged at revision: 74
Proposed branch: lp:~james-page/charms/precise/nova-cloud-controller/grizzly-upgrade
Merge into: lp:~openstack-charmers/charms/precise/nova-cloud-controller/ha-support
Diff against target: 35 lines (+19/-3)
2 files modified
hooks/lib/nova/grizzly (+18/-2)
revision (+1/-1)
To merge this branch: bzr merge lp:~james-page/charms/precise/nova-cloud-controller/grizzly-upgrade
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+165032@code.launchpad.net

Description of the change

Add post-upgrade processing for folsom->grizzly upgrade

To post a comment you must log in.
75. By James Page

Resync with updated charm helper

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/lib/nova/grizzly'
2--- hooks/lib/nova/grizzly 2013-04-04 17:29:23 +0000
3+++ hooks/lib/nova/grizzly 2013-05-22 08:46:27 +0000
4@@ -76,6 +76,22 @@
5 nova_post_upgrade() {
6 # Post-upgrade helper. Caller should pass the version of OpenStack we are
7 # upgrading from.
8- juju-log "$CHARM: Running post-upgrade hook: $upgrade_from -> folsom."
9- # nothing to do here yet.
10+ local upgrade_from="$1"
11+ juju-log "$CHARM: Running post-upgrade hook: $upgrade_from -> grizzly."
12+ # We only support folsom -> grizzly, currently.
13+ [[ "$upgrade_from" != "folsom" ]] &&
14+ error_out "Unsupported upgrade: $upgrade_from -> grizzly"
15+
16+ # This may be dangerous, if we are upgrading a number of units at once
17+ # and they all begin the same migration concurrently. Migrate only from
18+ # the cloud controller(s).
19+ if [[ "$CHARM" == "nova-cloud-controller" ]] ; then
20+ juju-log "$CHARM: Migrating nova database."
21+ /usr/bin/nova-manage db sync
22+
23+ # Trigger a service restart on all other nova nodes.
24+ trigger_remote_service_restarts
25+ fi
26+
27+ juju-log "$CHARM: Post-upgrade hook complete: $upgrade_from -> grizzly."
28 }
29
30=== modified file 'revision'
31--- revision 2013-04-25 17:02:49 +0000
32+++ revision 2013-05-22 08:46:27 +0000
33@@ -1,1 +1,1 @@
34-262
35+263

Subscribers

People subscribed via source and target branches