Thursday, 2021-12-02

priteau#startmeeting blazar16:00
opendevmeetMeeting 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
opendevmeetUseful Commands: #action #agreed #help #info #idea #link #topic #startvote.16:00
opendevmeetThe meeting name has been set to 'blazar'16:00
priteau#topic Roll call16:00
priteauHello diurnalist16:09
diurnalisti'm seeing if mark has time to join16:11
priteauHello mppowers16:12
priteau#topic Yoga priorities16:13
priteauI believe I've seen some progress on external plugins implementation?16:13
mppowersYes. At the moment I've been writing it against Chameleon's fork, but it shouldn't be coupled much to our version.16:14
mppowersThe host plugin is working16:14
mppowersIt would be great to have some feedback on it if possible. I can reformat it and submit to opendev today.16:15
mppowersRight now, it stores resource properties as JSON data, which adds minimal overhead.16:15
mppowersAlso, 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:16
diurnalistmppowers: in my mind when writing the spec, 'allocate' means 'allocate to user', in this case meaning, create the aggregate and put the host in it16:19
diurnalistdeallocate would be removing the host / deleting the aggregate16:19
diurnalistit's basically the "enact" process, which is different for each type of resource16:20
priteau* ``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
priteauThat's my understanding to, it means doing the aggregate dance16:20
priteauActually we do the aggregate thing in on_start16:21
priteaudiurnalist: Did you have in mind something that runs at lease creation time or start time16:21
diurnalisti 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 time16:21
diurnaliststart time16:21
diurnalistlease create time just creates the entries in the allocations table, so the system knows who has what when16:21
priteauok, then yes, on_start/on_end is the current implementation16:21
priteauand also any code that reallocates during active leases16:22
mppowershow should the base class call allocate then? I was calling it when an allocation is inserted into the DB16:24
diurnalisti 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 table16:25
diurnalistthe.allocate() / .deallocate() functions i would expect to be called at on_start16:26
diurnalistso 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 reserved16:26
diurnalistsimilarly when the lease tears down, all the reservations invoke their plugin's deallocate()16:26
mppowersRight 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 spec16:27
mppowersIt overrides on_end as well, but calls the super class on_end which deletes the allocations16:28
priteauThe spec does say that on_start/on_end could be implemented by the plugin16:29
priteauMaybe we can have a generic on_start, which could be replaced by the plugin if needed?16:32
diurnalistyeah... 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 after16:32
mppowersSo `allocate` should be used there, and then also when a reservation update adds new resoruces16:34
*** priteau is now known as Guest738816:38
*** priteau_ is now known as priteau16:38
mppowersShould deallocate be called in the reservation update? In case a future resource type supports this16:38
mppowersAlong with being called in `on_end`16:38
priteauA plugin could tell the base class whether it allows deallocate during active leases16:39
mppowersI was thinking deallocate could handle that itself, since the lease is passed in with it16:40
priteauIt would avoid calling deallocate once for each resource only to get an exception back16:41
mppowersThe spec has all resources passed into allocate/deallocate at once16:42
priteauah, ok16:42
priteauwell, maybe an exception then16:43
mppowersI mentioned this as a comment on the spec, but I also added validate create and validate update parameter functions16:44
mppowersI think actually it's best to hold off on discussing that until I submit the patch16:46
priteauSounds good16:47
mppowersThat 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 discussion16:50
diurnalist:+1: !16:50
mppowersPerhaps 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
diurnalistthat's certainly an improvement16:51
priteauAnything else to discuss today?16:52
diurnalistnope, i'm once again revisiting the context patch while we are discussing16:53
diurnalistblazar's policy handling is a bit dated, had to re-learn this16:53
priteauYeah, I saw john left various comments16:54
mppowersnothing 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 it16:55
priteauThanks. I am nearing the end of various projects, so I'll aim to review some patches this month16:56
priteauLet's wrap up16:56
opendevmeetMeeting ended Thu Dec  2 16:56:52 2021 UTC.  Information about MeetBot at . (v 0.1.4)16:56
opendevmeetMinutes (text):
mppowersThanks for the help. Talk to you later!16:57
opendevreviewJason Anderson proposed openstack/blazar master: Use built-in oslo context de/serialization
opendevreviewJason Anderson proposed openstack/blazar master: Use built-in oslo context de/serialization
opendevreviewMark Powers proposed openstack/blazar master: Add resource properties discovery API
opendevreviewMark Powers proposed openstack/blazar master: Remove RPC layer from API

Generated by 2.17.2 by Marius Gedminas - find it at!