heat-manage db_sync crashes on migration 033_software_config because of MySQL error 1709
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Clint Byrum | ||
Icehouse |
Fix Released
|
High
|
Unmesh Gurjar |
Bug Description
I am running heat-manage db_sync against MySQL 5.6.17, and I get the following errors:
1) if the database was created using:
DROP DATABASE IF EXISTS heat;
CREATE DATABASE heat;
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'HEAT_DBPASS';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY 'HEAT_DBPASS';
FLUSH PRIVILEGES;
I get the following error:
# heat-manage db_sync
No handlers could be found for logger "heat.common.
2014-05-06 14:06:00.630 2059 WARNING heat.openstack.
2014-05-06 14:06:00.781 2059 INFO migrate.
2014-05-06 14:06:01.183 2059 INFO migrate.
2014-05-06 14:06:01.184 2059 INFO migrate.
2014-05-06 14:06:01.286 2059 INFO migrate.
2014-05-06 14:06:01.286 2059 INFO migrate.
2014-05-06 14:06:01.411 2059 INFO migrate.
2014-05-06 14:06:01.412 2059 INFO migrate.
2014-05-06 14:06:01.563 2059 INFO migrate.
2014-05-06 14:06:01.564 2059 INFO migrate.
2014-05-06 14:06:01.730 2059 INFO migrate.
2014-05-06 14:06:01.731 2059 INFO migrate.
2014-05-06 14:06:01.862 2059 INFO migrate.
2014-05-06 14:06:01.862 2059 INFO migrate.
2014-05-06 14:06:01.943 2059 INFO migrate.
2014-05-06 14:06:01.944 2059 INFO migrate.
2014-05-06 14:06:02.051 2059 INFO migrate.
2014-05-06 14:06:02.051 2059 INFO migrate.
2014-05-06 14:06:02.156 2059 INFO migrate.
2014-05-06 14:06:02.156 2059 INFO migrate.
2014-05-06 14:06:02.205 2059 INFO migrate.
2014-05-06 14:06:02.205 2059 INFO migrate.
2014-05-06 14:06:02.366 2059 INFO migrate.
2014-05-06 14:06:02.366 2059 INFO migrate.
2014-05-06 14:06:02.506 2059 INFO migrate.
2014-05-06 14:06:02.507 2059 INFO migrate.
2014-05-06 14:06:02.650 2059 INFO migrate.
2014-05-06 14:06:02.650 2059 INFO migrate.
2014-05-06 14:06:03.081 2059 INFO migrate.
2014-05-06 14:06:03.081 2059 INFO migrate.
2014-05-06 14:06:03.212 2059 INFO migrate.
2014-05-06 14:06:03.212 2059 INFO migrate.
2014-05-06 14:06:03.286 2059 INFO migrate.
2014-05-06 14:06:03.287 2059 INFO migrate.
2014-05-06 14:06:03.350 2059 INFO migrate.
2014-05-06 14:06:03.351 2059 INFO migrate.
2014-05-06 14:06:03.536 2059 INFO migrate.
2014-05-06 14:06:03.537 2059 INFO migrate.
ERROR: (OperationalError) (1709, 'Index column size too large. The maximum column size is 767 bytes.') 'CREATE INDEX ix_software_
I re-tried using the following DB definition:
DROP DATABASE IF EXISTS heat;
SET @@global.
SET @@global.
SET @@global.
CREATE DATABASE heat CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'HEAT_DBPASS';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY 'HEAT_DBPASS';
FLUSH PRIVILEGES;
But I get exactly the same issue. Do I have to use any special flag or configuration trick on MySQL?
Changed in heat: | |
assignee: | nobody → Clint Byrum (clint-fewbar) |
status: | Triaged → In Progress |
Changed in mos: | |
milestone: | none → 5.1 |
assignee: | nobody → MOS Heat (mos-heat) |
importance: | Undecided → Critical |
status: | New → Triaged |
no longer affects: | mos |
Changed in heat: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | juno-2 → 2014.2 |
This may have gone undetected in the past because people had latin1 databases, but we do a lot to push people toward UTF-8 which makes index size 3 bytes per "char". The answer is either to reduce it to String(255) or change it to a VARBINARY. The former is preferred, as 256 byte varchars become TINYTEXT which is less efficient as it is stored basically as a separate row.