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