13:00:09 #startmeeting nova api 13:00:10 Meeting started Wed Dec 14 13:00:09 2016 UTC and is due to finish in 60 minutes. The chair is alex_xu. Information about MeetBot at http://wiki.debian.org/MeetBot. 13:00:12 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 13:00:14 The meeting name has been set to 'nova_api' 13:00:21 who is here today? 13:00:32 o/ 13:01:00 o/ 13:01:25 o/ 13:01:49 first, let me give a quick update before we jump in the filters.... 13:02:08 #link https://etherpad.openstack.org/p/ocata-nova-priorities-tracking 13:02:16 o/ 13:02:28 the server side patch of the deprecation of image-metadata is merged 13:03:00 and I feel the pagination of single_tenant_usage is close 13:03:03 #link https://review.openstack.org/386093 13:03:54 so we have better give more attension for other api patches, hope we can merge them all 13:04:09 #topic API Priorities 13:04:32 so....i think we can begin to talk about filters again. I have two points for it today 13:05:10 first is about the policy rule, sdague have concern on it, it make the API behaviour different without any discoverable way. 13:05:35 as I remember johnthetubaguy have point that the user don't want to remove it? 13:06:00 I am worried operators rely on those, given their comments at the summit 13:06:30 the policy idea was a way to relax the restrictions in some clouds where its really wanted 13:06:47 (with a view towards capabilities API fixing discoverability eventually) 13:07:22 johnthetubaguy: did we get any comments about which filters people were concerned about? 13:07:26 yea, I +1 for that also. but I can't answer the question of behaviour change 13:07:38 I *really* don't want to make this a config option 13:07:58 I would much rather add in things people are concerned about being dropped 13:08:16 emm....maybe we should discussion the second problem first. That may change which filters we want to remove 13:08:18 sdague: basically no, they seemed to want everything for admins 13:08:24 s/discussion/discuss 13:08:28 johnthetubaguy: define everything 13:09:19 sdague: well all API visible properties, filter and sorting, but I don't think we have that today, it wasn't really a useful data point I guess 13:09:43 right 13:10:00 here is the thing, we either decide we're going to define this, so the behavior is known 13:10:22 or we decide we aren't, and then any db changes randomly break people with no warning in the future 13:11:06 right, I am on the define side of things, for sure, the status quo is stupid 13:11:23 actualy only one db index can be used in the query....so I feel we can keep all the filters, due to most of them won't get benefit from index 13:11:25 because exposing that policy point / config actually means we're saying "have raw access to our db... but no guaruntees that any of these things will keep working" 13:11:59 alex_xu: yeh, without building a ton of indexes, that's a whole other challenge 13:12:04 but when it came to jay's worries about shrinking the set of allowed things, I was basically saying we have an always allowed set, and some extra we allow only for admins (but there is a policy to change that) 13:12:34 johnthetubaguy: is that concern posted somewhere? still catching up. 13:12:36 sdague: so that means the rest of those filters kept can't get benefit from index also. so keep one or keep all are no different 13:12:43 I don't believe anyone is arguing for unrestricted 13:13:18 johnthetubaguy: ok, I guess I'm confused, what are you arguing for? 13:13:28 sdague: I thought that was in the comments in the spec, but unsure 13:13:50 so I should describe my preference here 13:14:21 first there is a set of things we allow for filter and sort, they should be limited to things that work today, and match properties we have in the API (ideally) 13:14:56 now, come the performance concerns, should we reduce the set further to those that don't cause big performance issues, a smaller set 13:15:09 only the db index 'instances_project_id_deleted_idx' is used. So the result already shrink to single tenant, then even other filters can't get benefit from index it is fine 13:15:14 there are some that only make sense for admins (like project_id filters, or host filters) 13:15:38 johnthetubaguy: the only bad one is admin with all_tenant=1 13:15:54 ok, so lets see where we have common ground. 13:15:55 we should encourge admin user list with all_tenant=0 13:16:09 1) agree that we should build this as a smaller set 13:16:20 +1 13:16:24 well defined, matching the API for names (not random db tables) 13:16:28 +1 13:16:53 emm...+1 for second one 13:17:14 2) all filters are indexed 13:17:19 (I guess the second one makes the first one true, but either way) 13:17:28 my feeling on this is that I'm ok fixing this by adding more indexes 13:17:35 not dropping filters 13:18:01 I'm also ok punting on this, because it's a performance improvement that also gets odd if we use searchlight anyway 13:18:07 but that way list can be smaller ? 13:18:08 so I am not sure (2) is actually required, I would say, we should remove end use DOS attack vectors 13:18:26 yeah, search light does confuse these things 13:18:41 s/ // 13:18:41 johnthetubaguy: yeh, well dropping the join tables for query mitigates that 13:18:51 the worst things are going to be removed 13:18:57 sdague: yeah, maybe thats enough 13:19:05 then we're just doing filter / sort on unindexed values 13:19:07 which sucks 13:19:19 but it something a site can local patch if they see a ton of it 13:19:39 3) admin vs. non admin properties 13:19:39 so the big text columns, as I understand it, adding an index is more expensive to maintain than what it agains you, at least I hear that needs to be checked 13:19:53 johnthetubaguy: sure, that makes sense 13:20:11 how many bigtext columns are we thinking will be in the list here? 13:20:18 name? 13:20:18 I hope we mostly pulled them out 13:20:38 that's varchar(255) 13:20:55 name is regex matching, it can't get benefit from db index 13:20:59 yeah, I wasn't every clear, it sounds like that might already by not worth an index, but we need to check that 13:21:06 right, the regex issue is a whole other issue 13:21:24 yeah, lets table that discussion for now 13:21:40 especially because that's not going to be supportable with elastic search (searching there is different) 13:21:51 +1 13:21:53 ok, so I think on #3 13:21:56 yeah 13:22:06 my feeling is most of the admin vs. non-admin is artificial 13:22:19 excepting nodenames 13:22:35 so, project_id, no reason to exclude that for non admin 13:22:41 because they are already scoped 13:22:54 true, it just returns zero results I guess 13:23:10 and... in the future of hierarchical multi tenancy, it actually will mean something for non cloud admin 13:23:22 yep, thats true 13:23:30 so just start with the basic assumption that we try to make everything the same between the 2 groups 13:23:48 the only place this can't be is when things start leaking cloud topology 13:23:57 which is the node/host fields 13:24:17 yea 13:24:17 so, short term, that's the only admin adds 13:24:20 yeah, no breaking out of token scope, and no topology leak, agreed with that 13:24:45 longer term, it would honestly be nice if those fields did expose to normal users, in the hashed format 13:24:58 and could be filtered sorted 13:25:11 * johnthetubaguy forgot thats not upstream already... I guess 13:25:33 we have that in the api response 13:25:39 so the difference isn't the filter/query side, it's just in the representation used, whether or not we are hiding topology 13:25:42 but calculated in the python, so can't filter and sort 13:25:53 alex_xu: right, so it's not an Ocata thing 13:26:07 but, something we should figure out if there is a way forward on in Pike+ 13:26:26 yea 13:26:26 yeah, its hashed on tenant_id, so I guess which tenant_id will be used for each instance 13:26:36 alex_xu: because, we totally could calculate it in the db 13:26:50 sdague: got it 13:26:50 yeah, thats what I was thinking 13:26:55 anyways, keeping moving 13:26:56 so... 13:27:16 I'm hoping this means we've agreed to the following: 13:27:31 1) we should have a strict whitelist 13:27:49 2) it's ok to defer the issue that everything in the whitelist has an index 13:28:25 3) the admin list differences should only be node/host - and that's a temporary stop gap until we have the better story there 13:28:33 I feel we can't have everthing have an index. anyway that is second question we will discuss 13:28:46 alex_xu: I agree with you 13:29:26 sdague: ok, now i feel same page with you :) 13:29:36 I am +1 for all three 13:29:55 still getting my head around (3), I like its simplicity 13:30:32 alex_xu: I think we probably want to write up some doc about performance tuning filters, knowing that we're going to do our best here, but that site specific workloads might be using filters we didn't see as high priority 13:31:13 I was only trying policy instead of (2) as a compromise with those against (2), but its great to avoid that 13:31:16 sdague: ah, that is good idea 13:31:29 and we should suggestion user don't user all_tenant=1 13:31:47 I also think that searchlight being needed for cells v2 ... a bunch of the performance characteristics are going to change 13:31:51 alex_xu: so the token scope wins, so its meaningless I think 13:31:57 johnthetubaguy: right, that 13:32:02 sdague: +1 that blows the old rules out the water 13:32:22 johnthetubaguy: sorry, I didn't get that 13:32:28 johnthetubaguy: which is why I'm fine on defering #2, because it's going to change again, so not make guaruntees 13:33:01 alex_xu: we should be doing the token scoping of queries such that all_tenant means "all tenants I can see" 13:33:02 sdague: yeah 13:33:15 if role=admin, that's everything 13:33:21 if not, that's a smaller thing 13:33:27 which is just your own 13:33:32 yeah, I like that view 13:33:51 in hierarchical multi tenancy it would be from your part of the tree down 13:34:14 right now restricting to "what I can see" adds the where clause that hits the index we want to hit 13:34:35 * alex_xu probably understand 13:35:36 think of it like: `ps` vs `ps a` 13:35:52 sorry, `ps` vs `ps x` 13:36:04 by default, show me mine 13:36:12 but I can ask to see everything I'm allowed 13:36:28 under container systems, ps x is returning very small amount of stuff 13:36:42 because you aren't allowed the whole system 13:37:29 emm...ok 13:38:19 alex_xu: did I make it less clear? :) 13:38:51 * johnthetubaguy things he should stop doing "sudo ps ax" 13:39:16 :) 13:39:17 heh 13:39:22 sdague: I guess, you are looking for hierarchical multi tenancy, that is more than all_tenants 13:39:25 :) 13:39:30 * johnthetubaguy makes hammer bashing noises 13:39:41 :) 13:39:57 never mind, maybe I just need to read the meeting log again :) 13:40:37 sdague: thanks for that, loving (2) and (3), I think thats a good re-starting point 13:40:42 alex_xu: yeh, I'm just saying we clarify the meaning of all_tenants now to one that is compatible with future multi tenancy 13:41:10 sdague: oh yeah, i think i understand 13:41:40 so we can forget the policy now? 13:42:01 alex_xu: I hope so 13:42:06 johnthetubaguy: ^^^ ? 13:42:24 ok, that point didn't resolve yet :) 13:42:35 I like your breakdown of the issue basically 13:42:40 * alex_xu is still in lost 13:42:54 ok, I thought that with 1), as long as we keep that whitelist large enough, there is no need for the policy 13:43:20 the issue with the policy was if we restricted the list further in 2) to only match indexes, we removed things people needed 13:43:29 its (2) that stops the policy for me, I always wanted (1), but either way 13:43:54 if we are ok leaving things in the whitelist that don't have indexes, we do not need the policy point 13:44:09 yeah 13:44:31 and I think that's a better trade off. Some queries are slower than they could be, but we aren't making the behavior site specific. 13:44:52 knowing in one or two cycles the performance of searches is going to change dramatically anyway 13:45:31 yeah, I am not too fussed with the performance, as for non-admins I don't think its ever going to break too badly 13:46:24 I was trying to compromise with the folks that cared about the performance, but it left us in a worse position 13:46:57 for the folks super worried about performance, I think this can be accepted as a step in the right direction 13:47:02 yeh 13:47:19 it also gives us an idea of what we'd want to ask out of optimizing in searchlight 13:47:27 yeah, very true 13:47:29 as we'll say "here are the fields we let people filter on" 13:47:39 what can we do with those? 13:48:31 ok... so I guess, what are the actions to move this forward? 13:49:01 yea...I just want to ask that. I feel i'm still in lost status. 13:49:02 update the spec, update the prototypes? 13:49:52 so....for now, what I should keep in the whitelist? 13:50:11 ok, so how about this: 13:50:12 everything thats in the API response, and works today, I guess? 13:50:23 ok 13:50:34 1) johnthetubaguy verify the whitelist looks sane to him (he has the most interaction with ops here) 13:50:53 should we take the summary out to the ML for context? 13:51:10 that sounds better 13:51:23 because the spec is getting sliced and diced and sometimes I think the forest is lost for the trees 13:51:25 yeah 13:51:32 * gmann need to read all review comments also. ll be nice to learn lot of things. 13:51:43 2) sdague to write summary of current high level agreement 13:51:47 to ML 13:51:55 I am good with the ML, it might be a good point to start a new spec honestly 13:52:13 should be the same change-id, but start over might help here 13:52:24 johnthetubaguy: yeh, well, we're so late at this point, I think we need to figure out how the spec lands ASAP 13:53:06 sdague: true 13:53:28 alex_xu / Kevin_Zheng can we start coding this in parallel assuming this will be the agreement? 13:53:47 sure 13:53:57 sdague: yea, after I figure out the plan from your summary :) 13:54:00 we have the validation framework already up I guess? 13:54:16 #link https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:bp/add-whitelist-for-server-list-filter-sort-parameters 13:54:18 alex_xu: ok, well I'll make breakfast first, then write up that email :) 13:54:18 well, just is all about tweaking the whitelist, it can start from the old one I guess 13:54:23 I will keep sync with alex 13:54:23 ^ yea the top two patches 13:54:38 johnthetubaguy: yeh, honestly, I'm good with whatever you sign off on for the whitelist 13:54:40 sdague: thanks :) 13:54:51 we'll make you the required ACK for that 13:55:06 OK 13:55:25 and we'll try to get this all sorted by the end of the week? 13:55:34 A week from now is my last day in the office for the year 13:55:37 I think we have to, thats a good goal 13:55:43 yeah, same 13:55:56 actually, its a week yesterday for me 13:56:30 so will we have meeting next week? 13:58:07 maybe? lets keep in close contact over the week though 13:58:16 ok, cool 13:58:26 2 mins left 13:58:55 who is updating the spec? 14:00:13 ok... it time close the meeting 14:00:14 thanks all 14:00:16 #endmeeting