Earlier  
Posted Nick Remark
#openstack-sdks - 2018-10-29
13:21:35 nmimi dtantsur: Thanks for the answer!
13:27:48 mordred yeah, that is a very true statement
13:46:27 frickler nmimi: iiuc the only possible workaround for your issue is to create a port in your network beforehand and pass that to the "create_server" call: "Requested security groups are not applied to pre-existing ports."
13:57:22 nmimi frickler: i will try it, thanks!
14:01:07 mordred frickler: ooh. that's a workaround we should maybe put into create_server
14:01:50 mordred like - make security_groups=False create a port and pass it in
14:03:05 mordred nmimi: also - you might want to try self.conn.create_server instead of self.conn.compute.create_server - it's a bit more complete, and its api is more stable
14:03:47 smcginnis There are probably those that expect that behavior, so if we did a workaround in create_server we would probably have to make it a --no-security-group arg or something.
14:03:48 frickler mordred: I don't think that we want to do that in the sdk, because you will not be able to clean up properly on deleting the server
14:06:08 mordred frickler: hrm. that is a good point
14:37:22 openstackgerrit Daniel Speichert proposed openstack/openstacksdk master: Added basic CRUD functionality around Host Aggregates https://review.openstack.org/609416
14:43:15 openstackgerrit Artem Goncharov proposed openstack/openstacksdk master: implement block-storage backup resource https://review.openstack.org/591445
15:11:02 wouterdb hi all, I'm getting started with openstacksdk. I wonder: how do I close the connection? each connection maintains a thread pool and I'm opening a LOT of connections.
15:11:32 wouterdb I couldn't find anything in the documentation or the source and I can't figure out the search function on the bug tracker
15:13:25 mordred wouterdb: I don't know that we have a close function - but the connection opening a threadpool piece will be going away soon, so that issue should solve itself
15:14:02 mordred wouterdb: that said- any reason you're opening a lot of connections instead of sharing a connection? you should be able to use one connection from many threads
15:14:46 mordred (we do that in nodepool at pretty large scale - it's built to handle that use case)
15:17:25 mordred wouterdb: for reference- this: https://review.openstack.org/#/c/604926/ is the upcoming patch to remove the internal creation of thread pools - as soon as I write some tests for the keystoneauth-side replacement we should be able to get that forward - the extra threads spawned are annoying even in the shared connection usecase, so using the existing parallelism of the calling context to handle
15:17:27 mordred concurrency should be an improvement for everybody
15:38:20 wouterdb mordred: I'm writing code that logs in to the same openstack using different users
15:48:52 mordred wouterdb: ah - gotcha. that makes sense
15:50:20 mordred wouterdb: well, this will get better in a few weeks. in the mean time, if it's killing you, you can pin back to < 0.18.0
15:50:58 mordred the thread-splosion was introduced in 0.18.0 - and should go away hopefully by 0.20.0
15:55:13 wouterdb ok, can I find the docs for that version somewhere?
15:57:12 wouterdb I try connection.identity.find_domain(domain) on the 0.17.2 and I get AttributeError: 'Proxy' object has no attribute 'find_domain'
16:00:06 mordred wouterdb: that sounds like you're getting the v2 version of the proxy - find_domain has been on the v3 proxy object since 2015
16:01:02 mordred wouterdb: you might want to set OS_IDENTIY_API_VERSION=3 - or in your clouds.yaml set identity_api_version: 3 - up until 0.18.0 this was all driven by config (0.18 switch to properly using discovery)
16:01:11 mordred (I'm sorry this is wonky for you right now)
16:08:57 wouterdb It is a bit unfortunate, I've been working at porting code from the old client to openstacksdk for a week, under the assumption they don't have a close function because they don't really consume any system resources. But now it turns out that they do. So I really can't use it, as I can't properly dispose of the threadpools (even in the 604926 patch set, there still is a thread pool and no close).
16:09:03 wouterdb
16:10:20 wouterdb I really liked th idea of the library, to have one (rather nice) interface, but it all seems a bit risky now.
16:14:01 mordred wouterdb: which threadpool is still there in 604926 ?
16:14:23 mordred wouterdb: also - we could add a close method for you pretty easily if that would help
16:19:30 wouterdb @mordred: close method would be great, threadpool is at https://review.openstack.org/#/c/604926/12/openstack/cloud/openstackcloud.py line 7848
16:19:58 wouterdb mordred: thanks for your help, I'll consider my options
16:20:51 kmalloc mordred: looking closely at the rate limit stuff in ksa today
16:21:01 kmalloc mordred: i think the code looks ok, but i want to run through it in depth
16:21:08 kmalloc make sure there are no surprises
16:21:17 kmalloc if it's good i think we should land/release this week
16:22:31 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Add close method to shutdown threadpool https://review.openstack.org/613976
16:22:31 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Replace TaskManager with a keystoneauth concurrency https://review.openstack.org/604926
16:22:57 mordred wouterdb: ^^ that should get you a close() that will also work with the new code
16:23:57 mordred wouterdb: also - that threadpool will only exist if you happen to upload swift LargeObjects
16:24:22 mordred aww. we lost wouterdb
16:25:32 mordred kmalloc: sweet - I need to write tests, but I think we should be able to do that within a week
16:26:08 kmalloc yeah.
16:26:38 kmalloc i expect i'll be able to score +1 (+2 tentatively, pending tests) or -1 with reasons soon
16:32:47 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Make Connection a context manager https://review.openstack.org/613978
16:32:47 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Replace TaskManager with a keystoneauth concurrency https://review.openstack.org/604926
18:38:35 openstackgerrit Daniel Speichert proposed openstack/openstacksdk master: Added image properties to Image class https://review.openstack.org/544544
18:50:06 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Use sdk for list_servers https://review.openstack.org/530770
19:47:57 openstackgerrit Merged openstack/openstacksdk master: Call pre/post run task calls from TaskManager.submit_task() https://review.openstack.org/613503
19:49:45 openstackgerrit Merged openstack/openstacksdk master: Add doc depends to tox releasenotes environment https://review.openstack.org/613504
20:42:26 smcginnis mordred, dtroyer: Any plans for a python-openstackclient release? I'd like to get https://review.openstack.org/609473 out there.
20:42:44 smcginnis Maybe a last 3.x release before merging those backwards incompatible patches I have out there?
20:44:23 dtroyer smcginnis: we can do a release… as far as switching to 4.x that's not happening quickly unless someone picks up the heavy lifting of all of the ksa & sdk-related auth stuff. there is an osc4 feature branch…
20:45:56 smcginnis dtroyer: OK, that's fine if those sit out there awhile. Not really time critical on that.
20:47:16 smcginnis dtroyer: Are there any high level docs on what's needed with the auth stuff? Not sure I would have time for something like that, but I might be willing to poke at it a bit if there's not too steep of a curve to get going.
21:21:02 mordred smcginnis, dtroyer: I've been planning on jumping in on the ksa/sdk stuff in the feature branch soonish
21:21:52 smcginnis mordred: Great. I can't commit to anything, but let me know if there's any way I can help with that.
21:22:08 mordred will do
21:44:09 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Fix latest flake8 issues https://review.openstack.org/614038
#openstack-sdks - 2018-10-30
01:57:25 openstackgerrit Vishakha Agarwal proposed openstack/python-openstackclient master: Modify the help message for 'registered limit set' https://review.openstack.org/609985
04:58:32 openstackgerrit Ian Wienand proposed openstack/openstacksdk master: Make delete_unattached_floating_ips return a count https://review.openstack.org/614075
05:06:49 openstackgerrit Ian Wienand proposed openstack/openstacksdk master: Make delete_unattached_floating_ips return a count https://review.openstack.org/614075
05:52:48 adriant mordred: I'm either hitting a really weird bug, or something stupid, but I can't use the SDK to list servers against our cloud anymore :/
05:53:59 adriant we are running nova still in Kilo though, so it's always possible that something there is a problem, but it's not that it errors, I just get back an empty list
05:54:48 adriant oh
05:54:49 adriant what
05:54:55 adriant it's calling the wrong region?!
05:55:48 adriant ok, nvm, found my issue
05:58:53 adriant yeah, nvm this code just doesn't make sese
05:58:57 adriant sense*
08:40:24 adriant mordred: well after being and idiot, there is now a new version of my silly interpreter tool, and i've updated the docs to mostly ignore that the per service client libraries exist.
08:52:01 openstackgerrit Artem Goncharov proposed openstack/openstacksdk master: implement block-storage backup resource https://review.openstack.org/591445
10:40:56 openstackgerrit wangqiang-bj proposed openstack/keystoneauth master: fix wrong spelling of "unnecessary" https://review.openstack.org/614178
11:12:05 openstackgerrit Artem Goncharov proposed openstack/openstacksdk master: implement block-storage backup resource https://review.openstack.org/591445
13:26:50 mordred adriant: yay!
13:42:23 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Filter ports in list_ports when batching is in effect https://review.openstack.org/614213
13:48:22 Shrews mordred: did we remove the old shade func tests in sdk?
13:48:42 mordred Shrews: no - they should still be there in openstack/tests/functional/cloud
13:48:49 Shrews oh yep
13:49:15 mordred Shrews: maybe before we retire we'll have all of that completely integrated
13:50:30 Shrews mordred: can we explore trying to have a func test for that before we merge? i mean, we're really just assuming it works
13:51:18 Shrews i might need to setup a devstack again to try to create a port in the down state
13:51:30 Shrews or maybe we could ask someone with actual knowledge of neutron
13:53:28 Shrews hrm, our unit tests don't even test passing filter
13:56:57 openstackgerrit Monty Taylor proposed openstack/cliff master: Don't try to run issubclass on non-classes https://review.openstack.org/614218
14:00:21 mordred Shrews: oh - totally. let's definitely add some tests
14:03:06 openstackgerrit David Shrewsbury proposed openstack/openstacksdk master: Filter ports in list_ports when batching is in effect https://review.openstack.org/614213
14:03:11 Shrews mordred: ^^ unit test
14:03:37 Shrews mordred: double check me, but passes locally for me
14:05:02 openstackgerrit Monty Taylor proposed openstack/cliff master: Don't try to run issubclass on non-classes https://review.openstack.org/614218
14:05:45 Shrews mordred: hrm, no. that passes on master when it shouldn't
14:05:46 Shrews :(
14:06:16 Shrews so i've done something wrong
14:11:24 mordred Shrews: that test tests that the query returns an unfilted list
14:12:04 mordred mock_neutron_port_list_rep is a list of ports that has non-down ports in it right?
14:12:11 Shrews mordred: it isn't asserting that the uri contains the filter params?
14:12:30 Shrews i thought assert_calls did that

Earlier   Later