From: Aaron Rosen Date: Fri, 28 Feb 2014 06:26:30 +0000 (-0800) Subject: ML2: database needs to be initalized after drivers loaded X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=63ecf4995077def53a61d2f1e4f34564e92ca241;p=openstack-build%2Fneutron-build.git ML2: database needs to be initalized after drivers loaded 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 --- diff --git a/neutron/plugins/ml2/plugin.py b/neutron/plugins/ml2/plugin.py index 77032a6c1..2dab2db88 100644 --- a/neutron/plugins/ml2/plugin.py +++ b/neutron/plugins/ml2/plugin.py @@ -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