16:00:19 #startmeeting blazar 16:00:19 Meeting started Thu Dec 2 16:00:19 2021 UTC and is due to finish in 60 minutes. The chair is priteau. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:19 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:00:19 The meeting name has been set to 'blazar' 16:00:25 #topic Roll call 16:09:18 Hello diurnalist 16:10:41 hello! 16:11:16 i'm seeing if mark has time to join 16:12:19 Hello 16:12:41 Hello mppowers 16:13:21 #topic Yoga priorities 16:13:41 I believe I've seen some progress on external plugins implementation? 16:14:21 Yes. At the moment I've been writing it against Chameleon's fork, but it shouldn't be coupled much to our version. 16:14:27 The host plugin is working 16:15:02 Nice! 16:15:27 It would be great to have some feedback on it if possible. I can reformat it and submit to opendev today. 16:15:55 Right now, it stores resource properties as JSON data, which adds minimal overhead. 16:16:49 Also, the spec outlines allocate() and deallocate() as the main functions needed to be implemented by the plugin, but I found this is boilerplate that wasn't needed for the host plugin. Though maybe I am missing something. 16:19:35 mppowers: in my mind when writing the spec, 'allocate' means 'allocate to user', in this case meaning, create the aggregate and put the host in it 16:19:42 deallocate would be removing the host / deleting the aggregate 16:20:01 it's basically the "enact" process, which is different for each type of resource 16:20:04 * ``allocate(resources, lease)``: given a resource selected by Blazar and a target lease, somehow make the resources available to the lease's user or project. 16:20:17 That's my understanding to, it means doing the aggregate dance 16:21:07 Actually we do the aggregate thing in on_start 16:21:33 diurnalist: Did you have in mind something that runs at lease creation time or start time 16:21:34 i think priteau and i benefit from being involved w/ the chameleon 'allocatable resources' paper when it comes to this terminology ;) -- blazar's db has "allocations" which marks which things should be allocated at start time 16:21:41 start time 16:21:54 lease create time just creates the entries in the allocations table, so the system knows who has what when 16:21:56 ok, then yes, on_start/on_end is the current implementation 16:22:06 and also any code that reallocates during active leases 16:24:24 how should the base class call allocate then? I was calling it when an allocation is inserted into the DB 16:25:41 i think at lease create, the allocation logic probably is the same for all plugins and could be lifted out. that's the point where the allocations are created in the DB, and i think in the spec that's a single generic table 16:26:04 Yes 16:26:08 the.allocate() / .deallocate() functions i would expect to be called at on_start 16:26:36 so the lease manager runs on_start for a lease, and it finds all the plugins involved in the lease and invokes their allocate() function, passing the resources that were reserved 16:26:58 similarly when the lease tears down, all the reservations invoke their plugin's deallocate() 16:27:51 Right now I implemented it in the host plugin overriding on_start, since there isn't much boilerplate there, and this was part of the interface in the spec 16:28:36 It overrides on_end as well, but calls the super class on_end which deletes the allocations 16:29:02 The spec does say that on_start/on_end could be implemented by the plugin 16:32:12 Maybe we can have a generic on_start, which could be replaced by the plugin if needed? 16:32:45 yeah... i think really all on_start should do, likely, is call allocate... but maybe other plugins would for some reason do something else before or after 16:34:11 So `allocate` should be used there, and then also when a reservation update adds new resoruces 16:35:16 yes 16:37:18 exactly 16:38:46 Should deallocate be called in the reservation update? In case a future resource type supports this 16:38:57 Along with being called in `on_end` 16:39:29 A plugin could tell the base class whether it allows deallocate during active leases 16:40:27 I was thinking deallocate could handle that itself, since the lease is passed in with it 16:41:28 It would avoid calling deallocate once for each resource only to get an exception back 16:42:46 The spec has all resources passed into allocate/deallocate at once 16:42:52 ah, ok 16:43:09 well, maybe an exception then 16:44:42 I mentioned this as a comment on the spec, but I also added validate create and validate update parameter functions 16:46:18 I think actually it's best to hold off on discussing that until I submit the patch 16:47:39 Sounds good 16:50:21 That is all I have to say on the external plugins at the moment, I'll upload my change, and refactor allocate/deallocate based on our discussion 16:50:34 :+1: ! 16:51:02 Perhaps a metric of interest is the external host plugin is 375 lines, compared to 2000+ lines of code the native host plugin has 16:51:25 \o/ 16:51:51 Nice 16:51:54 that's certainly an improvement 16:52:47 Anything else to discuss today? 16:53:07 nope, i'm once again revisiting the context patch while we are discussing 16:53:29 blazar's policy handling is a bit dated, had to re-learn this 16:54:23 Yeah, I saw john left various comments 16:55:13 nothing else for me. I may get a chance to work on default resource properties, and there are a few open questions on the etherpad, I'll ask if I have any questions regarding it 16:56:13 Thanks. I am nearing the end of various projects, so I'll aim to review some patches this month 16:56:46 Let's wrap up 16:56:52 #endmeeting