Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-28

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

All times shown according to UTC.

Time Nick Message
00:02 bhosmer joined #salt
00:03 bhosmer_ joined #salt
00:04 bhosmer joined #salt
00:05 smcquay joined #salt
00:05 seanz joined #salt
00:07 combusean joined #salt
00:09 redondos joined #salt
00:34 jacksontj joined #salt
00:42 ipalreadytaken joined #salt
00:42 manfred Gareth: did you get it to work?
00:43 combusean joined #salt
00:43 to_json joined #salt
00:48 alainv can anyone tell me why this would give me a "not formed as a list" error? http://paste.roguecoders.com/p/18fa3c2e5f3e4a6114c185c01fe4e1de.txt
00:48 manfred alainv: - pkgs:
00:48 alainv it looks taken straight from the docs to me :s
00:49 alainv http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
00:49 manfred alainv: http://paste.gtmanfred.com/chQRu/
00:49 alainv argh
00:49 alainv thank you
00:49 manfred alainv: that has a - :P
00:49 alainv it might be time to go home :p
00:50 manfred :)
00:52 Gareth manfred: yup. Put it back to how I had it before.
00:52 manfred cool
00:53 Gareth bbl
00:53 manfred o/
00:54 Amanda left #salt
00:54 ZombieFeynman joined #salt
00:57 to_json joined #salt
00:58 detroitish joined #salt
01:04 TyrfingMjolnir joined #salt
01:08 bigl0af_ joined #salt
01:08 Voziv joined #salt
01:09 sifusam joined #salt
01:10 jrdx joined #salt
01:11 cruatta joined #salt
01:11 cruatta wow
01:17 jalbretsen joined #salt
01:18 ipalread_ joined #salt
01:21 jslatts joined #salt
01:25 oz_akan_ joined #salt
01:25 rgbkrk joined #salt
01:26 ZombieFe_ joined #salt
01:28 TyrfingMjolnir joined #salt
01:32 cruatta joined #salt
01:37 cruatta_ joined #salt
01:46 ZombieFeynman joined #salt
01:46 ipalreadytaken joined #salt
01:54 mgw joined #salt
01:56 redondos joined #salt
01:56 redondos joined #salt
01:59 redondos joined #salt
01:59 redondos joined #salt
02:01 kiorky joined #salt
02:02 schimmy joined #salt
02:02 ckao joined #salt
02:03 cruatta_ o
02:05 krow1 joined #salt
02:05 schimmy1 joined #salt
02:07 cruatta joined #salt
02:10 mateoconfeugo joined #salt
02:13 stanchan joined #salt
02:13 mateocon_ joined #salt
02:16 [vaelen] joined #salt
02:17 bn_ joined #salt
02:19 bn_ hi, salt v2014.1.4, newbie question:  is it legal to target servers in a top.sls via:  'foo[1-3]' where foo1, foo2, and foo3 are the server names?
02:20 oz_akan_ joined #salt
02:21 redondos joined #salt
02:25 tyler-baker left #salt
02:29 dccc_ joined #salt
02:31 funzo_ joined #salt
02:31 vbabiy_ joined #salt
02:32 DaveQB_ joined #salt
02:32 alekibango_ joined #salt
02:33 fatbox joined #salt
02:34 jpaetzel joined #salt
02:34 Nazca__ joined #salt
02:39 possibilities joined #salt
02:42 googolhash joined #salt
02:42 ipalreadytaken joined #salt
02:45 Outlander_ joined #salt
02:48 ajw0100 joined #salt
02:52 MTecknology bn_: yup, -match:regex iirc
02:52 MTecknology or maybe pcre
02:52 schimmy joined #salt
02:56 schimmy1 joined #salt
03:01 programmerq joined #salt
03:03 Networkn3rd joined #salt
03:08 dancat joined #salt
03:11 tristianc joined #salt
03:17 bn_ MTecknology:  thanks, seems to be the latter ("- match: pcre") according to http://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions
03:19 possibilities joined #salt
03:30 mgw joined #salt
03:33 Networkn3rd joined #salt
03:34 cruatta joined #salt
03:34 aqua^^ joined #salt
03:41 seanz left #salt
03:44 catpigger joined #salt
03:46 mateoconfeugo joined #salt
03:48 ecdhe joined #salt
03:57 joehillen joined #salt
04:01 ZombieFeynman joined #salt
04:01 mgw joined #salt
04:10 schimmy joined #salt
04:11 Furao joined #salt
04:12 travisfischer joined #salt
04:13 kermit joined #salt
04:14 pydanny joined #salt
04:15 schimmy joined #salt
04:22 Outlander_ joined #salt
04:28 ZombieFeynman joined #salt
04:28 thayne joined #salt
04:32 brucelee_ joined #salt
04:35 ajolo joined #salt
04:36 brucelee_ joined #salt
04:37 combusean joined #salt
04:37 n8n joined #salt
04:37 londo_ joined #salt
04:40 smcquay joined #salt
04:40 mateoconfeugo joined #salt
04:41 possibilities joined #salt
04:43 brucelee_ joined #salt
04:44 felskrone joined #salt
04:44 timc3 joined #salt
04:49 Outlander_ joined #salt
04:55 ajw0100 joined #salt
05:03 londo_ joined #salt
05:04 kayakn joined #salt
05:09 malinoff joined #salt
05:13 ipalreadytaken joined #salt
05:16 oz_akan_ joined #salt
05:20 pentabular joined #salt
05:25 rgbkrk_ joined #salt
05:26 smcquay joined #salt
05:29 jalaziz joined #salt
05:31 stanchan_ joined #salt
05:33 bhosmer joined #salt
05:41 bn_ is it possible to run the functions specified in the mysql salt module (http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html) within an sls VS the CLI?  If so, how?
05:43 malinoff http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
05:46 bn_ ex:  I want to run "CHANGE MASTER..." with some custom pillar values.  Do I do that via salt.modules.mysql.query, would I just do:  {{ salt['mysql.query']('master', 'CHANGE MASTER...' }}?  If so, how do I concat the pillar values inline?
05:46 oz_akan_ joined #salt
05:46 anuvrat joined #salt
05:54 thayne joined #salt
05:57 malinoff bn_, http://jinja.pocoo.org/docs/templates/#join
05:59 Luke_ joined #salt
06:02 mateoconfeugo joined #salt
06:05 lol joined #salt
06:06 roolo joined #salt
06:07 picker joined #salt
06:13 vvoody joined #salt
06:39 rdorgueil joined #salt
06:47 oz_akan_ joined #salt
06:49 hartym joined #salt
06:49 hartym joined #salt
06:50 toastedpenguin joined #salt
06:55 pydanny joined #salt
07:01 ml_1 joined #salt
07:06 slav0nic joined #salt
07:10 krow joined #salt
07:11 Zuru joined #salt
07:12 aqua^^ joined #salt
07:12 martoss joined #salt
07:15 acu joined #salt
07:18 Kenzor joined #salt
07:18 ankur_ joined #salt
07:19 anuvrat joined #salt
07:20 ankur_ if we setup master minion setup using salty vagrant, from where do we run master commands
07:25 xu joined #salt
07:25 krow joined #salt
07:26 martoss1 joined #salt
07:33 peno joined #salt
07:35 ajolo joined #salt
07:39 CeBe joined #salt
07:47 oz_akan_ joined #salt
07:49 slav0nic joined #salt
07:49 slav0nic joined #salt
07:49 N-Mi joined #salt
07:51 gildegoma joined #salt
07:56 hartym joined #salt
07:58 lomithrani joined #salt
07:59 tinuva joined #salt
08:01 milo` joined #salt
08:05 londo_ joined #salt
08:09 darkelda joined #salt
08:11 TyrfingMjolnir joined #salt
08:12 pwistrand joined #salt
08:17 hartym joined #salt
08:21 lomithrani Hi guys , can I do something like this ? http://pastebin.com/fy6cijF4  manage a file and then replace a string in it. I can do one or the other but I don't manage to do both at the same time
08:25 superted joined #salt
08:35 N-Mi joined #salt
08:40 orbit_darren joined #salt
08:45 aw110f joined #salt
08:46 catpig joined #salt
08:47 linjan joined #salt
08:48 oz_akan_ joined #salt
08:57 zooz joined #salt
08:59 giantlock joined #salt
09:11 hartym joined #salt
09:16 rogst lomithrani: I think you need to specify which template to use e.g. add - template: jinja
09:17 fneves joined #salt
09:17 fneves Hi all
09:17 fneves I am trying to set a pillar containing some nested properties
09:17 rogst lomithrani: I havn't looked at how - replace works, but if you use - template: jinja you can add {{ grains['id'] }} directly in the file
09:18 fneves how can I then override one of this properties
09:18 fneves in a different sls?
09:18 fneves I mean, on a pillar included after the original one
09:20 ggoZ joined #salt
09:30 lomithrani thanks rogst :( too bad I don't know anything about jinja / python I figured out it would work with jinja I just hoped for an easy solution :)
09:32 lomithrani rogst: just a quick tip , my fuction like {{ grains['id'] }} and such I would put them directly in my index.html that is the source on my master ?
09:33 scalability-junk joined #salt
09:34 rogst lomithrani: Correct, when using jinja as template you just add {{ grains['id
09:34 rogst lomithrani: {{ grains['id'] }} in the source file on the master
09:34 rogst lomithrani: you can also use pillar variables with {{ pillar['variable name'] }}
09:35 lomithrani ok that is actually an easy solution :) I was trying to modify the tempalte in the sls . Thank you verry much !
09:35 rogst lomithrani: your welcome
09:36 rogst lomithrani: if the grains item is a list as with the ipv4 grain, you need to add the list index to get the correct string e.g. {{ grains['ipv4'][0] }} :)
09:40 lomithrani grains id works like a charm , I just needed that to see if my loadbalancers where well parametered :)
09:42 lomithrani what is the best pratice btw , for automated isntallation ? put everything in the init.sls and call it with  state.highstate ? , because my init.sls starts growing at an alarming state :D
09:49 oz_akan_ joined #salt
09:49 anuvrat joined #salt
09:50 H0tBird joined #salt
09:51 oz_akan_ joined #salt
09:51 H0tBird Hello all
09:52 H0tBird I am running salt-2014.1.3-1.el6.noarch in CentOS 6.4/6.5
09:52 H0tBird this is not working:
09:52 H0tBird [root@salt01.ofi ~]# salt -X test.ping cmd.run 'hostname'
09:53 H0tBird No minions matched the target. No command was sent, no jid was assigned.
09:54 bezaban you need to target some hosts
09:54 H0tBird Can someone confirm this works or shoyld work?
09:54 bezaban either salt '*' or match by some other method
09:55 bezaban also I'm not sure you can run multiple commands on oone command
09:55 bezaban salt '*' test.ping will work
09:55 martoss1 left #salt
10:00 lomithrani Why does sometimes my salt '*' state.highstate return just a part of the state supposed to execute ?
10:01 lomithrani when they all respond to ping
10:01 H0tBird the selector is -X test.ping
10:03 lomithrani are you sure the return code of test.ping is a valid selector ?
10:04 nkuttler lomithrani: tried a bigger timeout?
10:05 lomithrani Hotbird:according to what I look at it just returned true
10:05 timc3 joined #salt
10:05 lomithrani nkuttler: I'll try that but i never had to and it always worked
10:07 lomithrani don't you just want to run 'hostname'  on all your minions ? then why "use -X test.ping" and not '*' directly ?
10:22 cewood joined #salt
10:23 H0tBird lomithrani: that is not my intention, I just want to point out that -X (--exsel) seems broken
10:24 H0tBird what should a valid selector return?
10:28 Luke__ joined #salt
10:38 oz_akan_ joined #salt
10:39 H0tBird man salt says: -X, --xsel Instead of using shell globs, use the return code of a function.
10:39 H0tBird sorry, I mean --exsel
10:40 H0tBird test.ping returns True
10:41 londo_ joined #salt
10:41 scalability-junk joined #salt
10:43 fneves Hi. Is there anyway of extending a pillar?
10:43 babilen fneves: No, not yet
10:44 fneves any workaround?
10:46 Outlander joined #salt
10:53 diegows joined #salt
11:09 cewood left #salt
11:22 TyrfingMjolnir joined #salt
11:36 ser_rhaegar joined #salt
11:37 agronholm heh, I asked this too the other day
11:38 agronholm fneves: templates
11:39 oz_akan_ joined #salt
11:41 jrdx joined #salt
11:42 jrdx joined #salt
11:52 rd__ joined #salt
11:57 jas-_ joined #salt
12:06 MrTango joined #salt
12:11 TyrfingMjolnir joined #salt
12:13 jslatts joined #salt
12:22 bn_ joined #salt
12:24 bn_ hi, salt v2014.1.4, how does one comment out a line in an .SLS?  I don't see it readily described in the docs, can you just use "#" inline?
12:26 pentabular joined #salt
12:26 Lomithrani_ joined #salt
12:26 ser_rhaegar joined #salt
12:26 bn_ n/m, that seems to be it based on looking at the mysql formula
12:31 ml_1 joined #salt
12:31 viq bn_: yeah, and look up YAML syntax if you want to know more
12:33 fragamus joined #salt
12:37 [diecast] joined #salt
12:53 miqui joined #salt
12:54 bhosmer joined #salt
12:58 jaycedars joined #salt
12:59 ipmb joined #salt
13:03 londo_ joined #salt
13:06 resmike joined #salt
13:08 cpowell joined #salt
13:08 racooper joined #salt
13:11 dude051 joined #salt
13:12 oz_akan_ joined #salt
13:12 MK_FG joined #salt
13:12 MK_FG joined #salt
13:13 babilen Can I keep custom grains in _grains on gitfs ?
13:16 mpanetta joined #salt
13:17 millz0r joined #salt
13:21 H0tBird too bad --exsel is no longer supported: https://github.com/saltstack/salt/pull/9305 (was useful to me)
13:26 to_json joined #salt
13:27 oz_akan__ joined #salt
13:32 marnom left #salt
13:33 whg left #salt
13:33 babilen Do I have to perform any special magic to enable custom grains on a masterless box?
13:35 timoguin should just be able to drop them into _grains
13:35 timoguin althought gitfs isn't working for masterless yet
13:36 babilen Okay, I am doing something wrong then. Let me prepare a paste. One second.
13:38 babilen http://paste.debian.net/102228/ is what I am seeing/doing right now.
13:39 babilen Well, I had just the function + import os.path in there first (guess the rest is superfluous)
13:40 timoguin I'm guessing you've tried restarting the minion?
13:40 babilen Multiple times
13:41 babilen I could push it to some actual infrastructure, but I'd prefer to have it running in my test environment first. I also have a master/minion setup that I could try ...
13:41 ser_rhaegar joined #salt
13:42 babilen But that should, generally speaking, work? (i.e. add python module to /srv/salt/_grains/ (sync to minions if on master), define methods in there that return dictionaries that are then being merged ?
13:42 babilen (
13:44 timoguin I don't see anything wrong. Looks like it should work.
13:44 timoguin looking at the grains doc i see /etc/salt/grains as a place to put them too
13:44 timoguin but _grains should still work
13:44 dude051 joined #salt
13:45 babilen I'll see how it behaves with /etc/salt/grains and on non-masterless setups.
13:45 bhosmer_ joined #salt
13:45 GradysGhost joined #salt
13:51 ser_rhaegar joined #salt
13:51 babilen Hmm, can't get it to run on my master/minion setup either. Where would I found synced grains on the minions? /var/cache/salt ?
13:52 bn_ viq:  thanks
13:52 timoguin babilen: i'm not sure. don't have any custom grains to test with atm
13:53 vejdmn joined #salt
13:54 babilen Okay - I'll play a bit more.
13:58 mapu joined #salt
13:59 mattmtl joined #salt
13:59 jeddi Is there an easy / neat / elegant / idiot-friendly way of profiling what parts of my salt highstate is taking so long to parse and/or run?
14:01 babilen timoguin: Will I have to explicitly specify file_roots ?
14:01 ashb jeddi: one idea might be to try to change the log format to include timestamps
14:01 ashb not very 'complete' a solution but might give you something
14:01 babilen No, that should just use the default
14:04 timoguin babilen: yea, the default should work fine
14:04 babilen The only thing we do a bit differently is that we do not run the salt-master as root but as "salt"
14:05 babilen Apart from that it is a perfectly normal GitFS based setup. Just can't seem to get my custom grain to the minions at all.
14:05 rgbkrk joined #salt
14:06 timoguin ran a saltutil.sync_all from the master to minions?
14:06 babilen I ran saltutil.sync_grains
14:06 timoguin hmm, that should do it too.
14:07 chiui joined #salt
14:08 babilen *shrug*
14:08 babilen My problem would be so easy to fix if I could only get this working :-/
14:10 ser_rhaegar joined #salt
14:10 ajprog_laptop joined #salt
14:11 ajolo joined #salt
14:11 jeddi ashb: mmm ... inneressing.   and bump up log verbosity to insane?   let me try.
14:12 rdorgueil joined #salt
14:13 hunter_ joined #salt
14:15 jaimed joined #salt
14:16 hartym joined #salt
14:16 xmj joined #salt
14:17 jeddi I went through a while ago and changed all my (singular) pkg installs to be (plural) pkgs: with a bit o' jinja to feed a hundred or so into place .. I'd been hoping that was the big delay as it did an apt-get install on each of those separately.   apparently not the case.
14:24 ZombieFeynman joined #salt
14:26 pwistrand joined #salt
14:30 jalbretsen joined #salt
14:31 pdayton joined #salt
14:31 thayne joined #salt
14:35 krichardson joined #salt
14:36 shwaiil Q: Just tested adding mysql_database to my - require: statement, but failed. - mysql_user: foo, worked fine, so I assumed mysql_database: foo, would too. I'm working on a mysql_grants.present state
14:36 ser_rhaegar joined #salt
14:36 shwaiil Any tip how to use mysql_database on the require list for a mysql_grants state ? Thanks!
14:39 krichardson joined #salt
14:41 vbabiy joined #salt
14:41 alunduil joined #salt
14:41 Networkn3rd joined #salt
14:43 viq shwaiil: show your sls files
14:44 felskrone joined #salt
14:44 ZombieFeynman joined #salt
14:44 shwaiil I find that I've actually did this in a different state and worked. But for that case, I've got a state to create the db. This mysql_grants I don't, just named the database. Not sure if it was related.
14:45 shwaiil I just removed it at the moment, I'll look into that later. Thanks for looking viq
14:46 timc3 joined #salt
14:48 thedodd joined #salt
14:49 ser_rhaegar joined #salt
14:50 babilen timoguin: Could I have _grains in my GitFS if I don't use a masterless setup?
14:52 Networkn_ joined #salt
14:52 timoguin babilen: yes it should work the same
14:53 thedodd joined #salt
14:53 eriko joined #salt
14:54 babilen ta!
14:56 ZombieFe_ joined #salt
14:57 Nazca__ joined #salt
14:57 krichard1on joined #salt
14:58 krichard1on joined #salt
15:00 travisfischer joined #salt
15:01 tyler-baker joined #salt
15:01 krichardson left #salt
15:02 krichard1on joined #salt
15:04 otter768 joined #salt
15:11 hunter_ joined #salt
15:13 m1k[3y] left #salt
15:13 jaycedars joined #salt
15:16 ajolo joined #salt
15:17 cpowell joined #salt
15:20 duddle joined #salt
15:20 UtahDave joined #salt
15:20 duddle hi! how can I list the available state modules on a minion? I seem to have an older version of salt which doesn't yet have a module that is listed in http://docs.saltstack.com/en/latest/ref/states/all/
15:22 wendall911 joined #salt
15:22 UtahDave duddle: salt 'minion-id' sys.list_functions
15:23 UtahDave or     salt 'minion-id' sys.doc       if you want the docstrings for them all
15:23 schimmy joined #salt
15:25 duddle oh, I found my error. for state mongodb_database / mongodb_user, you need to have module.mongodb which needs PyMongo. it's obvious, but a small note in the doc of the states would be nice
15:25 duddle thanks, though :)
15:25 mwr54 joined #salt
15:27 schimmy1 joined #salt
15:28 Heartsbane Anyone have any good state examples of "if <directory> exists then do this"
15:28 Heartsbane I think I have my syntax wrong
15:30 mwr54 I'm trying to create a postgres database and while it works the first time, I get an error on subsequent calls
15:30 mwr54 here's the output: https://gist.github.com/mr/ae9902f3002cfa149c7b
15:30 mwr54 it says that the parameters are wrong, but they appear to all be correct
15:31 timoguin Heartsbane: {% if salt['file.exists']('file/or/dir/path') %} state stuff here {% endif %}
15:31 timoguin that should work
15:33 Heartsbane So it was a syntax thing
15:33 Heartsbane thanks timoguin
15:35 elfixit joined #salt
15:35 tligda joined #salt
15:47 rdorgueil joined #salt
15:47 rdorgueil joined #salt
15:51 dstokes joined #salt
15:55 Gareth morning
15:56 ml_1 joined #salt
15:56 whiteinge 'lo!
15:56 Gareth whiteinge: hey :) hows it going?
15:57 whiteinge no complaints. i'm working out of my dank, dark basement for a change
15:58 whiteinge Gareth: you?
15:59 Gareth doing well, just got to $DAYJOB office.  waiting for a meeting to start, looking at some old salt feature requests.
16:07 perfectsine_ joined #salt
16:08 mateoconfeugo joined #salt
16:11 fragamus joined #salt
16:11 joehillen joined #salt
16:13 redondos joined #salt
16:13 redondos joined #salt
16:14 ajolo joined #salt
16:14 bhosmer joined #salt
16:14 KyleG joined #salt
16:14 KyleG joined #salt
16:15 perfectsine joined #salt
16:16 perfectsine joined #salt
16:16 frasergraham joined #salt
16:17 nhubbard has anyone used the mine.get_docker stuff yet?
16:17 chrisjones joined #salt
16:21 kedo39 joined #salt
16:22 jnials_laptop joined #salt
16:23 icarus joined #salt
16:25 bhosmer joined #salt
16:26 amjith joined #salt
16:27 happytux joined #salt
16:31 possibilities joined #salt
16:36 kh4z joined #salt
16:36 nhubbard okay I partially figured it out, so trying to test out the mine.get_docker stuff that went in earlier this month. It seems to work pretty well other then when salt first starts the host section is missing from the docker.get_container information. Once something in docker changes via salt it goes in there thanks to the refresh call, but how can I get it to initially populate this data?
16:40 mgw joined #salt
16:41 amjith left #salt
16:42 thayne joined #salt
16:42 UtahDave nhubbard: the docker execution module should add everything to mine each time
16:43 UtahDave is that not happening?
16:44 nhubbard UtahDave: after adding it to the mine it doesn't include host data, but after I get salt to make a change to docker it does
16:44 UtahDave Hm. That's probably an oversight
16:44 nhubbard this is whats in my mine_functions: docker.get_containers: []   which doesn't include host=True, and I couldn't figure out how to include that there
16:47 smcquay joined #salt
16:47 nhubbard after re-reading the documentation I see how to add host=True there, got that fixed
16:47 schimmy joined #salt
16:47 nhubbard now to see if I can update mine.get_docker to return the data the way I need it
16:48 UtahDave nhubbard: does this need to be updated in salt proper?
16:48 nhubbard the first problem no that was a config issue on my side, this second one, probably
16:48 CheKolyN joined #salt
16:48 schimmy1 joined #salt
16:51 hunter_ joined #salt
16:52 nhubbard UtahDave: this is what I'm running into now: https://gist.github.com/nicholashubbard/e995c39a8bb9377acbd0
16:52 nhubbard working on a pull request for it
16:53 UtahDave sweet
16:54 nhubbard sure I won't be the only one it is helpful for
16:57 cheus joined #salt
16:57 bhosmer joined #salt
16:58 bhosmer_ joined #salt
16:58 pdayton joined #salt
16:59 JordanRinke joined #salt
17:03 wendall911 joined #salt
17:04 brandon_ joined #salt
17:05 fragamus joined #salt
17:07 ZombieFeynman joined #salt
17:07 diegows joined #salt
17:11 ipalreadytaken joined #salt
17:12 combusean joined #salt
17:15 schmutz joined #salt
17:19 krow joined #salt
17:20 KennethWilke joined #salt
17:22 aw110f joined #salt
17:24 Ryan_Lane joined #salt
17:25 druonysuse joined #salt
17:26 Kenzor joined #salt
17:27 travisfischer joined #salt
17:34 ml_1 joined #salt
17:34 cruatta joined #salt
17:35 Ryan_Lane joined #salt
17:35 resmike joined #salt
17:37 cpowell joined #salt
17:38 resmike joined #salt
17:38 UtahDave joined #salt
17:38 kermit joined #salt
17:55 zain joined #salt
17:59 eculver joined #salt
17:59 jaycedars joined #salt
18:07 canci joined #salt
18:08 seanz joined #salt
18:08 seanz Greetings all. Easy question: I have a job ID and I want to get the output from that job. How the heck do I do that from a salt master?
18:11 n8n joined #salt
18:14 diegows joined #salt
18:16 danielbachhuber joined #salt
18:16 viq seanz: salt-run jobs.lookup_jid JID
18:17 seanz viq: Ah, so the ret: value is the output from the job? That was empty for me, and it was a highstate (so there should have been a lot of output).
18:18 ser_rhaegar joined #salt
18:20 n8n joined #salt
18:21 babilen seanz: are you sure you got the right jid? you can list them with jobs.list_jobs
18:21 seanz babilen: I'll verify.
18:24 babilen Whixb reminds me. Is there a way to list only specific jobs?
18:26 babilen seanz: I recommend to set show_jid to True in the master config btw. See https://github.com/saltstack/salt/issues/7978
18:29 prplxd joined #salt
18:31 ser_rhaegar joined #salt
18:34 to_json joined #salt
18:35 n8n joined #salt
18:40 icarus joined #salt
18:40 seanz babilen: Thanks for the recommendation.
18:40 oz_akan_ joined #salt
18:40 Gareth joined #salt
18:41 ajolo_ joined #salt
18:42 jalaziz joined #salt
18:43 jgarr what's the best yaml syntax checker? state.show_top is returning unbalanced parinthasis but yamllint.com says it's valid
18:44 nkuttler jgarr: this one works for me http://yaml-online-parser.appspot.com/
18:44 nkuttler jgarr: are you sure it's not some jinja or something messing up the yaml?
18:45 jgarr the top.sls files don't have any jinj. and the change I just pushed via git only changed pillar/top and states/top
18:45 nkuttler heh. how can yamllint be "optimized for ruby"?
18:45 cwyse joined #salt
18:46 esogas_ joined #salt
18:46 to_json you can do stupid things in yaml to signify ruby litterals. maybe it understands those
18:46 gsintay joined #salt
18:47 JordanRinke joined #salt
18:48 tyler-baker joined #salt
18:49 n8n joined #salt
18:50 seanz left #salt
18:51 babilen seanz: Did you find your job?
18:51 n8n joined #salt
18:52 ashw7n joined #salt
18:53 ashw7n left #salt
18:59 jimklo joined #salt
19:00 pentabular joined #salt
19:01 esogas_ joined #salt
19:02 aw110f_ joined #salt
19:02 ajolo_ joined #salt
19:02 hunter_ joined #salt
19:03 gsintay joined #salt
19:04 kermit joined #salt
19:04 mateoconfeugo joined #salt
19:05 mateoconfeugo joined #salt
19:06 jimklo I get a bunch of warnings when I run salt-call using `sudo`, vs `su -` http://pastebin.com/Y0rp9iTp  Does this mean I have something configured wrong? My sudo user is in wheel...
19:08 dude051 joined #salt
19:08 mfournier emning: ping ?
19:10 emning mfournier: yep?
19:10 mfournier emning: to resume our discussion from the other day, I've added the features I miss from mco to modules/puppet.py: https://github.com/mfournier/salt/commit/921cd93c1
19:10 esogas_ joined #salt
19:10 mfournier if you'd like to give it a try...
19:10 mfournier I just pushed this to a bunch of machines here, so it's pretty much untested yet.
19:11 gsintay joined #salt
19:11 emning mfournier: nice, I will, but won't have a chance till friday
19:11 mfournier my idea is to use it a couple of days myself, then cleanup the patchset, rebase it on the "develop" branch and send a pull-request.
19:12 mfournier emning: ok, cool, let me know if you notice anything !
19:13 gildegoma joined #salt
19:13 emning mfournier: sounds good, I'll give it a shot and let you know how it goes friday. you on us time? (norway here, so that would give me a few hours head start)
19:14 mfournier emning: I'm in switzerland, we're on the same TZ I believe :)
19:15 ashw7n joined #salt
19:15 pydanny joined #salt
19:16 emning mfournier: oh, all right then :)
19:20 mfournier emning: I recall you're new to salt ? fwiw, I found out about the extension_modules option the other day. Basically drop the puppet.py file from above in /some/dir/modules/puppet.py and add "extension_modules: /some/dir" to your minion config, restart, profit :)
19:21 jimklo joined #salt
19:24 bn_ joined #salt
19:26 elfixit joined #salt
19:26 emning mfournier: true, and good thing I dont have to rebuild packages
19:27 hunter_ joined #salt
19:33 racooper joined #salt
19:34 combusean joined #salt
19:39 ghartz_ joined #salt
19:40 ashw7n joined #salt
19:41 gothix joined #salt
19:41 gothix joined #salt
19:43 stevednd what's the proper syntax to include all pillar files from within a subdir in the pillar top file?
19:47 wt joined #salt
19:48 wt anyone here have a rhel 6.x and rhel 7 beta machines that they could check if the iptables command has the "--check" arg?
19:48 wt I can't seem to find a source of manpages that tells me which distro the man pages are coming from.
19:49 twoflowers joined #salt
19:49 wt basically, I am seeing a check for an iptables rule fail on Amazon linux.
19:50 wt I think it is due to the fact that the _has_check() logic in salt/modules/iptables.py is not good.
19:52 mgw joined #salt
19:52 quantumriff joined #salt
19:52 diegows joined #salt
19:53 quantumriff I am trying to implmement the iptable management.. however, when I add a new "iptables.append" state, it keeps appending another identical rule to the chain, evertime highstate is run.  Is that normal?
19:53 quantumriff I don't want to manage the entire iptables save file at this time, I just want to make sure a few key rules are in there
19:55 timoguin looks like that's the intended behavior.
19:55 ashw7n left #salt
19:56 timoguin maybe you can do a jinja conditional and call iptables.chain_absent/chain_present
19:56 timoguin and only append if it's not there
19:56 quantumriff that will only check the chain though, not the rules themselves
19:56 timoguin then nevermind me!
19:56 quantumriff I guess its possible, I would just like if I have stateX applied, it also applies the firewall rules it needs
19:56 wt quantumriff, it may be because the iptables module check logic is really dumb
19:57 quantumriff wt: that is the impression i'm getting, yeah
19:57 wt quantumriff, what distro are you running on?
19:57 quantumriff CentOS 6
19:57 wt can you please run "iptables -h" and tell me if you see "--check" in there?
19:57 wt And are you running the epel packages or something else?
19:58 quantumriff wt: nope, no --check.. but I do have epel enabled
19:58 wt quantumriff, do you have a redhat 7 box around?
19:59 quantumriff wt: no, not yet.. were just getting around to moving our servers to 6..
19:59 wt Do you have a 5 box around?
19:59 quantumriff wt: oracle isn't known for supporting cutting edge
19:59 quantumriff yes, lots of 5.x
19:59 wt I'd like to know if the --check exists there also
19:59 wt it's also called "-C"
20:00 quantumriff wt: nope, not on either
20:00 quantumriff neither --check nor -C
20:00 racooper what version of iptables do you have wt?
20:00 wt ok, I think the salt logic for this is broken in both 2014.1.4 and in HEAD
20:01 jrdx joined #salt
20:01 wt # iptables -V
20:01 wt iptables v1.4.18
20:01 wt This is Amazon LInux.
20:01 racooper ok centos/rhel/oel 6 have 1.4.7
20:01 quantumriff right
20:01 rgbkrk joined #salt
20:01 wt The current logic in 2014.1.4 is that if os_family == "Redhat", don't use -C
20:01 quantumriff I'm also running salt 2014.1.3
20:02 felskrone1 joined #salt
20:02 wt so, in that case, salt will run iptables-save and look for the rule
20:02 wt and it will fail because the way it builds rule commands is different that what iptables-save outputs
20:02 londo__ joined #salt
20:03 quantumriff wt: i have also noticed if I do an iptables.insert, the command fails, every single time
20:03 wt quantumriff, did you include a position?
20:03 wt oh wait
20:03 wt right
20:03 quantumriff wt: hmm, no. I am used to 'iptables -I' which puts in position 1
20:03 Ryan_Lane1 joined #salt
20:04 wt that the _pub_pid thing?
20:04 wt salt-call iptables.build_rule full=True table=nat chain=PREROUTING command=I position=1 destination=10.0.1.1 in-interface=docker-bridge proto=tcp dport=25 jump=DNAT to-destination=127.0.0.1:25
20:05 wt quantumriff, can you run that command and tell me the output
20:05 wt ?
20:05 hunter_ joined #salt
20:05 pdayton joined #salt
20:05 sroegner______ joined #salt
20:05 wt I just want to see if it includes the _pub_pid thing
20:06 savvy-lizard joined #salt
20:06 wt FWIW, _has_check() in HEAD appears to be broken as well.
20:07 wt I think the logic may be backwards in some places. e.g. https://github.com/saltstack/salt/edit/develop/salt/modules/iptables.py#L463
20:08 wt and I think that line 477 should have reversed logic and be an unconditional test.
20:08 wt And maybe should be the only test.
20:09 felskrone2 joined #salt
20:09 pmcg joined #salt
20:11 quantumriff local:
20:11 quantumriff iptables -t nat -I PREROUTING 1 -p tcp -m tcp --dport 25 --in-interface docker-bridge --__pub_pid 13355 --destination 10.0.1.1 --jump DNAT --to-destination 127.0.0.1:25
20:12 mateoconfeugo joined #salt
20:12 wt quantumriff, now do "iptables-save"...which will output to stdout
20:12 wt it will not actually save to a file
20:13 wt I think the "__pub_pid" is screwing up you insert command.
20:13 quantumriff wt: it did not save
20:13 wt and if you compare (starting at "-p" to the end of the line) to iptables-save, you should see the rule, but with a different arg order
20:14 jimklo joined #salt
20:14 wt What did iptables-save output?
20:14 wt btw, you'll have to change the build command to your insert command args to see the output for your rule
20:15 schmutz joined #salt
20:16 wt nevermind, _has_check has the right logic (not reversed) for some distros...it's just poorly named.
20:20 wt It should be called, _assert_no_has_check() or something like that.
20:21 wt _has_check returns False and the "--check" arg is usable
20:21 wt that's weird
20:22 wt quantumriff, Here's the code that actually tests for rule existence on your distro:
20:22 wt cmd = '{0}-save' . format(_iptables_cmd(family))
20:22 wt out = __salt__['cmd.run'](cmd).find('-A {1} {2}'.format(
20:22 wt table,
20:22 wt chain,
20:22 wt rule,
20:22 wt ))
20:22 wt Sorry, I mean to msg that to quantumriff
20:22 wt anyway, you can see in that code that the order of the args matters
20:23 quantumriff ooh, interesting
20:23 wt and there is no way to deterministically order the args in the right order
20:23 wt so, now I am trying to figure out what I am going to do as I have the same problem you have
20:24 gothix_ joined #salt
20:25 wt quantumriff, btw, "rule" above is the text that is output from the "build" command I gave you
20:25 wt s/build/build_rule
20:26 gothix_ joined #salt
20:27 CeBe joined #salt
20:29 carnedepassaro joined #salt
20:29 teskew joined #salt
20:29 wt quantumriff, I am probably going to use the cmd module with an onlyif check using "--check" to see if the rule is in there
20:29 wt quantumriff, that's not really an option for you
20:29 quantumriff wt: no.. I might just file a issue on github for it
20:30 wt quantumriff, well, the head code is significantly different
20:31 wt https://github.com/saltstack/salt/blob/develop/salt/modules/iptables.py#L83 <-- you could change this function to generate the args in the proper order
20:33 quantumriff Well, in this case, I don't actually 'need' it at this point, I'm gearing up for a deployment soon, and I can just sit and wait for the 2014.1.5 version to come out
20:33 ipalreadytaken joined #salt
20:34 wt I wouldn't be shocked if 2014.1.5 doesn't have this fix. :/
20:34 jimklo joined #salt
20:34 wt quantumriff, I am already filing an issue on github.
20:34 wt quantumriff, just so you know
20:36 jgarr joined #salt
20:36 jgarr is there a way to ammend to a line instead of replace? I want to run a jinja for loop that ammends each item at the end of a line after ,
20:38 jgarr file.replace and pattern will only replace the full line from what I can tell
20:38 timoguin regex back references maybe?
20:40 dude051 joined #salt
20:40 quantumriff wt: can you let me know which one, I want to watch it
20:41 jgarr timoguin: is that part of file?
20:41 jgarr I'm trying to find it in the docs
20:41 pssblts joined #salt
20:41 dude051 joined #salt
20:47 savvy-lizard joined #salt
20:47 Kenzor joined #salt
20:49 timoguin jgarr: no it's a feature of regex. i'm assuming they'll work with file.replace
20:49 timoguin http://www.regular-expressions.info/backref.html
20:49 timoguin basically you should be able to capture the line you match, and the replace rule can be "the existing line + new things on the end"
20:50 resmike joined #salt
20:53 logix812 joined #salt
20:54 jgarr timoguin: thanks
20:54 * jgarr is scared of regex
20:54 stritz joined #salt
20:54 timoguin everyone is.
20:54 jgarr lol
20:56 anuvrat joined #salt
20:57 jgarr ahh, just got another option. Make the full line in a variable first and then append it in one chunk
21:01 ipalreadytaken joined #salt
21:02 wt quantumriff, https://github.com/saltstack/salt/issues/13088
21:03 quantumriff wt: thanks.. I'm stalking you now..
21:03 quantumriff :)
21:10 wt quantumriff, thx for the data on rhel/centos 6 and 5
21:11 wt quantumriff, https://github.com/saltstack/salt/issues/13091 <-- this is the issue about a related issue in HEAD
21:11 wt quantumriff, https://github.com/saltstack/salt/issues/13089 <-- the issue about not using "--check" on Amazon linux.
21:13 penguin_dan joined #salt
21:14 patrek joined #salt
21:17 jrdx joined #salt
21:21 jgarr is there a jinja filter I'm not finding to filter only up to a certain character?
21:22 jgarr I'm trying to filter my fqdn to only return the hostname and ignore everything after .
21:23 jgarr {{ grains['fqdn']|slice(.) }}
21:23 jgarr slice is only index (not character)
21:23 hunter_ joined #salt
21:26 JordanRinke anyone see why this would be giving me an error the reload_logger.sh bit wasn't a dictionay: http://pastebin.com/JzVd0uYg
21:28 ggoZ joined #salt
21:29 anuvrat joined #salt
21:31 bhosmer_ joined #salt
21:33 ecdhe salt gurus: have any of you used pfsense?
21:33 babilen jgarr: To be honest: If you have to do something like that I would just use pure python for data munging
21:34 babilen JordanRinke: Yes, remove the "- " in fron of "cmd" -- I'd recommend to not use the "foo.bar:" syntax if you run into this often.
21:34 babilen *front
21:34 ecdhe Currently pfsense is based on FreeBSD8.3 (too old for salt's installer) but the next version is based on FreeBSD 10.  I want to salt pfsense so bad.
21:35 JordanRinke babilen: thx, I seem to endlessly screw up my yaml :/
21:35 eliasp isn't pfsense using this screwup of initsystem based on PHP + a single XML file for the whole config?
21:35 JordanRinke bah, it is right there infront of my face too
21:36 kermit joined #salt
21:36 babilen JordanRinke: And sometimes all you need is another pair of eyes :)
21:38 ecdhe pfsense is a firewall primarily configured through a web-interface--which means you get a lot of handcrafted snowflakes.
21:38 jgarr babilen: ugg, thanks
21:39 ecdhe I want to salt it, but I'm not sure what the best strategy is for getting it under control.
21:39 ecdhe Should I make a pfsense module, state, and formula?
21:39 ecdhe Should I try to control it through existing salt states?
21:40 ecdhe eliasp, yes, it's a single XML file--essentially, pfsense already has a config management tool built in.
21:40 babilen jgarr: I actually really like to do that. I use jinja as long as it suffices and switch to pure Python as soon as jinja gets ugly/hackish. There are also plenty of things that you can't do in jinja
21:41 ecdhe The "states" are entirely described by config.xml, and they are enforced at boot and when the file changes.
21:42 ecdhe So if I wanted to salt it, would I just use salt to control config.xml?
21:42 ecdhe Or would I make a module for pfsense?
21:43 ecdhe Anyone?
21:44 wt ecdhe, is pfsence a Linux thing?
21:44 ecdhe FreeBSD.
21:45 ecdhe It's an appliance.
21:45 rgbkrk joined #salt
21:45 UtahDave ecdhe: I'm thinking your best bet would be to manage config.xml, if that's the source of truth for everything in pfsense
21:46 wt UtahDave, seems reasonable
21:46 wt or you can use cmd.run with unless rules if there is a commandline interface
21:47 wt that's what I am having to do with iptables right now
21:47 ecdhe UtahDave, the biggest thing is that since it's a firewall, you have to make sure that two firewalls aren't spoofing the same MAC addresses...
21:48 ecdhe You could practically distribute the same config.xml to all your firewalls to get identical config, but you need just a minor change based on the MAC addresses of local hardware.
21:48 ecdhe Would you just address that with jinja?
21:48 ecdhe jinja/pillar?
21:48 UtahDave ecdhe: that would be trivial to manage with Salt.  Yes, you would use jinja and insert the MAC from the server's grains
21:49 wt ecdhe, jinja+context
21:49 wt or grains
21:49 jgarr babilen: I agree jinja is really limited. But I'm even more limited with Python and don't trust myself when this is a quick hackjob for something I won't manage in the future
21:50 ecdhe UtahDave, at what point does a piece of software warrant it's own module/state/formula?
21:51 ecdhe When it's more than one file?
21:51 dos_a1 joined #salt
21:51 dos_a1 left #salt
21:52 UtahDave ecdhe: good question.   In this case, I would create an execution module and state if you want to abstract away specific functions for controlling the software.
21:52 babilen jgarr: Sure. All I wanted to say was: "I gave up on complicated things in jinja and just use Python whenever I need anything more powerful than simple conditionals or iteration"
21:53 UtahDave like you want to do something like    pfsense.firewall_rule:  bla bla bla
21:53 ecdhe UtahDave, that could be incredibly usefull, but almost something that you'd want in a more general execution module...
21:53 UtahDave So you could create an execution module that modifies the xml file by using Salt functions.
21:54 ecdhe UtahDave, I'm leaning towards the execution module because any change to config.xml should trigger a call on the minion to enforce the configuration.
21:54 UtahDave sure.
21:55 googolhash_g joined #salt
21:55 ecdhe UtahDave, I really appreciate your help.
21:55 UtahDave any time!
21:58 canci joined #salt
21:59 loque joined #salt
22:00 possibilities joined #salt
22:01 _blackjid joined #salt
22:01 dude051 joined #salt
22:01 Luke_ joined #salt
22:03 londo_ joined #salt
22:05 savvy-lizzard joined #salt
22:06 sroegner______ joined #salt
22:07 alunduil joined #salt
22:08 hunter_ joined #salt
22:08 JordanRinke Any way to tell where a minion is trying to connect from?
22:08 JordanRinke my mater log is getting pounded 20ish times a second by a vm named template - and I can't tell where it is coming from, I assume some vms didn't get their names fixed, but I have no idea how to find them
22:09 JordanRinke ill try turning up logging to debug
22:09 JordanRinke unless someone knows a way that will explicitly tell me the ip of the incoming minion id/request
22:10 JordanRinke hmm debug isnt catching it
22:10 Heartsbane UtahDave: ping?
22:12 UtahDave JordanRinke: you might try listening on the event bus
22:12 UtahDave hey, Heartsbane!
22:13 Heartsbane You got time to help me understand something
22:14 savvy-lizzard what happens if I have a roles:some.role grain? that is a grain of roles with a value of some.role... I know salt complains what is happening that causes this?
22:14 JordanRinke UtahDave: thx, makes sense
22:14 Heartsbane can I send you a pastebin
22:14 eberg1 joined #salt
22:14 combusean joined #salt
22:15 UtahDave Heartsbane: yep!
22:15 UtahDave savvy-lizzard: can you pastebin the error you're getting?
22:15 eberg joined #salt
22:15 combusean joined #salt
22:16 eberg_ joined #salt
22:17 savvy-lizzard UtahDave: sure. let me grab that.
22:20 martoss joined #salt
22:22 martoss1 joined #salt
22:25 loque left #salt
22:26 bhosmer joined #salt
22:29 oz_akan_ joined #salt
22:33 rgarcia_ joined #salt
22:33 Ryan_Lane joined #salt
22:49 bhosmer joined #salt
22:51 Kenzor joined #salt
22:57 jgarr running state.highstate and when yaml compiles I get a keyerror: dev (with a bunch of python output)
22:57 jgarr any good place to start troubleshooting that? I know the top match is correct but there is something wrong in my dev file_roots
22:57 jgarr it's just alot to parse
23:02 tligda joined #salt
23:03 timc3_ joined #salt
23:04 Furao joined #salt
23:05 tligda joined #salt
23:08 rgarcia_ joined #salt
23:10 druonysuse joined #salt
23:10 rgbkrk joined #salt
23:12 alainv has anyone extended salt-cloud for use with StormonDemand? Initial googling is turning up empty
23:14 DaveQB joined #salt
23:19 stanchan joined #salt
23:24 fragamus joined #salt
23:25 bhosmer joined #salt
23:27 manfred that does not exist yet
23:27 manfred unless they are using openstack?
23:34 ajprog_laptop joined #salt
23:35 mapu joined #salt
23:38 oz_akan_ joined #salt
23:39 tligda joined #salt
23:41 rgarcia_ joined #salt
23:46 sgviking left #salt
23:53 tligda joined #salt
23:55 timc3 joined #salt
23:56 ashw7n joined #salt
23:58 schmutz joined #salt
23:59 __number5__ Is it a bad idea to put pre-signed minion key in ec2 cloud-init user-data?
23:59 manfred YES
23:59 manfred sorry, didn't mean caps
23:59 manfred yes it is

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