yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #71598
[Bug 1750705] Re: glance db_sync requires mysql db to have log_bin_trust_function_creators = 1
** Changed in: charm-percona-cluster
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1750705
Title:
glance db_sync requires mysql db to have
log_bin_trust_function_creators = 1
Status in OpenStack percona-cluster charm:
Fix Released
Status in Glance:
Fix Released
Status in glance package in Ubuntu:
Fix Released
Bug description:
Upon deploying glance via cs:~openstack-charmers-next/xenial/glance
glance appears to throw a CRIT unhandled error, so far I have
experienced this on arm64. Not sure about other archs at this point in
time. Decided to bug and will investigate further.
Cloud- xenial-queens/proposed
This occurs when the the shared-db-relation hook fires for mysql
:shared-db.
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed CRITI [glance] Unhandled error
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed Traceback (most recent call last):
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/bin/glance-manage", line 10, in <module>
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed sys.exit(main())
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 528, in main
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed return CONF.command.action_fn()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 360, in sync
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed self.command_object.sync(CONF.command.version)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 153, in sync
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed self.expand()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 208, in expand
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed self._sync(version=expand_head)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 168, in _sync
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed alembic_command.upgrade(a_config, version)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/command.py", line 254, in upgrade
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed script.run_env()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/script/base.py", line 425, in run_env
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed util.load_python_file(self.dir, 'env.py')
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed module = load_module_py(module_id, path)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/util/compat.py", line 75, in load_module_py
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed mod = imp.load_source(module_id, path, fp)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/alembic_migrations/env.py", line 88, in <module>
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed run_migrations_online()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/alembic_migrations/env.py", line 83, in run_migrations_online
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed context.run_migrations()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "<string>", line 8, in run_migrations
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/runtime/environment.py", line 836, in run_migrations
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed self.get_context().run_migrations(**kw)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/runtime/migration.py", line 330, in run_migrations
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed step.migration_fn(**kw)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/alembic_migrations/versions/ocata_expand01_add_visibility.py", line 149, in upgrade
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed _add_visibility_column(meta)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/alembic_migrations/versions/ocata_expand01_add_visibility.py", line 126, in _add_visibility_column
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed op.add_column('images', v_col)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "<string>", line 8, in add_column
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "<string>", line 3, in add_column
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/operations/ops.py", line 1551, in add_column
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed return operations.invoke(op)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/operations/base.py", line 318, in invoke
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed return fn(self, operation)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/operations/toimpl.py", line 123, in add_column
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed schema=schema
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 172, in add_column
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed self._exec(base.AddColumn(table_name, column, schema=schema))
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 118, in _exec
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed return conn.execute(construct, *multiparams, **params)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed return meth(self, multiparams, params)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed return connection._execute_ddl(self, multiparams, params)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1002, in _execute_ddl
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed compiled
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed context)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1398, in _handle_dbapi_exception
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed util.raise_from_cause(newraise, exc_info)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed reraise(type(exception), exception, tb=exc_tb, cause=cause)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed context)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 470, in do_execute
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed cursor.execute(statement, parameters)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 166, in execute
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed result = self._query(query)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 322, in _query
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed conn.query(q)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 856, in query
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed self._affected_rows = self._read_query_result(unbuffered=unbuffered)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1057, in _read_query_result
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed result.read()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1340, in read
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed first_packet = self.connection._read_packet()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1014, in _read_packet
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed packet.check_error()
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 393, in check_error
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed err.raise_mysql_exception(self._data)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed raise errorclass(errno, errval)
unit-glance-0: 01:28:22 DEBUG unit.glance/0.shared-db-relation-changed DBError: (pymysql.err.InternalError) (1060, u"Duplicate column name 'visibility'") [SQL: u"ALTER TABLE images ADD COLUMN visibility ENUM('private','public','shared','community')"]
To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-percona-cluster/+bug/1750705/+subscriptions