Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-06-16

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 abednarik joined #salt
00:20 rome_390 joined #salt
00:41 Nahual joined #salt
00:42 flowstate joined #salt
00:48 rbjorklin joined #salt
00:56 wych joined #salt
01:01 _JZ_ joined #salt
01:03 TaiSHi joined #salt
01:10 davidhoude joined #salt
01:11 _JZ__ joined #salt
01:12 rbjorklin joined #salt
01:22 wych joined #salt
01:30 ivanjaros joined #salt
01:30 entropy_ joined #salt
01:35 ivanjaros joined #salt
01:46 flowstate joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.1 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:54 catpigger joined #salt
02:07 teryx510 joined #salt
02:12 iceyao_ joined #salt
02:20 tristianc joined #salt
02:24 mohae_ joined #salt
02:37 justanotheruser joined #salt
02:38 Edgan joined #salt
02:43 flowstate joined #salt
02:45 evle joined #salt
02:45 seblu joined #salt
03:11 rem5 joined #salt
03:16 hasues joined #salt
03:16 hasues left #salt
03:19 PeterO joined #salt
03:19 sjorge joined #salt
03:32 Garo_ joined #salt
03:38 nmadhok joined #salt
03:44 flowstate joined #salt
03:52 favadi joined #salt
03:53 tristianc joined #salt
04:01 k_sze[work] joined #salt
04:06 iceyao joined #salt
04:20 krymzon joined #salt
04:24 nmadhok joined #salt
04:33 onlyanegg joined #salt
04:58 eriko joined #salt
04:58 eriko__ joined #salt
05:00 calvinh joined #salt
05:03 netcho joined #salt
05:03 ivanjaros joined #salt
05:05 Ayo_ joined #salt
05:07 nidr0x joined #salt
05:09 DarkKnightCZ joined #salt
05:13 tpaul joined #salt
05:18 toastedpenguin joined #salt
05:19 ALLmight_ joined #salt
05:20 sauvin joined #salt
05:22 Ayo_ joined #salt
05:30 Miouge joined #salt
05:37 nledez joined #salt
05:38 kalessin joined #salt
05:39 klocek joined #salt
05:41 guerby joined #salt
05:42 slav0nic joined #salt
05:43 flowstate joined #salt
05:48 duncanmv joined #salt
05:53 Miouge joined #salt
05:57 kshlm joined #salt
05:57 kalessin joined #salt
05:57 klocek joined #salt
05:57 nledez joined #salt
05:57 nledez joined #salt
05:58 guerby joined #salt
05:59 oon joined #salt
06:01 felskrone joined #salt
06:04 dh joined #salt
06:11 punkoivan joined #salt
06:11 davromaniak joined #salt
06:14 nmadhok1 joined #salt
06:16 babilen joined #salt
06:16 favadi joined #salt
06:22 Rumbles joined #salt
06:27 ivanjaros3916 joined #salt
06:27 av_ joined #salt
06:28 Trauma joined #salt
06:29 Rumbles joined #salt
06:31 cyborg-one joined #salt
06:33 punkoivan joined #salt
06:36 KermitTheFragger joined #salt
06:39 toanju joined #salt
06:42 flowstate joined #salt
06:42 fracklen joined #salt
06:47 fracklen joined #salt
06:48 Miouge joined #salt
06:51 fracklen joined #salt
07:03 Sylvain31 joined #salt
07:13 kawa2014 joined #salt
07:16 N-Mi joined #salt
07:19 nmadhok joined #salt
07:23 dmaiocchi joined #salt
07:28 MTecknology Does salt.utils.schedule get its own log level? It seems to be info by default.
07:30 dmaiocchi joined #salt
07:33 Electron^- joined #salt
07:35 keimlink joined #salt
07:41 flowstate joined #salt
07:42 izrail joined #salt
07:44 punkoivan left #salt
07:59 felskrone1 joined #salt
08:03 mikecmpbll joined #salt
08:03 keimlink joined #salt
08:03 thenut joined #salt
08:08 krymzon joined #salt
08:09 permalac joined #salt
08:15 nofxrok joined #salt
08:18 Rumbles joined #salt
08:22 illern joined #salt
08:22 lero joined #salt
08:23 manji joined #salt
08:31 N-Mi joined #salt
08:31 N-Mi joined #salt
08:32 Sylvain31 MTecknology: hi, did you find something?
08:33 manji joined #salt
08:41 favadi joined #salt
08:41 flowstate joined #salt
08:44 deniszh joined #salt
08:59 garphy joined #salt
09:20 AndreasLutro - target: {{ salt['cmd.run']('realpath --relative-to=$(dirname ' ~ code_dir ~ '/' ~ symlink_dir ~ ') ' ~ static_dir ~ '/' ~ symlink_dir) }}
09:20 * AndreasLutro feels dirty
09:21 Ayo_ joined #salt
09:22 snaggleb joined #salt
09:29 dmaiocchi_ joined #salt
09:47 manji joined #salt
09:55 garphy joined #salt
09:57 guedressel joined #salt
09:58 Rumbles AndreasLutro, I ended up opening a bug on that iptables issue: https://github.com/saltstack/salt/issues/34060
09:58 saltstackbot [#34060]title: iptables.state doesn't handle mutliple match statements | ### Description of Issue/Question...
09:58 Rumbles thanks for your help
09:59 Rumbles it looks like state handles the rang correctly, but if you have multiple matches it gets all mixed up
09:59 Rumbles s/rang/range
10:11 mindscratch joined #salt
10:11 kbaikov joined #salt
10:13 mindscratch Is it possible to provide environment variables when running a command via command-line? Example, I want to run: salt '*' cmd.run 'echo $LANG'  ...I'd like to set/pass a custom environment variable when performing that command. Maybe, somethng like: salt '*' cmd.run 'echo $LANG' --env TEST=true
10:13 mindscratch I swore I saw an example somewhere, but can't find it
10:18 AndreasLutro wtf, why doesn't file.symlink allow relative paths?
10:18 AndreasLutro oh wait nvm
10:19 kbaikov joined #salt
10:19 AndreasLutro misleading error messages such a curse
10:21 felskrone joined #salt
10:25 favadi joined #salt
10:26 manji joined #salt
10:28 iceyao_ joined #salt
10:35 manji joined #salt
10:37 babilen mindscratch: cmd.run takes an env kwarg
10:37 Sylvain31 mindscratch: I you do: salt '*' cmd.run "echo $LANG" --env TEST=true
10:38 babilen (so just remove the dashes)
10:38 Sylvain31 it evals $LANG at shell level, you will have the value
10:38 babilen mindscratch: It is a list however, so pass it as "env='[.....]'"
10:39 Rumbles I just started to read through the iptables module build_rule, and I realy don't understand how it work :( guess I'm going to have to build ptables config by managing the iptables-save file and use iptables persist
10:40 babilen Rumbles: Are you looking for https://docs.saltstack.com/en/latest/ref/states/all/salt.states.iptables.html ?
10:41 babilen You could also manage something like ferm with saltstack
10:41 Rumbles thanks babilen but I found an issue with the way the state works: https://github.com/saltstack/salt/issues/34060
10:41 saltstackbot [#34060]title: iptables.state doesn't handle mutliple match statements | ### Description of Issue/Question...
10:41 favadi joined #salt
10:41 babilen Congratulations!
10:41 wangofett joined #salt
10:41 Sylvain31 mindscratch: that way
10:41 Sylvain31 mindscratch: salt '*' cmd.run 'echo $TEST' env='[{"TEST":"true"}]' ?
10:41 Rumbles thanks, I was trying to see if I could figure out how to fix it
10:42 Rumbles my python knowledge let me down :(
10:42 mindscratch Sylvain31: ah ok i was close :) thanks
10:43 babilen mindscratch: hey :(
10:44 Sylvain31 still a bit creepy to write… on command line.
10:45 babilen You *always* pass lists and dictionaries that way however
10:45 babilen So any kwarg behaves the same (which is why I said that it accepts the 'env' kwarg and that you pass it as env='[.....]')
10:46 babilen The documentation lists it as a list of dictionaries so you need a {'foo': 'bar'} in there
10:46 Electron^- joined #salt
10:47 mindscratch @babilen: say I have an env. variable on the salt master, TEST, that I want to set/pass to the minion, how can I get $TEST to be substituted in env='[{"TEST":????}]'
10:47 Sylvain31 babilen: thanks I guessed that, thanks.
10:47 mindscratch ..on the command-line the env is wrapped in single quotes to the local $TEST won't be interpolated
10:49 Sylvain31 mindscratch: export TEST=master_val;salt '*' cmd.run 'echo $TEST' env="[{'TEST':'$TEST'}]"
10:49 Sylvain31 bash "" eval var, '' don't
10:50 Sylvain31 use ${VAR} if you follows with _ like in var2="${var}_suffix"
10:51 netcho joined #salt
10:53 mindscratch Sylvain31: that did it, question, how do I pass multiple env's? I tried changing it to salt '*' cmd.run 'env|sort' env="[{'TEST':'$TEST', 'MSG':'hello'}]"  ...and I don't see MSG
10:53 mindscratch ..or TEST (when i run it with two variables)
10:53 babilen You pass multiple dictionaries
10:53 mindscratch doh! i see ...it's a list
10:54 babilen mindscratch: Look at the documentation on https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run
10:54 babilen It takes a list of dictionaries
10:54 Sylvain31 dictionaries of a single entry.
10:54 babilen (one for each)
10:54 babilen Think of it as a list of k/v pairs
10:55 mindscratch babilen: yup makes sense, just didn't sink in right away
10:56 mindscratch Syvain31 / babilen: either of you use salt orchestration? for example, to start services in a correct order across hosts?
10:56 babilen mindscratch: All kwargs behave that way and you need to "stringify" / escape them when you pass them on the command line
10:56 babilen We use a little bit of orchestration, yes
10:58 Sylvain31 babilen: We, how do you know I do !? ;)
10:59 babilen I'll make you if you don't
10:59 babilen (but I was referring to my company)
10:59 toanju joined #salt
10:59 mindscratch babilen: I have a case where I need to start service A (On a few servers), then I need to start service B once service A is "ready". currently, in the sls file I first have it start service A, then I have it execute a cmd (a bash script) that queries service A and doesn't exit until service A is "ready", then the command exist and the next thing in
10:59 mindscratch the SLS is to start service B
10:59 mindscratch ...is there a better way of doing that? (ensuring service A is ready, not just "running") before starting service B
11:00 amcorreia_ joined #salt
11:00 babilen mindscratch: Use events and fire one once "service A" is ready. Then react to it and continue with "service B"
11:00 amcorreia joined #salt
11:00 mindscratch babilen: mind blown ...all that would be handled in the sls file that I run with the orchestrate runner?
11:01 babilen Well, you could use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event but I was simply thinking of orchestration
11:01 babilen You can fire events with https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.event.html#salt.modules.event.fire_master (module)
11:02 babilen Or https://docs.saltstack.com/en/latest/ref/states/all/salt.states.event.html#salt.states.event.send (state)
11:02 babilen The former could be trivially integrated into an init script / unit file (salt-call ....) the latter into states
11:03 babilen The question is "How do you determine that service A is ready" and why the hell does it finish startup before it is?
11:03 traph joined #salt
11:03 traph joined #salt
11:04 babilen mindscratch: You could also use a beacon to which you react ... but it boils down to "How do you know that service A is ready?"
11:07 mindscratch babilen: so we have some services, where if you call "systemctl start <service>" ...go into "running" quickly, but aren't "ready" immediately b/c they have to coordinate with other instances to elect a leader, that sort of thing. As an example, we're running Mesos. We start up mesos-master processes on a few nodes, we'd like to make sure they've el
11:07 mindscratch ected a leader before starting up mesos-slave processes.
11:08 babilen How do you test that it's running?
11:09 babilen You could, presumably, relay the "mesos log" as beacon and react to it once it elected a leader
11:09 babilen (filter it to just have the "leader state")
11:10 babilen For salt the problem is obviously that systemd just tells it "It's fine and running" while that isn't actually true. So salt continues, while you can't use the service yet
11:11 honestly sounds like you need to make a custom script that will only return once the service is really up
11:12 mindscratch babilen: we can query an HTTP endpoint to check if it's done electing a leader, that's what we do in a bash script today (see the message earlier about how we get the service running, then execute a command that blocks until that service is "ready", then we start the next service)
11:14 babilen So, have that running as a beacon and relay suitable data to the salt event bus to which you react
11:14 babilen (that would be a salt based solution)
11:15 babilen But doesn't Zookeeper give you that information?
11:16 babilen So that you could query Zookeeper if that service is "up" and "usable" and relay that to saltstack?
11:17 babilen Pity about https://issues.apache.org/jira/browse/MESOS-3797 https://issues.apache.org/jira/browse/MESOS-1806 and https://issues.apache.org/jira/browse/MESOS-3574
11:18 babilen https://github.com/CiscoCloud/mesos-consul ?
11:18 babilen Anyway
11:20 mindscratch babilen: sure, we could also get the info from zookeeper
11:20 mindscratch babilen: yes...I've been keeping tabs of the ability to etcd or consul in place of zookeeper...maybe one day
11:21 babilen So, would sending an event be possible ? Or gathering it as a beacon?
11:22 mindscratch I haven't looked into beacons yet, but presumably if i can run something that gets the info I need to report if the service is ready or not then yes. I don't need/want salt to periodically send that info back on the event bus though...it's only of interest during this orchestration phase (bringing things up in the correct order)
11:22 babilen Okay
11:22 mackripeum joined #salt
11:23 babilen Look into these options. I can't really tell you how to do it exactly, but those are the tools that you might be able to utilise for this
11:23 babilen If you get mesos to send a single event once it has elected a leader *somehow* then you can use wait_for_event
11:24 mindscratch excellent, sounds like a better approach if i can get it working. thanks again for the help
11:25 babilen The "beacon" approach is more about ways to get events to the master, while "reactors" or "wait_for_event" is the "what to do once the event arrives" side
11:29 Sylvain31 salt.states.saltmod.wait_for_event appears on orchestration, could it appears on simple state too?
11:29 mindscratch thanks for the clarification. events seem like a nice idea, but perhaps not for this. I don't need each minion that might run the mesos-master to repeatedly report who the leader is...i just need to start them, wait for a leader then move on, it's a synchronous process I guess.
11:30 babilen Sylvain31: sure
11:31 amcorreia joined #salt
11:40 evle1 joined #salt
11:46 felskrone1 joined #salt
11:49 iceyao joined #salt
11:54 Miouge joined #salt
12:01 DarkKnightCZ Hi, is it possible to somehow use Compound Matchers (https://docs.saltstack.com/en/latest/topics/targeting/compound.html) via rest_cherrypy (https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html)? Thanks
12:03 ixeous joined #salt
12:05 thenut joined #salt
12:06 felskrone joined #salt
12:12 losh joined #salt
12:14 conrado joined #salt
12:14 TooLmaN joined #salt
12:15 numkem joined #salt
12:15 conrado__ joined #salt
12:16 conrado__ hi there
12:16 conrado__ I've got a quick question, not finding it in the docs
12:16 conrado__ when using apache.configfile, apache won't reload when changing the config
12:17 conrado__ 'watch' doesn't work, because it's not a managed file
12:19 west575 joined #salt
12:20 AndreasLutro watch works independently of state types, as long as the state reports changes
12:24 conrado__ sure, but when I add the file (created by apache.configfile) to my apache's watch statement I get "Comment: The following requisites were not found:"
12:30 fredvd joined #salt
12:31 AndreasLutro in that case it just means you put the wrong state id into one of your requisites
12:37 msn joined #salt
12:38 msn I am using the saltstack-formula for iptables with the followng pillar file http://paste.debian.net/739666/ but the service naems are not being read from pillar so only the ruules mentioned for default are being processed
12:39 XenophonF joined #salt
12:40 msn nvm found the problem
12:40 XenophonF how do i debug a minion?
12:40 Ahlee joined #salt
12:41 XenophonF if i start salt-minion on freebsd under hyper-v, the storage driver disconnects and the VM panicks
12:41 XenophonF clearly, a bug in freebsd's hyper-v drivers, but i need to track it down
12:41 XenophonF and to do that i want to find out what salt-minion's doing at startup
12:42 XenophonF any suggestions on how to proceed?
12:42 manji joined #salt
12:42 XenophonF also the problem only happens on freebsd 10.3---my 10.2 VMs are working fine
12:43 manji joined #salt
12:43 slav0nic joined #salt
12:43 rem5 joined #salt
12:45 squishypebble joined #salt
12:46 edrocks joined #salt
12:50 felskrone joined #salt
12:51 XenophonF joined #salt
12:51 west575_ joined #salt
12:54 gh34 joined #salt
13:01 DarkKnightCZ XenophonF: try "salt-minion -l debug" to strart the minion
13:04 komputes_ joined #salt
13:05 manji joined #salt
13:08 teryx510 joined #salt
13:19 colegatron joined #salt
13:20 nofxrok joined #salt
13:33 anotherZero joined #salt
13:37 hrumph joined #salt
13:37 hrumph hi
13:37 hrumph i am trying to understand some salt code
13:37 hrumph specifically https://github.com/saltstack/salt/blob/develop/salt/states/pkg.py
13:38 Rumbles any particular line?
13:38 babilen 20!
13:38 hrumph why do we have refresh=None instead of refresh=False in the param list for one thing. (line 629), and i've got more question about stuff in this file
13:38 bobbbby joined #salt
13:38 bobbbby hello
13:39 bobbbby I am using include in SLS file, to include another SLS
13:39 babilen hrumph: Because you like to differentiate between "unset" and "disabled"
13:39 babilen (generally speaking)
13:39 bobbbby but, the SLS I am including, is being executed before the SLS I am "including from"
13:39 bobbbby how do I make the included SLS execute after the SLS I am "including from"
13:39 flowstate joined #salt
13:40 bobbbby I cant find any specific ordering clause for that
13:40 manji bobbbby, use order: 1
13:40 manji or order: last
13:40 manji and user - require:
13:40 manji use*
13:40 bobbbby and that works on the include statement?
13:40 manji iirc
13:40 manji it should
13:40 hrumph babilen i don't know where in the code that distinction is being made but i'll keep an eye out
13:40 babilen bobbbby: You might also want to consider using explicit requisites between states
13:41 bobbbby I tried require as per the docs, but just got a bunch of errors
13:41 manji as in ?
13:41 bobbbby (syntax related)
13:41 manji :)
13:41 bobbbby sec
13:41 manji then fix the syntax :)
13:41 hrumph also guys i don't understand lines 1114-1116
13:41 babilen hrumph: It isn't in this case, but that is the general idea. Who knows if some module likes to use this differentiation later
13:42 babilen hrumph: https://github.com/saltstack/salt/blob/develop/salt/modules/aptpkg.py#L225 -- refresh is only evaluated in regard to its "truthy" value in this particular case
13:42 dyasny joined #salt
13:42 hrumph babilen, ok thanks. this is basically because i'm still new to python
13:43 bobbbby manji: seems I misread the docs and tried to implement the new syntax of include, when I am not running latest version
13:43 hrumph we have a boolean of form x or (y and x) so why not just say x?
13:43 bobbbby manji: thanks
13:43 babilen hrumph: This basically allows you to use "foo is None" and "if not foo"
13:43 roock joined #salt
13:43 mapu joined #salt
13:44 hrumph and why the usage of the bool function when shouldn't the results of the logical operators be boolean already?
13:44 babilen hrumph: The former is truthy *only* if the value hasn't been set (to either True or False) while the latter is truthy for both None and False
13:44 Sylvain31 joined #salt
13:44 hrumph babilen, ok
13:45 babilen hrumph: I guess line 1114 is a bug
13:46 babilen (those happen in some very rare cases)
13:49 babilen hrumph: Why do you care?
13:49 hrumph babilen, because i know how to fix one particular bug but i want to understand the code before I do a PR
13:50 felskrone joined #salt
13:55 gajdurbs joined #salt
13:57 TooLmaN joined #salt
13:58 ajv joined #salt
14:03 iceyao left #salt
14:04 conrado @AndreasLutro: found the problem
14:04 conrado watch:
14:04 conrado -file: /for/managed/ file
14:04 conrado - /for/state/config
14:04 s________ joined #salt
14:06 mpanetta joined #salt
14:06 gajdurbs joined #salt
14:07 ekristen joined #salt
14:08 _________ joined #salt
14:08 perfectsine joined #salt
14:18 teryx510 joined #salt
14:19 s________ joined #salt
14:21 UForgotten_ joined #salt
14:24 opdude_ joined #salt
14:25 knine joined #salt
14:29 punkoivan joined #salt
14:29 hasues joined #salt
14:29 hasues left #salt
14:30 punkoivan joined #salt
14:33 Luffy joined #salt
14:34 skeebump joined #salt
14:37 edrocks joined #salt
14:37 nofxrok joined #salt
14:39 asdasd joined #salt
14:39 asdasd left #salt
14:39 perfectsine joined #salt
14:40 keltim joined #salt
14:41 kaptk2 joined #salt
14:42 fracklen joined #salt
14:47 gngsk joined #salt
14:50 nshttpd joined #salt
14:55 corichar joined #salt
15:01 eriko_ joined #salt
15:02 erikols joined #salt
15:03 edrocks joined #salt
15:05 duncanmv joined #salt
15:05 onlyanegg joined #salt
15:09 iceyao joined #salt
15:09 opdude joined #salt
15:10 davidhoude joined #salt
15:11 kshlm joined #salt
15:12 numkem joined #salt
15:13 s________ joined #salt
15:17 fracklen joined #salt
15:18 ivanjaros joined #salt
15:18 west575 joined #salt
15:18 jenastar joined #salt
15:19 _JZ_ joined #salt
15:34 DarkKnightCZ joined #salt
15:34 kus joined #salt
15:35 s________ joined #salt
15:41 s________ joined #salt
15:41 murrdoc joined #salt
15:42 kingscott joined #salt
15:44 kingscott does anyone know how to require a plugin for CentOS before running a command in a salt state?
15:44 philpep joined #salt
15:45 Rumbles a plugin for CentOS?
15:45 kingscott the plugin is yum-plugin-security.
15:45 kingscott should have said yum.
15:46 Rumbles ah right
15:46 philpep hi, I cannot use cron module on centos 7 with salt 2016.3.1 (masterless). It end with __salt__['cron.set_job'] => LazyLoader => KeyError: 'cron.set_job'
15:46 Rumbles well if you create a state which includes the installtion of that plguin, then do a require in the state you write to the state which instals that plugin it should work
15:46 philpep any hint ?
15:47 kingscott alright i'll give that a try. I thought maybe i could do it in the same state.
15:47 Rumbles you can
15:48 philpep I anwser myself: missing crontab command ...
15:48 Rumbles just have it at the start of the file
15:48 kingscott cool. i'll give that a try.
15:49 Rumbles simply:
15:49 Rumbles yum-plugin-security:
15:49 Rumbles pkg.installed
15:49 Rumbles at the top of the state file should ensure it is installed before proceeding
15:53 kingscott Thanks.
15:53 Rumbles np :)
15:55 flowstate erm, how do you put a list in pillars?
16:00 lilvim joined #salt
16:03 pcn foo: [ 1, 2, 3, 4 ]
16:03 pcn flowstate: basically any of the ways you can represent it as yaml
16:03 flowstate ohhh, derp, it's just normal yaml
16:04 flowstate aaaand there's my stupid question for the week
16:04 flowstate thanks!
16:04 pcn https://docs.saltstack.com/en/latest/topics/yaml/#rule-three-dashes
16:04 pcn np
16:04 pcn It's more flexible than just yaml, but yaml is the default
16:07 Sylvain31 is /quit fin
16:08 onlyanegg joined #salt
16:14 bltmiller joined #salt
16:18 flowstate pcn: is there an easier way to verify that the correct pillars are being applied than to just show_context() in a state?
16:19 gajdurbs joined #salt
16:27 barajasfab joined #salt
16:37 woodtablet joined #salt
16:38 mpanetta_ joined #salt
16:39 nmadhok joined #salt
16:41 ixeous is there an example somewhere of using states.file.line?  I want to insert text after a certain line that is repeated in a file.  I think that I want to use the "exact case-sensitive fragment" option of after, but not sure how to define that in the sls file
16:41 edrocks joined #salt
16:42 bantone can someone think of a method as to I can run a kill signal on a bunch of salt servers..lets say 9 of them, but I want the spread out the signal a minute in between each minion
16:42 woodtablet for i in `cat list`; do salt '$i' kill; sleep 60; done
16:43 woodtablet =D
16:43 woodtablet there is probably a munch better way, but this came to mind before i have had my coffee
16:43 bantone hehe that would work.  need to work on my bash fu
16:45 bantone or --batch-wait
16:46 Lionel_Debroux joined #salt
16:47 antpa joined #salt
16:47 writtenoff joined #salt
16:49 flowstate joined #salt
16:51 mpanetta joined #salt
16:53 flowstat_ joined #salt
16:53 Electron^- joined #salt
16:54 Satyajit joined #salt
16:54 whitenoise joined #salt
16:56 kevops joined #salt
16:56 k_hubbard joined #salt
16:57 k_hubbard anybody have any thoughts on setting grains on the minion based off of values specified in xml files on the minion?
16:57 flowstate joined #salt
16:58 murrdoc sounds doable
16:58 k_hubbard cannot get file.grep to work - "not available"
16:58 rem5 joined #salt
16:58 murrdoc put in custom python code
16:58 k_hubbard ive hemmed and hawed over grains vs pillar and have settled on grains
16:58 k_hubbard yeah...
16:59 k_hubbard new to python ... could do it by calling powershell in a python wrapper lol
16:59 k_hubbard sounds cludgey
16:59 punkoivan joined #salt
16:59 k_hubbard is there an xml parsing lib included in the python distro with salt or would i need to import?
17:00 k_hubbard my minions are windows
17:01 k_hubbard xml.etree.ElementTree
17:03 druonysus joined #salt
17:04 flowstate joined #salt
17:04 druonysus joined #salt
17:05 edrocks joined #salt
17:05 manji joined #salt
17:06 dstokes joined #salt
17:09 murrdoc :)
17:10 gngsk_ joined #salt
17:10 Jogfat joined #salt
17:16 bltmiller joined #salt
17:18 woodtablet wrote a formula for pam_access, suggestions ? https://github.com/gwaters/pam_access-formula
17:18 woodtablet i want to join the salt club =D
17:19 woodtablet (note: this is my first formula, be gentle, and i will change it based on suggestions)
17:19 flowstate joined #salt
17:21 murrdoc its terrible
17:21 murrdoc be ashamed
17:21 murrdoc :P
17:21 murrdoc do you want that forked into github.com/saltstack-formulas ?
17:21 murrdoc woodtablet:  ^
17:22 woodtablet only after it has been verified that it is not terrible and shameful =D
17:23 murrdoc one recommendation https://github.com/saltstack-formulas/template-formula
17:23 murrdoc try to line up your formula with that formula
17:23 woodtablet that is what it is based upon
17:23 woodtablet but i didnt need a couple of the files, like config.sls
17:24 murrdoc cool
17:24 murrdoc thats an automatic non terrible-ation step
17:24 murrdoc there is a google group for formulas
17:24 woodtablet i love the public template btw, so thank you to whomever made it
17:24 murrdoc send an email there to request it gets pulled in
17:24 woodtablet ah ok
17:24 * murrdoc did :P
17:25 woodtablet ha
17:25 woodtablet thanks murrdoc!
17:25 murrdoc here https://groups.google.com/forum/#!forum/salt-formulas
17:26 woodtablet messaging them now =D
17:27 Jogfat joined #salt
17:28 Luffy left #salt
17:28 notnotpeter joined #salt
17:29 losh joined #salt
17:31 Rumbles joined #salt
17:31 murrdoc once its forked tho, you ll have to pull request changes
17:32 garphy joined #salt
17:35 Eugene joined #salt
17:37 slav0nic joined #salt
17:39 flowstate joined #salt
17:40 Aleks3Y joined #salt
17:43 wendall911 joined #salt
17:47 ajw0100 joined #salt
17:47 khubbard joined #salt
17:48 aasirc joined #salt
17:55 woodtablet thats fine
17:58 k_hubbard joined #salt
17:58 woodtablet rawr.
18:02 Slimmons joined #salt
18:03 dkrae joined #salt
18:04 nofxrok joined #salt
18:04 woodtablet how do i get a formula to tell me more information when its breaking ? i have an error, where I have added a stanza to jinja map. but it bawking. I am trying this: "salt -l error -v 'minion2' state.apply" and the error is the same. Error: Rendering SLS 'base:cert' failed: Jinja variable 'None' has no attribute 'pkgs'
18:05 woodtablet i know that minion2 has OSFamily specified in the map.jinja, and that the stanza has a pkgs key
18:08 pcn Where should I go if I see a massive security problem in salt next time?
18:08 pcn https://docs.saltstack.com/en/latest/topics/releases/2015.8.8.html#salt-2015-8-8 says that trying to explain that issue on the mailing list at https://groups.google.com/forum/#!searchin/salt-users/netapi/salt-users/fRTGHDARrDE/HMLejTD1AAAJ wasn't sufficient.
18:09 gngsk_ joined #salt
18:09 nmadhok joined #salt
18:11 woodtablet nevermind, the formula was looking for os, not os_family.. time for a pull request
18:13 Miouge joined #salt
18:16 mapu joined #salt
18:17 punkoivan joined #salt
18:18 druonysus joined #salt
18:18 Rumbles joined #salt
18:19 punkoivan joined #salt
18:19 leev joined #salt
18:22 cyborg-one joined #salt
18:25 Miouge joined #salt
18:25 whitenoise joined #salt
18:29 hasues joined #salt
18:38 Rumbles joined #salt
18:38 manji joined #salt
18:39 gajdurbs joined #salt
18:40 mavhq joined #salt
18:57 gajdurbs joined #salt
18:58 Bloodshot @pcn Oh, hey, I reported that issue
18:59 Bloodshot Looks like I wasn't the first to find it
18:59 Bloodshot I followed https://docs.saltstack.com/en/latest/security/index.html and e-mailed security@saltstack.com
19:00 Bloodshot I think the key was including a small reproducible case of how that behaviour can lead to privilage escalation
19:00 Bloodshot (Trying to auth against the PAM service chsh, for example)
19:05 toanju joined #salt
19:06 hasues joined #salt
19:19 teryx510 Hey guys, is there a way to force order when using include?
19:20 teryx510 I have two sls files that I'm calling, but they are running out of the order I need.
19:20 iggy__ use requisites?
19:20 iggy__ it's a list, they should run in order
19:21 teryx510 hmm…okay, let me go back and have another look.
19:22 mward @teryx510 If you're still having issues, try posting the SLS files somewhere and linking them here so we can take a look.
19:23 Jogfat timid newbie question: has anyone managed to get mysql-server-5.7 from oracle repo to install via Saltstack…just hangs there and never finishes. Google shows others with similar issue, but no resolutions...
19:23 Jogfat ubuntu-14 LTS
19:24 iggy__ Jogfat: do the packages ask questions during install?
19:24 iggy__ If so, try setting some debconf stuff
19:24 Jogfat yes, and i’ve used debconf to try and answer them.
19:24 teryx510 iggy__: Yeah, had a bug in my state. Thanks.
19:26 Jogfat if i cancel the provision and shell in it looks like package did install. is there anyway for me to debug this?
19:27 flowstate joined #salt
19:31 jschoolcraft joined #salt
19:34 wangofett joined #salt
19:35 iggy on a clean box, run a `salt-call -l debug state.highstate` and see at what point it's actually hanging
19:36 bltmiller joined #salt
19:39 wangofett joined #salt
19:42 Muchoz joined #salt
19:42 ixeous what is the best way to ensure that a file contains a specific line at multiple locations in a file?  specifically, I'm trying to set priority= in the CentOS-Base.repo file.  The file has multiple defined repos and each one should have a priority.  Using states.file.line gives an error "Found more than expected occurrences in "after" expression", file.sed says it''s deprecated, and cmd.run with sed will add a new priority= line each time it's
19:44 toanju joined #salt
19:45 mapu joined #salt
19:49 Jogfat it seems be hanging on the pkg.installed state for the server
19:49 Jogfat [INFO    ] Executing state pkg.installed for mysql-community-server
19:49 Jogfat [DEBUG   ] Could not LazyLoad pkg.normalize_name
19:49 Jogfat [DEBUG   ] Could not LazyLoad pkg.check_db
19:49 Jogfat [DEBUG   ] Could not LazyLoad pkg.normalize_name
19:49 Jogfat [INFO    ] Executing command ['apt-get', '-q', '-y', '-o', 'DPkg::Options::=--force-confold', '-o', 'DPkg::Options::=--force-confdef', 'install', 'mysql-community-server'] in directory '/home/vagrant'
19:49 Jogfat is there any way to have the state output what it is going on in that apt-get call?
19:52 jfindlay ixeous: patching files is difficult.  You could try either stating the repo with repo.managed (recommended) or manage the whole file with salt with a file.managed
19:55 ixeous i thought about file.managed, but i have multiple versions of the OS each of which has slightly different content (CentOS 6 vs CentOS 7).
19:55 ixeous i was hoping to abstract things a bit more
19:55 iggy Jogfat: no, it doesn't know what apt-get is doing internally
19:55 Jogfat ok
19:56 jfindlay ixeous: you might try file.managed
19:56 jfindlay oh, I see what you are saying
19:56 ixeous i may have to.  thanks
19:56 iggy Jogfat: I'd suggest doing what I initially said... check for any debconf settings using a manual install and then put those into a state that runs before the pkg.installed
19:56 jfindlay ixeous: you can try file.managed and template it in the sls file with jinja
19:57 jfindlay or template the file itself with jinja
19:57 ixeous possibly.  i'm still a newbie with salt and haven't really tried jinja yet
19:58 mpanetta_ joined #salt
19:58 Jogfat can you not manage it with pkgrepo states?
19:58 iggy Jogfat: i.e. we use debconf.set to set `percona-xtradb-cluster-server/root_password` and `percona-xtradb-cluster-server/root_password_again` for Percona
19:59 iggy that will obviously be slightly different for what non-percona packages
19:59 Jogfat i get waht your saying. I’ve tried setting that a couple ways.
19:59 Jogfat handle install prompts:
19:59 Jogfat debconf.set:
19:59 Jogfat - name: mysql-community-server
19:59 Jogfat - data:
19:59 Jogfat 'mysql-community-server/root-pass': {'type': 'password', 'value': 'blah'}
19:59 Jogfat 'mysql-community-server/re-root-pass': {'type': 'password', 'value': 'blah'}
19:59 Jogfat 'mysql-community-server/data-dir': {'type': 'select', 'value': ''}
19:59 Jogfat - require:
19:59 Jogfat - pkg: Install mysql salt deps
20:00 Jogfat i’ll keep working on it
20:00 pzipoy joined #salt
20:00 bltmiller Jogfat: you might want to try pasting that into a github gist or pastebin in the future :)
20:00 Jogfat sorry…irc noob
20:00 Jogfat thanks
20:01 bltmiller no worries, every IRC master was once a noob
20:10 TTimo joined #salt
20:11 TTimo left #salt
20:12 Jogfat ixeous: have you already tried pkgrepo.managed?
20:13 MindDrive So... as of 2015.8, there's the new TCP transport.  The docs tell you how to use a different transport if you're installing via pip, which is cool, but... I'm using the Redhat repository RPMs.  How does one change the transport _after_ the fact?  Can it even be done?
20:13 flowstate joined #salt
20:13 MindDrive (The repository has the tornado packages, so I'm guessing "yes", but... damned if I can find the information anywhere.)
20:14 iggy it's master and minion settings
20:14 jfindlay MindDrive: set `transport: tcp` in your master and minion configs
20:14 iggy the last I heard, you couldn't run zmq and tcp in the same master
20:14 iggy so it's tough to roll out if you have a decent number of guests
20:14 jfindlay iggy: https://github.com/saltstack/salt/pull/33989
20:14 saltstackbot [#33989]title: Enable transport fallback | ### What does this PR do?...
20:15 iggy saltstackbot: you could be more helpful if you told me if that was merged or not
20:15 iggy oh wait, I think I wrote that module
20:15 babilen iggy: You could presumably use salt-ssh with the cache roster
20:16 iggy if you have ssh keys all setup
20:16 babilen We do
20:16 iggy and not 25000 machines
20:16 punkoivan joined #salt
20:16 fracklen joined #salt
20:17 punkoivan joined #salt
20:17 babilen Absolutely
20:18 babilen AWESOME :)
20:18 babilen I like that PR
20:19 pcn Bloodshot: that's a better case than what I used as a hypothetical in the mailing list
20:21 iggy cool, the api returns state so I can actually tell if something is merged
20:21 * iggy hacks
20:22 ixeous jogfat: no, i wasn't aware of that one
20:22 ixeous I'll look into it
20:22 Rumbles joined #salt
20:23 Jogfat it might be able to help. https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
20:24 ixeous i'll check it out.  thanks
20:25 * hacks iggy
20:25 jfindlay lol
20:26 amcorreia joined #salt
20:27 choopooly joined #salt
20:31 Muchoz joined #salt
20:31 flowstate joined #salt
20:37 Joe630 hi all, is there a list of variables available for use when jinja renders deploy scripts in salt-cloud?
20:37 Joe630 I know there is a dict called vm
20:37 Joe630 I would really like to get the domain name
20:38 Joe630 the domain name of the salt master
20:44 Muchoz joined #salt
20:45 dkrae1 joined #salt
20:49 punkoivan joined #salt
20:50 kevinquinnyo i'm working on some changes to a salt module (in core salt), is there a guide for the "doc-block" style that i can read?
20:50 Muchoz joined #salt
20:50 kevinquinnyo so my doc block is consistent
20:51 jfindlay kevinquinnyo: basically you use rst
20:52 kevinquinnyo ok thanks
20:53 kevinquinnyo do you guys use it to generate api documentation?
20:53 jfindlay yes
20:53 jfindlay I think we use sphinx
20:53 kevinquinnyo cool, ok thanks
20:53 iggy it's sphinx with some custom modules
20:58 mpanetta_ joined #salt
21:01 juanito_ joined #salt
21:04 mpanetta joined #salt
21:05 rem5 joined #salt
21:10 Joe630 I'm doing this , but I feel like there is a better way:
21:10 Joe630 DOMAIN={{'.'.join(vm['minion']['master'].split('.')[1:])}}
21:11 k_hubbard xml.etree.ElementTree worked well to set grain data from xml
21:12 fracklen joined #salt
21:13 Joe630 is that accessible when I'm doing a salt-cloud deploy?
21:13 Joe630 I'm putting this in my deployment script
21:16 bltmiller joined #salt
21:17 dkrae joined #salt
21:20 Netwizard joined #salt
21:20 debian112 anyone know where I can get old versions of salt-minion rpms?
21:22 Joe630 http://repo.saltstack.com/yum/redhat/7/x86_64/archive/
21:22 iggy https://github.com/saltstack/salt/pull/33989
21:22 saltstackbot [#33989][MERGED]  Enable transport fallback | What does this PR do?...
21:22 murrdoc woah
21:22 murrdoc iggy:  needs work at $dayjob
21:22 * murrdoc snitches
21:23 debian112 Joe630, thanks, I need to go back older than that
21:23 debian112 salt-minion-2014.7.0-3.el7
21:24 iggy I'm blocked by netops
21:24 Ayo_ joined #salt
21:24 jfindlay debian112: there is a site that hosts archived versions of CentOS.  I don't remember what it is called
21:28 Joe630 http://vault.centos.org/
21:30 nmadhok joined #salt
21:41 rem5 joined #salt
21:42 seblu joined #salt
21:43 flowstate joined #salt
21:51 west575 joined #salt
22:00 Rumbles joined #salt
22:02 Rumbles joined #salt
22:02 rem5 joined #salt
22:03 flowstate joined #salt
22:16 rem5 joined #salt
22:18 amcorreia joined #salt
22:21 hasues left #salt
22:31 keimlink joined #salt
22:34 bltmiller joined #salt
22:36 zenlot joined #salt
22:40 flowstate joined #salt
22:51 mTeK joined #salt
22:52 ajw0100 joined #salt
22:53 DEger joined #salt
23:01 flowstate joined #salt
23:03 edrocks joined #salt
23:07 fannet joined #salt
23:12 stooj Hey all. I'm writing a state file and I'm inside a for loop ({% for user, data in pillar['syncthing'] %}). I'd like to have a conditional block inside that loop, with the {{ user }} value used as a key. Something like: ({% if salt['pillar.get']('syncthing' ~ {{ user }} ~ ':blob') %}). Is there a way of doing this? Embedding a pre-existing jinja variable inside a conditional block?
23:20 ahammond On the salt master, I can run sudo salt-call event.send af/cloud/destroy/devops-ah-test-2345 and see what I'd expect (output listing the minion's IPs)
23:21 ahammond I have a #!py reactor that wants to do the same thing: minion_ips = __salt__['mine.get'](minion_id, 'network.ip_addrs')  but this ends up with minion_ips == {}
23:21 ahammond I see in the docs that when running on the salt master, I should use   salt-run mine.get '*' network.interfaces
23:22 ahammond however... I don't see how do do this from the context of a reactor. At this point, I'm considering creating an orchestration and firing that from the reactor. Is this the correct approach?
23:23 woodtablet left #salt
23:30 Muchoz joined #salt
23:35 fannet joined #salt
23:37 Muchoz_ joined #salt
23:40 flowstate joined #salt
23:44 Jogfat_ joined #salt
23:52 smkelly joined #salt
23:58 keimlink_ joined #salt
23:59 stooj Is there some easy way of testing jinja syntax? I've got my states in a git repo, so I make a change, commit, wait a minute, run state.apply and see if it works. This doesn't strike me as "ideal" :p

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary