database error when adding logical switch

Bug #1677248 reported by Saverio Proto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-l2gw
New
Undecided
Unassigned

Bug Description

Release: Openstack Newton

As soon as I start the neutron neutron-l2gateway-agent this one tries to add the logical switch into the neutron database, but the operation fails because of a software error:

2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters [req-cdbbdb23-92ca-427d-8522-c4b0ed736ee8 - - - - -] DBAPIError exception wrapped from (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')), 'ovsdb1')' at line 1") [SQL: u'INSERT INTO logical_switches (uuid, name, `key`, ovsdb_identifier) VALUES (%(uuid)s, %(name)s, %(key)s, %(ovsdb_identifier)s)'] [parameters: {'ovsdb_identifier': u'ovsdb1', 'uuid': u'5e2189c1-750d-4636-b645-daff1926c17e', 'key': [u'set', []], 'name': u'LS'}]
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters context)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 158, in execute
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters result = self._query(query)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 308, in _query
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters conn.query(q)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 820, in query
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1002, in _read_query_result
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters result.read()
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1285, in read
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters first_packet = self.connection._read_packet()
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 966, in _read_packet
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters packet.check_error()
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 394, in check_error
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters err.raise_mysql_exception(self._data)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 120, in raise_mysql_exception
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters _check_mysql_exception(errinfo)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters raise errorclass(errno, errorvalue)
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')), 'ovsdb1')' at line 1")
2017-03-29 15:27:03.955 5555 ERROR oslo_db.sqlalchemy.exc_filters
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server [req-cdbbdb23-92ca-427d-8522-c4b0ed736ee8 - - - - -] Exception during message handling
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/networking_l2gw/services/l2gateway/ovsdb/data.py", line 51, in update_ovsdb_changes
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self.ovsdb.update_ovsdb_changes(context, activity, ovsdb_data)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/networking_l2gw/services/l2gateway/ovsdb/data.py", line 102, in update_ovsdb_changes
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server lookup(context, value)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/networking_l2gw/services/l2gateway/ovsdb/data.py", line 208, in _process_new_logical_switches
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server db.add_logical_switch(context, ls_dict)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/networking_l2gw/db/l2gateway/ovsdb/lib.py", line 101, in add_logical_switch
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server session.add(logical_switch)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 502, in __exit__
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self.rollback()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server compat.reraise(exc_type, exc_value, exc_tb)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 499, in __exit__
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self.commit()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self._prepare_impl()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self.session.flush()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2027, in flush
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self._flush(objects)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2145, in _flush
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server transaction.rollback(_capture_exception=True)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server compat.reraise(exc_type, exc_value, exc_tb)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2109, in _flush
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server flush_context.execute()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server rec.execute(self)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server uow
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server mapper, table, insert)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 767, in _emit_insert_statements
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server execute(statement, multiparams)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server return meth(self, multiparams, params)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server return connection._execute_clauseelement(self, multiparams, params)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server compiled_sql, distilled_params
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server context)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server util.raise_from_cause(newraise, exc_info)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server reraise(type(exception), exception, tb=exc_tb)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server context)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server cursor.execute(statement, parameters)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 158, in execute
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server result = self._query(query)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 308, in _query
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server conn.query(q)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 820, in query
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1002, in _read_query_result
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server result.read()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1285, in read
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server first_packet = self.connection._read_packet()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 966, in _read_packet
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server packet.check_error()
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 394, in check_error
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server err.raise_mysql_exception(self._data)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 120, in raise_mysql_exception
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server _check_mysql_exception(errinfo)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server raise errorclass(errno, errorvalue)
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server DBError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')), 'ovsdb1')' at line 1") [SQL: u'INSERT INTO logical_switches (uuid, name, `key`, ovsdb_identifier) VALUES (%(uuid)s, %(name)s, %(key)s, %(ovsdb_identifier)s)'] [parameters: {'ovsdb_identifier': u'ovsdb1', 'uuid': u'5e2189c1-750d-4636-b645-daff1926c17e', 'key': [u'set', []], 'name': u'LS'}]
2017-03-29 15:27:03.958 5555 ERROR oslo_messaging.rpc.server

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.