Merge lp:~corey.bryant/charms/precise/nova-cloud-controller/havana-db-stamp into lp:~openstack-charmers-archive/charms/precise/nova-cloud-controller/trunk

Proposed by James Page
Status: Merged
Merged at revision: 73
Proposed branch: lp:~corey.bryant/charms/precise/nova-cloud-controller/havana-db-stamp
Merge into: lp:~openstack-charmers-archive/charms/precise/nova-cloud-controller/trunk
Diff against target: 24 lines (+2/-1)
2 files modified
hooks/nova_cc_utils.py (+1/-0)
unit_tests/test_nova_cc_utils.py (+1/-1)
To merge this branch: bzr merge lp:~corey.bryant/charms/precise/nova-cloud-controller/havana-db-stamp
Reviewer Review Type Date Requested Status
James Page Needs Fixing
Review via email: mp+216153@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Corey

I think this looks good - please can you update the failing unit test as well:

======================================================================
FAIL: Simulate a call to do_openstack_upgrade() for grizzly->icehouse
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/jamespage/src/charms/landing/nova-cloud-controller/unit_tests/test_nova_cc_utils.py", line 502, in test_upgrade_grizzly_icehouse
    self.assertEquals(self.neutron_db_manage.call_args_list, expected)
AssertionError: [call(['stamp', 'grizzly']),
 call(['upgrade', 'head']),
 call(['stamp', 'havana']),
 call(['upgrade', 'head'])] != [call(['stamp', 'grizzly']), call(['upgrade', 'head']), call(['upgrade', 'head'])]

review: Needs Fixing
72. By James Page

[trivial] Fixup broken unit test for ssh key management

73. By Corey Bryant

Stamp neutron database before upgrade from non-grizzly releases

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi James,

I've updated my branch to fix the test. Thanks.

Corey

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nova_cc_utils.py'
2--- hooks/nova_cc_utils.py 2014-04-16 09:25:57 +0000
3+++ hooks/nova_cc_utils.py 2014-04-28 12:16:14 +0000
4@@ -441,6 +441,7 @@
5 # NOTE(jamespage) upgrade with existing config files as the
6 # havana->icehouse migration enables new service_plugins which
7 # create issues with db upgrades
8+ neutron_db_manage(['stamp', cur_os_rel])
9 neutron_db_manage(['upgrade', 'head'])
10 reset_os_release()
11 configs = register_configs(release=new_os_rel)
12
13=== modified file 'unit_tests/test_nova_cc_utils.py'
14--- unit_tests/test_nova_cc_utils.py 2014-04-28 08:07:27 +0000
15+++ unit_tests/test_nova_cc_utils.py 2014-04-28 12:16:14 +0000
16@@ -498,7 +498,7 @@
17 self.eligible_leader.return_value = True
18 utils.do_openstack_upgrade()
19 expected = [call(['stamp', 'grizzly']), call(['upgrade', 'head']),
20- call(['upgrade', 'head'])]
21+ call(['stamp', 'havana']), call(['upgrade', 'head'])]
22 self.assertEquals(self.neutron_db_manage.call_args_list, expected)
23 self.apt_update.assert_called_with(fatal=True)
24 self.apt_upgrade.assert_called_with(options=DPKG_OPTS, fatal=True,

Subscribers

People subscribed via source and target branches