19:00:06 #startmeeting ansible core 19:00:06 Meeting started Tue Oct 24 19:00:06 2017 UTC. The chair is thaumos. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:00:06 Useful Commands: #action #agreed #halp #info #idea #link #topic. 19:00:06 The meeting name has been set to 'ansible_core' 19:01:17 o/ 19:01:21 * shertel waves 19:01:22 lol 19:01:30 I was just about to post an "all by myself" gif 19:01:35 #chair nitzmahone shertel 19:01:35 Current chairs: nitzmahone shertel thaumos 19:02:07 * sdoran waves 19:02:22 #chair sdoran 19:02:22 Current chairs: nitzmahone sdoran shertel thaumos 19:02:52 o/ 19:03:55 #chair funzo 19:03:55 Current chairs: funzo nitzmahone sdoran shertel thaumos 19:04:24 community_free_core_meeting 19:04:34 ? 19:04:41 new title I should use? 19:04:42 I'm here.. 19:04:47 It keeps changing on me... 19:04:51 #chair abond 19:04:51 Current chairs: abond funzo nitzmahone sdoran shertel thaumos 19:04:56 hello @abond! 19:05:13 No, just remarking on the lack of non-RH folks today ;) 19:05:20 ah 19:05:21 gotcha 19:05:24 well, there is one 19:05:49 Everyone must be busy with their day jobs. 19:05:49 and that's good, because I was just about to kick out his proposal topics 19:05:57 jk ;) 19:06:01 what's a day job!? 19:06:15 what is day? 19:06:43 it's when you open your blinds or come upstairs and see daylight 19:07:09 upstairs? blinds? 19:07:12 kind of a pointless, but it helps plants grow or something like that 19:07:15 hola 19:07:20 you surface people say funny things 19:07:24 #chair bcoca abadger1999 19:07:24 Current chairs: abadger1999 abond bcoca funzo nitzmahone sdoran shertel thaumos 19:07:35 alrighty! 19:07:40 I think we have enough to start 19:07:58 "Sunlight- it's what plants crave" 19:08:02 #topic Digital ocean module updates 19:09:05 abond do you know if pmarques contributes any longer? 19:09:13 Yes he does from time to time. 19:09:37 He's responsive when I ping him to rebase or make changes. 19:09:47 for the digital_ocean public private ip update, if you get a shipit from them, it should automerge 19:09:58 Cool! Will do 19:10:02 * jtanner is here 19:10:19 for the second one, since it's new, Core committers need to give a final spot check. 19:10:24 #chair jtanner 19:10:24 Current chairs: abadger1999 abond bcoca funzo jtanner nitzmahone sdoran shertel thaumos 19:11:02 oh and of course I didn't notice pmarques commenting on this new on 19:11:07 s/on/one 19:12:14 I figured I needed gundalow or someone else from core to review the sshkey facts before it could move forward. 19:12:23 I can take an action to get @ryansb or have @shertel nudge @ryansb to look at the new one 19:12:37 yeah, or gundalow 😃 19:12:41 Yeah, I'll check it out 19:12:42 I can review digital ocean modules 19:12:52 Thanks both of you :) 19:12:59 PR link? 19:13:01 #link https://github.com/ansible/ansible/pull/26365 19:13:12 Was already somewhat ahead of you there ryansb 19:13:25 #action ryansb and/or shertel to review the PR 19:13:32 Thank you! 19:13:35 Anything else? 19:13:41 Nope 19:13:53 coolio 19:13:59 #topic Open Floor 19:14:12 Anything open to discuss to kill some time before jborean93 can be here 19:14:26 #info agenda: https://github.com/ansible/community/issues/263 19:14:34 https://github.com/ansible/ansible/pull/31765 - another DO request 19:14:46 It doesn't do any updating of records, so I'm hesitant on it 19:15:52 Jordan was asking about 31767 because of something I brought up, so I can talk about it... 19:15:59 Yea woohgit was still looking into that. I believe there was more development that needs to be done. 19:16:01 ah okay, nitzmahone 19:16:07 I haven't been able to play around with that PR yet. 19:16:20 let's finish this do topic that ryansb brought up then we can talk about it 19:16:27 k 19:16:40 #topic DO domain record module discussion 19:17:06 you say in one comment that you have tested it though 19:17:09 @abond 19:17:56 Not since his last changes. 19:18:03 ah gotcha! 19:18:09 thanks for clarifying for me 19:18:19 ty 19:18:36 np 19:19:28 I'm good from the DO side. I'll probably have more in a month.. Thanks 19:19:31 I just wanted to get other eyes on it - I think it should be able to update records and not require users to manually delete old stuff 19:19:56 #chair Qalthos 19:19:56 Current chairs: Qalthos abadger1999 abond bcoca funzo jtanner nitzmahone sdoran shertel thaumos 19:20:26 @ryansb I would agree with you. seems lacking in functionality if it can't do that 19:21:03 Yea that's where my test with the do cli came in, it might be lacking on the api side. 19:23:14 @abond, would you agree then to not include this since it's missing functionality? 19:23:29 Yes I would I agree at this time. 19:24:04 okay, could one or both of you stress on the PR to have that included somehow, or close out to not be included? 19:24:28 Yes I will take ownership o nthat 19:24:58 ty kindly! 19:25:11 #action abond to comment on #31765 19:25:44 #topic win_reboot discussion 19:25:53 So this isn't just about win_reboot 19:26:01 #link https://github.com/ansible/ansible/pull/31767 19:26:01 Hey all, sorry I'm late 19:26:07 you're good, just in time! 19:26:14 It's basically: I'm hoping to come up with a way to generically set connection args from actions 19:26:21 @nitzmahone that's my fault, I am trying to simplify things to quickly 19:26:24 my apologies 19:27:05 win_reboot (and likely the new `reboot` module as well) need to be able to crank down the connection timeout in a generic fashion to be connection-agnostic 19:28:03 However, there's no generic queryable/settable mapping provided by the connection layer- it's set by `__init__` 19:28:18 crank down the timeout? 19:28:36 Yeah, so for instance, the default winrm connection timeout is 60s 19:28:51 ah, so the underlying connection subsystem 19:28:55 Right 19:29:12 But today, you can't walk up to a connection plugin and query arbitrary properties about it 19:29:20 yeah, ssh -o =1s 19:29:25 Each plugin takes the stuff it got passed in and does (whatever) with it 19:29:36 Nor override those properties generically post-init 19:29:51 Even if you know the name of the arg 19:30:02 we also don't totally know the things an ~/.ssh/config is going to do after the fact either, unless we do a config dump 19:30:59 Yeah- in this case the "set" is more important than the "get", but I figured we'd try to tackle both (some exceptions of course, like the one you mention) 19:31:06 so could this be two config settings? 19:31:20 ? 19:31:44 in ansible config file, one for linux, one for windows, and maybe even one for network devices? 19:31:51 No, that's missing the point 19:31:55 okay, sorry 19:31:56 for ssh, it's a -o and also settable in (~|/etc/ssh)/config 19:32:04 The thing is, we want these modules to be connection-plugin agnostic 19:32:36 But if the connection supports setting a lower timeout, we want to do that by default so we're not waiting around for whatever the default is (that we can ping faster waiting for it to come up) 19:33:12 i would also make the timeout a parameter for the *reboot modules 19:33:15 It's a specific case of a general problem, in that connection properties are opaque once created 19:33:18 It is 19:33:30 Could bcoca's config part 3 PR add in a connection timeout var and we then query that, it would just be up to the connection plugin to have a `set_conn_arg` method to implement it? 19:33:33 But we want to default to something lower in the usual case where it's not specified 19:33:53 @jborean93 That's more or less what I'm proposing 19:34:05 cool 19:34:06 that's sort of what I was suggesting as well, just a lot more generic 19:34:26 Well, the second half- the first half is a "nice to have" but not really the part I'm worried about 19:34:28 i was planning on 'timeout' connection.timeout and connection.ssh.timeout 19:34:29 I didn't think we'd want it to be that generic because some users might want to finetune per system type. 19:34:36 ^ once we have yaml config 19:34:47 finetune per system OR by region 19:35:07 fickle clouds 19:35:09 I think you can do this with: https://github.com/ansible/proposals/issues/81 19:35:10 Well WinRM is a bit more difficult as you need to set 2 args for the connection timeout but that could potentially be handled by the action plugin 19:35:42 @dag That's the config side, but the unsolved problem is a generic property get/set on connections 19:35:59 this is how I see it 19:35:59 ssh.timeout: 10s 19:36:00 winrm.timeout: 45s 19:36:00 network.timeout: 60s 19:36:14 Most connections map those to internal fields, not properties, and there's no rhyme or reason to how they do it 19:36:29 im in midle of normalizing that 19:36:29 You're solving a different problem 19:36:47 https://github.com/ansible/ansible/pull/31024 19:37:40 bcoca: that's only part of the solution though, we would need to implement the override somehow in the connection plugin 19:37:55 @bcoca: that sorta works, but is "all or nothing"- this would be "single value" 19:38:00 exactly 19:38:03 already there, conneciton plugin has it's own setting 19:38:09 no, its 'cascading values' 19:38:18 Because as nitzmahone says these settings are usually set in `__init__` and we need to override after that 19:38:24 general timeout/connections timeout/pluging specific timeout 19:38:37 jborean93: yes, during set-options phase, which is well after init 19:38:38 @bcoca: Right, but I only see `set_options` 19:38:59 I can't override one value from an action like that if I'm skimming it right 19:39:13 nitzmahone: if you add connection var to plugin, you can 19:39:30 ansible_winrm_timeout 19:39:45 ^ just 'declare it' and its automatically available 19:40:09 ah, plugin `set_option` 19:40:14 nitzmahone: So you just want connection plugins to have a connection parameter that they set to a config value in __init__ but consult self.timeout instead of the config directly from then on? 19:40:17 not plural 19:40:32 nitzmahone: plural for winrm as you do 'magic' in there 19:40:34 Yeah 19:40:40 its old 'set vars override' 19:40:40 nitzmahone: and then you can set it from other code? (Or do you need more management than that... like overriding at call time)? 19:40:47 but you dont need to set_option as vars would already do it 19:41:25 IIRC connection has already been set up by the time the action's running , so it'd be a "runtime"/ post-all-this-stuff override 19:41:46 But I think calling `set_option` could work so long as the plugin is getting its value from that 19:41:53 ugh. 19:41:57 connection gets setup right before calling option 19:42:11 We really should not be using config for data that cahnges during runtime. 19:42:17 both after task templating, should have same data available 19:42:22 It should be a light reflection of static data. 19:42:25 In the reboot case we have already set it up and used it to make the actual reboot call, the polling would be after that 19:42:27 I hadn't seen this stuff yet (which is why I wanted to talk about it)- this *might* work for us as-is or with some tweakage 19:42:53 nitzmahone: may need reset in the set_options if it isn't already there 19:42:58 Yep 19:43:12 nitzmahone: Do you need to change this for forever (ie from that point forward in an entire playbook run)? or just for the calls that you are making? 19:43:15 Well, ideally the plugin would always sample from there, but we'll have to see 19:43:27 No, just for that task 19:43:38 it should only change for the connection the reboot modules are making in that particular thread 19:43:40 Currently we'll get a new connection afterward 19:43:47 and it should not affect other connections 19:43:51 If that ever changes, we've got problems 19:44:04 k. This should be a function parameter then. 19:44:59 I think what bcoca's got *may* get the job done- the `set_option` thing was basically what I wanted to build, but looks like it's already (partially) there 19:45:18 If you create a brand new connection instance then I could see it as a parameter to __init__() but otherwise it would be a param on calling exec_command().. 19:45:20 If it doesn't, we can probably figure out how to get it to do so. 19:45:53 set_option is conceptually wrong though. It is a global setting, not a per-task setting. 19:46:35 and it goes beyond the task even 19:46:36 doing things wrong conceptually will have ramifications for things like jimi-c's threads branch. 19:46:42 abadger1999: options are per task 19:46:51 abadger1999: as task modify conneciton options 19:46:54 needs to be by call from the action plugin to something like _low_level_exec_command 19:47:20 Ah, was misunderstanding the scope of set_option... 19:47:28 oh, it's part of play_context? 19:47:35 instead of play context 19:47:39 No, it's on plugin base 19:48:09 It looks to be instance-level to me, so seems like the right place to do it 19:48:24 instead of hardocing all thsi stuff in play context, it is now the plugin that declares it 19:48:52 then set_options gets the same data we used to get vrom constants/play/playcontext/variables/inventory 19:48:55 Anyway, I don't think we need to continue discussing here- we'll take a look and see what makes sense for that. Sounds like we have a couple of possibilities 19:49:12 but instead of each plugin having to figure out the right combo, it just reasds self._options['optionname'] 19:49:22 (that hopefully won't require building anything new) 19:49:28 right 19:50:05 Hmm.. we only create a new plugin by sideeffect of using proesses, though, right? 19:50:15 ? 19:51:01 I may have to re-read how pluginloader works now... 19:51:09 But here's my potential problem. 19:51:18 still works the same, the issue is 'plugin instanciation' 19:51:19 Connection instances are currently per task 19:51:36 even if they werent, set_options IS per task, and set for each task 19:51:39 If threading branch breaks that, we have much bigger problems 19:51:44 Okay... and that is integral to the design or just a side-effect of using multiprocessiung? 19:51:56 i would say .. both ? 19:52:09 it was designed thsi way .. but we also designedi t as part of multiproc 19:52:10 Well, basically we need to ensure that threading preserves that semantic 19:52:22 should not be an issue once we have set_options working 19:52:41 ^ just need to add delegation 19:52:46 If a CP needs state to live between tasks, it should manage that itself with statics/globals or elsewhere 19:52:47 bcoca: if it relies on multiprocessing to implement that, then it will break when we switch to threads. 19:53:02 what does? 19:53:08 nitzmahone: or it's not a semantic that should be depended upon... that's what I'm trying to determine 19:53:15 Yeah, just because "threads pass tests" doesn't mean it's not still rife with problems- most of our tests aren't doing multi-host/multi-connection stuff 19:53:23 plugin instanciation would work the same in both cases ... with threading we need to worry about cleanup 19:53:40 Process isolation can't be depended upon, but each task getting a new connection instance probably should be 19:53:46 yep 19:53:50 we create a NEW isntance of connection plugin PER task 19:53:59 exactly 19:54:07 even if we dont, set_options will still work PER task 19:54:14 So long as that's the case, what I'm proposing doing with set_option should work fine 19:54:22 nitzmahone: Yep. that's what I'm driving at. If that's the *design* rather than just a side effect of using processes then we're golden. 19:54:32 only problem woudl be if we shared connection object across parallel tasks 19:54:32 Because it gets overwritten on each new invocation 19:54:44 and/or looped 19:54:51 bcoca: or if we shared them across serial tasks. 19:54:52 (which we do curently) 19:55:02 loop is not issue, as it is kindof running N tasks 19:55:09 It's a question of whether we share them at all that's problematic to doing it this way. 19:55:12 Except the connection doesn't get reset 19:55:14 abadger1999: serial tasks would not matter 19:55:16 (last I checked) 19:55:32 So I could contrive an issue with doing this in a loop 19:55:55 nitzmahone: connection gets options reset on each iteration, cause delegate_to/remote_user can change PER iteration 19:56:24 OK, that's clearly new for the options stuff then, because in current code, it gets reused 19:56:27 okay... so time check. 19:56:33 is there any conclusion we can draw here? 19:56:40 yeah, we have to get to WWG in 4m 19:56:42 we think set_option would work. 19:56:42 do we need to discuss further? 19:56:44 nitzmahone: no, current code redoes options per iteration 19:56:54 I think we're good for what we needed 19:56:54 otherwise delegatE_to: '{{item}} 19:56:56 ' would not work 19:57:09 okay, since I got interrupted, @nitzmahone would you mind summarizing this? 19:57:11 but we should document that new isntantiations of connection plugins are expected. 19:57:23 abadger1999: not really needed 19:57:23 (document where?) 19:57:33 nitzmahone: yeah.. that's a prolem. 19:57:34 abadger1999: just need to avoid sharing them across parallel tasks 19:57:59 nitzmahone: somewhere in community probably. 19:58:05 Since it's not external api 19:58:12 if it were external api then dev_guide 19:58:16 #action Windows dudes will look at connection set_option for overriding connection timeout 19:59:00 nitzmahone: winrm does not currently use a timeout 19:59:11 windudes. 19:59:20 bcoca: I think you and I agree but we're coming from different places -- you're coming from where the current code is. I'm coming from the place where the current code is rewritten. 19:59:45 abadger1999: im in 2 places, current code and current code + config_v5 19:59:49 which adds set_optoins 19:59:57 yeah, I'm going beyond that. 20:00:03 * nitzmahone ducks to WWG 20:00:12 thanks all for the discussion 20:00:14 even if you rewrite to do threads, connections MUST be per task invocation 20:00:27 thanks everyone for the discussion 20:00:31 I am ending the meeting now 20:00:34 I'm looking at things like jimi's threads branch and saying we need to make sure we document that so we don't violate our assumptions when we impleemnt threading or when we rewrite PluginLoader, etc. 20:00:35 ^ otherwise tasks loose the ability to have diff connectionparams, so your rewrite would still need to take that into account 20:00:35 violent agreement 20:00:39 #endmeeting