Tuesday, 2019-07-02

*** takashin has joined #openstack-placement01:02
*** amodi has quit IRC04:22
*** dansmith has quit IRC05:04
*** dansmith has joined #openstack-placement05:22
*** artom has joined #openstack-placement06:16
*** artom is now known as artom|gmtplus306:19
*** belmoreira has joined #openstack-placement06:24
openstackgerritMerged openstack/placement master: Fix up some inaccuracies in perfload comments and logs  https://review.opendev.org/66844906:36
*** cdent has joined #openstack-placement06:55
*** tssurya has joined #openstack-placement07:13
*** helenafm has joined #openstack-placement07:19
*** belmoreira has quit IRC07:37
*** evrardjp is now known as evrardjp_on_holi07:40
*** ttsiouts has joined #openstack-placement07:40
*** evrardjp_on_holi is now known as evrardjp_away07:40
*** e0ne has joined #openstack-placement07:49
*** ttsiouts has quit IRC07:52
*** ttsiouts has joined #openstack-placement07:53
*** belmoreira has joined #openstack-placement07:56
*** ttsiouts has quit IRC07:57
*** takashin has left #openstack-placement08:00
*** ttsiouts has joined #openstack-placement08:19
*** belmoreira has quit IRC08:52
*** tetsuro has joined #openstack-placement09:04
*** belmoreira has joined #openstack-placement09:20
*** tetsuro has quit IRC10:04
*** tetsuro has joined #openstack-placement10:10
openstackgerritTetsuro Nakamura proposed openstack/placement master: Support `same_subtree` queryparam  https://review.opendev.org/66837612:42
*** jaypipes has joined #openstack-placement12:46
*** tetsuro has quit IRC12:47
*** mriedem has joined #openstack-placement13:14
*** helenafm has quit IRC13:56
efriedcdent: -nova has been pretty noisy this morning; did you see my response about retries on set_inventory_for_provider?14:07
*** helenafm has joined #openstack-placement14:14
openstackgerritEric Fried proposed openstack/placement stable/stein: [Stein only] Correct Ubuntu package name  https://review.opendev.org/66868014:14
openstackgerritEric Fried proposed openstack/placement stable/stein: [Stein only] Correct Ubuntu package name  https://review.opendev.org/66868014:16
mriedemi left some comments on https://review.opendev.org/#/c/668680/14:36
mriedemi'm not sure about that one14:37
mriedemthe user might not have had the stein UCA enabled?14:37
efriedmriedem: thanks for that. We've been pestering people to look at those distro install guides and they just haven't; maybe this tack will work.14:39
efried(I had very little expectation that I actually got it right as is)14:39
mriedemcoreycb is the ubuntu person i always reach out to14:39
efriedgtk14:39
cdentefried: I didn't until now. Doing a retry of any sort, I get. What I'm not clear about is if/how the report client's provider tree needs to be reset between retries14:44
efriedcdent: We only update the report client's provider tree on successful API calls.14:44
cdentefried: the issue is this: the generation is wrong when making the first set_... call. What will make sure the generation goes correct?14:45
efriedcdent: Right, the strategy (for this and all generation-conflict retries) is:14:47
efried@retry14:47
efried  GET (which may have happened at some earlier point, if I'm caching, but even if I do it right now I could still be racing14:47
efried  set_inventory_for_provider14:47
efriedsorry, that was too general in some ways and too specific in others. The point is that the retry has to wrap GET and PUT both.14:48
efriedIn the case of _update_to_placement, the GET happens in get_provider_tree_and_ensure_root14:49
cdentright, and I was hoping/thinking I could force something like this:14:49
cdent@retry ; try: iset_inventory... ; except Conflict: self._clear_provider_cache_for_tree(rp_uuid)14:50
cdent(sorry, that's proably insufficiently verbose)14:50
cdentbut I guess I cannot do that because there would still need to be a GET?14:51
efriedin the _update_to_placement flow, the cache clearing is done by update_from_provider_tree.14:51
efriedso yeah, it's all pretty spread out14:51
efriedone sec and I'll answer your last question...14:51
efriedyes, you definitely still need a GET if the failure was 409 generation conflict, because otherwise how would you get the latest generation?14:52
efried(and the latest inventory to make your changes to - but assuming you just want to overwrite the inventory regardless of whatever's in there, you still need the latest generation)14:53
cdentI had this perhaps unfortunate belief that invalidating the cache would cause it to refill itself the next time you queried for data, but this is apparently not the case14:54
efriedthe next time you queried what? set_inventory_for_provider receives an inventory dict.14:55
cdentset_inventor_for_provider looks in the provider tree for data.generation14:55
efriedI guess it could refill when it does the has_inventory_changed check14:55
efriedo14:56
efriedso yeah, I don't think we would want to have it clear and refresh14:56
cdentthat's fine that it doesn't14:56
efriedYou got information at some point, and hopefully if everybody is behaving well, whatever GET you did populated the cache, so the generation that's in there matches your assumption of what you started with before you changed inventory.14:57
cdentbut I need to determine the right call (and lightest) to make a refresh of the provider generation...14:57
cdentyeah, this is not a behaving welll situation14:57
efriedif a conflict cleared and repopulated the cache, and you didn't redrive whatever that get was, you'd be operating on a stale inventory.14:57
cdentthis is a dirty hack within a virt driver14:58
efriedsorry, I mean code organized behaving well, not problems on the server or races or whatever.14:58
efriedgot it. mriedem is doing something similar, with this same function, somewhere or other.14:58
*** evrardjp_away has quit IRC14:58
cdentwhich used to work until _update_inventory was removed and someone (definitely not me) came along and replaced it with set_inventory_for_provider without knowing how it worked14:58
*** evrardjp has joined #openstack-placement14:59
efriedhm, I'm not seeing whatever you're looking at. In master the only non-test use of set_inventory_for_provider is from update_from_provider_tree.15:00
cdent[t 8Dsw]15:01
purplerbot<cdent> this is a dirty hack within a virt driver [2019-07-02 14:58:03.414443] [n 8Dsw]15:01
cdentas in, this is not upstream15:01
cdentas far as I can tell the hack would be:15:02
cdent@retry_ensure_provider15:02
cdentnix that15:03
cdentone mo15:03
*** edmondsw_ has joined #openstack-placement15:04
cdentefried: something like this http://paste.openstack.org/show/753765/15:05
cdentassuming we intend to clobber (not merge) inventory15:05
efriedcdent: since set_inventory_for_provider does not itself invalidate the cache, you'll have to do that too.15:06
cdentah, okay, that's the missing piece15:07
efriedI would be supportive of a change to incorporate that.15:07
efriedmaking it redundant for that one sub-path in update_from_provider_tree15:07
efriedbut I'm fine with that.15:07
efriedso it be like:15:08
efried@retry15:08
efried  _ensure15:08
efried  try:15:08
efried    set_inventory_for_provider15:08
efried  except Conflict:15:08
efried    # clear cache for @retry15:08
efried    scrub cache15:08
efried    raise15:08
* cdent nods15:09
efriedor something15:09
efriedthis involves accessing private things, though15:09
efriedwhich is a dirty hack15:09
efriedmakes one question whether you should actually be trying to reuse report client methods or rolling your own.15:10
cdenton making a change to incorporate something like for set_inventory... that seems a slippery slope because then you'd want it for set_traits and set_aggregates too and people just use the provider tree for real15:10
cdentthis stuff I have in front of me right now is _way_ down in the mud15:10
efriedagree there are tradeoffs, but yes if we wanted to make cache clearing automatic for one, we would want same for all.15:10
cdentand is acknowledged as such. it even has TODOs which says things like "we should do this properly"15:10
efriedtoday the methods are all over the place in terms of scope.15:10
efriedSome just broker raw REST and do little more than convert args to json15:11
cdentanyway, I think I have enough to go on for this little thing, and enough to think about for making the future brighter. thanks for your help15:11
efriedsome interpret returns and do things15:11
cdentLET'S REWRITE IT ALL15:11
efriedsometimes things involve the cache, sometimes not15:11
efriedyeah, let's.15:11
efriedstarting with murdering @safe_connect.15:11
cdentin jerusalem15:12
cdentspeaking of: i have a POC for mappings on AllocationRequest but it's stalled while I'm called away by this hack15:12
efriedokay. Does it look like it has legs?15:13
efriedWhether it does or not, I'm not sure if there's value in waiting to merge the existing fix. I would think we could put such optimizations/refactors on top.15:14
cdenta) I think it probably has legs, b) it's not an optimization, it's a correction15:16
cdentc) it should be done pretty soon15:16
cdentplural suffixes is just all kinds of wrong15:16
efriedum15:16
efriedwe need plural suffixes15:16
efriedwithout question15:16
efriedper AllocationRequest15:16
cdenti mean plural suffixes on ARR15:16
efriedmm, again disagree, under the exact circumstance of the bug.15:17
cdenthaving multiple suffixes on AR is good and just15:17
efriedcombining due to group_policy=none15:17
efriedone ARR represents amount for one rp+rc15:17
cdentno15:17
efriedwhich can be the accumulation of multiple RGs when group_policy=none15:17
cdentone ARR represents one rp+rc+suffix15:17
efriedthen it doesn't map to the output15:18
efriedwhich (I thought) was one of its main purposes15:18
efriedwe have to combine at some point15:18
efriedyou're just suggesting (I assume) pushing that combining to the output processing15:18
efriedinstead of _consolidate_...15:18
cdenti think we've got hung up in my implementation.15:19
cdentno15:19
cdentlet me do this thing and then I'll finish the POC and you can see15:19
efriedsuresure15:19
* efried bbiab15:19
cdentwhatever rush you are imaging doesn't exist15:19
*** cdent has quit IRC15:24
*** e0ne has quit IRC15:27
*** ttsiouts has quit IRC15:31
*** tssurya has quit IRC15:40
*** helenafm has quit IRC15:52
*** cdent has joined #openstack-placement15:54
*** artom|gmtplus3 has quit IRC15:56
cdentmy internet goes weird at the strangest times15:57
efriedIt's not a rush cdent, just refactoring where .suffix(es) lives is a separate thing from fixing the bug.16:31
efriedalso may or may not have an impact on same_subtree+resourceless16:32
cdentwhich is why I'd like to get it right before subtree gets too far along16:32
cdentboth your fix and tetsuro's work override the ARR in a way that tickles my maintenance problems coming soon radar16:32
efriedlook, I'm not saying that that having suffixes on AR is wrong. I'm just saying neither is having them on ARR.16:50
efriedIf we move them to AR, we have to keep track of mapping data as well - which may wind up being the form the information has to take on the AR (there wouldn't be much point in having .suffixes and then having .mappings separately).16:50
efriedMaybe we need a new Mappings class that lives on AR and gets built up as we go.16:50
cdentwhat I've done is made a mappings attribute on the AR16:50
cdentwhich makes sense because that's what we need16:50
cdent'suffix' (singular) made sense on the ARR but as you discovered doesn't actually work16:51
cdentmy initial mistake was to use suffix on the ARR at all. it's entirely correct16:52
cdentand now I'm trying to fix it16:52
cdentit's _not_ entirely correct16:52
* cdent sighs16:52
*** belmoreira has quit IRC17:09
*** amodi has joined #openstack-placement17:55
openstackgerritChris Dent proposed openstack/placement master: Manage mappings on AllocationRequest object  https://review.opendev.org/66872418:05
cdentefried: there it is ^. Probably not quite perfect yet, but it quells my concerns and seems to work okay18:05
efriedcool18:06
cdentdamn, I was so close to having 0 extant patches18:15
* cdent quits while he's nearly ahead18:17
cdentgoodnight18:17
*** cdent has quit IRC18:17
*** tssurya has joined #openstack-placement20:37
*** evrardjp has quit IRC20:51
*** evrardjp has joined #openstack-placement20:52
*** ttsiouts has joined #openstack-placement20:55
*** ttsiouts has quit IRC21:37
openstackgerritChris Dent proposed openstack/placement master: Manage mappings on AllocationRequest object  https://review.opendev.org/66872421:49
*** tssurya has quit IRC21:50
*** ttsiouts has joined #openstack-placement22:16
*** ttsiouts has quit IRC22:21
efriedcdent: I was focusing hard on specs today, so I probably won't have had a chance to look at that mappings-in-AR fixup by the time you sign back on. It's high on my list though.23:10
*** mriedem has quit IRC23:20

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