]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Refreshed/rebased/reworked fix-alembic-migration-with-sqlite3.patch.
authorThomas Goirand <thomas@goirand.fr>
Fri, 3 Oct 2014 12:17:30 +0000 (20:17 +0800)
committerThomas Goirand <thomas@goirand.fr>
Fri, 3 Oct 2014 12:17:30 +0000 (20:17 +0800)
debian/changelog
debian/control
debian/patches/0004-Fix-Metering-doesn-t-respect-the-l3-agent-binding.patch [deleted file]
debian/patches/Properly_apply_column_default_in_migration_pool_monitor_status.patch [deleted file]
debian/patches/better-config-default.patch
debian/patches/fix-alembic-migration-with-sqlite3.patch
debian/patches/sane-defaults-for-dhcp_agent.ini.patch [deleted file]
debian/patches/sane-defaults-for-ml2_conf.ini.patch [deleted file]
debian/patches/series

index 92ffff38dcc1a1e0d80a927d8bd655211881805b..5432f56a097fed5f62f957ae9a065aa589062f0f 100644 (file)
@@ -3,6 +3,7 @@ neutron (2014.2~rc1-1) experimental; urgency=medium
   * New upstream release.
   * Now using templated init script for sysv-rc, generated systemd unit and
     upstart jobs, using openstack-pkg-tools >= 13.
+  * Refreshed/rebased/reworked fix-alembic-migration-with-sqlite3.patch.
 
  -- Thomas Goirand <zigo@debian.org>  Fri, 03 Oct 2014 18:53:11 +0800
 
index b81e5aa9b08babd9d0a9d380206a929517d0d197..0aa9c60cfd97acb8d55752cbd5b966cdf20d6b63 100644 (file)
@@ -5,7 +5,7 @@ Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
 Uploaders: Thomas Goirand <zigo@debian.org>
 Build-Depends: debhelper (>= 9),
                dh-systemd,
-               openstack-pkg-tools (>= 12~),
+               openstack-pkg-tools (>= 13~),
                po-debconf,
                python-all (>= 2.6),
                python-pbr (>= 0.6),
diff --git a/debian/patches/0004-Fix-Metering-doesn-t-respect-the-l3-agent-binding.patch b/debian/patches/0004-Fix-Metering-doesn-t-respect-the-l3-agent-binding.patch
deleted file mode 100644 (file)
index 22c87f4..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-From: Sylvain Afchain <sylvain.afchain@enovance.com>
-Date: Tue, 7 Jan 2014 09:36:58 +0000 (+0100)
-Subject: Fix Metering doesn't respect the l3 agent binding
-X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff_plain;h=901d676b8bcbb3e731ba44a4e574e9ae998f486e
-
-Fix Metering doesn't respect the l3 agent binding
-
-This patch fix the issue by changing the call to
-find the plugin which handles the l3 which is now
-the l3_router service plugin instead of the old mixin.
-
-Also change the unit tests to use the l3 service plugin
-instead of the l3 mixin and refactor the rpc callbacks
-part.
-
-Co-Authored-By: Ala Rezmerita <ala.rezmerita@cloudwatt.com>
-Closes-bug: #1257354
-Change-Id: Ide26f825005fa63cd3fcc75fa91fffb947e0be7a
----
-
-Index: neutron/neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py
-===================================================================
---- neutron.orig/neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py      2014-04-11 14:04:11.000000000 +0800
-+++ neutron/neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py   2014-04-15 01:13:25.000000000 +0800
-@@ -20,6 +20,7 @@
- from neutron import manager
- from neutron.openstack.common import log as logging
- from neutron.openstack.common.rpc import proxy
-+from neutron.plugins.common import constants as service_constants
- LOG = logging.getLogger(__name__)
-@@ -35,7 +36,8 @@
-     def _agent_notification(self, context, method, routers):
-         """Notify l3 metering agents hosted by l3 agent hosts."""
-         adminContext = context.is_admin and context or context.elevated()
--        plugin = manager.NeutronManager.get_plugin()
-+        plugin = manager.NeutronManager.get_service_plugins().get(
-+            service_constants.L3_ROUTER_NAT)
-         l3_routers = {}
-         for router in routers:
-@@ -71,7 +73,8 @@
-     def _notification(self, context, method, routers):
-         """Notify all the agents that are hosting the routers."""
--        plugin = manager.NeutronManager.get_plugin()
-+        plugin = manager.NeutronManager.get_service_plugins().get(
-+            service_constants.L3_ROUTER_NAT)
-         if utils.is_extension_supported(
-             plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):
-             self._agent_notification(context, method, routers)
-Index: neutron/neutron/db/metering/metering_db.py
-===================================================================
---- neutron.orig/neutron/db/metering/metering_db.py    2014-02-27 18:27:07.000000000 +0800
-+++ neutron/neutron/db/metering/metering_db.py 2014-04-15 01:13:25.000000000 +0800
-@@ -227,12 +227,13 @@
-         return routers_dict.values()
--    def get_sync_data_metering(self, context, label_id=None):
--        with context.session.begin(subtransactions=True):
--            if label_id:
--                label = self._get_by_id(context, MeteringLabel, label_id)
--                labels = [label]
--            else:
--                labels = self._get_collection_query(context, MeteringLabel)
-+    def get_sync_data_metering(self, context, label_id=None, router_ids=None):
-+        labels = context.session.query(MeteringLabel)
-+
-+        if label_id:
-+            labels = labels.filter(MeteringLabel.id == label_id)
-+        elif router_ids:
-+            labels = (labels.join(MeteringLabel.routers).
-+                      filter(l3_db.Router.id.in_(router_ids)))
-         return self._process_sync_metering_data(labels)
-Index: neutron/neutron/db/metering/metering_rpc.py
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ neutron/neutron/db/metering/metering_rpc.py        2014-04-15 01:13:25.000000000 +0800
-@@ -0,0 +1,59 @@
-+# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
-+#
-+# Author: Sylvain Afchain <sylvain.afchain@enovance.com>
-+#
-+# Licensed under the Apache License, Version 2.0 (the "License"); you may
-+# not use this file except in compliance with the License. You may obtain
-+# a copy of the License at
-+#
-+#      http://www.apache.org/licenses/LICENSE-2.0
-+#
-+# Unless required by applicable law or agreed to in writing, software
-+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-+# License for the specific language governing permissions and limitations
-+# under the License.
-+
-+from neutron.common import constants as consts
-+from neutron.common import rpc as p_rpc
-+from neutron.common import utils
-+from neutron import manager
-+from neutron.openstack.common import log as logging
-+from neutron.plugins.common import constants as service_constants
-+
-+LOG = logging.getLogger(__name__)
-+
-+
-+class MeteringRpcCallbacks(object):
-+
-+    RPC_API_VERSION = '1.0'
-+
-+    def __init__(self, meter_plugin):
-+        self.meter_plugin = meter_plugin
-+
-+    def create_rpc_dispatcher(self):
-+        return p_rpc.PluginRpcDispatcher([self])
-+
-+    def get_sync_data_metering(self, context, **kwargs):
-+        l3_plugin = manager.NeutronManager.get_service_plugins().get(
-+            service_constants.L3_ROUTER_NAT)
-+        if not l3_plugin:
-+            return
-+
-+        host = kwargs.get('host')
-+        if not utils.is_extension_supported(
-+            l3_plugin, consts.L3_AGENT_SCHEDULER_EXT_ALIAS) or not host:
-+            return self.meter_plugin.get_sync_data_metering(context)
-+        else:
-+            agents = l3_plugin.get_l3_agents(context, filters={'host': [host]})
-+            if not agents:
-+                LOG.error(_('Unable to find agent %s.'), host)
-+                return
-+
-+            routers = l3_plugin.list_routers_on_l3_agent(context, agents[0].id)
-+            router_ids = [router['id'] for router in routers['routers']]
-+            if not router_ids:
-+                return
-+
-+        return self.meter_plugin.get_sync_data_metering(context,
-+                                                        router_ids=router_ids)
-Index: neutron/neutron/services/metering/agents/metering_agent.py
-===================================================================
---- neutron.orig/neutron/services/metering/agents/metering_agent.py    2014-04-11 14:04:11.000000000 +0800
-+++ neutron/neutron/services/metering/agents/metering_agent.py 2014-04-15 01:13:25.000000000 +0800
-@@ -88,7 +88,7 @@
-         self.label_tenant_id = {}
-         self.routers = {}
-         self.metering_infos = {}
--        super(MeteringAgent, self).__init__(host=self.conf.host)
-+        super(MeteringAgent, self).__init__(host=host)
-     def _load_drivers(self):
-         """Loads plugin-driver from configuration."""
-Index: neutron/neutron/services/metering/metering_plugin.py
-===================================================================
---- neutron.orig/neutron/services/metering/metering_plugin.py  2013-12-10 00:11:32.000000000 +0800
-+++ neutron/neutron/services/metering/metering_plugin.py       2014-04-15 01:13:25.000000000 +0800
-@@ -15,26 +15,12 @@
- # under the License.
- from neutron.api.rpc.agentnotifiers import metering_rpc_agent_api
--from neutron.common import rpc as p_rpc
- from neutron.common import topics
- from neutron.db.metering import metering_db
-+from neutron.db.metering import metering_rpc
- from neutron.openstack.common import rpc
--class MeteringCallbacks(metering_db.MeteringDbMixin):
--
--    RPC_API_VERSION = '1.0'
--
--    def __init__(self, plugin):
--        self.plugin = plugin
--
--    def create_rpc_dispatcher(self):
--        return p_rpc.PluginRpcDispatcher([self])
--
--    def get_sync_data_metering(self, context, **kwargs):
--        return super(MeteringCallbacks, self).get_sync_data_metering(context)
--
--
- class MeteringPlugin(metering_db.MeteringDbMixin):
-     """Implementation of the Neutron Metering Service Plugin."""
-     supported_extension_aliases = ["metering"]
-@@ -42,7 +28,7 @@
-     def __init__(self):
-         super(MeteringPlugin, self).__init__()
--        self.callbacks = MeteringCallbacks(self)
-+        self.callbacks = metering_rpc.MeteringRpcCallbacks(self)
-         self.conn = rpc.create_connection(new=True)
-         self.conn.create_consumer(
-Index: neutron/neutron/tests/unit/services/metering/test_metering_plugin.py
-===================================================================
---- neutron.orig/neutron/tests/unit/services/metering/test_metering_plugin.py  2014-04-15 01:12:00.000000000 +0800
-+++ neutron/neutron/tests/unit/services/metering/test_metering_plugin.py       2014-04-15 01:13:25.000000000 +0800
-@@ -17,11 +17,16 @@
- import mock
- from neutron.api.v2 import attributes as attr
-+from neutron.common import constants as n_constants
-+from neutron.common import topics
- from neutron import context
- from neutron.db import agents_db
- from neutron.db import l3_agentschedulers_db
-+from neutron.db.metering import metering_rpc
- from neutron.extensions import l3 as ext_l3
- from neutron.extensions import metering as ext_metering
-+from neutron import manager
-+from neutron.openstack.common import timeutils
- from neutron.openstack.common import uuidutils
- from neutron.plugins.common import constants
- from neutron.tests.unit.db.metering import test_db_metering
-@@ -31,7 +36,7 @@
- _uuid = uuidutils.generate_uuid
--DB_METERING_PLUGIN_KLASS = (
-+METERING_SERVICE_PLUGIN_KLASS = (
-     "neutron.services.metering."
-     "metering_plugin.MeteringPlugin"
- )
-@@ -65,8 +70,9 @@
-     )
-     def setUp(self):
--        service_plugins = {'metering_plugin_name': DB_METERING_PLUGIN_KLASS}
-         plugin = 'neutron.tests.unit.test_l3_plugin.TestL3NatIntPlugin'
-+        service_plugins = {'metering_plugin_name':
-+                           METERING_SERVICE_PLUGIN_KLASS}
-         ext_mgr = MeteringTestExtensionManager()
-         super(TestMeteringPlugin, self).setUp(plugin=plugin, ext_mgr=ext_mgr,
-                                               service_plugins=service_plugins)
-@@ -251,12 +257,8 @@
-                 self.assertEqual(tenant_id, router['router']['tenant_id'])
--class TestRouteIntPlugin(l3_agentschedulers_db.L3AgentSchedulerDbMixin,
--                         test_l3_plugin.TestL3NatIntPlugin):
--    supported_extension_aliases = ["router", "l3_agent_scheduler"]
--
--
- class TestMeteringPluginL3AgentScheduler(
-+        l3_agentschedulers_db.L3AgentSchedulerDbMixin,
-         test_db_plugin.NeutronDbPluginV2TestCase,
-         test_l3_plugin.L3NatTestCaseMixin,
-         test_db_metering.MeteringPluginDbTestCaseMixin):
-@@ -266,10 +268,18 @@
-         for k in ext_metering.RESOURCE_ATTRIBUTE_MAP.keys()
-     )
--    def setUp(self):
--        service_plugins = {'metering_plugin_name': DB_METERING_PLUGIN_KLASS}
--        plugin_str = ('neutron.tests.unit.services.metering.'
--                      'test_metering_plugin.TestRouteIntPlugin')
-+    def setUp(self, plugin_str=None, service_plugins=None, scheduler=None):
-+        if not plugin_str:
-+            plugin_str = ('neutron.tests.unit.test_l3_plugin.'
-+                          'TestL3NatIntAgentSchedulingPlugin')
-+
-+        if not service_plugins:
-+            service_plugins = {'metering_plugin_name':
-+                               METERING_SERVICE_PLUGIN_KLASS}
-+
-+        if not scheduler:
-+            scheduler = plugin_str
-+
-         ext_mgr = MeteringTestExtensionManager()
-         super(TestMeteringPluginL3AgentScheduler,
-               self).setUp(plugin=plugin_str, ext_mgr=ext_mgr,
-@@ -291,7 +301,7 @@
-                                         return_value=self.ctx)
-         self.mock_context = self.context_patch.start()
--        self.l3routers_patch = mock.patch(plugin_str +
-+        self.l3routers_patch = mock.patch(scheduler +
-                                           '.get_l3_agents_hosting_routers')
-         self.l3routers_mock = self.l3routers_patch.start()
-@@ -299,30 +309,40 @@
-     def test_add_metering_label_rpc_call(self):
-         second_uuid = 'e27fe2df-376e-4ac7-ae13-92f050a21f84'
--        expected = {'args': {'routers': [{'status': 'ACTIVE',
--                                          'name': 'router1',
--                                          'gw_port_id': None,
--                                          'admin_state_up': True,
--                                          'tenant_id': self.tenant_id,
--                                          '_metering_labels': [
--                                              {'rules': [],
--                                               'id': second_uuid}],
--                                          'id': self.uuid},
--                                         {'status': 'ACTIVE',
--                                          'name': 'router2',
--                                          'gw_port_id': None,
--                                          'admin_state_up': True,
--                                          'tenant_id': self.tenant_id,
--                                          '_metering_labels': [
--                                              {'rules': [],
--                                               'id': second_uuid}],
--                                          'id': second_uuid}]},
--                    'namespace': None,
--                    'method': 'add_metering_label'}
-+        expected1 = {'args': {'routers': [{'status': 'ACTIVE',
-+                                           'name': 'router1',
-+                                           'gw_port_id': None,
-+                                           'admin_state_up': True,
-+                                           'tenant_id': self.tenant_id,
-+                                           '_metering_labels': [
-+                                               {'rules': [],
-+                                                'id': second_uuid}],
-+                                           'id': self.uuid}]},
-+                     'namespace': None,
-+                     'method': 'add_metering_label'}
-+        expected2 = {'args': {'routers': [{'status': 'ACTIVE',
-+                                           'name': 'router2',
-+                                           'gw_port_id': None,
-+                                           'admin_state_up': True,
-+                                           'tenant_id': self.tenant_id,
-+                                           '_metering_labels': [
-+                                               {'rules': [],
-+                                                'id': second_uuid}],
-+                                           'id': second_uuid}]},
-+                     'namespace': None,
-+                     'method': 'add_metering_label'}
-+
-+        # bind each router to a specific agent
-+        agent1 = agents_db.Agent(host='agent1')
-+        agent2 = agents_db.Agent(host='agent2')
-+
-+        agents = {self.uuid: agent1,
-+                  second_uuid: agent2}
-+
-+        def side_effect(context, routers, admin_state_up, active):
-+            return [agents[routers[0]]]
--        agent_host = 'l3_agent_host'
--        agent = agents_db.Agent(host=agent_host)
--        self.l3routers_mock.return_value = [agent]
-+        self.l3routers_mock.side_effect = side_effect
-         with self.router(name='router1', tenant_id=self.tenant_id,
-                          set_context=True):
-@@ -331,7 +351,99 @@
-                              set_context=True):
-                 with self.metering_label(tenant_id=self.tenant_id,
-                                          set_context=True):
--                    topic = "%s.%s" % (self.topic, agent_host)
--                    self.mock_cast.assert_called_with(self.ctx,
--                                                      expected,
--                                                      topic=topic)
-+
-+                    topic1 = "%s.%s" % (self.topic, 'agent1')
-+                    topic2 = "%s.%s" % (self.topic, 'agent2')
-+
-+                    # check if there is a call per agent
-+                    expected = [mock.call(self.ctx, expected1, topic=topic1),
-+                                mock.call(self.ctx, expected2, topic=topic2)]
-+
-+                    self.mock_cast.assert_has_calls(expected, any_order=True)
-+
-+
-+class TestMeteringPluginL3AgentSchedulerServicePlugin(
-+        TestMeteringPluginL3AgentScheduler):
-+
-+    """Unit tests for the case where separate service plugin
-+    implements L3 routing.
-+    """
-+
-+    def setUp(self):
-+        l3_plugin = ('neutron.tests.unit.test_l3_plugin.'
-+                     'TestL3NatAgentSchedulingServicePlugin')
-+        service_plugins = {'metering_plugin_name':
-+                           METERING_SERVICE_PLUGIN_KLASS,
-+                           'l3_plugin_name': l3_plugin}
-+
-+        plugin_str = ('neutron.tests.unit.test_l3_plugin.'
-+                      'TestNoL3NatPlugin')
-+
-+        super(TestMeteringPluginL3AgentSchedulerServicePlugin, self).setUp(
-+            plugin_str=plugin_str, service_plugins=service_plugins,
-+            scheduler=l3_plugin)
-+
-+
-+class TestMeteringPluginRpcFromL3Agent(
-+        test_db_plugin.NeutronDbPluginV2TestCase,
-+        test_l3_plugin.L3NatTestCaseMixin,
-+        test_db_metering.MeteringPluginDbTestCaseMixin):
-+
-+    resource_prefix_map = dict(
-+        (k.replace('_', '-'), constants.COMMON_PREFIXES[constants.METERING])
-+        for k in ext_metering.RESOURCE_ATTRIBUTE_MAP
-+    )
-+
-+    def setUp(self):
-+        service_plugins = {'metering_plugin_name':
-+                           METERING_SERVICE_PLUGIN_KLASS}
-+
-+        plugin = ('neutron.tests.unit.test_l3_plugin.'
-+                  'TestL3NatIntAgentSchedulingPlugin')
-+
-+        ext_mgr = MeteringTestExtensionManager()
-+        super(TestMeteringPluginRpcFromL3Agent,
-+              self).setUp(plugin=plugin, service_plugins=service_plugins,
-+                          ext_mgr=ext_mgr)
-+
-+        self.meter_plugin = manager.NeutronManager.get_service_plugins().get(
-+            constants.METERING)
-+
-+        self.adminContext = context.get_admin_context()
-+        self._register_l3_agent('agent1')
-+
-+    def _register_l3_agent(self, host):
-+        agent = {
-+            'binary': 'neutron-l3-agent',
-+            'host': host,
-+            'topic': topics.L3_AGENT,
-+            'configurations': {},
-+            'agent_type': n_constants.AGENT_TYPE_L3,
-+            'start_flag': True
-+        }
-+        callback = agents_db.AgentExtRpcCallback()
-+        callback.report_state(self.adminContext,
-+                              agent_state={'agent_state': agent},
-+                              time=timeutils.strtime())
-+
-+    def test_get_sync_data_metering(self):
-+        with self.subnet() as subnet:
-+            s = subnet['subnet']
-+            self._set_net_external(s['network_id'])
-+            with self.router(name='router1', subnet=subnet) as router:
-+                r = router['router']
-+                self._add_external_gateway_to_router(r['id'], s['network_id'])
-+                with self.metering_label(tenant_id=r['tenant_id']):
-+                    callbacks = metering_rpc.MeteringRpcCallbacks(
-+                        self.meter_plugin)
-+                    data = callbacks.get_sync_data_metering(self.adminContext,
-+                                                            host='agent1')
-+                    self.assertEqual('router1', data[0]['name'])
-+
-+                    self._register_l3_agent('agent2')
-+                    data = callbacks.get_sync_data_metering(self.adminContext,
-+                                                            host='agent2')
-+                    self.assertFalse(data)
-+
-+                self._remove_external_gateway_from_router(
-+                    r['id'], s['network_id'])
-Index: neutron/neutron/tests/unit/test_l3_plugin.py
-===================================================================
---- neutron.orig/neutron/tests/unit/test_l3_plugin.py  2014-04-15 01:12:00.000000000 +0800
-+++ neutron/neutron/tests/unit/test_l3_plugin.py       2014-04-15 01:13:25.000000000 +0800
-@@ -277,6 +277,15 @@
-         return "L3 Routing Service Plugin for testing"
-+# A L3 routing with L3 agent scheduling service plugin class for tests with
-+# plugins that delegate away L3 routing functionality
-+class TestL3NatAgentSchedulingServicePlugin(TestL3NatServicePlugin,
-+                                            l3_agentschedulers_db.
-+                                            L3AgentSchedulerDbMixin):
-+
-+    supported_extension_aliases = ["router", "l3_agent_scheduler"]
-+
-+
- class L3NatTestCaseMixin(object):
-     def _create_router(self, fmt, tenant_id, name=None,
diff --git a/debian/patches/Properly_apply_column_default_in_migration_pool_monitor_status.patch b/debian/patches/Properly_apply_column_default_in_migration_pool_monitor_status.patch
deleted file mode 100644 (file)
index 2353aff..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Eugene Nikanorov <enikanorov@mirantis.com>
-Date: Thu, 10 Apr 2014 09:36:45 +0000 (+0400)
-Subject: Properly apply column default in migration pool_monitor_status
-X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff_plain;h=c7dceedde516170d1a6ac1257103bdacb3b0cc84
-
-Properly apply column default in migration pool_monitor_status
-
-server_default parameter should be used to apply default value at
-table/column creation time. Otherwise non-nullable column can't
-be created because of existing rows in the tables.
-
-Change-Id: I7136e6a0dfb9dc66ca63ff3c9fcf6de164e27e63
-Closes-Bug: #1305725
----
-
-diff --git a/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py b/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
-index a31bf6a..598f2ab 100644
---- a/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
-+++ b/neutron/db/migration/alembic_migrations/versions/11c6e18605c8_pool_monitor_status_.py
-@@ -45,6 +45,7 @@ def upgrade(active_plugins=None, options=None):
-     op.add_column('poolmonitorassociations', sa.Column('status',
-                                                        sa.String(16),
-+                                                       server_default='',
-                                                        nullable=False))
-     op.add_column('poolmonitorassociations', sa.Column('status_description',
-                                                        sa.String(255)))
index b395a1857320328e710a47009fce0e81f4b92a20..4a7b9d8bae85d17e8c5bc18ceb89bacdfbbe2f4a 100644 (file)
@@ -31,8 +31,8 @@ Last-Update: <YYYY-MM-DD>
 
 Index: neutron/etc/l3_agent.ini
 ===================================================================
---- neutron.orig/etc/l3_agent.ini      2014-09-19 18:09:42.000000000 +0800
-+++ neutron/etc/l3_agent.ini   2014-09-19 18:10:35.000000000 +0800
+--- neutron.orig/etc/l3_agent.ini      2014-10-03 19:07:30.000000000 +0800
++++ neutron/etc/l3_agent.ini   2014-10-03 19:11:29.000000000 +0800
 @@ -4,11 +4,10 @@
  
  # L3 requires that an interface driver be set. Choose the one that best
@@ -48,8 +48,8 @@ Index: neutron/etc/l3_agent.ini
  # Support kernels with limited namespace support
 Index: neutron/etc/neutron.conf
 ===================================================================
---- neutron.orig/etc/neutron.conf      2014-09-19 18:09:42.000000000 +0800
-+++ neutron/etc/neutron.conf   2014-09-19 18:10:35.000000000 +0800
+--- neutron.orig/etc/neutron.conf      2014-10-03 19:07:30.000000000 +0800
++++ neutron/etc/neutron.conf   2014-10-03 19:11:29.000000000 +0800
 @@ -60,8 +60,8 @@
  # previous versions, the class name of a plugin can be specified instead of its
  # entrypoint name.
@@ -70,7 +70,7 @@ Index: neutron/etc/neutron.conf
  
  # Paste configuration file
  # api_paste_config = api-paste.ini
-@@ -324,7 +324,7 @@
+@@ -340,7 +340,7 @@
  
  # The RabbitMQ broker address where a single node is used.
  # (string value)
@@ -79,7 +79,7 @@ Index: neutron/etc/neutron.conf
  
  # The RabbitMQ broker port where a single node is used.
  # (integer value)
-@@ -337,10 +337,10 @@
+@@ -353,10 +353,10 @@
  #rabbit_use_ssl=false
  
  # The RabbitMQ userid. (string value)
@@ -92,7 +92,7 @@ Index: neutron/etc/neutron.conf
  
  # the RabbitMQ login method (string value)
  #rabbit_login_method=AMQPLAIN
-@@ -527,7 +527,7 @@
+@@ -543,7 +543,7 @@
  # Use "sudo neutron-rootwrap /etc/neutron/rootwrap.conf" to use the real
  # root filter facility.
  # Change to "sudo" to skip the filtering and just run the comand directly
@@ -101,7 +101,7 @@ Index: neutron/etc/neutron.conf
  
  # =========== items for agent management extension =============
  # seconds between nodes reporting state to server; should be less than
-@@ -547,14 +547,13 @@
+@@ -563,14 +563,13 @@
  [database]
  # This line MUST be changed to actually run the plugin.
  # Example:
@@ -119,8 +119,8 @@ Index: neutron/etc/neutron.conf
  # migration
 Index: neutron/etc/lbaas_agent.ini
 ===================================================================
---- neutron.orig/etc/lbaas_agent.ini   2014-09-19 18:00:25.000000000 +0800
-+++ neutron/etc/lbaas_agent.ini        2014-09-19 18:10:35.000000000 +0800
+--- neutron.orig/etc/lbaas_agent.ini   2014-10-03 19:03:50.000000000 +0800
++++ neutron/etc/lbaas_agent.ini        2014-10-03 19:11:29.000000000 +0800
 @@ -9,11 +9,10 @@
  
  # LBaas requires an interface driver be set. Choose the one that best
@@ -136,8 +136,8 @@ Index: neutron/etc/lbaas_agent.ini
  # Support kernels with limited namespace support
 Index: neutron/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
 ===================================================================
---- neutron.orig/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini        2014-09-19 18:00:25.000000000 +0800
-+++ neutron/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini     2014-09-19 18:10:35.000000000 +0800
+--- neutron.orig/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini        2014-10-03 19:03:50.000000000 +0800
++++ neutron/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini     2014-10-03 19:11:29.000000000 +0800
 @@ -30,22 +30,22 @@
  #          point setting tunnel_type below will be required to enable
  #          tunneling.
index b8f178e8bc796c70efa29781366e084d61261bae..70fe78d58f7cf69a208cda388d208942796811f5 100644 (file)
@@ -6,255 +6,118 @@ Author: Thomas Goirand <zigo@debian.org>
 Bug-Debian: http://bugs.debian.org/726719
 Bug-Ubuntu: https://launchpad.net/bugs/1241952
 Forwarded: https://review.openstack.org/#/c/52636
-Last-Update: 2014-07-31
+Last-Update: 2014-10-03
 
-Index: neutron/neutron/db/migration/alembic_migrations/versions/35c7c198ddea_lbaas_healthmon_del_status.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/35c7c198ddea_lbaas_healthmon_del_status.py   2014-09-19 18:00:25.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/35c7c198ddea_lbaas_healthmon_del_status.py        2014-09-19 18:10:26.000000000 +0800
-@@ -41,8 +41,48 @@
- def upgrade(active_plugins=None, options=None):
-     if not migration.should_run(active_plugins, migration_for_plugins):
-         return
--    op.drop_column('healthmonitors', 'status')
--    op.drop_column('healthmonitors', 'status_description')
-+    bind = op.get_bind()
-+    engine = bind.engine
-+    if engine.name == 'sqlite':
-+        op.execute("CREATE TEMPORARY TABLE healthmonitors_backup ( "
-+                   "tenant_id VARCHAR(255),  "
-+                   "id VARCHAR(36) NOT NULL, "
-+                   "type VARCHAR(5) NOT NULL, "
-+                   "delay INTEGER NOT NULL, "
-+                   "timeout INTEGER NOT NULL, "
-+                   "max_retries INTEGER NOT NULL, "
-+                   "http_method VARCHAR(16), "
-+                   "url_path VARCHAR(255), "
-+                   "expected_codes VARCHAR(64), "
-+                   "admin_state_up BOOLEAN NOT NULL, "
-+                   "PRIMARY KEY (id), "
-+                   "CONSTRAINT healthmontiors_type CHECK (type IN ('PING', 'TCP', 'HTTP', 'HTTPS')), "
-+                   "CHECK (admin_state_up IN (0, 1)));")
-+        op.execute("INSERT INTO healthmonitors_backup SELECT "
-+                   "tenant_id,id,type,delay,timeout,max_retries,http_method,url_path,expected_codes,admin_state_up "
-+                   "FROM healthmonitors;")
-+        op.execute("DROP TABLE healthmonitors;");
-+        op.execute("CREATE TEMPORARY TABLE healthmonitors ( "
-+                   "tenant_id VARCHAR(255),  "
-+                   "id VARCHAR(36) NOT NULL, "
-+                   "type VARCHAR(5) NOT NULL, "
-+                   "delay INTEGER NOT NULL, "
-+                   "timeout INTEGER NOT NULL, "
-+                   "max_retries INTEGER NOT NULL, "
-+                   "http_method VARCHAR(16), "
-+                   "url_path VARCHAR(255), "
-+                   "expected_codes VARCHAR(64), "
-+                   "admin_state_up BOOLEAN NOT NULL, "
-+                   "PRIMARY KEY (id), "
-+                   "CONSTRAINT healthmontiors_type CHECK (type IN ('PING', 'TCP', 'HTTP', 'HTTPS')), "
-+                   "CHECK (admin_state_up IN (0, 1)));")
-+        op.execute("INSERT INTO healthmonitors SELECT "
-+                   "tenant_id,id,type,delay,timeout,max_retries,http_method,url_path,expected_codes,admin_state_up "
-+                   "FROM healthmonitors_backup;")
-+        op.execute("DROP TABLE healthmonitors_backup;");
-+    else:
-+        op.drop_column('healthmonitors', 'status')
-+        op.drop_column('healthmonitors', 'status_description')
- def downgrade(active_plugins=None, options=None):
-Index: neutron/neutron/db/migration/alembic_migrations/versions/50d5ba354c23_ml2_binding_vif_details.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/50d5ba354c23_ml2_binding_vif_details.py      2014-09-19 18:09:42.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/50d5ba354c23_ml2_binding_vif_details.py   2014-09-19 18:10:26.000000000 +0800
-@@ -53,19 +53,63 @@
+--- neutron-2014.2~rc1.orig/neutron/db/migration/alembic_migrations/versions/50d5ba354c23_ml2_binding_vif_details.py
++++ neutron-2014.2~rc1/neutron/db/migration/alembic_migrations/versions/50d5ba354c23_ml2_binding_vif_details.py
+@@ -50,6 +50,45 @@ def upgrade():
              "UPDATE ml2_port_bindings SET"
              " vif_details = '{\"port_filter\": false}'"
              " WHERE cap_port_filter = 0")
-+
++        op.drop_column('ml2_port_bindings', 'cap_port_filter')
++    elif op.get_bind().engine.name == 'sqlite':
++        op.execute("CREATE TEMPORARY TABLE ml2_port_bindings_backup ( "
++            "port_id VARCHAR(36) NOT NULL, "    
++            "host VARCHAR(255) NOT NULL, "      
++            "vif_type VARCHAR(64) NOT NULL, "   
++            "cap_port_filter BOOLEAN NOT NULL, "
++            "driver VARCHAR(64), " 
++            "segment VARCHAR(36), "
++            "vnic_type VARCHAR(64) DEFAULT 'normal' NOT NULL, "
++            "vif_details VARCHAR(4095) DEFAULT '' NOT NULL, "
++            "PRIMARY KEY (port_id), "
++            "FOREIGN KEY(port_id) REFERENCES ports (id) ON DELETE CASCADE, "
++            "FOREIGN KEY(segment) REFERENCES ml2_network_segments (id) ON DELETE SET NULL, "
++            "CHECK (cap_port_filter IN (0, 1)));") 
++        op.execute("INSERT INTO ml2_port_bindings_backup "
++            "(port_id,host,vif_type,cap_port_filter,driver,segment,vnic_type) "
++            "SELECT port_id,host,vif_type,cap_port_filter,driver,segment,vnic_type "
++            "FROM ml2_port_bindings;")
++        for value in ('true', 'false'):
++            op.execute("UPDATE ml2_port_bindings_backup SET"
++                       " vif_details = '{\"port_filter\": %(value)s}'"
++                       " WHERE cap_port_filter = '%(value)s'" % {'value': value})
++        op.execute("DROP TABLE ml2_port_bindings")
++        op.execute("CREATE TABLE ml2_port_bindings ( "
++            "port_id VARCHAR(36) NOT NULL, " 
++            "host VARCHAR(255) NOT NULL, "   
++            "vif_type VARCHAR(64) NOT NULL, "
++            "driver VARCHAR(64), " 
++            "segment VARCHAR(36), "
++            "vnic_type VARCHAR(64) DEFAULT 'normal' NOT NULL, "
++            "vif_details VARCHAR(4095) DEFAULT '' NOT NULL, "
++            "PRIMARY KEY (port_id), "
++            "FOREIGN KEY(port_id) REFERENCES ports (id) ON DELETE CASCADE, "
++            "FOREIGN KEY(segment) REFERENCES ml2_network_segments (id) ON DELETE SET NULL);")
++        op.execute("INSERT INTO ml2_port_bindings "
++            "SELECT port_id,host,vif_type,driver,segment,vnic_type,vif_details "
++            "FROM ml2_port_bindings_backup;")
++        op.execute("DROP TABLE ml2_port_bindings_backup")
      else:
--        op.execute(
--            "UPDATE ml2_port_bindings SET"
--            " vif_details = '{\"port_filter\": true}'"
--            " WHERE cap_port_filter = true")
--        op.execute(
--            "UPDATE ml2_port_bindings SET"
--            " vif_details = '{\"port_filter\": false}'"
--            " WHERE cap_port_filter = false")
+         op.execute(
+             "UPDATE ml2_port_bindings SET"
+@@ -59,7 +98,7 @@ def upgrade():
+             "UPDATE ml2_port_bindings SET"
+             " vif_details = '{\"port_filter\": false}'"
+             " WHERE cap_port_filter = false")
 -    op.drop_column('ml2_port_bindings', 'cap_port_filter')
-+        if op.get_bind().engine.name == 'sqlite':
-+            op.execute("CREATE TEMPORARY TABLE ml2_port_bindings_backup ( "
-+                       "port_id VARCHAR(36) NOT NULL, "
-+                       "host VARCHAR(255) NOT NULL, "
-+                       "vif_type VARCHAR(64) NOT NULL, "
-+                       "cap_port_filter BOOLEAN NOT NULL, "
-+                       "driver VARCHAR(64), "
-+                       "segment VARCHAR(36), "
-+                       "vnic_type VARCHAR(64) DEFAULT 'normal' NOT NULL, "
-+                       "vif_details VARCHAR(4095) DEFAULT '' NOT NULL, "
-+                       "PRIMARY KEY (port_id), "
-+                       "FOREIGN KEY(port_id) REFERENCES ports (id) ON DELETE CASCADE, "
-+                       "FOREIGN KEY(segment) REFERENCES ml2_network_segments (id) ON DELETE SET NULL, "
-+                       "CHECK (cap_port_filter IN (0, 1)));")
-+            op.execute("INSERT INTO ml2_port_bindings_backup "
-+                       "(port_id,host,vif_type,cap_port_filter,driver,segment,vnic_type) "
-+                       "SELECT port_id,host,vif_type,cap_port_filter,driver,segment,vnic_type "
-+                       "FROM ml2_port_bindings;")
-+            for value in ('true', 'false'):
-+                op.execute("UPDATE ml2_port_bindings_backup SET"
-+                           " vif_details = '{\"port_filter\": %(value)s}'"
-+                           " WHERE cap_port_filter = '%(value)s'" % {'value': value})
-+            op.execute("DROP TABLE ml2_port_bindings")
-+            op.execute("CREATE TABLE ml2_port_bindings ( "
-+                       "port_id VARCHAR(36) NOT NULL, "
-+                       "host VARCHAR(255) NOT NULL, "
-+                       "vif_type VARCHAR(64) NOT NULL, "
-+                       "driver VARCHAR(64), "
-+                       "segment VARCHAR(36), "
-+                       "vnic_type VARCHAR(64) DEFAULT 'normal' NOT NULL, "
-+                       "vif_details VARCHAR(4095) DEFAULT '' NOT NULL, "
-+                       "PRIMARY KEY (port_id), "
-+                       "FOREIGN KEY(port_id) REFERENCES ports (id) ON DELETE CASCADE, "
-+                       "FOREIGN KEY(segment) REFERENCES ml2_network_segments (id) ON DELETE SET NULL);")
-+            op.execute("INSERT INTO ml2_port_bindings "
-+                       "SELECT port_id,host,vif_type,driver,segment,vnic_type,vif_details "
-+                       "FROM ml2_port_bindings_backup;")
-+            op.execute("DROP TABLE ml2_port_bindings_backup")
-+        else:
-+        
-+             op.execute(
-+                "UPDATE ml2_port_bindings SET"
-+                " vif_details = '{\"port_filter\": true}'"
-+                " WHERE cap_port_filter = true")
-+            op.execute(
-+                "UPDATE ml2_port_bindings SET"
-+                " vif_details = '{\"port_filter\": false}'"
-+                " WHERE cap_port_filter = false")
-+            op.drop_column('ml2_port_bindings', 'cap_port_filter')
-+
++        op.drop_column('ml2_port_bindings', 'cap_port_filter')
      if op.get_bind().engine.name == 'ibm_db_sa':
          op.execute("CALL SYSPROC.ADMIN_CMD('REORG TABLE ml2_port_bindings')")
  
