Wednesday, 2023-02-01

-@gerrit:opendev.org- Clark Boylan proposed:00:28
- [zuul/zuul] 872044: Switch to sqlalchemy 2.0 https://review.opendev.org/c/zuul/zuul/+/872044
- [zuul/zuul] 872226: Test with MariaDB instead of MySQL https://review.opendev.org/c/zuul/zuul/+/872226
- [zuul/zuul] 872363: Don't nest alembic transactions https://review.opendev.org/c/zuul/zuul/+/872363
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 872364: Switch our local testing docker-compose to mysql 8.0 https://review.opendev.org/c/zuul/zuul/+/87236400:29
@clarkb:matrix.orgI think maybe 872363 will fix sqla 2.0. This of course assumes that there aren't other transaction issues00:29
@clarkb:matrix.orgI suspect that Zuul's use of sessions with a commit() call on context manager exit largely solve that problem for us though. Also I Think there would be warnings about this if we got it wrong. The alembic sitaution was more nuanced so no warning00:32
-@gerrit:opendev.org- Ian Wienand proposed:00:37
- [zuul/zuul-jobs] 872258: build-docker-image: fix change prefix https://review.opendev.org/c/zuul/zuul-jobs/+/872258
- [zuul/zuul-jobs] 872365: zuul-jobs-test-registry-docker-* : update to jammy nodes https://review.opendev.org/c/zuul/zuul-jobs/+/872365
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/nodepool] 870430: Add a cache for image lists https://review.opendev.org/c/zuul/nodepool/+/87043000:43
@iwienand:matrix.orgsigh, i'm guessing this broke yesterday-ish ... https://zuul.opendev.org/t/zuul/builds?job_name=zuul-jobs-tox-linters&project=zuul/zuul-jobs00:46
@iwienand:matrix.org```00:47
linters: 9174 W commands[3]> python -m ansiblelint --version [tox/tox_env/api.py:428]
Unable to parse ansible cli version: ansible 2.10.17
...
Keep in mind that only 2.12 or newer are supported.
```
@jim:acmegating.comClark: it seems like there is a small possibility that two components could attempt to creatio the initial schema with that change, right?  (presumably the second will fail and either recover or exit, so i don't expect data loss or corruption, just a non-graceful start)00:52
@jim:acmegating.com * Clark: it seems like there is a small possibility that two components could attempt to create the initial schema with that change, right?  (presumably the second will fail and either recover or exit, so i don't expect data loss or corruption, just a non-graceful start)00:52
@jim:acmegating.comClark: (because we fetch the current version in one transaction, then decide what to do with it in a second one)00:53
@clarkb:matrix.orgcorvus: yes that sounds right. In our testing environment this is a non issue but I guess if you turned on two schedulers at the same time and tey needed to do a migration you could hit this. Definitely worth thinking about a bit more.00:54
@jim:acmegating.comthe migration should be fine, it's actually initialization that would hit this00:54
@clarkb:matrix.orgWe may need a separate table we can lock with to avoid the EXCLUSIVE lock requirement to create the version table? Of course that may lead to the same problem00:54
@clarkb:matrix.orgfwiw this issue may have existed with older mysql and mariadb before since we don't hit the lock conflict?00:55
@clarkb:matrix.orgthey could both read the version and determine it is insufficient then proceed one after the other in sequence?00:55
@jim:acmegating.comClark: is there a way we can put these in one transaction?00:55
@jim:acmegating.comthat's what the code was intending (and used to) do00:56
@clarkb:matrix.orgI don't know00:56
@clarkb:matrix.orgI tried putting the get_current_revisions in a subtransaction and that didn't work00:56
@clarkb:matrix.orgbut maybe I did that wrong (so we'd have a parent transaction, then subtransactions for get_current_revisions and the alembic stamp/migrate)00:56
@jim:acmegating.comis alembic now explicitly creating new transactions within the stamp or upgrade methods?00:57
@clarkb:matrix.orgcorvus: it always did https://opendev.org/zuul/zuul/src/branch/master/zuul/driver/sql/alembic/env.py#L72-L7300:57
@jim:acmegating.comer what calls that?00:58
@clarkb:matrix.orgcorvus: invoking the alembic methods here: https://opendev.org/zuul/zuul/src/branch/master/zuul/driver/sql/sqlconnection.py#L329-L331 I think00:59
@clarkb:matrix.orgBut ya thats a separate transaction not part of the one we started previously and has a different connection id so the locking gets wedged00:59
@jim:acmegating.comClark: then maybe we should just call run_migrations directly00:59
@clarkb:matrix.orgBut also this only seems to affect mysql 8.0 and not 5.7 or mariadb01:00
@clarkb:matrix.orgcorvus: hrm and let alembic sort it all out internally?01:00
@clarkb:matrix.orgI think if we do that then we'd always have to do migrations rather than the sqla create which might be slower in some cases?01:00
@clarkb:matrix.orgI think that is why we're doing what we do here. We're trying to avoid going through migrations one after another when we can just create what we need today and set the version appropriately. But ya that should be safer.01:01
@jim:acmegating.comwell, i mean, you're saying that upgrade calls run_migrations_online, and that method basically just sets up  a connection/context/transactions then calls run_migrations.  so if we just call run_migrations inside our transaction, problem solved, right?01:01
@jim:acmegating.comor is the error occurring with stamp?01:02
@clarkb:matrix.orgoh sorr I thought you meant just call `alembic.command.upgrade(config, revision, tag=tag)` and don't worry about optimizing01:03
@jim:acmegating.comoh definitely not suggesting that01:03
@clarkb:matrix.orgdoing it the other way around might work but there is some magic going on with the target_metadata01:03
@clarkb:matrix.organd possibly other things01:03
@clarkb:matrix.orgI don't know how safe it is to call alembic that way and whether or not there is a good public interface for running migrations with an already established connection and transaction01:04
@clarkb:matrix.orgbut yes that is theoretically possible01:04
@clarkb:matrix.orgya I guess we just construct one of these https://alembic.sqlalchemy.org/en/latest/api/runtime.html#the-migration-context (which we are already doing) and call configure on it and then proceed as env.py does?01:07
@jim:acmegating.comi think this is worth looking into.  i am pretty sure the condition i'm describing can actually be hit in production.01:07
@jim:acmegating.comand we're already creating a context above, just needs a few more args01:08
@clarkb:matrix.orgya the issue would be a race where some initial zuul runtime db data is deleted by another scheduler showing up?01:08
@jim:acmegating.comi don't think anything is going to be deleted, i just thing the second one is going to crash01:08
@jim:acmegating.comit may actually crash today too, but in a slightly different way01:09
@clarkb:matrix.orghrm ya. And ya I think the transaction there may not be strong enough considering we don't have locking errors? or that may just be a change in msql 8 behavior01:09
@clarkb:matrix.orgI think go ahead and -1 it with the concern and I'll see if I can modify _migrate to bypass env.py01:10
@clarkb:matrix.orgthough I'm not sure how to express the stamp vs migrate01:10
@clarkb:matrix.orgboth seem to pass through env.py (the test case I used to debug this was stamping not migrating)01:10
@jim:acmegating.comworking this out a bit more -- i think even today it would crash, it's just that today it will crash when it tries to obtain the write lock at the start of the stamp call, and with the change it would crash after trying to update the data.01:12
@clarkb:matrix.orghttps://github.com/sqlalchemy/alembic/blob/rel_1_9_2/alembic/command.py#L671 is where stamp goes through env.py I think01:13
@jim:acmegating.comClark: actually, look at the calling context a bit more...: https://opendev.org/zuul/zuul/src/branch/master/zuul/driver/sql/sqlconnection.py#L34201:13
@clarkb:matrix.orgso ya its confusing that the thing that doesn't run migrations (stamp) calls the run migrations function.01:13
@jim:acmegating.comwe wrap the whole thing in a zk lock.  i think we're actually okay.  :)01:13
@clarkb:matrix.orgoh ha01:14
@clarkb:matrix.orgwe solved the db locking by using a different db01:14
@jim:acmegating.comyep.01:14
@clarkb:matrix.orgthat might be worth a comment in _migrate though01:14
@clarkb:matrix.org"this relies on an external locking mechanism etc"01:14
@jim:acmegating.comyeah, i'm not opposed to that.  :)01:15
@clarkb:matrix.orgok I can make that update, but first dinner01:15
@clarkb:matrix.organd maybe sleep too and get that up in the morning01:16
@jim:acmegating.comthanks!01:17
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 872368: Allow default-ansible-version to be an int https://review.opendev.org/c/zuul/zuul/+/87236801:22
@iwienand:matrix.org> <@iwienand:matrix.org> sigh, i'm guessing this broke yesterday-ish ... https://zuul.opendev.org/t/zuul/builds?job_name=zuul-jobs-tox-linters&project=zuul/zuul-jobs01:44
one is tox 4.4.3 and one is 4.4.4
@iwienand:matrix.orgi don't think it's tox (for once). it happens to me locally too.  ansible-lint --version fails02:01
@iwienand:matrix.orgafaics they install the same packages02:12
@iwienand:matrix.orghttps://paste.opendev.org/show/bCi9y98FYZX8h9KWZLz2/02:12
@iwienand:matrix.orgfail -> https://zuul.opendev.org/t/zuul/build/89548c8389434649a4c4193fbd3ce87b/console02:12
@iwienand:matrix.orgpass -> https://zuul.opendev.org/t/zuul/build/5c93155120f244e9890a860591d4d08a/console02:13
@iwienand:matrix.org... i think it's https://github.com/ansible/ansible-compat/releases/tag/v3.0.0 ...02:24
-@gerrit:opendev.org- Ian Wienand proposed: [zuul/zuul-jobs] 872371: linters-requirements : update Ansible to 2.12 https://review.opendev.org/c/zuul/zuul-jobs/+/87237102:47
-@gerrit:opendev.org- Ian Wienand proposed:05:14
- [zuul/zuul-jobs] 872371: linters-requirements : update Ansible to 2.12 https://review.opendev.org/c/zuul/zuul-jobs/+/872371
- [zuul/zuul-jobs] 872365: zuul-jobs-test-registry-docker-* : update to jammy nodes https://review.opendev.org/c/zuul/zuul-jobs/+/872365
- [zuul/zuul-jobs] 872258: build-docker-image: fix change prefix https://review.opendev.org/c/zuul/zuul-jobs/+/872258
-@gerrit:opendev.org- Ian Wienand proposed: [zuul/zuul-jobs] 872375: container-roles-jobs: Update tests to jammy nodes https://review.opendev.org/c/zuul/zuul-jobs/+/87237505:27
-@gerrit:opendev.org- Viktor Nikolovski proposed: [zuul/nodepool] 872318: Quota support for Openshift/OpenshiftPod drivers https://review.opendev.org/c/zuul/nodepool/+/87231807:39
-@gerrit:opendev.org- Marvin Becker proposed wip: [zuul/nodepool] 867971: Add additional pod specs to openshift driver https://review.opendev.org/c/zuul/nodepool/+/86797107:42
-@gerrit:opendev.org- Marvin Becker proposed wip: [zuul/nodepool] 871060: Add volumes to openshift pod workers https://review.opendev.org/c/zuul/nodepool/+/87106007:43
-@gerrit:opendev.org- Viktor Nikolovski proposed: [zuul/nodepool] 872318: Quota support for Openshift/OpenshiftPod drivers https://review.opendev.org/c/zuul/nodepool/+/87231809:57
-@gerrit:opendev.org- Per Wiklund proposed: [zuul/nodepool] 871102: Introduce driver for openshift virtualmachines https://review.opendev.org/c/zuul/nodepool/+/87110210:19
-@gerrit:opendev.org- Marvin Becker marked as active:10:22
- [zuul/nodepool] 871060: Add volumes to openshift pod workers https://review.opendev.org/c/zuul/nodepool/+/871060
- [zuul/nodepool] 867971: Add additional pod specs to openshift driver https://review.opendev.org/c/zuul/nodepool/+/867971
-@gerrit:opendev.org- Per Wiklund proposed: [zuul/nodepool] 871102: Introduce driver for openshift virtualmachines https://review.opendev.org/c/zuul/nodepool/+/87110210:42
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 794854: Test zuul-client console-stream https://review.opendev.org/c/zuul/zuul/+/79485411:58
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul-client] 759838: Add change-status subcommand https://review.opendev.org/c/zuul/zuul-client/+/75983812:06
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/zuul] 872405: Prevent files cache ltime from going backward https://review.opendev.org/c/zuul/zuul/+/87240512:19
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul-client] 771853: Add show running-jobs subcommand https://review.opendev.org/c/zuul/zuul-client/+/77185312:44
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul-client] 835319: Add dequeue-all subcommand https://review.opendev.org/c/zuul/zuul-client/+/83531913:06
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 794854: Test zuul-client console-stream https://review.opendev.org/c/zuul/zuul/+/79485413:07
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 794854: Test zuul-client console-stream https://review.opendev.org/c/zuul/zuul/+/79485413:14
-@gerrit:opendev.org- Viktor Nikolovski proposed: [zuul/nodepool] 872318: Quota support for Openshift/OpenshiftPod drivers https://review.opendev.org/c/zuul/nodepool/+/87231814:33
@buktop:matrix.orgMaybe a stupid question but i was curious if there is a way to run somehow those tests locally?14:34
@clarkb:matrix.orgYes, the nox python jobs are more straightforward than the openshift functional job though. Running this script should set up zookeeper and zookeeper ssl auth: https://opendev.org/zuul/nodepool/src/branch/master/tools/test-setup-docker.sh then you run `nox -s tests`14:43
@buktop:matrix.orggreat, Thank you14:45
@clarkb:matrix.orgThe openshift functional job deploys an actual openshift 3 cluster and configures zookeeper to talk to it. I'm less familiar with that process, but I think if you have a CentOS 7 machine you can run openshift 3 and point the nodepool to it.14:45
@buktop:matrix.orgAt the moment my struggle was only with the nox tests, but will keep a note from this in case someone else needs it later.14:48
@clarkb:matrix.org* The openshift functional job deploys an actual openshift 3 cluster, zookeeper, and configures nodepool to talk to that openshift. I'm less familiar with that process, but I think if you have a CentOS 7 machine you can run openshift 3 and point the nodepool to it.14:48
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 794854: Test zuul-client console-stream https://review.opendev.org/c/zuul/zuul/+/79485414:54
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 794854: Test zuul-client console-stream https://review.opendev.org/c/zuul/zuul/+/79485414:55
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 794854: Test zuul-client console-stream https://review.opendev.org/c/zuul/zuul/+/79485415:26
-@gerrit:opendev.org- Matthieu Huin https://matrix.to/#/@mhuin:matrix.org proposed: [zuul/zuul] 810955: GUI: Add tenant dropdown to top menu https://review.opendev.org/c/zuul/zuul/+/81095515:44
-@gerrit:opendev.org- Clark Boylan proposed:17:19
- [zuul/zuul] 872363: Don't nest alembic transactions https://review.opendev.org/c/zuul/zuul/+/872363
- [zuul/zuul] 872044: Switch to sqlalchemy 2.0 https://review.opendev.org/c/zuul/zuul/+/872044
- [zuul/zuul] 872226: Test with MariaDB instead of MySQL https://review.opendev.org/c/zuul/zuul/+/872226
@clarkb:matrix.orgcorvus: ^ now with a comment17:19
@jim:acmegating.comClark: thanks!17:26
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 872433: Drop python warnings from test suite https://review.opendev.org/c/zuul/zuul/+/87243317:31
-@gerrit:opendev.org- Zuul merged on behalf of Simon Westphahl: [zuul/zuul] 871814: Initialize missing pipeline change list attribute https://review.opendev.org/c/zuul/zuul/+/87181417:36
@jpew:matrix.orgAre any Zuul people going to be at FOSDEM?22:15
@jim:acmegating.comttx mhu sometimes go; pinging them for input; i won't be able to attend this year :(22:59

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