Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-08-25

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

All times shown according to UTC.

Time Nick Message
00:08 otter768 joined #salt
00:11 badon__ joined #salt
00:33 _ikke_ joined #salt
00:34 bhosmer joined #salt
00:38 oz_akan joined #salt
00:44 schristensen joined #salt
00:51 oz_akan joined #salt
00:53 dude051 joined #salt
00:53 thayne joined #salt
01:05 lpmulligan joined #salt
01:18 nyx joined #salt
01:30 pled76 joined #salt
01:36 capitalf_ joined #salt
01:43 bhosmer joined #salt
01:45 pled76 joined #salt
01:48 capitalfellow joined #salt
01:51 oz_akan joined #salt
01:53 oz_akan joined #salt
01:55 pled76 joined #salt
02:03 elfixit joined #salt
02:03 gzcwnk anybody  in? my salt minions seem to stop working, but when I stop them and run salt-minion -l debug they work fine, any ideas?
02:03 gzcwnk salt-minion-2014.1.7-3.el6.noarch
02:04 thayne joined #salt
02:10 malinoff joined #salt
02:15 oz_akan joined #salt
02:17 snuffeluffegus joined #salt
02:20 klotho joined #salt
02:24 jinlin_gan joined #salt
02:33 TheThing joined #salt
02:37 pled76_ joined #salt
02:41 Eliz joined #salt
02:41 badon_ joined #salt
02:42 Outlander joined #salt
02:44 troyready joined #salt
02:48 pled76 joined #salt
03:16 pclermont joined #salt
03:19 pled76 joined #salt
03:28 otter768 joined #salt
03:30 dude051 joined #salt
03:33 bhosmer joined #salt
03:33 jinlin_gan joined #salt
03:34 Ryan_Lane joined #salt
03:35 n8n joined #salt
03:36 scoates joined #salt
03:38 sashka_ua joined #salt
03:46 pled76 joined #salt
03:47 oz_akan joined #salt
03:51 oz_akan_ joined #salt
03:52 dude051 joined #salt
04:04 jeffrey4l joined #salt
04:06 jinlin_gan joined #salt
04:11 yomilk joined #salt
04:19 pled76 joined #salt
04:21 jinlin_gan joined #salt
04:21 Ryan_Lane joined #salt
04:35 kermit joined #salt
04:38 jinlin_gan joined #salt
04:47 schimmy joined #salt
04:49 pled76 joined #salt
04:49 jalbretsen joined #salt
04:51 schimmy1 joined #salt
04:52 oz_akan joined #salt
04:54 Ryan_Lane joined #salt
04:58 ramteid joined #salt
05:16 mechanicalduck joined #salt
05:20 pled76 joined #salt
05:21 bhosmer joined #salt
05:24 pled76_ joined #salt
05:24 ramishra joined #salt
05:25 Ryan_Lane1 joined #salt
05:26 ramishra joined #salt
05:29 calvinh joined #salt
05:33 TyrfingMjolnir joined #salt
05:36 pled76 joined #salt
05:37 dccc_ joined #salt
05:41 chitown joined #salt
05:49 jhauser joined #salt
05:50 malinoff joined #salt
05:52 colttt joined #salt
05:53 oz_akan joined #salt
05:53 pled76 joined #salt
05:58 joehoyle1 joined #salt
05:59 bhosmer joined #salt
05:59 orion_ joined #salt
06:06 harkx joined #salt
06:09 roolo joined #salt
06:16 thayne joined #salt
06:18 aparsons joined #salt
06:20 aparsons_ joined #salt
06:31 pled76 joined #salt
06:32 catpigger joined #salt
06:32 jinlin_gan joined #salt
06:35 lcavassa joined #salt
06:39 cym3try joined #salt
06:40 felskrone joined #salt
06:44 ramishra joined #salt
06:45 Katafalkas joined #salt
06:52 ramishra joined #salt
06:52 akl joined #salt
06:53 oz_akan joined #salt
07:00 capitalfellow joined #salt
07:10 bhosmer joined #salt
07:10 pled76 joined #salt
07:15 capitalfellow joined #salt
07:17 pled76 joined #salt
07:17 MrTango joined #salt
07:22 ndrei joined #salt
07:23 ramishra joined #salt
07:24 oz_akan joined #salt
07:30 ramishra joined #salt
07:30 pled76 joined #salt
07:34 jalaziz joined #salt
07:37 ramishra_ joined #salt
07:38 ndrei joined #salt
07:42 ramishra joined #salt
07:43 ramishra joined #salt
07:44 pled76 joined #salt
07:49 ramishra joined #salt
07:50 Nexpro1 joined #salt
07:53 geekmush joined #salt
07:53 WarP|onwork tell me please, is it possible to make such "state" which will be looking recursively into specific folder and all files, that fits specific name of file - replace by one located in saltsource ?
07:59 pled76 joined #salt
08:00 chiui joined #salt
08:01 darkelda joined #salt
08:01 darkelda joined #salt
08:04 ecdhe joined #salt
08:07 martoss joined #salt
08:07 pled76 joined #salt
08:10 pled76_ joined #salt
08:13 yomilk joined #salt
08:18 pled76 joined #salt
08:25 oz_akan joined #salt
08:34 TheThing joined #salt
08:36 TheThing_ joined #salt
08:38 kingel joined #salt
08:41 ckao joined #salt
08:52 ramishra joined #salt
08:54 WarP|onwork joined #salt
08:59 bhosmer joined #salt
09:02 pled76 joined #salt
09:06 jdmf joined #salt
09:06 mechanicalduck_ joined #salt
09:08 calvinh joined #salt
09:11 N-Mi joined #salt
09:12 calvinh_ joined #salt
09:15 pled76 joined #salt
09:17 packeteer joined #salt
09:26 ml_1 joined #salt
09:26 oz_akan joined #salt
09:27 _mel_ joined #salt
09:28 Jin__ joined #salt
09:29 Jin__ someone help me this topic
09:29 Jin__ https://groups.google.com/forum/#!topic/salt-users/ZmKkZTxm8ss
09:32 CeBe joined #salt
09:40 ndrei joined #salt
09:43 oz_akan joined #salt
09:45 vukcrni joined #salt
09:45 pled76 joined #salt
09:49 MrTango joined #salt
09:50 DenkBrettl joined #salt
09:51 dbanck joined #salt
09:53 TheThing joined #salt
09:58 sastorsl joined #salt
10:03 mechanicalduck joined #salt
10:04 calvinh joined #salt
10:09 jinlin_gan joined #salt
10:11 kingel joined #salt
10:13 freeminds joined #salt
10:16 davidone joined #salt
10:18 ramishra joined #salt
10:24 tkharju joined #salt
10:32 pled76 joined #salt
10:33 pdayton joined #salt
10:34 bmcorser joined #salt
10:38 goudale joined #salt
10:38 goudale Hello salt
10:39 goudale I want to add some text in a template if the minion have a specific states
10:40 goudale something like {% if 'myVeryOwnStates' in states %} stuffs {% endif %}
10:40 goudale how can I achieved that ?
10:47 ramishra joined #salt
10:48 bhosmer joined #salt
10:51 kingel joined #salt
10:51 oz_akan joined #salt
10:53 calvinh_ joined #salt
10:58 brunolambert joined #salt
11:00 bhosmer joined #salt
11:00 pdayton joined #salt
11:10 pled76 joined #salt
11:15 elfixit joined #salt
11:15 pled76_ joined #salt
11:19 martoss joined #salt
11:20 calvinh_ left #salt
11:20 calvinh_ joined #salt
11:26 ramishra joined #salt
11:26 jensnockert joined #salt
11:27 kingel_ joined #salt
11:28 beardo joined #salt
11:39 sastorsl Hi there
11:40 sastorsl As I'm reading up on archive.extracted, you don't need the tar_options when unpacking av tarfile. Or do you?
11:41 sastorsl The version I'm running is salt 2014.1.5
11:42 jensnockert I'm trying to run `salt 'adwords-test' state.highstate` to get some stuff up on my server, as a reply I get "Unable to render top file. No targets found." Is there some tutorial or something I can read?
11:43 jensnockert I tried googling about no targets found, but couldn't really find anything about it.
11:44 jensnockert Right now it feels like I'm at least partially pressing buttons randomly, so I could be doing something really stupid.
11:45 linjan joined #salt
11:53 viq jensnockert: do you have top.sls? What is in it?
11:53 babilen jensnockert: Could you paste your top.sls to http://paste.debian.net or http://refheap.com aling with your exact command, its output and that of "salt-key -L" (redact sensitive information where that is necessary)
11:53 babilen *along
11:53 jensnockert https://gist.github.com/jensnockert/d250e06343612dc69925
11:54 jensnockert The grain is set correctly on the minion, and they can communicate and stuff.
11:54 viq jensnockert: salt adwords-test grains.item type
11:54 babilen jensnockert: If you want to match on a grain when running state.highstate you have to be explicit about that too
11:55 jensnockert `salt -G 'type:adwords' test.ping` works for example.
11:55 babilen http://docs.saltstack.com/en/latest/topics/targeting/grains.html
11:55 babilen jensnockert: You used "salt 'adwords-test' state.highstate" not "salt -G 'type:adwords' state.highstate" though
11:55 viq babilen: if you want to target execution by grain then yeah, but if you want to tell specific minion to execute highstate then I don't believe you need to target by grains
11:55 babilen (at least that's what you said)
11:56 jensnockert babilen: Both give the same error message.
11:56 viq jensnockert: oh, I see. Lose the dash before 'type:adwords'
11:56 jensnockert viq: Then I just get errors about malformed yaml.
11:57 babilen You shouldn't
11:57 viq if you delete the dash space before that?
11:57 babilen Could you show us the exact error and the modified file?
11:57 viq jensnockert: http://docs.saltstack.com/en/latest/ref/states/top.html
11:58 jensnockert https://gist.github.com/jensnockert/96a9f75a4fa5d1378c97
11:58 viq jensnockert: and when deleting that, remove the two extra spaces in front of the lines below it
11:58 viq jensnockert: what do you have in /srv/salt/base ?
11:59 babilen You are also missing - in the file_roots block
11:59 babilen http://docs.saltstack.com/en/latest/ref/configuration/master.html#file-roots
11:59 babilen Well, you are missing "-" there while it is wrongly used earlier
12:00 vbabiy joined #salt
12:00 babilen And do you literally have file_roots defined in your top.sls or is that just a snippet from your master conf?
12:01 jensnockert No, they are literally there.
12:01 jensnockert The docs seems to imply they should be there?
12:01 babilen That's wrong. You configure file_roots in /etc/salt/master -- Please read http://docs.saltstack.com/en/latest/ref/configuration/master.html once again
12:02 babilen And where in the docs is that implied?
12:02 jensnockert http://docs.saltstack.com/en/latest/ref/states/top.html
12:02 jakub_ joined #salt
12:02 jensnockert But never mind, I'll move them.
12:03 babilen jensnockert: It says "n the master configuration" -- and please also fix the mistake I pointed out earlier
12:03 pled76 joined #salt
12:04 jakub_ http://paste.debian.net/117408/ - any idea how to define file path (/home/deploy/.vimrc) based on user $HOME? i want to deploy .vimrc for user deploy but sometimes HOME is in /home sometimes in other directory
12:04 jakubek joined #salt
12:04 nyx joined #salt
12:08 kingel joined #salt
12:08 viq jakubek: I'd probably try setting that in pillar or in map.jinja; that's my first guess/approach, could be a better way
12:09 blarghmatey joined #salt
12:09 babilen jakubek: Or simply create the user in such a way that you know its home directory (because you set it explicitly)
12:09 jakubek babilen: this is simliest way, but not the best :-)
12:10 babilen What does it depends on if it is "in other directory" ?
12:10 babilen simliest?
12:10 babilen simplest?
12:10 jakubek babilen: simplest, sorry ;-)
12:12 jslatts joined #salt
12:12 jakubek babilen: sometimes I deploy salt on very old servers, with different confiruation and thats the problem
12:12 babilen And you can make those boxes uniform?
12:12 jakubek i found soultion in google but it's more like workaround :/
12:12 viq jakubek: I'd probably set a pillar or a map that on those boxes salt is to look in a different spot
12:12 jakubek babilen: in most cases, no
12:14 jakubek viq: i don't want to use pillars in this case
12:14 viq map.jinja then, set a variable
12:14 jakubek if there is no simple solution i will try do something else
12:14 babilen Well, there are multiple approaches that I can think of: 1. Write a custom grain with that path as value 2. Call http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.file_exists and act accordingly
12:15 jakubek babilen: second it is good idea :-)
12:16 babilen http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions is what I am referring to
12:17 babilen jakubek: I don't necessarily consider that a better idea than the first, but if *you* think so then .. by all means.
12:18 babilen I still think that configuring the user's home directory to be uniform is the best approach. That way the system will be uniform and easier to maintain in general
12:20 jakubek babilen: it's true but in this situtation it will be very hard to do it :-)
12:20 jakubek but I agree
12:20 jakubek babilen: i will use file.exstis on home directories ;-)
12:20 babilen hard-coded paths in scripts?
12:23 pclermont joined #salt
12:25 jakubek babilen: i just wan't to deploy vimrc for that user ;-)
12:25 jakubek thats all, but so it shouldn't be very hard ;-)
12:25 babilen *wink*
12:26 moos3- joined #salt
12:35 jensnockert babilen: Now I get a new error message, https://gist.github.com/jensnockert/cecf3517739028b2fdbd
12:36 babilen jensnockert: So, paste all information I requested earlier again and also include the contents of file_roots in toto.
12:36 mordonez joined #salt
12:36 babilen (the latter is probably not needed immediately)
12:37 bhosmer_ joined #salt
12:41 jensnockert babilen: https://gist.github.com/jensnockert/cecf3517739028b2fdbd, anything I missed?
12:41 babilen Lets see :)
12:42 babilen jensnockert: viq asked you to provide the output of "salt adwords-test grains.item type" earlier
12:43 jensnockert It's "type: adwords"
12:43 babilen I don't necessarily see something wrong apart from the missing newlines in base/core.sls
12:43 mordonez_ joined #salt
12:44 babilen And what is the path to, say, admin-tools.sls ?
12:44 jensnockert It's in /srv/salt/base/admin-tools.sls
12:44 jensnockert All the files except the top.sls is in that dir.
12:45 babilen Where is top.sls ?
12:45 jensnockert In /srv/salt, should it be in base too?
12:45 viq yes, it should
12:45 babilen yeah
12:45 dhwty joined #salt
12:46 babilen It has to be in one directory defined in file_roots
12:46 jensnockert Okay, now I get some error messages I actually understand, brb while I fix those.
12:46 babilen hoo-ray! ;)
12:51 jensnockert Now it works, now I just need to make it actually start our applications. Thanks.
12:51 * jensnockert hugs babilen and viq.
12:51 babilen *blush*
12:52 babilen Anything else we can help you with for now?
12:54 Schmidt Can I give a local file as "source" for a pkg.installed ? something like aspera-entsrv: pkg.installed - source /opt/pkgs/aspera-entsrv.rpm ?
12:54 bhosmer joined #salt
12:54 vejdmn joined #salt
12:57 vejdmn1 joined #salt
12:58 oz_akan joined #salt
12:59 thayne joined #salt
12:59 jchen joined #salt
12:59 jensnockert babilen: Nah, I'll just need to figure out how we actually install stuff manually, so I can convert it all to salt.
13:00 jaimed joined #salt
13:01 n8n joined #salt
13:03 TOoSmOotH joined #salt
13:04 babilen Schmidt: You can reference salt:// and place it somewhere in file_roots
13:04 Schmidt babilen: excellent thanks
13:05 babilen (or host it somewhere and use the appropriate URI, but I guess that you are looking for salt://)
13:05 Schmidt babilen: I prefer to host my own repos, but I am at a customers and, well they decide :)
13:06 babilen sure
13:06 jkaye joined #salt
13:08 miqui joined #salt
13:09 pled76 joined #salt
13:09 mpanetta joined #salt
13:14 capitalfellow joined #salt
13:14 pled76 joined #salt
13:18 racooper joined #salt
13:23 dude051 joined #salt
13:23 orion__ joined #salt
13:24 orion__ joined #salt
13:28 mhubbard_ joined #salt
13:28 nyx joined #salt
13:31 cpowell joined #salt
13:31 mapu joined #salt
13:35 atzebadekappe2k joined #salt
13:52 ml_1 joined #salt
13:53 toastedpenguin joined #salt
13:54 rypeck joined #salt
13:55 ml_1 joined #salt
13:56 kingel joined #salt
13:57 bobmarleysghost joined #salt
13:57 ml_1 joined #salt
13:57 blarghmatey joined #salt
14:01 ml_1 joined #salt
14:04 jalbretsen joined #salt
14:05 ipmb joined #salt
14:06 pled76 joined #salt
14:09 cym3try is there a way to delay a state before processing it? I am implementing a couchbase cluster and the service takes a bit of time till it fully kicks in the entire cluster. I was thinking of modifying the couchbase cluster service init file and put a sleep at the end. but I was wondering whether salt has another way of doing it..
14:12 viq cym3try: AFAIK not currently, no
14:12 mordonez_ joined #salt
14:12 kaptk2 joined #salt
14:13 kt76 joined #salt
14:13 viq cym3try: you could write a script (or maybe the init service does that?) that would check that the cluster is up and only then return, run that from a state, and have other states require that
14:14 aquinas joined #salt
14:17 atzebadekappe2k joined #salt
14:18 patarr joined #salt
14:18 patarr joined #salt
14:18 cym3try viq: i agree
14:18 sindreij joined #salt
14:19 cnf left #salt
14:20 gq45uaethdj26jw6 joined #salt
14:20 martoss joined #salt
14:22 pled76 joined #salt
14:22 kt766 joined #salt
14:25 zirpubolci joined #salt
14:26 NV cym3try: small script combined with cmd.watch state (make it watch the couchbase service state) that does the waiting/checking if ready (put a timeout after some sane amount of time though) then have a cmd.run state (that depends on the previous cmd.watch state) that just verifies that couchbase is ready (with no waiting) and have all your other states that depend on couchbase running depend on that state
14:26 NV i've done a similar pattern before
14:26 NV the advantage of using two states is you can verify that everything is in order even if the couchbase service state didn't run, while you don't bother waiting ages for it to start if it's already should have been running
14:27 cym3try good approach
14:27 jut joined #salt
14:27 xmj_ joined #salt
14:27 NV alternatively, if you want to write an actual state module, check out the tomcat module (get it from master or the helium rc though, the one in 2014.1 is a bit iffie), it has a state that waits for tomcat to become ready that might be useful
14:28 NV but i find writing a couple of shell scripts is usually quicker for such a simple task :P
14:28 lopez_ joined #salt
14:28 NV (you can sometimes even condense it into a single one-liner embedded in the sls :D)
14:29 Doqnach`` joined #salt
14:29 mortis joined #salt
14:29 zirpubolci left #salt
14:29 goki_ joined #salt
14:29 simonmcc___ joined #salt
14:29 funzo_ joined #salt
14:29 jhauser_ joined #salt
14:29 rlarkin joined #salt
14:29 eclectic_ joined #salt
14:29 wiqd_ joined #salt
14:29 gldnspud__ joined #salt
14:30 dwfreed_ joined #salt
14:30 godber1 joined #salt
14:30 honestly_ joined #salt
14:31 aquinas joined #salt
14:31 peno_ joined #salt
14:31 rjc_ joined #salt
14:31 nickg_ joined #salt
14:31 jpaetzel_ joined #salt
14:31 mephx_ joined #salt
14:31 tyler-ba- joined #salt
14:31 grep_away joined #salt
14:31 t0rrant_ joined #salt
14:31 user___ joined #salt
14:31 NV note the return value from the script determines if the cmd.* states are considered successful or not, poxix-style, 0 means success, non-zero means error
14:31 vlcn_ joined #salt
14:31 rackermanfred joined #salt
14:31 luminous_ joined #salt
14:31 xmj joined #salt
14:31 txmoose_ joined #salt
14:31 jamesf_ joined #salt
14:31 kuffs_ joined #salt
14:31 NV saves having to use the more complex (but powerful too!) "stateful" cmds
14:32 jcristau_ joined #salt
14:32 brent1 joined #salt
14:32 micko1 joined #salt
14:32 kevinbrolly_ joined #salt
14:32 Vye_ joined #salt
14:32 goal joined #salt
14:32 majoh joined #salt
14:32 Bosch[] joined #salt
14:32 ghartz joined #salt
14:32 mpoole joined #salt
14:33 ThomasJ|d joined #salt
14:33 kaiyou joined #salt
14:33 beardo joined #salt
14:33 kavakava joined #salt
14:34 Kenzor joined #salt
14:34 wendall911 joined #salt
14:34 darkelda joined #salt
14:34 chutz joined #salt
14:34 akl joined #salt
14:35 codysoyland joined #salt
14:39 _mel_ joined #salt
14:43 tmh1999 joined #salt
14:43 mordonez_ joined #salt
14:44 orion__ joined #salt
14:44 cnelsonsic joined #salt
14:45 rallytime joined #salt
14:47 ml_1 joined #salt
14:47 chris1979 joined #salt
14:48 masterkorp What is the "best" way to generate json data from map data
14:48 babilen masterkorp: map data?
14:49 goal_ joined #salt
14:50 masterkorp pillar data
14:50 masterkorp http://docs.saltstack.com/en/latest/ref/output/all/salt.output.json_out.html
14:50 masterkorp hmm, can i use this in state ?
14:50 majoh joined #salt
14:51 beardo joined #salt
14:51 kavakava joined #salt
14:52 manfred joined #salt
14:52 blast_hardcheese joined #salt
14:53 conan_the_destro joined #salt
14:53 masterkorp - contents: {{ salt["output.json_out"]
14:53 masterkorp Jinja variable 'dict object' has no attribute 'output.json_out'; line 22
14:53 masterkorp its seems not
14:54 masterkorp salt["output.json_out.output"](
14:54 masterkorp does not either
14:54 babilen Ah, I use https://www.refheap.com/89447
14:55 babilen Ah, no .. that was the ConfigParser example ..
14:55 KevinMGranger get the dict object and use python's built-in JSON tools
14:55 babilen Sorry, but you can do the same and simply use https://docs.python.org/2/library/json.html (for example)
14:55 KevinMGranger ^ that
14:56 jeremyBass1 joined #salt
14:56 masterkorp babilen: yeah i use that, but it forces me to write states in pydsl
14:56 babilen It doesn't
14:56 babilen You write the *file* in Python
14:57 babilen The state simply uses "- template: py" and does not have to be written in py or pydsl
14:57 manfred you can use the pydsl or the py renderer
14:57 manfred but he doesn't want to do that
14:57 babilen Who doesn't want to do what?
14:57 masterkorp but can i use it on yaml state ?
14:57 manfred no
14:58 masterkorp why not ?
14:58 manfred masterkorp: your problem is there is no output module https://github.com/saltstack/salt/tree/develop/salt/modules/output.py
14:58 manfred so you can't do salt['output.json.out']
14:58 berserk joined #salt
14:58 masterkorp http://docs.saltstack.com/en/latest/ref/output/all/salt.output.json_out.html
14:58 babilen masterkorp: What's the problem with the approach I pasted? It allows you to use native Python functionality directly and you don't have to tinker with YAML or convert data multiple times between different formats.
14:58 masterkorp so what is this ?
14:59 manfred masterkorp: that is an outputter, not a module
14:59 kingel joined #salt
14:59 manfred http://docs.saltstack.com/en/latest/ref/output/all/index.html
14:59 babilen It's a way to get highstate output data as JSON
14:59 masterkorp so i can't use it
14:59 masterkorp ?
14:59 babilen http://docs.saltstack.com/en/latest/ref/output/all/salt.output.highstate.html
14:59 manfred you cannot use it
14:59 masterkorp hmm
14:59 masterkorp i see
14:59 calvinh joined #salt
15:00 babilen Or manfred's link is better actually
15:00 masterkorp so there it must be a json module somewhere buit in salt that i can use
15:00 babilen ...
15:00 manfred masterkorp: what are you trying to do?
15:00 masterkorp i would make sense that i would be able to convert pillar data into json directly into a config file
15:00 babilen masterkorp: What is the problem with what I pasted?
15:00 manfred dump the output of state.highstate to a file?
15:00 masterkorp manfred: i have an app that takes json as configuration files
15:01 masterkorp i want to generate that file directly from yaml pillar data
15:01 masterkorp http://pastie.org/private/fzgvn27ds7p3thlqbb9dmq
15:01 babilen Yes, I showed you how. You use native Python modules for that directly.
15:01 masterkorp right now i can do this
15:01 manfred masterkorp: i an not aware of a module that would do that directly using salt, you would need to use pydsl or the py renderer
15:01 masterkorp but it forces me to write a seperate a diferent state
15:02 babilen I wouldn't use contents for that as it will not necessarily survive
15:02 manfred we should write a pillar.json module, that would output an object in json
15:02 manfred but it doesn't exist at this time
15:03 babilen manfred: And ConfigParser's INI and EPL and ... (or make it easier/more intuitive to just do this from Python to begin with)
15:03 aquinas joined #salt
15:03 masterkorp hmm, another question at Unit testing do you guys use on salt source ?
15:03 babilen Why switch the topic?
15:03 manfred babilen: yeah, that would be my plan
15:03 tkharju joined #salt
15:05 masterkorp babilen: just came out on my mind
15:05 babilen Yeah, I should have been used to your "topic hopping" by now :)
15:05 babilen s/have been/be/
15:06 logix812 joined #salt
15:06 masterkorp lol
15:08 babilen masterkorp: I mean I agree that it would be nice to write data as JSON, INI, ... more easily from "simple" states, but then I see no problem with either your or my approach. It does *exactly* what you want and is, IMHO, quite easy to understand. I slightly prefer my approach as it doesn't necessitate to write the entire state in py or pydsl, but is specific to the file itself.
15:09 babilen And what you want cannot be done at the moment. I think that the correct way to writing configuration files that use a common format is to use the parser/generator for that format that comes with Python.
15:10 babilen There will probably be better support for this in the future, but right now you'll have to "code" it yourself.
15:10 pled76 joined #salt
15:12 Hell_Fire joined #salt
15:15 babilen masterkorp: fwiw, you could write your states in mako and "sprinkle" in pure Python (yet another reason why mako would have been a *much* better choice than jinja), but I typically don't do that as I don't want to throw yet another template engine into the mix
15:16 masterkorp on the mailing list I asked about this earlier
15:16 babilen message id?
15:17 masterkorp https://groups.google.com/forum/#!searchin/salt-users/generate$20yaml/salt-users/bStjQppCe_M/b-nYJYYAOJMJ
15:17 masterkorp to yaml instead
15:17 masterkorp the answer was {{map | json() }} or {{ map | yaml()}}
15:17 masterkorp but the file gets a ordered dictionary inside
15:18 babilen I find the offered solution to be perfectly viable .. Rountripping yaml to python to yaml to python to ... is just ugly and should, IMHO, be avoided.
15:19 babilen *roundtripping
15:19 jamesf_ masterkorp -- just logged in, reading back, but I ran into this same need: neutral config data source
15:20 babilen Pillars are just Python dictionaries ... Just generate with whatever code you prefer and hand it to your states to do with as they please. If that states happens to be written in Python too you don't have to have any parsers in between and can use the optimal generators for writing
15:21 tcotav why not generate the pillars using <neutral data source> :)
15:21 tcotav then you can generate whatever else from same neutral data source
15:21 tcotav for example, I want to gen some properties to use with serverspec to confirm my hosts
15:22 tcotav and maybe my nagios configs
15:23 schimmy joined #salt
15:24 pled76 joined #salt
15:24 melinath joined #salt
15:24 babilen masterkorp: https://www.refheap.com/89450 example for json btw
15:25 Deevolution joined #salt
15:25 schimmy1 joined #salt
15:26 ekristen joined #salt
15:26 masterkorp yeah that
15:26 masterkorp i am getting out of the practise of using pillar data directly on states
15:27 masterkorp i will be generating a defauls on map.jinja and update it with pillar data
15:27 masterkorp give the possibility for the formula to be usable with the minimun of configuration possible
15:29 babilen I plan to ship suitable DSLs with my formulas that ease the definition of pillar data for them eventually
15:30 masterkorp we should standard this
15:30 masterkorp i will be trying a few methods
15:32 masterkorp getting back to the json generation, can i generate a mini state on pysdl and call the json generation as a state ?
15:33 babilen I don't follow
15:34 masterkorp like making a to_json state  to call on the states
15:35 babilen No, that wouldn't work.
15:36 babilen The correct approach for this would be to provide a number of additional renderers (e.g. "template: py|json + content_pillar: foo", or "to_json" or whatever .. "template" doesn't really fit here)
15:37 aparsons joined #salt
15:37 babilen I would probably rename "- template" to "renderer" and use "- renderer: json" and "- renderer: configparser" and ... so on
15:38 babilen All of which are being fed from a suitable content_pillar
15:39 quickdry21 joined #salt
15:43 conan_the_destro joined #salt
15:44 aparsons joined #salt
15:45 tligda joined #salt
15:50 masterkorp https://github.com/saltstack/salt/issues/15232
15:50 masterkorp well, i opened an issue
15:50 masterkorp i would love this syntax or similar
15:55 pentabular joined #salt
15:57 UtahDave joined #salt
15:59 mr_chris Is expire in the user state currently non functional? I made a test user, set expire to tomorrow (as number of days since the epoch) and ran the state but chage -l shows the account expires never.
16:00 jaimed joined #salt
16:01 ajw0100 joined #salt
16:02 mr_chris Looking at the python file for the users state, I don't see expire defined in _changes.
16:03 cwyse joined #salt
16:06 mr_chris Yeah, I'm making a bug report for this. There's all kinds of documented stuff missing from the users state. warndays, inactdays, maxdays, mindays, date, expire.
16:06 troyready joined #salt
16:08 UtahDave mr_chris: that would be great! thanks!
16:08 otter768 joined #salt
16:08 mr_chris UtahDave, I'll try to write expire while I'm at it.
16:08 mr_chris *write in support for expire.
16:09 UtahDave mr_chris: That would be incredibly helpful, thanks!
16:09 ramishra joined #salt
16:10 estherbester joined #salt
16:11 pled76 joined #salt
16:11 thayne joined #salt
16:14 ajolo joined #salt
16:16 martoss joined #salt
16:17 rawzone joined #salt
16:17 pled76 joined #salt
16:19 pled76_ joined #salt
16:21 KyleG joined #salt
16:21 KyleG joined #salt
16:22 pled76 joined #salt
16:24 icebourg joined #salt
16:24 masterkorp guys, coke is great
16:25 econnell joined #salt
16:25 koyd I read that as cake is great. Still true.
16:26 MrTango joined #salt
16:28 Katafalkas joined #salt
16:29 ipmb joined #salt
16:30 aparsons joined #salt
16:30 longdays joined #salt
16:31 joehillen joined #salt
16:32 Ryan_Lane joined #salt
16:34 n8n joined #salt
16:35 ramishra joined #salt
16:38 mgarfias is there any neat tricks to setting a hostname on a system bootstrapped with salt-cloud?
16:38 blackhelmet joined #salt
16:38 schimmy1 joined #salt
16:39 pled76 joined #salt
16:39 blackhelmet Hello all. I've been reviewing the documentation for Salt and loving it so far. Anyone know of good tutorial/lab type writeups on getting oriented with salt stack state and pillars?
16:42 SheetiS joined #salt
16:43 koyd mgarfias: I think file.managed for /etc/hostname and a "hostname" cmd.run would work?
16:44 mgarfias oh yeah
16:44 koyd blackhelmet: best thing is to read through the getting started docs in http://docs.saltstack.com , imho
16:44 mgarfias sorry, need moer coffee
16:44 rap424 joined #salt
16:44 koyd mgarfias: haha, I know that feeling :)
16:45 pled76_ joined #salt
16:48 blackhelmet koyd: Thanks, I'm already there. Was just looking for more situational writeups, how various people are structuring their environments, etc.
16:48 manfred mgarfias: kind of, if you are trying to set the minion id directly, you would need to use a map file to specify it in the minion config
16:48 martoss joined #salt
16:48 manfred mgarfias: i am working on some systemd tools stuff, in which case you would just be able to use hostnamectl set-hostname <hostname> and it would set it for you
16:49 mgarfias manfred: minion id is set fine, its more the hostname on the system so my cmdline doesn't look like: p-10-0-0-65.ec2.internal
16:49 manfred mgarfias: other than that, it would be done in a network.managed state as well http://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html
16:50 aparsons joined #salt
16:51 gaker joined #salt
16:52 Katafalkas joined #salt
16:52 pled76 joined #salt
16:53 gaker left #salt
16:53 Katafalkas joined #salt
16:54 smcquay joined #salt
16:54 Katafalkas joined #salt
16:55 floWenoL_ Failed to authenticate, is this user permitted to execute commands?
16:55 floWenoL_ any clues why
16:55 floWenoL_ i am running root
16:55 manfred floWenoL_: version of salt?
16:56 floWenoL_ supposedly same as yesterday
16:56 floWenoL_ can u remind me how do i see it
16:56 floWenoL_ well there is a small change, i was running on ubuntu 12 lts now im on 14
16:56 manfred 2014.1.10 iirc
16:57 manfred salt --version
16:57 Katafalkas joined #salt
16:57 manfred there was a known issue, i have no idea if it was resolved
16:57 aparsons joined #salt
16:57 possibilities joined #salt
16:57 floWenoL_ machine rebooting will provide version in a sec
16:57 manfred floWenoL_: https://github.com/saltstack/salt/issues/14645
16:58 aw110f joined #salt
16:58 manfred that is the issue iirc
16:58 manfred floWenoL_: nope, this is the big one https://github.com/saltstack/salt/issues/12248
16:59 floWenoL_ crap
16:59 manfred problem with 14.04 ? /shrug i don't knwo
16:59 manfred floWenoL_: oh, i also thought of a question for you, are you using the nginx ppa or the nginx from the repositories?
16:59 aparsons joined #salt
16:59 floWenoL_ tbh idk
16:59 floWenoL_ im very new to ubuntu
16:59 manfred floWenoL_: cause if you use the ppa, the packages will be named correctly, and not nginx-full and nginx-common
16:59 pled76 joined #salt
17:00 floWenoL_ hmm
17:00 manfred floWenoL_: apt-add-repository ppa:nginx/stable
17:00 blarghmatey joined #salt
17:00 manfred floWenoL_: https://launchpad.net/~nginx/+archive/ubuntu/stable
17:00 manfred floWenoL_: and it is nginx packaged directly from the nginx developers
17:00 manfred instead of packaged by ubuntu
17:00 floWenoL_ i dont believe i was using ppa then
17:01 manfred then you could manage it with a simple salt state
17:01 forrest joined #salt
17:01 manfred nginx:
17:01 manfred pkgrepo.managed:
17:01 manfred - ppa: nginx/stable
17:01 bezeee joined #salt
17:01 manfred pkg.managed:
17:01 manfred bah
17:01 floWenoL_ i see
17:02 floWenoL_ should be similar to jdk
17:02 manfred nginx:
17:02 manfred pkgrepo.managed:
17:02 manfred - ppa: nginx/stable
17:02 manfred pkg.managed:
17:02 manfred - refresh: True
17:02 manfred yeah
17:02 manfred floWenoL_: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
17:02 floWenoL_ jdk ended up being relatively easy
17:02 forrest manfred, jeez no wonder you're over a hundred messages ahead of me with messages like that :P
17:02 manfred i don't like much about ubuntu, but the ppa system is the best thing ever for managing repositories
17:02 manfred forrest: pfft
17:03 floWenoL_ manfred: im only considering it because I need to set this up on EC2
17:03 floWenoL_ if I had gentoo there
17:03 floWenoL_ i wouldnt even care that I have to compile stuff
17:04 ml_1 joined #salt
17:04 floWenoL_ may as well search for arch
17:06 manfred there is an arch ami
17:06 manfred but i had mixed results when I tried it
17:06 floWenoL_ any other ami that you may recomend?
17:06 manfred ¯\(°_o)/¯
17:07 manfred i work at rackspace, so my knowledge of amis is limited to what I tried back when I was still in college
17:07 kingel joined #salt
17:07 floWenoL_ heh i see
17:07 Gareth morning
17:09 floWenoL_ awesome ubuntu breaking a lot
17:11 longdays Is there a way to abort a state if certain data is found via grains?
17:12 forrest longdays, a state file, or just a specific state?
17:12 forrest hey Gareth
17:12 forrest Gareth, are you ready for Monday?
17:12 klotho joined #salt
17:12 longdays in a state file. Basically I am looking at some grain data at the top of the state with jinja. I will set a variable there and if it contains multiple items I want to bail
17:13 Ryan_Lane joined #salt
17:13 Ryan_Lane joined #salt
17:13 ramishra joined #salt
17:13 forrest longdays, hmm that seems to me like it should be a job more designed for how your top file is handled.
17:13 vbabiy joined #salt
17:14 longdays yeah, I was thinking about that also. I need to think on it a little more. Thanks for the quick response.
17:14 forrest longdays, no worries.
17:15 Gareth forrest: Not at all.  I need another weekend :)
17:15 forrest Gareth, Should request Friday off like I did
17:15 forrest 4 day weekend
17:15 Ahlee smart man
17:16 Ahlee unfortunately, $LACKEY resigned last week, so I can't take PTO until a replacement is trained.
17:16 Gareth forrest: Unfortunately I am on-call this week...soooo....
17:16 forrest boooooo
17:16 forrest Ahlee, you only have 1 lackey?
17:17 forrest Gareth, clearly you should fix all the issues in your environment this week so you don't get called...
17:18 notpeter_ joined #salt
17:18 Gareth forrest: if only it was that simply :)
17:19 forrest Gareth, heh
17:19 skyler I have a really simple question: How do I require two packages? I can't find the syntax for this in the docs.
17:19 martoss joined #salt
17:19 chrisjones joined #salt
17:20 mr_chris UtahDave, Nevermind on that bug report about user expiry. I see those options are already in the develop branch.
17:20 Gareth skyler: - require: - pkg: package1 <newline> - pkg: package2 *should* work iirc.
17:21 skyler Gareth: Great, I will try it out.
17:22 logix812 joined #salt
17:22 jensnockert joined #salt
17:26 otter768 joined #salt
17:26 UtahDave mr_chris: ah, cooll
17:27 Katafalkas joined #salt
17:28 Gareth UtahDave: howdy :)
17:28 UtahDave hey, Gareth!
17:28 Ahlee forrest: Me personally, yes.  I have 7 others at my level, only had one beneath me
17:28 Ahlee the joys of a flat structure
17:29 forrest Ahlee, ahh
17:29 bhosmer_ joined #salt
17:31 melinath joined #salt
17:31 homebody_rlarkin joined #salt
17:34 ckao joined #salt
17:35 Gareth UtahDave: hows things?
17:36 felskrone joined #salt
17:36 pled76_ joined #salt
17:36 UtahDave good!  Just enjoyed a week in SoCal.  Sorry I didn't make it out to see you!  It was a super busy week and I didn't have a rental car.
17:37 Gareth UtahDave: no worries.  Figured you were busy.  next time :)
17:37 UtahDave Gareth: definitely.
17:37 UtahDave How close are you to the Burbank airport, by the way?
17:37 Gareth no traffic...maybe 25-30 minutes.
17:38 UtahDave So about 32 hours with traffic?
17:38 Gareth hah
17:38 UtahDave :)
17:38 jslatts joined #salt
17:38 Gareth depends on the time of day, worst I've been in coming back from there was maybe 45 minutes to an hour.
17:38 UtahDave Yeah, that's not too bad.
17:38 vbabiy joined #salt
17:39 homebody_rlarkin Migrating from scripts to salt-cloud...I need to set some grains (key:value) , where value can only be determined during deployment with salt cloud, in this case a version.  My deploy script can have dynamic data in a here doc ( > /etc/salt/minion) between the EOF's, but with salt-cloud I'm stuck.  Custom bootstrap runs on the minion (where data is not available) and cloud.profile is static.
17:41 catpiggest joined #salt
17:42 homebody_rlarkin I'm thinking of an alias or script to rewrite or edit /etc/salt/cloud.profiles.d/myprofile , but is there a better or builtin way and I just haven't found it yet?
17:43 UtahDave homebody_rlarkin: One thing I've been doing in scripts is dynamically creating a cloud map which has some grains set, then using Salt Cloud to build the cloud map.
17:46 homebody_rlarkin Ah! that's almost the same thing I was thinking, except my map is static and the profile is dynamic :)
17:46 pled76 joined #salt
17:50 oz_akan joined #salt
17:52 smcquay joined #salt
17:52 mapu joined #salt
17:54 aparsons joined #salt
17:58 UtahDave homebody_rlarkin: if your profile is dynamic, you can create a "grains" section in your profile and Salt will add those grains to all the vms created with that profile
18:00 kermit joined #salt
18:01 kingel joined #salt
18:02 martoss joined #salt
18:06 cpowell joined #salt
18:08 chrisjones joined #salt
18:12 roolo joined #salt
18:13 xcbt joined #salt
18:14 melinath joined #salt
18:24 cpowell joined #salt
18:24 pled76 joined #salt
18:30 smcquay joined #salt
18:31 thayne joined #salt
18:33 pclermont joined #salt
18:33 martoss joined #salt
18:34 bezeee joined #salt
18:41 jslatts joined #salt
18:44 smcquay joined #salt
18:44 FeatherKing joined #salt
18:47 pled76 joined #salt
18:48 FeatherKing should i be able to run an exe from a unc share on a windows minion?
18:48 FeatherKing i am getting access is denied, but salt is running under the system account
18:52 UtahDave FeatherKing: I think Windows disables running an executable from a unc share
18:52 FeatherKing i feel like thats true but i usually push updates through powershell /vmware and they work
18:52 FeatherKing this server is old, i cant remember if there is a workaround to that
18:53 FeatherKing maybe i worked around it at some point
18:54 FeatherKing does salt on windows execute through powershell?
18:55 homebody_rlarkin FeatherKing: yes, but sorry I have no details, a colleague is doing that work.
18:56 pclermont joined #salt
18:56 FeatherKing homebody_rlarkin: thanks
18:57 jalaziz joined #salt
18:57 homebody_rlarkin salt reactor...pretag: None <--Should I be able to set something there?  I'm looking for a way for the minion_start event to contain in data ( mycustomgrain: mygrainvalue )
18:58 Ryan_Lane basepi: I have some more boto_* fixes, but they're blocked on the current fixes being backported
18:58 Ryan_Lane otherwise I'm going to get really, really confused as to what version of the code I'm mucking with
18:59 Ryan_Lane they're needed for proper VPC support
18:59 basepi Ryan_Lane: alright, I'll do some backporting in the next hour or two, and ping you when it's done.
18:59 Ryan_Lane thanks :)
18:59 Ryan_Lane sorry about the ping. I know I'm at fault for the extra work :(
19:01 spookah joined #salt
19:02 FeatherKing UtahDave: this works from powershell
19:02 FeatherKing ii \\10.10.1.60\share\path\400-345\Setup.exe
19:02 FeatherKing but access denied through salt
19:03 aparsons joined #salt
19:03 UtahDave FeatherKing: how are you calling or executing this with salt?
19:04 FeatherKing cmd.run in a state
19:04 basepi Ryan_Lane: hehe, no worries
19:04 UtahDave have you tried setting  shell=powershell     ?
19:05 Urit joined #salt
19:05 thayne joined #salt
19:08 UtahDave FeatherKing: ^^
19:08 FeatherKing trying now
19:09 miles32 joined #salt
19:09 bezeee joined #salt
19:09 miles32 hey, will pkg installed do an upgrade without prompting if the package is already installed?
19:10 forrest miles32, no
19:10 forrest miles32, that would be pkg.latest
19:10 midacts How do you install salt modules?  (such as salt.states.pkg.uptodate)
19:10 possibilities joined #salt
19:10 miles32 good, just wanted to make sure that I could install during my first high state and then make sure subsequent highstates wouldn't screw me
19:10 forrest midacts, http://docs.saltstack.com/en/latest/ref/modules/#modules-are-easy-to-write
19:11 forrest miles32, yeah you're good
19:11 FeatherKing UtahDave: the error was different
19:11 FeatherKing one sec
19:12 ndrei joined #salt
19:12 lz-dylan hiya, folks :)
19:13 lz-dylan midacts: add them to your /srv/salt directory in _modules/
19:14 midacts im running Debian/ i looked in my /srv directory on my salt-master server. i didnt see a /srv/salt directory
19:14 lz-dylan midacts: you'll then need to sync them to your minions, etc "salt '*' saltutil.sync_all" cf. http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html
19:15 go|dfish joined #salt
19:15 lz-dylan midacts: /srv/salt is where you store your state files unless you define so otherwise in /etc/salt/master.
19:15 pclermont joined #salt
19:15 lz-dylan so, wherever you're putting your SLS files--the directory root there, add _modules
19:15 dvestal joined #salt
19:15 midacts okay. i dont see those directories there
19:16 midacts so i can just create them
19:16 lz-dylan if you installed from apt and don't have reason to do otherwise you should probably just use /srv/salt :)
19:16 lz-dylan oh. /etc/salt isn't there?
19:16 UtahDave midacts: yeah, just create them.
19:16 lz-dylan you'll need to install salt-master
19:16 midacts ya i have /etc/salt (and i installed from apt
19:16 lz-dylan gotcha. yeah, /srv and /srv/salt are manually created and managed by you, the user
19:16 midacts that makes sense
19:17 lz-dylan adding a brand-spankin'-new directory at root feels a little funky at first :)
19:17 midacts haha true. i just wanted to make sure i wasnt doing something wrong
19:17 pled76 joined #salt
19:18 lz-dylan sounds like you're good so far!
19:18 midacts :D thanks for your help guys. I appreciate it.
19:18 Ozack1 joined #salt
19:18 lz-dylan that said, I'd really suggest getting a super-basic state file up and running enough to install a package on a salt-slave before worrying too much about modules. it'll give you a feel for what salt looks like.
19:20 lz-dylan Does anyone know why salt-cloud would consistently fail when passed a map file and the -d flag?
19:20 UtahDave lz-dylan: are you passing the m flag as well?
19:21 lz-dylan UtahDave: yessir!
19:21 lz-dylan https://gist.github.com/arubis/3e9694452571d1eab626
19:21 lz-dylan when I just pass it without -d it builds the instanes without complaint
19:22 UtahDave lz-dylan: can you pastebin your map file?
19:22 dude051 joined #salt
19:22 lz-dylan https://gist.github.com/arubis/c1e18197b4663a9812ca
19:23 jensnockert joined #salt
19:23 lz-dylan I've tried a few permutations of instance names without much luck. originally had then named as hostnames and thought it was choking on the periods.
19:24 aparsons joined #salt
19:24 lz-dylan (This is 2014.1.10 BTW)
19:24 aw110f joined #salt
19:25 rojem joined #salt
19:26 UtahDave lz-dylan: Hm. that looks correct to me.
19:26 lz-dylan Maybe permissions on that AWS key?
19:27 lz-dylan I _can_ delete instances with it without the map file
19:27 UtahDave lz-dylan: that's odd. I'll test on 2014.1.10
19:27 kt766 is anyone here using ec2_tags.py for AWS grains? it prints our key info in the salt logs ...
19:28 lz-dylan but I often run into _some_ issues, eg. when rename_on_delete or whatever it's called is enabled, the deleted instance doesn't get removed from the keyring
19:28 ml_1 joined #salt
19:28 ml_11 joined #salt
19:28 lz-dylan kt766: I'm using it, checking logs
19:28 lz-dylan kt766: it prints my key but not the secret key
19:29 yomilk joined #salt
19:29 lz-dylan kt766: that said, I have it using IAM roles, and so it's probably just the role ID. checking against the 'main' key. how's yours configured?
19:30 kt766 we're using access/ secret key ... it prints both
19:30 lz-dylan kt766: yeah, the ID in the logs doesn't match the ID for the account I use to provision instances. IAM roles will keep those credentials out of your logs.
19:31 kt766 yeah we need to switch to that
19:32 pled76 joined #salt
19:33 lz-dylan kt766: I've honestly forgotten how to set that up, but recall that it only took an hour of two of playing around. The ec2_tags.py script had a bit of an issue with "step #2 get from minion config", so I commented that section out and it worked a treat.
19:36 melinath joined #salt
19:36 joehoyle joined #salt
19:38 occupant joined #salt
19:39 berserk joined #salt
19:40 Urit I'm making a salt formula for Elasticsearch/Logstash/Logstash Forwarder/Kibana, what's the best way to submit it to the salt formulas bin when I'm done? There's already one for "elasticsearch/logstash/kibana" but honestly it really only covers localhost for all 3 and I'm splitting them out into separate bits.
19:42 lz-dylan Urit: the longer I worked on the same, the more I felt like it was hard to avoid every solution being a custom solution :/
19:42 lz-dylan Urit: I'd love to see yours.
19:42 Urit I'm just making a templatized config file basically
19:42 joehoyle joined #salt
19:42 Urit it's nothing SUPER fancy, just making the elasticsearch.yml configurable via pillar
19:42 aparsons joined #salt
19:43 Urit and the rest of it similarly so
19:43 Urit also, I can't seem to find it in the docs, but I knew I saw it once - is there a fileserver.ls type of call I can make to show all downloaded files available via salt:// from the master?
19:43 Ryan_Lane joined #salt
19:44 forrest Urit, if it builds on the existing formula, but doesn't add things that would need to be removed prior to running the formula, just fork it and make a PR
19:44 forrest we try to keep the formulas more as a base than anything
19:44 jslatts joined #salt
19:45 Urit Okay, cool, thanks
19:46 forrest Urit, np
19:47 pled76 joined #salt
19:50 DrQuest the mine is troublesome
19:52 aparsons joined #salt
19:54 aparsons_ joined #salt
19:55 baskinomics joined #salt
19:55 baskinomics Hola. I have a question about running a masterless salt minion on Mac OS X
19:56 forrest baskinomics, what's up?
19:57 baskinomics Do I need to implement the OS X specific modifications listed here: http://docs.saltstack.com/en/latest/topics/installation/osx.html#salt-master-customizations
19:57 baskinomics or is that specific to the server being the Salt Master?
19:57 forrest baskinomics, not as far as I'm aware for just the minion
19:58 forrest baskinomics, worst case if you get errors you could make those adjustments later, but for a masterless minion I wouldn't worry about it.
19:59 baskinomics Alright cool. What file am I modifying for these instructions? http://salt.readthedocs.org/en/latest/topics/tutorials/standalone_minion.html
19:59 travisp joined #salt
19:59 forrest /etc/salt/minion
20:00 baskinomics Awesome. Just an aside, I've used Ansible but am using Salt Stack for work, and the community help (GitHub and now IRC) has been awesome. Kudos
20:01 forrest baskinomics, cool, if you can try not to post questions as issues on github, we try to keep that to the mailing list and IRC!
20:01 aparsons joined #salt
20:01 baskinomics No no I meant I filed two actual issues, and they were promptly responded to :)
20:01 forrest baskinomics, oh cool
20:02 kingel joined #salt
20:02 travisp Any tips for figuring out why a minion's pillar data is not being updated? I've called saltutil.refresh_pillar and even tried restarting the master and minion, but still shows the old value.
20:03 baskinomics There any other things I should be aware of with the route I'm suggesting (Mac OS X + masterless minion), or are all my documentation ducks in order?
20:03 forrest baskinomics, Uhh you know I haven't seen enough people running on OS X to be aware of any clear 'gotchas', but I think you should be ok, you installed as root/a sudo user right?
20:04 forrest travisp, so you've updated the pillar data on the master, but the minion isn't reflecting that when you apply the state?
20:04 travisp forrest: Correct, I'm using pillar.get <key> and the value is the old value
20:05 travisp forrest: Though I haven't attempted to apply the state yet, just trying pillar.get <key> form the master
20:05 forrest travisp, that's odd.. can you run salt 'minion' saltutil.refresh_pillar -l debug ?
20:05 travisp sure
20:06 baskinomics forrest: I'm in the process of firing up the server ATM for the client, but yes I will have root access. I'm going to install homebrew, then 'brew install saltstack'.  Should I install as 'sudo brew install saltstack' instead?
20:06 forrest travisp, oh even with pillar.get it's still returning the old value? Is there any chance it's being overwritten or anything?
20:06 travisp forrest, I'll double check that
20:07 forrest baskinomics, I don't think you have to? From what I remember the install steps say you don't need to
20:07 forrest travisp, sounds good.
20:07 forrest baskinomics, I've never set it up though, so I'm not sure. Worst case scenario you could uninstall and reinstall :D
20:08 forrest baskinomics, I can't remember if doing brew install saltstack install the master and minion though. You might want to test it on a VM or something if you can first.
20:08 baskinomics forrest: good point. I'll check into it
20:08 forrest baskinomics, cool, I just don't know enough about the mac process to give better advice.
20:08 lz-dylan baskinomics: generally speaking, don't sudo with homebrew
20:09 lz-dylan baskinomics: if a brew needs sudo it'll ask you for it
20:10 forrest lz-dylan, thanks
20:10 forrest never owned a mac, so my knowledge there is pathetic :D
20:10 Ryan_Lane joined #salt
20:11 baskinomics forrest: yeah I'm pretty fresh to the Mac world, but it's a requirement for this project. I guess a better question is would it make more sense (or possible) to install Salt master and then instruct it to run locally, or run a masterless Salt minion?
20:11 travisp forrest: Debug output: http://hastebin.com/ibefudipik I could find anything that would be overwriting the pillar
20:12 forrest baskinomics, I prefer to run a masterless minion for a single instance, you do lose functionality without the master
20:12 bhosmer_ joined #salt
20:13 travisp forrest: I did change the location of my state and pillar repo a few weeks ago, but it seemed like the change went smoothly, salt states are being updated as expected, could something be cached on the master or minion?.
20:13 msil joined #salt
20:14 baskinomics forrest: anything in particular? I do have a Salt master, just didn't want to mix it in w/ this project
20:14 chrisjones joined #salt
20:14 bastion1704 joined #salt
20:16 travisp forrest: Actually I found some git permission errors in the master logs, which is odd, because I'm using the same key for the states and root but this is probably something I can figure out, sorry to bug you :)
20:16 forrest travisp, np
20:16 forrest baskinomics, you don't get stuff like the reactor
20:18 pled76 joined #salt
20:18 lz-dylan forrest: np
20:18 lz-dylan (from earlier)
20:18 DrQuest mine.conf -> mein kampf
20:19 cpowell joined #salt
20:20 chutzpah joined #salt
20:20 chutzpah joined #salt
20:21 dvestal joined #salt
20:21 baskinomics forrest: hmm I hadn't looked at that yet, but I don't think we'll be doing anything that extensive w/ this project. More for states and some execution modules really
20:21 forrest baskinomics, you should be good to go then
20:22 lz-dylan so, I'm trying to target minions based on the 'role' grain. I've managed to get in place and working perfectly satisfactorily for a particular node: 'role:\n    logstash-reciever\n    logstash\n    elasticsearch\n    kibana'. In my top.sls I'm targeting using, for example, 'role:elasticsearch':\n  - match: grain\n  - elasticsearch' but it doesn't seem to match as that state doesn't execute when I state.highstate. What am I doing wrong?
20:22 aparsons joined #salt
20:22 lz-dylan It shows up fine in grains.items
20:23 bhosmer joined #salt
20:23 baskinomics forrest: thanks for all the info, I'm sure I'll be back at some point ;)
20:24 lz-dylan do I need to match: grain_pcre? that fels dirty
20:24 lz-dylan feels, rather
20:24 forrest baskinomics, you're welcome, best of luck!
20:24 bhosmer joined #salt
20:24 lz-dylan baskinomics: it's friendly here :) g'luck!
20:24 rlarkin joined #salt
20:24 baskinomics left #salt
20:26 bolt_ joined #salt
20:27 bolt_ anyone used SS to deploy AIX?
20:27 younqcass joined #salt
20:28 pentabular1 joined #salt
20:29 diegows joined #salt
20:29 travisp Does the pillar git implementation store a known_hosts file? I can't seem to figure out why my master is unable to fetch the latest changes from the remote git+ssh url.
20:31 younqcass Is it possible to have code run in the background within cmd.script as
20:37 delinquentme joined #salt
20:37 Osso joined #salt
20:38 delinquentme I need a) a way to check time between instancing and when a minion reports back as operational and b) a way if a particular amount of time passes before that instance reports back, to have salt instance a replacement minion.
20:38 delinquentme how do?
20:38 delinquentme And can I get salt do this ... or would this be a custom piece of code?
20:38 bhosmer_ joined #salt
20:39 forrest delinquentme, hmm, maybe try the reactor?
20:40 forrest not sure it would be able to do part B though.
20:43 floWenoL any way to make the archive extraction less verbose?
20:43 forrest floWenoL, is it a tar ball?
20:44 Osso hello, I am running salt-call on osx and it is scanning all the files on my disk, is that normal?
20:44 floWenoL tar.gz
20:44 floWenoL yes
20:44 floWenoL using salt ofc
20:44 floWenoL oh wait
20:44 klotho joined #salt
20:45 floWenoL think i found my problem
20:45 forrest floWenoL, you can use tar_options if one exists to suppress output
20:45 forrest Osso, Uhh I don't believe so? I don't know for sure though. UtahDave have you seen that before on OSX?
20:45 floWenoL i think i was missing if_missing
20:45 forrest floWenoL, ahh
20:46 floWenoL was not using absolute path
20:47 aberdine joined #salt
20:48 Osso thanks yes indeed it wasn’t normal
20:48 Osso I found my problem I was missing a dash in front of the directory name in the file_roots
20:49 forrest Osso, oh yeah that makes sense then
20:52 martoss left #salt
20:55 dccc_ joined #salt
20:57 floWenoL how to chmod ?
20:57 floWenoL cant find it in the docs
20:57 forrest is the file managed by salt?
20:57 floWenoL no, just extracted by it
20:57 lz-dylan floWenoL: file.managed
20:58 forrest yeah it will either need to be a file handled by salt, or a cmd.run
20:58 forrest shouldn't the file already have correct perms in th tar?
20:58 floWenoL cmd.run should be enough
20:58 lz-dylan you can set mode and if you want to be more granular you can set file_mode and dir_mode separately
20:58 floWenoL nope, it does not need to set +x
20:59 floWenoL will run it on a cmd.run
20:59 floWenoL since i need to do it on multiple .sh files
20:59 lz-dylan Hmm. Does Salt just not particularly want to deal with dicts inside grains? :) "salt '*' grains.get role" lists four roles for my minion; "grains.has_value role" returns true; "grains.has_value role:logstash" (and one of the roles is logstash) returns false.
20:59 floWenoL im installing wildfly
21:00 lz-dylan floWenoL: you could use cmd.run, or you could do file.directory for the enclosing directory and set file_mode and recur
21:00 lz-dylan the latter would set file permissions for _all_ files in that directory though
21:00 floWenoL lz-dylan: can only do file.directory if i can filter
21:01 floWenoL ~will go with run
21:02 wedgie joined #salt
21:04 stan_k joined #salt
21:04 cpowell joined #salt
21:05 wedgie trying to get started using. salt-cloud vsphere. I've done nothing except install develop branch through the bootstrap script and create vsphere.conf in /etc/salt/cloud.providers.d/. When trying to run any of the functions, i get this error:
21:05 wedgie [ERROR   ] There was an error running the function: global name 'VIServer' is not defined
21:05 pled76 joined #salt
21:05 wedgie any ideas? I can post the vsphere.conf if that could be related to the problem
21:06 kballou joined #salt
21:07 woszk joined #salt
21:07 stan_k vsphere cloud module depends on pysphere, iirc
21:07 wedgie does that need to be installed seperately?
21:08 aparsons joined #salt
21:08 woszk hello, I am setting some logic in my init.sls. I want the statement (install a package) apply only if a minion name starts with "web"
21:08 woszk any ideas?
21:08 woszk I have the following:
21:08 stan_k wedgie: that's my guess. sorry, never used it.
21:09 woszk http://paste.debian.net/117514/
21:10 wedgie stan_k: that did it :D   Thanks for the tip
21:10 stan_k hotdog 1/1 today
21:11 woszk nvm
21:11 woszk found it thanks
21:11 lz-dylan woszk: you can target based on minion name, look into topfile
21:11 woszk for the record
21:12 woszk {% if grains['id'].startswith('web') %}
21:12 kelseelynn joined #salt
21:13 stan_k I'm looking for a collection of "This is how we use SaltStack" articles. If anyone has a good resource for this, let me know.. PM me, etc. I'm particularly looking for detail explanations that are not "how to use salt" tutorials, but assume some level of familiarity.
21:13 homebody_rlarkin stan_k:  case studies
21:14 homebody_rlarkin when we're done we'll make one, but like you, not sure where I might upload it/share it.
21:14 stan_k hey that's the word i was looking for. :)
21:15 homebody_rlarkin but I've always assumed that UtahDave &Co would eventually ask for them.
21:18 stan_k yeah. i've seen a company blog post linking to case studies, but that's pretty ephemeral. they have a number of youtube videos that i haven't watched that are described as case studies, as well.
21:18 beneggett joined #salt
21:18 floWenoL State debian_service.enable found in sls wildfly is unavailable
21:18 floWenoL what does this mean
21:18 manfred the state isn't available
21:18 manfred just use service.enable
21:19 manfred floWenoL: https://github.com/saltstack/salt/blob/develop/salt/modules/debian_service.py#L18 the __virtualname__ is actually service
21:19 manfred not debian_service
21:19 floWenoL still unavailable :S
21:19 manfred floWenoL: for your state file, you need to use the stuff in the state module
21:20 manfred which is service.enabled
21:20 manfred !states.service.enabled| floWenoL
21:20 manfred not enable
21:20 floWenoL ah enabled
21:20 floWenoL i keep confusing those
21:20 pled76 joined #salt
21:20 manfred https://github.com/saltstack/salt/blob/develop/salt/states/service.py#L393
21:20 homebody_rlarkin salt 'myserver' grains.setval mykey arbitrary <-- that works fine, but I'm trying to find a syntax that works in a reactor sls file.  something needs to come before .grains.setval , but what?  I've tried cmd.cmd , nothing , cmd.run 'salt-call ...'
21:20 manfred homebody_rlarkin: what do you have now?
21:21 pentabular joined #salt
21:22 manfred homebody_rlarkin: since grains.setval is a module, you would use cmd.grains.setval
21:23 chrisjones joined #salt
21:23 manfred homebody_rlarkin: try
21:23 manfred setgrain:
21:23 homebody_rlarkin my latest attempt is: http://paste.debian.net/117516
21:23 aparsons joined #salt
21:23 manfred cmd.grains.setval:
21:24 manfred - tgt: '*'
21:24 manfred - kwarg:
21:24 jensnockert joined #salt
21:24 manfred - mykey: arbitrary
21:24 floWenoL success :D
21:24 homebody_rlarkin AH, the kwarg on it's own line
21:24 manfred yeah, there are some good examples in http://docs.saltstack.com/en/latest/topics/reactor/
21:25 manfred i looked at the add_new_minion_to_pool: one
21:26 CeBe joined #salt
21:27 Ryan_Lane is there a bug open for minion reactors?
21:27 Ryan_Lane because I really want it now
21:28 Ryan_Lane especially one that reacts to etcd changes
21:29 gq45uaethdj26jw6 left #salt
21:30 Ryan_Lane no issue open; so: https://github.com/saltstack/salt/issues/15265
21:32 manfred Ryan_Lane: there isn't afaik, there is just nothing that uses it
21:32 manfred afaik
21:32 manfred i was looking at it this weekend
21:32 manfred but then got distracted by beer
21:32 manfred and wine and lamb
21:32 Ryan_Lane heh
21:32 yomilk joined #salt
21:32 Ryan_Lane wait, you're saying the reactor system can work locally now?
21:33 manfred the event system has been working on the minion for a long time, it just doesn't do anything
21:33 manfred https://github.com/saltstack/salt/blob/develop/tests/eventlisten.py#L37
21:34 Ryan_Lane right, there's nothing listening to it, right?
21:34 Ryan_Lane s/right,//
21:34 manfred use the eventlisten.py you can listen to the minion
21:34 manfred https://github.com/saltstack/salt/blob/develop/salt/modules/event.py#L75
21:34 manfred and you can fire events into it
21:34 manfred but yeah, nothing listens to it
21:34 manfred the reactor is the only thing that listens to the master event system
21:34 * Ryan_Lane nods
21:34 manfred so there is no minion reactor, there is just the event system
21:34 manfred i was looking at it this weekend, but again... distractions :)
21:35 Ryan_Lane heh
21:35 Ryan_Lane I know the feeling
21:35 manfred yeah, and I needed a break from the interblags anyway
21:35 aparsons joined #salt
21:36 manfred i but yeah, it wouldn't be that difficult to cook something up that fires events when etcd changes, you would just need something to react upon those events
21:36 manfred like some sort of minion... reactor... thing
21:36 manfred i am going home now
21:36 MrTango joined #salt
21:36 Ryan_Lane yep. reactor system :)
21:39 lionel joined #salt
21:39 kermit joined #salt
21:41 aparsons joined #salt
21:42 smcquay joined #salt
21:43 DrQuest what's the best way to have haproxy react to a new minion being created?
21:43 DrQuest I've seen it done like 4 different ways in the docs
21:46 pled76 joined #salt
21:47 yomilk joined #salt
21:49 patarr DrQuest: how are you using haproxy with salt
21:49 TOoSmOotH I am trying to run service.running on a custom init script I wrote but it says it can’t find the service. If I do a chkconfigu —list its there
21:51 kingel joined #salt
21:52 DrQuest I'm just using salt to ensure that HAproxy is installed and pointing at the correct minions as they (the minions) turn on and off
21:52 DrQuest with salt-cloud
21:54 aparsons joined #salt
21:56 sroegner_ joined #salt
21:57 mechanicalduck_ joined #salt
21:59 occup4nt joined #salt
21:59 Ryan_Lane DrQuest: in that case I think reactors may be your best bet
21:59 dude051 joined #salt
22:00 DrQuest mm, I'd gotten that part ;)
22:01 KyleG1 joined #salt
22:01 Ryan_Lane I think something like etcd or zookeeper is going to be more reliable than relying on the salt master for this
22:01 aparsons_ joined #salt
22:01 Ryan_Lane react -> write into zookeeper/etcd -> tell minions to update
22:01 neilf__ joined #salt
22:01 Ryan_Lane then also have a cron or something on the minion that makes it check on a schedule
22:01 Ryan_Lane that way if the push event fails a pull event will succeed
22:02 DrQuest mm, that makes sense
22:02 DrQuest I'll bark up that tree
22:02 Ryan_Lane I always assume that pushes will fail (no matter what you're using)
22:03 ClausA joined #salt
22:03 jinlin_gan joined #salt
22:04 floWenoL can I use the same state to enable a service and start it?
22:05 possibilities joined #salt
22:06 aparsons joined #salt
22:07 aparsons_ joined #salt
22:08 Rojematic joined #salt
22:09 viq_ joined #salt
22:09 ipmb joined #salt
22:09 jalbretsen1 joined #salt
22:10 peno joined #salt
22:10 UtahDave homebody_rlarkin: we always love to read and share case studies!  Please do let me know if you'd like to work on one with us.  :)
22:10 beneggett joined #salt
22:10 N-Mi joined #salt
22:10 ajolo joined #salt
22:12 manfred floWenoL: yes
22:12 manfred nginx:
22:12 manfred service.running:
22:12 manfred - enable: True
22:12 mhubbard_ joined #salt
22:12 sroegner__ joined #salt
22:13 manfred floWenoL: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html#salt.states.service.running
22:13 manfred that is the only way
22:13 manfred you can't have a service.running and service.enabled under the same stateid, if you wanted them to be seperated, you would need two state ids
22:13 geekmush1 joined #salt
22:14 rglen_ joined #salt
22:16 UtahDave Ryan_Lane: can haz
22:16 rojem joined #salt
22:16 Voziv joined #salt
22:17 goal joined #salt
22:17 colttt joined #salt
22:17 ninkotech joined #salt
22:17 viq_ joined #salt
22:17 Ryan_Lane UtahDave: can haz what now? :)
22:17 UtahDave minion reactors.
22:19 UtahDave Just mentioned your request to Tom.  He got excited because it's a great idea and it's all abstracted out such that it's an easy addition
22:19 manfred yeah, it should be super easy
22:20 aparsons joined #salt
22:21 manfred UtahDave: should be just as easy as adding a start_reactor function to the Minion() class?
22:21 manfred that uses it's own reactor on the self.opts in the minion
22:21 xcbt joined #salt
22:22 conan_the_destro joined #salt
22:22 jut joined #salt
22:23 Ryan_Lane yeah, I'd like it a lot
22:23 Ryan_Lane there's not a really good way to listen to external events right now, though, is there?
22:23 Ryan_Lane for instance with etcd, how would etcd notify the minion?
22:24 dstokes i'm using the --subset flag on a salt master installation. the selected minions don't appear to be random. it runs on the same minions every time..
22:24 homebody_rlarkin manfred: just to follow up.  this seems to be the only syntax that will work ( in a reactor.sls ) for grains.setval: http://paste.debian.net/117534/
22:24 homebody_rlarkin took me awhile
22:25 manfred yeah
22:26 UtahDave Ryan_Lane: Hm. You might be able to use the webhook, but I don't know if that would work minion side
22:26 Ryan_Lane so, this brings me back to another feature request.... :)
22:27 homebody_rlarkin feature: do what I meant and not what I said
22:27 manfred Ryan_Lane: techhat would need to do that, i would think it would be best to fire off events when the etcd cache changes
22:27 manfred or are you changing etcd using salt?
22:27 Ryan_Lane https://github.com/saltstack/salt/issues/11762
22:27 Ryan_Lane I think we may update etcd and also read from it
22:27 Ryan_Lane more likely read from it
22:27 p2 joined #salt
22:27 kaptk2 joined #salt
22:27 manfred but are you updating it using salt, or doing that seperate from salt?
22:28 Ryan_Lane oh, whoops
22:28 dccc_ joined #salt
22:28 Ryan_Lane wrong feature request
22:28 manfred if you don't update with salt, you can't get the reactor to fire off right when it updates
22:28 Ryan_Lane https://github.com/saltstack/salt/issues/11330
22:28 Ryan_Lane there we go
22:28 tkharju joined #salt
22:28 manfred also, it wouldn't throw an event into the reactor of all your masterless minions, just the minion it updated on
22:28 manfred yeah, then you would need that
22:28 davet joined #salt
22:29 Ryan_Lane etcd -> notifiers -> highstate
22:29 manfred yar
22:29 Ryan_Lane well, etcd -> notifiers -> reactors -> highstate
22:29 UtahDave Ryan_Lane: I like it. +!
22:33 manfred UtahDave: question, how are you planning on using the reactor stuff, cause you have to change some things so that it only does salt-call on the minion, and won't use 'tgt': like it does currently for the cmd. modules in the master reactor
22:34 UtahDave manfred: I have no idea.  Let me check with Tom
22:34 manfred kk, i could just check with what type of reactor it is...
22:34 manfred but yeah
22:34 manfred it wouldn't be able to use runner, wheel that is in salt.utils.events.ReactWrap()
22:35 phaer1 joined #salt
22:36 koyd is there a #salt.dev or equivalent?
22:36 phaer1 Is there a way to use relative paths or environment variables in the configuration files for salts master?
22:36 manfred koyd: salt-devel is mostly just for jenkins
22:37 koyd I'm enjoying the talk about the features development and would like to contribute sometime, but it'd be nice to follow dev-specific talk
22:37 manfred Ryan_Lane: looks like your salt-minion --local guys don't have an event system https://github.com/saltstack/salt/blob/develop/salt/utils/event.py#L495
22:37 Ryan_Lane they don't, yeah
22:37 dbanck joined #salt
22:37 manfred koyd: usually happens in github issues
22:37 Ryan_Lane that's problematic for sure
22:38 koyd Ah, I need to browse some then :). Thanks, manfred
22:38 tristanmatthews joined #salt
22:39 manfred UtahDave: it is using the cmd_async from salt.client.__init__.LocalClient
22:40 manfred so yeah, needs a way to run on the local minion, and not through the masters command
22:40 phaer1 I am asking because i'd like to keep my config_dir for salt-ssh in a git-repo without encoding any absolute paths.
22:41 manfred phaer1: i do not believe it can be completely relative, beacuse it still requires a configuration of the config directory... someone else was trying to do something similar recently for salt-ssh, and I don't remember if he succeeded
22:41 TOoSmOotH I have a service listed in chkconfig —list but when I run state.highstate it says the service can’t be found
22:41 TOoSmOotH I can start and stop the service with the service command
22:41 bhosmer joined #salt
22:42 TOoSmOotH manually
22:42 phaer1 manfred: I'd be okay with using --config-dir if the rest could be relative
22:42 Ryan_Lane it's not possible. you have to specify some command-line options when running salt-call, if you want to do that
22:42 Ryan_Lane most config options in the file require absolute paths
22:42 Ryan_Lane it's very annoying when running salt as non-root
22:43 Ryan_Lane phaer1: most of the stuff you want can be done via arguments
22:43 manfred TOoSmOotH: which distro/version?
22:43 TOoSmOotH Centos 6.5
22:43 phaer1 Ryan_Lane: Yes, i'm just going to check-in a single, long salt-ssh call into a .sh file if necessary.
22:43 phaer1 thanks
22:43 Ryan_Lane -m, --file-root, --pillar-root, -c,
22:43 manfred TOoSmOotH: sysvinit script or upstart script?
22:44 TOoSmOotH Comment: The named service netsniff-ng is not available
22:44 TOoSmOotH sysvinit
22:44 TOoSmOotH netsniff-ng    0:off1:off2:off3:off4:off5:off6:off
22:44 CeBe joined #salt
22:44 TOoSmOotH I get that when I do a chkconfig --list
22:44 manfred what if you run salt-call service.start netsniff-ng -l debug on the minion and check for errors?
22:44 TOoSmOotH I shall try that
22:45 TOoSmOotH hrm hanging on the executing command
22:46 TOoSmOotH but its running in the background
22:46 tristanmatthews Hi all, I'm rewriting all the salt stuff from a project I was handed a while ago. The current state of it uses salt to call fabric for some of the python dependancies... which seems really weird to me. Is there some reason I'm not thinking of for that, or should I just follow me instincts and get rid of fabric.
22:47 TOoSmOotH ok I fixed the hanging problem.. I had changed the init script forf trobleshooting
22:47 freelock Hi, having trouble with "Off" getting converted to False
22:47 freelock http://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#true-false-yes-no-on-off
22:48 UtahDave manfred and Ryan_Lane, I just had a quick design discussion with Tom.  It's not quite as easy as we initially thought, but not too bad.
22:48 TOoSmOotH [INFO    ] Executing command '/sbin/service netsniff-ng start' in directory '/root'
22:48 TOoSmOotH [INFO    ] output: Starting netsniff-ng:
22:48 manfred TOoSmOotH: you should be able to get rid of fabric
22:48 UtahDave it's going to work out pretty nicely
22:48 freelock I've tried both single and double-quotes, but it keeps getting output in jinja as False...
22:48 freelock ???
22:48 manfred bah
22:48 manfred tristanmatthews: you should be able to get rid of fabric
22:48 jalaziz joined #salt
22:48 forrest tristanmatthews, get rid of fabric
22:50 tristanmatthews manfred, forrest: ok thanks, just wanted to make sure there wasn't something subtle I was missing.
22:50 manfred forrest: can you share your piller file?
22:50 forrest tristanmatthews, doubtful, sounds like someone was either using a super old release of salt, or wasn't aware of all the functionality (or was trying to avoid doing more work)
22:50 UtahDave Ryan_Lane: We're thinking that the minion reactor will be configured with an option named  minion_reactor in the master config, pillar, or minion config
22:50 forrest manfred, we don't use traditional pillars, we use reclass.
22:50 forrest manfred, so no
22:50 UtahDave Ryan_Lane: It will just be able to execute states.
22:50 manfred bah
22:50 manfred not you
22:50 TOoSmOotH manfred: When I run state.highstate -l debug I get this:
22:50 TOoSmOotH [INFO    ] Completed state [nschkconfig] at time 22:49:14.643643
22:50 TOoSmOotH [INFO    ] Running state [netsniff-ng] at time 22:49:14.644265
22:50 manfred freelock: can you share your pillar data that is failing?
22:50 TOoSmOotH [INFO    ] Executing state service.running for netsniff-ng
22:51 TOoSmOotH [ERROR   ] The named service netsniff-ng is not available
22:51 Ryan_Lane UtahDave: why not execution modules as well?
22:51 forrest TOoSmOotH, is there a service called netsniff-ng?
22:51 mhubbard joined #salt
22:51 TOoSmOotH yea.. its in there when yea
22:51 TOoSmOotH blah
22:52 TOoSmOotH yes its in thre when I do a chkconfig --list
22:52 TOoSmOotH and I can do service start status stoip etc
22:52 manfred TOoSmOotH: salt-call service.available netsniff-ng
22:52 UtahDave Ryan_Lane: I think mostly because we have a written standard on how to textually describe a state file.
22:52 TOoSmOotH yea says false
22:52 manfred that is the problem
22:53 UtahDave Ryan_Lane: what if you could put an execution module command right in the configuration?
22:53 TOoSmOotH maybe its the init script I wrote
22:53 aquinas joined #salt
22:53 manfred TOoSmOotH: the file is in /etc/init.d/netsniff-ng?
22:53 TOoSmOotH yes
22:54 freelock manfred: http://pastebin.com/kKDdn1kM
22:54 TOoSmOotH 755
22:54 freelock thanks for looking!
22:54 debian112 joined #salt
22:54 TOoSmOotH weird that it will run with service.start
22:54 TOoSmOotH but doesn’t show on service.available
22:55 bezeee joined #salt
22:55 debian112 anyone deploying IP ADDRESSES to theire minions?
22:55 manfred freelock: it is working here
22:55 manfred freelock: salt --version
22:55 freelock salt 2014.1.10 (Hydrogen)
22:57 freelock Hmm. I haven't actually run this state yet -- is there any reason the test would fail when the actual apply succeeds?
22:57 freelock (I'm still moving specific configs on this server into salt)
22:57 freelock the test keeps showing it's going to change the KeepAlive to False
22:57 Ryan_Lane UtahDave: in the configuration?
22:58 Ryan_Lane I'd really like this to work as closely to master reactors as possible :)
22:58 forrest freelock, yes, because if there is a dependency that isn't already on the box, it will fail in the test
22:58 UtahDave Ryan_Lane: Hm. Yeah, good point.
22:58 forrest freelock, for example, you install nginx in the state ,then start the service. The package will say it is going to be installed, the service will be marked as failed because it doesn't exist
22:58 Ryan_Lane waiting 6 months and getting a consistent interface is much better than getting an inconsistent one now :)
22:58 forrest freelock, but if you were running it for real it would work fine.
22:59 freelock well, the state applies in the test without throwing an error, it's just showing that it's converting "On" to "False"
23:00 freelock all the dependencies are there -- what I'm trying to do is get the config into salt so I can re-deploy safely with same values
23:00 elfixit joined #salt
23:01 freelock forrest: would the On/False Yaml quirk described here get expanded differently between test=True and test=False? http://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#true-false-yes-no-on-off
23:01 TOoSmOotH This is the ini script: http://pastebin.com/gazpQv00
23:01 UtahDave Ryan_Lane: OK. I'll think about this some more.
23:01 aparsons joined #salt
23:02 Ryan_Lane cool. honestly this seems like a good feature for next release
23:02 Outlander joined #salt
23:03 UtahDave Ryan_Lane: Yeah, me too.
23:04 forrest freelock, I'm not sure
23:05 manfred freelock: that pillar file is working correctly here on 2014.1.10
23:06 aparsons joined #salt
23:06 freelock well, it's showing up correctly for me when I salt-call pillar.data
23:06 melinath joined #salt
23:06 freelock but it's getting substituted in the jinja template wrong
23:06 manfred sounds like it isn't refreshing between sunrs fast enough
23:06 manfred run a salt \* saltutil.refresh_pillars
23:07 manfred refresh_pillar *
23:08 manfred no s
23:08 freelock no change, still substituting wrong...
23:08 freelock Seems like {{ keepalive }} is getting  evaluated as boolean even though it's a string
23:08 Daemonik joined #salt
23:08 freelock any way to force that in the template?
23:09 manfred if you call salt \* pillar.get apache:options:keepalive from the master, does it appear correctly?
23:11 freelock Just tried {{ salt['pillar.get']('apache:options:keepalive', 'Off') }} in the template, and that works correctly
23:11 freelock but I want to set the default differently from two different state files :-(
23:11 manfred TOoSmOotH: as a last resort, it should just do a chkconfig --list to see if it is available https://github.com/saltstack/salt/blob/develop/salt/modules/rh_service.py#L132
23:12 manfred freelock: so, you are putting thepillar data into the state file, did you quote Off in the state file?
23:12 manfred "{{keepalive}}"
23:12 freelock I did
23:12 manfred cause once it is in the state file, it is unquoted if you are just dumping it back into yaml
23:12 manfred can I see the state file too?
23:13 freelock pastebin has all 3 -- the state and the template too
23:13 TOoSmOotH manfred: thanks.. I am going to try and rewrite the init script using a different template and see if that helps
23:13 TOoSmOotH then I Will try that
23:13 TOoSmOotH thanks again
23:13 manfred freelock: keepalive: {{ salt['pillar.get']('apache:options:keepalive', "Off") }}
23:13 manfred that line
23:13 manfred needs to be quoted
23:13 DaveQB joined #salt
23:14 freelock ah, outside the braces?
23:14 manfred keepalive: "{{ salt['pillar.get']('apache:options:keepalive', 'Off') }}"
23:14 manfred yeh
23:14 manfred cause if you don't it just dumps Off into yaml, unquoted
23:14 manfred which, as you know, changes it to False
23:15 freelock that did it! Thanks...
23:15 manfred np
23:15 freelock driving me crazy, that one!
23:15 manfred TOoSmOotH: that init script should work fine
23:15 jalaziz joined #salt
23:19 gaker joined #salt
23:19 dude051 joined #salt
23:19 TOoSmOotH hrm modifying that didn’t help eaither
23:20 KyleG joined #salt
23:20 KyleG joined #salt
23:21 melinath_ joined #salt
23:23 TOoSmOotH [root@SaltMinionDEV init.d]# chkconfig --list netsniff-ng
23:23 TOoSmOotH netsniff-ng    0:off1:off2:on3:on4:on5:on6:off
23:24 manfred TOoSmOotH: i would throw a bunch of log.debug messages inside that rh_service.py/available() class and see if I could figure out which function it is oging to, and then figure oute hwy it is failing
23:24 manfred cause that is the problem
23:24 manfred everything in that looks correct though, if it is in /etc/init.d/netsniff-ng and is 755, it should work
23:24 jensnockert joined #salt
23:24 manfred TOoSmOotH: what do you get for echo $? after running that chkconfig?
23:25 TOoSmOotH 0
23:26 manfred yeah, then it really should work on that last return statement
23:26 TOoSmOotH [root@SaltMinionDEV init.d]# chkconfig --list netsniff-ng && echo $?
23:26 TOoSmOotH netsniff-ng    0:off1:off2:on3:on4:on5:on6:off
23:26 TOoSmOotH 0
23:26 TOoSmOotH [root@SaltMinionDEV init.d
23:26 UtahDave left #salt
23:27 mosen joined #salt
23:29 TOoSmOotH adding some log statements now
23:31 yomilk joined #salt
23:34 bmcorser joined #salt
23:37 pentabular joined #salt
23:48 gzcwnk joined #salt
23:49 gzcwnk hello, anyone in?
23:49 DrQuest no
23:49 DrQuest ought to lunch I'm afraid
23:49 gzcwnk my salt minnions seem to be going to sleep.
23:49 gzcwnk ah neat.
23:49 mosen working too hard
23:50 DrQuest tell them not to?
23:50 gzcwnk little buggers ignore me
23:50 gzcwnk na they are doing diddly
23:50 DrQuest you'd have to give more details
23:51 gzcwnk dont know many details, jst when I run a state commend they dont reply, so I stop them and run debug mode and they work immediately
23:52 gzcwnk if i restart them they usually work as well
23:52 Ryan_Lane gzcwnk: what version of salt are you using?
23:52 DrQuest oh yeah, I've experienced this behavior sometimes to, have run test.ping a few times before they behave
23:52 Ryan_Lane this sounds like a bug people are tracking down in the release candidate
23:52 gzcwnk salt-minion-2014.1.7-3.el6.noarch its been doing this for 3 or 4 versions
23:53 gzcwnk yeah test.ping seems to fix it as well, sometimes
23:53 DrQuest first run, 1/5 of the minions respond, 2nd run 4/5ths, 3rd run, oh we're all here
23:53 gzcwnk ryan got a link to the bug?
23:53 DrQuest and then you can run high state reliably
23:54 dude051 joined #salt
23:54 DrQuest for the next 10-15 minutes before it starts up again
23:54 gzcwnk yeah that sounds right as well....its like they go to sleep pretty quickly
23:55 DrQuest this occurs with, * for pillars, grains, mine and states
23:55 Ryan_Lane can't find the thread
23:55 gzcwnk so its probably a know bug which is something
23:55 gzcwnk its been in 1.4 and 1.5
23:55 Ryan_Lane https://groups.google.com/forum/#!topic/salt-users/bhfByk5f4J0
23:56 gzcwnk Ive had it sisnce I started using salt, for the last 3 or 4 months
23:57 bhosmer joined #salt
23:59 dude051 joined #salt

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