| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-04-05 | |||
| 13:49:53 | bauzas | which is larger than yours :) | |
| 13:56:32 | melwitt | jaypipes: okay, thanks. I can propose an amendment to the spec | |
| 13:58:28 | openstackgerrit | Maciej Szankin proposed openstack/nova-specs master: Add remove-nova-cert spec https://review.openstack.org/448882 | |
| 14:02:40 | gmann | sdague: on extension removal, as i updated the base patch in that series, i ll rebase others if needed that might need re approval | |
| 14:03:04 | gmann | johnthetubaguy: can you check this base patch https://review.openstack.org/#/c/450834/ | |
| 14:05:57 | dane-fichter | mriedem: when you get a chance, could you take a look at the newest cursive patch? it passes the experimental check. | |
| 14:06:03 | dane-fichter | mriedem: https://review.openstack.org/#/c/351232/ | |
| 14:07:14 | mriedem | yeah | |
| 14:15:41 | mriedem | jaypipes: on https://review.openstack.org/#/c/453030/ to be clear, are you saying both GET /allocations *and* GET /usages, or just the latter as a new handler? | |
| 14:17:01 | melwitt | is the placement-api-ref on docs.o.o anywhere? I can't find it | |
| 14:17:03 | jaypipes | mriedem: implement both in the REST API but have the quota-handling call only the GET /usages | |
| 14:18:38 | mriedem | jaypipes: why both | |
| 14:18:39 | mriedem | ? | |
| 14:18:46 | mriedem | why do we need two handlers for the same thing? | |
| 14:18:56 | jaypipes | mriedem: well, one is the detail view, the other is the aggregate view. | |
| 14:19:24 | mriedem | i think we need a respin of the spec then with the rest api impact section filled out with those details | |
| 14:19:38 | mriedem | if we're adding a new handler | |
| 14:19:57 | melwitt | mriedem: I'm working on an amendment for the spec to address everyone's comments | |
| 14:20:29 | sdague | melwitt: I'm not sure that publish loop ever fully got setup | |
| 14:20:56 | melwitt | sdague: ack, thanks | |
| 14:21:01 | bauzas | melwitt: it's in devref | |
| 14:21:36 | bauzas | melwitt: https://docs.openstack.org/developer/nova/placement.html | |
| 14:21:38 | melwitt | bauzas: I found this but it says it's forthcoming https://docs.openstack.org/developer/nova/placement.html#api-reference | |
| 14:21:50 | bauzas | oh ok, my bad then | |
| 14:27:50 | openstackgerrit | Balazs Gibizer proposed openstack/nova master: explain payload inheritance in notification devref https://review.openstack.org/453667 | |
| 14:36:53 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Plumbing for tagged nic attachment https://review.openstack.org/415622 | |
| 14:36:54 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Libvirt support for tagged volume attachment https://review.openstack.org/418100 | |
| 14:36:54 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Delete nic metadata when detaching interface https://review.openstack.org/435387 | |
| 14:36:56 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Delete disk metadata when detaching volume https://review.openstack.org/435082 | |
| 14:36:59 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Plumbing for tagged volume attachment https://review.openstack.org/391941 | |
| 14:37:01 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Libvirt support for tagged nic attachment https://review.openstack.org/415520 | |
| 14:37:01 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: API support for tagged device attachment https://review.openstack.org/376021 | |
| 14:37:04 | openstackgerrit | Artom Lifshitz proposed openstack/nova master: Add method to invalidate metadata cache https://review.openstack.org/453673 | |
| 14:52:53 | openstackgerrit | John Garbutt proposed openstack/nova-specs master: Spec to add per instance timeout for LM https://review.openstack.org/442809 | |
| 15:00:55 | jaypipes | cdent: it's not about "doing a bit of math on the client side". rather, it's just making the REST API more useful, IMHO. | |
| 15:02:12 | cdent | I get where you're coming from, but you solution adds an endpoint for a specific result that can be serviced by something more generic that fits in with the existing grammar | |
| 15:02:37 | cdent | And I'm trying to toe the line on "only add stuff if we have to" | |
| 15:02:45 | cdent | and in this case there are plenty of ways to "not have to" | |
| 15:03:05 | cdent | If we decide to go with /usages, that's fine it's not a big deal | |
| 15:03:10 | edleafe | And is "usage" a resource? (in the REST sense of the word) | |
| 15:03:13 | cdent | but since we can do it another way, that's fine too | |
| 15:03:48 | jaypipes | edleafe: we already have /r-p/{uuid}/usages | |
| 15:05:20 | jaypipes | cdent: in either, case I'm fine doing it only in /allocations to start off and adding the /usages at a later time. | |
| 15:05:22 | jaypipes | mriedem: ^ | |
| 15:06:08 | cdent | jaypipes: that seems like a reasonable path: if it turns out it is just too damn slow or code-messy to do the math client side, then adding later is great | |
| 15:06:22 | jaypipes | yep, ok with me. | |
| 15:06:33 | jaypipes | for some reason I thought we had a top-level /usages endpoint already :( | |
| 15:07:12 | cdent | jaypipes: yeah, I had to check to confirm it. I keep going back to the DECLARATIONS var in handler.py over and over. Makes me very glad it is there. | |
| 15:07:35 | edleafe | So would usages be a summary of allocations by resource class? | |
| 15:07:49 | jaypipes | correct. | |
| 15:08:01 | jaypipes | as in "a usage report". | |
| 15:08:15 | edleafe | ok, that's what I thought | |
| 15:09:14 | mriedem | ala https://developer.openstack.org/api-ref/compute/?expanded=show-rate-and-absolute-limits-detail#show-rate-and-absolute-limits | |
| 15:09:22 | mriedem | "maxTotalCores": 20, | |
| 15:09:26 | mriedem | "totalCoresUsed": 0, | |
| 15:09:33 | mriedem | yay quotas in placement | |
| 15:10:08 | melwitt | each compute node is a RP, right? so with the /allocations query, there would be maybe hundreds of entries to add together for every quota check | |
| 15:11:08 | cdent | one sec but it may be that we have to do it jay's way | |
| 15:12:05 | cdent | nope, never mind | |
| 15:12:15 | jaypipes | melwitt: correct. | |
| 15:12:21 | cdent | I was worried that if a user had multiple instances on the same rp the output would be weird | |
| 15:12:26 | cdent | but yeah, could be hundreds | |
| 15:12:49 | jaypipes | melwitt: it's not that it cannot be done, just that it could be done more simply by the placement API. but I'm cool doing that in a followup patch. | |
| 15:13:10 | melwitt | yeah, just thinking about it more | |
| 15:14:09 | mriedem | how would it be hundreds when the default max limit on instances is 20? | |
| 15:14:19 | melwitt | hundreds of compute nodes | |
| 15:14:21 | melwitt | is common | |
| 15:14:34 | mriedem | yeah but aren't you asking for allocations for a given project? | |
| 15:14:36 | melwitt | and allocations are per resource provider | |
| 15:14:50 | cdent | mriedem: you make an excellent point | |
| 15:15:02 | mriedem | but my project by default can only allocate up to 20 instances right? | |
| 15:15:13 | mriedem | b/c allocations.consumer_id == instance.uuid | |
| 15:15:17 | melwitt | oh, hm | |
| 15:15:52 | jaypipes | there will still be 3x that number of records in the normal case (a record per instance for VCPU, MEMORY_MB, and DISK_GB of course) | |
| 15:16:28 | jaypipes | but anyway, like I said, it's nothing more than an ease-of-use thing (doing the top-level /usages endpoint) for me. | |
| 15:16:59 | mriedem | my point is i don't like 2 ways to skin the cat | |
| 15:17:15 | jaypipes | mriedem: one is a summary view, the other is a details view, that's all this is. | |
| 15:17:16 | mriedem | if /usages is the thing that's better and keeps the math on the server side, then that seems fine | |
| 15:17:31 | mriedem | i don't want to provide 2 apis when one is needed | |
| 15:17:38 | jaypipes | mriedem: we already have the /allocations endpoint, though. which is what cdent is saying. | |
| 15:17:39 | mriedem | so let's pick the one correct api | |
| 15:17:43 | melwitt | yeah, I was kinda thinking why not just do /usages only then | |
| 15:17:59 | mriedem | has anyone looked at the turd sandwich that is the compute api lately? :) | |
| 15:18:02 | mriedem | let's not do that again | |
| 15:18:27 | jaypipes | mriedem: Matt, nobody here is recommending making placement API into a turd sandwich. | |
| 15:18:34 | mriedem | jaypipes: so rather than change /allocations to take query params, we add /usages if that's better | |
| 15:18:45 | cdent | we do not have just /allocations yet, we have /allocations/{consumer_uuid}, burt limiting the numbers of paths seems nice | |
| 15:18:48 | jaypipes | mriedem: both the detail view (/allocations) and the summary view (/usages) are useful. | |
| 15:18:57 | jaypipes | cdent: good point. | |
| 15:19:04 | mriedem | jaypipes: they are not useful if we aren't using them both | |
| 15:19:09 | mriedem | one will be technical debt | |
| 15:19:34 | mriedem | so what is the one true best api that we can provide for melwitt's quota counting client side code? | |
| 15:19:36 | mriedem | and let's do that | |
| 15:19:55 | jaypipes | mriedem: my guess is that as soon as we add a summary view, someone will say "but what allocations are underneath that summary view?" | |
| 15:19:59 | jaypipes | mriedem: but meh. | |
| 15:20:10 | cdent | jaypipes: exactly my point | |
| 15:20:12 | mriedem | if someone has a valid use case later, then we add a new thing | |
| 15:20:23 | melwitt | I am still not clear on what the difference between a usage object and a allocation object is either | |
| 15:20:24 | cdent | people will want the details, and we have code that creates most of those details already | |
| 15:20:35 | jaypipes | mriedem: for the quota-counting use case, I believe GET /usages?project_id=X&user_id=Y is the best fit. | |