13:00:08 #startmeeting nova api 13:00:09 Meeting started Wed Jan 11 13:00:08 2017 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:10 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 13:00:12 The meeting name has been set to 'nova_api' 13:00:15 who is here today? 13:00:22 o/ 13:00:33 o/ 13:01:08 we can directly jump to... 13:01:11 #topic open 13:01:17 ha 13:01:21 we didn't have too much topic :) 13:01:34 #link https://review.openstack.org/#/c/408571/38 13:01:36 ohk. 13:02:03 the first patch for server list seems pretty close 13:02:17 I will add more tests to the policy one tomorrow 13:02:30 o/ 13:02:32 Kevin_Zheng: thanks 13:02:40 alex_xu: Kevin_Zheng i will review the series tomorrow 13:02:50 Cool 13:03:20 johnthetubaguy: sdague looking for you take a look at the implement of return 400 for joined-table and internal attribute, which are at line 305 and line 312 13:03:24 gmann: thanks 13:03:35 oops, i mean the line 305 and line 312 of https://review.openstack.org/#/c/408571/38/nova/api/openstack/compute/schemas/servers.py 13:04:05 and finally we return 400 in the python code https://review.openstack.org/#/c/408571/38/nova/api/openstack/compute/servers.py@225 13:04:37 alex_xu: is there any option to explicitly strict it on json schema? i do not remember if it has 13:04:37 I have to say, that isn't beautiful... 13:05:05 We tried some combination 13:05:17 Didn't work :( 13:05:22 gmann: due to additionalPropperties=True :( 13:05:26 * gmann lot of thing to improve on json schema lib 13:05:28 there is no way 13:05:29 alex_xu: yes 13:06:20 It will be strict after 2 cycles? 13:06:45 Kevin_Zheng: has to be in a microversion right, as it will break users if not 13:06:50 probably with Microversion, we can't strict it directly 13:06:57 yea it goes for ever 13:07:27 Hmm... 13:07:32 alex_xu: I see what you mean, you are relaxing anything that starts with "_" and all the joined stuff 13:07:44 johnthetubaguy: yes 13:07:48 alex_xu: ok, I can look for sure 13:08:14 johnthetubaguy: we use regex for "_" due to I don't want to list all the internal attributes for a python object, and that will be a unstable list 13:08:15 alex_xu: would a decorator that runs before the schema validation that checks for known bad things be easier here? 13:08:17 sdague: thanks 13:08:42 we can do some customize formattor but that makes more ugly than python code one 13:09:14 well, I really mean just a @reject_known_bad_filers some something like that 13:09:25 o/ sorry I'm late 13:09:36 johnthetubaguy: yea that may be better 13:11:00 johnthetubaguy: yea, it should works. and that separate the ugly thing out of schema. 13:11:19 reject_known_bad_filters probably is the only special thing 13:11:42 yeah, I quite like it being explicit like that 13:12:04 once the schema rejects it, its clear we don't need that decorator any more, etc 13:12:15 johnthetubaguy: another way is we get rid of getatter on the db model obj, but that means we still have some parameters controlled by db layer code 13:12:28 s/getatter/getattr/ 13:13:01 johnthetubaguy: the schema only reject it on specific microversion 13:13:08 and decorator can be versioned when schema start rejecting 13:13:13 so whether that decorator can work with microversion? 13:13:19 alex_xu: ack, I am thinking about the future there 13:13:47 gmann: yea, probably 13:13:48 the decorator has the request object, so it should be OK 13:14:11 don't need that to start with of course 13:14:27 yea 13:15:03 I guess it is worth a try 13:15:42 its tempting to do as a patch before the schema one, if that helps not upset the chain of patches 13:15:59 ++ 13:16:22 Kevin_Zheng: would you like to try that idea? 13:16:28 yeah 13:16:33 Kevin_Zheng: thanks 13:16:38 np 13:16:42 for sort key we have same thing 13:16:53 #link https://review.openstack.org/#/c/415142/15/nova/api/validation/parameter_types.py@441 13:16:55 would like to learn :) 13:17:06 but i think we needn't another decorator. 13:17:20 Kevin_Zheng: :) 13:18:01 I guess sort is different, we are not converting 500 errors into 400 13:18:08 like we are with those others, mostly 13:18:26 yea 13:18:39 I totally need to spend some quality time with that patch series, just bogged down in some neutronv2 coding right now 13:19:27 johnthetubaguy: yea, I see, I work with Kevin_Zheng, and try to shape the patch to a good shape before catch you and sdague 13:19:57 another find we return 500 for pattern matching 13:20:01 #link https://bugs.launchpad.net/nova/+bug/1653899 13:20:01 Launchpad bug 1653899 in OpenStack Compute (nova) "The 500 returns for invalid regex in the pattern match query parameters" [Medium,In progress] - Assigned to Zhenyu Zheng (zhengzhenyu) 13:20:21 for sort key also we will return 400 for joined table and _* right? 13:20:36 probably we just follow a patch and change the pattern matching filters to use "format: regex" 13:20:49 gmann: yes, but for now, it already return 400 13:20:51 alex_xu: yeah 13:21:19 yeah, sort is already filtered, to some extent 13:21:55 hmm... maybe I don't like us having a silent failure there, 400 would be more consistent, although it is a breaking change... ah, bummer 13:22:04 I need to think on that more 13:22:25 johnthetubaguy: you mean for sort key? 13:22:29 filter bits are more important to get right though, the sort one seems safer somehow 13:22:30 yeah 13:22:55 yeah, silent failure is for safe 13:23:05 its only admins that would have a slightly smaller list of allowed sorts I guess 13:23:36 yes, I remember that 13:23:55 probably just no host and node for non-admin 13:24:42 yeah, lets leave that for now, but its almost tempting not to change sort from what we have today, given its impact seems to be minimal and only for admins 13:25:00 yeah 13:25:20 but we are doing this the correct way around, anyways, focusing on the filters first 13:25:32 ok 13:25:50 its been a massive hole for a while 13:26:53 yeah 13:27:19 I guess that's all for server list, hope I didn't miss anything more 13:27:48 feels like we are getting closer 13:27:55 \o/ 13:27:57 but I am tempted to checkin before the meeting next week 13:28:01 just keep things moving 13:28:35 maybe lets try catch each other on Friday to see where we are, first thing my morning should be OK ish time for you all I guess? 13:28:59 thinking 9am UTC or something like that? 13:29:14 yea, as remember your morning is our 5pm probably. 13:29:22 yah 13:29:50 yea, 6 pm for me 13:30:09 OK, 6pm is a bit rough, but its better than now 13:30:28 yea :) 13:30:44 :) 13:31:12 Any more open for today? 13:31:32 I am good 13:31:51 me too 13:31:58 me too 13:32:15 ok, thanks all, let us back to work 13:32:16 #endmeeting