Merge "Stop declaring a MySQL character set on magnum's tables."
This commit is contained in:
commit
5fca26c307
6 files changed
+28
-22
No files matched your search
@@ -45,8 +45,7 @@ def upgrade():
|
||||
sa.Column('minions_address', sa.Text(), nullable=True),
|
||||
sa.Column('stack_id', sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_table(
|
||||
'baymodel',
|
||||
@@ -62,8 +61,7 @@ def upgrade():
|
||||
sa.Column('dns_nameserver', String(255), nullable=True),
|
||||
sa.Column('apiserver_port', sa.Integer(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_table(
|
||||
'container',
|
||||
@@ -74,8 +72,7 @@ def upgrade():
|
||||
sa.Column('name', sa.String(length=255), nullable=True),
|
||||
sa.Column('image_id', sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_table(
|
||||
'node',
|
||||
@@ -87,8 +84,7 @@ def upgrade():
|
||||
sa.Column('image_id', sa.String(length=255), nullable=True),
|
||||
sa.Column('ironic_node_id', sa.String(length=36), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_table(
|
||||
'pod',
|
||||
@@ -103,8 +99,7 @@ def upgrade():
|
||||
sa.Column('labels', sa.Text(), nullable=True),
|
||||
sa.Column('status', sa.String(length=255), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_table(
|
||||
'service',
|
||||
@@ -119,8 +114,7 @@ def upgrade():
|
||||
sa.Column('ip', sa.String(length=36), nullable=True),
|
||||
sa.Column('port', sa.Integer(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_table(
|
||||
'replicationcontroller',
|
||||
@@ -134,7 +128,6 @@ def upgrade():
|
||||
sa.Column('labels', sa.Text(), nullable=True),
|
||||
sa.Column('replicas', sa.Integer(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
# end Alembic commands
|
||||
@@ -43,8 +43,7 @@ def upgrade():
|
||||
sa.Column('project_id', sa.String(length=255), nullable=True),
|
||||
sa.Column('user_id', sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_unique_constraint("uniq_x509keypair0uuid",
|
||||
"x509keypair", ["uuid"])
|
||||
@@ -35,6 +35,5 @@ def upgrade():
|
||||
sa.Column('bay_uuid', sa.String(length=36), nullable=True),
|
||||
sa.Column('conductor_id', sa.String(length=64), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
@@ -38,8 +38,7 @@ def upgrade():
|
||||
sa.Column('resource', sa.String(length=255), nullable=True),
|
||||
sa.Column('hard_limit', sa.Integer(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_ENGINE='InnoDB',
|
||||
mysql_DEFAULT_CHARSET='UTF8'
|
||||
mysql_ENGINE='InnoDB'
|
||||
)
|
||||
op.create_unique_constraint(
|
||||
"uniq_quotas0project_id0resource",
|
||||
|
||||
@@ -36,8 +36,7 @@ CONF = magnum.conf.CONF
|
||||
def table_args():
|
||||
engine_name = urlparse.urlparse(CONF.database.connection).scheme
|
||||
if engine_name == 'mysql':
|
||||
return {'mysql_engine': CONF.database.mysql_engine,
|
||||
'mysql_charset': "utf8"}
|
||||
return {'mysql_engine': CONF.database.mysql_engine}
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Magnum's tables no longer declare an explicit ``UTF8`` character set in
|
||||
their creation migrations, and ``models.table_args()`` no longer passes
|
||||
``mysql_charset``. All tables now defer to the ``magnum`` database's own
|
||||
default character set and collation, as deployment tools already create
|
||||
it consistently. Previously, some tables declared a bare ``CHARACTER
|
||||
SET`` and others declared none at all. From MariaDB 11.5 a bare
|
||||
``CHARACTER SET`` stopped resolving to the same collation as the
|
||||
database default (MDEV-25829), so a table that declared the charset and
|
||||
one that did not could end up with different collations. This broke new
|
||||
deployments in the ``nodegroups_v2`` migration, which joins the
|
||||
``nodegroup`` and ``cluster`` tables, with ``Illegal mix of collations
|
||||
(utf8mb3_general_ci,IMPLICIT) and (utf8mb3_uca1400_ai_ci,IMPLICIT) for
|
||||
operation '='``. Existing deployments are unaffected, because the
|
||||
migrations that create these tables have already run for them.
|
||||
Reference in new issue
Block a user