Tuesday, 2025-09-02

opendevreviewMatthew Northcott proposed openstack/magnum-ui master: Support credential API  https://review.opendev.org/c/openstack/magnum-ui/+/95685000:52
mnasiadkadalees: can you have a look in 959069?05:59
*** Max is now known as Guest2562907:59
dalees#startmeeting magnum08:01
opendevmeetMeeting started Tue Sep  2 08:01:11 2025 UTC and is due to finish in 60 minutes.  The chair is dalees. Information about MeetBot at http://wiki.debian.org/MeetBot.08:01
opendevmeetUseful Commands: #action #agreed #help #info #idea #link #topic #startvote.08:01
opendevmeetThe meeting name has been set to 'magnum'08:01
dalees#topic Roll call08:01
daleesHi everyone o/08:01
daleesnot much on the agenda document today, but feature free is upon us and there are several reviews pending we might discuss.08:02
dalees*freeze08:02
*** Guest25629 is now known as Max_08:04
Max_Hi all, this is first time attending. Looking forward to contribute where I can!08:06
daleesHi Max_ , welcome!08:06
jakeyipo/08:08
Max_Hi jakeyip08:10
daleesmnasiadka: about?08:10
mnasiadkaSort of, waiting for my doctor’s appointment in a place with poor cell signal :-)08:11
daleeswell, we won't expect much chat from you then.08:12
dalees#topic topic?08:12
jakeyipanything that urgently needs to go in ?08:13
daleeswhat do we want to discuss? If there's a few I can add to agenda, else we can just discuss08:13
daleesjakeyip: matt has landed his api addition for credential rotation, which comes with the client update. So they are good for now.08:14
daleesthe ui and tempest will be needing reviews shortly, once the client version is released.08:14
daleesthere are one or two pending for Magnum, and a few capi-helm driver08:15
daleesthe Magnum one that needs considering is 959069 - the sqlachemy change. I've been reading about that today08:16
jakeyipyeah I'm looking thru that and John is right, we can't edit like that08:16
daleesit's been altered to just add the `mysql_DEFAULT_CHARSET` instead. But I'm curious if we can just add another migration that will go through the tables and set them all. I need to look at the bug report again.08:18
daleesah it's actually one of the migrations that is failing. So we have to edit a old migration in some way to affect that, we can't just add a new one.08:20
jakeyipyeah there was a couple of reasons that can cause this, one of the mistakes was identified in the bug report where a charset was specified08:24
jakeyipwe ran into this a few times IIRC, O cam08:25
jakeyipwe ran into this a few times IIRC, I can't remember exactly now but I think there was a change in mysql too08:26
jakeyipexisting deployment just need to fix it manually IIRC, a migration won't help, I think it will get stuck at foreign keys08:29
daleesit looks like we could modify the UPDATE query[1] to specify the collation in the impacted migration. Then adding another migration to set all tables' collations might be reasonable? (most db sizes shouldn't be too large, even if it is a re-create operation)08:30
dalees[1] https://opendev.org/openstack/magnum/src/commit/c85b9554d3d3570cc6baa2d69fd1b058682df104/magnum/db/sqlalchemy/alembic/versions/c04e925e65c2_nodegroups_v2.py#L4508:30
daleesthere are a few approaches, anyway. I'm not sure which is most consistent with existing dbs.08:31
dalees`utf8` vs `utf8mb4` is another can of worms we've had to deal with ;)08:32
mnasiadkaI’d say if we can define new migration file that fixes it - it would be best not to touch existing migration files08:32
daleesmnasiadka: that linked migration file is where it's breaking in the bug report. So we *have* to touch it. But it might be able to be minimized?08:33
jakeyipI'm saying we can't really, it's hard to know what's the status of existing DBs. depending on when they are created or what the admin as set the default to08:33
seunghunleeI'm not entirely sure how alembic handles this but this bug will only appear when new magnum deployment was done with MariaDB 11.5 or later. So, wouldn't it be okay to touch the old alembic operations? As old deployments already has magnum tables in the DB with consistent utf8mb3_general_ci collation set.08:39
jakeyipI think it will affect any deployment if the default for mysql cluster at that time isn't utf8mb3_general_ci? 08:42
mnasiadkaI remember changing existing migrations is not the best jdea - but don’t have time this week to investigate.08:47
mnasiadkaMaybe let’s ask on openstack ML? Surely Nova or others had something similar in the past.08:47
seunghunleePerhaps we need to tackle this separately. New deployments and old deployments. My current bugfix will work for the new deployments. For old deployments, some different alembic op or direct sql script to check the inconsistency and alter the table?08:47
daleesI will have an experiment tomorrow. I think we can alter the raw query SQL in the offending migration so it works even with inconsistent tables. Then we can decide if adding another migration to set all tables to a consistent collation/charset.08:48
jakeyipyes seunghunlee that will be good 08:48
jakeyipdalees: you will need to `set foreign_key_checks = 0;` if the table has a foreign key, can alembic do that? (haven't tried)08:49
seunghunleeYes FK columns are also obstacles 08:50
daleesjakeyip: ah, noted. I was reading Cinders (as a randomly selected example) which does that, and updates char sets: https://github.com/openstack/cinder/blob/master/cinder/db/migrations/versions/921e1a36b076_initial.py#L92108:51
dalees(that's all in a `if connection.engine.name == "mysql":`, however. Not sure if that matches mariadb)08:52
daleesseunghunlee's setting of default charsets seems fairly reasonable and ends up better than adding COLLATE to the query. Then we just worry about the existing dbs08:58
jakeyiperm qn: how are deployment tools creating databases?09:01
jakeyipI found https://docs.openstack.org/install-guide/environment-sql-database-ubuntu.html , if followed by deployment tools, will make this a non-issue for new deployments. not taking away anything from seunghunlee's patch09:04
daleesnot the most common approach anymore, but the easiest to find: https://github.com/openstack/puppet-magnum/blob/master/manifests/db/mysql.pp#L4709:05
jakeyipwell we still use puppet :) 09:06
jakeyipso puppet defaults to that too09:07
jakeyipso puppet defaults to utf8 too09:07
daleesmagnum ansible calls `openstack.osa.db_setup`: https://github.com/openstack/openstack-ansible-os_magnum/blob/master/tasks/main.yml#L3109:08
daleesbut i'm not sure where that role lives. if only we had someone here who knew OSA ;)09:08
jakeyipseunghunlee: what does 'show create database magnum' on your db show?09:10
seunghunleeOne sec please09:11
mnasiadkaNot that I'm picky -  should we have some CI test/job that uses new mariadb?09:14
daleesosa doesn't specify collation or encoding, and the ansible module doesn't either: https://github.com/openstack/openstack-ansible-plugins/blob/master/roles/db_setup/tasks/main.yml#L2409:15
mnasiadkaI'd assume just running the centos10 devstack job should uncover that problem09:15
jakeyipmnasiadka: that'll test devstack which won't show an issue if someone is using say kolla-ansible for deployment?09:16
mnasiadkaI doubt kolla-ansible or OSA are doing something really wrong09:16
opendevreviewMichal Nasiadka proposed openstack/magnum-tempest-plugin master: CI: Introduce CentOS 10 Stream job  https://review.opendev.org/c/openstack/magnum-tempest-plugin/+/95911309:19
mnasiadkaLet's see09:19
jakeyipnot to say they are wrong, rather are they specifying any charset / collation when CREATING the DB cluster, or when creating the DBs for the service09:19
seunghunleejakeyip: show create database magnum shows CREATE DATABASE `magnum` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */09:20
mnasiadkaLet's look at Kolla-Ansible - https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/magnum/tasks/bootstrap.yml#L1909:21
mnasiadkanothing crazy here09:21
mnasiadkahttps://github.com/openstack/kolla-ansible/blob/0e6bab76fe1b3e47e21295c5a23a8008e395b8de/ansible/roles/mariadb/templates/galera.cnf.j2#L509:21
seunghunleeBut this was deployed with K-A and there was a modification to mariadb config. Such as init-connect='SET NAMES utf8mb3 COLLATE utf8mb3_general_ci'09:21
mnasiadkathis is the only place where we force utf809:21
seunghunleeBut this did not stop the bug09:22
daleesOSA galera has this commit setting the collation-server config. Some relevant info in the commit message: https://github.com/openstack/openstack-ansible-galera_server/commit/ac3942da3daf7c8580b9a728644909b5c52f2c1309:24
jakeyipseunghunlee: in taht case, creating a table without charset specified should have taken the charet of the db. you can create a temp table to verify like - create table `temp` (`created_at` datetime DEFAULT NULL);09:26
mnasiadkadalees: Kolla-Ansible sets the same, and I assume seunghunlee hasn't changed that setting - so it doesn't help09:26
jakeyipstrange , do you have a new deployment with K-A you can verify?09:29
seunghunleeNo I did not change that. I only changed init-connect to see if forcing collation for clients can fix the issue.09:31
seunghunleeIt did not09:31
jakeyipmnasiadka:  do you have a new deployment with K-A you can verify? what ends up being the charsets of those tables and db?09:32
jakeyipriadb docs here https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/setting-character-sets-and-collations09:32
seunghunleeI can try new deployment after destroying current deployment now.09:33
jakeyip1. if nothing is set, you end up with mariadb default of utf8mb4 and utf8mb4_uca1400_ai_ci09:33
noonedeadpunkfwiw, I got down to this yesterday09:34
noonedeadpunkand eventually with >=11.5 if you supply charset, then new variable character-set-collations has precedence over all existing09:35
noonedeadpunksmth like that I come up with for OSA: https://review.opendev.org/c/openstack/openstack-ansible-galera_server/+/95907509:36
noonedeadpunkbut the fact that collation-server/character-set-server is simply ignored is extremely confusing09:36
noonedeadpunkand with current patchset I get `utf8mb4_uca1400_ai_ci` for everything on new deployments09:37
noonedeadpunkso kolla patch will be likely needed if you go over 11.5 to keep current behavior09:38
noonedeadpunkbut if you don't - then upgrades might start failing in some time, as newly introduced tables to services will have different collation then old ones09:39
daleesyeah ignoring those server values is confusing. I'm glad the new default is utf8mb4 though09:39
noonedeadpunkwhat is more confusing is that they are not ignored, if CHARSET is not supplied with query09:40
seunghunleeYeah I found this also very confusing. I don't like MariaDB's design choice here.09:40
noonedeadpunkSo if you have `collation-server = utf8mb4_general_ci` and will do first patchset (https://review.opendev.org/c/openstack/magnum/+/959069/1) - then it will be utf8mb4_general_ci09:41
* noonedeadpunk going to leave bug report in place for them to evaluate the choice09:41
noonedeadpunkbut it's good that at least one service was incosistent in charsets, as otherwise it could be a bigger tragedy tbh09:45
daleesI will end the meeting officially, thanks for participating everyone.  Continue the discussion, however! 09:45
dalees#endmeeting magnum09:45
opendevmeetMeeting ended Tue Sep  2 09:45:44 2025 UTC.  Information about MeetBot at http://wiki.debian.org/MeetBot . (v 0.1.4)09:45
opendevmeetMinutes:        https://meetings.opendev.org/meetings/magnum/2025/magnum.2025-09-02-08.01.html09:45
opendevmeetMinutes (text): https://meetings.opendev.org/meetings/magnum/2025/magnum.2025-09-02-08.01.txt09:45
opendevmeetLog:            https://meetings.opendev.org/meetings/magnum/2025/magnum.2025-09-02-08.01.log.html09:45
jakeyipnoonedeadpunk: do you have a link to the >=11.5 character-set-collations defaults?09:46
daleesthe docs mention it here: https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/setting-character-sets-and-collations09:48
noonedeadpunkthere was a better one09:48
daleesah, no thats the other defaults anyway.09:49
daleeshttps://jira.mariadb.org/browse/MDEV-2582909:49
noonedeadpunkhttps://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#character_set_collations09:49
noonedeadpunkand also there was also https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/supported-character-sets-and-collations09:51
noonedeadpunkwhich mentions default changes between versions09:51
jakeyipseunghunlee: just to confirm you are running mariadb >=11.5 ?09:54
seunghunleeI'm testing with MaraiDB 11.809:55
mnasiadkaoh lol, devstack is installing mariadb 10.1109:59
mnasiadkahttps://zuul.opendev.org/t/openstack/build/e0e939b565ee48c3a5cd2a2c52a8e872/log/job-output.txt#646610:00
jakeyipnoonedeadpunk: just to confirm, because utf8 , utf8_general_ci is NOT in the default character-set-collations (for >=11.5), those settings in mariadb server conf are simply ignored?10:00
seunghunleeI don't think those are ignored when set in conf. utf8 is still pointing at utf8mb3 not utf8mb4.10:02
jakeyipseunghunlee: can you test, by setting only collation-server to utf8_general_ci and character-set-server to utf8 (like how K-A does it), what are the charset and collation for both magnum DB and the tables ?10:06
jakeyipnoonedeadpunk says it ends up being utf8mb4_uca1400_ai_ci , we need to confirm this10:07
seunghunleejakeyip: I'm currently deploying MariaDB 11.8 and magnum with K-A default. I'll let you know10:09
seunghunleeK-A default overrides charset and server collation set: https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/mariadb/templates/galera.cnf.j210:11
noonedeadpunkjakeyip: utf8 is an alias to utf8mb3 fwiw10:12
noonedeadpunkalso it's complicated10:13
noonedeadpunkthey are not fully ignored. But when you supply `CHARSET` in SQL query, instead of relying on a default collation, it seems to be picking from the character_set_collations10:14
noonedeadpunkso there's thin unobvious precedence that exists10:14
seunghunleeThat's correct and that's the starting point of the bug10:14
noonedeadpunkeven despite the fact, that all prior existing pointers say it should be a different one10:15
noonedeadpunkso I'm not sure it's bug per say, but it's really very unobvious behavior10:16
noonedeadpunkanyway10:18
jakeyipI noticed noonedeadpunk testing defaults to utf8mb4_uca1400_ai_ci but seunghunlee bug report got utf8mb3_uca1400_ai_ci, is that important?10:20
noonedeadpunkI aim for utf8mb3_general_ci at all :D10:21
seunghunleeI don't think so, I also experienced same bug with all table's charset is utf8mb3. Magnum bug is caused by collation set mismatch.10:21
noonedeadpunkas I don't think we can just go and change charset and collation10:22
noonedeadpunk++10:22
noonedeadpunkyeah, it's just that some tables are going with new default as charset is supplied while others go with old behavior due to not adding charset10:23
seunghunleeExactly10:24
opendevreviewStephen Finucane proposed openstack/magnum master: api: Use application_url, not host_url  https://review.opendev.org/c/openstack/magnum/+/95276210:25
opendevreviewStephen Finucane proposed openstack/magnum master: trivial: Rewrap controller  https://review.opendev.org/c/openstack/magnum/+/95911510:25
noonedeadpunkand tbh should be backported as far as possible as well....10:27
jakeyipdoes OSA specify both charset and collation when creating the DB (not table)10:28
noonedeadpunkno, we don't speccify anything when creating DB10:29
noonedeadpunkwe expect it to use defaults, which it does10:29
noonedeadpunkas in bug https://jira.mariadb.org/browse/MDEV-37544 yo ucan see that db collation and charset are as expected10:30
noonedeadpunkhave no effect on tables anymore though....10:30
noonedeadpunkbut if I do `CREATE TABLE .....` without `DEFAULT CHARSET=utf8mb3` - table collation will be utf8mb3_general_ci as for the database default10:32
jakeyipsounds like this is going to be a bigger issue as time goes by10:36
jakeyipthanks for this, it is a great find10:36
noonedeadpunkfrankly - it would be way bigger if magnum as well was consistent in how to create charsets10:37
noonedeadpunkas then CI won't fail and it's unlikely us to realize that charset is different now by default10:37
noonedeadpunkuntil it was too late...10:37
noonedeadpunk*how to create tables10:38
noonedeadpunkso thanks magnum for us finding this issue and staying on top of it!10:38
jakeyipwell if magnum was consistent and everyone was, it is a non-problem too :P 10:39
noonedeadpunkit is problem...10:39
noonedeadpunkas think of an upgrade - all tables and databases have default of utf8mb3_general_ci for instance. Now they upgrade mariadb to 11.8 or smth, and upgrade openstack10:40
noonedeadpunkand now, all new tables are being created with utf8mb3_uca1400_ai_ci10:40
noonedeadpunkbecause defaults are no longer respected the same way as they were for last 2 decades10:40
jakeyipoh yah true, upgrading mariadb 10:42
noonedeadpunkand now we can do smth on kolla/osa side to safeguard users as well10:42
noonedeadpunkso it's a good thing :)10:42
jakeyipgoing forward,  should we specify charset in a table? 10:43
noonedeadpunkand that's why I'm kinda thinking about backport of this patch down the road - as there totally could be a new deployment on 11.8 and Epoxy or anything actually10:43
noonedeadpunkcharset is specified already10:43
noonedeadpunkcollation is not10:43
noonedeadpunkand it's a good question if collation should be specified...10:44
noonedeadpunkI think, it should, tbh10:44
jakeyipI am thinking, if there is no need to, maybe we can remove specify charset and let the deployment tools handle the default10:45
jakeyipremove specifying charset in the table create10:45
noonedeadpunkfrankly I'm thinking more in direction to be even more specific and define collation as well10:46
noonedeadpunkas the only way to change that down the road without breaking things - would be some kind of migration10:46
noonedeadpunkSo it's not really on plate of deployment tools to handle charset/collation changes10:46
jakeyipif the deployment tools create the database with both charset and collation, then the projects don't need to10:46
noonedeadpunkwe jsut have `create database XXX` more or less10:47
noonedeadpunkbut imo - that's up to project to say - well, we can't work with utf8mb3 - we need to have utf8mb4 to store X10:47
noonedeadpunkand then create a migration from one charset to another10:48
jakeyipyou already set that for the server, create database just takes that and sets it as the database default10:48
noonedeadpunkwhich is not helpful as we've just found :D10:49
seunghunleeK-A MariaDB 11.8 and magnum deployment is done and show create database magnum gives: CREATE DATABASE `magnum` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */10:49
jakeyipif a project has specified needs, yes, they can specify (both). else default to not specifying either10:49
noonedeadpunkalso you probably can't do that at this point. as there could be deployments with default of latin1 for instance. now, removing charset from migrations such deployments will be broken10:50
noonedeadpunkalso I'd say that deployment tools are covering like what? 60% of all deployments?10:51
jakeyipthere's install guide here also - https://docs.openstack.org/install-guide/environment-sql-database-ubuntu.html10:52
noonedeadpunkeh, ok, then dunno :)10:53
jakeyip(install guide prob needs update too) :) 10:54
noonedeadpunkI frankly now thinking of the way for us to do migration to better charset and collation as a community10:54
noonedeadpunkand if it's worth discussing...10:55
jakeyipmaybe it's a TC thing? some good defaults? 10:56
noonedeadpunk++10:56
jakeyipexisting deployments and projects can figure out how to get there (if they don't have need for something different)10:57
noonedeadpunkLike seemingly, the easiest way could be an alembic migration....10:57
noonedeadpunkbut then defining no charset now would make such migration really weird10:58
jakeyiplike if TC says default to utf8mb3 utf8mb3_general_ci, install guide and deployment tools can then follow. project will remove specifying something if the default works for them10:58
jakeyipexisting deployments will always be a problem, but if I know the default it's easy to fix it all up manually or with a alembic 11:00
jakeyipoh hmm... scratch that, it's not easy figuring out if the 'default' has been overridden by an operator.11:01
jakeyipI've summarised the convo in the bug report, https://bugs.launchpad.net/magnum/+bug/2121797/comments/6 12:14
seunghunleejakeyip: That's great. Thank you12:30
*** Max is now known as Guest2565515:08
*** Max is now known as Guest2566416:20
opendevreviewJason Rayne proposed openstack/magnum-capi-helm master: Feat: Add cluster template labels for custom pod/service CIDRs  https://review.opendev.org/c/openstack/magnum-capi-helm/+/95872017:24
*** Max is now known as Guest2567118:08
*** Max is now known as Guest2567419:09

Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!