From 3ed30597f589fb41209d37b8dbf135be033a8a48 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Wed, 26 Feb 2014 03:06:38 -0800 Subject: [PATCH] Fix NSX migration path The migration path for the NSX plugin was not working correctly, as two migrations (extra route and network gateways) were skipped. Therefore installations were partially relying on automatic schema generation. This patch fixes the migration path, as well as an attribute whose name in the migration and the DB model differed. Closes-Bug: 1285095 Change-Id: I9e4db294e618d1419d86e07cfb5505dcc01b54ca --- .../versions/1c33fa3cd1a1_extra_route_config.py | 6 +++++- .../versions/363468ac592c_nvp_network_gw.py | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/neutron/db/migration/alembic_migrations/versions/1c33fa3cd1a1_extra_route_config.py b/neutron/db/migration/alembic_migrations/versions/1c33fa3cd1a1_extra_route_config.py index 2d91fc6a8..07dd4a945 100644 --- a/neutron/db/migration/alembic_migrations/versions/1c33fa3cd1a1_extra_route_config.py +++ b/neutron/db/migration/alembic_migrations/versions/1c33fa3cd1a1_extra_route_config.py @@ -32,9 +32,13 @@ down_revision = '45680af419f9' migration_for_plugins = [ 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2', 'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2', + 'neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2', 'neutron.plugins.nec.nec_plugin.NECPluginV2', + 'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2', + 'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin', 'neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2', - 'neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2' + 'neutron.plugins.vmware.plugin.NsxPlugin', + 'neutron.plugins.vmware.plugin.NsxServicePlugin' ] from alembic import op diff --git a/neutron/db/migration/alembic_migrations/versions/363468ac592c_nvp_network_gw.py b/neutron/db/migration/alembic_migrations/versions/363468ac592c_nvp_network_gw.py index 64bdce413..e2727e60e 100644 --- a/neutron/db/migration/alembic_migrations/versions/363468ac592c_nvp_network_gw.py +++ b/neutron/db/migration/alembic_migrations/versions/363468ac592c_nvp_network_gw.py @@ -30,7 +30,10 @@ down_revision = '1c33fa3cd1a1' # Change to ['*'] if this migration applies to all plugins migration_for_plugins = [ - 'neutron.plugins.nicira.NeutronPluginV2.NvpPluginV2' + 'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2', + 'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin', + 'neutron.plugins.vmware.plugin.NsxPlugin', + 'neutron.plugins.vmware.plugin.NsxServicePlugin' ] from alembic import op @@ -48,7 +51,7 @@ def upgrade(active_plugins=None, options=None): sa.Column('name', sa.String(length=255), nullable=True), sa.Column('tenant_id', sa.String(length=36), nullable=True), - sa.Column('shared', sa.Boolean(), nullable=True), + sa.Column('default', sa.Boolean(), nullable=True), sa.PrimaryKeyConstraint('id')) op.create_table('networkgatewaydevices', sa.Column('id', sa.String(length=36), nullable=False), -- 2.45.2