Tuesday, 2020-01-07

*** goldyfruit_ has joined #openstack-glance02:35
*** goldyfruit_ has quit IRC02:36
*** goldyfruit_ has joined #openstack-glance02:36
*** rcernin_ has joined #openstack-glance03:13
*** rcernin has quit IRC03:13
*** rcernin_ has quit IRC03:56
*** rcernin has joined #openstack-glance04:00
*** udesale has joined #openstack-glance04:01
*** goldyfruit_ has quit IRC04:24
*** goldyfruit_ has joined #openstack-glance04:24
*** spsurya has joined #openstack-glance04:32
*** bhagyashris has joined #openstack-glance04:43
*** goldyfruit_ has quit IRC04:48
*** tkajinam has quit IRC04:52
*** gyee has quit IRC05:00
*** goldyfruit_ has joined #openstack-glance05:13
*** tkajinam has joined #openstack-glance05:23
*** abhishekk has joined #openstack-glance05:32
*** bhagyashris has quit IRC05:33
*** bhagyashris has joined #openstack-glance05:33
*** evrardjp has quit IRC05:33
*** evrardjp has joined #openstack-glance05:33
*** ratailor has joined #openstack-glance05:35
*** tkajinam has quit IRC05:58
*** pcaruana has joined #openstack-glance06:00
*** pcaruana has quit IRC06:14
*** ratailor_ has joined #openstack-glance06:22
openstackgerritAbhishek Kekane proposed openstack/glance-specs master: Copying existing image in multiple stores  https://review.opendev.org/69472406:23
*** ratailor has quit IRC06:25
*** tkajinam has joined #openstack-glance06:41
*** tkajinam_ has joined #openstack-glance06:52
*** rcernin has quit IRC06:54
*** tkajinam has quit IRC06:55
*** jawad_axd has joined #openstack-glance07:18
*** bhagyashris has quit IRC07:41
openstackgerritErno Kuvaja proposed openstack/glance master: Add possibility to delete image from single store  https://review.opendev.org/69804907:47
jokke_abhishekk: what do you think about my sledgehammer approach ^^?07:48
openstackgerritErno Kuvaja proposed openstack/glance master: Add possibility to delete image from single store  https://review.opendev.org/69804908:04
*** brinzhang has joined #openstack-glance08:09
abhishekkjokke_, in meeting, will look at it shortly08:15
jokke_kk08:15
*** udesale has quit IRC08:16
*** tesseract has joined #openstack-glance08:17
*** tosky has joined #openstack-glance08:23
*** pcaruana has joined #openstack-glance08:29
abhishekkjokke_, at first I didn't understand the test case written by Brian08:30
*** FlorianFa has quit IRC08:30
abhishekkand if you look at the failure logs then you can find that even 1st location is not deleted and assert is failing while comparing the locations08:31
abhishekkI am having confusion in function racy_pop at https://review.opendev.org/#/c/698049/12/glance/tests/unit/v2/test_images_resource.py@526008:33
abhishekkIMO that test is incorrect or I am missing some pointers here :(08:34
jokke_abhishekk: I was quite confused initially as well08:35
jokke_but the location pop actually was injecting the location back on _every_ failure08:36
abhishekkis it?08:36
jokke_yeah, ifyou look the last rev, it's actually passing that Brians test and addressing it08:37
jokke_Only change I did that affects something is in the locations.py08:38
abhishekkjokke_, on the latest patch of yours test is still failing08:38
jokke_hmm-m, wtf if passed locally08:39
abhishekknot sure what is the problem08:41
jokke_I have feeling that has again something to do about the different db drivers then. and the fact that Brian's test is poking it directly08:42
abhishekkcould be08:46
*** priteau has joined #openstack-glance08:47
*** tridde has quit IRC08:53
*** trident has joined #openstack-glance08:55
*** jawad_axd has quit IRC08:57
*** tkajinam_ has quit IRC08:58
*** brinzhang_ has joined #openstack-glance09:01
*** brinzhang_ has quit IRC09:03
*** brinzhang_ has joined #openstack-glance09:03
*** jawad_axd has joined #openstack-glance09:03
*** jawad_axd has quit IRC09:03
*** brinzhang has quit IRC09:04
openstackgerritGrĂ©goire Unbekandt proposed openstack/glance-specs master: Spec to import image in multi stores  https://review.opendev.org/66920109:05
*** bhagyashris has joined #openstack-glance09:05
jokke_hmm-m wtf, I have passed py37 test run in my shell buffer, now it fails again :|09:06
jokke_clearly missing something09:06
*** udesale has joined #openstack-glance09:07
*** brinzhang has joined #openstack-glance09:08
*** brinzhang_ has quit IRC09:11
jokke_abhishekk: there is definitely something wrong with Brian's mock as well. Even returning the loc instead of raising not found fails the test.09:18
abhishekkjokke_, yes, I am still not able to understand the mock function :(09:19
jokke_yeah, it almost mde sense until I realized that it's mocking the same function in location.py I did the fix on :P09:22
*** brinzhang_ has joined #openstack-glance09:22
jokke_then I started testing what if it returns correctly and it didn't still work09:22
jokke_so there is something wrong with it. Need to ask Brian once he comes online09:22
openstackgerritAbhishek Kekane proposed openstack/glance master: PoC - Copy existing image in multiple stores  https://review.opendev.org/69645709:23
*** brinzhang has quit IRC09:25
abhishekkjokke_, yes09:26
abhishekkjokke_, between I have tested copying patch that on failure it is deleting data from those stores only where it has copied the data09:32
*** abhishekk has quit IRC09:33
*** abhishekk has joined #openstack-glance09:55
jokke_abhishekk: that's good. I was expecting so based on how the taskflow stack works but I thought it was important thing to highlight and make sure we cover our arses09:58
abhishekkjokke_, :D09:58
jokke_and that our image import is not doing anything stupid on the revert09:58
abhishekkyes, I will write functional test to cover it as well09:58
*** brinzhang has joined #openstack-glance10:02
*** brinzhang_ has quit IRC10:05
*** udesale has quit IRC10:08
*** udesale has joined #openstack-glance10:09
*** ratailor__ has joined #openstack-glance10:22
*** udesale has quit IRC10:24
*** ratailor_ has quit IRC10:25
*** abhishekk has quit IRC10:31
*** priteau has quit IRC10:37
*** bhagyashris has quit IRC10:55
*** udesale has joined #openstack-glance10:56
*** brinzhang_ has joined #openstack-glance10:58
*** brinzhang has quit IRC11:01
*** bhagyashris has joined #openstack-glance11:08
*** udesale has quit IRC11:13
*** brinzhang has joined #openstack-glance11:14
*** brinzhang_ has quit IRC11:17
*** brinzhang_ has joined #openstack-glance11:22
*** brinzhang has quit IRC11:26
*** lpetrut has joined #openstack-glance12:33
*** jawad_axd has joined #openstack-glance12:58
*** szaher has joined #openstack-glance13:00
*** udesale has joined #openstack-glance13:04
*** brinzhang has joined #openstack-glance13:09
*** brinzhang_ has quit IRC13:13
*** goldyfruit_ has quit IRC13:20
*** ratailor__ has quit IRC13:31
*** priteau has joined #openstack-glance13:46
*** bhagyashris has quit IRC13:54
*** brinzhang_ has joined #openstack-glance14:03
*** brinzhang has quit IRC14:06
rosmaitajokke_: hello14:14
*** pcaruana has quit IRC14:20
*** brinzhang has joined #openstack-glance14:24
*** brinzhang_ has quit IRC14:28
*** pcaruana has joined #openstack-glance14:32
*** brinzhang_ has joined #openstack-glance14:36
*** brinzhang_ has quit IRC14:38
*** brinzhang_ has joined #openstack-glance14:38
*** brinzhang has quit IRC14:40
*** brinzhang_ has quit IRC14:40
*** brinzhang_ has joined #openstack-glance14:41
*** brinzhang_ has quit IRC14:42
*** brinzhang_ has joined #openstack-glance14:43
*** jawad_axd has quit IRC14:49
*** jawad_axd has joined #openstack-glance14:50
*** jawad_ax_ has joined #openstack-glance14:53
*** jawad_axd has quit IRC14:55
*** jawad_ax_ has quit IRC14:58
*** lpetrut has quit IRC15:31
*** udesale has quit IRC15:48
jokke_rosmaita: hey15:57
jokke_rosmaita: did you read backlog or would you like TL;DR?15:58
rosmaitai haven't had a chance to look at your patch yet today, see you had some questions15:58
*** stephenfin has left #openstack-glance16:03
*** jawad_axd has joined #openstack-glance16:04
jokke_so, I realized after I actually found where we are causing the race condition, that it was the same function you mocked. But the bigger issue is that your test doesn't test the race condition and fails even if the mocked function is changed to return correctly instead of raising the exception16:04
rosmaitawell, you can change the mock to mock image_proxy.store_utils.delete_image_location_from_backend() and do the db update and raise NotFound from there16:08
jokke_not bad idea.16:10
rosmaitathe race condition is thread one updates the database to remove the location while thread two gets a NotFound when trying to delete from the backend, and thread two was ultimately calling image.save() and putting the location back16:10
rosmaitathe mock simulates thread one by doing the db update directly behind thread two's back16:11
rosmaitabut i wonder why we were putting the location back in glance/location.py to begin with16:11
rosmaita(just saw your change in that file)16:11
jokke_yeah, but there was something dodgy about it as the test fails even if you just comment out the raise and add 'return loc'16:12
rosmaitawe probably need to review the circumstances under which glance_store returns NotFoiuhd16:12
jokke_which is wht the original returns on normal situation16:12
jokke_rosmaita: I think the store returns not found correctly, but I'm not convinced that the location pop 'expect Exception: with save_and_reraise: <put the location right back to the db' is the right thing to do, like ever if the data is in the location16:14
rosmaitai guess the idea is that if you call pop and got an exception, pop should not modify the list16:15
*** gyee has joined #openstack-glance16:16
rosmaitabecause you will get the NotFound happening in the calling function, maybe the idea is you decide what to do there16:16
jokke_you got point there. So maybe we just should not pass on the NotFound from the location.pop() but actually give the location object and just ignore the fact that the data (we're not returning anyways and is not expected to be found in store after) is not in the store16:17
jokke_we could catch that NotFound from store and literally just ignore it as we've got to the point where we wanted to be anyways16:19
rosmaitayeah, i think leave the locations code as it is, and handle it in your new code16:19
rosmaitathough i'm not sure we should ignore it, i think maybe a conflict or something16:19
jokke_Not convinced on that approach either. the problem is that if we don't fix the location reverting the action every time, there is literally no way to get rid of location after say backend corruption.16:21
rosmaitai don't think the location is actually reverted until you call image.save() in your new code16:22
jokke_As if the data is not in the backend where it should be, you can't remove it as our code treats it as race condition and returns you conflict16:22
jokke_So the revert won't on real race condition. but it won't be actually removed from DB either before the save is called16:23
jokke_So the actual case of store being broken and needing cleanup won't ever work otherwise than going and poking the db manually16:24
rosmaitawell, i don't know that we want to delete the location automatically --- maybe need to wait for admin16:24
jokke_Admin can't do it either. I'm not talking automatically deleting anything. I'm saying if user asks to delete location and the data is not there, why in eart should we revert the delete on database16:25
rosmaitai don't know ... what would happen currently?16:25
rosmaitawith just one store16:25
rosmaitawe need to preserve that behavior16:25
jokke_there is currently no way to delete last location, we block that already way before16:26
jokke_even as admin and locations api exposed it will tell you can't remove last location, delete the image instead16:26
jokke_and that's something we already check way before we even call the location.pop16:27
jokke_so that behaviour won't change16:27
rosmaitawe need to discuss more later, i am in a meeting now and not concentrating completely16:28
jokke_yeah, np. I'm heading out. We can continue this tomorrow, or I can put it for the Thu Agenda16:29
rosmaitaok, have a good evening, let's talk tomorrow\16:30
*** pcaruana has quit IRC17:05
*** tosky has quit IRC17:23
*** pcaruana has joined #openstack-glance17:28
*** evrardjp has quit IRC17:33
*** evrardjp has joined #openstack-glance17:33
*** priteau has quit IRC17:45
*** jmlowe has quit IRC17:46
*** jawad_axd has quit IRC17:53
*** jmlowe has joined #openstack-glance18:03
*** brinzhang has joined #openstack-glance18:03
*** jawad_axd has joined #openstack-glance18:04
*** brinzhang_ has quit IRC18:06
*** jmlowe has quit IRC18:23
*** jmlowe has joined #openstack-glance18:26
*** pvradu has joined #openstack-glance18:36
*** pvradu has quit IRC18:40
*** jawad_axd has quit IRC18:44
*** jmlowe has quit IRC18:45
*** trident has quit IRC18:48
*** trident has joined #openstack-glance18:49
*** jmlowe has joined #openstack-glance18:57
*** jmlowe has quit IRC18:58
*** spsurya has quit IRC19:25
*** jmlowe has joined #openstack-glance19:47
*** brinzhang_ has joined #openstack-glance19:57
*** jmlowe has quit IRC20:00
*** brinzhang has quit IRC20:00
*** jawad_axd has joined #openstack-glance20:03
*** jmlowe has joined #openstack-glance20:04
*** jawad_axd has quit IRC20:09
*** brinzhang has joined #openstack-glance20:40
*** pcaruana has quit IRC20:41
*** brinzhang_ has quit IRC20:44
*** brinzhang_ has joined #openstack-glance20:46
*** brinzhang has quit IRC20:49
*** brinzhang has joined #openstack-glance20:54
*** brinzhang has quit IRC20:56
*** brinzhang has joined #openstack-glance20:57
*** brinzhang_ has quit IRC20:58
*** pvradu has joined #openstack-glance21:13
*** rcernin has joined #openstack-glance21:37
*** rcernin has quit IRC21:37
*** rcernin has joined #openstack-glance21:38
*** pvradu has quit IRC21:47
*** rosmaita has quit IRC22:27
*** tkajinam has joined #openstack-glance23:08
*** tesseract has quit IRC23:13
*** goldyfruit_ has joined #openstack-glance23:17
*** brinzhang_ has joined #openstack-glance23:31
*** brinzhang has quit IRC23:35
*** pvradu has joined #openstack-glance23:44
*** brinzhang has joined #openstack-glance23:49
*** brinzhang_ has quit IRC23:53
*** brinzhang_ has joined #openstack-glance23:54
*** brinzhang has quit IRC23:55

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!