16:00:14 #startmeeting Ansible Network Working Group 16:00:14 Meeting started Wed Mar 16 16:00:14 2022 UTC. 16:00:14 This meeting is logged and archived in a public location. 16:00:14 The chair is Qalthos. Information about MeetBot at https://fedoraproject.org/wiki/Zodbot#Meeting_Functions. 16:00:14 Useful Commands: #action #agreed #halp #info #idea #link #topic. 16:00:14 The meeting name has been set to 'ansible_network_working_group' 16:00:42 #topic Agenda https://github.com/ansible/community/issues/542 16:00:46 #link https://github.com/ansible/community/labels/network is where you can always find the latest agenda 16:00:51 #topic Core Updates 16:04:02 #info ansible.utils 2.5.2 was released last week, bringing some bugfixes to various ipaddr filters 16:05:15 #info We are still approaching a major release for all supported network collections, which is currently targeted for the end of April 16:05:56 It's been brewing for a while now, but I'm really excited for it to finally be released 16:07:21 That's all I have this week, let me know if there is something you have to say 16:07:25 #topic Open Floor 16:08:05 I'm looking for feedback on the PR I submitted here https://github.com/ansible-collections/ansible.utils/pull/146 to resolve the performance issue when interacting with large subnets. 16:09:09 #topic ipsubnet filter performance improvements (https://github.com/ansible-collections/ansible.utils/pull/146) 16:10:41 I've now looked at it, I don't have any specific feedback right now, but I don't see anything out of place 16:10:43 other than it "works" is it implemented in a way we'd like to see it done? should this be done in netaddr upstream and provide a new function for us to leverage in the plugin. should this be in a plugin_utils implementation for use in other plugins? should it get merged? that kind of stuff 16:11:26 Thx qalthos 16:12:51 Can you get into a bit more detail on what you've done here? I recall the problem but I've only just seen the PR this morning 16:14:21 Yup no worries - so in v4 or v6 if you ask the ipsubnet filter to give you a specific subnet from a large subnet like the fourth /31 from a /8 it calls a generator from netaddr, creates a list and then accesses the fourth element in the list and returns it as a string. 16:14:55 My implementation uses math directly to calculate the fourth network of the requested size, constructs it as an IPNetwork object and returns the string 16:16:49 The generator works fine although inefficient even for small / simple requests but especially in v6 we're going to hear a lot more about networks like /64 (of /128) being carved up into small chunks like the reporting issue at /120. that leaves 2 ** (120 - (128 - 64)) networks in that generator and subsequent list 16:18:37 Since subnetting is just about splitting a 32 (v4) or 128 (v6) bit number into two pieces we can just math to solve the required puzzle in the filter 16:19:46 In an ideal world, I'd want that fixed in netaddr upstream, as it looks like the PR now just ignores the (otherwise very handy) subnet call available. But if we can work around it here we can at least fix the problem without waiting on another project. 16:22:39 In terms of organization, I don't think we need to break anything out into plugin_utils yet, but if you can make a reusable function to contain the subnet math and return an IPAddress (which I am assuming is what it would do?) that would make it easier if we did ever want to reuse it somewhere else 16:23:36 Ya even upstream I think we'd get or want a different function in that api as "subnet" very clearly is meant to be a list of the subnets. something like 'subnet_at(, )' could be added there and consumed by ansible.utils 16:23:54 Beyond that I'm seeing a lot of str() calls most of which should probably be to_text() if they're being returned 16:24:11 Ah good point - i'll check the str's 16:26:13 #action Qalthos put together a review of the things discussed here 16:26:34 thx 16:27:00 wayt: anything else you want from me for this PR? 16:27:10 nope just looking to get it off my brain plate :) 16:29:12 Alright. As a reminder, you can add things to the agenda issue (https://github.com/ansible/community/issues/542 which is also findable from the second link in the channel topic when a meeting isn't running) if there's anything you want to make sure we talk about in the next meeting 16:29:16 #topic Open Floor 16:29:53 Anyone else have anything they want to go over today? 16:39:25 Thanks for coming by! 16:39:28 #endmeeting