Earlier  
Posted Nick Remark
#openstack-sdks - 2018-05-04
14:00:28 Shrews mordred: oh. well that's not confusing
14:00:34 mordred yah - it was terrible
14:00:37 mordred the CloudConfig ones originally called the OpenStackConfig ones
14:01:32 mordred BUT - if you're just working with CloudConfig objects that's awkward - so CloudConfig got fixed to not need the OpenStackConfig methods anymore - and in sdk OpenStackConfig doens't have the methods because they're silly
14:01:53 mordred and I totally missed keeping them for backwards compat in the occ patch
14:02:27 Shrews i'm not clear on the fix then
14:02:47 mordred adding them back to OpenStackConfig so that occ users who were using them don't break
14:10:25 Shrews mordred: how do you get from occ.OpenStackConfig to the osdk.CloudRegion where those calls are defined?
14:10:49 Shrews those calls seem like they should be region independent
14:11:19 Shrews or is it allowed to have different cache characteristics per region?
14:12:00 mordred no, you're right- it's region independent
14:12:14 mordred thing is - the CloudRegion is the primary thing people work with
14:14:06 mordred so - basically, the original change was to have the cache settings be actual constructor arguments to CloudRegion rather than having to pass an OpenStackConfig to CloudRegion
14:14:30 mordred get_one_cloud then started passing the values to CloudRegion when it created one
14:14:53 dmsimard mordred: how would you do a search_ports for a fixed_ip ?
14:15:22 mordred dmsimard: conn.search_ports(filters={'fixed_ip': blah}) I believe
14:15:29 dmsimard http://paste.openstack.org/show/720377/ doesn't seem to work
14:15:35 dmsimard mordred: it's nested under fixed_ips
14:15:53 dmsimard mordred: i.e, http://paste.openstack.org/show/720378/
14:16:15 mordred of course it is
14:16:31 mordred dmsimard: let's step back one - what are you trying to accomplish?
14:17:01 dmsimard mordred: are you sitting on something ?
14:17:15 dmsimard mordred: I need to add all the IPs from a subnet to another subnet's ports allowed-address-pairs
14:17:30 dmsimard basically make the ports of a subnet able to bind the ips from another subnet
14:17:39 mordred wow
14:17:42 mordred that's awesome
14:17:53 dmsimard It's not hard, just need to figure that one thing
14:18:54 mordred dmsimard: so - you have two choices ...
14:19:06 dmsimard https://github.com/openstack-infra/shade/blob/16e7290ff45ca6fa5d7ba7360575c38e0b0fd043/shade/openstackcloud.py#L6237-L6247 :/
14:19:37 Shrews shade only supports filtering dictionaries of dictionaries. lists of dictionaries are not supported
14:19:42 mordred dmsimard: you can pass a jmsepath string to filters - or you can do a list ports and filter yourself
14:19:42 Shrews yeah, that
14:20:10 mordred listing ports and filtering yourself is likely the easier thing
14:20:22 Shrews i forgot we added jmespath support
14:20:35 mordred but if you wanna play with the jmsepath supporT: http://jmespath.org/
14:20:52 dmsimard mordred: I can filter myself I suppose
14:22:00 mordred Shrews: how about this ...
14:22:31 Shrews mordred: if the fix is clear in your head, feel free to add a PS to my review
14:22:53 Shrews i apparently need more coffee to see it
14:23:13 mordred Shrews: oh - I already pushed up https://review.openstack.org/566322 (should have done it as a PS to yours)
14:24:13 mordred Shrews: that said - I'm thinking maybe we just revert and release that - then add some more tests/test jobs and try the ectomy again
14:24:26 mordred Shrews: since we're clearly missing some coverage on ansible impact of occ changes
14:24:42 dmsimard mordred: the thing is I need to create a port if there's no port for that ip address. Do you have an idea other than iterating through the ports and fixed_ips and creating them if they don't exist ?
14:24:58 Shrews mordred: possibly a good idea
14:25:15 mordred dmsimard: nope. I recommend brute force
14:25:38 dmsimard mordred: I wonder if I could blindly fire create_ports and basically pass on exception
14:25:44 dmsimard but that'd be kind of dirty
14:25:49 Shrews mordred: i'll abandon mine assuming the revert
14:26:15 dmsimard mordred: hmmm.. how does http://docs.ansible.com/ansible/latest/modules/os_port_module.html handle idempotency ?
14:27:18 openstackgerrit Monty Taylor proposed openstack/os-client-config master: Revert "Replace guts with openstack.config" https://review.openstack.org/566328
14:27:29 mordred Shrews: ^^
14:27:58 Shrews mordred: is that going to again break nodepool now that https://review.openstack.org/566138 *just* merged?
14:29:31 dmsimard mordred: looks like os_port basically relies on the name of the port.. which is not stupid
14:29:42 mordred Shrews: ugh. probably. we should get the followup patch fixed
14:29:57 pooja_jadhav mordred: Hi
14:31:02 mordred Shrews: maybe we should try the fix patch instead of the revert
14:32:45 Shrews mordred: your patch can't work i think. there is no self.get_cache_expiration_time()
14:33:09 Shrews mordred: that's only in CloudRegion, which is why i asked how to get to that
14:34:42 Shrews as are the _cache_* attrs
14:35:09 Shrews oh, no
14:35:13 Shrews wrong about the attrs
14:35:24 mordred the patch adds get_cache_expiration_time
14:35:48 Shrews oh duh
14:36:10 Shrews *sigh
14:36:36 Shrews mordred: ok, let's just try your patch first
14:37:06 mordred Shrews: yah - this *is* accessing private members of the osdk base class ... so we'll need to add some tests to occ (which we were obviously missing anyway) to make sure those methods continue to work
14:37:25 mordred we run occ tests on sdk patches, so that should prevent sdk patches from changing those private members
14:37:37 mordred and yes, that's terrible software engineering practice in general
14:40:57 openstackgerrit Monty Taylor proposed openstack/os-client-config master: Revert "Replace guts with openstack.config" https://review.openstack.org/566328
14:41:12 mordred Shrews: well, there's that (without merge conflict this time) in case we decide we want to go that route
14:46:08 Shrews mordred: i think the nodepool followup to use osdk is failing because osdk defines a get_cache_expirations() but shade is calling get_cache_expiration()
14:46:23 Shrews mordred: accidental pluralization there?
14:47:45 Shrews http://logs.openstack.org/58/566158/1/check/nodepool-functional-py35/45d52ed/controller/logs/screen-nodepool-builder.txt.gz#_May_04_05_56_28_537111
14:48:13 mordred Shrews: crap
14:48:22 mordred Shrews: the plural/singular is intentional
14:48:24 mordred but
14:48:44 mordred not particularly awesome for this transition
14:51:32 Shrews so i think pushing your occ patch, given that ^ which would require a new osdk release, is probably the thing to do now?
14:51:46 mordred yah
14:51:59 mordred and I'll also work on a shade patch to use osdk for config directly
15:11:21 openstackgerrit Monty Taylor proposed openstack-infra/shade master: Use openstack.config directly for config https://review.openstack.org/566340
15:11:24 mordred Shrews: ^^
15:55:14 dmsimard mordred: I got my thing to work. It's kinda dirty but I'll figure a better way later.
15:56:06 mordred dmsimard: ossum
15:56:28 mordred dmsimard: maybe at some point we should add a method to shade to be able to do the search you wanted to do
15:56:42 mordred dmsimard: since we also do it inside of shade - and there isn't a *good* way to do it otherwise
15:56:51 dmsimard mordred: in case you're curious: https://gist.github.com/dmsimard/6b21c9818878f8aacaf3ddaf63c669b3
15:56:57 dmsimard brb
16:05:02 mordred dmsimard: fwiw - in your setup logging function - you don't need to go through yaml - you can just build that dict directly in python and pass it to dictConfig (what you're doing obviously works - and I kind of like it from a readability perspective, but thought I'd mention just in case)
16:05:45 mordred dmsimard: other than that - neat!
16:06:07 openstackgerrit Matt Smith (_alastor_) proposed openstack/openstacksdk master: Adding block_storage v3 API support https://review.openstack.org/566355
16:07:31 dmsimard mordred: it's copy pasta from a boilerplate thing
16:08:15 openstackgerrit Matt Smith (_alastor_) proposed openstack/openstacksdk master: Adding block_storage v3 API support https://review.openstack.org/566355
16:09:23 mordred dmsimard: ++
16:18:08 dmsimard mordred: oh god, you can specify CIDRs in allowed_address_pairs and the mac address is optional T_T
16:18:14 dmsimard I was complicating my life for nothing
16:19:48 mordred dmsimard: \o/
16:20:00 openstackgerrit David Moreau Simard proposed openstack-infra/shade master: Add a description field for port_create, port_update https://review.openstack.org/566359
16:20:01 dmsimard I did find ^ though
16:20:04 mordred dmsimard: well - just think aboutall th ethings you learned

Earlier   Later