15:06:52 #startmeeting ansible core public irc meeting 15:06:52 Meeting started Thu Sep 20 15:06:52 2018 UTC. 15:06:52 This meeting is logged and archived in a public location. 15:06:52 The chair is bcoca. Information about MeetBot at http://wiki.debian.org/MeetBot. 15:06:52 Useful Commands: #action #agreed #halp #info #idea #link #topic. 15:06:52 The meeting name has been set to 'ansible_core_public_irc_meeting' 15:07:31 .hello2 15:07:32 maxamillion: maxamillion 'Adam Miller' 15:07:39 .hello 15:07:39 devyani7: (hello ) -- Alias for "hellomynameis $1". 15:07:52 .hello devyani7 15:07:53 devyani7: devyani7 'Devyani Kota' 15:08:01 #topic https://github.com/ansible/ansible/pull/38269 15:09:10 devyani7: the floor is yours, what would you like to discuss about the PR? 15:09:32 bcoca, so the PR add the remove-brick functionality... 15:09:40 ... to the existing gluster_volume module 15:09:46 @jtanner so rosmo is author and has shipit, but it did not seem to count 15:09:47 for the Glusterfs storage 15:10:01 and I tried mailing rosmo, but didn't quite get a response 15:10:17 he gave you a shipit 15:10:23 I would like to know the next steps :) 15:10:26 bcoca, correct. 15:10:46 ah, but you have commits after that 15:10:52 the counter was reset for 2.6 release 15:10:55 that invalidates it 15:11:07 right. 15:11:57 I got it re reviewed by the gluster community folks 15:12:31 would you and sac be interested in being 'maintainers' for the gluster module space? 15:13:01 bcoca: what's the precedent here, can core team members step in to review/merge or is that considered bad form? 15:13:02 bcoca, yes, we both are currently working on gluster ansible efforts. 15:13:31 devyani7: awesome! :) 15:13:42 maxamillion, :) 15:13:44 maxamillion: we are ALSO part of the community 15:13:55 not bad form, mostly we dont have the bandwith 15:15:27 so my reading of this is that when you dont specify some bricks as part of the cluster you normally dont remove them, this flag would allow removal? 15:16:00 um, basically, remove operation was not working, as in: 15:16:07 it doesn't work with the existing module 15:16:12 bricks can only be added 15:16:14 and not removed 15:16:24 I have added support for the remove operation 15:16:46 which needs to be followed by heal, in order to keep the cluster working. 15:16:49 does it make sense to add the fix to removal w/o the option? 15:16:53 bcoca: right, but we're not module owners in this respect 15:17:31 maxamillion: permission go up, so '/storage/' maintainers can also shipit, we are '/' maintainers ... 15:18:23 bcoca, the option triggers the removal operation... 15:18:29 it goes 'module' > folder > category > core 15:18:43 ...when absent, it is add-bricks operation by default 15:19:02 devyani7: normally i woudl expect bricks=1,2,3 when existing bricks is 1,2,3,4 to remove 4 15:19:18 so the code seems fine, i question if the option is needed as i would expect the removal to happen normally 15:20:07 bcoca, no, without the option, removal won't be triggered, rather its just skipped 15:20:41 bcoca: +1 15:21:03 devyani7: that is my point, it shouldnt 15:21:09 bcoca: also for clarification, I meant "core team" as everyone in the core community group on GitHub 15:21:25 maxamillion: that is my meaning also 15:21:44 that includes non RH employees 15:22:21 devyani7: instead of a feature, this looks like a bugfix to me, which makes the option 'not needed', just remove the bricks when required 15:22:52 bcoca, remove operation doesn't work as of now though^^ 15:22:53 bcoca: +1 15:23:04 like in the existing module. 15:23:07 devyani7: i know, but you can fix that w/o adding the new option 15:24:05 bcoca, so suggestion is: remove option, just use remove_bricks as a list of bricks instead of a flag option 15:24:23 no 15:24:40 most modules are 'this is the fulls tate' so bricks=1,2,3 says there should be THESE 3 bricks 15:24:54 if a brick is missing, it should be added, if extra bricks exist they should be removed 15:25:10 no need for other options as you are already stating 'i want it to have THESE 3 bricks' 15:25:19 agreed 15:25:26 that might cause issues, as bricks that are not intended to be removed , might accidently be removed 15:25:51 so, the intention was to use 'bricks' option to handle both addition and removal operations 15:25:59 This looks a lot like the purge_ boolean options for AWS 15:26:04 absence of the remove_brick flag = addition, and 15:26:09 but why would you not specify bricks you must have 15:26:10 with the flag = removal 15:26:50 devyani7: that is an imperative voice, we want to have a declarative one, the diff between 'add these 2 things' vs 'it must have these 3 things' (add or remove as needed) 15:27:09 user should not care as much about actual operation as about the 'expected state' 15:27:24 exactly that ^ 15:27:29 like if i want the 'light to be on' i might have to turn the swithch on or not, but the real ask is 'i want light' 15:27:36 think about it like a transaction model 15:27:53 Usually for declarative the purge option defaults to True. But it looks like you've defaulted to False to maintain backwards compat. 15:28:55 we shoudl really avoid such optoins unless it become phohibitive to add the full list every time 15:29:11 its kind of usermod -G 'group1, group2' 15:29:51 um, ok. I can check that again, and get back. thanks bcoca maxamillion and shertel :) 15:30:15 +1 15:30:35 in any case, open a PR against BOTMETA and we can add you to the maintiners foro the 'gluster' folder 15:30:40 devyani7: anytime, please don't hesitate to discuss in #ansible-devel as you continue working through it 15:30:46 will make it easier for you to merge thins in future 15:31:03 bcoca, ok. will do. thanks. 15:31:23 maxamillion, sure thing. thank you. 15:31:30 dag ? 15:32:28 devyani7: i understand it is a bit of a shift from those used to api/commands, but one of the reasons we try to use a declarative voice is to allow users to think about 'what they want' vs 'how to get what they want' .. makes playbooks easier to read and understand 15:33:11 alikins_ ? 15:33:34 ? 15:33:35 bcoca, yup. sure, will keep in mind for upcoming modules. 15:33:46 #topic https://github.com/ansible/ansible/pull/44983 15:33:51 "desired state" is what modules describe 15:34:19 alikins_: my comments are still the same about the new params, we had agreed to just use the tasks file name 15:34:56 and that hte name was spec.yml, not arg_spec .. but that is bikeshedding, which we might want to create a friendlier user name and not base it on implementation internals 15:35:10 'validate_arguments' or similar 15:35:49 possibly 15:36:10 Hello acozine :) 15:36:13 rest of teh code seems fine, a bit more than what i had put in spec, but guessing that we would have grown to this complexity eventually (since we actually did on module side) 15:36:33 Hello! 15:36:36 for the most part, users shouldn't see the action name. Though there is a module/action that would show up 15:36:56 but not tied to 'validate_arg_spec' at all 15:37:35 i know, its also a minor detail, but since users CAN call it directly and it will appear in their display on runtime, i think it should be a bit friendlier name 15:37:54 what that name is, i'll let others decide since i suck at naming 15:38:34 arg_spec is fine for programmers, but not all of our users are programmers 15:38:44 I wouldn't mind avoiding 'spec' in user facing names 15:38:52 pretty meaningless word 15:39:11 and i would not spell it out, no one wants to type specification if they can avoid it 15:39:11 we're talking about 45805? 15:39:30 no, topic ic 44983 15:39:35 thanks 15:40:58 though i understand the confusion, this is 'variable input validation for roles' .. which got based on existing module 'arg_spec' code and that brought with it the same name 15:41:46 alikins_: bigger issue for me is the departure from 'file matching' to having user have to suply diff names to access diff validation sets 15:42:26 how about 'role_validate' 15:42:38 or 'validate_role' 15:42:46 works4me 15:43:11 well, @privateip wanted support for multiple named argument specs in a single file so this provides a path to that 15:43:43 but we had that already, it just matched the file name of the tasks/ file, which would then work automatically instead of requring user to manage it 15:44:26 even though it is hardcoded to 'main' at the moment, enabling it is mostly a matter of deciding how alt names would be provided 15:44:49 we did decide, dylan made the call at the meeting, iirc 15:45:08 as i was fine with leaving it for future develepment, but he insisted that we just decide then 15:46:06 unless we have a use case that doesn't cover, im confused as why we didnt follow that decision 15:47:09 chouseknecht: +1 for validate_role (fwiw) 15:47:21 or role_validate ... which ever 15:47:22 maxamillion: not just for roles 15:47:43 alikins_: i thought this was a role specific feature, confused now 15:47:52 alikins_: I'm confused then, the ticket explicitly states roles 15:48:02 proposal was also role specific 15:48:46 validate_arg_spec is not role specific. The pr enables using validate_arg_spec for roles automatically. 15:49:12 what other use cases are you contemplating? 15:50:12 ^ 15:50:14 could use it to enforce a subset of the way a task is called 15:50:29 not really, since you cannot validate options 15:50:30 I don't follow 15:50:58 you can validate variables exist, option validation would not be possible unless you inject them in normal.py (or corresponding action plugin) 15:51:23 could also be used by other tooling to validate a set of args directly, without required a role to be loaded/included 15:51:25 but i would consider that a diff feature 15:51:35 so play validation? 15:51:41 i'm confused. i thought the point was to validate roles. 15:51:45 it was 15:51:49 seems the point was expanded 15:51:53 wrap a task with a block that includes a validate_arg_spec call 15:52:12 alikins_: that would still not validate the task options, only the variables available to it 15:52:58 chouseknecht: It does that. But the arg spec stuff is not role specific. Role loading uses the non-role specific validate_arg_spec to validate how they called. 15:53:11 alikins_: i can see it as a more general play/include validation, but then user woul dhave to specify 'validtion spec file' 15:53:53 yeah, i'm sure there are other fun things we can do with it in future iterations. i'm just hoping we can focus on the role piece, and move it forward for that use case. 15:53:59 owh, I missed the meeting 15:54:00 not a file, just the arguments_spec dict 15:54:01 im not against it expanding the feature to cover more 'play objects' , im just trying to understand your thinking and how it applies to actual plays 15:54:16 alikins_: butin the role case it is a file 15:54:25 yes 15:54:28 couldnt we have meta/spec.yml play adjacent? 15:54:40 meta/validate.yml 15:54:45 whatever we want to name it 15:54:58 dag: we can come back to it, i skipped for now 15:55:12 dag: but we probably need abadger1999 here for that 15:55:17 bcoca: play adjancent? for what use? 15:55:32 validating play input .. i thought you just proposed that above? 15:55:34 * abadger1999 is here 15:55:38 * bcoca waves 15:56:05 I mentioned task/blocks as a possibility 15:56:26 bcoca: fine, I can discuss with abadger privately as well 15:56:41 not sure where/what validating play args would mean 15:56:55 same as validating a role, make sure you have the vars needed for execution 15:57:20 we can do it before a task, but it still does not validate options as you mentioned above, which is why im a bit confused 15:57:28 yeah, suppose you could inject the validate_arg_spec task in a similar fashion for a play 15:57:38 dag: I took a brief look at that earlier... I'm not sure that I want to make a decision on my own... jimi|ansible worked on that code the most... I'm torn between.... "this is better overall" and "maybe people depend on the old behaviour" 15:57:56 ^ he, my stance also 15:58:16 i remember we arrived to the decision to 'use script module instead' ... but i really dont remember the arguments 15:58:18 abadger1999: the old behaviour that mistreats the input ? really ? 15:58:29 dag, abadger1999 lets wait till topic change? 15:59:33 alikins_: i would modify it to still do role tasks/file automatically, i would like to know more use cases for covering other play ojbects and discuss the interface then, not sure the 'name' works or we should just point at a file or inline data structure 15:59:37 or all of the above 16:00:14 or we can just do the role for now and expand the feature set as we see usage 16:01:41 validate_arg_spec gets an inline datastructure. The code that creates and injects the validate_arg_spec task before role includes uses the arg_spec_name to choose which arg spec data structure to use from those provided in roles meta/argument_specs.yml 16:01:47 .. Why is this a module/action plugin? 16:02:33 we looked at making it a 'meta' action, but thought action plugin might be better allowing for user reuse and overrides 16:02:58 i.e users dont care about validation and make it a noop 16:03:07 Can you give me a concrete scenario? 16:03:22 that sounds more like a boolean should be set somehwere. 16:03:24 users want to expand validation 16:03:44 validate_role_spec=[True|False] 16:05:25 That sounds like it needs to be a plugin into the validation system rather than a replacement module. 16:06:12 (which is something we've been half-reaching towards... I think sivel's work that he found was reaching for too much in one change had elements of that) 16:06:40 it's up to the role author to provide an argument spec to be enfoced when a role is ran (similar to how modules provide and enforce their own arg spec) 16:06:51 possibly, we were just looking at the role validation feature, i was leaning into hardcoding this but in the meetings we decided action plugin was most flexible approach 16:07:12 I think we should stick with that plan 16:07:15 abadger1999: yes, and I *think* we might be working on that for 2.8 too 16:07:36 separating out the validator stuff into a separate class 16:07:49 * sdoran ears start burning 16:07:52 we have a validation system? 16:07:58 that is one thing that would benefict config also, currently it uses a 'stripped down' validator 16:07:59 If there's a lot of appetite for elevating some of this to play syntax or to things other than roles, we can look at expanding later, but we've got a clear and concrete use case that we need to cover... 16:08:08 alikins_: args_spec 16:08:15 This was just so we could use it from other plugins 16:08:24 (the extraction thing) 16:08:35 bcoca: elaborate on 'args_spec' ? 16:08:36 eg, so actions aren't having to hand roll validation 16:09:10 alikins_: argument specification validator, what we use for modules, what you are using now to implement this validator? im unsure what you are asking otherwise 16:09:10 nitzmahone: yeah.... which to me implies a python module, not an ansible module... correct? 16:10:01 abadger1999: the impl, sure, but wrapping it in an action/module as an explicit task for role validation seems like the simplest approach for now that will meet the usecase we need to solve 16:10:13 bcoca: yes, why did you say just 'args_spec' ? 16:10:17 rather than trying to plumb in something much deeper 16:10:23 ok, since this was an 'early look' request and this seems to be going off in several tangents, going to close the topic on teh meeting and move on, can discuss in other venues 16:10:34 alikins_: short naem we all use? 16:10:43 but what did you say it 16:10:45 why 16:10:47 #topic https://github.com/ansible/ansible/pull/45853 16:10:56 alikins_: [12:07] we have a validation system? 16:10:57 nitzmahone: I'm kinda confused why that would be the simplest approach... 16:11:11 dag, abadger1999 we can now discuss the command changes 16:11:26 we are already 11 mins over meeting time 16:11:51 not sure I would count the thing used by only AnsibleModule and my pr as a 'validation system' 16:12:16 dag: https://xkcd.com/1172/ ;; string parsing always seems to fall into that xkcd scenario :-( 16:12:37 alikins_: considering the extensive use of ansiblemodule, i would, specially if we refactor cause config could also use it 16:14:35 I think right now I would say, toggle with deprecation period (because to me, dag's change makes things more logical and easier to understand). 16:14:51 So I think we would want to get there eventually. 16:14:54 dag: i would avoid string concatinationi fpossible, seems like processing as a list might be better and avoid unexpected tranformations 16:15:10 bcoca: definately, if/when the AnsibleModule arg spec validation code is extracted 16:15:28 abadger1999, dag my only caveat .. people will do shell heredocs in plays .. which i hate, but its not a technical reason 16:15:33 dag: I wouldn't change the documentation, though... I think the script module should still be preferred to inline scripts. 16:15:46 ^ agreed 16:15:55 bcoca: pseudo-jinx.... That's my justification for keeping the documentation the same too. 16:15:59 hehe 16:16:30 part of me wants to randomize the 'jinaj2 start block' aka '{%' to avoid peple doing tempating heredocs in plays .. 16:17:38 though random might break too many things ... setting to backspace or vertical tab ... 16:18:31 tangent aside, im not opposed to the technical fix, i dont think any of us are, but would still prefer not to encourage users to use shell: with multiline 16:20:03 jimi|ansible ? 16:21:27 abadger1999: is the code py2/py3 safe? woldnt we need to_native in this case? 16:22:35 *crickets* 16:23:02 ok, if im only one left here im going to close the meeting, we can continue discussions elsewhere and/or decide on the next one. 16:23:06 #endmeeting