17:00:19 #startmeeting nova notification 17:00:19 Meeting started Tue Jun 5 17:00:19 2018 UTC and is due to finish in 60 minutes. The chair is gibi. Information about MeetBot at http://wiki.debian.org/MeetBot. 17:00:21 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 17:00:23 The meeting name has been set to 'nova_notification' 17:00:46 o/ 17:00:48 hi 17:01:01 I have one think to discuss today 17:01:49 the complex server group policy code change tries to rename and retype the policies attribute of the server group https://review.openstack.org/#/c/563401/9/nova/notifications/objects/server_group.py 17:01:55 in the notification object 17:02:18 either we do a major version bump on the notifiation and delete the old policies field 17:02:40 or do a minor bump and keep both the old policies field and add the new policy field 17:03:06 i wasn't expecting a major version bump - was more expecting along the lines of what he's doing in the InstanceGroup object https://review.openstack.org/#/c/563375/11/nova/objects/instance_group.py 17:03:11 deprecate policies, add policy 17:03:31 OK, so the instance group still has the old polcies field available 17:03:34 that helps 17:03:54 yes although it doesn't set it 17:04:13 so we don't have the value to populate the notification payload 17:04:48 we might reuse the obj_make_compatible call to get the value back 17:05:02 true 17:05:14 i thought we didn't use obj_make_compatible in the versioned objects though 17:05:45 i.e. are you suggesting we set both policies and policy in the notification payload? 17:06:25 to keep the meaning of the minor bump we should populate the policies field in the payload 17:06:47 as somebody using the parser for the older minor version still try to use that 17:07:25 have we done a major bump in the versioned notification objects yet? 17:07:26 it only make sense to me to to send the old field if we send real value in that field 17:08:24 no, this would be the first major bump on the payload 17:08:53 the NotificationPublisher has version 2.2 but that is not directly serialized into the notification 17:09:16 is there any problem in sending a new major version of this payload? 17:09:30 we don't know who or how these are consumed so it's hard to say 17:09:39 sending is easy 17:09:52 but as you said we don't know who is receiving it 17:10:15 btw, how we keep the REST API compatible for the older microversions regardin the polcies field? 17:10:18 i defer to what you think's best here 17:10:34 the caller of the rest api gets the response body back based on the version 17:10:47 with notifications, no one is calling with the version they want 17:10:52 they just get what we give them 17:11:41 mriedem: I mean with <2.62 the REST API should return a polcies field with real value 17:12:01 mriedem: so we have the data available 17:12:09 I mean have to have the data available 17:12:34 yes 17:12:34 https://review.openstack.org/#/c/567534/9/nova/api/openstack/compute/server_groups.py@102 17:12:37 that's true for the rest api 17:13:14 the API does a db query like objects.InstanceGroup.get_by_uuid(context, id) 17:13:25 it does not specify the object version 17:13:29 so I assume it gets the latest 17:14:03 and still assumes that the group.polcies field is populated in the object 17:14:55 so I don't see how the notification codepath cannot make the same assumption 17:14:57 because of https://review.openstack.org/#/c/563375/11/nova/objects/instance_group.py@185 17:16:37 i'm not sure where you're going with this, if you want the notification payload to just populate both fields (if possible) then i think that's fine 17:17:05 mriedem: yeah, I would go with the minor bump and populate both fields 17:17:13 probably with a note that the policies field is for legacy compat 17:17:17 mriedem: I might misunderstand your statement about not haveing the old field populated 17:17:46 i meant https://review.openstack.org/#/c/563375/11/nova/objects/instance_group.py@158 17:19:36 so for the new groups the polcies field will not be set and the REST API < 2.63 will return sort of false information for those as well 17:20:32 or I'm confused 17:20:33 :0 17:20:38 what will https://review.openstack.org/#/c/563375/11/nova/objects/instance_group.py@207 do 17:21:00 anyhow I will comment on the patch 17:21:22 bottom line, i try to go with the minor bump if we can have the old polcies field populated 17:21:22 it looks like when pulling one of these out of the database, both the policies and policy fields will be set 17:21:25 so the rest api can go either way 17:22:11 hm, but the value of 'policy' will be someting complex so putting that into the policies field will not work 17:22:32 policy is an object with a policy field, which is the policy name 17:22:33 as the polcies field is just a sting 17:22:38 so it sets policies = [policy.policy] 17:22:41 yes 17:22:43 list of strings 17:23:25 OK L 177 does that but L 207 does polcies = [policy] 17:23:41 i think this is a good opportunity for you to leave comments on the review :) 17:23:44 and for me to have lunch 17:23:46 exactly 17:23:51 I will do that 17:24:02 thanks for your time 17:24:07 yw 17:24:08 ttyl 17:24:08 have a good lunch 17:24:14 #endmeeting