gnocchi-upgrade failed

Bug #1670645 reported by Aaron DH on 2017-03-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Incomplete
Undecided
Unassigned

Bug Description

it's bad in master and stable/3.1, ok in stable/3.0

2017-03-07 19:18:00.920 17477 ERROR gnocchi Traceback (most recent call last):
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/bin/gnocchi-upgrade", line 10, in <module>
2017-03-07 19:18:00.920 17477 ERROR gnocchi sys.exit(upgrade())
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/opt/stack/gnocchi/gnocchi/cli.py", line 68, in upgrade
2017-03-07 19:18:00.920 17477 ERROR gnocchi create_legacy_resource_types=conf.create_legacy_resource_types)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/opt/stack/gnocchi/gnocchi/indexer/sqlalchemy.py", line 314, in upgrade
2017-03-07 19:18:00.920 17477 ERROR gnocchi Base.metadata.create_all(connection)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 3762, in create_all
2017-03-07 19:18:00.920 17477 ERROR gnocchi tables=tables)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1481, in _run_visitor
2017-03-07 19:18:00.920 17477 ERROR gnocchi **kwargs).traverse_single(element)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 121, in traverse_single
2017-03-07 19:18:00.920 17477 ERROR gnocchi return meth(obj, **kw)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 730, in visit_metadata
2017-03-07 19:18:00.920 17477 ERROR gnocchi _is_metadata_operation=True)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 121, in traverse_single
2017-03-07 19:18:00.920 17477 ERROR gnocchi return meth(obj, **kw)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 764, in visit_table
2017-03-07 19:18:00.920 17477 ERROR gnocchi include_foreign_key_constraints=include_foreign_key_constraints
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
2017-03-07 19:18:00.920 17477 ERROR gnocchi return meth(self, multiparams, params)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
2017-03-07 19:18:00.920 17477 ERROR gnocchi return connection._execute_ddl(self, multiparams, params)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl
2017-03-07 19:18:00.920 17477 ERROR gnocchi compiled
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2017-03-07 19:18:00.920 17477 ERROR gnocchi context)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2017-03-07 19:18:00.920 17477 ERROR gnocchi util.raise_from_cause(newraise, exc_info)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
2017-03-07 19:18:00.920 17477 ERROR gnocchi reraise(type(exception), exception, tb=exc_tb, cause=cause)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2017-03-07 19:18:00.920 17477 ERROR gnocchi context)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2017-03-07 19:18:00.920 17477 ERROR gnocchi cursor.execute(statement, parameters)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 166, in execute
2017-03-07 19:18:00.920 17477 ERROR gnocchi result = self._query(query)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 322, in _query
2017-03-07 19:18:00.920 17477 ERROR gnocchi conn.query(q)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 852, in query
2017-03-07 19:18:00.920 17477 ERROR gnocchi self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1053, in _read_query_result
2017-03-07 19:18:00.920 17477 ERROR gnocchi result.read()
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1336, in read
2017-03-07 19:18:00.920 17477 ERROR gnocchi first_packet = self.connection._read_packet()
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1010, in _read_packet
2017-03-07 19:18:00.920 17477 ERROR gnocchi packet.check_error()
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 393, in check_error
2017-03-07 19:18:00.920 17477 ERROR gnocchi err.raise_mysql_exception(self._data)
2017-03-07 19:18:00.920 17477 ERROR gnocchi File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
2017-03-07 19:18:00.920 17477 ERROR gnocchi raise errorclass(errno, errval)
2017-03-07 19:18:00.920 17477 ERROR gnocchi 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 '(6) NOT NULL, \n\tPRIMARY KEY (name), \n\tCONSTRAINT uniq_resource_type0tablename UN' at line 6") [SQL: u"\nCREATE TABLE resource_type (\n\tname VARCHAR(255) NOT NULL, \n\ttablename VARCHAR(35) NOT NULL, \n\tattributes TEXT, \n\tstate ENUM('active','creating','creation_error','deleting','deletion_error','updating','updating_error') NOT NULL DEFAULT 'creating', \n\tupdated_at DATETIME(6) NOT NULL, \n\tPRIMARY KEY (name), \n\tCONSTRAINT uniq_resource_type0tablename UNIQUE (tablename)\n)ENGINE=InnoDB CHARSET=utf8\n\n"]

Execute gnocchi-upgrade still failed.

Aaron DH (aaron.d) on 2017-03-07
description: updated
Julien Danjou (jdanjou) wrote :

Let me guess: you are using an ancient MySQL version.

Resolution: use PostgreSQL or upgrade to MySQL least 5.6. We're in 2017. ;-)

Changed in gnocchi:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers