Monday, 2020-09-21

*** READ10 has quit IRC00:00
*** LinPeiWen has joined #openstack-nova00:33
*** brinzhang has joined #openstack-nova00:33
*** hongbin has quit IRC00:35
*** spatel has joined #openstack-nova00:49
*** hongbin has joined #openstack-nova00:57
*** redrobot has quit IRC01:08
*** spatel has quit IRC01:10
openstackgerritYao wang proposed openstack/nova master: Use VIR_DOMAIN_XML_INACTIVE for detach volume  https://review.opendev.org/74948901:10
*** READ10 has joined #openstack-nova01:25
*** Liang__ has joined #openstack-nova01:37
openstackgerritYingji Sun proposed openstack/nova stable/train: Set different VirtualDevice.key  https://review.opendev.org/75284301:40
*** yingjisun has joined #openstack-nova01:52
*** songwenping__ has joined #openstack-nova02:11
*** songwenping_ has quit IRC02:14
*** dannins has joined #openstack-nova02:15
*** READ10 has quit IRC02:18
*** hongbin has quit IRC02:23
*** hongbin has joined #openstack-nova02:31
openstackgerritYao wang proposed openstack/nova master: Use VIR_DOMAIN_XML_INACTIVE for detach volume  https://review.opendev.org/74948902:37
*** LinPeiWen has quit IRC03:09
*** sapd1 has joined #openstack-nova03:20
*** dave-mccowan has quit IRC03:23
*** psachin has joined #openstack-nova03:41
*** yingjisun has quit IRC04:04
*** zzzeek has quit IRC04:15
*** zzzeek has joined #openstack-nova04:17
*** hongbin has quit IRC04:20
*** ratailor has joined #openstack-nova04:23
*** hongbin has joined #openstack-nova04:24
*** hongbin has quit IRC04:29
*** rcernin has quit IRC04:31
*** evrardjp has quit IRC04:33
*** evrardjp has joined #openstack-nova04:33
*** hongbin has joined #openstack-nova04:38
*** rcernin has joined #openstack-nova04:40
*** jawad_axd has joined #openstack-nova05:11
*** LinPeiWen has joined #openstack-nova05:14
*** vishalmanchanda has joined #openstack-nova05:15
*** jawad_axd has quit IRC05:15
*** hongbin has quit IRC05:29
*** hongbin has joined #openstack-nova05:31
*** hongbin has quit IRC05:32
*** ociuhandu has joined #openstack-nova05:35
*** hongbin has joined #openstack-nova05:36
*** rcernin has quit IRC05:39
*** ociuhandu has quit IRC05:40
*** hongbin has quit IRC05:40
*** yingjisun has joined #openstack-nova05:42
*** sapd1 has quit IRC05:46
*** abhishekk has joined #openstack-nova05:47
*** jsuchome has joined #openstack-nova05:49
*** rcernin has joined #openstack-nova06:01
*** rcernin has quit IRC06:20
*** ralonsoh has joined #openstack-nova06:24
*** ircuser-1 has joined #openstack-nova06:42
*** bhagyashris is now known as bhagyashri|rover06:55
*** slaweq has joined #openstack-nova07:03
*** tosky has joined #openstack-nova07:03
*** sapd1 has joined #openstack-nova07:22
*** xek has joined #openstack-nova07:37
*** rcernin has joined #openstack-nova07:39
*** rcernin has quit IRC07:52
*** jawad_axd has joined #openstack-nova08:00
bauzasgood morning Nova08:01
gibigood morning bauzas08:10
openstackgerritElod Illes proposed openstack/nova stable/pike: libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live migration  https://review.opendev.org/74797808:23
* bauzas becomes nervous about the deadline for providing the recording for his Summit session :(08:26
kashyapbauzas: When is the deadline?  01-Oct?08:27
bauzasyes...08:27
brinzhanggibi: can you review this patch https://review.opendev.org/#/c/749052?08:35
*** derekh has joined #openstack-nova08:42
*** xek has quit IRC08:46
*** ociuhandu has joined #openstack-nova08:53
*** k_mouza has joined #openstack-nova08:54
*** jangutter has joined #openstack-nova09:03
*** jangutter has quit IRC09:03
*** jangutter_ has quit IRC09:03
*** jangutter has joined #openstack-nova09:04
kashyaplyarwood: Morning, I've tried a rapid succession of attaching 20 disks (via `attach-device`) while there's consistent 40% of load on the CPUs ... can't reproduce so far.09:09
kashyaplyarwood: If you don't mind holding your nose tightly ... here's the repro: https://kashyapc.fedorapeople.org/device-attach-and-detach.bash09:09
kashyap(Fun aside: changing the target dev from sdX to vdX increases the execution of the above script by at least 20 seconds.  So attaching 'virtio' disks seems to "slow"?  Can't be so)09:10
*** psachin has quit IRC09:11
kashyapThat said, I should rewrite it in Python and make it as close to what Nova is doing as possible09:20
kashyapBecause, I learnt that if we suspsect a timing issue, 'virsh' has a lot more overhead.  A naive connection-based approach is better09:23
*** aj_mailing has quit IRC09:25
*** swp20 has joined #openstack-nova09:32
*** lemko has quit IRC09:35
*** lemko has joined #openstack-nova09:35
hemanth_nsean-k-mooney: Appreciate if you can have a final look on this patch https://review.opendev.org/#/c/749175/ .. thank you09:50
*** Liang__ has quit IRC09:54
lyarwoodkashyap:k~.09:55
lyarwoodops weird connection issue09:55
lyarwoodkashyap: ack yeah that sounds like a sane approach, I don't think it's the rapid attach/detach that's the issue btw, just the overall load on the underlying host and libvirtd09:56
kashyaplyarwood: Oh, right; perhaps I should increase the load to 80% and do a detach?09:58
kashyapI'll vary the load (by measuring it in parallel with `sar -u 5`) and see09:58
lyarwoodyup sounds good10:00
toskylyarwood: nice work on the live migration/evacuate stuff, it seems that part is fine10:01
toskynow only the grenade one is missing10:02
lyarwoodtosky: np thanks for leading the effort :)10:10
lyarwoodgibi / stephenfin ; https://review.opendev.org/#/q/owner:self+topic:native-zuulv3-migration+status:open+project:openstack/nova ^ re the above, the live-migration and new evacuate job should be ready for review now.10:10
*** yingjisun has quit IRC10:13
lyarwoodactually let me update the TODO for the ceph jobs10:14
openstackgerritLee Yarwood proposed openstack/nova master: zuul: Introduce nova-evacuate  https://review.opendev.org/74488310:14
openstackgerritLee Yarwood proposed openstack/nova master: zuul: Replace nova-live-migration with zuulv3 jobs  https://review.opendev.org/75255710:14
lyarwoodthere we go, should be good now if the gate behaves10:15
toskygates and Monday, uhm10:16
toskythere are only 90 (check) + 16 (gate) jobs, so we may be lucky10:16
lyarwoodhmmm I wonder if it's actually worth merging the nova-live-migration and nova-evacuate job now that the playbook is written10:19
*** nightmare_unreal has joined #openstack-nova10:22
toskyup to you and the time needed to run the tests vs the time needed to deploy10:32
*** yingjisun has joined #openstack-nova10:33
*** yingjisun has quit IRC10:34
*** raildo has joined #openstack-nova10:36
gibilyarwood: I have some nits in https://review.opendev.org/#/c/74488310:41
gibilyarwood: will you do a follow up or respin it quickly?10:41
gibibrinzhang: sorry I think that refactor needs to wait for W10:42
openstackgerritStephen Finucane proposed openstack/nova master: libvirt: Enable 'vmcoreinfo' feature by default  https://review.opendev.org/75291210:44
sean-k-mooneyhemanth_n: sure ill go over it later today11:01
hemanth_nsean-k-mooney: thanks11:01
lyarwoodgibi: ack can do11:01
openstackgerritLee Yarwood proposed openstack/nova master: zuul: Introduce nova-evacuate  https://review.opendev.org/74488311:09
openstackgerritLee Yarwood proposed openstack/nova master: zuul: Replace nova-live-migration with zuulv3 jobs  https://review.opendev.org/75255711:09
*** ratailor has quit IRC11:17
*** ratailor_ has joined #openstack-nova11:17
*** sapd1 has quit IRC11:17
gibilyarwood: thanks11:22
*** jawad_axd has quit IRC11:25
*** jawad_axd has joined #openstack-nova11:26
*** bbowen has quit IRC11:33
*** bbowen has joined #openstack-nova11:33
openstackgerritYao wang proposed openstack/nova master: Use VIR_DOMAIN_XML_INACTIVE for detach volume  https://review.opendev.org/74948911:38
*** artom has joined #openstack-nova11:39
*** xek has joined #openstack-nova11:42
sean-k-mooneygibi: stephenfin i have figured out why the func test are failing. one issue is i was not adding the 0x prefix if you use "%(func)o" or "%(func)x" it does not genreate the prefix, the main issue however is device detach was only implemented for disk in the fake libvirt driver11:43
sean-k-mooneyso im really not sure how the sriov detach func test actully are passing on master but once i fixed the 0x prefix and added a valid impleamtion of detach the tests seam to be passing. now i just need to run all the other func and unit tests before pushing11:44
gibiI guess it only verifies the compute.manager and resource_tracker part of the functionality11:48
sean-k-mooneyya it must never check the doamin xml. anyway that should now be correct too.11:49
sean-k-mooneyi dont really know why my minimal chages to the test code caused it to now fail but im going to fix this in a seperate patch below my actul change11:49
sean-k-mooneyalthough maybe i cant actully11:50
sean-k-mooneysince im changin some code im adding in my patch11:50
sean-k-mooneyand some code that was already there.11:50
gibiI did see that nova and libvirt generates the func number differnetly I think libvirt adds the prefix while nova doesn't11:51
gibiand libvirt accepts both11:51
sean-k-mooneywe strip the prfix when generating the adress doing [2:]11:53
sean-k-mooneyi was basically passing an unprefixed string and that endup passing the empty stiring to oslo11:53
sean-k-mooneyoslo pciadress field then rejected it since the func part of the pci adress was empty11:54
*** xek has quit IRC11:55
openstackgerritClaudiu Belu proposed openstack/nova master: hyperv: Configures chassis asset tags for VMs.  https://review.opendev.org/75272311:57
*** martinkennelly has joined #openstack-nova12:10
*** vishalmanchanda has quit IRC12:11
*** priteau has joined #openstack-nova12:22
*** jawad_ax_ has joined #openstack-nova12:32
*** dave-mccowan has joined #openstack-nova12:35
*** jawad_axd has quit IRC12:36
*** jawad_axd has joined #openstack-nova12:42
*** jawad_ax_ has quit IRC12:46
*** xek has joined #openstack-nova12:48
openstackgerritsean mooney proposed openstack/nova master: libvirt: delegate ovs plug to os-vif  https://review.opendev.org/60243212:53
*** nweinber has joined #openstack-nova12:53
*** Luzi has joined #openstack-nova12:55
*** xek has quit IRC12:59
*** ratailor_ has quit IRC13:06
*** lbragstad has joined #openstack-nova13:16
*** jawad_axd has quit IRC13:21
*** jawad_axd has joined #openstack-nova13:22
*** eharney has joined #openstack-nova13:34
gibisean-k-mooney: please remind me which patch is the one where you faced this pci function issue?13:37
*** yingjisun has joined #openstack-nova13:37
sean-k-mooneyhttps://review.opendev.org/#/c/602432/1813:40
sean-k-mooneythe followup to the one you jsut reviewd13:40
sean-k-mooneythis is the detach impleamtion https://review.opendev.org/#/c/602432/18/nova/tests/unit/virt/libvirt/fakelibvirt.py@108413:40
gibisean-k-mooney: thanks. then I stoppped to early in my review on that series13:40
gibicontinuing now13:40
sean-k-mooneythe second hunk in that file is where i had dropped the 0x prefix13:41
sean-k-mooneythat was the second issue13:41
sean-k-mooneygibi: the first patch really is a fix for a different bug but i just happen to need that to maintain the same behavior for my own patch since libvirt would nolonger be unplugging the vifs in this case now that os-vif handels the pluging.13:44
sean-k-mooneygibi: by the way i have already accpeted that these wont qualify for rc1 and they will be backported after wards so while i am glad for the review if something else needs review for rc1 then that obviously is higher priority. thanks in anycase.13:48
gibisean-k-mooney: ack13:50
gibiat the moment I'm not tracking anything for RC1 that needs review13:51
*** xek has joined #openstack-nova13:51
sean-k-mooneyya same. i think lees ubuntu cloud archive patches have also merged in devstack at least the ussuri one i think so the libvirt bumps are really the only think im mindful off that we should still try to land13:52
sean-k-mooneyi think we are in a pretty good state overall13:52
gibiyepp13:53
*** Luzi has quit IRC13:54
sean-k-mooneygmann: care to send https://review.opendev.org/#/c/747123/ through the gate now that the ussuri version has merged13:55
*** eharney has quit IRC13:55
*** eharney has joined #openstack-nova13:58
gmannsean-k-mooney: done13:58
sean-k-mooney:)13:58
*** jsuchome has quit IRC14:03
openstackgerritMerged openstack/nova stable/train: Correctly disable greendns  https://review.opendev.org/75162214:14
*** hemna has quit IRC14:30
*** hemna has joined #openstack-nova14:30
dansmithartom: I didn't see any discussion of a test for this: https://review.opendev.org/#/c/751302/14:31
artomdansmith, there wasn't14:31
dansmithartom: since we've had a few ordering things changed in there in recent memory, can't we have a test that pokes at eventlet internals or something to check that things happen like we expect?14:31
artomHow would we test that thing specifically?14:31
artomdansmith, ah I see what you mean14:31
*** hongbin has joined #openstack-nova14:31
artomdansmith, yeah, could be done14:31
artomI guess?14:32
dansmithwell, it would make it easier to validate that you've really changed behavior.. clearly the original code didn't think the ordering mattered, so if it does, it'd be nice if we could, you know, validate that14:32
artomdansmith, I agree with your point. Originally I 1. couldn't think of a way to test specifically this and 2. figured the NOTE I left was the best we could do to prevent future reorderings14:33
dansmithbut I'm guessing the reviewers just assumed that it does matter and that your change fixed it sufficiently,14:33
dansmithand it'd just be nice to have a test where you can revert the code change and make sure the test validates some wrong behavior, which is (or used to be) common double checking for obscure fixes like this14:34
*** eharney has quit IRC14:35
artomdansmith, I think it still is - we try to do the "regression test that assers the wrong thing -> fix + test fix" thing when we can14:36
artomI suppose in this case we all assumed it wasn't realistic14:36
dansmithassumed but didn't even discuss or question, it seems... just sayin', this is pretty fundamental code, merged pretty quick and backported quick as well.. would be nice to have something to validate it14:37
dansmithlike, maybe even the version of eventlet on stable/train behaves a little different or something14:38
artomdansmith, yep, I'mma try to hax something14:39
dansmithI think maybe one tricky thing is going to be that a test will run after eventlet has already been imported and this monkey patching has been done, which means you just need to have the test check that greendns is disabled in the internals or whatever,14:41
dansmithand then testing that the patch fixed it will just be running the same test but without the code change14:41
dansmithmeaning, the test won't actually call monkey_patch() to do the test, but just examine the result of it and make sure it's good after the test harness did14:41
artomdansmith, I dunno - does the test framework actually call monkey_patch()?14:42
artomLol yes it does: `import nova.monkey_patch  # noqa`14:43
artomFirst line in nova/test.py14:43
dansmithwell, I guess I'm not sure.. we have to in functional to make some of it work I thought14:43
dansmithheh, yeah okay14:43
dansmithin some cases you could get away with it, but in others we'd never be able to do certain things14:44
artomSo it could be as stupid as the demonstrator I had in my bug14:45
artomTry to resolve 'lulz.fake', examine the stack...14:45
dansmithyeah14:45
artomPass if it does NOT contain greendns14:45
dansmith....yeah14:45
*** vinay_m has joined #openstack-nova14:46
*** eharney has joined #openstack-nova14:47
*** dklyle has joined #openstack-nova14:56
*** mriedem has joined #openstack-nova14:58
*** xek has quit IRC15:01
*** k_mouza has quit IRC15:05
*** priteau has quit IRC15:10
*** k_mouza has joined #openstack-nova15:11
*** k_mouza has quit IRC15:15
*** k_mouza has joined #openstack-nova15:15
openstackgerritStephen Finucane proposed openstack/nova master: libvirt: 'video.vram' property must be an integer  https://review.opendev.org/75301115:18
*** jawad_axd has quit IRC15:20
stephenfingibi, lyarwood: Real simple bugfix there ^15:23
*** redrobot has joined #openstack-nova15:23
*** mlavalle has joined #openstack-nova15:33
kashyapstephenfin: Nice sleuthing ... TIL: "This appears to be a Python 3 thing, introduced by division of ints now returning a float."15:33
gibistephenfin: should https://opendev.org/openstack/nova/src/branch/master/nova/tests/unit/virt/libvirt/test_driver.py#L673815:35
gibistephenfin: fail now?15:36
stephenfingibi: um, yes, it will15:37
* stephenfin respins15:37
*** hongbin has quit IRC15:38
bauzassorry folks, was borked by internal stuff and the fact i have a presentation to make for a deadline in 10 days15:40
bauzasany reviews you want me to do ?15:40
bauzasstephenfin: remember the presentation deadline, btw. /o\15:40
bauzaswhy on Earth did I wanted to provide a proposal ?15:40
bauzaswhat a curse15:40
*** jawad_axd has joined #openstack-nova15:40
gibibauzas: at the moment I'm not tracking anything for RC1 that needs review15:41
bauzascool15:41
*** k_mouza has quit IRC15:41
bauzasgibi: sorry, I hate myself being dragged from RC1 as it looks to me more priority15:41
bauzasand I promised to see a vGPU  usage for both V100 and GVT-g, oh man15:42
bauzasI'm doomed15:42
*** k_mouza has joined #openstack-nova15:42
gibibauzas: no worries15:43
gibiI think we are pretty well set for RC1 at the moment15:43
*** yingjisun has quit IRC15:44
*** hongbin has joined #openstack-nova15:44
*** jawad_axd has quit IRC15:45
*** JamesBenson has joined #openstack-nova15:45
openstackgerritStephen Finucane proposed openstack/nova master: libvirt: 'video.vram' property must be an integer  https://review.opendev.org/75301115:55
*** ralonsoh has quit IRC15:57
*** LinPeiWen has quit IRC16:00
openstackgerritBalazs Gibizer proposed openstack/nova master: Use cell targeted context to query BDMs for metadata  https://review.opendev.org/75245916:00
openstackgerritBalazs Gibizer proposed openstack/nova master: Clean up the DynamicVendorData constructor  https://review.opendev.org/75271816:00
artomdansmith, looks like you get to dance around me yelling "I told you so"16:09
artomMy unit test appears to show we're *still* not disabling greendns correctly16:09
*** vishalmanchanda has joined #openstack-nova16:10
openstackgerritArtom Lifshitz proposed openstack/nova master: Unit test for 7c1d964faa  https://review.opendev.org/75307216:10
artomdansmith ^^16:10
*** sapd1 has joined #openstack-nova16:10
artomI suppose I should have WIP'ed it, but it's not going to pass Zuul regardless16:11
*** vinay_m has quit IRC16:24
*** ociuhandu has quit IRC16:25
*** vinay_m has joined #openstack-nova16:25
artomHuh, by the time nova/monkey_patch.py runs, we've *already* imported evenlet16:25
*** k_mouza has quit IRC16:33
*** _erlon_ has joined #openstack-nova16:37
dansmithartom: meaning the tests defeat the fix because they import eventlet before they've run the thing that sets-before-import like cmd/* should?16:38
artomdansmith, no, I think the test shows that the fix doesn't work, because something else imports eventlet before Nova does16:38
dansmithbut is that an artifact of our unit tests vs. real production stuff, or is there another place?16:40
*** gyee has joined #openstack-nova16:40
dansmithI thought you validated the fix locally on a real deployment and it had the desired effect?16:40
artomdansmith, I did not.16:40
dansmithah, okay, I guess I thought from the bug report you had16:41
artomYou need to hit a specific situation, which is hard to reproduce on the kind of deployment I have access to16:41
artomSo I went on the demonstrator code snippet16:41
dansmithokay16:41
artom... which doesn't work if something else has imported evenlet before you even do anything16:42
*** vinay_m has quit IRC16:42
sean-k-mooneyartom: nothing else should be importing evenetlet16:42
artomsean-k-mooney, dunno what to tell you, but if I `if 'eventlet' in sys.modules` *before* we import it, it's there16:43
sean-k-mooneyat least nothing else should be monkeypatching16:43
artomsean-k-mooney, monkeypatching doesn't matter here, the env variable we care about is processed by eventlet at import-time16:44
artomhttps://github.com/eventlet/eventlet/blob/af407c77f208ceefe5a35e39aed0cf3fdfc07cb9/eventlet/green/socket.py16:44
sean-k-mooneywell i guess teh issue you will have is that you cant contol the order in which the tests run16:45
sean-k-mooneywe import eventlets in a number of different tests16:46
artomAs in directly `import eventlet`?16:46
sean-k-mooneyhttps://github.com/openstack/nova/search?q=%22import+eventlet%22&unscoped_q=%22import+eventlet%2216:46
sean-k-mooneyyep16:46
artomAh, so maybe that's it16:47
sean-k-mooneyactully better https://github.com/openstack/nova/search?q=%22import+eventlet%22+path%3A%2Fnova%2Ftests&unscoped_q=%22import+eventlet%22+path%3A%2Fnova%2Ftests16:47
dansmithartom: that's what I was saying.. an artifact of the test infrastructure that doesn't really happen in prod16:47
artomI suppose passing a test name regex to tox doesn't prevent it from reading the entire tests tree and thus importing eventlet16:47
dansmithin prod we control the entry ordering exactly, but not so much in the test stuff16:48
sean-k-mooneythere are 7 direct imports and 5 from eventlet import...16:48
dansmithartom: it's not tox, it's stestr16:48
artomdansmith, right, sorry16:48
dansmithand it does it in parallel and often in different orders based on the bucketing16:48
artomIn that case we can't really have a unit test for this16:48
artomWe would need a way to guarantee "first run"16:49
artomIn order to be the first to import eventlet16:49
artom`del` and importlib.reload() don't work, I tried16:49
sean-k-mooneyyou could remove it form the module path but honestly im not sure this is worth it16:50
dansmithartom: this is what I was saying earlier, which might require some poking into eventlet16:50
artomdansmith, ok, it only me like 2 hours to catch up with you16:50
sean-k-mooneyartom: do you jsut want to call the un patched socket lib16:50
sean-k-mooney*module16:50
dansmithsean-k-mooney: I do think *some* sort of validation is worth it, because artom didn't confirm by hand, says it's hard to do so, and five minutes ago, wasn't confident that the fix was actually a fix :)16:50
artomAnd you've been breathing smoke for 2 weeks, so your brain is at like 20% capacity16:51
sean-k-mooneydansmith: im more wondering what is the intent of the test16:51
artomsean-k-mooney, to make sure we've properly disbled greendns16:51
sean-k-mooneywhen called via a monkeypatched module16:51
dansmithsean-k-mooney: well, for one thing, a unit test of that monkeypatch code to make sure it's doing the things we expect seems like a good plan to me16:51
artomYeah, so something like socket.gethostaddr()16:52
artomLike I did in my demonstrator code16:52
dansmithI think we started that around uwsgi time and have been lumping stuff in there from the start without really much validation16:52
sean-k-mooneyartom: do you have a link to the orginial patch16:52
sean-k-mooneyi just see the unit test but its hard to follow without context16:52
artomsean-k-mooney, https://review.opendev.org/#/c/751302/16:52
dansmithartom: maybe we go with the approach that the profiler thing uses, which is another unittest run after a successful regular one so you can constrain the ordering?16:53
artomdansmith, that's just an extra line in tox.ini...16:54
dansmithright16:54
dansmithwe've had multiple bugs related to the ordering of this monkeypatch thing, so .. maybe it's time :)16:54
artomSo, an entirely separate file, outside of the unit tests, that just import nova.monkey_patch and tests stuff?16:55
dansmithlike every line in that function is "be suuper careful to do this before that16:55
sean-k-mooneyare we sure that the coment is correct16:55
artomsean-k-mooney, which comment16:55
sean-k-mooneythat eventlet processes theis at import time and not when we call eventlet.monkeypatch16:55
dansmithsean-k-mooney: I'm not sure any of this is correct because apparently nobody has tested it :P16:55
artomsean-k-mooney, fairly certain, by looking at the eventlet code: https://github.com/eventlet/eventlet/blob/v0.26.0/eventlet/green/socket.py#L2016:56
sean-k-mooneythis one https://review.opendev.org/#/c/751302/2/nova/monkey_patch.py@3316:56
sean-k-mooneyok so that is module scope16:56
sean-k-mooneyso it will only be processed once the first tim ethe socket module is loaded16:57
artom'zactly16:57
sean-k-mooneywhich wont be when we do import eventlet16:57
sean-k-mooneyits import here https://github.com/eventlet/eventlet/blob/fc8cc0f6a77896234284ef40d7226d62345922c0/eventlet/patcher.py#L42417:00
*** aj_mailing has joined #openstack-nova17:00
artomAh, true17:00
*** derekh has quit IRC17:00
artomBut... when is that called?17:00
artomBecause it definitely *behaves* like it's processing EVENTLET_NO_GREENDNS at import time17:00
*** k_mouza has joined #openstack-nova17:00
artomIOW, it has to be set before importing eventlet17:01
sean-k-mooneyform eventlet.monkey_patch17:01
artomOtherwise it has no effect17:01
artomLook at my Demonstration in https://bugs.launchpad.net/nova/+bug/189532217:01
openstackLaunchpad bug 1895322 in OpenStack Compute (nova) ussuri "Nova is not actually disabling greendns" [Undecided,Fix committed]17:01
sean-k-mooneythis is where its being patched as far as i can tell https://github.com/eventlet/eventlet/blob/fc8cc0f6a77896234284ef40d7226d62345922c0/eventlet/patcher.py#L274-L31417:04
*** k_mouza has quit IRC17:05
openstackgerritArtom Lifshitz proposed openstack/nova master: [WIP] Test for 7c1d964faa and monkey patching in general  https://review.opendev.org/75307217:10
artomdansmith, sean-k-mooney ^^ so that actually works17:10
dansmithartom: sure, but I think you can maybe also get away with it being a proper unittest and run it with stestr in the normal way17:10
dansmithif you make your module do stuff before it imports nova.test or whatever causes the import chain that leads to eventlet, I think stestr won't tickle anything else until you do17:11
artomdansmith, how though? I thought we established we can't have other tests importing eventlet before us17:11
dansmithif you don't discovery and don't run anything else17:11
sean-k-mooneyartom: i think this is where we currently monkeyp[atch for test by the way https://github.com/openstack/nova/blob/master/nova/test.py#L2417:11
dansmithartom: I still mean a special invocation like you have, but a unittest instead of a bare python file17:12
sean-k-mooneyartom: so when youd do "from nova import test"17:12
sean-k-mooneythat shoudl monkey patch17:12
artomRight, but unittest means stestr will read the whole tree... and so will cause eventlet to be imported, even if we don't execute the tests themselves17:12
dansmithno,17:13
dansmithnot without discover I think17:13
dansmithfor other unittest runners, if you provide an actual class module without discovery, it will try to import that path direct and then execute17:13
artomOh, you literally mean `--no-discover`17:13
sean-k-mooneydansmith: we would have to put it in a seperate folder17:13
dansmithartom: right, like the profile test does17:13
artom*facepalm* OK yeah17:14
sean-k-mooneywe could skip using a regex if we did that and use the --isolate parmater i think17:14
*** k_mouza has joined #openstack-nova17:14
dansmithsean-k-mooney: no, you can just make it skip for the regular tests, if necessary, or let it run in the regular ones if it will falsely claim success anyway :)17:14
artomWorth a try, anyways17:14
dansmithsean-k-mooney: you could just make it skip if sys.modules already has eventlet17:14
sean-k-mooneydansmith: ah17:14
artomThis bare Python file is definitely teh uglies17:14
sean-k-mooneyi tought you were going to sugges adding it to the test blacklist17:15
sean-k-mooneybut having the test auto skip i think is fine17:15
sean-k-mooneythat way we dont need to list a load of special tests if we add more like htis17:15
dansmithright17:15
artomAuto-skip is dangerous, no? Means we'd be silently missing potential errors17:15
sean-k-mooneyno in the ci17:15
sean-k-mooneylocallly sure17:15
dansmithartom: well, you can also do what the profile test does and set an envar to enable :)17:16
sean-k-mooneybut if its run by tox17:16
sean-k-mooneyit should be fine17:16
artomdansmith, ah, so folks can disable it if needed17:16
artomWhodda thunk precedent was so useful ;)17:16
sean-k-mooneyartom: proably enable if needed17:16
dansmithartom: no,17:16
sean-k-mooneygiven its racy by defualt17:16
dansmithartom: it's disabled by default, enabled explicitly in that second stestr run command in tox17:17
sean-k-mooneyyou would set the env var wehn you run it explcitly17:17
sean-k-mooneyyep what dansmith said17:17
artomdansmith, sorry, right17:17
artomI meant in the sense of... tox will run with it enabled17:17
artomEverything else won't17:18
sean-k-mooneytox -e py<whatever> sure17:18
dansmithseriously, there are a bunch of other things in that file with comments like "this is fragile if order isn't respected" comments... it'd be nice to get tests for those things too since we're clearly just flying by the seat of our pants on these things17:18
sean-k-mooneybut in two calls to stester17:18
artomWait, no, that second tox command that I'll add will enable and run it17:18
*** k_mouza has quit IRC17:18
artomNothing else will because it's racy17:18
* artom haas just now caught up17:18
dansmithurllib3, oslo_context, threading things,17:19
dansmithartom: right, exactly.. you know, like the profiling test :)17:19
sean-k-mooneydansmith: ya we have a cople of example of this17:19
artomdansmith, you keep saying that like I'm some sort of genius that understands it the first time around17:19
artom;)17:19
sean-k-mooneynot sure why oslo_context would be on that list but why not17:19
dansmithartom: it just makes me feel better to highlight the first-mention-to-grok time gap :)17:19
dansmithsean-k-mooney: maybe if we had a test with comments in it, we'd know :/17:20
artomdansmith, I'm pretty sure it's exponential with age (and inverse with sleep )17:20
sean-k-mooney:) well it was more oslo is an openstack thing so hopefully we could fix the oslo issue there instead of nova17:20
dansmithartom: we should plot it on a graph17:20
dansmithsean-k-mooney: not likely if it's something oslo can't do if imported post-monkey-patch17:21
artom∞ there's your graph17:21
dansmithheh17:21
sean-k-mooney https://bugs.launchpad.net/nova/+bug/177310217:22
openstackLaunchpad bug 1773102 in OpenStack Compute (nova) queens "Abnormal request id in logs" [Medium,Fix committed] - Assigned to Radoslav Gerganov (rgerganov)17:22
sean-k-mooneythats the oslo_context bug17:22
dansmithah yeah, and surely that's because it needs to grab pointers to the threading primitives for TLS before they get munched right?17:23
sean-k-mooneymaybe although there might be a way to resolve that in a differnt way. anyway not important right now17:24
sean-k-mooneyartom: so you going to add a second run combining the results with teh first and explictly enable that test in the second run ya17:24
dansmithhttps://bugs.launchpad.net/nova/+bug/1773102/comments/1817:24
openstackLaunchpad bug 1773102 in OpenStack Compute (nova) queens "Abnormal request id in logs" [Medium,Fix committed] - Assigned to Radoslav Gerganov (rgerganov)17:24
dansmithit'd be hard to solve it any other way, but.. yah17:25
artomdansmith, for all this talk of "do it like the profiler", I've tried it, and looks like it's still importing eventlet elsewhere17:25
sean-k-mooneyartom: can you push it so we can try it17:26
openstackgerritArtom Lifshitz proposed openstack/nova master: Unit test for 7c1d964faa  https://review.opendev.org/75307217:29
artomsean-k-mooney, ^^17:29
*** dtantsur is now known as dtantsur|afk17:31
* artom -> lunch17:31
dansmithartom: can you try it with python3 -munittest path.to.test ?17:31
dansmithartom: wait, you're still importing nova.test in your module17:32
dansmiththat means you do it before setUp() runs :)17:32
sean-k-mooneyyep that would do it17:33
dansmithso that "importing eventlet elsewhere" is ... in your test :)17:33
artomRight, but nova.test imports eventlet *after setting the greendns env var*17:33
artomSo that should be fine17:34
artomThe problem is if some other unit tests straight up `import eventlet` without setting EVENTLET_NO_GREENDNS17:34
dansmithI thought something else does that is downstream of that, and that was the whole point?17:34
artomSomething else does what?17:34
dansmithimport eventlet17:34
sean-k-mooneythat what we get when we run it directly http://paste.openstack.org/show/798154/17:35
artomWeird17:36
sean-k-mooneybasically we need to run this test using unitt test and not the base testcase and only import monkey patch inside teh test funtion i think17:38
sean-k-mooneyim going to try that locally17:38
dansmithright17:38
dansmithalthough I moved the import into the test function and I still fail the test17:38
dansmithso, here's the other thing17:39
dansmithstestr forks and runs the worker children outside the main process17:39
dansmithwhich may not share the environment where the flag is being set17:39
*** k_mouza has joined #openstack-nova17:40
artomSounds "right" - in the sense that, if we're the *only* ones importing nova.test, and that imports eventlet "properly" (setting EVENTLET_NO_GREENDNS), shouldn't matter when we do the importing17:40
dansmithstill happens with bare unittest run17:41
sean-k-mooneyhttp://paste.openstack.org/show/798157/17:41
sean-k-mooneyso it match on the function call17:42
artom*facepalm*17:42
sean-k-mooneytest_greendns_is_disabled17:42
dansmithah hah17:42
dansmithalthough I'm seeing it for realz: /home/dan/nova/.tox/py37/lib/python3.7/site-packages/eventlet/support/greendns.py17:43
artomMaybe premature though, changing it go 'greendns.py' still fails17:43
dansmithany chance the flag name is wrong, or requires a value different than "yes" ?17:44
*** k_mouza has quit IRC17:44
artomdansmith, I don't think it's that - remember, the bare python file worked17:44
artomworked == verified the correct behaviour17:44
sean-k-mooney dansmith https://github.com/eventlet/eventlet/blob/af407c77f208ceefe5a35e39aed0cf3fdfc07cb9/eventlet/green/socket.py#L2017:45
sean-k-mooneyif os.environ.get("EVENTLET_NO_GREENDNS", '').lower() != 'yes':17:45
sean-k-mooneyso i think its right17:45
dansmithack17:45
sean-k-mooneyso i have a working copy locally17:46
sean-k-mooneyjust changed it to greendns.py17:46
sean-k-mooneybut is that goign to be in the traceback17:46
sean-k-mooneyhttp://paste.openstack.org/show/798159/17:47
dansmithhttps://pastebin.com/kY9iCQpu17:47
dansmiththis is how I'm getting to eventlet ^17:47
dansmithunit/__init__.py calls objects.register_all()17:47
dansmithand eventlet is in there17:47
sean-k-mooneyya i was looking at that17:48
sean-k-mooneyi didnt see which object it was17:48
dansmithso, like I surmised, something in the test infra is hitting it before we even get to us, but unfortunately it's in our module so it gets imported before we get imported17:48
artomOh, smart just raising in evenlet itself and examining the trace17:48
dansmithif it wasn't in an __init__ then we'd be safe17:48
sean-k-mooneynova.objects.agent17:48
artomdansmith, so then... if I move it out of tests/unit ?17:49
dansmithartom: yeah I guess.. maybe functional would work by chance?17:49
dansmithlol,17:49
sean-k-mooneyno17:49
dansmithfunctional moneky patches in __init__ ;P17:49
sean-k-mooneyfucntion defietly wont17:49
sean-k-mooneyyep17:49
artomdansmith, no, that as import nova.monkey_patch  # noqa in __init__.py17:49
artom*has17:50
sean-k-mooneyalso fucntion is still under nova.test17:50
sean-k-mooneywhich import the objects17:50
sean-k-mooneyi would have to be nova.evetlet.tests or soemthign like that17:50
dansmithsean-k-mooney: it's tests/unit/__init not tests/__init17:50
sean-k-mooneyoh your right17:51
dansmithbut yeah, unless we move that patch out of functional/__init it doesn't matter17:51
sean-k-mooneythen ya just tests/ then17:51
dansmithyeah,17:51
dansmithand then it will be excluded from the regular stest execution anyway,17:51
artomSo it's fine if it gets put in nova/tests17:51
dansmithwhich is what we wanted right?17:51
sean-k-mooneydrop it at the top level and run it explcitly with tox17:51
dansmithyah17:51
sean-k-mooneyya it is17:52
artomDon't need the env var skip mechanism then, either17:53
dansmithright17:53
sean-k-mooneyso this http://paste.openstack.org/show/798162/17:55
sean-k-mooneyactully setp is not needed17:55
dansmithyup17:56
dansmithbut it'd be nice to get some other validations in there for the other things if we can17:56
sean-k-mooneyya im not super happy with the  self.assertNotIn('.greendns', tb)17:56
dansmithartom: also, my -1 is going to be "change the title of the patch to what it does and not an obscure 'tests for $hash' message"17:56
artomdansmith, fair17:57
artomsean-k-mooney, I'll add comments?17:57
dansmithlots of people do that, but I hate it17:57
*** hamalq has joined #openstack-nova17:57
artomTests for hash is what I do on the weekends :D17:57
sean-k-mooneyactully it should be greendns.py17:58
sean-k-mooneyits not the module path in the trace its the file path17:58
dansmithartom: it's legal here now, so doesn't make you seem cool and edgy like it used to17:58
artomdansmith, but what will I do for personality now?17:59
dansmithdirty jokes?18:01
sean-k-mooneyso this works for me now that i moved it http://paste.openstack.org/show/798163/18:01
sean-k-mooneyoh this is what i ran http://paste.openstack.org/show/798164/18:03
*** hongbin has quit IRC18:05
*** hongbin has joined #openstack-nova18:11
openstackgerritMerged openstack/nova stable/rocky: libvirt: Handle VIR_ERR_DEVICE_MISSING when detaching devices  https://review.opendev.org/74241718:21
CeeMacEvening all18:26
CeeMacAnyone ever come across issues with guest operating system corruption following a volume retype operation ?18:27
*** artom has quit IRC18:32
*** artom has joined #openstack-nova18:32
*** k_mouza has joined #openstack-nova18:34
*** ociuhandu has joined #openstack-nova18:34
*** k_mouza has quit IRC18:38
*** ociuhandu has quit IRC18:39
*** jawad_axd has joined #openstack-nova18:41
*** ociuhandu has joined #openstack-nova18:42
*** jawad_axd has quit IRC18:46
artomHrmpf, so it actually would work in nova/tests/functional because that __init__.py imports nova.monkey_patch, which is fine because we set EVENTLET_NO_GREENDNS in there18:48
artomBut then we need the env var skip mechanism18:48
artomSo perhaps better in nova/tests after all?18:48
dansmithI don't really care either way18:48
artomI guess the latter then, because less code.18:49
artomAnd I'll explain it all with a proper commit message18:49
artom... *after* I pick up my kinds18:49
artom*kids18:49
*** nightmare_unreal has quit IRC18:51
*** xek has joined #openstack-nova18:56
*** mriedem has quit IRC19:00
*** jawad_axd has joined #openstack-nova19:02
*** hongbin has quit IRC19:05
*** jawad_axd has quit IRC19:06
*** vishalmanchanda has quit IRC19:11
*** jawad_axd has joined #openstack-nova19:23
*** jawad_axd has quit IRC19:27
*** ociuhandu has quit IRC19:32
*** jawad_axd has joined #openstack-nova19:44
*** jawad_axd has quit IRC19:48
*** jawad_axd has joined #openstack-nova20:04
*** slaweq has quit IRC20:07
*** jawad_axd has quit IRC20:09
*** slaweq has joined #openstack-nova20:12
*** hongbin has joined #openstack-nova20:16
*** k_mouza has joined #openstack-nova20:25
*** ociuhandu has joined #openstack-nova20:25
*** nweinber has quit IRC20:26
*** k_mouza has quit IRC20:30
*** jawad_axd has joined #openstack-nova20:46
*** jawad_axd has quit IRC20:51
*** xek has quit IRC20:54
*** ociuhandu has quit IRC20:59
*** _erlon_ has quit IRC21:04
*** sapd1 has quit IRC21:05
*** slaweq has quit IRC21:06
*** tbachman has quit IRC21:17
*** sapd1 has joined #openstack-nova21:18
*** dave-mccowan has quit IRC21:58
*** JustAFlerkin has joined #openstack-nova22:02
*** dave-mccowan has joined #openstack-nova22:03
*** tbachman has joined #openstack-nova22:08
*** tbachman has quit IRC22:13
*** tacco has quit IRC22:17
*** k_mouza has joined #openstack-nova22:17
*** k_mouza has quit IRC22:22
*** jawad_axd has joined #openstack-nova22:29
*** tbachman has joined #openstack-nova22:30
*** jawad_axd has quit IRC22:34
*** k_mouza has joined #openstack-nova22:47
*** tosky has quit IRC22:49
*** mlavalle has quit IRC22:50
*** jawad_axd has joined #openstack-nova22:50
*** k_mouza has quit IRC22:52
*** jawad_axd has quit IRC22:55
*** tbachman has quit IRC23:00
*** rcernin has joined #openstack-nova23:02
*** zzzeek has quit IRC23:10
*** rcernin has quit IRC23:11
*** jawad_axd has joined #openstack-nova23:11
*** rcernin has joined #openstack-nova23:11
*** zzzeek has joined #openstack-nova23:13
*** jawad_axd has quit IRC23:15
*** eharney has quit IRC23:15
*** zzzeek has quit IRC23:17
*** zzzeek has joined #openstack-nova23:20
*** jawad_axd has joined #openstack-nova23:32
*** jawad_axd has quit IRC23:37
*** eharney has joined #openstack-nova23:37
*** spatel has joined #openstack-nova23:49
*** eharney has quit IRC23:50
*** eharney has joined #openstack-nova23:51
*** jawad_axd has joined #openstack-nova23:52
*** jawad_axd has quit IRC23:57

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