Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-10-09

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

All times shown according to UTC.

Time Nick Message
00:00 mechanicalduck joined #salt
00:01 rattmuff joined #salt
00:06 n8n_ joined #salt
00:08 KyleG joined #salt
00:08 KyleG joined #salt
00:08 KyleG joined #salt
00:08 KyleG joined #salt
00:08 KyleG joined #salt
00:08 KyleG joined #salt
00:09 KyleG joined #salt
00:09 KyleG joined #salt
00:09 KyleG joined #salt
00:09 KyleG joined #salt
00:13 murrdoc joined #salt
00:22 DaveQB joined #salt
00:26 murrdoc joined #salt
00:29 joehoyle joined #salt
00:31 djstorm joined #salt
00:39 joehoyle joined #salt
00:42 deeprave joined #salt
00:49 deeprave joined #salt
01:02 tharkun joined #salt
01:05 tharkun joined #salt
01:09 skyler joined #salt
01:09 TaiSHi joined #salt
01:09 TaiSHi joined #salt
01:10 cberndt joined #salt
01:14 malinoff joined #salt
01:18 joehoyle joined #salt
01:20 skyler How do I run a script with a url as its source? I want to be able to run a shell script that I download from the internet and not leave a copy of it on my minion after execution.
01:20 nitti joined #salt
01:24 ashirogl joined #salt
01:24 n8n joined #salt
01:30 ssaasen joined #salt
01:31 nosleep77 joined #salt
01:32 nosleep77 left #salt
01:35 viq joined #salt
01:38 __number5__ skyler: add a state to remove the script after execution
01:39 otter768 joined #salt
01:39 joehoyle joined #salt
01:45 ashirogl joined #salt
01:48 monokrome joined #salt
01:51 cberndt joined #salt
01:51 ashirogl1 joined #salt
01:54 pipps joined #salt
01:55 ashirogl joined #salt
02:00 pipps joined #salt
02:08 ashirogl1 joined #salt
02:20 ashirogl joined #salt
02:22 ashirogl joined #salt
02:24 jalaziz joined #salt
02:30 SheetiS joined #salt
02:33 kusams joined #salt
02:33 Nexpro1 joined #salt
02:47 Ryan_Lane joined #salt
02:48 Nexpro1 joined #salt
02:59 bhosmer joined #salt
03:01 n8n joined #salt
03:02 murrdoc joined #salt
03:03 ramishra joined #salt
03:05 possibilities joined #salt
03:14 SheetiS joined #salt
03:15 malinoff joined #salt
03:20 bhosmer joined #salt
03:20 schimmy joined #salt
03:22 pipps joined #salt
03:25 schimmy1 joined #salt
03:37 ramishra joined #salt
03:42 tempspace joined #salt
03:45 ajolo joined #salt
03:56 ashirogl joined #salt
03:56 kedo39 joined #salt
04:08 dccc__ joined #salt
04:09 n8n joined #salt
04:12 ldlework joined #salt
04:13 ramishra joined #salt
04:14 jalbretsen joined #salt
04:21 Ryan_Lane joined #salt
04:23 active8 joined #salt
04:24 floWenoL joined #salt
04:25 ramteid joined #salt
04:26 ashirogl joined #salt
04:37 felskrone joined #salt
04:39 mosen joined #salt
04:41 kedo39 joined #salt
04:47 obimod joined #salt
05:07 schimmy joined #salt
05:08 Ryan_Lane joined #salt
05:11 schimmy1 joined #salt
05:22 darrend joined #salt
05:37 baconbeckons joined #salt
05:43 murrdoc joined #salt
05:47 murrdoc is there a 'how to make a package from salt git repo tag'
05:49 roolo joined #salt
05:56 stephanbuys joined #salt
06:03 ttrumm joined #salt
06:04 ramishra joined #salt
06:06 colttt joined #salt
06:07 mikeywaites joined #salt
06:12 masm joined #salt
06:13 masm left #salt
06:17 kingel joined #salt
06:18 mechanicalduck_ joined #salt
06:36 kingel joined #salt
06:39 ndrei joined #salt
06:40 ajolo joined #salt
06:41 hintss joined #salt
06:43 quanta_ joined #salt
06:46 quanta_1 joined #salt
06:48 kingel joined #salt
06:48 quanta_ joined #salt
06:48 xsteadfastx joined #salt
06:50 quanta_1 joined #salt
06:53 quanta_ joined #salt
06:54 xsteadfastx joined #salt
06:55 quanta_1 joined #salt
06:56 zerthimon joined #salt
06:56 saravanans joined #salt
07:00 quanta_ joined #salt
07:03 quanta_1 joined #salt
07:05 quanta_1 left #salt
07:06 TyrfingMjolnir joined #salt
07:11 linjan_ joined #salt
07:12 lcavassa joined #salt
07:14 trikke joined #salt
07:15 bhi_ joined #salt
07:15 tomspur joined #salt
07:16 N3X15 joined #salt
07:20 kingel_ joined #salt
07:20 chiui joined #salt
07:23 xsteadfastx joined #salt
07:27 martoss joined #salt
07:27 agend joined #salt
07:36 bhi_ joined #salt
07:41 aquinas joined #salt
07:42 tmh1999 joined #salt
07:45 desposo joined #salt
07:45 ramishra joined #salt
07:46 aquinas_ joined #salt
07:47 martoss1 joined #salt
07:50 agend joined #salt
07:52 duncanmv joined #salt
07:54 Ryan_Lane joined #salt
07:55 mikeywaites joined #salt
07:55 netzmonster joined #salt
08:00 jeddi joined #salt
08:02 baconbeckons joined #salt
08:03 spo0nman joined #salt
08:05 baconbeckons joined #salt
08:09 ashirogl joined #salt
08:13 Outlander joined #salt
08:15 mechanicalduck joined #salt
08:18 wnkz joined #salt
08:24 PI-Lloyd joined #salt
08:29 flyboy82 joined #salt
08:29 techdragon joined #salt
08:30 astol joined #salt
08:34 astol hi all, I need to put a php extension config in php extension dir, but I don't know exact dir location, it depends on build. I can get it by calling php-config —extension-dir on target machine. What will be the most 'true' way to do it with salt? I'm thinking about file.managed, where name is specified with {% cmd.run %} calling php-config
08:38 saravana_ joined #salt
08:46 nkuttler astol: sounds like a grain?
08:46 astol nkuttler: yeah, to me too, but how do I fill it? I only know it after I install php
08:46 nkuttler oh
08:46 ramishra joined #salt
08:46 mikeywaites left #salt
08:47 babilen astol: Can't you install php and then write a custom grain that only sets the value to something once it actually can do that?
08:47 iMil joined #salt
08:48 babilen I mean just write robust Python code and set it to some sensible default/dummy/not set value if the grain cannot compute the actual value yet
08:49 astol babilen: aaah, will dig into that direction
08:49 astol babilen: but writing python code sounds like an overkill in this situation
08:49 babilen How so?
08:52 babilen https://www.refheap.com/91444 that's an example of a custom grain to check for LACP. Just put it in _grains, sync it on client start (http://docs.saltstack.com/en/latest/topics/reactor/#syncing-custom-types-on-minion-start) and you are set
08:53 akafred joined #salt
08:57 CeBe joined #salt
09:01 jalaziz_ joined #salt
09:03 jalaziz__ joined #salt
09:22 bhosmer joined #salt
09:23 TheThing|laptop joined #salt
09:38 badon joined #salt
09:40 N-Mi joined #salt
09:40 N-Mi joined #salt
09:48 zooz joined #salt
09:49 TheThing|laptop joined #salt
09:50 papashou joined #salt
09:53 CycloHex joined #salt
09:54 CycloHex I have postgresql installed, but my template is in ascii format, not en_us.utf8... It seems impossible for me to get postgres to use utf8. running 2014.1.10
09:55 CycloHex anyone here on this version who's psql generates templat ein utf8?
09:56 ramishra joined #salt
09:59 Outlander joined #salt
09:59 fredvd joined #salt
10:02 viq CycloHex: did you set encoding: utf8 and template: template0 ?
10:02 CycloHex where, viq?
10:02 viq In your state
10:02 viq As that's what I'm assuming you're trying to do
10:03 viq http://docs.saltstack.com/en/latest/ref/states/all/salt.states.postgres_database.html
10:03 TheThing|laptop joined #salt
10:06 viq_ joined #salt
10:06 ramishra joined #salt
10:07 CycloHex no, i do a pkg install
10:07 CycloHex I don't call the state
10:07 viq_ And is that any different than if you installed the package by hand?
10:15 asmaps joined #salt
10:24 ramishra joined #salt
10:38 nkuttler yikes, i'm getting this on a squeeze host http://dpaste.com/0DMD3RX
10:38 nkuttler (pkg.upgrade)
10:46 nkuttler https://github.com/saltstack/salt/issues/16430
10:47 nkuttler yeah, looks like python-apt is no dep..
10:48 nkuttler doesn't seem to be a problem for my other debian hosts though..
10:48 nkuttler ah, never mind, it's installed on all others..
10:50 bahadir joined #salt
10:53 CycloHex viq, the default locale for salt-minions is C.. and I can't seem to get them to default to en_us.utf-8
10:56 rubenb joined #salt
11:01 rubenb Hi. Has anyone using salt-cloud figured out how to run a highstate on deployment?
11:01 CycloHex yes
11:01 johtso Can anyone recommend a good supervisord alternative with good salt integration?
11:01 CycloHex johtso, salmon? if you mean monitoring
11:01 CycloHex rubenb, you can add startup_states: highstate
11:02 johtso supervisor's been a nightmare.. leaving grandchild processes running.. not being able to stop or restart processes when their in "BACKOFF" etc.
11:02 rubenb CycloHex: In the cloud.provider or the cloud.profile?
11:02 CycloHex in your /etc/salt/cloud file where oyu provide the minion: with master
11:02 johtso CycloHex: process control / management
11:03 CycloHex johtso, sorry, no experience with that, yet :d
11:03 CycloHex rubenb, you can always use reactors as well.. http://docs.saltstack.com/en/latest/topics/cloud/reactor.html
11:04 rubenb CycloHex: Testing now.
11:04 CycloHex (y), rubenb
11:05 wnkz__ joined #salt
11:05 rubenb The docs I found, said something about the start_action: state.highstate.
11:06 rubenb (Which does not work)
11:08 CycloHex https://gist.github.com/Cyclohex/fc18dab6596e52919612
11:08 CycloHex rubenb, ^
11:09 wnkz joined #salt
11:10 scottpgallagher joined #salt
11:10 rubenb Yup, typoing it to startup_state (without s) does not work. I tested it to be sure.
11:10 diegows joined #salt
11:11 CycloHex it is startup_states
11:11 CycloHex http://docs.saltstack.com/en/latest/ref/states/startup.html
11:13 johtso Is supervisord the only process management tool that salt states exist for?
11:14 rubenb Hm, there are salt states for supervisord?
11:14 johtso yep!
11:15 johtso I'm wondering if I'm doing something wrong to be having so much trouble with it..
11:15 rubenb Nice. We always used file.managed and service restart
11:19 rubenb CycloHex: It seems to work now with the startup_states
11:19 CycloHex rubenb, great!
11:23 astol rabbitmq_plugin state doesn't detect changes: http://pastebin.com/0SCXGXSp Can I fix this manually somehow?
11:23 rubenb Now only getting the dns record created on deployment, and I'm done.
11:24 TyrfingMjolnir joined #salt
11:27 briner joined #salt
11:27 oyvjel joined #salt
11:33 superted joined #salt
11:37 ramishra joined #salt
11:39 nkuttler basepi: just wondering, but #16430 is closed without a fix. is that due to the pending discussion/added to milestone?
11:48 whitenite joined #salt
11:49 berto- joined #salt
11:49 Jahkeup joined #salt
11:53 dccc__ joined #salt
11:54 cads joined #salt
11:59 scarcry joined #salt
12:02 CycloHex anyone here using maps to deploy minions with salt-cloud?
12:03 babilen maps?
12:03 CycloHex salt-cloud maps
12:03 CycloHex http://salt-cloud.readthedocs.org/en/latest/topics/map.html
12:03 CycloHex i'm trying to use this in order to be able to set custom grains on my newly deployed minion
12:03 bhosmer joined #salt
12:04 che-arne joined #salt
12:05 babilen CycloHex: I guess that there are some people in this channel who used that.
12:06 CycloHex Well, I might get reaction soon, then :d
12:07 babilen So, assuming such a person exists: What would you ask this hypothetical person? (i.e. What is your real question?)
12:07 hintss joined #salt
12:08 CycloHex Does it work? Because I get an error and google isn't helping me with that error...
12:10 babilen Ah, so you get and error when you $SOMETHING and that error is $ERROR. Why do you think that $SOMETHING would work and what did you want it to do? What is the exact $ERROR you get and why is "google" not helping? Are there no hits or are the hits not related to what you are doing? What else have you done to debug this problem?
12:10 CycloHex you seem upset, babilen
12:10 babilen No, not at all.
12:11 babilen I just try to get you to ask a question one can actually work with.
12:11 babilen Read http://mattgemmell.com/what-have-you-tried/ and http://www.catb.org/esr/faqs/smart-questions.html and provide information on a pastebin (e.g. http://refheap.com )
12:13 UtahDave joined #salt
12:13 glyf joined #salt
12:13 UtahDave left #salt
12:15 nicolasbadia Hi guys, I’m having issue when running apt-update from a state.cmd. I get: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
12:15 nicolasbadia If I run apt-get update directly on the minion, no problem
12:16 CycloHex babilen, https://gist.github.com/Cyclohex/8eea8c41c4907c23237b
12:17 babilen nicolasbadia: What exactly are you running? Can you run other commands? (that error is, for example, indicative of problems during fork)
12:17 babilen CycloHex: I guess that you are missing a "-" on line 4
12:17 babilen (in front of grains)
12:18 nicolasbadia I get the error even if I run only that:
12:18 nicolasbadia apt-update:
12:18 nicolasbadia cmd.run:
12:18 nicolasbadia - name: apt-get update
12:18 SheetiS joined #salt
12:18 nicolasbadia Using this command: salt 'serverfront' state.sls apt
12:19 nicolasbadia The 3 lines of code I gave you are in srv/apt/init.sls
12:19 babilen nicolasbadia: Why do you want to run update in a state?
12:20 nicolasbadia Because I update source.list just before
12:20 nicolasbadia Here is my real state: https://gist.github.com/nicolasbadia/a9e55603b975ac384616
12:20 babilen http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html#salt.states.pkgrepo.managed makes sure that you are using updated list files
12:21 babilen (which, it appears, is what you should use rather than writing that yourself)
12:22 babilen CycloHex: Did that help?
12:22 CycloHex no.. but I'll keep looking into it
12:24 babilen nicolasbadia: And just as a tip: I wouldn't write states that result in changes every time they are run, but either run those manually or schedule them via salt schedule. My personal approach is to design states that result in a no-op if they succeeded *once* before. You cannot always do that, but I wouldn't run dist-upgrade from a state for example.
12:24 babilen CycloHex: Do you get a different error now that you changed that (or was I mistaken in assuming that that was an actual issue?)
12:25 CycloHex babilen, yes I get another error now.
12:25 ramishra joined #salt
12:25 babilen So, progress?
12:25 nicolasbadia Yeah, I agree but I’m not sure how to do differently. Can you point me to an example ?
12:26 CycloHex not really, since the error is as unreadable for me as the first one
12:26 CycloHex https://gist.github.com/Cyclohex/8eea8c41c4907c23237b
12:26 gmcwhistler joined #salt
12:26 babilen nicolasbadia: Configure your dotdeb (if you really have to, but that's a different topic) repositories in a pkgrepo.managed state. That will make sure that you can install packages from that repo and then refer to it in a pkg.installed state via fromrepo: dotdeb. I wouldn't run any dist-upgrades in there, but run those manually.
12:27 babilen CycloHex: That still is missing a - on line 4 isn't it?
12:28 CycloHex the 2nd gist is the error, i just added another gist to that link
12:29 Outlander joined #salt
12:29 nicolasbadia So if I add my dotdeb repo in a pkgrepo.managed state, salt will take care to run apt-get update for me ? What if I also need to add « deb http://http.debian.net/debian wheezy-backports main » in the sources.list ?
12:29 CycloHex there, the mapfile has been added to gist2
12:31 nicolasbadia Hum I should add it also as a pkgrepo right ?
12:31 babilen CycloHex: Ah, I was mistaken after having checked the actual syntax. Line 4 should have been indented one more level, shouldn't it?
12:32 babilen nicolasbadia: You can manage all repositories you want to manage via pkgrepo.managed states and, yes, it will make sure that the packaging system is up-to-date .
12:32 CycloHex I thought It didn't have to be indented one more level, but i'll give it a go
12:33 babilen CycloHex: The example given in the docs looks like it.
12:33 CycloHex the example given in the docs is not entirely correct imo
12:33 babilen how so?
12:34 babilen Sorry, I just try to infer the "should" state from the documentation and check for differences between that configuration and yours.
12:34 cpowell joined #salt
12:35 CycloHex ok, thanks for your help thus far, babilen
12:36 CycloHex ok, fixed
12:36 CycloHex http://docs.saltstack.com/en/latest/topics/cloud/map.html
12:37 CycloHex there were too many '-' in my map..
12:39 mitsuhiko hmm. is there a reason salt-cloud is missing here for latest lts? https://launchpad.net/~saltstack/+archive/ubuntu/salt
12:41 mitsuhiko it's completely missing for trusty
12:42 mitsuhiko so this guide definitely does not work: http://docs.saltstack.com/en/latest/topics/cloud/install/index.html
12:42 CycloHex mitsuhiko, which version are you running? since 2012.1.0 salt)cloud is included in salt
12:42 mitsuhiko it's included in *salt*
12:42 mitsuhiko but not included in the salt ppa
12:43 CycloHex ah
12:43 CycloHex ok
12:43 CycloHex no experience with ppa
12:44 mitsuhiko hmm. actually it should exist
12:45 vejdmn joined #salt
12:46 flyboy82 joined #salt
12:50 miqui joined #salt
12:50 XenophonF joined #salt
12:51 nicolasbadia babilen: So I changed my apt state as suggested (https://gist.github.com/nicolasbadia/a9e55603b975ac384616) and it’s working great so far (a lot faster :-)). Just a last question, you suggested me not to call apt-get upgrade in my states, but how do you call it then ?
12:51 mpanetta joined #salt
12:53 intellix joined #salt
12:53 bhosmer joined #salt
12:53 higgs001 joined #salt
12:54 desposo joined #salt
12:55 mitsuhiko for some reason my minion's default id is wrong
12:55 mitsuhiko does salt have a cache somewhere?
12:55 mitsuhiko the docs say it should use socket.getfqn() to get the minion id
12:56 mitsuhiko so either the docs are lying or the data is cached somewhere
12:56 mitsuhiko socket.getfqdn() returns the correct hostname whereas my minion id is the old hostname of the ec2 instance
12:57 derelm joined #salt
12:58 nicolasbadia babilen: I guess salt '*' pkg.upgrade is the anwser. Thanks a lot for the help
13:01 mitsuhiko what am i doing wrong if my only minion stops responding?
13:01 mitsuhiko no logs anywhere
13:01 bhosmer joined #salt
13:01 bhi_ joined #salt
13:02 wnkz__ joined #salt
13:04 mitsuhiko ah. found it.
13:04 mitsuhiko minion_id is where the minion id is cached
13:04 wnkz___ joined #salt
13:06 wnkz joined #salt
13:10 babilen dheh
13:11 babilen nicolasbadia: It is indeed - There are various other execution modules that you would use for these "interactive" tasks
13:13 joehoyle joined #salt
13:13 mitsuhiko so great. my salt minion gets stuck now unless it's running with "-l all"
13:14 kusams joined #salt
13:16 totte joined #salt
13:16 totte joined #salt
13:16 nitti joined #salt
13:17 nicolasbadia babilen: yeah, I haven’t really play with module yet. I still have a lot of stuff to discrover…
13:19 nicolasbadia babilen: Since I changed my apt state, I get this error when installing packages: The following packages failed to install/update: ntp. OR Package unzip failed to update. Any idea why ?
13:21 scottpgallagher joined #salt
13:22 babilen nicolasbadia: No, not really. Could you run the minion in debug mode (stop the service and then run "salt-minion -ldebug") and paste information about that to, say, http://refheap.com ?
13:22 nicolasbadia sure
13:33 kermit joined #salt
13:37 perfectsine joined #salt
13:37 mapu joined #salt
13:41 ericof joined #salt
13:42 flyboy82 hey guys! I'm trying to get my head around the reactor system to solve a kinda complicated problem. I'm looking to setup mongodb on a bunch of minions, but! some groups among those minions are members of the same replica set. Is there a way to use a reactor in a way that my replica_set_setup state will be triggered ONLY when ALL members of a replica_set have mongo installed?
13:44 ajolo joined #salt
13:47 joehoyle joined #salt
13:49 elfixit joined #salt
13:49 che-arne joined #salt
13:55 tmh1999 joined #salt
13:57 nicolasbadia babilen: well no problem this time. weird.
13:59 mechanicalduck_ joined #salt
14:00 to_json joined #salt
14:01 ndrei joined #salt
14:02 dude051 joined #salt
14:04 pirulo joined #salt
14:07 babilen nicolasbadia: Hmm, that is hard to debug then.
14:09 iggy anybody know any good examples of generating text (for config files, etc.) based on grain/mine data? (formulas, etc.)
14:10 ndrei joined #salt
14:10 iggy everything I've seen thus far has seemed kind of hackish
14:10 iggy including what we wrote in house to do it currently :/
14:12 viq flyboy82: wouldn't that be job for orchestrate runner?
14:15 babilen iggy: What kind of config file?
14:17 mechanicalduck joined #salt
14:17 iggy there are a few: zookeeper, activemq, riemann, jboss, possibly others
14:17 iggy so, xml, ini(ish), clojure, etc.
14:18 TheThing|laptop joined #salt
14:19 viq iggy: either have a template, and fill from variables, or for again rather hackish maybe http://docs.saltstack.com/en/latest/ref/states/all/salt.states.augeas.html ?
14:20 Lingo joined #salt
14:23 heewa joined #salt
14:23 intellix joined #salt
14:25 iggy well, currently we make multiple passes on the config files, so that complicates things slightly
14:25 iggy maybe I need to look at fixing that first
14:26 tkharju joined #salt
14:26 viq multiple passes? How so?
14:26 babilen iggy: Okay, that's not quite what I meant. What format are those configuration files in?
14:27 viq 16:17:31 < iggy> so, xml, ini(ish), clojure, etc.
14:27 babilen You can, if you want to, just render file.managed files in Python and then use whatever generator for that format you want. Just implement run() and return the string.
14:27 babilen clojure, you mean EDN?
14:27 iggy hadn't considered that
14:28 babilen Which is why I tell you
14:28 micah_chatt joined #salt
14:28 babilen #py in the first line, write Python and use whatever libraries to emit the file contents you want. Data is given to you as a dictionary.
14:29 babilen I mean you could also implement other renderers and write it in whatever you want to write it in.
14:29 babilen (or renderer pipelines)
14:29 iggy I'm comfortable with python ;)
14:29 murrdoc joined #salt
14:30 iggy is there more docuemtation/examples on doing that?
14:30 XenophonF joined #salt
14:31 rallytime joined #salt
14:31 pdayton joined #salt
14:34 mapu joined #salt
14:34 vejdmn joined #salt
14:35 babilen Not really. But you really just set "- template: py" in your file.managed state and then: https://www.refheap.com/91468
14:36 babilen iggy: https://www.refheap.com/91469 is an example of using ConfigParser to write an INI file, you can emit JSON, EDN, ... with whatever module is appropriate for that.
14:37 ramishra joined #salt
14:37 babilen I use that quite frequently (why should I not use the library to write it that will read it later on?)
14:37 iggy I see, so instead of having a jinja template, you point it at the python file as the source
14:37 iggy that's the bit I was missing
14:37 iggy danke
14:39 fannet joined #salt
14:39 babilen That's exactly what I do, yeah. But you have a choice of a variety of renderers (cf. http://docs.saltstack.com/en/latest/ref/renderers/ ) and can even implement your own.
14:39 * babilen ♥ salt's extensibility and the fact that it doesn't make things like this hard
14:39 felskrone joined #salt
14:43 mpanetta Quick (and probably stupid) question... the map.jinja files don't actually have to be named map.jinja right?
14:43 viq mpanetta: indeed they don't
14:43 mpanetta Awesome thanks viq
14:44 stewba joined #salt
14:48 fannet is it possible to use includes in pillars
14:50 jalbretsen joined #salt
14:51 desposo joined #salt
14:53 StDiluted joined #salt
14:54 bigl0af joined #salt
14:55 mike25de joined #salt
14:56 mike25de hi guys...    do you guys use GIT to somehow store the files that are being deployed to minions ... before deploying them?  I want to somehow audit what changes are pushed to the minions and have a rollback (theoretical) solution.
14:57 rubenb mike25de: My /etc/salt and /srv/salt/states are both git init-ed
14:58 mike25de rubenb: hi - i somehow want to store... the file that gets to the minion (after the jinja is merged with the conf file and the pillar data)    ... am i making any sense?
14:59 angel333 joined #salt
14:59 wendall911 joined #salt
15:01 rubenb mike25de: If you git-init the salt-base directory (/srv/salt here) you should be able to go back to any point in time?
15:02 SheetiS1 joined #salt
15:02 angel333 joined #salt
15:02 mike25de rubenb:  you are right... but i am not sure i am clear :) ....  i would want to somehow... have the compiled files (that are getting to the minion) in a versioning system
15:04 rubenb You could do a git init on the client they're sent to?
15:04 rubenb Which could work.
15:04 conan_the_destro joined #salt
15:04 rubenb (Not here, since uptime == install_time)
15:05 mike25de yeah... rubenb .. i was thinking about that,... but i have 60 states that deploy 50 files in 50 directories.. so i have to git-init 50 dirs..
15:08 KennethWilke joined #salt
15:09 nicolasbadia babilen: Still there ? Got the error again: https://www.refheap.com/91471
15:15 fredvd joined #salt
15:15 thedodd joined #salt
15:22 mindKMST_ joined #salt
15:23 to_json joined #salt
15:24 anotherZero joined #salt
15:24 debian112 joined #salt
15:27 forrest joined #salt
15:29 primechuck joined #salt
15:29 hasues joined #salt
15:31 lnxnut joined #salt
15:33 kickerdog joined #salt
15:36 Deevolution Is there a way of only showing failed state updates when running state.highstate?
15:36 ckao joined #salt
15:36 rubenb Deevolution: Yes. http://stackoverflow.com/questions/15953082/is-there-a-way-to-display-only-changes-and-errors
15:37 Deevolution rubenb:  Thanks!  I'll try that.
15:37 ramishra joined #salt
15:39 pdayton joined #salt
15:39 giannello joined #salt
15:39 gfa joined #salt
15:40 intellix joined #salt
15:42 saltnoob joined #salt
15:44 saltnoob Hi guys, I'm trying to setup the gpg renderer from the latest RC but put it on the current stable release (inside /srv/salt/_renderer/gpg.py) and amended master with "renderer: yaml_jinja | gpg"
15:44 saltnoob but I get "[ERROR   ] The renderer "jinja | yaml | gpg" is not available"
15:44 saltnoob any ideas?
15:44 kingel joined #salt
15:44 saltnoob was recommended to use this a couple days ago so I can encrypt passwords in pillar
15:47 fannet does JINJA have a way to extract only the unique values from a list (drop duplicates)
15:49 mpanetta saltnoob: Did you try runing saltutil.sync_all first?
15:54 tligda joined #salt
15:55 StDiluted joined #salt
15:55 fannet I'm looking for the jinja equiv. to list(set([1,1,2,3,4,5])) -- is that possible?
15:55 saltnoob I get the error when I running salt-master in foreground - "salt-master -l debug"
15:57 saltnoob so can't start up master properly before I can continue with testing
16:01 saltnoob mpanetta: I started the service normally and tried to run that but it just hangs
16:02 mpanetta Hmm, maybe that returner requires something in the develop version
16:04 drybjed is there a way to generate and store random passwords automatically, for example mysql root password?
16:05 schimmy joined #salt
16:07 schimmy1 joined #salt
16:11 hardwire joined #salt
16:12 possibilities joined #salt
16:12 timoguin fannet: don't think jinja has that, but you could write a custom python module and call it with jinja by salt['my.module']([1,1,2,3,4,5])
16:13 pppingme joined #salt
16:13 pipps joined #salt
16:18 fannet Thanks timoguin thats the conclusion I came to and doing that as we speak :)
16:19 to_json joined #salt
16:23 thedodd joined #salt
16:25 KyleG joined #salt
16:25 KyleG joined #salt
16:26 dalexander joined #salt
16:27 mechanicalduck_ joined #salt
16:28 xDamox joined #salt
16:28 defmikekoh joined #salt
16:29 johtso Has anyone come across this issue when trying to create a postgres user? http://hastebin.com/esiwesutuy.txt
16:30 johtso version 2014.7.0rc3
16:30 to_json joined #salt
16:31 baconbeckons joined #salt
16:31 manfred johtso:  i don't see anything in the issue tracker
16:32 pipps joined #salt
16:34 rawkode joined #salt
16:34 rawkode Hey folks
16:36 rawkode Anybody care to guess why this doesn't match any minions? http://pastebin.com/FYsaW8ig
16:36 rawkode Works fine from salt -C '...' :(
16:38 ramishra joined #salt
16:40 druonysus joined #salt
16:40 druonysus joined #salt
16:41 johtso Aha, so it's trying to use postgresql/9.1/ directories instead of postgresql/9.3/
16:41 johtso how do I make it not do that..?
16:45 aparsons joined #salt
16:45 timoguin rawkode: is that a reacgtor?
16:45 rawkode timoguin: Yep
16:45 timoguin I think you need expr_type instead of tgt_type
16:46 JoeyJoeJo What are the pros and cons of running masterless? I saw one blog post from the company Lyft who run masterless because it eliminates a point of failure. What are they sacrificing by not having a master?
16:46 timoguin JoeyJoeJo: can't make use of the event/reactor system, the peering system, or the mine
16:46 rawkode timoguin: OK - shall give that a try. Thanks for the tip
16:47 teebes joined #salt
16:48 obimod joined #salt
16:48 timoguin JoeyJoeJo: that's all i can think of off the top of my head
16:48 JoeyJoeJo timoguin: event/reactor sounds like twisted-python. Is that what salt is written in?
16:49 timoguin no, just similar terminology
16:49 timoguin salt's internals are closely tied to its event system.
16:49 JoeyJoeJo I see
16:50 fannet I'm using python as a rendered but getting an illegal tab character for the first single tab indentation of my code - does the rendered expect spaces instead of tabs??
16:50 drybjed is there a way to automatically generate random passwords and store them somewhere encrypted?
16:51 basepi nkuttler: it's actually still open, as I see it: https://github.com/saltstack/salt/issues/16430
16:51 basepi nkuttler: but another issues which is closed references that issue
16:51 basepi that's where the "Closed" icon is coming from near the bottom, it's a cross-reference
16:51 fannet drybjed: you can create a module to do that
16:52 fannet then call it in jinja salt['my.randompassmodule']()
16:52 drybjed fannet: so there's nothing like this at the moment?
16:52 fannet not sure
16:53 druonysuse joined #salt
16:53 timoguin fannet: it probably just requires consistency like python, i.e., don't mix tabs and spaces
16:54 fannet timoguin - ya I just did a step through to ensure it was tab-consistent ... checking one more thing...
16:56 rawkode timoguin: No minions match using expr_type either :(
16:57 dalexander joined #salt
16:59 fannet timoguin: http://pastebin.com/NGpqvCVt
17:00 to_json joined #salt
17:00 fannet bitches with "failed: Illegal tab character; line 4"
17:01 vejdmn joined #salt
17:02 rawkode Attempting expr_form ...
17:02 nkuttler basepi: doh! thanks :)
17:03 timoguin rawkode: ah yea, that's the one.
17:03 dalexander joined #salt
17:04 rawkode timoguin: success :D
17:04 rawkode timoguin: Thank you
17:05 spookah joined #salt
17:05 iggy fannet: don't use tabs
17:05 fannet bah! found it... sneaky space hiding in front of my #!py
17:06 fannet iggy - not even for the python renderer
17:06 iggy well... python in general prefers spaces
17:09 Ozack1 joined #salt
17:10 ldlework left #salt
17:11 aparsons joined #salt
17:13 baconbeckons joined #salt
17:15 scottpgallagher joined #salt
17:18 aw110f joined #salt
17:19 Ryan_Lane joined #salt
17:20 murrdoc joined #salt
17:23 Whissi joined #salt
17:27 Gareth morning morning
17:28 rap424 joined #salt
17:29 perfectsine joined #salt
17:32 harkx 'evening Gareth  :)
17:36 Gareth harkx: howdy :)
17:41 aparsons if any of you guys are in SF, you should swing by LinkedIn SF for the AWS Tech Meetup:  http://www.meetup.com/AdvancedAWS/events/208695982/
17:48 Ryan_Lane aparsons: it's already full
17:48 Ryan_Lane there's a waitlist
17:50 vejdmn joined #salt
17:50 hasues joined #salt
17:53 Corey Ryan_Lane: Just barge in. They love that.
17:53 Ryan_Lane :D
17:54 murrdoc I HAVE OPINIONS
17:54 murrdoc HEAR ME ROAR
17:54 murrdoc thats my standard barge into meetup yell
17:54 murrdoc you can use it too
17:58 roolo joined #salt
18:00 pdayton joined #salt
18:02 teepark joined #salt
18:05 aparsons joined #salt
18:05 aparsons if you want to go
18:05 aparsons i'll personally sign you in.
18:05 aparsons just email me - aparsons <at> linkedin <dot> com
18:05 aparsons i mean, within reason
18:05 cberndt joined #salt
18:06 murrdoc u guys still using cfengine to install salt ?
18:06 murrdoc <— does it with bash :D
18:06 murrdoc also who are the package maintainers for salt
18:06 iggy I doubt that's something that will change (from what I've heard)
18:06 murrdoc need to figure out how / what they do for the ubuntu package
18:07 murrdoc not a fan of using salt-bootstrap for isntalling salt
18:07 murrdoc nothing wrong with it, i d rather just package
18:07 forrest aparsons, I don't know, do I have to get recruiter spam printed handouts?
18:08 aparsons no.  you'll get pizza and beer, @forrest.
18:08 forrest Alright, maybe next time I'll fly down from Seattle, it's pretty cheap
18:08 aparsons :)
18:08 aparsons ok
18:08 iggy pizza and beer...
18:08 iggy kind of makes me wish I lived in the area
18:09 forrest iggy, just fly out there, duh!
18:10 murrdoc so no on, who is the package maintainer
18:10 iggy I mean I could drive it
18:10 iggy if I went back in time and left 5 days ago
18:10 murrdoc where u driving from
18:10 murrdoc seattle to sf man, they have that scenic train
18:11 aparsons joined #salt
18:11 murrdoc totally worth it
18:11 iggy forrest is in seattle... I'm a _bit_ further
18:11 forrest :P
18:12 forrest murrdoc, joehh is the ubuntu package maintainer, he lives in Australia though
18:12 murrdoc word
18:14 murrdoc does joehh have a repo with package build info ?
18:14 forrest that's in the salt repo
18:15 astol joined #salt
18:15 murrdoc i tried make -f debian/rules
18:15 murrdoc didnt get a .deb
18:16 murrdoc wanted to see what was done to take taht and get a .deb
18:17 XenophonF a lot of the map.jinja examples use grains.filter_by to select different settings based on O/S family
18:17 XenophonF but what if I need to select different settings based on a specific release within an O/S family?
18:18 iggy I think the mongo formula does that
18:18 iggy hmm, nope
18:18 iggy I was looking at one the other day, let me see if I can find it
18:19 Ryan_Lane aparsons: hm. maybe. I have a flight tomorrow and need to pack, but I may take you up on that offer
18:19 kballou joined #salt
18:20 Ryan_Lane murrdoc: I make python venvs and tar them up
18:20 Ryan_Lane then stick them into S3
18:20 Ryan_Lane to install salt i install the binary dependencies from packages and untar the venv
18:20 murrdoc make sense
18:21 murrdoc let me try that
18:21 murrdoc thanks man
18:21 XenophonF thanks iggy
18:22 iggy XenophonF: I can't seem to find it, but the basics are, you use 2 merge's and the second one is just the version
18:23 Ryan_Lane murrdoc: yw
18:24 XenophonF iggy: gotcha - i'll see what i can cook up with that :)
18:24 iggy oh, postgres formula
18:24 iggy https://github.com/saltstack-formulas/postgres-formula/blob/master/postgres/map.jinja
18:25 eunuchsocket joined #salt
18:25 * XenophonF is looking
18:25 murrdoc man postgres is +1
18:25 iggy notice on the second merge it's specifying the grain to search
18:26 techhat joined #salt
18:26 XenophonF yeah
18:27 XenophonF i suppose that i could chain those to look at other variables, right?
18:27 XenophonF like osrelease
18:27 aparsons @Ryan_lane ok... just lemme know!
18:27 murrdoc xeno do u support more than one os ?
18:27 murrdoc or just different versions of the os
18:28 murrdoc if its the latter, just keep the one merge
18:28 murrdoc and change the grain lookup
18:28 techhat left #salt
18:28 XenophonF murrdoc, I'm running Windows, FreeBSD, CentOS 6.5 and 7.0, and OpenIndiana
18:28 ndrei joined #salt
18:28 to_json joined #salt
18:29 monokrome Hey
18:29 XenophonF i'd like to port some of my formulas to cover the Unixes
18:29 monokrome Does anyone here know that the site is completely broken in Firefox?
18:29 monokrome http://www.saltstack.com/
18:29 monokrome oh
18:29 monokrome It's broken with noscript
18:30 monokrome Apparently people are using scripts to show icons -.-
18:30 XenophonF yeah it's most annoying
18:30 XenophonF if you really want to break things, check out RequestPolicy
18:30 basepi monokrome: seems fine to me
18:30 murrdoc XenophonF:  ok then yeah multipass :)
18:30 basepi Oh, noscript
18:30 monokrome Yeah, noscript
18:30 monokrome Sorry for the false alarm
18:30 basepi Ya, it's SquareSpace, I'm sure they're using plenty of magic
18:31 monokrome ah :(
18:31 iggy I love telling noscripters that I could care less if they look at my sites
18:31 rascharles joined #salt
18:32 Ryan_Lane you guys really need to get https set up ;)
18:32 rascharles I'm trying to use the network.get_hostname method in a state like so
18:33 monokrome +1 Ryan_Lane
18:33 monokrome Salt uses ØMQ, right?
18:34 Ryan_Lane yes. they also have their own transport in 2014.7 that's experimental, called Raet
18:34 micah_chatt joined #salt
18:34 rascharles {% set myhostname = salt['network.get_hostname'] %}
18:35 rascharles myhostname variable gets set to a value of <function get_hostname at 0x293b050>
18:35 rascharles or various memory locations
18:36 kickerdog joined #salt
18:36 monokrome Ryan_Lane: Do you know if they encrypt the data over those transports?
18:37 Ryan_Lane it is
18:37 monokrome Okay, cool. Thanks! :)
18:37 Ryan_Lane yw
18:38 iggy rascharles: salt['grain.get']('nodename') ?
18:38 rascharles Arg! Never mind. I see my mistake
18:39 rascharles Should be salt['network.get_hostname']()
18:39 rascharles I can try the grain approach too
18:40 ramishra joined #salt
18:40 murrdoc grain approach is +1
18:41 iggy I tend to go for the lookup approach vs the function call approach
18:42 murrdoc loose coupling for the win
18:42 rascharles iggy: Thanks. Is the grain approach more in lines with common salt idioms?
18:43 ingwaem joined #salt
18:43 iggy common salt idiom = use whatever works best for you
18:44 fxhp joined #salt
18:44 rascharles iggy: HAHAHA
18:45 iggy I just figure the lookup approach is (marginally) more efficient than the other way (which I assume actually calls the hostname binary or some syscall to pull the data from the system)
18:45 rascharles Kinda' like PERL hun
18:45 murrdoc no
18:45 murrdoc not like perl
18:45 iggy nothing like perl
18:45 murrdoc :D
18:45 rascharles I'm joking!
18:45 murrdoc phew
18:46 CheKoLyN joined #salt
18:49 mikeywaites joined #salt
18:50 mikeywaites Hey! anyone got any ideas on what im doing wrong here
18:50 mikeywaites https://gist.github.com/mikeywaites/8c63efb4866ada33b54f
18:50 mikeywaites http://docs.saltstack.com/en/latest/topics/pillar/index.html#including-other-pillars is essentially what im trying to do.
18:52 otter768 joined #salt
18:56 bhosmer joined #salt
18:58 pipps joined #salt
19:01 viq joined #salt
19:02 mikeywaites What im trying is possible right?
19:03 rglen joined #salt
19:03 kickerdog Does anyone have any idea how I could make this host file generator also work with windows minions? http://pastebin.com/vZheiK3U
19:05 bhosmer joined #salt
19:05 kedo39 joined #salt
19:06 linjan joined #salt
19:07 jslatts joined #salt
19:07 SheetiS1 kickerdog: This might be another way to handle hosts that would work cross platform: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.host.html
19:08 mephx joined #salt
19:08 kickerdog I need to generate the host file based on all the VMs in my cluster.
19:09 SheetiS1 you could still use your for loop like you have
19:09 SheetiS1 but use the hosts state to do it
19:09 SheetiS1 I'll have an example in a moment
19:11 SheetiS1 but I guess the for loop you are using is looking for eth0 which is not right for windows
19:11 mikeywaites https://gist.github.com/mikeywaites/8c63efb4866ada33b54f is this the correct way to include default pillar data ?
19:12 SheetiS1 have you tried to include grains in your mine and use fqdn_ip4 for it?
19:12 mikeywaites I cant decipher what this stack trace is saying to me.
19:12 kickerdog SheetiS: I have, but I get jinja str error on different systems.
19:12 SheetiS1 mikeywaites: I might be able to take a look in a minute or 3
19:13 mephx joined #salt
19:13 SheetiS1 kickerdog: for the grain fqdn_ip4 in the mine??
19:13 mikeywaites SheetiS1:  Appreciate that!
19:14 t0rrant joined #salt
19:14 aparsons joined #salt
19:15 SheetiS1 mikeywaites: on your include, you have a trailing : on users.default for your users.dev file
19:16 kickerdog like this? {{ salt['grains.get']('fqdn_ip4', ['127.0.1.1'])|first() }}     {{ host }}
19:16 iggy who wants to write a yaml linter that understands jinja? (or at least knows to ignore it)
19:17 SheetiS1 kickerdog: you have to add grains.items to your mine_functions and then use a mine.get or that only works for the current host
19:18 aynik joined #salt
19:19 kickerdog I'm not sure how to do that
19:19 mikeywaites SheetiS1:  http://docs.saltstack.com/en/latest/topics/pillar/index.html#including-other-pillars according to this the - users.default should have trailing : ?
19:19 mikeywaites in the second example
19:20 baconbeckons joined #salt
19:20 mikeywaites Removing seemed to get me a bit further though.
19:20 mikeywaites actuall thats a lie, its just failing to compile
19:20 SheetiS1 it'd be like {% for host, grains_items in salt['mine.get']('*', 'grains.items').items() %}
19:21 SheetiS1 mikeywaites: I'll need to take a closer look in a moment.  I was thinkging because of your spacing that the include was separate of the pillar stuff below
19:22 mikeywaites Oh right - yeh could of been clearer there soz!  Thanks for your help!
19:22 SheetiS1 kickerdog: then you could make your host entry like this {{ grains_items['fqdn_ip4'][0] }} {{ host }}
19:22 SheetiS1 inside the for loop.
19:23 vbabiy joined #salt
19:23 SheetiS1 I have a hosts file formula that I use for this, but it's not public.  let me see if I can pastebin it.  It's really old though from when I was first learning jinja
19:23 SheetiS1 so it might be ugly
19:23 jalaziz joined #salt
19:24 kickerdog no worries, thanks for your help
19:25 SheetiS1 https://bpaste.net/show/d474e0693476 this is how i solved for that originally
19:25 SheetiS1 you can ignore the dnsmasq part... I was using it as a fake dns server in my test environment
19:25 johtso Does anyone know what could be going on here with this failed postgres user creation? http://hastebin.com/niwucehalu.txt
19:25 johtso I've installed postgres 9.3 .. but it seems to be expecting 9.1 to exist
19:25 murrdoc das clean
19:26 johtso or maybe the issue is that it can't find out the postgres version? how is it attempting to do that?
19:26 murrdoc SheetiS:  wat was the mine setup for that
19:26 vbabiy joined #salt
19:26 mechanicalduck joined #salt
19:28 kermit joined #salt
19:28 johtso this is from a completely fresh ubuntu 14 image.. and running a state like this: http://hastebin.com/tisuwipube.sm
19:28 SheetiS1 mikeywaites: https://gist.github.com/mikeywaites/8c63efb4866ada33b54f#file-pillars-users-dev-sls-L6 this line should be indented further if it is the defaults from the include.  That line and below would need to be indented 2 more.  I would look at the indentation at least.
19:29 mikeywaites SheetiS:  MAN that was it
19:29 mikeywaites :(
19:30 mikeywaites thanks so much
19:30 SheetiS1 :)
19:30 murrdoc mikeywaites:  http://yaml-online-parser.appspot.com/
19:31 murrdoc picked that up in salt training
19:31 murrdoc totally dependent on it
19:31 mikeywaites murrdoc:  NICE!
19:32 mikeywaites SheetiS1:  So this has solved my error but its not doing what i thought it would the users: dict in the dev.sls is not overwriting the one from users.default
19:33 iggy typically salt works top down
19:33 iggy so once it finds a match, it stops looking
19:33 otter768 joined #salt
19:34 mikeywaites Ok so its not working like i thought in that it include the data from default pillar, then the stuff defined in dev.sls overwrites the keys ive defined.
19:34 mikeywaites my like a normal dict in python
19:35 murrdoc maybe you need an extend instead of the include
19:36 murrdoc not sure if u can do extends in pillars
19:36 hotbox joined #salt
19:37 murrdoc https://github.com/saltstack/salt/pull/6233 ?
19:40 mephx joined #salt
19:42 holler joined #salt
19:42 iggy alias salt-i-give-up="sudo salt '*' saltutil.sync_all; sudo salt '*' saltutil.refresh_pillar; sudo salt '*' saltutil.refresh_modules; sudo salt '*' mine.update"
19:43 iggy anybody think of anything else I need to throw in there?
19:45 murrdoc rm -vr /var/salt/cache ?
19:45 murrdoc :D
19:45 vejdmn joined #salt
19:46 iggy you joke...
19:46 iggy I'm not above it tbh
19:46 mpanetta haha
19:47 wnkz_ joined #salt
19:47 mpanetta I think the refresh_modules is redundant, it is covered in sync_all
19:47 mpanetta And don't delete the cache with salt running...
19:48 cpowell oh iggy...a kindred spirit
19:48 mpanetta lol
19:48 cpowell just toss in service salt-master restart for the hell of it
19:48 mpanetta hah
19:49 druonysuse joined #salt
19:49 druonysuse joined #salt
19:49 Deevolution I'm still trying to get salt to supres some it's output when running state.highstate.  I've tired both "salt saltmaster state.highstate --state-output=terse" and  "salt --state-output=terse saltmaster state.highstate " and in both cases I get the full output.
19:49 iggy yeah, I would salt-master stop ; rm cache ; salt-master start
19:51 n8n joined #salt
19:52 iggy Deevolution: --out=highstate ? (just in case it's not catching it from the state.highstate)
19:52 superseb joined #salt
19:55 pipps joined #salt
19:56 jxFive joined #salt
19:58 cpowell salt 2014.1.11...why u call .get on str!!
19:58 kermit joined #salt
19:59 Deevolution iggy:  I'll try that, thanks.
20:00 mikeywaites is it possible to match all roles='appserver' excpet if the minion_id matches 'dev' ?
20:00 mikeywaites in pillar top.sls
20:01 Deevolution iggy:  That worked.  That's REALLY non-obvious.
20:02 aparsons joined #salt
20:02 pdayton joined #salt
20:03 stefanius joined #salt
20:03 aparsons joined #salt
20:03 iggy mikeywaites: yes using compound matches
20:04 iggy 'G@roles:appserver and not E@.*dev.*' or something similar
20:05 stefanius hello
20:06 cpowell hi
20:07 murrdoc joined #salt
20:07 mikeywaites iggy:  Sweet ill give that a whirl
20:07 mikeywaites i cant find any examples of this in the docs :/
20:07 iggy the compound match example is exactly that
20:07 iggy fwiw
20:08 iggy well, one of them is anyway
20:08 stefanius I am new to salt, but it look very intresting. I get stuck on including a default formula. It doesnt override the default settings from the pillar
20:08 iggy http://docs.saltstack.com/en/latest/topics/targeting/compound.html#targeting-compound
20:08 martoss joined #salt
20:09 mikeywaites Balls yes i just noticed that. :(  Thanks!
20:11 iggy stefanius: what exactly are you trying? try to paste code somewhere if you can
20:11 martoss1 joined #salt
20:11 stefanius iggy: tnx for the response. I will try to explain
20:12 stefanius I' am using this formula to install MYsql: https://github.com/saltstack-formulas/mysql-formula
20:13 deeprave joined #salt
20:15 stefanius on my server (for now its in a vagrant box) i have the file structure like this:  /srv/salt/ which contain the pillar folder
20:16 N-Mi joined #salt
20:16 N-Mi joined #salt
20:16 holler hello, Im using salt to provision a vagrant box for local development.. everything used to work but I hadnt tested lately and now I get this error when starting from scratch with vagrant up
20:16 holler http://dpaste.com/3XBY5VW
20:16 holler Rendering SLS "base:mysql.server" failed: Jinja variable 'dict object' has no attribute 'mysql'; line 30
20:17 holler it seems that pillar data is not being loaded(?) how can I check this? the box is created so I can vagrant ssh into the box
20:17 stefanius inside the pillar folder i have (after my most recent modification) a top.sls, further i have a mysql.sls in the pillar folder and a top.sls in /srv/salt
20:18 stefanius the pillar data i used for testing is the same as in example.pillar
20:18 stefanius from the formula
20:18 fannet anyone know why file.recurse takes a VERY long time to evaluate/send each file?
20:18 fannet (5-7 seconds per file)
20:19 P0bailey joined #salt
20:19 stefanius i think i missed the trick to combine the mysql.sls (in the pillar folder) and the mysql formula folder (which is now in the pillar folder)
20:19 P0bailey joined #salt
20:21 stefanius_ joined #salt
20:22 dccc__ joined #salt
20:22 druonysuse joined #salt
20:22 druonysuse joined #salt
20:23 martoss joined #salt
20:24 jalaziz joined #salt
20:26 linjan joined #salt
20:27 pdayton joined #salt
20:29 tafa2 joined #salt
20:30 synical joined #salt
20:31 iggy stevednd: don't put your pillars in your state directory
20:31 rawkode joined #salt
20:31 iggy err stefanius_ ^^
20:32 timoguin unless you want that pillar data distributed to every minion
20:33 stefanius_ i halve my pillars in a sep. directory
20:34 stefanius_ have*
20:34 mindKMST_ joined #salt
20:34 murrdoc joined #salt
20:35 ozzzo I'm trying to follow the instructions here: http://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file
20:35 ozzzo but I get an error "The following requisites were not found:"
20:35 ozzzo http://pastebin.com/iEJ1UdkK
20:35 ozzzo can someone tell me what I'm doing wrong?
20:37 stefanius_ @izzy https://gist.github.com/stefanius/7611b467953bf9d1666d
20:37 stefanius_ i created a gist of my file structure
20:38 holler anyone know if anything looks wrong in my pillar file?
20:38 holler http://dpaste.com/3XBY5VW
20:38 timoguin stefanius_: if your file_roots setting on the master points to /srv/salt, that data is gonna be available to all your minions
20:39 StDiluted ozzzo: try - require: - pkg: nagios
20:39 Micromus joined #salt
20:39 StDiluted instead of sls: nagios
20:39 Micromus The last version of salt-minion on debian7 breaks completely
20:40 stefanius_ @timoguin on this moment i want to use salt to spin up my vagerant boxes, so its not needed to make it multi-server. I know its a bad design choice, but i want to start it on a small scale to get the picture ;)
20:41 Micromus AttributeError: 'str' object has no attribute 'get'
20:41 holler Micromus: ? what breaks, is that something that could explain why my provisioned vagrant box no longer works?
20:41 timoguin stefanius_: gotcha, just something to be aware of then. :)
20:41 ozzzo StDiluted: It works if I do that, but I am trying to require the sls because once I have it working I want to put a bunch of files in there and require them all with one statement
20:41 Micromus pretty much everything with pkg.installed breaks
20:41 cpowell Micromus: downgrade salt version
20:42 ozzzo and the docs specifically say that I can do that, so there has to be a way. I googled around but I can't find an example
20:42 Micromus maybe my sls files are somehow misformated for the newest version
20:42 cpowell its a bug with 2014.1.11
20:42 Micromus mkay? how to fix? impossible?
20:42 cpowell downgrade to 2014.1.10
20:42 Micromus how do i do that?
20:42 cpowell salt \* test.version and check
20:43 holler cpowell: how can I run salt commands from a masterless minion?
20:43 cpowell salt-call
20:43 holler I want to see if any pillar data was loaded
20:43 holler and check version
20:43 cpowell salt-call test.version, salt-call pillar.items
20:43 stefanius_ but is there a way to force to use a pillar file? it doesnt seems to do it automagicly? in my top.sls  i reference to it (though, i think so ;) )
20:43 druonysus joined #salt
20:43 druonysus joined #salt
20:43 badon_ joined #salt
20:43 Micromus how do i install/downgrade to a specific version?
20:43 StDiluted ozzzo: ah. I havent used that sort of require before, but I do see the docs. what version of satl are you running?
20:43 StDiluted salt*
20:44 cpowell @Micromus depends on your OS and how you installed it
20:44 stefanius_ see gist for my top.sls: https://gist.github.com/stefanius/7611b467953bf9d1666d
20:44 aw110f joined #salt
20:44 cpowell apt-get remove, yum remove, pip uninstall
20:44 Micromus debian7 with apt-get
20:45 ozzzo StDiluted: 0.11.1-1.el6
20:45 timoguin stefanius_: serving those from the same directory is probably where your problem is coming from. file_roots and pillar_roots are two different things to salt, and they both require their own top.sls
20:45 holler how can I tell vagrant to use a specific version of salt?
20:45 kickerdog1 joined #salt
20:45 stefanius_ ahh so.
20:46 timoguin I serve states from /srv/salt/states and pillar from /srv/salt/pillar
20:46 StDiluted ozzzo: that feature, to require an entire SLS was added in 0.16.0
20:46 stefanius_ tnx for the hint. I will change my structure then.
20:46 ozzzo oic, ty!
20:48 murrdoc joined #salt
20:49 holler how can I debug why my pillar data is not being loaded using vagrant? it used to work
20:50 Micromus Version '2014.1.10+ds-2' for 'salt-minion' was not found
20:52 Micromus No matter which version format I try from http://debian.saltstack.com/debian/pool/main/s/salt/ I get not found
20:52 ingwaem Micromus: try the bootloader, I use that at times, or I pull directly from github
20:52 stefanius_ and where should i put my formulas? is a formula a state or a pillar?
20:53 timoguin it's a state
20:53 Micromus ?
20:53 stefanius_ ok tnx
20:53 ingwaem stefanius_: formulas are states, pillars are sensitive data that drive the formulas through jinja
20:53 iggy usually with a pillar example that you need to copy into your pillar
20:54 Micromus There is a reason we use package managers, how effin hard can it be to have a "install this version" command?
20:55 Micromus I suspect the old versions are not listed in the package lists
20:56 holler local:
20:56 holler Data failed to compile:
20:56 holler ----------
20:56 holler Rendering SLS "base:core.ssh" failed: Jinja variable 'dict object' has no attribute 'dev_rds'; line 14
20:56 iggy they can't leave every version they've ever released on the mirrors
20:56 pipps_ joined #salt
20:57 dalexander joined #salt
20:57 holler anyone can help me?
20:57 Micromus and this bug was released 14 days ago?? when will it be fixed?
20:57 Micromus trying to install the .deb file now, but i suspect one hellofa dependency hell getting that shit to work (first tries unsuccessfull)
20:57 iggy I think there's an archive somewhere that keeps older stuff (or maybe that's ubuntu or centos)
20:58 penguin_dan joined #salt
20:58 kusams_ joined #salt
20:59 dalexand_ joined #salt
21:01 desposo joined #salt
21:02 linjan joined #salt
21:03 desposo1 joined #salt
21:04 aparsons joined #salt
21:07 snuffeluffegus joined #salt
21:09 snuffeluffegus joined #salt
21:14 kickerdog1 I'm having a lot of trouble getting salt-mine to return grains.items
21:14 kickerdog1 http://pastebin.com/eGUrmNKy
21:15 DaveQB joined #salt
21:15 kickerdog1 what am I doing wrong?
21:16 StDiluted your command is being read as a dict, it appears to me?
21:17 intellix joined #salt
21:17 teepark joined #salt
21:19 nitti joined #salt
21:21 iggy kickerdog1: yeah, you're going to have to paste more than that
21:21 holler anyone here that can help me debug why Im getting pillar error?
21:29 baconbeckons joined #salt
21:29 nitti_ joined #salt
21:30 druonysus joined #salt
21:32 holler I found out that the issue occurs when I switch from using ubuntu 13.10 to using Ubuntu Server 14.04 LTS x64 Trusty Tahr
21:33 pdayton joined #salt
21:33 ozzzo StDiluted: I upgraded to 2014.1.10 but I still get the same error: http://pastebin.com/etvf8RCz
21:33 murrdoc joined #salt
21:33 holler for some reason my pillar files are not read
21:34 murrdoc joined #salt
21:35 peters-tx joined #salt
21:35 n4645 joined #salt
21:36 iggy hooray, one thing off my TODO list!
21:37 iggy gce grains -> salt-contrib
21:37 n4645 left #salt
21:38 StDiluted nice
21:38 fannet anyone know why file.recurse takes a VERY long time to evaluate/send each file? (5+ seconds per file)
21:41 Ryan_Lane fannet: which version of salt?
21:41 Ryan_Lane also, do you have a lot of files in your file_root?
21:42 ni369473 joined #salt
21:42 ramishra joined #salt
21:43 fannet 2014.1.11
21:43 fannet I have a lot of files in the sub-tree of file_root but not in the root itself
21:45 Ryan_Lane I know at some point there was an issue where when it accessed files it would need to list all files in the root beforehand
21:45 Ryan_Lane strace your master process while accesses files and see if it's stating a ton of files
21:45 fannet Fetching file from saltenv 'dev'....... seems retarded slow compared to the same function on our puppet server
21:45 MindDrive joined #salt
21:45 fannet ok
21:46 jalaziz_ joined #salt
21:46 mosen joined #salt
21:47 ozzzo does anyone know how to include an .sls as described here? http://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file
21:47 forrest Can anyone think why a module in /srv/salt/_modules wouldn't be getting picked up? I've restarted the service, but it just isn't available as a module/
21:47 ozzzo I thing I'm doing exactly that but I get "All specified packages are already installed."
21:48 ozzzo http://pastebin.com/etvf8RCz
21:48 ozzzo er... the actual error is " The following requisites were not found:"
21:49 forrest ozzzo, which requisites?
21:49 fannet ozzzo i think your syntax is wrong in your nagios.sls
21:51 ozzzo forrest: sls: nagios
21:51 forrest yeah I agree with fannet then, seems like a problem in the nagios state, can you try to just run that and see what happens?
21:51 ozzzo fannet: do you have a link to a correct .sls that will work for this type of include?
21:52 fannet i mean first I would break out all those packages into their own modules and include them as dependancies in the nagios sls
21:52 fannet you should try to keep everything as modular as you can
21:53 ozzzo here's my old config that worked: http://pastebin.com/vssyQxcc
21:53 ozzzo I just moved into the .sls to test requiring an sls
21:54 ozzzo if I require pkg: nagios instead of sls: nagios, it works, so it is reading the sls OK
21:54 ozzzo but I think it may require different syntax in the sls to require it with sls:
21:54 nitti joined #salt
21:55 forrest ozzzo, that syntax looks fine to me
21:55 fannet you've named it nagios though
21:55 forrest oh woah woah woah
21:55 forrest what is going on with this indenting
21:55 forrest why is cmd.run: on the same level as - name?
21:56 forrest WHY YOU NOT INDENT
21:56 pipps joined #salt
21:56 forrest *NO
21:56 diegows does anyone know a tool to so simple continous delivery, I have a client with only one dev and I need to deploy after push
21:56 Ryan_Lane forrest: funny enough, that's fine, if it's a list under the dict ;)
21:56 forrest Ryan_Lane, I know
21:56 forrest but it sucks ass to read
21:56 Ryan_Lane indeed
21:56 forrest the 4 spaces are bad enough :P
21:56 forrest Ryan_Lane, why is my module not working :(
21:56 holler any ideas why switching to Ubuntu Server 14.04 LTS x64 would break my vagrant + salt provision and throw error that pillar data not found?
21:56 forrest Ryan_Lane, sad panda
21:56 holler it works using ubuntu 13.10
21:57 Ryan_Lane holler: which version of salt is it using?
21:57 fannet do you really need an include? it seems like you are using "nagios.sls" to install nagios dependencies is that right ?
21:57 Ryan_Lane also, are you using masterless?
21:58 Ryan_Lane I think 2014.1.11 has a bug with pillars
21:58 Ryan_Lane for masterless
21:58 ozzzo fixing the indents
21:58 holler Ryan_Lane: I think its the latest
21:58 holler yeah that one
21:58 Ryan_Lane that's likely your issue
21:58 vejdmn joined #salt
21:58 ozzzo fannet: this is just an experiment. Once I get it working I want to put a bunch of stuff in there and require it with one statement
21:58 holler ok cool, ill stick with 13.10 for now :)
21:58 Ryan_Lane basepi: are you guys cutting a release to fix that?
21:58 basepi fix what?
21:59 Ryan_Lane the pillars being broken for masterless
21:59 basepi oh, yes, definitely
21:59 basepi and the salt cloud breakage
21:59 basepi it's already in internal testing
21:59 * Ryan_Lane nods
21:59 Ryan_Lane are regression tests being added for those things? :)
22:00 basepi Well, they've been added to our manual testing process for the moment, and will eventually be automated
22:00 * Ryan_Lane nods
22:00 basepi We don't have any automated tests for masterless minions at the moment
22:00 * Ryan_Lane twitches
22:00 fannet ozzzo: my point is if you are calling nagios-montior.sls and you require pkg nagios you don't need an include
22:00 basepi I think the masterless push has only come more recently for most of the community. In the past we haven't had that much masterless use. =)
22:01 basepi Beyond people who start out on masterless because that's how the docs progressed
22:01 forrest basepi, LOOK MAN, WHY ARE ALL THE FEATURES NOT IN MASTERLESS, JEEZ!
22:01 basepi Well, forrest, we're just "short-sighted" so we can't help it.
22:01 basepi >.<
22:01 forrest basepi, JEEZ, start anticipating the community, friggin slackers.... :P
22:02 ozzzo fannet: Not sure I understand what you're getting at. I could do it w/o an include, but I want to get .sls includes working so I can require a bunch of stuff with one statement. w/o the include I have to require each file separately
22:02 nitti joined #salt
22:03 ozzzo fannet: is there a better way to include a bunch of files without using the .sls include?
22:03 forrest nope I just use sls include, and then a require
22:04 ozzzo forrest: do you have an example of a working sls require?
22:04 forrest ozzzo, not off hand I don't.
22:04 fannet I usually structure it like this:  main state -> include sub-states  and substates have the requires
22:05 fannet My pillar parameters determine which sub states get included
22:06 fannet let me see if I have an example
22:06 ozzzo I haven't really figured out pillars yet; so far I just have one minion
22:07 fannet ozzzo: http://pastebin.com/7PFM32BG
22:07 ozzzo ok i'll read that, ty!
22:08 murrdoc joined #salt
22:12 aparsons joined #salt
22:13 baconbeckons do people usually deploy their sourcecode directly with salt (e.g. checkout from git and then put into the appropriate location on their server) or do they use another tool suck as fabric that salt then calls?
22:14 davedash joined #salt
22:14 ozzzo fannet: what I'm trying to do is require_in a bunch of files without a separate line for each file. I have 6 in my config but there are more. It's not obvious how I would use your example to do that. What am I missing?
22:15 fannet can you give an example of what you are trying to do
22:16 jalaziz joined #salt
22:17 ozzzo in http://pastebin.com/vssyQxcc I have a require-in: line with a list of 6 files. I would like to put all of the file.managed lines in a .sls, and then include and require the sls instead of making a line for each file
22:17 ozzzo but I want to get the .sls include working with a simple example before I try to do something complicated
22:17 ozzzo or else figure out a better way to do it
22:18 fannet wait you are calling require_in as part of the cmd.run  module?
22:20 pdayton joined #salt
22:21 ozzzo yes
22:21 pipps joined #salt
22:23 fannet pillars would work well. You can defined all your requires in a pillar list and then in your state file use a {% for filename in pillar['nagios']['fileslist'] %}
22:24 fannet same goes for your require_in
22:24 fannet you could iterate for both
22:25 ozzzo ok I'll read up on pillars. ty for the advice
22:25 mechanicalduck_ joined #salt
22:25 desposo joined #salt
22:25 fannet ozzzo: here is how I do it   -  http://pastebin.com/VxLz2LVw
22:26 forrest fannet, doesn't that make your pillar pretty bloated?
22:27 fannet not really I don't have THAT many things in my pillars
22:28 fannet ozzzo: you could also use python as a rendered instead of YAML + JINJA and just put those into a python list
22:28 fannet renderer
22:29 jcockhren is there a way to view rendered states without executing them? basically, the yaml with the jinja values filled in
22:29 fannet jcockhren - not that I know of but if you find out let me know!!
22:30 ozzzo fannet: if I use python would it order everything the way I list it?
22:30 aparsons joined #salt
22:31 fannet you mean would the iterator preserve the declared order of the list like   mylist ['file1' , 'file2', 'file3'] ?
22:33 pipps joined #salt
22:33 ozzzo for example, if the first thing at the top of my .sls is pkg.installed and a list of packages, followed by thye cmd-run to install nagios, followed by file.managed lines to copy files, would it do them in that order?
22:34 ozzzo i'm starting to think maybe yaml is the problem because it reorders everything. if it would execute lines from top to bottom this problem would go away
22:34 fannet would salt execute in that order? I'm not sure its guaranteed but you can make one dependent on another and also specify execution order
22:35 ozzzo I thought about using the order option but docs imply that it isn't a good idea
22:35 fannet its not because using require should be sufficient to establish your dependency chain
22:36 fannet ozzzo: see this http://pastebin.com/6K9uF9eQ
22:39 fannet install-composer waits for get-composer and finally the composer.installed state module depends on install-composer
22:40 aquinas_ joined #salt
22:41 ozzzo but what if you needed to copy 20 files?
22:41 ozzzo do you need a separate require line for each file?
22:43 ramishra joined #salt
22:46 kickerdog joined #salt
22:46 ingwaem joined #salt
22:47 pipps joined #salt
22:47 kickerdog left #salt
22:48 ozzzo i'm heading home. thanks for all your help!
22:49 fannet np good luck
22:54 pipps joined #salt
22:57 bhosmer joined #salt
23:03 pipps joined #salt
23:04 desposo joined #salt
23:07 baconbeckons when i call salt ‘myserver’ state.highstate, sometimes salt waits for the state to complete and then gives me output and sometimes it outputs a blank line. why is that?
23:13 forrest baconbeckons, because it's reached the timeout
23:13 forrest baconbeckons, just do salt 'myserver' state.highstate -t 60
23:13 baconbeckons forrest: ok, thanks :)
23:13 forrest baconbeckons, basically there are two timeouts in salt by default, there's a 5 second 'hey minion, check in', and I believe a 3 second 'ok this is minion, what am I doing'
23:13 forrest if the 3 second one times out, and the master doesn't hear back it says 'WELL SCREW YOU MINION, FINISH THE JOB AND REPORT BACK.'
23:14 forrest and that drops you back to the command line
23:14 N-Mi joined #salt
23:14 N-Mi joined #salt
23:14 forrest but if you increase the timeout to 60, even if the master doesn't hear back, it will wait the full 60 seconds, which means you're basically guranteed a response. Usually occurs during big package updates from repos and the like.
23:14 forrest baconbeckons, yeah np
23:18 maze joined #salt
23:18 maze good day
23:19 maze I observe that the jobs cache directory gets quite large, at a point where it starts to impact performance, can the directory be put under tmpwatch safely?
23:19 forrest maze, yes
23:19 maze forrest, lovely thanks :)
23:20 forrest maze, np
23:24 deeprave joined #salt
23:25 dalexander joined #salt
23:32 to_json joined #salt
23:36 Outlander joined #salt
23:44 ramishra joined #salt
23:45 fannet Ryan_Lane: ran an strace on my master to see whats up with the file.recurse and its opening all the files in my folder structure it just seems like its taking way too long to process small little files
23:46 aquinas joined #salt
23:47 aquinas_ joined #salt
23:47 pipps_ joined #salt
23:49 Ryan_Lane basepi: hm... I think salt's behavior for pillars changed in a way that's going to cause me serious problems
23:49 Ryan_Lane the default is now a merge when it was an overwrite before
23:49 Ryan_Lane is there any way for me to set it back to overwrite?
23:54 mosen wow when did that happen?
23:54 Ryan_Lane 2014.7
23:54 holler given http://dpaste.com/0XG7839, how do I tell vagrant to use 'local' when doing masterless minion vagrant provision?
23:54 mosen I'm still way behind the times :)
23:54 Ryan_Lane and it's backwards incompat :(
23:54 SheetiS joined #salt
23:56 mosen I think its a good thing, I couldnt figure out how i was going to do a pillar hierarchy without any merging
23:56 Ryan_Lane it's a bad thing if it's the default when it previously wasn't
23:56 mosen obviously some people had their own standard for that before
23:56 mosen yeah backwards breaking changes are usually bad hehe
23:58 pipps joined #salt
23:59 Ryan_Lane it really seems that aggregate should be the default
23:59 Ryan_Lane or it should be None, and None should imply overwrite

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