| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-02-15 | |||
| 21:58:02 | mriedem | it should just be the =None thing for the kwargs | |
| 21:58:14 | mriedem | and then probably a unit test to show that none of them are required except cell_uuid | |
| 22:00:16 | coreycb | mriedem, i think we can drop the 'if not' checks but should still pick up transport_url and db_connection from nova.conf if not passed as arguments | |
| 22:01:07 | mriedem | coreycb: why? | |
| 22:01:19 | mriedem | so that you don't have to use the command line? | |
| 22:01:33 | coreycb | mriedem, yes which is how create_cell works | |
| 22:01:51 | mriedem | dansmith: does object save() noop if the field values didn't actually change? | |
| 22:06:12 | melwitt | mriedem: I think all save() cares about is whether the fields on the object are dirty, if they are, it will save them | |
| 22:07:29 | dansmith | mriedem: depends on the implementation | |
| 22:07:40 | dansmith | mriedem: we used to try to make sure to not do anything if there were no changes, | |
| 22:07:52 | dansmith | but some people thought a save() should always have consistent refresh semantics | |
| 22:08:06 | openstackgerrit | Corey Bryant proposed openstack/nova master: Enable defaults for cell_v2 update_cell command https://review.openstack.org/434533 | |
| 22:08:09 | dansmith | so in the end I think we have no particular standard you can assume | |
| 22:09:09 | mriedem | coreycb: i left a comment in ps1 about updating the man page | |
| 22:09:19 | coreycb | mriedem, ok | |
| 22:09:44 | mriedem | otherwise it looks good | |
| 22:17:57 | openstackgerrit | Corey Bryant proposed openstack/nova master: Enable defaults for cell_v2 update_cell command https://review.openstack.org/434533 | |
| 22:18:14 | coreycb | mriedem, ok all set | |
| 22:21:03 | mriedem | lgtm | |
| 22:21:13 | mriedem | dansmith: melwitt: you guys should probably sign off | |
| 22:21:17 | mriedem | on ^ i mean | |
| 22:21:29 | dansmith | coreycb: yeah, sorry for missing that, I wrote that patch in a hurry for someone | |
| 22:22:09 | coreycb | dansmith, np at least that was an easy fix | |
| 22:22:21 | dansmith | coreycb: and now you feel like you were *partially* right, right? :P | |
| 22:22:42 | coreycb | dansmith, lol yes. redemption! :) | |
| 22:22:52 | dansmith | coreycb: but regardless, glad to see someone else poking at this stuff | |
| 22:56:10 | mriedem | coreycb: your unit test failed | |
| 22:56:28 | mriedem | http://logs.openstack.org/33/434533/3/check/gate-nova-python27-ubuntu-xenial/9e0c2cc/console.html#_2017-02-15_22_26_03_881971 | |
| 22:56:49 | mriedem | b/c of the config option thing | |
| 22:56:55 | mriedem | testtools.matchers._impl.MismatchError: 'fake:///db' != u'sqlite://' | |
| 22:57:20 | mriedem | i can fix it quick | |
| 23:00:49 | openstackgerrit | Alex Schultz proposed openstack/nova master: Add pxe support for libvirt https://review.openstack.org/434549 | |
| 23:02:44 | openstackgerrit | Matt Riedemann proposed openstack/nova master: Enable defaults for cell_v2 update_cell command https://review.openstack.org/434533 | |
| 23:09:35 | dansmith | melwitt: I'm having unclean thoughts about ways to fool the code after an rpc call into always being to the main database for our functional tests | |
| 23:11:21 | melwitt | dansmith: why? what problem running into? | |
| 23:11:47 | dansmith | melwitt: more cells-aware api calls and hitting the recursive lock thing | |
| 23:13:33 | melwitt | dansmith: that reminds me, I had meant to mention this to you but while I was working on the counting quotas stuff, I found I needed to add something to the CellDatabases fixture like this https://review.openstack.org/#/c/416521/13/nova/tests/fixtures.py@398 | |
| 23:13:47 | melwitt | I dunno if that will help at all with what you're dealing with | |
| 23:14:10 | dansmith | melwitt: heh, I have that same change locally ;) | |
| 23:14:14 | dansmith | melwitt: problem is, that doesn't make it over fakerpc, because it's not serialized | |
| 23:14:20 | melwitt | ah, dangit | |
| 23:14:56 | dansmith | melwitt: which is fine for real, but not here.. so my unclean thoughts were around hacking the serialization via mock and jamming a flag in there we could use to just say "this should always be main_context_manager" | |
| 23:14:57 | dansmith | or something | |
| 23:15:18 | dansmith | I guess just stashing the connection url would be better or something | |
| 23:15:27 | dansmith | but still, need a serialization hack | |
| 23:15:57 | melwitt | dansmith: what do you mean by "after an rpc call"? like after the rpc, you're left with the wrong db url? | |
| 23:17:16 | dansmith | melwitt: after an rpc call you have context.db_connection=None | |
| 23:18:03 | melwitt | that should fall back to main, right | |
| 23:18:23 | dansmith | it does, but it means we call get_context with that =None, which means we take the lock, | |
| 23:18:33 | dansmith | which we have to do because we need to use whatever target_cell has set global state to | |
| 23:19:35 | dansmith | oh and your change doesn't actually work for me, | |
| 23:19:41 | dansmith | because what I'm hitting is the recursion on the lock, | |
| 23:20:06 | bauzas | jroll: or others, any way to guess the hypervisor_hostname given a specific instance ? | |
| 23:20:10 | dansmith | so I have to do it before I take the lock, which is fine because the lock is just to protect global state, which isn't a problem if our context is targeted | |
| 23:20:22 | bauzas | I need to know the ComputeNode record related to a specific instance | |
| 23:20:55 | bauzas | but I don't have a specific helper method in the object module for that | |
| 23:21:26 | bauzas | mmmmpf | |
| 23:21:39 | bauzas | I can see a 'node' attribute | |
| 23:21:48 | bauzas | in the instance object | |
| 23:25:14 | melwitt | dansmith: I still don't understand the problem. it's failing to acquire the lock or it keeps recursing or? | |
| 23:25:36 | dansmith | fails to acquire the lock recursively yeah | |
| 23:27:55 | melwitt | I'm trying to remember how it tries to acquire it recursively. I know we talked about this a couple of months ago | |
| 23:28:10 | dansmith | well, this is a new way | |
| 23:28:22 | dansmith | let me continue my unclean quest and see if I get anywhere | |
| 23:28:28 | dansmith | and then you can crap all over it | |
| 23:29:25 | melwitt | heh, okay | |
| 23:32:22 | bauzas | calling it a day \o | |
| 23:34:39 | melwitt | dansmith: I guess it seems like it shouldn't be able to recurse unless a get_context_manager happened within a target_cell, or something | |
| 23:35:04 | dansmith | melwitt: right, but the target_cell sets ctxt.db_connection and then the rpc call removes it | |
| 23:36:23 | melwitt | dansmith: so you're within a target_cell, and then an rpc call occurs and returns, then something else does a db access and get_context_manager can't acquire the lock? all within one target_cell? | |
| 23:36:30 | dansmith | no | |
| 23:36:44 | dansmith | you're in a target cell, then inside the rpc call but your db_connection=None | |
| 23:36:55 | dansmith | no call/return | |
| 23:37:10 | melwitt | oh, on the "other side" | |
| 23:37:27 | dansmith | right | |
| 23:37:32 | melwitt | okay | |
| 23:38:53 | melwitt | yeah, something I played around with but got nowhere was I was trying to assign a default db url per service, so each would know its own default instead of doing the _last_ctxt_mgr thing | |
| 23:39:09 | dansmith | right, which is kinda this | |
| 23:39:13 | melwitt | so that things wouldn't blur across service boundaries | |
| 23:39:15 | melwitt | yeah | |
| 23:41:09 | openstackgerrit | Sujitha proposed openstack/nova master: Remove mox from nova/tests/unit/db/test_db_api.py https://review.openstack.org/434557 | |
| 23:43:24 | melwitt | dansmith: looking at my old notes I was trying to patch the rpc dispatch to slap the db url for the service onto the incoming context so all non target_cell db access would use it | |
| 23:43:45 | dansmith | right, that'd be one way, | |
| 23:43:58 | dansmith | but you have to then know what service you're in and what default connection it should be | |
| 23:44:08 | melwitt | but the hard part was trying to match up the service:url and I didn't find a good non-messy way to do that | |
| 23:44:10 | melwitt | yeah | |
| 23:44:11 | dansmith | whereas if we can make it stick during a target call... | |
| #openstack-nova - 2017-02-16 | |||
| 00:05:49 | dansmith | oh. snap | |
| 00:07:57 | openstackgerrit | STEW TY proposed openstack/nova master: Transform instance.resize_revert notification https://review.openstack.org/396811 | |
| 00:08:43 | melwitt | dansmith: good news? | |
| 00:08:56 | dansmith | melwitt: yes, you'll be crapping on it soon | |
| 00:09:04 | melwitt | haha, nice | |
| 00:09:13 | openstackgerrit | STEW TY proposed openstack/nova master: Transform instance.resize_revert notification https://review.openstack.org/396811 | |
| 00:16:12 | openstackgerrit | Dan Smith proposed openstack/nova master: Make start and stop admin actions cells-aware https://review.openstack.org/433362 | |
| 00:16:13 | openstackgerrit | Dan Smith proposed openstack/nova master: Make CellDatabases fixture work over RPC https://review.openstack.org/434563 | |
| 00:16:16 | dansmith | melwitt: ^ | |
| 00:20:08 | melwitt | dansmith: looks pretty good to me, actually. it's self-contained and makes it clear what's happening | |
| 00:20:10 | dansmith | melwitt: it works for my test, but haven't checked to see if it breaks anything else just yet | |
| 00:20:39 | dansmith | \o/ | |
| 00:29:37 | dansmith | heh, so many unit tests pass None for the context so I'll have to be defensive there | |