yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #68497
[Bug 1723097] Re: 012_id_to_uuid.py breaks with MariaDB 10.1.28 and SQLAlchemy 1.1.11
** Changed in: glance
Status: New => 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/1723097
Title:
012_id_to_uuid.py breaks with MariaDB 10.1.28 and SQLAlchemy 1.1.11
Status in Glance:
Fix Released
Bug description:
This happens in latest in-stock packages on Debian sid (2017-10-12).
It does not happen under SQLAlchemy==1.0.12 (default for Debian
stretch).
An upstream bug is filed here:
https://groups.google.com/forum/#!topic/sqlalchemy/xoBcc6UnpWo
The detailed log:
$ sudo dpkg-reconfigure glance-common
PKG-Openstack now calling: dbc_go glance-common reconfigure 2:13.0.0-4
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/glance-common.conf
glance-common already exists and has privileges on glancedb.
dbconfig-common: dumping mysql database glancedb to /var/tmp/glance-common.glancedb.2017-10-12-20.10.mysql.oWGGoE.
dbconfig-common: dropping old mysql database glancedb.
dropping database glancedb: success.
verifying database glancedb was dropped: success.
creating database glancedb: success.
verifying database glancedb exists: success.
dbconfig-common: flushing administrative password
Now doing glance-manage db_sync: this may take a while...
/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py:1171: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade
expire_on_commit=expire_on_commit, _conf=conf)
2017-10-12 20:10:42.372 523 INFO migrate.versioning.api [-] 0 -> 1...
2017-10-12 20:10:42.376 523 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table images
2017-10-12 20:10:42.419 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.419 523 INFO migrate.versioning.api [-] 1 -> 2...
2017-10-12 20:10:42.424 523 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_properties
2017-10-12 20:10:42.473 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.473 523 INFO migrate.versioning.api [-] 2 -> 3...
2017-10-12 20:10:42.540 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.540 523 INFO migrate.versioning.api [-] 3 -> 4...
2017-10-12 20:10:42.567 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.567 523 INFO migrate.versioning.api [-] 4 -> 5...
2017-10-12 20:10:42.585 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.585 523 INFO migrate.versioning.api [-] 5 -> 6...
/usr/lib/python2.7/dist-packages/pymysql/cursors.py:166: Warning: (1831, u'Duplicate index `ix_image_properties_image_id_name`. This is deprecated and will be disallowed in a future release.')
result = self._query(query)
2017-10-12 20:10:42.613 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.613 523 INFO migrate.versioning.api [-] 6 -> 7...
2017-10-12 20:10:42.647 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.647 523 INFO migrate.versioning.api [-] 7 -> 8...
2017-10-12 20:10:42.652 523 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_members
2017-10-12 20:10:42.711 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.712 523 INFO migrate.versioning.api [-] 8 -> 9...
2017-10-12 20:10:42.759 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.759 523 INFO migrate.versioning.api [-] 9 -> 10...
2017-10-12 20:10:42.768 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.768 523 INFO migrate.versioning.api [-] 10 -> 11...
2017-10-12 20:10:42.804 523 INFO migrate.versioning.api [-] done
2017-10-12 20:10:42.805 523 INFO migrate.versioning.api [-] 11 -> 12...
2017-10-12 20:10:42.825 523 CRITICAL glance [-] ArgumentError: Column type VARCHAR(36) on column 'images.id' is not compatible with autoincrement=True
2017-10-12 20:10:42.825 523 ERROR glance Traceback (most recent call last):
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/bin/glance-manage", line 10, in <module>
2017-10-12 20:10:42.825 523 ERROR glance sys.exit(main())
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 330, in main
2017-10-12 20:10:42.825 523 ERROR glance return CONF.command.action_fn()
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 190, in sync
2017-10-12 20:10:42.825 523 ERROR glance CONF.command.current_version)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/glance/cmd/manage.py", line 108, in sync
2017-10-12 20:10:42.825 523 ERROR glance version)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line 78, in db_sync
2017-10-12 20:10:42.825 523 ERROR glance migration = versioning_api.upgrade(engine, repository, version)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
2017-10-12 20:10:42.825 523 ERROR glance return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2017-10-12 20:10:42.825 523 ERROR glance File "<decorator-gen-15>", line 2, in _migrate
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2017-10-12 20:10:42.825 523 ERROR glance return f(*a, **kw)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
2017-10-12 20:10:42.825 523 ERROR glance schema.runchange(ver, change, changeset.step)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 93, in runchange
2017-10-12 20:10:42.825 523 ERROR glance change.run(self.engine, step)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 148, in run
2017-10-12 20:10:42.825 523 ERROR glance script_func(engine)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/migrate_repo/versions/012_id_to_uuid.py", line 53, in upgrade
2017-10-12 20:10:42.825 523 ERROR glance _upgrade_other(t_images, t_image_members, t_image_properties, dialect)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/migrate_repo/versions/012_id_to_uuid.py", line 243, in _upgrade_other
2017-10-12 20:10:42.825 523 ERROR glance t_images.c.id.alter(sqlalchemy.String(36), primary_key=True)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/changeset/schema.py", line 534, in alter
2017-10-12 20:10:42.825 523 ERROR glance return alter_column(self, *p, **k)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/changeset/schema.py", line 141, in alter_column
2017-10-12 20:10:42.825 523 ERROR glance engine._run_visitor(visitorcallable, delta)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1929, in _run_visitor
2017-10-12 20:10:42.825 523 ERROR glance conn._run_visitor(visitorcallable, element, **kwargs)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _run_visitor
2017-10-12 20:10:42.825 523 ERROR glance **kwargs).traverse_single(element)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/changeset/ansisql.py", line 56, in traverse_single
2017-10-12 20:10:42.825 523 ERROR glance ret = super(AlterTableVisitor, self).traverse_single(elem)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 121, in traverse_single
2017-10-12 20:10:42.825 523 ERROR glance return meth(obj, **kw)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/migrate/changeset/databases/mysql.py", line 29, in visit_column
2017-10-12 20:10:42.825 523 ERROR glance colspec = self.get_column_specification(delta.result_column)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py", line 1005, in get_column_specification
2017-10-12 20:10:42.825 523 ERROR glance and column is column.table._autoincrement_column and \
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 617, in _autoincrement_column
2017-10-12 20:10:42.825 523 ERROR glance return self.primary_key._autoincrement_column
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 764, in __get__
2017-10-12 20:10:42.825 523 ERROR glance obj.__dict__[self.__name__] = result = self.fget(obj)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 3215, in _autoincrement_column
2017-10-12 20:10:42.825 523 ERROR glance _validate_autoinc(col, True)
2017-10-12 20:10:42.825 523 ERROR glance File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 3196, in _validate_autoinc
2017-10-12 20:10:42.825 523 ERROR glance col
2017-10-12 20:10:42.825 523 ERROR glance ArgumentError: Column type VARCHAR(36) on column 'images.id' is not compatible with autoincrement=True
2017-10-12 20:10:42.825 523 ERROR glance
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1723097/+subscriptions
References