-+    
-+
- def downgrade(active_plugins=None, options=None):
-     pass
-Index: neutron/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py  2014-09-19 18:00:25.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py       2014-09-19 18:10:26.000000000 +0800
-@@ -59,7 +59,7 @@
-     op.add_column('routers', sa.Column('enable_snat', sa.Boolean(),
-                                        nullable=False, server_default="1"))
-     # Set enable_snat to True for existing routers
--    op.execute("UPDATE routers SET enable_snat=True")
-+    op.execute("UPDATE routers SET enable_snat='True'")
- def downgrade(active_plugins=None, options=None):
-Index: neutron/neutron/db/migration/alembic_migrations/versions/63afba73813_ovs_tunnelendpoints_id_unique.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/63afba73813_ovs_tunnelendpoints_id_unique.py 2014-09-19 18:00:25.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/63afba73813_ovs_tunnelendpoints_id_unique.py      2014-09-19 18:10:26.000000000 +0800
-@@ -44,11 +44,27 @@
-     if not migration.should_run(active_plugins, migration_for_plugins):
-         return
--    op.create_unique_constraint(
--        name=CONSTRAINT_NAME,
--        source=TABLE_NAME,
--        local_cols=['id']
--    )
-+    bind = op.get_bind()
-+    engine = bind.engine
-+    if engine.name == 'sqlite':
-+        op.execute("CREATE TEMPORARY TABLE ovs_tunnel_endpoints_backup ( "
-+                   "ip_address VARCHAR(64) NOT NULL, "
-+                   "id INTEGER NOT NULL UNIQUE, "
-+                   "PRIMARY KEY (ip_address) );")
-+        op.execute("INSERT INTO ovs_tunnel_endpoints_backup SELECT ip_address,id FROM ovs_tunnel_endpoints;")
-+        op.execute("DROP TABLE ovs_tunnel_endpoints;");
-+        op.execute("CREATE TABLE ovs_tunnel_endpoints ( "
-+                   "ip_address VARCHAR(64) NOT NULL, "
-+                   "id INTEGER UNIQUE NOT NULL, "
-+                   "PRIMARY KEY (ip_address) );")
-+        op.execute("INSERT INTO ovs_tunnel_endpoints SELECT ip_address,id FROM ovs_tunnel_endpoints_backup;")
-+        op.execute("DROP TABLE ovs_tunnel_endpoints_backup;")
-+    else:
-+        op.create_unique_constraint(
-+            name=CONSTRAINT_NAME,
-+            source=TABLE_NAME,
-+            local_cols=['id']
-+        )
- def downgrade(active_plugins=None, options=None):
-Index: neutron/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py  2014-09-19 18:09:42.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py       2014-09-19 18:10:26.000000000 +0800
-@@ -45,11 +45,17 @@
-     if not migration.should_run(active_plugins, migration_for_plugins):
-         return
--    op.create_unique_constraint(
--        name=CONSTRAINT_NAME,
--        source=TABLE_NAME,
--        local_cols=['pool_id', 'address', 'protocol_port']
--    )
-+    bind = op.get_bind()
-+    engine = bind.engine
-+    if engine.name == 'sqlite':
-+        op.execute("CREATE UNIQUE INDEX uniq_member0pool_id0address0port "
-+                   "on members (pool_id,address,protocol_port);")
-+    else:
-+        op.create_unique_constraint(
-+            name=CONSTRAINT_NAME,
-+            source=TABLE_NAME,
-+            local_cols=['pool_id', 'address', 'protocol_port']
-+        )
- def downgrade(active_plugins=None, options=None):
-Index: neutron/neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py        2014-09-19 18:09:42.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py     2014-09-19 18:10:26.000000000 +0800
-@@ -41,14 +41,19 @@
-     if not migration.should_run(active_plugins, migration_for_plugins):
-         return
--    op.alter_column('poolstatisticss', 'bytes_in',
--                    type_=sa.BigInteger(), existing_type=sa.Integer())
--    op.alter_column('poolstatisticss', 'bytes_out',
--                    type_=sa.BigInteger(), existing_type=sa.Integer())
--    op.alter_column('poolstatisticss', 'active_connections',
--                    type_=sa.BigInteger(), existing_type=sa.Integer())
--    op.alter_column('poolstatisticss', 'total_connections',
--                    type_=sa.BigInteger(), existing_type=sa.Integer())
-+    bind = op.get_bind()
-+    engine = bind.engine
-+    # There's no such thing as "BIGINT" in SQLite, just INTEGER,
-+    # so we have nothing to do for SQLite.
-+    if engine.name != 'sqlite':
-+        op.alter_column('poolstatisticss', 'bytes_in',
-+                        type_=sa.BigInteger(), existing_type=sa.Integer())
-+        op.alter_column('poolstatisticss', 'bytes_out',
-+                        type_=sa.BigInteger(), existing_type=sa.Integer())
-+        op.alter_column('poolstatisticss', 'active_connections',
-+                        type_=sa.BigInteger(), existing_type=sa.Integer())
-+        op.alter_column('poolstatisticss', 'total_connections',
-+                        type_=sa.BigInteger(), existing_type=sa.Integer())
- def downgrade(active_plugins=None, options=None):
-Index: neutron/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py       2014-09-19 18:09:42.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py    2014-09-19 18:10:26.000000000 +0800
-@@ -54,11 +54,17 @@
-     if not migration.should_run(active_plugins, migration_for_plugins):
+--- neutron-2014.2~rc1.orig/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py
++++ neutron-2014.2~rc1/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py
+@@ -36,11 +36,15 @@ TABLE_NAME = 'members'
+ def upgrade():
+     if migration.schema_has_table(TABLE_NAME):
+-        op.create_unique_constraint(
+-            name=CONSTRAINT_NAME,
+-            source=TABLE_NAME,
+-            local_cols=['pool_id', 'address', 'protocol_port']
+-        )
++        if op.get_bind().engine.name == 'sqlite':
++            op.execute("CREATE UNIQUE INDEX uniq_member0pool_id0address0port "
++                       "on members (pool_id,address,protocol_port);")
++        else:
++            op.create_unique_constraint(
++                name=CONSTRAINT_NAME,
++                source=TABLE_NAME,
++                local_cols=['pool_id', 'address', 'protocol_port']
++            )
+ def downgrade():
+--- neutron-2014.2~rc1.orig/neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py
++++ neutron-2014.2~rc1/neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py
+@@ -34,14 +34,15 @@ from neutron.db import migration
+ def upgrade():
+     if migration.schema_has_table('poolstatisticss'):
+-        op.alter_column('poolstatisticss', 'bytes_in',
+-                        type_=sa.BigInteger(), existing_type=sa.Integer())
+-        op.alter_column('poolstatisticss', 'bytes_out',
+-                        type_=sa.BigInteger(), existing_type=sa.Integer())
+-        op.alter_column('poolstatisticss', 'active_connections',
+-                        type_=sa.BigInteger(), existing_type=sa.Integer())
+-        op.alter_column('poolstatisticss', 'total_connections',
+-                        type_=sa.BigInteger(), existing_type=sa.Integer())
++        if op.get_bind().engine.name != 'sqlite':
++            op.alter_column('poolstatisticss', 'bytes_in',
++                            type_=sa.BigInteger(), existing_type=sa.Integer())
++            op.alter_column('poolstatisticss', 'bytes_out',
++                            type_=sa.BigInteger(), existing_type=sa.Integer())
++            op.alter_column('poolstatisticss', 'active_connections',
++                            type_=sa.BigInteger(), existing_type=sa.Integer())
++            op.alter_column('poolstatisticss', 'total_connections',
++                            type_=sa.BigInteger(), existing_type=sa.Integer())
+ def downgrade():
+--- neutron-2014.2~rc1.orig/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py
++++ neutron-2014.2~rc1/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py
+@@ -41,11 +41,15 @@ def upgrade():
+         # configured plugin did not create the agents table.
          return
  
 -    op.create_unique_constraint(
@@ -262,9 +125,7 @@ Index: neutron/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_age
 -        source=TABLE_NAME,
 -        local_cols=['agent_type', 'host']
 -    )
