Merge lp:~hassaanp/charms/trusty/neutron-api-plumgrid/trunk into lp:~plumgrid-team/charms/trusty/neutron-api-plumgrid/trunk

Proposed by Hassaan Pasha
Status: Merged
Merged at revision: 15
Proposed branch: lp:~hassaanp/charms/trusty/neutron-api-plumgrid/trunk
Merge into: lp:~plumgrid-team/charms/trusty/neutron-api-plumgrid/trunk
Diff against target: 30 lines (+11/-1)
1 file modified
hooks/neutron_plumgrid_utils.py (+11/-1)
To merge this branch: bzr merge lp:~hassaanp/charms/trusty/neutron-api-plumgrid/trunk
Reviewer Review Type Date Requested Status
Junaid Ali Approve
Bilal Baqar Needs Information
Review via email: mp+290229@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Bilal Baqar (bbaqar) :
review: Needs Fixing
16. By Hassaan Pasha

Addressed Comments

Revision history for this message
Bilal Baqar (bbaqar) wrote :

No need to run migrate_neutron_db() for 2015.1.1.1 networking-plumgrid package.

Revision history for this message
Bilal Baqar (bbaqar) :
review: Needs Fixing
17. By Hassaan Pasha

Adding check for 2015.1.1.1

18. By Hassaan Pasha

Adding check for 2015.1.1.1 and addressing comments

Revision history for this message
Junaid Ali (junaidali) :
review: Needs Fixing
19. By Hassaan Pasha

Addressed Comments

Revision history for this message
Junaid Ali (junaidali) wrote :

Looks good to me.

review: Approve
Revision history for this message
Bilal Baqar (bbaqar) wrote :

db migration has not been tested successfully once therefore cannot merge.
Failed on 5.0

review: Needs Information
20. By Hassaan Pasha

head changed to heads

21. By Hassaan Pasha

add is leader and addressed comments

Revision history for this message
Junaid Ali (junaidali) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/neutron_plumgrid_utils.py'
--- hooks/neutron_plumgrid_utils.py 2016-01-15 20:56:20 +0000
+++ hooks/neutron_plumgrid_utils.py 2016-04-01 05:04:55 +0000
@@ -13,11 +13,12 @@
13)13)
14from charmhelpers.core.hookenv import (14from charmhelpers.core.hookenv import (
15 config,15 config,
16 is_leader,
16)17)
17from charmhelpers.contrib.openstack.utils import (18from charmhelpers.contrib.openstack.utils import (
18 os_release,19 os_release,
19)20)
2021import subprocess
21import neutron_plumgrid_context22import neutron_plumgrid_context
2223
23TEMPLATES = 'templates/'24TEMPLATES = 'templates/'
@@ -124,3 +125,12 @@
124 package_version = config('networking-plumgrid-version')125 package_version = config('networking-plumgrid-version')
125 package_name = 'networking-plumgrid==%s' % package_version126 package_name = 'networking-plumgrid==%s' % package_version
126 pip_install(package_name, fatal=True)127 pip_install(package_name, fatal=True)
128 if is_leader() and package_version != '2015.1.1.1':
129 migrate_neutron_db()
130
131
132def migrate_neutron_db():
133 release = os_release('neutron-common', base='kilo')
134 cmd = [('plumgrid-db-manage' if release == 'kilo'
135 else 'neutron-db-manage'), 'upgrade', 'heads']
136 subprocess.check_output(cmd)

Subscribers

People subscribed via source and target branches

to all changes: