0.9.2 breaks glance migration 006

Bug #1404933 reported by Dan Prince
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned
sqlalchemy-migrate
In Progress
Undecided
Dan Prince

Bug Description

Just tried a Delorean package built against 0.9.2. It looks like 93ae21007d0100332a5751fc58f7616ced775ef9 (SqlScript: execute multiple statements one by one) breaks a very old glance 006 migration.

2014-12-22 15:56:08.059 11110 ERROR migrate.versioning.script.sql [-] SQL script /usr/lib/python2.7/site-packages/glance/db/sqlalchemy/migrate_repo/versions/006_mysql_upgrade.sql failed: (OperationalError) (1065, 'Query was empty') '\n' ()
2014-12-22 15:56:08.060 11110 CRITICAL glance [-] OperationalError: (OperationalError) (1065, 'Query was empty') '\n' ()
2014-12-22 15:56:08.060 11110 TRACE glance Traceback (most recent call last):
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/bin/glance-manage", line 10, in <module>
2014-12-22 15:56:08.060 11110 TRACE glance sys.exit(main())
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 281, in main
2014-12-22 15:56:08.060 11110 TRACE glance return CONF.command.action_fn()
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 157, in sync
2014-12-22 15:56:08.060 11110 TRACE glance CONF.command.current_version)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 115, in sync
2014-12-22 15:56:08.060 11110 TRACE glance version)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration.py", line 79, in db_sync
2014-12-22 15:56:08.060 11110 TRACE glance return versioning_api.upgrade(engine, repository, version)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/migrate/versioning/api.py", line 186, in upgrade
2014-12-22 15:56:08.060 11110 TRACE glance return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2014-12-22 15:56:08.060 11110 TRACE glance File "<string>", line 2, in _migrate
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2014-12-22 15:56:08.060 11110 TRACE glance return f(*a, **kw)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/migrate/versioning/api.py", line 366, in _migrate
2014-12-22 15:56:08.060 11110 TRACE glance schema.runchange(ver, change, changeset.step)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/migrate/versioning/schema.py", line 93, in runchange
2014-12-22 15:56:08.060 11110 TRACE glance change.run(self.engine, step)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib/python2.7/site-packages/migrate/versioning/script/sql.py", line 45, in run
2014-12-22 15:56:08.060 11110 TRACE glance conn.execute(statement)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 721, in execute
2014-12-22 15:56:08.060 11110 TRACE glance return self._execute_text(object, multiparams, params)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 870, in _execute_text
2014-12-22 15:56:08.060 11110 TRACE glance statement, parameters
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
2014-12-22 15:56:08.060 11110 TRACE glance context)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1156, in _handle_dbapi_exception
2014-12-22 15:56:08.060 11110 TRACE glance util.raise_from_cause(newraise, exc_info)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
2014-12-22 15:56:08.060 11110 TRACE glance reraise(type(exception), exception, tb=exc_tb)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2014-12-22 15:56:08.060 11110 TRACE glance context)
2014-12-22 15:56:08.060 11110 TRACE glance File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
2014-12-22 15:56:08.060 11110 TRACE glance cursor.execute(statement, parameters)

Dan Prince (dan-prince)
Changed in sqlalchemy-migrate:
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sqlalchemy-migrate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143498

Revision history for this message
Matt Riedemann (mriedem) wrote :

What release of glance and sqlalchemy are you hitting this on? Glance: kilo, juno, older? I haven't had problems with kilo migrations for glance with mariadb on rhel 7 with migrate 0.9.2 and sqlalchemy 0.9.8.

Revision history for this message
Ian Cordasco (icordasc) wrote :

I don't think this is a valid concern. sqlalchemy-migrate 0.9.2 is excluded in global-requirements: https://github.com/openstack/requirements/blob/master/global-requirements.txt#L139

Changed in glance:
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on sqlalchemy-migrate (master)

Change abandoned by Dan Prince (<email address hidden>) on branch: master
Review: https://review.openstack.org/143498

Revision history for this message
Matt Riedemann (mriedem) wrote :
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.