-+    bind = op.get_bind()
-+    engine = bind.engine
-+    if engine.name == 'sqlite':
++    if op.get_bind().engine.name == 'sqlite':
 +        op.execute("CREATE UNIQUE INDEX uniq_agents0agent_type0host "
 +                   "on agents (agent_type,host);")
 +    else:
@@ -275,52 +136,4 @@ Index: neutron/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_age
 +        )
  
  
- def downgrade(active_plugins=None, options=None):
-Index: neutron/neutron/db/migration/alembic_migrations/versions/f9263d6df56_remove_dhcp_lease.py
-===================================================================
---- neutron.orig/neutron/db/migration/alembic_migrations/versions/f9263d6df56_remove_dhcp_lease.py     2014-09-19 18:00:25.000000000 +0800
-+++ neutron/neutron/db/migration/alembic_migrations/versions/f9263d6df56_remove_dhcp_lease.py  2014-09-19 18:10:26.000000000 +0800
-@@ -36,7 +36,42 @@
- def upgrade(active_plugins=None, options=None):
--    op.drop_column('ipallocations', u'expiration')
-+    bind = op.get_bind()
-+    engine = bind.engine
-+    if engine.name == 'sqlite':
-+        op.execute("CREATE TEMPORARY TABLE ipallocations_backup ("
-+                   "port_id VARCHAR(36), "
-+                   "ip_address VARCHAR(64) NOT NULL, "
-+                   "subnet_id VARCHAR(36) NOT NULL, "
-+                   "network_id VARCHAR(36) NOT NULL, "
-+                   "PRIMARY KEY (ip_address, subnet_id, network_id), "
-+                   "FOREIGN KEY(network_id) REFERENCES networks (id) "
-+                   "ON DELETE CASCADE, "
-+                   "FOREIGN KEY(port_id) REFERENCES ports (id) "
-+                   "ON DELETE CASCADE, "
-+                   "FOREIGN KEY(subnet_id) REFERENCES subnets (id) "
-+                   "ON DELETE CASCADE "
-+                   ");")
-+        op.execute("INSERT INTO ipallocations_backup "
-+                   "SELECT port_id,ip_address,subnet_id,network_id "
-+                   "FROM ipallocations;")
-+        op.execute("DROP TABLE ipallocations;")
-+        op.execute("CREATE TABLE ipallocations ("
-+                   "port_id VARCHAR(36), "
-+                   "ip_address VARCHAR(64) NOT NULL, "
-+                   "subnet_id VARCHAR(36) NOT NULL, "
-+                   "network_id VARCHAR(36) NOT NULL, "
-+                   "PRIMARY KEY (ip_address, subnet_id, network_id), "
-+                   "FOREIGN KEY(network_id) REFERENCES networks (id) ON DELETE CASCADE, "
-+                   "FOREIGN KEY(port_id) REFERENCES ports (id) ON DELETE CASCADE, "
-+                   "FOREIGN KEY(subnet_id) REFERENCES subnets (id) ON DELETE CASCADE "
-+                   ");")
-+        op.execute("INSERT INTO ipallocations "
-+                   "SELECT port_id,ip_address,subnet_id,network_id "
-+                   "FROM ipallocations_backup;")
-+        op.execute("DROP TABLE ipallocations_backup;")
-+    else:
-+        op.drop_column('ipallocations', u'expiration')
- def downgrade(active_plugins=None, options=None):
+ def downgrade():
diff --git a/debian/patches/sane-defaults-for-dhcp_agent.ini.patch b/debian/patches/sane-defaults-for-dhcp_agent.ini.patch
deleted file mode 100644 (file)
index 6f8001a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-Description: Sane defaults for dhcp_agent.ini
- Otherwise it doesn't work by default, which is a pitty...
-Author: Thomas Goirand <zigo@debian.org>
-Forwarded: no
-Last-Update: 2014-06-07
-
---- neutron-2014.1.orig/etc/dhcp_agent.ini
-+++ neutron-2014.1/etc/dhcp_agent.ini
-@@ -9,26 +9,21 @@
- # The DHCP agent requires an interface driver be set. Choose the one that best
- # matches your plugin.
--# interface_driver =
--
--# Example of interface_driver option for OVS based plugins(OVS, Ryu, NEC, NVP,
--# BigSwitch/Floodlight)
--# interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
-+# Example of interface_driver option for OVS based plugins (OVS, Ryu, NEC, NVP, BigSwitch/Floodlight): interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
-+# Example of interface_driver option for LinuxBridge: interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
-+interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
- # Name of Open vSwitch bridge to use
--# ovs_integration_bridge = br-int
-+ovs_integration_bridge = br-int
- # Use veth for an OVS interface or not.
- # Support kernels with limited namespace support
- # (e.g. RHEL 6.5) so long as ovs_use_veth is set to True.
- # ovs_use_veth = False
--# Example of interface_driver option for LinuxBridge
--# interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
--
- # The agent can use other DHCP drivers.  Dnsmasq is the simplest and requires
- # no additional setup of the DHCP server.
--# dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
-+dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
- # Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and
- # iproute2 package that supports namespaces).
diff --git a/debian/patches/sane-defaults-for-ml2_conf.ini.patch b/debian/patches/sane-defaults-for-ml2_conf.ini.patch
deleted file mode 100644 (file)
index 16d914e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-Description: Sane defaults for the ML2 ml2_conf.ini
- By default, it just doesn't work. This patch makes situation better.
-Author: Thomas Goirand <zigo@debian.org>
-Forwarded: no
-Last-Update: 2014-06-07
-
---- neutron-2014.1.orig/etc/neutron/plugins/ml2/ml2_conf.ini
-+++ neutron-2014.1/etc/neutron/plugins/ml2/ml2_conf.ini
-@@ -2,19 +2,19 @@
- # (ListOpt) List of network type driver entrypoints to be loaded from
- # the neutron.ml2.type_drivers namespace.
- #
--# type_drivers = local,flat,vlan,gre,vxlan
-+type_drivers = gre
- # Example: type_drivers = flat,vlan,gre,vxlan
- # (ListOpt) Ordered list of network_types to allocate as tenant
- # networks. The default value 'local' is useful for single-box testing
- # but provides no connectivity between hosts.
- #
--# tenant_network_types = local
-+tenant_network_types = gre
- # Example: tenant_network_types = vlan,gre,vxlan
- # (ListOpt) Ordered list of networking mechanism driver entrypoints
- # to be loaded from the neutron.ml2.mechanism_drivers namespace.
--# mechanism_drivers =
-+mechanism_drivers = openvswitch
- # Example: mechanism drivers = openvswitch,mlnx
- # Example: mechanism_drivers = arista
- # Example: mechanism_drivers = cisco,logger
-@@ -41,7 +41,7 @@
- [ml2_type_gre]
- # (ListOpt) Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges of GRE tunnel IDs that are available for tenant network allocation
--# tunnel_id_ranges =
-+tunnel_id_ranges = 1:1000
- [ml2_type_vxlan]
- # (ListOpt) Comma-separated list of <vni_min>:<vni_max> tuples enumerating
-@@ -59,4 +59,4 @@
- [securitygroup]
- # Controls if neutron security group is enabled or not.
- # It should be false when you use nova security group.
--# enable_security_group = True
-+enable_security_group = True
index ccc59088b87cb531b90c1f4a036aeab13faa0db7..1674c01be3c677ae95fc84dedc3c7f0466c06678 100644 (file)
@@ -1,9 +1,3 @@
-#fix-alembic-migration-with-sqlite3.patch
-#better-config-default.patch
 0001-Add-parameter-and-iptables-rules-to-protect-dnsmasq-.patch
-#0004-Fix-Metering-doesn-t-respect-the-l3-agent-binding.patch
-#Properly_apply_column_default_in_migration_pool_monitor_status.patch
-#sane-defaults-for-ml2_conf.ini.patch
-#sane-defaults-for-dhcp_agent.ini.patch
-fix-alembic-migration-with-sqlite3.patch
 better-config-default.patch
+fix-alembic-migration-with-sqlite3.patch