Monday, 2021-03-29

*** rcernin has joined #openstack-keystone00:00
*** hamalq has joined #openstack-keystone00:56
*** hamalq has quit IRC01:01
*** zzzeek has quit IRC02:04
*** zzzeek has joined #openstack-keystone02:06
*** hamalq has joined #openstack-keystone02:57
*** hamalq has quit IRC03:01
*** rcernin has quit IRC03:06
*** rcernin has joined #openstack-keystone03:11
*** whoami-rajat has joined #openstack-keystone03:51
*** ricolin has quit IRC04:35
*** ricolin has joined #openstack-keystone04:48
*** hamalq has joined #openstack-keystone04:58
*** hamalq has quit IRC05:03
*** Luzi has joined #openstack-keystone05:59
*** viks____ has joined #openstack-keystone06:11
*** hamalq has joined #openstack-keystone06:59
*** hamalq has quit IRC07:03
*** bengates has joined #openstack-keystone07:14
*** bengates has quit IRC07:17
*** bengates has joined #openstack-keystone07:18
*** rcernin has quit IRC07:29
*** xek_ has joined #openstack-keystone07:47
*** xek_ has quit IRC07:48
*** bengates_ has joined #openstack-keystone08:05
*** bengates has quit IRC08:08
*** shyamb has joined #openstack-keystone08:09
*** tosky has joined #openstack-keystone08:28
*** rcernin has joined #openstack-keystone08:48
*** hamalq has joined #openstack-keystone09:00
*** rcernin has quit IRC09:00
*** hamalq has quit IRC09:04
*** xek has joined #openstack-keystone09:10
*** shyamb has quit IRC09:31
*** shyamb has joined #openstack-keystone09:33
*** rcernin has joined #openstack-keystone09:52
*** shyamb has quit IRC10:03
*** shyamb has joined #openstack-keystone10:04
*** rcernin has quit IRC10:07
*** rcernin has joined #openstack-keystone10:07
*** rcernin has quit IRC10:20
*** rcernin has joined #openstack-keystone10:27
*** rcernin has quit IRC10:38
*** rcernin has joined #openstack-keystone10:51
*** hamalq has joined #openstack-keystone11:00
*** hamalq has quit IRC11:05
*** rcernin has quit IRC11:05
*** shyamb has quit IRC12:20
*** hamalq has joined #openstack-keystone13:01
*** hamalq has quit IRC13:06
*** raildo has joined #openstack-keystone13:06
*** Luzi has quit IRC13:43
*** rcernin has joined #openstack-keystone14:01
*** rcernin has quit IRC14:06
*** whoami-rajat has quit IRC14:09
*** raildo has quit IRC14:36
*** whoami-rajat_ has joined #openstack-keystone14:44
*** hamalq has joined #openstack-keystone15:02
*** xek has quit IRC15:05
*** hamalq has quit IRC15:07
lbragstadknikolla ping15:36
*** timburke has joined #openstack-keystone15:41
knikollalbragstad: o/15:49
lbragstadknikolla hey - i'm curious if you have an opinion on https://review.opendev.org/c/openstack/keystone/+/73867715:50
*** Guest76033 is now known as jroll15:50
lbragstadthe problem is that we have a race condition when we hammer the identity API with password udpates15:50
lbragstadbut - a simple fix is to retry the request at the db layer15:50
lbragstadbut - my initial approach to a unit test isn't going to work because keystone sql module isn't isolated to specific tests - i think it's shared15:51
lbragstadso - when you mock it in one test, like what i'm doing, it has the ability to bleed into other tests causing them to fail15:51
lbragstaddo you have anything thoughts or recommendations on how to handle that?15:53
lbragstads/anything/any/15:53
knikollagive me a sec to read through the discussion on the review15:55
lbragstadack15:55
knikollainteresting, i thought the sqlite was in memory and unique to each thread running a test.15:58
lbragstadsqlite might be, but the actual keystone.common.sql.core bits are not - from what i can tell15:59
lbragstadso i think the sql.core.session_for_reader()/session_for_writer() bits are shared across test cases15:59
lbragstad(when the tests are run in parallel)15:59
knikollaso you think the global context referenced in that module is what's causing the bleeding?16:02
lbragstadi think so16:02
lbragstadi'd like to backport this fix, so i'd like to keep it relatively self-contained16:03
lbragstad(it affects all supported branches)16:03
knikollapragmatically, i think i'd be fine not adding the unit test16:06
lbragstadit's a simply change, but it would be nice to have something to protect against regressions16:06
lbragstadsimple*16:06
lbragstadat the same time - i'm not sure how invasive a fix to make that module work across tests would be16:07
lbragstad(or if it would be sane to backport)16:07
knikollai'm not sure. perhaps it's as simple as wrapping line 1008 in a with statement or something similar.16:08
knikollahmmm, no, that wouldn't change much i think.16:09
lbragstadoh - using the context manager for the mock lifespan?16:09
lbragstadi can try it16:09
knikollayeah, i don't think 240 tests would fail from a race condition bleeding out to other tests being run at the same time16:12
knikollaand more something messing up the environment for future unit tests to be run16:12
*** hamalq has joined #openstack-keystone16:15
lbragstadi wonder if using a context manager just makes the problem less likely to occur?16:15
knikollai think it may solve it16:17
knikollabecause 240 failed tests seems to imply that this did mess only the tests running on that core16:17
knikollaso my hunch is that future tests on that core fail16:18
knikollaand that resetting the mock would return things to normal for successive tests16:18
knikollaaka, less about tests in parallel, and more about future tests on that thread16:18
openstackgerritLance Bragstad proposed openstack/keystone master: Retry update_user when sqlalchemy raises StaleDataErrors  https://review.opendev.org/c/openstack/keystone/+/73867716:23
lbragstad^ seems to work for me locally?16:23
lbragstadwe'll see what zuul says though16:23
lbragstadi can run all the sql tests in parallel16:23
lbragstadso - nice suggestion knikolla :)16:23
knikollalogically it makes sense to me what i described above16:23
lbragstadi wonder if the race still exists though and we just pushed it into a much smaller window16:25
knikollai don't think so. a thread can only run one test at a time16:25
knikollaand it's returning in to normal before the end of the test16:26
knikollathe other threads are not messing with their sql sessions16:26
lbragstadisn't that what the results here were showing though? https://zuul.opendev.org/t/openstack/build/affa4fa71e44413391a9ac1f153e01d916:30
lbragstadbecause the mock was being set on a global object shared across tests via threads?16:31
*** hamalq has quit IRC16:31
*** hamalq has joined #openstack-keystone16:31
knikollathe failures say {7}16:32
knikollaso they're on the same thread16:33
*** hamalq has quit IRC16:33
*** hamalq has joined #openstack-keystone16:33
lbragstadaha - good call16:34
lbragstadinteresting - so yeah, i guess it depends on when that test was run and the fact that the mock wasn't properly cleaned up16:35
lbragstadnice catch16:35
lbragstadwe'll see if https://review.opendev.org/c/openstack/keystone/+/738677 comes back green16:35
knikollayeah. 240 tests seems consistent with 5000/8, somewhere mid run.16:36
* lbragstad nods16:36
knikollaa parallel issue would most likely only cause 8-16 failures depending on how long that test runs.16:36
lbragstadyeah - that makes sense16:37
lbragstadassuming the issue is localized to that specific test16:37
lbragstador testing window16:37
lbragstadif that patch comes back green i'll propose all the backports again16:39
*** gyee has joined #openstack-keystone16:57
*** zzzeek has quit IRC17:08
*** bengates_ has quit IRC17:10
*** zzzeek has joined #openstack-keystone17:10
*** bengates has joined #openstack-keystone17:11
*** gyee has quit IRC17:14
*** gyee has joined #openstack-keystone17:14
*** bengates has quit IRC17:15
*** timburke_ has joined #openstack-keystone17:35
*** timburke has quit IRC17:38
*** gyee has quit IRC17:38
*** gyee has joined #openstack-keystone17:49
*** ayoung has quit IRC18:10
*** ayoung has joined #openstack-keystone18:13
*** whoami-rajat_ is now known as whoami-rajat18:31
*** viks____ has quit IRC19:04
*** zzzeek has quit IRC19:05
*** zzzeek has joined #openstack-keystone19:06
lbragstadknikolla sweet - https://review.opendev.org/c/openstack/keystone/+/73867719:19
lbragstadproposing backports now19:19
lbragstadknikolla proposed to stable/wallaby, too19:30
lbragstadhttps://review.opendev.org/q/I75590c20e90170ed862f46f0de7d61c7810b5c9019:30
*** timburke_ has quit IRC20:35
*** timburke_ has joined #openstack-keystone20:36
*** whoami-rajat has quit IRC20:39
*** dasp has quit IRC22:13
*** dasp has joined #openstack-keystone22:19
*** rcernin has joined #openstack-keystone22:24
*** rcernin has quit IRC22:24
*** rcernin has joined #openstack-keystone22:24

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