Earlier  
Posted Nick Remark
#openstack-nova - 2017-01-05
22:04:33 dtp i was confused as to what code path would lead to https://github.com/openstack/nova/blob/master/nova/compute/api.py#L1815 being executed in a cell vs the top level
22:04:40 melwitt we want it to run 1) always in cells v2 2) only for the api cell in cells v1
22:05:01 mriedem so, if CONF.cells.enable and CONF.cells.cell_type == 'api' ?
22:05:19 mriedem cells.enable will only be True for cells v1
22:05:30 melwitt mriedem: oooh, that sounds like it would work
22:05:39 openstackgerrit Matt Riedemann proposed openstack/nova: Fix ksa mocking in test_cinderclient_unsupported_v1 https://review.openstack.org/417206
22:05:40 mriedem ok i think *that* ^ fixes that mock issue
22:05:44 mriedem based on https://docs.python.org/3/library/unittest.mock.html#id5
22:05:51 melwitt dtp: yeah, it's complicated. and one of many reasons we are doing cells v2 and will get rid of cells v1
22:05:54 mriedem mocking statics from imported libraries is a mess
22:07:03 smcginnis mriedem: I seem to remember puzzling over that as well at some point.
22:07:33 smcginnis mriedem: Looks "more correct" now.
22:07:44 mriedem i just 'feels' right
22:07:49 smcginnis :)
22:07:55 mriedem i code like trump governs
22:07:56 mriedem with the gut
22:08:10 mriedem well, or just not at all
22:08:12 smcginnis It'll be huuge.
22:08:29 mriedem i'll tweet about this bug and shame someone else into fixing it for me
22:08:35 mriedem but take all of the credit when it's fixed
22:08:42 smcginnis hehe
22:08:57 mriedem i mean, his 10 year old son can use a computer, so it can't be that hard
22:08:58 jroll mriedem: that's how we know you're a ptl
22:09:11 smcginnis LOL
22:09:18 dtp melwitt so you're thinking if ! cells.enable, delete the tokens?
22:12:32 melwitt dtp: if not cells.enable or cells.enable and cell_type == 'api'. I think. I'm looking through the code reminding myself how/when replay in a compute cell happens
22:12:57 dansmith melwitt: does it hurt to just run it always?
22:13:11 dansmith melwitt: if we ignore something missing we don't expect, we can always nuke I would think
22:13:23 dansmith when in doubt, throw it out
22:13:26 melwitt dansmith: it would send an rpc message out to nowhere, I guess
22:13:43 dansmith if it might crush, give it a flush
22:14:05 melwitt if it's a call, it would time out. but I'm guessing it's a cast
22:14:28 dansmith if it's a cast, let it pass
22:14:40 melwitt lol. I was wondering if you'd have something for that
22:14:56 dansmith if you wonder, let it plunder
22:15:04 melwitt oh boy ...
22:15:08 dtp but we still don't want this running in...whatever compute cells are called now?
22:15:25 dansmith dtp: it won't, that's api-only code
22:15:32 dtp oh, great
22:15:39 dansmith that's theconfusing part of cellsv1,
22:15:48 dansmith the api code is re-played in the compute cell
22:15:51 dansmith well, one of the confusing parts
22:15:58 dtp gotcha
22:16:25 dtp thanks, this helped
22:16:27 melwitt dansmith: I was just getting around to that. why is there a "if cell_type == 'api'" in there if it doesn't replay it? from what I see in nova/compute/cells_api.py it doesn't cast down to cells for delete
22:17:00 dansmith melwitt: I mean cellsv2 doesn't replay
22:17:28 melwitt dansmith: yeah, I'm looking in cells v1 and it looks like delete doesn't replay in a compute cell compute/api
22:17:35 melwitt guh
22:17:42 dtp that's what i was seeing as well
22:17:53 dansmith I'm lost
22:18:07 melwitt so I was wondering, why is there a "if cell_type == 'api'" in compute/api in the first place. maybe residue
22:18:41 melwitt or rather, it's really just saying "if this is cells v1, do this"
22:18:55 dansmith we definitely have to delete in both places in cellsv1 right?
22:19:23 dansmith I think we call delete in the compute cell and then it's replicated backwards in that case right?
22:19:28 dansmith the opposite of most calls
22:19:30 melwitt dansmith: from the code, it looks like it doesn't re-run the compute/api part in compute cells, is what I was observing. the use of the conditional made me think it was
22:19:41 dansmith melwitt: but the comment says it does right?
22:20:33 melwitt dansmith: it does. maybe it used to? unless I'm blind as I look in cells_api.py
22:21:57 dansmith well, we force a local delete in the api,
22:22:05 melwitt looks like the delete_everywhere will do a replay
22:22:08 dansmith then call direct to compute via rpc in there
22:22:09 melwitt but not the normal delete
22:22:17 dansmith ah
22:22:19 melwitt gawd
22:23:04 melwitt lol!
22:23:18 dtp :) so summary:
22:23:38 dtp no cell types in v2. ignore that if in there. just delete the tokens.
22:23:46 dtp with the conditional melwitt outlined above
22:23:54 dtp why even have the conditional if cells v1 is gone in ocata?
22:24:04 dansmith I would prefer it if we can avoid the conditional, but if we can't then yes
22:24:14 dansmith dtp: unfortunately cellsv1 will be with us for longer than that
22:24:27 dansmith dtp: until cellsv2 is a replacement and we have a migration path
22:24:43 openstackgerrit Ed Leafe proposed openstack/nova: Remove the Allocation.create() method. https://review.openstack.org/416751
22:25:19 melwitt dtp: we can technically avoid the conditional because the delete_tokens rpc api is a cast i.e. broadcast that doesn't wait for a response. so it could just get sent anyway even if nothing will be there to listen to it
22:25:36 dansmith melwitt: what won't be there to listen for it?
22:25:41 dansmith melwitt: the instance having moved?
22:25:51 melwitt dansmith: the consoleauth service in compute cells
22:25:52 dansmith oh waiut
22:25:56 dansmith right, right
22:26:05 dansmith okay then you should do the conditional
22:26:12 dansmith IMHO of course
22:27:53 melwitt yeah, I hadn't thought of the possibility of just letting it run in compute cells and it not hurting anything
22:28:13 dansmith dtp: so, all good?
22:29:03 dtp i think so. thanks y'all
22:29:03 melwitt dansmith: wait, did you say do the conditional or did you mean don't do it?
22:29:32 dansmith melwitt: I mean _do_ the conditional so we're not just firing off a message into a queue that we know is unlistened to
22:29:40 melwitt yeah, okay
22:29:46 dansmith melwitt: I was originally thinking the reason for the conditional was something else
22:29:52 melwitt I was thinking you said the opposite
22:30:13 melwitt dtp: so yes on the conditional
22:30:46 dtp roger that
22:31:16 dansmith melwitt: remember when we told dtp this would be all easysauce? good times.
22:31:33 melwitt dansmith: yeah, I know. I keep wanting to apologize to him
22:31:36 melwitt sorry dtp
22:31:41 dtp hehe
22:31:57 dansmith it's like telling the driver to get into the other lane because it's faster and then getting stuck behind an accident or something
22:32:12 dansmith should'a kept quiet
22:32:18 melwitt haha
22:36:01 dtp you can make it up to be by having a look at https://review.openstack.org/#/c/336293/ :D
22:40:08 openstackgerrit OpenStack Proposal Bot proposed openstack/nova: Updated from global requirements https://review.openstack.org/415978

Earlier   Later