]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
ML2: database needs to be initalized after drivers loaded
authorAaron Rosen <aaronorosen@gmail.com>
Fri, 28 Feb 2014 06:26:30 +0000 (22:26 -0800)
committerAaron Rosen <aaronorosen@gmail.com>
Tue, 4 Mar 2014 04:14:17 +0000 (20:14 -0800)
Previously, if you started neutron-server with an empty database some
of the tables that drivers use are not automatically created. That said,
one should probably run neutron-db-manage manually to create the tables
and not rely on neutron to do this. This regression was cause in 326b85.

Change-Id: I2c578733de0213945b31fba86a3b0ea45c02295a
Closes-bug: #1285993
Co-Authored-By: Itsuro Oda <oda@valinux.co.jp>
neutron/plugins/ml2/plugin.py

index 0e07cff9a79d6db1a93e1d8c70e6aff651b61401..a06753cbb5b855fe9bf9b1f3a8745bd8bff811ee 100644 (file)
@@ -99,10 +99,10 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
         return self._aliases
 
     def __init__(self):
-        super(Ml2Plugin, self).__init__()
         # First load drivers, then initialize DB, then initialize drivers
         self.type_manager = managers.TypeManager()
         self.mechanism_manager = managers.MechanismManager()
+        super(Ml2Plugin, self).__init__()
         self.type_manager.initialize()
         self.mechanism_manager.initialize()
         # bulk support depends on the underlying drivers