Friday, 2022-04-01

*** ysandeep|out is now known as ysandeep05:09
*** ysandeep is now known as ysandeep|lunch08:31
*** ysandeep|lunch is now known as ysandeep09:15
opendevreviewGregory Thiemonge proposed openstack/octavia master: Fix PING health-monitor with recent haproxy releases  https://review.opendev.org/c/openstack/octavia/+/83614911:49
opendevreviewGregory Thiemonge proposed openstack/octavia master: Fix PING health-monitor with recent Centos releases  https://review.opendev.org/c/openstack/octavia/+/83617011:49
*** ysandeep is now known as ysandeep|afk11:51
*** ysandeep|afk is now known as ysandeep13:28
*** ysandeep is now known as ysandeep|out14:53
Ammadhello 19:14
AmmadAnyone available from octavia team ?19:14
johnsomHi19:15
AmmadNeed some help with octavia 9.0.119:15
AmmadHi Johnsom19:15
johnsomWhat can we help with?19:16
AmmadI have upgraded my octavia to 9.0.0 to 9.0.1. I am unable to create pool in loadbalancer19:16
Ammad2022-04-02 00:10:12.163 7620 DEBUG wsme.api [req-74fd3a57-75b8-48c1-b636-387ef534c2ea - 96301fdbcc1c46fb8e00bb5f07f7d16d - default default] Client-side error:  is not a valid option for  format_exception /usr/lib/python3/dist-packages/wsme/api.py:22219:16
Ammadthis is the error I am getting while creating simple HTTP pool19:17
johnsomHmm, that is pretty odd, there wasn't much change in 9.0.1.  There isn't more information or a traceback in the API log??19:18
AmmadI see only three commits from 9.0.0 to 9.0.1 19:18
Ammadhttps://opendev.org/openstack/octavia/commit/4039d35ce221b58490d4aa5b3497e29dbf7664ac 19:18
AmmadThis one looks major19:18
AmmadNo more trace back api logs just say this log while creating19:19
johnsomYes, but that is all worker side. Your error is happening before it gets there. I'm cluing off  the "client-side-error" in the log entry19:19
johnsomOk, can you run your pool command with the --debug flag? Like this "openstack --debug loadbalancer pool create ..."19:20
johnsomThen paste bin it to paste.openstack.org19:20
AmmadLet me 19:21
johnsomYeah, I see three patches as well, none of which made any changes to the API service, so I think it's something else at play here.19:28
Ammadhttps://paste.openstack.org/show/813632/19:29
Ammadhere it is19:29
johnsomThank you, reading19:29
johnsomDid you upgrade using kolla?19:30
johnsomAlso, which provider driver did you use for the load balancer?19:33
AmmadNo the installation is manual on ubuntu 20.04 vm19:33
Ammadusing amphora 19:33
johnsomOk, really interesting. Give me a minute to look at some code.19:34
Ammadnot using job board19:34
johnsomOh good19:34
johnsomOk, this is a database error. Did you do the database migration during the upgrade?19:37
AmmadNo19:38
johnsomOk, let's look at doing that as a starting point here.19:38
Ammadoctavia-db-manage --config-file /etc/octavia/octavia.conf upgrade head19:39
johnsomyep19:39
AmmadDo I use this upgrade command ?19:39
johnsomI get:19:40
johnsomhttps://www.irccloud.com/pastebin/wLkfikLA/19:41
johnsomAs my database is up to date19:41
johnsomI'm guessing you are going to see some migrations run19:41
Ammadroot@loadbalancer-khi04:~# su -s /bin/bash octavia -c "octavia-db-manage --config-file /etc/octavia/octavia.conf upgrade head" 2022-04-02 00:40:32.029 7865 INFO alembic.runtime.migration [-] Context impl MySQLImpl. 2022-04-02 00:40:32.029 7865 INFO alembic.runtime.migration [-] Will assume non-transactional DDL.19:41
AmmadDidn't see any migration run19:42
johnsomHmmm, ok19:42
Ammadseen the same output as yours19:42
johnsomHow do you feel about making a logging code change to the code, restarting the API service?19:43
johnsomIs see the (not good code) that is raising this, but it's not logging the real issue. The author was kind enough to leave a TODO to fix it. lol19:44
AmmadI am not good with coding. But with your help I can edit code and restart the service19:45
johnsomOk, no problem, this is a super small change. Give me one minute and I will provide instructions19:45
AmmadSure19:45
johnsomThis is the line raising the error: https://github.com/openstack/octavia/blob/stable/xena/octavia/api/v2/controllers/pool.py#L15319:46
AmmadOhh19:47
johnsomWe are going to edit the octavia/api/v2/controllers/pool.py file. You will find it under /usr/lib/python3(8 or 9).19:49
johnsomAt line 153, we will add a log line:19:50
johnsomhttps://www.irccloud.com/pastebin/x0W0NTwr/19:50
johnsomOnce, you do that, restart the octavia API process, retry your command, and pastebin me the error log message from the API log19:51
AmmadOk let me do it 19:51
Ammadhttps://paste.openstack.org/show/813634/19:54
AmmadHere are the api debug logs19:54
AmmadLooks like some DB issue 19:55
AmmadI am using percona xtradb cluster 8.019:56
johnsomYeah, I have not seen this outside of a case where the DB migration wasn't run. Let me think about this for a second19:56
johnsomOh, the API isn't pointing to a secondary instance that is out of sync is it?19:56
johnsomI mean, protocol "HTTP" should have been in there from the start, so... very odd19:58
AmmadThere is only one VM of all octavia services not multiple. 19:59
johnsomYeah, I was talking about percona instances19:59
AmmadNo, its sync with group. All other services like keystone nova neutron cinder heat magnum works fine.20:00
johnsomCan you connect to the "octavia" database and do a "select * from protocol;"20:00
Ammadlet me 20:00
johnsomYou should see HTTP in that list20:00
johnsomhttps://www.irccloud.com/pastebin/KFqIO8ZG/20:00
johnsomMine is a newer version, so there may be a few extra in my list.20:01
Ammadhttps://paste.openstack.org/show/813635/20:01
AmmadHTTP is there 20:02
AmmadSET GLOBAL FOREIGN_KEY_CHECKS=0;20:19
johnsomThat is very dangerous. I would not recommend setting that20:19
AmmadOhh20:19
AmmadWhat else can we do to fix this ?20:22
Ammadwill reverting back to 9.0.0 helps ?20:23
johnsomNo, this is not related to the 9.0.1 change, there was no change to the protocols table in the database or the API tier. The real question here is why is the DB saying the foreign key isn't there, where you can see it is there.20:26
AmmadLook like its bug in percona xtadb20:30
AmmadLook like its bug in percona xtadbxtradb 8.020:30
johnsomYeah, I can't see why that insert should fail20:31
AmmadWhat SQL version you recommend to use ?20:32
Ammadmariadb ? mysql ?20:32
johnsomWe test on mariadb20:33
AmmadLet me migrate the DB to mariadb 10.6 20:34
AmmadLet see if this fixes the issue20:34
johnsomYeah, looking at your snippet, the INSERT SQL and the foreign key all look correct and this hasn't changed in years in the code. I really don't know why it would say it's invalid. The only thing I can think is the database had a locale change somewhere along the line and the tables weren't updated. Like an admin changed to UTF8 in the database tools but forgot to update the tables, etc...21:14
johnsomMaybe a show create table on both the pool and the protocols tables and make sure the engine settings are the same, etc.21:15
johnsomI am going to open a bug though, that error message you got is horrible and that TODO needs to be fixed.21:16
johnsomhttps://storyboard.openstack.org/#!/story/200995721:24
AmmadI have  installed mariadb 10.6 and tried to restore the dump but it gives below error 21:27
AmmadEnter password:  ERROR 1273 (HY000) at line 34: Unknown collation: 'utf8mb4_0900_ai_ci'21:27
johnsomYeah, that is the engine setting I was wondering about. if some admin changed that on some tables.21:27
johnsomAmmad All of mine have: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 |21:28
johnsomI get that output from "show create table protocol;" and "show create table pool;"21:29
AmmadI have then followed the link https://tecadmin.net/resolved-unknown-collation-utf8mb4_0900_ai_ci/ and changed it via sed to utf821:30
Ammadand restored the dump21:30
AmmadNow pool creation is working fine.21:30
johnsomYeah, so it's very likely something/someone changed the DB to make the charset/collation inconsistent in the DB. I don't we set that in our DB migrations, it just uses the default for the database at the time the migration is run.21:32
AmmadI think this utf8mb4 is default for percona xtradb 8.021:34
johnsomI wonder if your database was upgraded sometime after the initial migration run of octavia21:34
AmmadYes, I have upgraded from octavia 8.0 to 9.0 21:35
johnsomI meant the percona version21:35
johnsomFrom Octavia perspective, we don't really care as long as it's a UTF8 compatible and all of the tables have the same setting.21:35
AmmadYes, I have upgraded the percona 8.0.20 to 8.0.26 once.21:36
AmmadYes i think utf8mb4 is also backward compatible.21:37
johnsomThat might have led us here. There might have been a charset/collation migration step missed.21:37
AmmadOhh. Will this be ok that I should restore the dump back to percona from mariadb ? 21:38
johnsomIf you still have the old percona DB, it would be interesting to check those settings on those two tables. You could probably migrate the tables to one of the collations and continue to use the percona setup21:39
Ammadits now from utf8mb4 to utf8mb3.21:39
johnsomAs long as all of the octavia tables are consistent with the collation, I don't think it will be a problem.21:40
AmmadI have upgraded percona months back. I have to see if the backup of old db is available.21:40
AmmadLet me migrate the dump back to percona and see if it works21:41
johnsomOk, and check those two tables after you restore.21:41

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