19:00:26 #startmeeting Core team public meeting 19:00:26 Meeting started Tue Jul 12 19:00:26 2016 UTC. The chair is nitzmahone. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:00:26 Useful Commands: #action #agreed #halp #info #idea #link #topic. 19:00:26 The meeting name has been set to 'core_team_public_meeting' 19:00:54 hi folks 19:00:57 * gundalow waves 19:01:02 * ttom waves 19:01:08 #chair ryansb gundalow 19:01:08 Current chairs: gundalow nitzmahone ryansb 19:01:15 thanks 19:01:28 hiya 19:03:17 * nitzmahone looks for unfinished business from last meeting 19:04:11 in the mean time, we discussed https://github.com/ansible/ansible/pull/16491 last meeting, and agreed that i'd remove the strategy and refie the callback plugin. So I did. how can I move this PR forward? 19:04:28 refie == refine 19:06:59 nitzmahone: I don't know anything about call backs. Who would be good to do an review of https://github.com/ansible/ansible/pull/16491 since ttom did the update that was requested last meeting 19:08:08 ttom: Who was it that asked for that jtanner and jimi|ansible ? 19:08:13 Whoever requested the update would probably be a good candidate 19:08:20 ? 19:08:21 * nitzmahone looks at log from last meeting 19:08:45 I think jimi|ansible and mattclay, but not sure. 19:09:45 i made tangential comments about the type of strategy i want for integration testing 19:09:54 not really relevant to current PR 19:09:59 Looks like it was jimi, but he's plenty busy. 19:10:15 I can take the review 19:10:35 #action nitzmahone to review #16491 19:10:40 Thanks :) 19:11:30 It sounds like 2.1.1 RC3 is a foregone conclusion- anybody want to advocate for high priority bugs that should be included? 19:11:41 thanks nitzmahone 19:11:43 s/bugs/fixes 19:14:46 dag: you here? 19:16:14 Looks like no. Might be a short meeting... 19:16:17 #topic open floor 19:16:38 so I can suggest a topic? 19:16:44 fire away 19:17:07 What do you guys think about modules storing state on managed hosts in special directories/files 19:17:22 when it's not possible to keep state in e.g. configuration file 19:17:29 or service memory or whatever 19:17:44 I think I speak for most of us on the core team that we'd be very hesitant to ship modules that did that. You of course are free to write whatever you want. :) 19:17:47 I had this discussion with bcoca and abadger1999 a few months ago 19:18:02 bcoca: was against it, abadger1999 was ok with it 19:18:03 I vaguely recall 19:18:12 yeah. 19:18:12 kustodian: do you have an example use case? 19:18:19 I wrote a module and submitted a pull request to extrast 19:18:21 yup 19:18:29 https://github.com/ansible/ansible-modules-extras/pull/2531 19:18:45 iptables module which keeps state in /etc/ansible-iptables 19:18:59 since iptables-save dump doesn't have enough information for the module to work correctly 19:19:15 maybe that's something we should put on the agenda for either core meetup or contributor summit or both. 19:19:29 and even if it does it would make it hard to put everything there and later parse it 19:19:42 i would think the distros have a persistent store of rules somewhere. i know EL did prior to firewalld 19:19:52 but also make it easy for a user changing iptables directly to f*** up something 19:19:53 yeah, adding stored state seems like a really big increase of the testing surface 19:20:00 My biggest concern with that (and I think other have mentioned as well) is that if changes are made out of band, the cached state will be wrong. Where when the state is gathered on the fly, it's much less likely for that to happen. 19:20:09 We do it already though... 19:20:15 For instance, the cron module 19:20:28 cron.d ? 19:20:33 isn't that just adding the #ansible comment to the crontab line? 19:20:37 Stores state about whether ansible added a cron entry or not. 19:20:38 yeah cron uses a comment 19:20:42 as a comment in the crontab 19:20:54 that's still just one store to rule them all though 19:21:00 I feel like that's different from a separate store 19:21:07 well the module has a locking mechanism 19:21:11 One store or multiple stores doesn't really feel any different to me. 19:21:25 You have the same usecases you're trying to satisfy and the same drawbacks. 19:21:45 i think we're being hesitant to have modules attempting to merge stores and keep track of priorities 19:22:07 (Look at recent bugs on the cron module from a user who wanted ansible to magically know that it should replace an existing, manual cron entry with its own) 19:22:13 I completely agree that if possible external store shouldn't be used, but sometimes it's not and because of that it's limiting the full potential of a module 19:22:26 I think that if you have a wrapper for iptables that manages it better (saves state) then you end up with the same issues (someoneusing regular iptables and mangles the state). 19:22:39 is /etc/sysconfig/iptables gone in the firewalld world? 19:22:42 this module doesn't have that problem 19:22:49 jtanner: it is 19:22:59 if you use firewalld you can use the firewalld module 19:23:05 but not everyone has and uses firewalld 19:23:14 Centos 6 for example 19:23:21 do the other distros have /etc/sysconfig/iptables equivalents? 19:23:29 some do, some don't 19:23:48 Debian doesn't even have an official store 19:23:51 what do they do on boot if no file holds the rules? 19:23:55 you either use iptables-persistent 19:23:57 We have old rhel5 servers, and anything that would better manage iptables would get a +1 from me 19:24:02 or write your own script which restores 19:24:24 this module works with C5, 6 and 7 (if you disable firewalld) 19:24:40 debian/ubuntu? 19:24:58 yup debian/ubuntu, no official way to make iptables persitent 19:25:03 lame. 19:25:10 I also thought that as well :D 19:25:30 We wanted to use https://github.com/debops/ansible-ferm but it only works on rhel6 and higher 19:25:34 iptables-persistent is the only way via package, but it doesn't come with core 19:26:09 MichaelBaydoun: check out this module I wrote a blog about it how we use iptables, you'll like it :) http://blog.nordeus.com/dev-ops/managing-iptables-with-ansible-the-easy-way.htm 19:26:12 this page (https://wiki.debian.org/iptables) claims there is a /etc/iptables.up.rules 19:26:49 jtanner: if you install iptables-persistent 19:26:50 is that not desirable because you have to then edit /etc/network/if-pre-up.d/iptables ? 19:26:50 So I'm supporting the pain, and like the solution, while at the same time not feeling great about the idea of storing state. And with that confusing feedback, I need to head to a meeting. 19:26:53 but not everyone uses it 19:27:22 I had a discussion with a debian user a few days ago about it :D 19:27:23 MichaelBaydoun: :-) 19:28:08 how do chef/puppet/salt store iptables rules on debian? 19:28:12 I'm owndering if what we're really debating is: https://en.wikipedia.org/wiki/Single_source_of_truth 19:28:22 ^-- ding 19:28:25 Which is not straightforward to solve here. 19:28:32 well...yeah 19:29:00 Because all of these things have "prexisting config on the target machine" + "One or more ansible playbooks" 19:29:07 I don't know how others do it, but as far as I remember in puppet you define rules and it somehow keeps state :D 19:29:36 and not all people run the same group of playbooks every run, so the risk of accidentally undoing rules seems kinda high 19:29:49 what this module does is it distinguishes what ansible made and what didn't 19:29:54 yep. Unless you keep a state local to the target machine. 19:29:59 puppet keeps a 'central repo' with all the rules and tracks things there, not on each machine 19:30:16 puppet can run in standalone mode though 19:30:18 bcoca: that isn't possible with ansible for now 19:30:25 jtanner: using teh rules from central repo 19:30:34 kustodian: nor do we want it 19:30:43 my whole point against keeping state 19:30:44 so what puppet does doesn't help :D 19:30:50 the PLAYS ARE THE STATE 19:30:52 our "central state" is vars 19:31:09 jtanner: inventory + plays + vars 19:31:12 or what bcoca said 19:31:20 to have a proper iptables module, it's not possible to do it with "external" state 19:31:34 current iptables module is mostly useless 19:31:45 kustodian: i disagree, as the current one has plenty of users 19:31:48 not much different from running iptables with command 19:31:57 if you WANT to keep state, tempalte the rules, use dump/restore 19:32:19 i dont want to ship any module that keeps it's own state databases 19:32:34 bcoca: makes it a lot harder to manage iptables like that, than with this module, at least read it once when you have time, a lot easier than anything with a template 19:32:36 ^ bad precedent, if you want to use the module or share it galaxy, go ahead 19:32:45 bcoca: Then rewrite cron. 19:33:02 abadger1999: making my point for me 19:33:19 ah, salt doesn't attempt to persist across rebots 19:33:35 it manages current in-mem state only 19:33:47 does it have rules priority? 19:33:54 bcoca: yeah -- cron is horrible but do we get rid of it or do we decide that there are things that people need to do where we can't do it without state so we have to allow it. 19:34:08 salt is akin to puppet, except written in python and using yaml 19:34:10 abadger1999: this is where i stres the usfuleness of templates 19:34:13 functionally, they're very similar 19:34:18 kustodian: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.iptables.html 19:34:26 cron/lineinfile are really hackky bad ways of maintaining 'partial state' 19:34:55 bcoca: so you mean the alternative being templating jobs into cron.d 19:35:08 err...ignore if that's not the rabbit hole you want to go down 19:35:09 so how do I change a rule in salt? 19:35:11 ryansb: templating al jobs for cron I think. 19:35:14 *all 19:35:23 lineinfile is a lifesaver though if you don't want to maintain templates for heterogenous environments 19:35:27 ryansb: that is how i maintained my machines, current cron module is a horrible hack that causes many problems, i want less of that, not more 19:35:34 it doesn't give an ID to rules, so not sure if you can change a rule 19:35:49 also no order of rules 19:35:59 jtanner: replace is better, but still a bad way of maintaining config files 19:36:31 kustodian: they use big hammer and avoid the fine tuned existing/new rules interweve problem 19:36:44 kustodian: didn't mean to imply it was a superior tool, just that it existed 19:37:05 big hammer? 19:37:09 delete everythign else? 19:37:24 kustodian: that is the 'easy'way 19:37:43 but that means the module needs to be executed at once? right? 19:37:44 that is what puppet does essentially, declares itself 'source of truth' and then everything must match 19:37:51 ^ most 'centralized' tools do this 19:38:02 yes. It's only the easy way if you assume you are the 100% boss 19:38:29 this module can also do this if you set one param to 'no' 19:38:39 but it doesn't do it by default 19:38:42 which is why i recommend the template for those cases, for the ones in which you are not 100%, current iptables modules is enough, specially if used in a role for complex interactions (fetch existing, merge, publish) 19:38:56 it's not 19:38:58 chef has a "role" like cookbook to manage iptables: https://github.com/chef-cookbooks/iptables 19:39:11 we have 350+ hosts and it's pain to do it 19:39:32 and chef uses templates to manage it 19:39:33 now our roles open everything they need and everyone I showed what we do they liked it 19:39:54 and Ansible is still a single point of truth 19:40:13 Maybe to bring it back in- sounds like a quorum of the core team is still pretty strongly opposed to adding modules that do external state storage. 19:40:29 as far as I can see mostly bcoca :P 19:40:32 kustodian: not really, data on the 'servers' IS the source of truth, ansible becomes a middle man, not something i wantin a module 19:40:37 i am opposed too 19:40:50 I know I'm still at -1. I understand the issue, but I'm not sold that we want to take on another one that does that. 19:40:55 the state is on the server, isn't it? 19:41:10 kustodian: im not saying youre module is 'bad' or not useful, it jsut does things in a way that we don't want to support or deall with the implications 19:41:17 ^-- that 19:41:32 so if the whole state was in the iptables-save dump 19:41:35 that would be fine? 19:41:59 you can ALREADY do that, or just dump the 'firewall state' from the kernel 19:42:12 that is what current iptables module does 19:42:17 but it doesn't have everything you need to easily manage iptables 19:42:22 doesn't have order 19:42:23 hell, that is what iptables commadn does 19:42:28 ids of rules 19:42:39 a state dump is not idempotent, so it's not a great way to do things 19:42:43 doesn't have what rules are from ansible, what not, a lot of things 19:42:43 iirc we updated it so you can insert the rule at specific position 19:42:50 before it was just prepend/append 19:43:24 kustodian: for those cases, i use template and i don't think that merrits having a 'data store' on the remote 19:43:44 ^ but you can do as you wish, i'm not stopping you, i'm just not going to maintain such a thing 19:43:47 just a question, what exactly is the problem having a "data store" on the remote? 19:44:10 it makes it impossible for ansible to have a coherent picture at source 19:44:19 bcoca: aren't the extas module now maintained by the community mostly? or is that a plan? 19:44:20 now inventory + plays + vars ARE NOT your source of truth 19:44:24 kustodian: you can never know for sure what's there, ideally the module should ensure the state matches exactly what you specify, thus removing anything you don't have there 19:44:36 (without external assurances that nobody's diddling the "actual truth" out from underneath us) 19:44:44 those diddlers 19:44:47 kustodian: its a plan, once we don't ship/maintain it ... go at it ... till then i opose the inclusion 19:45:08 jimi|ansible: But -- many of our modules are not like that. Not just cron either. 19:45:13 *you* can possibly make such assurances in your env, so use such a thing, but it's a trip hazard for people who can't make such assurances or use the module without understanding that 19:45:27 pretty sure there are a few modules like that 19:45:42 * nitzmahone doesn't want to add to that list 19:45:43 abadger1999: and i'll celebrate when we split extras off and they are not our problem anymore 19:45:57 I bet if you choose 5 random cloud modules you'll find at least one where it doesn't work like the ideal. 19:46:02 kustodian: mistakes im trying to remedy 19:46:06 the ec2 ones are 19:46:14 abadger1999: 5 is a low number 19:46:19 bcoca: exactly. 19:46:28 you're removing a lot of potential from modules because of that :( 19:46:36 abadger1999: ^ repeating myself: that we made a mistake before does nto mean we should double down 19:46:39 bcoca: if it was choose 20 random cloud modules... maybe that's not a big deal... 19:46:54 bcoca: it's only a mistake if there's another way to do it. 19:47:07 kustodian: yes and no, lookups and info modules are intended to gather info, you can create same logic using multiple tasks, really do not want to build that into single modules 19:47:19 abadger1999: ^ the other way 19:47:23 bcoca: so perhaps what we need is to see an example of doing it hte other way. And then kustodian and others can critique the approach. 19:47:32 modules should stay small and composable, you are trying to do too much in one 19:47:39 bcoca: the reason why is it in the module is that I don't have to write 3 tasks each time I want to change iptables 19:47:58 the module only manages iptables and does it very easy for the user 19:48:02 but anyway 19:48:02 and then we'll know if it's truly lacking things that we need in order to support the things that people want to do. 19:48:02 role: task1 => iptables-dump, task2, local template with that data and 'ordered rules' task3: push template task4: iptables-restore 19:48:26 and if I have 10 rules which I want to change that 40 tasks 19:48:33 just for iptables instead of 10 tasks 19:48:49 kustodian: if you want it to be, you can pass single task to role or list (i would use list) 19:49:22 you can call the role 1 time or 40, i dont care, its up to you 19:49:30 role is not good enough, I want to open a port in side a role 19:49:37 not the same 19:49:45 port in side a role? 19:49:54 yeah 19:49:55 why not 19:49:56 include 19:50:01 ^ not sure what that means 19:50:02 + vars 19:50:18 e.g. nginx role 19:50:25 opens port 80 and 445 19:50:27 443 19:50:44 make it depend on firewall role, passing list of 2 rules to open those ports ... 19:50:46 of course it's configurable in the role 19:50:56 doesn't scale 19:51:07 just as much as module does 19:51:18 if you have a bunch of rules you have to open, I don't want to check which role needs what port, my roles open ports 19:51:27 bcoca: not true 19:51:40 when I include my roles in a host, iptables is setup 19:51:49 nothing more I need to do 19:52:02 which is the point of a role, to setup a service 19:52:09 iptables is part of setting up a service 19:52:15 no, the point of a role is to group related tasks and resources 19:52:28 they are NOT equivalent to 'service setup' that is just ONE way to use them 19:52:37 of course 19:52:45 but in most situations it's the service 19:52:51 regardless, there are other ways to accomplish that (include + with_items/vars) 19:52:54 you CAN have an iptables_install role and an 'iptables_rules' role 19:52:58 and you can do that inside a role 19:53:11 ^ as he says, i said roles, but includes+vars also would work 19:53:36 many ways to do this, w/o building soo much into a module 19:53:42 specially state tracking 19:53:48 if that is so easy 19:54:11 why there is no explanation how to do it, best article I found is using ferm 19:54:22 lininfile and cron (which i also opposed) do this by using an EXISTING state which was the file or cron file that they modify, your case adds an additional 'data store' to the target 19:54:54 kustodian: many things are easy to do and no one has written an article about them 19:55:14 i'll add to my list, but that is already long 19:55:43 I wrote an article, if you have time read it, it's not that long 5 minutes 19:55:56 give me suggestions how to do it your way 19:55:57 :) 19:56:20 OK, any other topics for open floor before we wrap up? 19:56:54 Nothing from me 19:57:08 ending meeting in 10 19:57:08 Will the meeting be happening next week or week after? 19:57:16 not I 19:57:27 Oh, good question. We *will* mostly all be in the same room... :) 19:57:44 Which could be good or bad 19:57:58 Can we go to the pub instead? 19:58:12 gundalow++ 19:58:13 9 19:58:14 0~8 19:58:15 7 19:58:15 6 19:58:15 It'll be early in the morning 19:58:16 5 19:58:18 5 19:58:21 6 19:58:23 2 19:58:26 42 19:58:26 1 19:58:28 #endmeeting