| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-02-28 | |||
| 14:49:42 | johnthetubaguy | mdbooth: but why not guard the count with a regular lock? with eventlet I can't see there being much of a gain between the two, and one is more obviously "OK ish" | |
| 14:49:54 | johnthetubaguy | I am probably missing something big | |
| 14:50:35 | mdbooth | johnthetubaguy: Yeah, so I want to wait until the in-use count reaches zero. | |
| 14:50:46 | mdbooth | I take the lock | |
| 14:50:51 | mdbooth | It's not zero | |
| 14:50:55 | mdbooth | What do I do? | |
| 14:51:12 | mdbooth | This is exactly what the Condition api is for | |
| 14:51:30 | johnthetubaguy | mdbooth: ah, so its because you want to wait rather than just sleep or something dumb like that, thats what I was missing | |
| 14:51:49 | mdbooth | Yeah, otherwise you have to drop the lock and poll | |
| 14:52:09 | mdbooth | That uses more resources, and it's more complicated | |
| 14:52:22 | mdbooth | And there's an existing API which designed for exactly this | |
| 14:52:39 | johnthetubaguy | mdbooth: we could just do callbacks on triggers I guess? | |
| 14:52:51 | mdbooth | That's not sounding simpler :) | |
| 14:53:04 | mdbooth | Condition gives us: wait until X is true | |
| 14:53:10 | openstackgerrit | Jay Pipes proposed openstack/nova master: placement: ironic inventory reporting https://review.openstack.org/437602 | |
| 14:54:51 | mdbooth | johnthetubaguy: I also wrote a slightly funky test library for this, btw | |
| 14:54:56 | sdague | mriedem: thank you for sharing | |
| 14:55:08 | mdbooth | It's in that patch, but it's entirely generic | |
| 14:55:30 | mdbooth | It allows you to insert arbitrary wait points in test code so you can force race conditions | |
| 15:03:28 | openstackgerrit | Sylvain Bauza proposed openstack/nova master: Fix default_availability_zone docs https://review.openstack.org/438887 | |
| 15:03:45 | sfinucan | mdbooth: The fact that your Red Hat email isn't also mdbooth annoys me | |
| 15:04:00 | sfinucan | mriedem: That run_tests patch you requested is here https://review.openstack.org/#/c/437947 | |
| 15:05:13 | johnthetubaguy | mdbooth: maybe the bit I am not getting is why you have to reset the state when you loose connection to libvirt? | |
| 15:14:28 | mdbooth | johnthetubaguy: That was originally danpb's suggestion. It's a robustness measure. | |
| 15:14:49 | mdbooth | johnthetubaguy: We need to tie initialisation to host_up anyway, because initialisation uses the libvirt connection. | |
| 15:15:01 | johnthetubaguy | yeah, host up makes sense | |
| 15:15:07 | mdbooth | So re-initialising it after host_down is no great complication. | |
| 15:15:08 | johnthetubaguy | just seems odd to drop it | |
| 15:15:28 | mdbooth | johnthetubaguy: Well, if libvirt went down we don't really know what happened. | |
| 15:16:06 | mdbooth | That doesn't really complicate the code all that much, anyway, as it's separate in the manager | |
| 15:17:24 | bauzas | jaypipes: around ? | |
| 15:17:43 | bauzas | jaypipes: I have a question for you before +Wign https://review.openstack.org/#/c/376198/11 | |
| 15:18:24 | mdbooth | The code is especially paranoid as it's reference counting. We want to do our best to be correct, even if operators are doing unexpected things underneath us, or things are crashing. | |
| 15:18:41 | bauzas | jaypipes: ie. we set the collation to latin1 encoding, I guess it's for memory reasons, right? | |
| 15:19:19 | bauzas | I just wonder if that's really worth it in case we would need to add another column needing utf8 encoding, like a description TEXT field | |
| 15:20:34 | jaypipes | bauzas: gimme a bit.. back to back meetings | |
| 15:20:43 | bauzas | heh, no worries | |
| 15:21:10 | mriedem | bauzas: before you go approving that code, | |
| 15:21:11 | mriedem | https://blueprints.launchpad.net/openstack/?searchtext=resource-provider-traits | |
| 15:21:15 | mriedem | can we get the bp actually approved? | |
| 15:21:34 | bauzas | oh very good point | |
| 15:21:49 | bauzas | was there a spec reproposed ? | |
| 15:22:09 | mriedem | https://review.openstack.org/#/c/345138/ | |
| 15:22:12 | bauzas | there it is https://review.openstack.org/#/c/345138/ | |
| 15:22:14 | bauzas | yeah | |
| 15:23:00 | bauzas | here is the thing, given it would take more time for that as we haven't previously approved the spec | |
| 15:23:17 | bauzas | mriedem: I would then wonder if it would be worth decoupling that spec into 2 pieces | |
| 15:23:30 | mriedem | i haven't read the spec, | |
| 15:23:31 | spotz | Hey nova, anyone about who could review the doc we're working on for the placement API and cells and give feedback? We can't build instances so we're missing something https://review.openstack.org/#/c/438328/ | |
| 15:23:33 | bauzas | mriedem: one would be the the basement piece we agreed as the top prio | |
| 15:23:38 | mriedem | if it's the full hog of traits, then yeah probably | |
| 15:23:42 | bauzas | mriedem: the other would be exposing it thru the API | |
| 15:23:48 | mriedem | since we just need the piece to fix can_host | |
| 15:24:14 | mriedem | spotz: have you seen the docs in the nova devref? | |
| 15:24:28 | mriedem | https://docs.openstack.org/developer/nova/cells.html | |
| 15:24:33 | mriedem | https://docs.openstack.org/developer/nova/placement.html | |
| 15:24:59 | dansmith | spotz: also, kinda need to know the error you're hitting to know what you're missing | |
| 15:27:05 | spotz | dansmith: I'm getting the very unhelpful No valid hosts, I'm not sure what Brian got last night though | |
| 15:27:24 | dansmith | spotz: got host_mappings in the apidb? | |
| 15:28:41 | spotz | dansmith. Let me bring up the VM and double check | |
| 15:30:08 | spotz | dansmith: Nice call, table is empty | |
| 15:30:20 | dansmith | spotz: nova-manage cell_v2 discover_hosts | |
| 15:30:21 | dansmith | -v | |
| 15:32:19 | spotz | dansmith: Nada, not even with debug nova-manage --debug cell_v2 discover_hosts | |
| 15:32:40 | dansmith | spotz: got hosts actually registering with their cell db? | |
| 15:32:51 | dansmith | spotz: compute_nodes and services tables in the cell1 db | |
| 15:35:41 | spotz | dansmith: I thought so, but let me go back to the DB vs output from list_cells | |
| 15:36:02 | dansmith | spotz: -v should show you something at least I thought | |
| 15:36:15 | dansmith | spotz: like "checking cell foo" | |
| 15:36:57 | dansmith | yeah, confirmed | |
| 15:37:01 | spotz | dansmith: I have a nova_cell0 DB no cell1 DB | |
| 15:37:09 | dansmith | spotz: well that's a real problem :P | |
| 15:37:31 | spotz | dansmith: So our create_cell didn't work? | |
| 15:38:04 | dansmith | spotz: create_cell just tells nova where the db is for a given cell | |
| 15:38:16 | dansmith | spotz: you should have an apidb, a cell0 db, and a cell1 db | |
| 15:38:26 | spotz | dansmith: Ok so we're definitely missing steps, I do get this for list_cells though cell1 | 143df967-eb22-4d2c-baff-bfc2538816fd | | |
| 15:38:45 | dansmith | yeah, but that doesn't mean anything if you don't have a db to back it up | |
| 15:38:53 | dansmith | spotz: have you looked through our devref docs mriedem pointed to? | |
| 15:39:44 | spotz | dansmith: yeah that's where the steps came from | |
| 15:40:31 | dansmith | spotz: okay I see, you're doing both of those mappings with the same config, which means they probably point to the same place? | |
| 15:40:47 | dansmith | spotz: an unfortunate side-effect of the config file method for getting to this point :/ | |
| 15:41:00 | macsz | sfinucan: lol what about no :D | |
| 15:41:03 | dansmith | spotz: can you pastebin your cel_mappings table? | |
| 15:41:20 | spotz | dansmith: sure hang on | |
| 15:41:22 | macsz | sfinucan: and also from nose's docs: "nose itself supports python 3, but many 3rd-party plugins do not!" | |
| 15:41:43 | sfinucan | macsz: Who says we need plugins, eh? ;) | |
| 15:42:48 | spotz | dansmith: https://gist.github.com/spotz/42b9d15f016073458742268735644578 | |
| 15:43:12 | dansmith | spotz: oh, no you do have a cell1 db | |
| 15:43:24 | dansmith | spotz: in that db (nova) do you have services and compute_nodes? | |
| 15:45:03 | macsz | sfinucan: I have had enough of beers last week, so i can invest my friday's evenings to convert tox to nose, if you want it :P | |
| 15:45:29 | sfinucan | macsz: *testrepository to nose | |
| 15:45:33 | sfinucan | tox would stay | |
| 15:45:49 | spotz | dansmith: added as a comment on the gist | |
| 15:45:58 | macsz | sfinucan: ah, sorry, was focused on typing "beer" | |
| 15:46:18 | sfinucan | Ima take a look and see if it would even be possible. The testrepository library annoys me in many ways | |
| 15:46:24 | sfinucan | macsz: :D | |
| 15:46:38 | dansmith | spotz: cool, so can you show me the exact result of "nova-manage cell_v2 discover_hosts -v" ? | |
| 15:46:59 | spotz | dansmith: it didn't like -v as a switch when I tried earlier | |
| 15:47:09 | spotz | --debug gave no results to screen | |
| 15:47:39 | spotz | moved it but no help | |