← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1526710] Re: NotSupportedError: MySQL cannot rename indexes

 

** No longer affects: devstack

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1526710

Title:
  NotSupportedError: MySQL cannot rename indexes

Status in Glance:
  New

Bug description:
  When stacking with branch stable/liberty of devstack, on a control host I had below error.
  I am using a clean Ubuntu 14.04 LTS just updated.

  
  2015-12-16 07:50:32.262 | 2015-12-16 07:50:32.262 INFO migrate.versioning.api [-] 0 -> 1... 
  2015-12-16 07:50:32.272 | 2015-12-16 07:50:32.272 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table images
  2015-12-16 07:50:32.293 | 2015-12-16 07:50:32.293 INFO migrate.versioning.api [-] done
  2015-12-16 07:50:32.293 | 2015-12-16 07:50:32.293 INFO migrate.versioning.api [-] 1 -> 2... 
  2015-12-16 07:50:32.303 | 2015-12-16 07:50:32.303 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_properties
  2015-12-16 07:50:32.350 | 2015-12-16 07:50:32.350 INFO migrate.versioning.api [-] done
  2015-12-16 07:50:32.351 | 2015-12-16 07:50:32.351 INFO migrate.versioning.api [-] 2 -> 3... 
  2015-12-16 07:50:32.374 | 2015-12-16 07:50:32.374 INFO migrate.versioning.api [-] done
  2015-12-16 07:50:32.376 | 2015-12-16 07:50:32.374 INFO migrate.versioning.api [-] 3 -> 4... 
  2015-12-16 07:50:32.387 | 2015-12-16 07:50:32.387 INFO migrate.versioning.api [-] done
  2015-12-16 07:50:32.387 | 2015-12-16 07:50:32.387 INFO migrate.versioning.api [-] 4 -> 5... 
  2015-12-16 07:50:32.399 | 2015-12-16 07:50:32.398 INFO migrate.versioning.api [-] done
  2015-12-16 07:50:32.399 | 2015-12-16 07:50:32.399 INFO migrate.versioning.api [-] 5 -> 6... 
  2015-12-16 07:50:32.404 | 2015-12-16 07:50:32.404 CRITICAL glance [-] NotSupportedError: MySQL cannot rename indexes
  2015-12-16 07:50:32.406 | 
  2015-12-16 07:50:32.406 | 2015-12-16 07:50:32.404 TRACE glance Traceback (most recent call last):
  2015-12-16 07:50:32.406 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/bin/glance-manage", line 10, in <module>
  2015-12-16 07:50:32.406 | 2015-12-16 07:50:32.404 TRACE glance     sys.exit(main())
  2015-12-16 07:50:32.407 | 2015-12-16 07:50:32.404 TRACE glance   File "/opt/stack/glance/glance/cmd/manage.py", line 314, in main
  2015-12-16 07:50:32.407 | 2015-12-16 07:50:32.404 TRACE glance     return CONF.command.action_fn()
  2015-12-16 07:50:32.407 | 2015-12-16 07:50:32.404 TRACE glance   File "/opt/stack/glance/glance/cmd/manage.py", line 170, in sync
  2015-12-16 07:50:32.407 | 2015-12-16 07:50:32.404 TRACE glance     CONF.command.current_version)
  2015-12-16 07:50:32.408 | 2015-12-16 07:50:32.404 TRACE glance   File "/opt/stack/glance/glance/cmd/manage.py", line 115, in sync
  2015-12-16 07:50:32.408 | 2015-12-16 07:50:32.404 TRACE glance     version)
  2015-12-16 07:50:32.408 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line 79, in db_sync
  2015-12-16 07:50:32.408 | 2015-12-16 07:50:32.404 TRACE glance     migration = versioning_api.upgrade(engine, repository, version)
  2015-12-16 07:50:32.408 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
  2015-12-16 07:50:32.409 | 2015-12-16 07:50:32.404 TRACE glance     return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  2015-12-16 07:50:32.409 | 2015-12-16 07:50:32.404 TRACE glance   File "<decorator-gen-15>", line 2, in _migrate
  2015-12-16 07:50:32.409 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
  2015-12-16 07:50:32.410 | 2015-12-16 07:50:32.404 TRACE glance     return f(*a, **kw)
  2015-12-16 07:50:32.410 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
  2015-12-16 07:50:32.410 | 2015-12-16 07:50:32.404 TRACE glance     schema.runchange(ver, change, changeset.step)
  2015-12-16 07:50:32.410 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 93, in runchange
  2015-12-16 07:50:32.411 | 2015-12-16 07:50:32.404 TRACE glance     change.run(self.engine, step)
  2015-12-16 07:50:32.411 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 148, in run
  2015-12-16 07:50:32.411 | 2015-12-16 07:50:32.404 TRACE glance     script_func(engine)
  2015-12-16 07:50:32.412 | 2015-12-16 07:50:32.404 TRACE glance   File "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/006_key_to_name.py", line 96, in upgrade
  2015-12-16 07:50:32.412 | 2015-12-16 07:50:32.404 TRACE glance     index.rename('ix_image_properties_image_id_name')
  2015-12-16 07:50:32.413 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/changeset/schema.py", line 688, in rename
  2015-12-16 07:50:32.413 | 2015-12-16 07:50:32.404 TRACE glance     engine._run_visitor(visitorcallable, self, connection, **kwargs)
  2015-12-16 07:50:32.413 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1856, in _run_visitor
  2015-12-16 07:50:32.414 | 2015-12-16 07:50:32.404 TRACE glance     conn._run_visitor(visitorcallable, element, **kwargs)
  2015-12-16 07:50:32.414 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1481, in _run_visitor
  2015-12-16 07:50:32.414 | 2015-12-16 07:50:32.404 TRACE glance     **kwargs).traverse_single(element)
  2015-12-16 07:50:32.414 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/changeset/ansisql.py", line 56, in traverse_single
  2015-12-16 07:50:32.415 | 2015-12-16 07:50:32.404 TRACE glance     ret = super(AlterTableVisitor, self).traverse_single(elem)
  2015-12-16 07:50:32.415 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 121, in traverse_single
  2015-12-16 07:50:32.416 | 2015-12-16 07:50:32.404 TRACE glance     return meth(obj, **kw)
  2015-12-16 07:50:32.416 | 2015-12-16 07:50:32.404 TRACE glance   File "/usr/local/lib/python2.7/dist-packages/migrate/changeset/databases/mysql.py", line 51, in visit_index
  2015-12-16 07:50:32.416 | 2015-12-16 07:50:32.404 TRACE glance     raise exceptions.NotSupportedError("MySQL cannot rename indexes")
  2015-12-16 07:50:32.416 | 2015-12-16 07:50:32.404 TRACE glance NotSupportedError: MySQL cannot rename indexes
  2015-12-16 07:50:32.417 | 2015-12-16 07:50:32.404 TRACE glance 
  2015-12-16 07:50:32.453 | + exit_trap
  2015-12-16 07:50:32.453 | + local r=1
  2015-12-16 07:50:32.453 | ++ jobs -p
  2015-12-16 07:50:32.455 | + jobs=
  2015-12-16 07:50:32.455 | + [[ -n '' ]]
  2015-12-16 07:50:32.455 | + kill_spinner
  2015-12-16 07:50:32.455 | + '[' '!' -z '' ']'
  2015-12-16 07:50:32.456 | + [[ 1 -ne 0 ]]
  2015-12-16 07:50:32.456 | + echo 'Error on exit'
  2015-12-16 07:50:32.456 | Error on exit
  2015-12-16 07:50:32.456 | + [[ -z /opt/stack/logs/screen ]]
  2015-12-16 07:50:32.456 | + /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs/screen

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1526710/+subscriptions


References