Alembic migration fails with MySQL 5.7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia |
Fix Released
|
Undecided
|
Stephen Balukoff |
Bug Description
When attempting to set up Octavia on devstack using MySQL 5.7 as the back-end database, the alembic migration chain fails with the following error:
sqlalchemy.
This is being caused by the following migration, which expands the length of the 'tls_container_id' field in the 'sni' table:
8c0851bdf6c3_
Specifically, older versions of MySQL allowed primary keys composed of multiple fields to have parts which could be set to NULL. MySQL 5.7 does not.
As this field should never be null, the above migration need to be fixed so that it doesn't change the field into a nullable field, and an additional migration should be added so that migrations run on existing installations using MySQL 5.6 or newer also set this field to be non-nullable.
Not sure why this didn't automatically link, but a fix is underway here: https:/ /review. openstack. org/#/c/ 326723