17:00:09 #startmeeting nova notification 17:00:10 Meeting started Tue Jan 3 17:00:09 2017 UTC and is due to finish in 60 minutes. The chair is gibi. Information about MeetBot at http://wiki.debian.org/MeetBot. 17:00:11 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 17:00:14 The meeting name has been set to 'nova_notification' 17:00:24 happy new year! 17:00:47 Happy New Year to you too!! 17:00:52 hi gibi, happy new year 17:01:22 * mriedem creeps 17:01:28 Happy new year!! 17:01:44 OK let's get started 17:02:04 short recap where we are 17:02:25 versioned notification has patches up to review 17:02:52 I update the priority etherpad two days ago 17:03:19 the falvor notifications needs some changes 17:03:54 we agreed that the flavor.delete payload shall contain the full payload class instead of just the uuid 17:04:22 alos 17:04:24 also 17:04:58 the lazy loaded field projects needs some thinking still 17:05:37 currently the projects doesnt show up in the sample 17:06:32 the additions for searchlight needed some extra work due to the tags field 17:06:35 that is also lazy loaded 17:06:35 gibi: i thought that was because the test didn't add a tenant to the flavor? 17:07:13 mriedem: can be, but I suspect that it is related to the lazy loadness of the projects field 17:07:29 mriedem: let me fetch a link 17:08:21 mriedem: https://github.com/openstack/nova/blob/master/nova/notifications/objects/base.py#L97 17:08:40 mriedem: if the projects is not already loaded then the schema population will not load it 17:09:09 mriedem: in the other hand if we remove L97 then other things start to fail 17:09:37 mriedem: I field a related bug https://bugs.launchpad.net/nova/+bug/1653221 17:09:39 Launchpad bug 1653221 in OpenStack Compute (nova) "availability_zone field is missing from the service.update notification payload" [Undecided,In progress] - Assigned to Balazs Gibizer (balazs-gibizer) 17:10:33 the fix is here https://review.openstack.org/415857 but it need some iteration before I can remove L97 17:11:37 anyhow the projects field needs some extra care 17:12:55 hmm, 17:13:00 on https://github.com/openstack/nova/blob/master/nova/notifications/objects/base.py#L97 17:13:25 i wonder if we could check if the field is nullable and if so, just set it to None for the notification - but that doesn't fix flavor.projects which isn't nullable 17:13:32 and the actual value in the db might not be null 17:15:11 mriedem: the only problem currently is with Service.availability_zone that is not lazy loaded but also not initialized which leads to an error 17:15:23 i wonder why https://github.com/openstack/nova/blob/master/nova/objects/flavor.py#L422 doesn't include projects 17:15:26 mriedem: after we initialize that to None I can remove L97 17:15:50 mriedem: I have no clue 17:17:28 i suppose because we only ever get the extra_specs on the initial get https://github.com/openstack/nova/blob/master/nova/objects/flavor.py#L291 17:17:30 from the db 17:18:41 and yeah we only lazy-load projects on the Flavor object https://github.com/openstack/nova/blob/master/nova/objects/flavor.py#L350 17:18:57 that's probably just how it's always been in the DB API so it's modeled the same here 17:19:55 we could try to lazy-load the field in https://github.com/openstack/nova/blob/master/nova/notifications/objects/base.py#L97 and catch the ObjectActionError and just ignore it if we can't load the field.. 17:20:40 mriedem: yes, I'd like to remove L97, to trigger lazy load 17:20:59 anyway, we can move on 17:21:03 mriedem: however I think we shall not ignore ObjectActionError but we should avoid it 17:21:06 * mriedem has to leave in about 10 min 17:21:09 Ok 17:21:25 so the next is the searchlight additions 17:21:34 the basic additions are OK 17:21:45 the instance.tags also lazy loaded 17:22:01 but there we agreed to make that field loaded by default 17:22:26 patches are up for that as well 17:23:00 and last but not least 17:23:15 the json schema bp also has some nova patch up 17:24:13 we still have some dependency issue with the oslo_versioned notifications lib I guess 17:24:58 that is all info I have for bps 17:25:13 we have couple of weeks until the freeze 17:25:34 yeah 1/19 is lib freeze 17:25:41 and then a week after that is feature freeze 17:25:54 so we have to focus on things that already up for review 17:26:46 I will try to keep the priority etherpad up to date to help the cores 17:26:48 li yingjun pointed out something with the flavor delete payload 17:26:51 https://review.openstack.org/#/c/398171/ 17:27:03 they said that only flavorid is set when the flavor is destroyed https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/flavor_manage.py#L46-L46 17:27:15 ah because we don't look it up from the db first 17:27:25 we rely on destroy to either pass or fail 17:27:46 looking... 17:28:50 mriedem: is it some optimization not to look up the whole flavor from the db first? 17:29:05 mriedem: seems weird for me 17:30:03 i left a comment in there, 17:30:11 before deleting the flavor, we look it up, 17:30:21 we could return that result and use it to create a Flavor object used for the delete notification 17:30:40 anyway, we can move that to the review 17:30:45 i've got to head out 17:30:52 mriedem: cool, thanks for the comment 17:31:55 OK, I have nothing else 17:32:06 I'm still in a bit of vacation mode until Thursday 17:32:11 any questions? 17:32:46 I have question on serachlight BP 17:32:54 shoot 17:33:05 I am working on adding key_name field to InstancePayload. In the BP it was mentioned to add list of KeyPair objects containing at least the 17:33:05 name field of the original KeyPair objects based on instance.keypairs 17:33:20 If we just need the key_name then can we directly get it from instance.key_name field https://github.com/openstack/nova/blob/77b72a5b107acf130e7404cc080ba721f474db8f/nova/objects/instance.py#L125 17:33:20 instead of adding the Keypair object? 17:33:44 Searchlight team also asked only for key_name field as the api returns it http://paste.openstack.org/show/xbv2CwtHnhhl1nLLiJeN/ 17:34:38 how does the intance.key_name relates the instance.keypairs ? 17:35:43 the key_name field is the name of the keypair right? 17:36:19 but keypairs could hold a list of keys, while key_name can only refer to a single keypair 17:37:02 aunnam: seems like key_name is an old thing https://github.com/openstack/nova/blob/master/nova/objects/instance.py#L943 17:37:10 so an instance can have many keys? 17:37:56 as far as I understand, yes 17:38:34 ok, then i will double check 17:38:50 keypair is also lazy loaded 17:38:58 yes, it seems 17:39:28 so should I follow the same approach as tags? 17:39:48 good question 17:40:20 if I could remove https://github.com/openstack/nova/blob/master/nova/notifications/objects/base.py#L97 this if then lazy load would not be a problem 17:40:33 as the populate_schema would trigger the load anyhow 17:41:06 based on the discussion with mriedem above I think this would be the better approach 17:41:16 so you don't have to make it loaded by default 17:41:34 gibi, populate_schema would be called for each notification right? 17:41:37 but I have to do some work on https://review.openstack.org/#/c/415857/ to remve L97 17:42:00 sneti: if the notification uses SCHEMA then yes, the populate_schema is called 17:42:15 to copy the data from the normal nova ovo to the notification ovo 17:42:45 gibi, then I will follow your patch and wait till your change 17:42:59 yes.. so for fields that are lazy loaded, it is loaded for each notification 17:43:15 aunnam: OK. I will finish that patch as soon as I return from vacation (Thursday) 17:43:29 this was the reason we decided to change tags to default right 17:43:31 gibi:thanks 17:43:31 sneti: yes, that would cause a load as soon as L97 is removed 17:44:04 sneti: yes, in case of tags we decided to load it by default instead of lazy load 17:44:59 I thought this should be the same all lazy loaded fields to avoid db calls 17:45:43 if every code patch of the object to a notification that will load the given field then it looks nicer to load that field by default 17:46:11 load by default and lazy load has a similar db impact just the lazy load happens later 17:46:27 but I'm not an expert here 17:46:47 if we have doubts then we should bring this up again with the cores 17:47:34 gibi, yes. also can you check the comments on this when you have time: https://review.openstack.org/#/c/407228/13/nova/compute/utils.py 17:48:21 sneti: I will check it 17:48:38 gibi, thanks! 17:49:16 any other questions/ 17:49:17 ? 17:51:43 OK then lets close this for today 17:51:51 thanks for showing up 17:52:03 see you around 17:52:12 #endmeeting