| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-01-16 | |||
| 21:11:36 | bauzas | jaypipes: okay, then I'll continue to keep my change up-to-date then | |
| 21:11:58 | bauzas | it'll just be a top change, not a dependent one | |
| 21:12:04 | jaypipes | bauzas: I'd prefer composition over inheritance as I mentioned before, and keep state in separate objects (i.e. not the PlacementClient class itself but the object that contains a PlacementClient object) | |
| 21:12:39 | bauzas | jaypipes: composition is already in the last PS | |
| 21:12:42 | bauzas | AFAIR | |
| 21:12:49 | bauzas | unless I forgot to upload it | |
| 21:14:46 | bauzas | jaypipes: state of what? it's mostly stateless if you except the disabled thing | |
| 21:15:08 | jaypipes | bauzas: I mean the _resource_providers dict. | |
| 21:15:22 | bauzas | jaypipes: in that case, it's fine, I left that | |
| 21:15:29 | jaypipes | bauzas: I would prefer that not be in the PlacementClient. That should be in the ReportingClient, yes? | |
| 21:15:40 | bauzas | correct | |
| 21:15:43 | jaypipes | cool | |
| 21:15:51 | bauzas | jaypipes: https://review.openstack.org/#/c/417111/7/nova/scheduler/client/report.py is pretty seamless | |
| 21:16:26 | jaypipes | bauzas: oui. absolument. | |
| 21:16:49 | jaypipes | bauzas: though I'd change SafeConnectDecorator to @client.safe_connect :) | |
| 21:18:12 | bauzas | jaypipes: but I need to keep a state, hence the deco object :) | |
| 21:19:47 | jaypipes | bauzas: you could just look for a consistently-named attribute, no? | |
| 21:20:38 | bauzas | jaypipes: I could use a global var | |
| 21:21:35 | jaypipes | bauzas: or a consistently-named attr :) | |
| 21:22:22 | jaypipes | bauzas: else you could require classes to implement a get_placement_client() method. | |
| 21:22:27 | jaypipes | bauzas: or something like that. | |
| 21:22:29 | mriedem | dansmith: hmm, should create_cell sync the db schema for that cell? | |
| 21:23:00 | bauzas | jaypipes: I thought of the latter | |
| 21:23:16 | bauzas | jaypipes: anyway, I'll see | |
| 21:24:28 | openstackgerrit | Dan Smith proposed openstack/nova: WIP Move instance creation to conductor https://review.openstack.org/319379 | |
| 21:24:46 | dansmith | mriedem: hmm, I dunno.. | |
| 21:24:54 | dansmith | maybe optional? --sync-that-mofo-too? | |
| 21:25:44 | mriedem | yeah because the problem is running nova-manage db sync on my subnode cell | |
| 21:27:59 | mriedem | dansmith: fuck i've been doffm'ed https://github.com/openstack/nova/blob/7cb416546a2c6d8eb36cbf9acfde776d54a26811/nova/cmd/manage.py#L630 | |
| 21:28:20 | dansmith | mriedem: um, congrats? | |
| 21:28:32 | mriedem | just looks like we thought about this before | |
| 21:28:51 | mriedem | so to sync this db i have to hack the nova.conf | |
| 21:29:06 | mriedem | otherwise it's going to be pointing at the nova db connection on the primary node | |
| 21:29:40 | dansmith | mriedem: you could make that work for other cells easily, right? | |
| 21:29:53 | dansmith | just list all the mappings and target them before sync like cell0 does | |
| 21:29:53 | mriedem | yeah we just get all the cell mappings and sync them | |
| 21:31:17 | mriedem | the note here seems wrong https://github.com/openstack-dev/devstack/blob/master/lib/nova#L687 | |
| 21:31:46 | mriedem | nova-manage db sync is just going to sync the local main db, or whatever is in CONF.database.connection | |
| 21:32:31 | dansmith | yeah | |
| 21:32:36 | mriedem | today we're getting cell0 synced b/c of https://github.com/openstack-dev/devstack/blob/master/lib/nova#L950 | |
| 21:32:43 | dansmith | mriedem: could also make db sync take a cell uuid or osmeting | |
| 21:33:15 | mriedem | so in the cells v1 case i don't see where we even sync the cell0 db | |
| 21:33:39 | dansmith | the cellsv1 case? | |
| 21:33:51 | mriedem | this https://github.com/openstack-dev/devstack/blob/master/lib/nova#L951-L956 | |
| 21:34:05 | dansmith | map_cell0 does it | |
| 21:34:25 | mriedem | umm, | |
| 21:34:39 | mriedem | nope | |
| 21:34:40 | mriedem | https://github.com/openstack/nova/blob/7cb416546a2c6d8eb36cbf9acfde776d54a26811/nova/cmd/manage.py#L1157 | |
| 21:34:44 | mriedem | it creates the cell0 mapping | |
| 21:34:46 | mriedem | but doesn't sync it | |
| 21:34:54 | dansmith | oh hmm, yeah | |
| 21:34:56 | dansmith | I thought it did | |
| 21:35:30 | mriedem | simple_cell_setup is the only one that does https://github.com/openstack/nova/blob/7cb416546a2c6d8eb36cbf9acfde776d54a26811/nova/cmd/manage.py#L1105 | |
| 21:35:33 | dansmith | wait, no.. the db sync does it for cellsv1 right? | |
| 21:36:01 | mriedem | as far as i can tell, db sync is going to just sync the 'main' db | |
| 21:36:18 | dansmith | no, it does cell0 and the main one | |
| 21:36:31 | dansmith | https://github.com/openstack/nova/blob/7cb416546a2c6d8eb36cbf9acfde776d54a26811/nova/cmd/manage.py#L635 | |
| 21:36:36 | mriedem | oh yeah | |
| 21:36:39 | dansmith | it queries for cell0 and does it, it just doesn't list | |
| 21:37:08 | mriedem | so, | |
| 21:37:13 | mriedem | i think i'm just going to address https://github.com/openstack/nova/blob/7cb416546a2c6d8eb36cbf9acfde776d54a26811/nova/cmd/manage.py#L630 | |
| 21:37:16 | mriedem | and do the cell mapping list | |
| 21:37:19 | mriedem | and sync those mofos | |
| 21:38:02 | mriedem | i mean we could also do this in create_cell easily | |
| 21:38:17 | mriedem | but it looks like we thought about a fanout sync in sync already | |
| 21:42:50 | dansmith | yeah, as long as you continue to honor --local-cell | |
| 21:42:56 | mriedem | i am | |
| 21:43:00 | mriedem | should have a WIP up shortly | |
| 21:43:02 | melwitt | hm, I'm having a problem where I want to do a get of instances across all cells using target_cell and utils.spawn, but it doesn't keep the targeted cell context that way | |
| 21:43:06 | mriedem | and then i'll depends-on that for this devstack patch | |
| 21:43:49 | melwitt | because of the utils.spawn. I wanted to do them all at the same time and wait on all of them to combine the results from each cell | |
| 21:46:42 | dansmith | melwitt: isn't there some magic about storing the current context in eventlet TLS? | |
| 21:46:55 | dansmith | I dunno why or what that is because we pass it everywhere, but... there's something | |
| 21:47:34 | melwitt | dansmith: I dunno but thanks for the hint. I'll see if I can find something related to that, because for now, I'm lost | |
| 21:49:23 | openstackgerrit | OpenStack Proposal Bot proposed openstack/nova: Updated from global requirements https://review.openstack.org/420844 | |
| 21:50:12 | melwitt | it uses the get_current() context from TLS, so that implies my target_cell modified context isn't in get_current(). makes sense because I don't think anything about target_cell saves the new targeted context to TLS | |
| 22:00:03 | openstackgerrit | Matt Riedemann proposed openstack/nova: Fanout the db sync to all cells if --local_cell is False https://review.openstack.org/420973 | |
| 22:03:32 | openstackgerrit | Matt Riedemann proposed openstack/nova: Add some cellsv2 setup docs https://review.openstack.org/420198 | |
| 22:03:32 | openstackgerrit | Matt Riedemann proposed openstack/nova: Fix the generated cell0 default database name https://review.openstack.org/420439 | |
| 22:04:15 | mriedem | dansmith: had to remove the dependencies on that bottom change b/c the stable/newton backports for the devstack/grenade changes were keeping it from merging | |
| 22:12:17 | dansmith | mriedem: ack, thansk | |
| 22:12:39 | mriedem | man the db sync stuff in devstack is getting a bit crazy | |
| 22:12:59 | dansmith | sync, sync, sync again, sure one more why not | |
| 22:13:19 | mriedem | and if we're counting, we'll have 4 dbs in the multinode job: nova_api, nova_cell0, nova (cell1), nova_subnode_cell (cell2) | |
| 22:13:34 | dansmith | well, four dbs for a multi-cell cloud.. not bad :) | |
| 22:13:44 | mriedem | and in pike we'll have the placement db :) | |
| 22:13:55 | mriedem | but at that point it's no longer nova so not our fault | |
| 22:15:48 | dansmith | yeah | |
| 22:17:06 | mriedem | ok here is the devstack change of doom https://review.openstack.org/420976 | |
| 22:17:19 | mriedem | i would be amazed if that worked on the first try | |
| 22:18:03 | dansmith | mriedem: well, we need the late discover_hosts even without trying to create another cell | |
| 22:18:06 | dansmith | don't you want to separate those/ | |
| 22:18:38 | mriedem | i could | |
| 22:18:52 | mriedem | and get less cute with the list_cells awk | |
| 22:19:36 | mriedem | yeah let me separate that quick, basically just if n-cpu; then discover_hosts | |
| 22:19:46 | dansmith | yeah | |
| 22:21:13 | openstackgerrit | Dan Smith proposed openstack/nova: WIP Move instance creation to conductor https://review.openstack.org/319379 | |
| 22:28:24 | mriedem | ok done | |
| 22:28:39 | mriedem | dansmith: here is the change you'll need https://review.openstack.org/#/c/420981/1 | |
| 22:29:00 | dansmith | thanks | |