Thursday, 2019-02-28

*** mriedem has quit IRC00:13
*** mriedem has joined #openstack-placement00:19
*** takashin has joined #openstack-placement00:43
openstackgerritTetsuro Nakamura proposed openstack/placement master: Use set instead of list  https://review.openstack.org/63988702:47
openstackgerritTetsuro Nakamura proposed openstack/placement master: Refactor _get_trees_matching_all()  https://review.openstack.org/63988802:47
openstackgerritTetsuro Nakamura proposed openstack/placement master: Adds debug log in allocation candidates  https://review.openstack.org/63988902:47
*** mriedem has quit IRC03:32
openstackgerritMerged openstack/placement master: Remove redundant second cast to int  https://review.openstack.org/63920306:55
*** tssurya has joined #openstack-placement08:19
*** takashin has left #openstack-placement08:30
*** helenafm has joined #openstack-placement08:37
*** rubasov has quit IRC08:50
gibibauzas: why the driver uses mdev and mdev_types as well for lisiting devices?08:54
gibihttps://github.com/openstack/nova/blob/337b24ca41d2297cf5315d31cd57458526e1e449/nova/virt/libvirt/host.py#L90008:54
gibihttps://github.com/openstack/nova/blob/337b24ca41d2297cf5315d31cd57458526e1e449/nova/virt/libvirt/host.py#L89308:54
*** ttsiouts has joined #openstack-placement09:11
*** e0ne has joined #openstack-placement09:32
openstackgerritChris Dent proposed openstack/placement master: Docs: extract testing info to own sub-page  https://review.openstack.org/63962809:34
*** rubasov has joined #openstack-placement10:09
*** rubasov has quit IRC10:19
*** rubasov has joined #openstack-placement10:26
*** cdent has joined #openstack-placement11:00
cdentjaypipes: if you get a brief moment to swoop in with an opinion on classmethods v module level methods in https://review.openstack.org/#/c/639391/ that would be handy as we continue to remove more code. no need, now, for a big review11:07
cdentjust an opinion on the quibble that eric and I are enjoying having11:08
*** ttsiouts has quit IRC11:10
*** ttsiouts has joined #openstack-placement11:10
*** ttsiouts has quit IRC11:15
*** e0ne has quit IRC11:30
*** e0ne has joined #openstack-placement11:36
*** ttsiouts has joined #openstack-placement12:09
bauzasefried: jaypipes: I'm working on fixing https://review.openstack.org/#/c/636591/5/nova/virt/libvirt/driver.py@58313:31
jaypipesbauzas: k13:31
jaypipescdent: ack13:31
cdentthanks13:31
bauzasefried: jaypipes: but for that, I need to get allocations for all instances from a compute13:31
bauzasefried: jaypipes: so I saw https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L1887 but it looks like I couldn't be using it ?13:32
bauzasbecause I would like to pass allocations to https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L120213:33
jaypipesbauzas: isn't the set of allocations passed to the reshape method?13:42
jaypipesbauzas: oh, I see, you're trying to do this on restart after you've successfully reshaped..13:43
jaypipesbauzas: question: are mdev UUIDs guaranteed to persist in a consistent fashion across reboots?13:45
bauzasjaypipes: unfortunately not :(13:51
bauzasthey disappear when rebooting the host13:52
bauzasthey're not persisted by the kernel13:52
bauzas:(13:52
bauzashence why we have https://review.openstack.org/#/c/636591/5/nova/virt/libvirt/driver.py@57913:52
bauzaswe basically recreate mdevs there13:52
jaypipesbauzas: that's crazy.13:58
jaypipesbauzas: in any case, I've added a comment to that patch in the function in question. please see that comment.13:58
jaypipesbauzas: BTW, since nvidia invented the whole mdev system, what do *their* developers advise?13:59
jaypipesbauzas: or are their developers basically not engaged at all?13:59
bauzasjaypipes: humpf14:00
bauzasI mean, nvidia wants to get paid14:00
bauzasbut all the devs I know are just working on their own kernel driver14:00
bauzasanyway14:01
bauzasjaypipes: I just looked at your comment14:01
bauzasjaypipes: so we know the instance UUID and even the mdev UUID14:01
bauzasjaypipes: that's what does self._get_all_assigned_mediated_devices() => it looks at the guest XMLs14:02
bauzas*all* the guest XMLs14:02
jaypipesbauzas: heh14:02
bauzasand as you can see, we get the instance UUID14:03
jaypipesbauzas: ok, so if we have that information, what do we need the allocs dicts for?14:03
bauzasunfortunately yes, because we don't know which RP is used by the consumer14:03
bauzasin case we have two pGPUs, we have two children RPs14:03
bauzasso i need to get the allocation for knowing the RP UUID14:04
bauzasif not, I'll create a new mdev for this instance, but maybe not by the same pGPU14:04
jaypipesbauzas: oh, I'm sorry, I thought the mdev UUID *was* the provider UUID?14:05
bauzasunfortunately no14:05
jaypipesah, no... I guess not, there are >1 mdevs corresponding to a single resource of VGPU consumed on the provider, right?14:05
bauzasand it's not also the instance UUID14:05
bauzaswell, not sure I understand correcly your question, but... for one RP (the PGPU), we could have >1 mdev yes14:06
bauzasmdev == VGPU basically14:07
jaypipesyeah, sorry, forgot about that14:07
bauzasnp14:07
bauzaswhat we *could* do is to ask operators to recreate the mdevs by them14:07
bauzasbut... :)14:08
jaypipesbauzas: well, in theory, I don't have any particular problem with passing the allocations information in init_host(). after all, we're doing an InstanceList.get_by_host() right after init_host() (https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1204-L1205) and that's essentially the exact same thing as getting allocations from placement14:08
jaypipesbauzas: we could just as easily do that call to InstanceList.get_by_host() *before* calling init_host() and pass that stuff in init_host(). The allocations info from placement is a similar type of info.14:09
jaypipesI wonder what mriedem would think of that though.14:09
bauzasjaypipes: yeah I was thinking of that, but once we get all the instances UUIDs by self._get_all_assigned_mediated_devices() we need to call placement, right?14:11
bauzasjaypipes: for knowing their allocs14:11
bauzasjaypipes: so, say we have 1000 instances, we could hit 1000 times placement just for that :(14:11
bauzashence why I was looking at alternative API calls14:11
*** mriedem has joined #openstack-placement14:13
jaypipesbauzas: you're looking for basically a new placement API call. something like GET /allocations?consumer_id=in:<instance1>,<instance2>, etc...14:20
bauzasif so, that's not good :)14:21
bauzasjaypipes: I was looking at any *existing* placement call :)14:21
jaypipesbauzas: the alternative to that would be to store a file on the compute service that keeps that mapping of instance UUID -> provider UUID for you. (this is actually what I said would be needed in the original spec review)14:21
bauzasso that reshape services wouldn't be blocked because of a missing API :)14:21
bauzasjaypipes: yeah...14:22
bauzasI don't disagree with that14:22
bauzasyou know what ? I'm just about to write docs and say how terrible it is to reboot a host14:22
jaypipesbauzas: there is also GET /resource_providers/{compute_uuid}/allocations14:22
bauzasjaypipes: that's the https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L1887 report method, right?14:22
bauzasjaypipes: I was a bit scared by looking at the docstring :D14:23
jaypipesyes14:23
bauzasoh wait14:23
bauzasno, I can use this method :)14:23
jaypipessee here a comment from efried: https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L1970-L197114:23
bauzasI confused it with https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L190714:23
bauzasoh wait, actually I need the whole tree14:24
jaypipesbauzas: all get_allocations_for_provider_tree() does is call get_allocations_for_provider() over and over again :)14:24
bauzasyeah14:24
jaypipesthus the comment from efried there :)14:24
bauzasagain, I was confused14:24
bauzasheh14:24
jaypipesno worries, this is a confusing area14:24
bauzasand I think efried is right14:24
bauzasthe problem with persisting things on our side is that it makes it mandatory, but just because libvirt lacks a feature14:25
bauzaswhich I dislike at mosty14:25
bauzasit's not because nvidia devs weren't able to convince kernel folks to persist mdevs that we should suffer from this14:25
bauzasand do crazy things just because of this14:25
bauzasjaypipes: hence me reluctant to persist any mdev mapping info14:26
jaypipesbauzas: yeah, definitely it's a catch-22 situation.14:27
* bauzas googles this 14:28
* bauzas doesn't have a single shit of culture14:28
bauzas:(14:28
jaypipesbauzas: oh, sorry... a better term would be "a lose-lose situation"?14:29
bauzasha-ah, I understand it better :)14:29
bauzasbut yeah I agree14:29
bauzasthe more I think about that, the more I'm reluctant to do any single change14:30
bauzasI should rather file a libvirt bug asking for mdevs to be persistent14:30
bauzasI don't know who decided mdevs should be part of sysfs14:31
bauzasbut then...14:31
bauzasyour call14:31
jaypipesbauzas: I think we should chat with mriedem about the pros and cons of passing a built-up allocations variable to init_host() for all the instances on a host. (one of the cons being that this could be an ENORMOUS variable for nova-compute services running Ironic...)14:34
jaypipesor frankly any nova-compute with hundreds or thousands of VMs on it.14:34
efriedjaypipes, bauzas: Do we need the allocations for everything under the compute node, or only allocations against the pGPU RPs?14:36
bauzasefried: ideally the latter14:36
jaypipesefried: are you thinking something like a GET /allocations?consumer_id=in:<uuids>?resource_class=VGPU ?14:37
cdentugh14:38
efriedNo, I was thinking we already know the pGPU RP UUIDs, don't we?14:38
efriedsame way we generated them?14:41
bauzasno, because that's on init14:42
bauzasoh wait14:42
bauzasinit is actually *after* urp14:42
bauzasI think I see where you're coming14:42
bauzaswe could get the RP UUIDs14:42
bauzasby looking up the cache14:43
bauzasin the driver14:43
bauzasbut then, we would still need to call placement to get the allocations14:43
bauzasor or...14:43
* bauzas has his mind thinking multiple things14:43
efriedAnother option is GET /allocations?in_tree=<cn_uuid>14:44
efriedThis would reduce the ironic issue down to a single node.14:44
efriedBut could still be big if there's a crap ton of instances on the node.14:44
cdentas a first pass, a lot of small GETs if you need lots of different allocations14:45
cdentif that proves too clostly _then_ fix it14:45
cdentbut getting allocations ought to be one of the faster operations14:46
cdentand if you really need it to be properly vast throw all the request down an eventlet thread pool and async them14:46
cdents/vast/fast/ but vast works too14:47
efriedI've been trying to come up with a good definition of clostly14:47
cdentclostly is _obviously_ a type of expense is close quarters or time constraints14:49
cdents/is/in/14:49
* cdent sighs14:49
efriedI figured it was something like that.14:53
bauzasso, we have the providerTree even when we init_host()14:55
bauzasso there is a way to know the pGPU RPs14:55
bauzasbut then, I'd need to get the allocations :(14:55
efriedyou even have their names in the ProviderTree.14:55
bauzasyeah but again, I need to lookup allocations14:56
efriedRight, but you can narrow it down to only the pGPUs on only one compute node.14:56
efriedwhich will be what, eight max?14:56
bauzasoh I see14:56
bauzasoh no14:56
efriedI mean, how many GPU cards are we expecting on one system?14:56
bauzashah, this, well, it depends but 8 looks reasonable14:57
efriedI mean, just as a heuristic14:57
bauzasbut a GPU card == N pGPUs14:57
bauzasso theorically, maybe 16 or 6414:57
bauzasbut meh14:57
bauzasreasonable enough14:57
efriedmy point is, you'll be making somewhere in the magnitude of 10-100 GET /allocations calls14:57
bauzasefried: sure, but who would be the caller ? the libvirt driver, right?14:58
bauzaswhich we said N times no14:58
bauzasor, we need to get the providertree in the compute manager14:58
mriedemsomeone is going to have to catch me up because i don't want to read all this scrollback14:58
efriedwe have the provider tree in the compute manager - but it doesn't have allocations in it (nor should it).14:58
bauzasmriedem: nothing really crispy atm14:58
bauzasefried: do we ?14:58
bauzasyou make my day if so14:59
efriedbauzas: hum, well, we have a report client, so you could call get_provider_tree_and_ensure_root.14:59
efriedwhich would be the way you should get the provider tree in any case.14:59
efriedso if it's not already cached, it'll be pulled down.15:00
bauzashah15:01
bauzasworth trying then15:01
*** e0ne has quit IRC15:16
*** e0ne has joined #openstack-placement15:19
*** rubasov has quit IRC15:54
*** nguyenhai_ has quit IRC16:14
*** nguyenhai_ has joined #openstack-placement16:15
*** e0ne has quit IRC16:16
*** ttsiouts has quit IRC16:16
*** ttsiouts has joined #openstack-placement16:21
*** e0ne has joined #openstack-placement16:23
*** Sundar has joined #openstack-placement16:29
*** rubasov has joined #openstack-placement16:47
*** helenafm has quit IRC16:53
*** ttsiouts has quit IRC16:54
*** tssurya has quit IRC16:57
*** ttsiouts has joined #openstack-placement16:58
*** ttsiouts has quit IRC16:59
*** ttsiouts has joined #openstack-placement16:59
*** ttsiouts has quit IRC17:04
*** e0ne has quit IRC17:05
efriedcdent: are you rebasing the placement ObjectList series?17:13
cdentefried: yes17:13
cdentright this minute17:13
openstackgerritChris Dent proposed openstack/placement master: Factor listiness into an ObjectList base class  https://review.openstack.org/63732517:15
openstackgerritChris Dent proposed openstack/placement master: Move _set_objects into ObjectList  https://review.openstack.org/63732817:15
openstackgerritChris Dent proposed openstack/placement master: Move *List.__repr__ into ObjectList  https://review.openstack.org/63733217:15
openstackgerritChris Dent proposed openstack/placement master: Clean up ObjectList._set_objects signature  https://review.openstack.org/63733517:15
openstackgerritChris Dent proposed openstack/placement master: Use native list for lists of Usage  https://review.openstack.org/63939117:15
openstackgerritChris Dent proposed openstack/placement master: Move RC_CACHE in resource_class_cache  https://review.openstack.org/64011417:15
* cdent takes a walk while that cooks17:17
*** Sundar has quit IRC18:05
*** e0ne has joined #openstack-placement18:51
*** e0ne has quit IRC19:03
mriedemcdent: some comments on your osc-placement test cleanup patch https://review.openstack.org/#/c/639717/19:36
cdentthanks mriedem will respond, but brief glance there's nothing to disagree with19:51
cdentthe whole thing was rather bizarre. bunch of stuff totally broke for py319:54
*** ttsiouts has joined #openstack-placement20:09
*** e0ne has joined #openstack-placement20:16
openstackgerritChris Dent proposed openstack/placement master: WIP: Move Allocation and AllocationList to own module  https://review.openstack.org/64018420:36
cdentefried, jaypipes, edleafe ↑ is now the end of the big refactoring stack. I'm going to continue this stuff the bitter end unless you guys want to stop me. Your feedback thus far has been great, so thanks for that.20:37
efriedI though there was no end, bitter or otherwise20:37
efriedgdi, how do you override | ?20:38
edleafeAgree with efried - there will never be an ending20:38
cdentwell, I don't want there to be an end, that's kind of the point: constant refactoring, endless loop20:39
cdentefried: you mean when booleaning two objects?20:39
efriedcdent: I mean set union20:40
cdentis it not __or__?20:41
efriedah, yes20:41
efriedafter all that, I changed my mind about suggesting it.20:44
openstackgerritChris Dent proposed openstack/osc-placement master: Update tox and tests to work with modern setups  https://review.openstack.org/63971720:46
openstackgerritChris Dent proposed openstack/osc-placement master: Add support for 1.18 microversion  https://review.openstack.org/63973820:46
cdentmriedem: that ↑ ought to fix your concerns.20:47
mriedemfancy arrows20:47
cdentI got this one too ↓20:47
cdentbut that's as far as it goes20:47
cdentthat's enough for me today20:48
cdentgoodnight all20:48
*** cdent has quit IRC20:48
mriedemi'm +2 on https://review.openstack.org/#/q/topic:cd/make-tests-work+(status:open+OR+status:merged) if someone else wants to hit them, pretty trivial20:53
mriedem1.18 is the first placement microversion added in rocky,20:53
mriedemso we're a bit behind on osc-placement parity with the api20:53
*** takashin has joined #openstack-placement20:56
*** e0ne has quit IRC21:19
*** s10 has joined #openstack-placement21:28
*** e0ne has joined #openstack-placement21:42
*** e0ne has quit IRC21:44
*** e0ne has joined #openstack-placement21:45
*** e0ne has quit IRC22:01
*** s10 has quit IRC22:27
openstackgerritEric Fried proposed openstack/placement master: DNM: get_rc_cache  https://review.openstack.org/64022623:49

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