Tuesday, 2018-05-15

openstackgerritMerged openstack/nova master: Make scheduler client allow multiple member_of query parameters  https://review.openstack.org/56831300:02
openstackgerritMerged openstack/nova master: Remove '_apply_instance_name_template'  https://review.openstack.org/56725700:03
openstackgerritMerged openstack/nova master: XenAPI: Pass expected return codes to resize2fs  https://review.openstack.org/56831800:03
openstackgerritTakashi NATSUME proposed openstack/nova master: Remove mox in test_xenapi.py (3)  https://review.openstack.org/56464500:36
*** mriedem has joined #openstack-placement00:40
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return nested providers in get_by_request  https://review.openstack.org/56711301:05
openstackgerritTetsuro Nakamura proposed openstack/nova master: Add traits check in nested provider candidates  https://review.openstack.org/56715001:05
openstackgerritTetsuro Nakamura proposed openstack/nova master: Support nested alloc cands with sharing providers  https://review.openstack.org/56750801:05
openstackgerritMerged openstack/nova master: add lower-constraints job  https://review.openstack.org/55596101:12
*** mriedem has quit IRC01:17
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all resources in provider_summaries  https://review.openstack.org/55804501:54
openstackgerritTakashi NATSUME proposed openstack/nova master: Remove mox in nova/tests/unit/virt/xenapi/stubs.py  https://review.openstack.org/56841202:20
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all nested providers in tree  https://review.openstack.org/55948002:38
openstackgerritZhenyu Zheng proposed openstack/nova master: Use ThreadPoolExecutor for max_concurrent_live_migrations  https://review.openstack.org/56350503:35
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all resources in provider_summaries  https://review.openstack.org/55804504:37
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all nested providers in tree  https://review.openstack.org/55948004:37
openstackgerritTetsuro Nakamura proposed openstack/nova master: Support nested allocation candidates in placement  https://review.openstack.org/56548704:37
openstackgerritNaichuan Sun proposed openstack/nova master: XenAPI: update the document related to vdi streaming  https://review.openstack.org/56844405:16
openstackgerritMerged openstack/nova master: Added ability to configure default architecture for ImagePropertiesFilter  https://review.openstack.org/56642505:26
*** jaypipes has quit IRC05:41
*** jaypipes has joined #openstack-placement05:41
openstackgerritMerged openstack/nova stable/queens: Update os_compute_api:os-flavor-extra-specs:index docs for 2.47  https://review.openstack.org/56325305:45
openstackgerritTetsuro Nakamura proposed openstack/nova master: Add tests for alloc_cands with member_of  https://review.openstack.org/56139905:56
openstackgerritTetsuro Nakamura proposed openstack/nova master: Fix member_of with sharing providers  https://review.openstack.org/56140005:56
openstackgerritTetsuro Nakamura proposed openstack/nova master: Expand member_of functional test cases  https://review.openstack.org/56601105:56
*** belmoreira has joined #openstack-placement06:19
*** belmoreira has quit IRC06:24
openstackgerritjichenjc proposed openstack/nova-specs master: Add additional information for z/VM spec.  https://review.openstack.org/56215406:24
*** tssurya has joined #openstack-placement06:25
*** efried has quit IRC06:36
openstackgerritTakashi NATSUME proposed openstack/nova master: Remove mox in test_compute_api.py (4)  https://review.openstack.org/56846206:42
*** tssurya has quit IRC06:51
*** belmoreira has joined #openstack-placement06:55
*** belmoreira has quit IRC06:58
openstackgerritsahid proposed openstack/nova master: libvirt: place emulator threads on CONF.cpu_shared_set  https://review.openstack.org/51089707:04
*** diga has joined #openstack-placement07:08
openstackgerritMartin Midolesov proposed openstack/nova master: vmware:add support for the hw_video_ram image property  https://review.openstack.org/56419307:42
*** avolkov has joined #openstack-placement07:57
openstackgerritYikun Jiang (Kero) proposed openstack/nova-specs master: Complex (Anti)-Affinity Policies  https://review.openstack.org/54692508:16
*** finucannot is now known as stephenfin08:21
openstackgerritZhenyu Zheng proposed openstack/nova master: Use ThreadPoolExecutor for max_concurrent_live_migrations  https://review.openstack.org/56350508:23
openstackgerritjichenjc proposed openstack/nova master: WIP: Remove support for /os-fixed-ips REST API  https://review.openstack.org/56851608:25
openstackgerritNaichuan Sun proposed openstack/nova master: xenapi(N-R-P):Get vgpu info from `allocations`  https://review.openstack.org/52171708:45
openstackgerritStephen Finucane proposed openstack/nova master: Simplify instance name generation  https://review.openstack.org/51657308:48
*** e0ne has joined #openstack-placement08:50
*** edmondsw has joined #openstack-placement08:52
openstackgerritNaichuan Sun proposed openstack/nova master: xenapi(N-R-P): Add API to support compute node resource provider update and create  https://review.openstack.org/52104108:54
*** edmondsw has quit IRC08:56
openstackgerritNaichuan Sun proposed openstack/nova master: xenapi(N-R-P): support compute node resource provider update  https://review.openstack.org/52104108:59
*** cdent has joined #openstack-placement08:59
openstackgerritStephen Finucane proposed openstack/nova master: Remove unnecessary 'to_primitive' call  https://review.openstack.org/56853209:03
openstackgerritMerged openstack/nova master: libvirt: Report the virtual size of RAW disks  https://review.openstack.org/56789909:08
openstackgerritTetsuro Nakamura proposed openstack/nova master: Support nested alloc cands with sharing providers  https://review.openstack.org/56750809:15
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all resources in provider_summaries  https://review.openstack.org/55804509:15
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all nested providers in tree  https://review.openstack.org/55948009:15
openstackgerritTetsuro Nakamura proposed openstack/nova master: Add microversion for nested allocation candidate  https://review.openstack.org/56548709:15
openstackgerritZhenyu Zheng proposed openstack/nova master: WIP abort live migration in queue.  https://review.openstack.org/56854209:19
*** e0ne has quit IRC09:29
*** e0ne has joined #openstack-placement09:33
*** e0ne has quit IRC09:38
*** e0ne has joined #openstack-placement09:59
openstackgerritChris Dent proposed openstack/nova master: Use nova.db.api directly  https://review.openstack.org/54326210:13
*** edmondsw has joined #openstack-placement10:40
*** diga has quit IRC10:41
*** edmondsw has quit IRC10:44
*** cdent has quit IRC11:17
*** edmondsw has joined #openstack-placement11:21
openstackgerritBalazs Gibizer proposed openstack/nova master: placement: Fix HTTP error generation  https://review.openstack.org/56856711:51
*** efried has joined #openstack-placement11:52
*** cdent has joined #openstack-placement11:57
jaypipesefried: easy one: https://review.openstack.org/#/c/568567/12:19
efriedI'LL BE THE JUDGE OF THAT!12:20
jaypipes:)12:20
*** mriedem has joined #openstack-placement12:20
efriedjaypipes, cdent: I thought we had already put the inventory-in-use error code in place in that spot12:22
efriedhm, apparently just for set_inventories.12:23
cdentefried: yeah, when the code stuff was started the first code was only added in one spot12:24
efriedcdent: Will the error code be the same for that other spot?12:24
cdentNot sure, but it doesn't really matter for this patch does it? That would be a separate change.12:26
openstackgerritTetsuro Nakamura proposed openstack/nova master: Support nested alloc cands with sharing providers  https://review.openstack.org/56750812:27
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all resources in provider_summaries  https://review.openstack.org/55804512:27
openstackgerritTetsuro Nakamura proposed openstack/nova master: Return all nested providers in tree  https://review.openstack.org/55948012:27
openstackgerritTetsuro Nakamura proposed openstack/nova master: Add microversion for nested allocation candidate  https://review.openstack.org/56548712:27
efriedcdent: Right, separate change, but one I'd like to do now while I'm thinking about it.12:28
* cdent forgot that efried is s stack12:28
openstackgerritMohammed Naser proposed openstack/nova stable/queens: Added ability to configure default architecture for ImagePropertiesFilter  https://review.openstack.org/56857512:28
cdentefried: but yeah, I woudl reckon it's the same12:28
openstackgerritMatt Riedemann proposed openstack/nova stable/ocata: libvirt: Report the virtual size of RAW disks  https://review.openstack.org/56838212:31
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: CLI for traits (v1.6)  https://review.openstack.org/51464312:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: Resource class set (v1.7)  https://review.openstack.org/51464412:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: Usages per project and user (v1.8, v1.9)  https://review.openstack.org/51464612:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: CLI allocation candidates (v1.10)  https://review.openstack.org/51464712:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: New dict format of allocations (v1.11, v1.12)  https://review.openstack.org/54281912:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: Transactionally update allocations (v1.13)  https://review.openstack.org/54667412:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: Add nested resource providers (v1.14)  https://review.openstack.org/54667512:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: Limit allocation candidates (v1.15, v1.16)  https://review.openstack.org/54804312:36
openstackgerritBalazs Gibizer proposed openstack/osc-placement master: Allocation candidates parameter: required (v1.17)  https://review.openstack.org/54832612:36
efriedjaypipes: Easy one :P  https://review.openstack.org/#/c/568353/12:41
gibithe day of easy patches :)12:53
openstackgerritEric Fried proposed openstack/nova master: Add INVENTORY_INUSE to DELETE /rp/{u}/inventories  https://review.openstack.org/56857812:55
efriedcdent, gibi, jaypipes: ^12:55
efriedgibi: except for tetsuro's stuff12:55
cdent12:55
gibiefried: can we now get rid of the nova.scheduler.client.report._RE_INV_IN_USE regex ?12:56
efriedgibi: Unfortunately not quite that easy.  That code is using the regex to scrape out the name of the conflicting resource class and using it for the message.12:57
efriedgibi: So unless we want to dumb down that message, it doesn't really help us to add the check for this code.12:58
efriedgibi: See nova.scheduler.client.report._extract_inventory_in_use12:58
gibiefried: as far as i see this regexp only extracts the rc to include it into another exception text13:00
efriedcorrect13:00
gibican we simply reuse the orignal detail text from the placement in the nova exception?13:00
gibithis is the regexp13:01
gibi("Inventory for (.+) on resource provider "13:01
gibi                            "(.+) in us13:01
efriedgibi: Well, we don't know which resource class conflicts without scraping the message body.13:01
gibiand this is what we create from it13:02
gibi"Inventory for '%(resource_classes)s' on "13:02
gibi                "resource provider '%(resource_provider)s' in use."13:02
efriedoh, I see13:02
efriedYeah, that's a good idea :)13:02
gibi:)13:02
efriedWas planning to muck with that in a separate change anyway, though.  Esp. since the report client doesn't use the delete path at all anyway.13:02
gibiefried: separate change sounds good to me;13:03
efriedso in fact the changes are independent.13:03
efrieddon't even need to be in series.13:03
jaypipesefried: nice. +W13:03
efriedjaypipes: thx13:03
gibiefried: so I'm +2 https://review.openstack.org/#/c/56857813:04
gibijaypipes: another easy one ^^13:04
efriedcdent: know off the top how I would look for the error code from the client side?13:05
cdentresponse_json['errors'][0]['code'] <- total guess off the top of my head13:05
cdentis that what you're asking?13:06
openstackgerritMatt Riedemann proposed openstack/nova master: Update auth_url in install docs  https://review.openstack.org/56800213:06
efriedcdent: Yeah.13:06
efriedthanks13:06
jaypipesefried: also +W13:07
efriedjaypipes: thanks13:07
gibiwhat a productive day13:09
*** tetsuro has joined #openstack-placement13:34
tetsurojaypipes: responsed in https://review.openstack.org/#/c/567150/1113:34
openstackgerritsahid proposed openstack/nova master: libvirt: place emulator threads on CONF.compute.cpu_shared_set  https://review.openstack.org/51089713:35
openstackgerritVladyslav Drok proposed openstack/nova master: Placement: allow to set reserved value equal to total for inventory  https://review.openstack.org/56483813:35
openstackgerritVladyslav Drok proposed openstack/nova master: ironic: Report resources as reserved when needed  https://review.openstack.org/51792113:35
openstackgerritVladyslav Drok proposed openstack/nova master: Placement: allow to set reserved value equal to total for inventory  https://review.openstack.org/56483813:38
openstackgerritVladyslav Drok proposed openstack/nova master: Ironic: report 0 for vcpus/memory_mb/disk_gb resources  https://review.openstack.org/56584113:38
openstackgerritVladyslav Drok proposed openstack/nova master: ironic: Report resources as reserved when needed  https://review.openstack.org/51792113:38
openstackgerritVladyslav Drok proposed openstack/nova master: Ironic: report 0 for vcpus/memory_mb/disk_gb resources  https://review.openstack.org/56584113:39
openstackgerritMerged openstack/osc-placement master: CLI for traits (v1.6)  https://review.openstack.org/51464313:43
*** tetsuro has quit IRC14:07
efriedjaypipes, mriedem: What do we need to do to get vdrok's specless bp approved?  https://blueprints.launchpad.net/nova/+spec/allow-reserved-equal-total-inventory14:08
openstackgerritMatt Riedemann proposed openstack/nova master: Move image conversion to privsep.  https://review.openstack.org/55443714:09
openstackgerritMatt Riedemann proposed openstack/nova master: We don't need utils.trycmd any more.  https://review.openstack.org/55443914:09
openstackgerritMatt Riedemann proposed openstack/nova master: We no longer need rootwrap.  https://review.openstack.org/55443814:09
mriedemhttps://docs.openstack.org/nova/latest/contributor/blueprints.html14:09
efriedvdrok: given that it's a microversion, I suspect you may need a spec.  (But didn't we already talk about this?)14:14
vdrokmriedem: ouch, I did not read that before :( efried yeah can do the spec today14:15
*** cdent has quit IRC14:16
efriedgibi, jaypipes: Can y'all please hit https://review.openstack.org/#/c/515811/ again today?14:17
jaypipesefried: will try. got a heck of a backlog.14:18
gibiefried: how do you feel about mriedem's comments about the end to end tests?14:19
efriedgibi: Agree it's a good idea; agree to do it in a fup.14:19
gibiefried: OK14:19
*** cdent has joined #openstack-placement14:24
openstackgerritArtom Lifshitz proposed openstack/nova master: Refactor _build_device_metadata  https://review.openstack.org/53380414:31
openstackgerritArtom Lifshitz proposed openstack/nova master: Consider hostdev devices when building metadata  https://review.openstack.org/53380514:31
openstackgerritMerged openstack/nova master: __str__ methods for RequestGroup, ResourceRequest  https://review.openstack.org/56835314:49
efriedcdent: does this look familiar to you?14:50
efried        # Set accept header on every request to ensure we notify placement14:50
efried        # service of our response body media type preferences.14:50
efried        client.additional_headers = {'accept': 'application/json'}14:50
cdentthat used to be required, but isn't so much any more14:51
efriedcdent: It doesn't seem to be working =========================vvvvvvvvvvvvvvv14:51
efried(Pdb) resp.request.headers14:51
efried{'Content-Length': '193', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'x-auth-token': 'admin', 'OpenStack-API-Version': 'placement latest', 'Connection': 'keep-alive', 'User-Agent': 'run.py keystoneauth1/3.4.0 python-requests/2.18.4 CPython/2.7.6', 'Content-Type': 'application/json', 'X-Openstack-Request-Id': 'req-35195a85-b2c0-43ff-9bd7-1ddbf047c34d'}14:51
cdentif you don't set the accept header at all, then it now defaults to a json response14:52
cdentbut it used to be that webob would default to html14:52
efriedI'm getting HTML.  Which means I can't pull the error code.  Because it ain't there afaict.14:52
cdentefried: you got code you can point me at?14:52
efriedcdent: I'm running nova.tests.functional.test_report_client.SchedulerReportClientTests.test__set_inventory_for_provider with a breakpoint in nova.scheduler.client.report.SchedulerReportClient._set_inventory_for_provider in the 409 condition.14:53
cdentefried: but from what I can discern there additional headers isn't getting integrated for some reason14:53
efriedcdent: Second time it hits (cause I'm mucking with InventoryInUse code)14:54
cdentthe fact that your response content-type is application/json is confusion. you're definitely getting html?14:54
efriedThe response content-type is text/html.  The above headers are on the *request* (at least as reported by resp.request.headers)14:55
efriedThe request was a PUT with a JSON payload, so content-type application/json is expected and correct.14:55
efriedHere are the response headers:14:55
efried(Pdb) resp.headers14:56
efried{'openstack-api-version': 'placement 1.25', 'Content-Length': '291', 'Content-Type': 'text/html; charset=UTF-8', 'x-openstack-request-id': 'req-9464f8b2-949b-47e2-b126-c1419f8822b6', 'vary': 'openstack-api-version'}14:56
efried(hm, side note, are those request IDs supposed to match?)14:56
cdentso: something is setting accept: '*/*' which webob and placement will interpret as "give me anything"14:57
cdentplacement will only return a json formatted error response if the accept header is not set, or is set to application/json14:57
cdentso you need to figure out what is setting the accept header/why additional headers is not being seen14:57
efriedcdent: Okay, I think I see it.  Looking at the ksa code for adapter, additional_headers hits the entire 'headers' key with a setdefault().  But report client's put method sets15:01
efried                  'headers': {request_id.INBOUND_HEADER:15:01
efried                              global_request_id} if global_request_id else {}15:01
efriedwhich will cause that setdefault to no-op.15:01
efriedbut that doesn't actually explain where */* is getting set.15:01
cdentcould be requests?15:02
efriedoh, wait, I lied above.15:02
efried        for k, v in self.additional_headers.items():15:02
efried            kwargs.setdefault('headers', {}).setdefault(k, v)15:02
efriedso that *should* set the accept header if it's absent.15:02
efriedwhich means it must be present already and set to */* before we get there.15:03
openstackgerritVladyslav Drok proposed openstack/nova-specs master: Allow having placement inventories with reserved value equal to total  https://review.openstack.org/56861315:08
efriedcdent: report client's self._client.additional_headers is getting emptied somewhere along the way.15:11
openstackgerritMerged openstack/nova master: trivial: Explain how the marker works for instance-cell mapping  https://review.openstack.org/56759715:12
cdentany ideas?15:13
efriedcdent: Not yet.  Deep debug is in order, I guess.  I don't relish the thought of delving that far into the bowels of ksa/requests.15:13
efriedcdent: I can work around it, but not in pretty ways.15:14
cdenta quick grep of ksa doesn't reveal anything obvious :(15:15
efriedthough I guess I'll have to, at least temporarily, if I find it's a bug in ksa15:15
cdentdo you have any evidence that the problem is present outside of your test?15:15
efriedcdent: Well, the fact that additional_headers is a public attr but also a kwarg to the Adapter init is kinda messy.  Cause we're not setting it on the init.15:15
efriedcdent: um, a reasonable question, because we're probably mocking some part of requests in here, eh?15:16
efriedI don't know what an "intercept" is.15:16
cdenthttps://github.com/cdent/wsgi-intercept doesn't mock the request, just the socket that gets written to15:17
cdent(replaces the socket with a BytesIO (or equivalent)15:17
cdentsince wsgi-intercept has been working well for at least 7 years, it's probably not that15:18
cdentbut could very well be15:18
cdentI was just thinking that if this problem is present then we would have seen it more in "real" situations15:18
cdentand I was under the impression that we weren't but then I don't read the scheduler logs off15:19
cdents/off/often/15:19
efriedcdent: Until now, we've never had a reason to resp.json() a non-2xx response.15:20
efriedso it could have been broken forever and we wouldn't know.15:20
cdentthat's surprising: do we not write error responses in the log when we get them? If not, why not?15:20
cdentwriting them to the log is why they exist15:21
efriedcdent: I'm sure we do - via resp.text15:21
cdentwhich should show up as json15:21
cdentbut not formatted15:21
cdentit will still be a json string15:21
efriedbut why would we ever have noticed if it wasn't?15:22
cdentso by looking in the logs15:22
cdentthus my comment above about "I don't read scheduler logs often"15:22
openstackgerritVladyslav Drok proposed openstack/nova-specs master: Allow having placement inventories with reserved value equal to total  https://review.openstack.org/56861315:29
efriedjaypipes, mriedem: ^15:34
cdentefried: it's probably the case that placement side should see '*/*' as "default to json" for sake of clean. I'll look into that.15:36
jaypipesefried: are you directing us at vdrok's patch?15:37
efriedcdent: Okay, that would be another workaround.  Probably require a microversion, though, huh?15:37
openstackgerritVladyslav Drok proposed openstack/nova-specs master: Allow having placement inventories with reserved value equal to total  https://review.openstack.org/56861315:38
efriedjaypipes: Yes.  Spec for reserved=total.  Simple one, will unblock his code, which is ready afaict.15:38
cdentefried: if it required a microversion it would be useless15:38
cdentbut probably according to the rules it does, but the rules are often wrong15:38
cdentefried: see https://review.openstack.org/#/c/518223/15:39
cdentwhich as we know understand things is potentially incomplete if cliens are defaulting to sending */*15:40
jaypipesefried: +2 from me. nice and short.15:43
efriedjaypipes: thx15:43
efriedcdent: Yeah, I remember that patch.  I guess I need to nail down where tf we're setting */*.15:44
openstackgerritMerged openstack/nova master: placement: Fix HTTP error generation  https://review.openstack.org/56856715:46
cdentefried: made https://bugs.launchpad.net/nova/+bug/1771384 for reference15:51
openstackLaunchpad bug 1771384 in OpenStack Compute (nova) "placement api send text/html error responses when accept headers is '*/*'" [Undecided,New]15:51
efriedcdent: okay.  I guess I'll make one for "we set accept to */* somewhere, somehow"15:51
cdentefried: it's requests: default_headers() in requests.utils15:54
cdentit's a pretty reasonable default15:54
efriedcdent: Which would get set if not otherwise set.15:54
cdentso the funkery, presumably, is that additional_headers has gone wild?15:55
efriedcdent: Does that mean that the aforementioned patch (to set application/json if unspecified) will never be hit, if the client is using requests?15:55
efried...because accept will never be unspecified15:55
efriedbecause requests defaults it to */*15:55
cdentright, which is why I made that bug and am fixing it15:55
efriedokay.  I'm still trying to figure out how additional_headers gets blanked.15:55
efriedcdent: ahshit.  It's the NoAuthReportClient in the test setup.15:57
cdentwuh?15:57
efriedcdent: We're not actually going through SchedulerReportClient._create_client15:58
efriedhence not setting the additional_headers.15:58
efriedin the test case.15:58
efriedwhich probably means this works fine IRL.15:58
cdentah. okay.15:58
cdentheh, I read right past that when looking before :(15:59
cdentthe fix I'm working on is still worth doing because there will be other clients, always15:59
efriedight16:00
openstackgerritChris Dent proposed openstack/nova master: [placement] default to accept of application/json when */*  https://review.openstack.org/56863016:01
efried+216:14
cdentthanks16:15
cdentedleafe: for the record, in case it wasn't clear, efried's the catcher on that accept fix. I'm just the labor.16:21
openstackgerritEric Fried proposed openstack/nova master: Use placement.inventory.inuse in report client  https://review.openstack.org/56863916:30
efriedcdent, jaypipes: ^16:30
cdentexciting16:30
*** e0ne has quit IRC16:35
openstackgerritMatt Riedemann proposed openstack/nova stable/queens: Don't reschedule on RequestedVRamTooHigh errors  https://review.openstack.org/56864216:55
edleafecdent: yeah, I was reading the discussion17:02
mriedemwhy isn't "POST /resource_providers/UUID/inventories" in the API reference again?17:05
cdentmriedem: if I remember right it was because it was decided it was wrong17:07
cdentin the sense that if you want to set just one class of inventory, then PUT to ../inventories/{class}17:07
cdentmriedem: I can probably dredge up some of the discussion if you're interested17:08
mriedemok https://review.openstack.org/#/c/568613/ was calling it out so i was confused at first because it's not in the API reference17:08
mriedemi know jichen had a patch to add it to the api reference and it was nacked17:09
mriedemas a dirty secret17:09
cdentYeah, I havent got the reasons for the 'dirty' in my current memory17:09
mriedemhttps://review.openstack.org/#/c/512215/17:10
openstackgerritMerged openstack/nova stable/queens: Added ability to configure default architecture for ImagePropertiesFilter  https://review.openstack.org/56857517:10
openstackgerritMerged openstack/nova master: Update auth_url in install docs  https://review.openstack.org/56800217:11
mriedemmaybe we should use this opportunity for vdrok's microversion to remove the POST inventories endpoint17:11
cdentmriedem: that would require, I suppose, figuring out why it is dirty (I suspect I didn't think it was)17:12
cdent(since I made it)17:13
mriedemthe comment from jay in that review explains why17:13
cdentmriedem: hmm, yeah, I never really agreed with that. It was pretty handy back when I was scripting creating shared disk resource providers (something that one of the very early rp specs said was a thing we should do: sample cron jobs of such things)17:16
openstackgerritMerged openstack/nova master: Add INVENTORY_INUSE to DELETE /rp/{u}/inventories  https://review.openstack.org/56857817:16
cdentIt's not actively dangerous17:16
cdentthe empty response POSTs for creating stuff are really nice for scripting, less nice for things like ProviderTree17:18
efriedand we can't remove it17:30
edleafewe can't?17:31
efriedHow could we?  Let's say we remove it in 1.26.  Then we would have to eventually bump the minimum version past 1.26 in order to remove it.17:35
efriedand bumping the minimum is something we've said we'll never do.17:35
edleafenever say never17:36
edleafe410 to the rescue!17:37
efriedIn any case, we have at least one consumer who claims it's useful, so I don't see why we should remove it.17:38
cdentIf we bump the min, that should be a major, and if we're going to a major, we may as well rewrite the api at the same time, using what we learned, and if we're going to do that we should wait for a few years to actually learn something17:38
efriedcdent: I responded on https://review.openstack.org/#/c/568639/ -- I'm gonna rebase it now, will look for your feedback.17:39
*** e0ne has joined #openstack-placement17:39
cdentroger17:39
openstackgerritEric Fried proposed openstack/nova master: Use placement.inventory.inuse in report client  https://review.openstack.org/56863917:41
efriedrebase only ^17:42
cdentefried: I wrote a noval in response17:56
cdentheh that's a great typo17:56
cdentno val17:57
cdentperhaps17:57
cdentI want one of these for running the nova tests: https://cloudplatform.googleblog.com/2018/05/Introducing-ultramem-Google-Compute-Engine-machine-types.html18:01
mriedemwe could deprecate the api, i.e. cap it at a given microversion so everything past that gets a 404 back18:06
cdentyes, we could, but why bother?18:13
jaypipesmriedem: but we can never do that. because, well, we just can't apparently.18:15
edleafebecause it would break cdent's fridge18:18
* mriedem backs away slowly18:18
*** e0ne has quit IRC18:20
jaypipesmriedem: you KNOW cdent has a fridge running placement, right?18:20
jaypipes:)18:20
openstackgerritEric Fried proposed openstack/nova master: Use placement.inventory.inuse in report client  https://review.openstack.org/56863918:20
openstackgerritEric Fried proposed openstack/nova master: Use placement.inventory.inuse in report client  https://review.openstack.org/56863918:20
efriedcdent: Good discussion.  Removed comment in errors.py.  Left import in report client.18:21
*** gjayavelu has joined #openstack-placement18:26
cdentjaypipes: all these resource providers are yours except europa18:27
cdentor, fo ra different turn: I did all this, even the fridge, for you.18:27
openstackgerritmelanie witt proposed openstack/nova-specs master: Propose counting quota usage from placement and API database  https://review.openstack.org/50904218:28
efriedjaypipes: Seems like you've got the best handle on why we want to set reserved=total rather than deleting inventory; maybe you could provide words for vdrok at https://review.openstack.org/#/c/568613/3/specs/rocky/approved/allow-reserved-equal-total-inventory.rst@19 ?18:28
*** e0ne has joined #openstack-placement18:35
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for resource providers inventories  https://review.openstack.org/56866618:37
jaypipesefried: tried my best.18:47
efriedjaypipes: cool man18:47
openstackgerritmelanie witt proposed openstack/nova-specs master: Propose counting quota usage from placement and API database  https://review.openstack.org/50904218:49
cdentjaypipes: is the consumer gen stack stable and ready for re-review?18:52
jaypipescdent: yes.18:54
cdentrad, will go back to that either a bit later, or before you wake up tomorrow18:55
jaypipescool, thx18:57
cdentefried: except for queued_for_delete19:03
efriedcdent: wha?19:04
cdentqueued_for_delete is why consumer_count in /usages won't work19:04
*** e0ne has quit IRC19:04
efriedcdent: What's queued_for_delete?19:04
efriedas in, what does it do?19:05
cdentefried: it's from the referenced spec:  https://blueprints.launchpad.net/nova/+spec/handling-down-cell19:05
*** e0ne has joined #openstack-placement19:07
efriedcdent: Is the point that queued_for_delete instances should *not* be counted against quota?19:07
cdentactuall spec here: https://review.openstack.org/#/c/557369/19:07
cdentefried: that's my understanding based on line 162 of  https://review.openstack.org/#/c/509042/3/specs/rocky/approved/count-quota-usage-from-placement.rst19:08
cdentI'm guessing the deal there is that if you try to delete something, and it is currently unable to be deleted beause the cell is down, we should mark it as queued and you should be able to create a new instance somewhere else19:09
efriedcdent: Roger that.  Wonder if we should go ahead and delete the allocations from placement at that time instead of whenever the cell comes back up.  <== melwitt19:10
cdentperhaps they are allowed to change their minds?19:10
cdentI suspect there's PTG context here that I'm now aware of (was probably gone from the nova room by that point)19:11
efriedcdent: Are there other reasons we can't assume consumer == instance?19:11
cdentefried: btw, I'm not suggesting that more info isn't needed in the spec to address these questions, just trying to fill in some blanks19:11
efriedappreciate that.19:12
cdentwell, placement is generation tracker of resource providers and consumption of those resources19:12
cdentwe have no idea what people might track in placement19:12
cdentefried: this is _exactly_ the thing I was trying to say in the novel about not fully buying the "why" of being an HTTP api19:12
efriedI think it's reasonable for a particular client to make assumptions about who's using its instance of the placement service, though.19:13
efriedi.e. nova can assume your fridge isn't going to use its instance of the service.19:13
efriedand therefore *nova* assuming that an instance is a consumer is a reasonable thing -- unless that's not true in some scenario, which is what I'm trying to figure out.19:14
efriedlike is there a neutron thing where an allocation belongs to a port or some such weirdness?19:14
cdentthat's a horrible assumption19:17
cdentthat nova has an instance of placement is totally contrary to the idea of having a placement service19:17
cdentit is openstack's placement service19:17
cdentnot nova's19:17
cdentotherwise how do neutron and nova and cinder conspire to have shared and nested providers19:18
melwittefried: yeah, that I'm not 100% sure about for queued_for_delete, whether that's a time we should go ahead and delete the allocations19:18
cdentsimilarly some cloud may decide that they want to have whatever resource provider because they are aware of this useful thing called placement19:19
cdentthe gist is: it's not nova's and we should not design in any way that assumes that nova is the only writer19:19
efriedcdent: Okay, I can buy that.  Thanks for the perspective.19:19
cdenteven if it were that the case that nova is the only writer, to assume so would be bad design19:20
cdentefried: In many cases, I'm happy to accept that my assertions are merely perspective, but in this case I'm simply right and I will die on a hill for this one (and probably only this one)19:20
efriedWhich means we could get a list of consumer_uuids and intersect it with the list of instances from the nova db to get the set of consumer IDs that actually *are* instance UUIDs.19:21
efried...which will just end up being the list of instances from the nova db.19:21
efriedSo there's no point.19:21
cdentright19:21
melwittif we're going to use instance UUIDs where queued_for_delete=False as the instance count, then we would have to delete the allocations in placement upon queued_for_delete=True if instance count and CPU/RAM are going to be in sync19:25
melwittotherwise we'd have instance count decreased once a delete is requested but the CPU and RAM that go with it would stay allocated. just thinking aloud19:25
efriedmelwitt: That was my thought.  I've concluded (with cdent's help) that it doesn't buy you anything for this particular bp, but it may be useful for other stuff if you were to remove the allocations as soon as it's actually possible rather than having to wait until the cell comes back.19:27
openstackgerritsunku ranganath proposed openstack/nova-specs master: Submitting blueprint describing usage of resource management daemon to control and use cache as a resource  https://review.openstack.org/56867819:27
efriedmelwitt: The existing deletion code would simply have to tolerate whatever "already deleted" looks like from placement - which it may already do.19:28
melwitthm, yeah19:28
cdentit should already be tolerant19:28
efriedit actually isn't, which is a tad annoying.19:30
cdentwhich part do you mean when you say "it"?19:30
efriedThe report client code.19:30
efriedactually19:31
efriedI take it back.19:31
cdentserver too19:31
efriedPUT /rp/{u}/inventories json={} will work even if there are no inventories there.19:31
efrieds/work/return 2xx/19:31
openstackgerritMatt Riedemann proposed openstack/nova master: Implement granular policy rules for placement  https://review.openstack.org/52442519:32
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for /resource_classes*  https://review.openstack.org/56557819:32
efriedSo yeah, it should be transparent from that perspective.19:32
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for resource providers inventories  https://review.openstack.org/56866619:32
efriedmelwitt: fyi19:32
cdentI reckon DELETE /allocations/{uuid} not being idempotent is a bug, but since that's not what's used in the report client, nbd19:32
efriedthat's *why* we removed it from report client.19:32
cdentnot _that_ kind of idempotent19:32
efriedMeaning DELETE when nothing there == DELETE when something there ?19:33
cdentI mean the resty kind of idempotent which is that if you delete once and it works, the second time you try to delete the same thing it should return the same response code19:33
efriedI don't know that answer, but yeah, moot.19:33
edleafeI always understood DELETE as meaning "make sure that there aren't any of these things around"19:35
edleafeSo DELETE twice should be idempotent19:35
cdentedleafe: you wanna make a bug?19:36
efriedLooks like we all hope that would be the case, but not sure if there's any proof.19:36
efriedI can find out pretty quick.19:36
* edleafe reads back more19:36
cdentthe code is wrong19:36
efriedAt least this form is not idempotent: DELETE /resource_providers/$ENVIRON['RP_UUID']/inventories/IPV4_ADDRESS19:37
efriedwe have a gabbit that does ^ twice, second time 404s19:37
melwittyeah, sometimes delete is idempotent and sometimes not. like if you try to delete an instance that has already been deleted, I think you'd get a 40419:37
efriedAh, but this form is good: DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories19:37
openstackgerritZack Cornelius proposed openstack/nova-specs master: Libvirt file backed memory  https://review.openstack.org/56370419:38
cdentyay, inconsistency!19:38
efriedSee inventory.yaml L67419:38
efriedWell, I don't think that's wrong, tbh.19:38
efriedThe former you're addressing a URI that represents an actual object.  If that URI represents something that doesn't exist, you should get a 404, nah?19:39
efriedUrgh, I can see it both ways, really.19:39
melwittsame. there are situations where either makes sense. so generally I've seen the low-level API return something different for "not found" and the caller ignores/doesn't treat as error "not found" in order to get idempotence19:40
melwittif it's an API that's going to be called multiple times potentially (example: volume detach)19:41
melwittbecause there are a lot of snags along the way that can ultimately fail the detach. then the user tries again later and steps that succeeded last time should be idempotent so they can complete the entire detach flow19:41
efriedmelwitt: Well, to summarize this case, we should be good regardless because we're not using DELETE at all - we're using PUT {}, which is idempotent.19:43
edleafeefried: that was the point I was making. DELETE isn't an action; it's a request to set a state19:43
melwittah, I see19:43
efriededleafe: Yeah, which is confusing because it's a verb.19:43
edleafethey're all verbs :)19:44
efriededleafe: If it meant "set the state such that this thing is absent" it should really be called ABSENT (which isn't a verb).19:44
efriededleafe: I get it, I'm just being pedantic.  DELETE only means "set state to absent" in HTTP.19:44
efriedotherwise it means: delete.19:44
edleafeefried: you'll have to take that up the HTTP RFC folks19:44
efriedmy point is, you can see why not everyone automatically knows/assumes DELETE should be idempotent in this sense when consuming (or for that matter, creating) an API.19:45
edleafeIdempotence refers to the state of the resource *after* the call is completed, so you can have a 204 followed by a 404 and still be idempotent19:47
* cdent returns from phone call19:56
cdentthat's a very good point edleafe and, of course, right. delete once and it is still deleted after that but it is now gone. That's how it should be. I'm clearly worn out after dying on a hill, and/or spread too thin.19:57
edleafecdent: if you actually died on that hill, you wouldn't be worn out, but rather resting in peace :)19:58
cdenttrying to die?19:58
*** e0ne has quit IRC20:02
*** efried has quit IRC20:07
*** efried has joined #openstack-placement20:17
cdent'night all20:29
*** cdent has quit IRC20:29
openstackgerritsunku ranganath proposed openstack/nova-specs master: Use resource management daemon to manage cache as a resource  https://review.openstack.org/56867820:31
*** e0ne has joined #openstack-placement20:35
openstackgerritMerged openstack/nova stable/queens: libvirt: Report the virtual size of RAW disks  https://review.openstack.org/56836320:36
*** e0ne has quit IRC20:40
openstackgerritMatt Riedemann proposed openstack/nova master: Add retrying to requirements.txt  https://review.openstack.org/56869220:50
openstackgerritsunku ranganath proposed openstack/nova-specs master: Use resource management daemon to manage cache as a resource  https://review.openstack.org/56867820:52
openstackgerritMerged openstack/nova master: Remove mox in tests/unit/api/*/test_volumes.py  https://review.openstack.org/56465520:56
openstackgerritmelanie witt proposed openstack/nova-specs master: Add additional information for z/VM spec.  https://review.openstack.org/56215421:15
openstackgerritsunku ranganath proposed openstack/nova-specs master: Use resource management daemon to manage cache as a resource  https://review.openstack.org/56867821:25
openstackgerritMatt Riedemann proposed openstack/nova master: Implement granular policy rules for placement  https://review.openstack.org/52442521:27
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for /resource_classes*  https://review.openstack.org/56557821:27
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for resource providers inventories  https://review.openstack.org/56866621:27
*** avolkov has quit IRC21:28
*** efried has quit IRC21:35
openstackgerritsunku ranganath proposed openstack/nova-specs master: Use resource management daemon to manage cache as a resource  https://review.openstack.org/56867821:36
*** edmondsw has quit IRC21:52
*** edmondsw has joined #openstack-placement21:53
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for usages  https://review.openstack.org/56870621:54
*** efried has joined #openstack-placement21:55
openstackgerritMatt Riedemann proposed openstack/nova master: Add granular policy rules for usages  https://review.openstack.org/56870621:55
*** mriedem is now known as mriedem_afk21:55
*** edmondsw has quit IRC21:57
openstackgerritsunku ranganath proposed openstack/nova-specs master: Use resource management daemon to manage cache as a resource  https://review.openstack.org/56867822:00
openstackgerritEric Fried proposed openstack/nova master: Debug logs for allocation_candidates filters  https://review.openstack.org/56871222:30
openstackgerritEric Fried proposed openstack/nova master: Use GET.get instead of GET.getall in alloc-cands  https://review.openstack.org/56871322:35
openstackgerritZack Cornelius proposed openstack/nova master: Implement file backed memory for instances in libvirt  https://review.openstack.org/56787622:57
*** edmondsw has joined #openstack-placement23:29
*** edmondsw has quit IRC23:34

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!