DB sync fails during upgrade from 2023.2 to 2024.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
High
|
Unassigned |
Bug Description
When upgrading Cinder from 539d8725258932e
The 'cinder-manage db sync' command exits with code '1' and no output. The logs report the following traceback: https:/
It appears the command 'ALTER TABLE volumes MODIFY use_quota BOOL NOT NULL DEFAULT true;' does not work against the existing definition '`use_quota` tinyint(1) DEFAULT NULL' given the existing data held in the column which appears to be a mix of '0', '1' and 'NULL'.
The traceback reports an issue with row 1 which has a column value of NULL.
We're running MariaDB version 10.11.6 in this case.
description: | updated |
Changed in cinder: | |
importance: | Undecided → High |
Hi Andrew,
Ideally we shouldn't have a value of NULL in the use_quota field given we have online data migrations replacing NULL with 0 and 1 values[1].
My question would be, did you run the online data migrations before running the db sync?
[1] https:/ /github. com/openstack/ cinder/ blob/stable/ 2023.2/ cinder/ db/sqlalchemy/ api.py# L8690