]> 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)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:42 +0000 (15:20 +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 77032a6c1af4acda8d2070d6b9748b247b3c0671..2dab2db88bf2e6d6aaeaca89d8b0ac705077a546 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