Skip to content

Commit bea1d6b

Browse files
committed
Remove unused repair SQL command
* The raw SQL command breaks any deployment that doesn't use SQL as the DB backend * This database repair is not necessary in Kilo because the migration script correctly updates the table Change-Id: Id9abd027adb7a680912cde8f96f503ae8abd7992 Signed-off-by: Joe Mills <[email protected]>
1 parent 38c0be8 commit bea1d6b

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

midonet/neutron/plugin.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
from neutron.common import utils
4242
from neutron.db import agents_db
4343
from neutron.db import agentschedulers_db
44-
from neutron.db import api as db
4544
from neutron.db import db_base_plugin_v2
4645
from neutron.db import external_net_db
4746
from neutron.db import l3_gwmode_db
@@ -100,7 +99,6 @@ def __init__(self):
10099
project_id=conf.project_id)
101100

102101
self.setup_rpc()
103-
self.repair_quotas_table()
104102

105103
self.base_binding_dict = {
106104
portbindings.VIF_TYPE: portbindings.VIF_TYPE_MIDONET,
@@ -124,19 +122,6 @@ def setup_rpc(self):
124122
# Consume from all consumers in a thread
125123
self.conn.consume_in_threads()
126124

127-
def repair_quotas_table(self):
128-
query = ("CREATE TABLE `quotas` ( `id` varchar(36) NOT NULL, "
129-
"`tenant_id` varchar(255) DEFAULT NULL, "
130-
"`resource` varchar(255) DEFAULT NULL, "
131-
"`limit` int(11) DEFAULT NULL, "
132-
"PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;")
133-
session = db.get_session()
134-
try:
135-
session.execute(query)
136-
except sa_exc.OperationalError:
137-
# If the table already exists, then this is expected.
138-
pass
139-
140125
def _process_create_network(self, context, network):
141126

142127
net_data = network['network']

0 commit comments

Comments
 (0)