Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-19

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

All times shown according to UTC.

Time Nick Message
00:00 joehh Haven't managed to find that one, theres one more machine to check (physically off at the moment) - will switch it on this in a few hours
00:00 thayne joined #salt
00:02 mafro okay thanks
00:02 mafro I’ll hang around on here :)
00:04 joehh mafro: you're in luck! machine was on! and has the source package
00:06 joehh package is unlikely to be md5 identical to one build from launchpad (diff build machine names/times etc), but all files will be identical
00:12 mafro excellent joe thanks
00:12 mafro can you put it somewhere public for me pls?
00:14 jraby joined #salt
00:14 Luke joined #salt
00:16 joehh The packages are at http://jhh.no-ip.biz/incoming/
00:17 joehh the changes file is at http://jhh.no-ip.biz/incoming/salt_2014.1.0-1precise1_amd64.changes
00:18 joehh with master package http://jhh.no-ip.biz/incoming/salt-master_2014.1.0-1precise1_all.deb
00:20 mafro yep got em
00:20 mafro thanks again
00:20 joehh no worries
00:22 joehh from next release all source packages (except for lucid) should be available via git
00:22 joehh http://anonscm.debian.org/gitweb/?p=pkg-salt/salt.git;a=heads
00:23 joehh trusty and saucy done now, precise and quantal from the next release
00:24 ashw7n joined #salt
00:24 mafro oh great, I can switch over to pulling packages from there in the near future then
00:25 joehh It will just be source packages though - though it is easy to build from there
00:28 mafro joined #salt
00:34 elfixit1 joined #salt
00:39 jalaziz joined #salt
00:41 __number5__ joehh: cool, I can build them via fpm-cookery then ;) (just need to wait for precise one)
00:54 joehh __number5__: not sure how fpm-cookery fits in, but exactly what was uploaded to launchpad will be available (binary identical I believe)
00:56 __number5__ joehh: fpm is just for my automation and don't need to rely on launchpad ppa. And thanks for the hard works
00:57 joehh thought that might have been the case - does a "plugin" (don't know the correct term) exist for git-buildpackage
00:57 joehh ?
00:58 malinoff joined #salt
00:59 __number5__ joehh: I don't think so, fpm mostly skip lots of debian packaging steps
01:00 jab416171|gone joined #salt
01:00 otter768 joined #salt
01:03 jab416171 joined #salt
01:05 jab416171 left #salt
01:06 joehoyle joined #salt
01:07 dsolsona joined #salt
01:09 mgw joined #salt
01:10 jab416171 joined #salt
01:20 cruatta joined #salt
01:30 xzarth joined #salt
01:34 Furao joined #salt
01:38 tligda joined #salt
01:40 cruatta joined #salt
01:43 bhosmer joined #salt
01:45 diegows joined #salt
01:47 acabrera joined #salt
01:52 rgbkrk joined #salt
01:53 ckao joined #salt
02:00 joehoyle joined #salt
02:05 ph8 joined #salt
02:06 tristianc joined #salt
02:10 redondos joined #salt
02:10 redondos joined #salt
02:13 Luke joined #salt
02:21 joehoyle joined #salt
02:26 joehoyle joined #salt
02:27 mgw joined #salt
02:33 mgw joined #salt
02:40 joehoyle joined #salt
02:41 jalbretsen joined #salt
02:44 happytux joined #salt
02:45 adizam joined #salt
02:56 thayne joined #salt
02:58 ashw7n joined #salt
02:58 fragamus joined #salt
03:08 ashw7n joined #salt
03:09 vmdsch joined #salt
03:11 ldlework left #salt
03:12 dsolsona joined #salt
03:14 frasergraham joined #salt
03:22 faldridge joined #salt
03:27 n8n joined #salt
03:30 lnxnut joined #salt
03:31 bhosmer joined #salt
03:32 shadowsun whoever keeps saying my nick, just pm me
03:33 manfred shadowsun: i did the research for you, they were talking to someone else, not you
03:35 frasergr_ joined #salt
03:39 frasergraham joined #salt
03:41 cruatta joined #salt
03:49 catpiggest joined #salt
03:52 nosleep77 joined #salt
03:52 nosleep77 left #salt
03:53 pdayton joined #salt
03:54 robinsmidsrod joined #salt
03:58 schimmy joined #salt
04:03 Furao joined #salt
04:04 schimmy joined #salt
04:24 malinoff joined #salt
04:26 sroegner joined #salt
04:33 ashw7n joined #salt
04:40 cruatta joined #salt
04:42 thayne joined #salt
04:47 acu joined #salt
04:49 shadowsun manfred: O.o research?
04:49 manfred shadowsun: i looked through my logs
04:49 manfred no one was talking to you
04:49 shadowsun manfred: Ah. The downside of me not logging. :P
04:49 manfred it was an incorrect tab
04:49 shadowsun I appreciate it lol
04:50 manfred the ones you got yesterday were me showing you my logs of where you got pinged
04:53 Outlander joined #salt
05:01 Outlander joined #salt
05:02 shadowsun manfred: yeah, I'm obvs going to have to increse the line count of my scroll
05:10 anuvrat joined #salt
05:11 flebel joined #salt
05:11 pdayton joined #salt
05:12 redondos joined #salt
05:17 ramteid joined #salt
05:19 bhosmer joined #salt
05:21 schimmy1 joined #salt
05:40 occaton joined #salt
05:48 alishan joined #salt
05:57 ndrei joined #salt
06:02 picker joined #salt
06:06 schimmy joined #salt
06:15 sroegner joined #salt
06:16 n8n joined #salt
06:23 anuvrat joined #salt
06:32 Cutegirl1990 joined #salt
06:34 cruatta joined #salt
06:34 cruatta joined #salt
06:39 roolo joined #salt
06:45 mpanetta joined #salt
06:46 ashw7n joined #salt
06:53 schimmy1 joined #salt
06:53 ashw7n joined #salt
07:01 Outlander left #salt
07:08 bhosmer joined #salt
07:08 schristensen joined #salt
07:09 harobed_ joined #salt
07:10 CeBe joined #salt
07:11 londo__ joined #salt
07:18 Kenzor joined #salt
07:20 schimmy joined #salt
07:22 ml_1 joined #salt
07:29 siciliansun joined #salt
07:30 siciliansun left #salt
07:37 schimmy1 joined #salt
07:41 Flusher joined #salt
07:43 TyrfingMjolnir joined #salt
07:46 N-Mi_ joined #salt
07:54 ashw7n joined #salt
08:04 sroegner joined #salt
08:06 thayne joined #salt
08:10 giantlock joined #salt
08:21 zooz joined #salt
08:26 ggoZ joined #salt
08:28 thehaven joined #salt
08:29 bmcorser joined #salt
08:30 bmcorser can i generate keys without installing salt-master?
08:30 bmcorser can i get the salt keygen standalone, in other words
08:30 madduck joined #salt
08:30 madduck joined #salt
08:31 aberdine joined #salt
08:31 TyrfingMjolnir joined #salt
08:32 aberdine joined #salt
08:37 linjan joined #salt
08:41 magenbrot joined #salt
08:47 smcquay joined #salt
08:47 millz0r joined #salt
08:49 millz0r joined #salt
08:55 ashw7n joined #salt
08:56 bhosmer joined #salt
08:57 stanchan joined #salt
09:02 magenbrot joined #salt
09:04 magenbrot left #salt
09:06 darkelda joined #salt
09:06 darkelda joined #salt
09:11 kvbik joined #salt
09:15 che-arne joined #salt
09:25 linjan joined #salt
09:28 aleszoulek joined #salt
09:37 it_dude joined #salt
09:40 rgbkrk joined #salt
09:41 picker joined #salt
09:42 occaton joined #salt
09:48 sroegner joined #salt
09:50 masterkorp guys what metdods do you use to lock salt-master to a version ?
09:50 Fredoo joined #salt
09:50 masterkorp do you use the salt-formula ?
09:52 dsolsona joined #salt
09:56 ashw7n joined #salt
10:00 Furao masterkorp: I run my own mirror and I upgrade only if necessary
10:00 Furao http://archive.bit-flippers.com/mirror/salt/
10:01 Furao and i do the same for many others, I can also save on time and bandwidth, especially when I run my testing framework. it don't fail anymore when pypi or github is down
10:05 sroegner_ joined #salt
10:06 viq joined #salt
10:06 viq joined #salt
10:08 masterkorp sweet, i hate those salt-minion version problems on certain code
10:09 masterkorp since i am about to make an infrastruture from the ground up i better do it right the first time
10:09 masterkorp the ideal would be have the salt version on pillar data
10:09 babilen You have it in grains (or what are you after?)
10:10 masterkorp when i feel like i am ready to update just change can salt "*" state.hightstate :)
10:10 babilen Ah, yeah
10:10 masterkorp yeah that would be my objective
10:10 masterkorp i am looking at salt-formula
10:12 ggoZ joined #salt
10:36 joehh masterkorp: for debian, you can change the deb line to pick a major release
10:36 joehh for ubuntu, there are a couple of ppas 016, 017 and 2014
10:37 joehh others, not too sure...
10:37 joehh but if you really want control either mirror like Furao or reprepro if you need to manage others...
10:42 babilen Is there a way to filter a list in jinja to only include items that start with a specific sequence? I want to find the IP address on eth0, which has been defined with aliased interfaces (i.e. grains['ip_interface']['eth0'] is something like: ['10.10.2.6', '192.168.23.6']) and I want the one starting with 10.10.2 in there.
10:43 babilen Once again this would be trivial in pure Python (filter with startswith for example), but I have no idea how to do this in my pillar with the built-in functionality in jinja. Might have overlooked something though.
10:44 bhosmer joined #salt
10:45 cheus joined #salt
10:46 agend joined #salt
10:47 scalability-junk joined #salt
10:58 ashw7n joined #salt
11:10 vbabiy joined #salt
11:12 bhosmer joined #salt
11:13 bhosmer_ joined #salt
11:13 lnxnut joined #salt
11:15 Fredoo hi, i try to use salt with rundeck via plugin : https://github.com/rundeck-plugins/salt-step but I have an error : [PluginFailed: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
11:15 Fredoo is someone using a similar config ?
11:16 bhosmer_ joined #salt
11:16 workingcats joined #salt
11:17 bhosmer__ joined #salt
11:20 dsolsona joined #salt
11:23 ndrei joined #salt
11:33 harobed joined #salt
11:34 harobed joined #salt
11:35 harobed joined #salt
11:36 jrdx joined #salt
11:36 lilmatt joined #salt
11:36 masterkorp Guys, i am running salt "*" test.ping as root on salt master
11:36 masterkorp Failed to authenticate, is this user permitted to execute commands?
11:38 masterkorp also, what keys does it use ?
11:38 masterkorp i have a private key on root/.ssh/id_rsa and gitpython is complaining it can read from remote
11:42 che-arne joined #salt
11:42 TyrfingMjolnir joined #salt
11:43 babilen Hi all -- I am doing something like http://paste.debian.net/100587/ but I really don't like that code as it breaks as soon as there is more than one element in the filtered sequence. What are other approaches in this situation?
11:44 ashb oooohkay. so sudo salt -G 'roles:front' cmd.run /bin/false
11:44 ashb How do i get that to exit with anything other than exit code 0
11:46 babilen ashb: /bin/false exits with an exit code != 0 (that's kind of the definition of it) and why would you want the salt command itself to fail?
11:47 ashb babilen: that's a contrived example
11:47 ashb but I want to run some commands on some boxes and know if they failed or not
11:47 ashb I.e. I want to orchestrate a sequence of commands
11:47 siciliansun1 joined #salt
11:49 babilen ashb: You can do that with states - cmd.run ones that do not exit with 0 are considered to have failed at enforcing the state.
11:50 ashb babilen: I know I can do that, but is that really the only way?
11:51 babilen You could write whatever script you want and execute it with cmd.script, you could implement your own states and use them, ...
11:51 babilen It really depends on what you want to do. :)
11:53 ashb Trying to debug someone else deploy stack that uses a set of cmd.run and then blithly ignores when one of them has an error
11:53 babilen You could even implement your own commands that take advantage of the "stateful" argument..
11:54 ashb thats seriously more work than I was hoping for
11:55 ashb even so with state.single I'd have to pase the output myself - there's no easy way to get `salt` to exit with anything other than 0
11:55 babilen ashb: You mean those commands are simply listed and dependencies between them are not enforced? Would it help to define requisites between them?
11:55 ashb I want the retcode pass through from salt-call :(
11:55 babilen So you are scripting salt calls itself?
11:55 ashb babilen: yeah, the guy who wrote it did it 1) badly, and 2) is on holiday
11:55 sroegner__ joined #salt
11:56 ml_1 joined #salt
11:56 babilen I mean just because a state failed does not mean that the salt call failed. It sounds as if you want to work on the states itself and introduce some requisites between them
11:59 ashw7n joined #salt
12:00 ashb babilen: alright here's one for you. I run state.highstate across all my boxes. I want the exit code to tell me if any of those boxes had a state that failed.
12:00 siciliansun1 left #salt
12:00 diegows joined #salt
12:03 ndrei joined #salt
12:03 davet joined #salt
12:07 babilen ashb: salt's exit code?
12:08 ashb babilen: is always 0
12:08 babilen yeah, the salt call itself did not fail
12:09 ashb I can understand that. But in another way it did.
12:09 ashb the thing I asked it to do (run highstate) did not complete succesfully
12:09 babilen yes, so write logic in your state *not* on top of salt commands themselves
12:10 masterkorp Guys i just set up Gitfs on the salt-master
12:10 masterkorp gitpython does not complain
12:10 masterkorp i added salt-formula to my gitfs_remotes
12:11 ashb babilen: Okay, and then how do i write a useful CI job that tests my salt states?
12:11 masterkorp http://pastie.org/private/zcltjep6ej3us6d4gj2klw
12:11 masterkorp No matching sls found for 'salt' in env 'base'
12:11 masterkorp what am i doing wrong ? and how to debug this ?
12:12 babilen ashb: Maybe http://docs.saltstack.com/en/latest/ref/returners/ can help you. But seriously, it is very hard to help you without knowing what you are actually trying to do. salt calls shouldn't fail just because they couldn't enforce a state, but they should fail if something else is wrong (e.g. an exception during the execution).
12:13 babilen masterkorp: Run "salt-run fileserver.update" and try again please.
12:13 ashb babilen: I want to deploy from Jenkins (i.e. trigger a highstate) and I want the jenkins job to only succeed if the highstate did.
12:14 babilen masterkorp: and "salt" does not exist. You want salt.minion or salt.master
12:15 babilen ashb: https://github.com/saltstack/salt/issues/4176 might be of interest
12:16 masterkorp babilen: did that, on the salt master
12:16 masterkorp same result
12:16 ashb babilen: yeah that, on `salt`, not just `salt-call`
12:17 masterkorp babilen: salt-run gives me no output
12:17 babilen masterkorp: Did what?
12:17 masterkorp salt-run fileserver.update
12:17 masterkorp on the salt-master
12:18 babilen masterkorp: yes, it does not give output. What does "salt '*' state.sls salt.minion" give you now (or master, not sure what you want) ?
12:19 babilen ashb: Why is salt-call not an option? It seems to support what you are after now ... Can't you write more extensive jenkins/salt integration that actually checks if a failure has been returned by a minion?
12:19 babilen (just as another idea)
12:20 babilen ashb: https://github.com/saltstack/salt/pull/11337
12:21 miqui_ joined #salt
12:21 babilen ashb: " I think this only goes live in the next feature release (codenamed Helium) -- so you'll only see the new behavior if you're running off of the develop branch."
12:21 masterkorp babilen: oh sorry derpster me
12:21 babilen masterkorp: Hmm?
12:25 ashb babilen: thanks
12:25 babilen masterkorp: Is it working if you use salt.{master,minion} ?
12:25 ashb babilen: I could write some code but there's enough of that in the world already ;)
12:25 babilen yeah
12:26 masterkorp babilen: yes, its failing the run, but its running, thank you very much
12:26 jslatts joined #salt
12:26 babilen hoo-ray!?
12:26 masterkorp yeah, now i need to add more remotes
12:26 masterkorp [WARNING ] GitPython exception caught while fetching: 'Error when fetching: fatal: Could not read from remote repository.' returned exit status 2: None
12:27 masterkorp how do i assure that my private key is being used ?
12:27 masterkorp salt-master is running as root ?
12:28 ajprog_laptop joined #salt
12:28 masterkorp yeah a clone was root is working
12:31 masterkorp babilen: sorry to bother you, any ideas?
12:32 masterkorp how can i assure gitpython is loading the key in /root/.ssh/id_rsa
12:32 masterkorp ?
12:32 djinni` joined #salt
12:35 ccase joined #salt
12:36 faldridge joined #salt
12:36 babilen masterkorp: It should, are you sure that known_hosts is initialised correctly?
12:37 masterkorp git+ssh://git@labs.mycompany.something:salt/salt-formula.git
12:37 masterkorp babilen: yeah i can clone the repository no sweat
12:37 babilen masterkorp: And you can ssh as root without "Please accept ..." ?
12:39 bhosmer joined #salt
12:40 bhosmer_ joined #salt
12:40 masterkorp babilen: yes, works without asking
12:40 babilen masterkorp: Sorry, brb ... if you want help paste your config and some output (commands, manual cloning, ...) to, say, http://paste.debian.net
12:41 masterkorp [WARNING ] GitPython exception caught while fetching: 'Error when fetching: fatal: Could not read from remote repository.' returned exit status 2: None
12:41 masterkorp this is the only output
12:47 mpanetta joined #salt
12:49 AdamSewell joined #salt
12:52 babilen masterkorp: May I see the (minimally anonymised) entry in your master config, your command and the manual cloning? Also try deleting /var/cache/salt/master/gitfs/ on the master.
12:53 aleszoulek joined #salt
12:56 cpowell joined #salt
13:00 ashw7n joined #salt
13:03 jaycedars joined #salt
13:05 zirpu joined #salt
13:06 bhosmer joined #salt
13:06 bhosmer joined #salt
13:08 racooper joined #salt
13:10 patrek_ joined #salt
13:10 ipmb joined #salt
13:13 resmike joined #salt
13:14 rojem joined #salt
13:15 * babilen spends the main part of his day battling jinja limitations now
13:15 dude051 joined #salt
13:16 cheus joined #salt
13:16 jaimed joined #salt
13:17 dimeshake joined #salt
13:22 mikeputnam joined #salt
13:25 dsolsona joined #salt
13:27 babilen I have a list of module options defined in a pillar. (i.e. options: \n foo: 10 \n bar: 20) -- I would like to generate a single line from this of the form "options somemodule foo=10 bar=20" -- Can't seem to be able to beat jinja into submission. Any idea?
13:27 nkuttler babilen: whitespace problem?
13:28 johanek joined #salt
13:29 nkuttler fwiw, dict iterating for foo, bar in baz.iteritems() and/or {%- -%} for whitespace
13:29 babilen nkuttler: Yeah, exactly
13:29 babilen nkuttler: I get it to generate it all on one line, but all whitespace is missing.
13:29 babilen God, I hate jinja
13:30 nkuttler {% ' ' %} to force a blank if you use the -
13:30 babilen What an intuitive solution!
13:30 babilen Let me try that.
13:30 bezaban only 9 characters needed
13:30 bezaban <.<
13:31 nkuttler i've also see people use {%                  %} etc as whitespace ;)
13:31 rdorgueil joined #salt
13:31 rdorgueil joined #salt
13:31 mpanetta joined #salt
13:31 nkuttler but yeah, jinja-like languages aren't well suited to generate yaml-style things..
13:31 Joseph joined #salt
13:31 bezaban not particularily fond of yaml either really
13:31 nkuttler yeah, me neither
13:32 Joseph I am trying to learn how reactors work. http://docs.saltstack.com/en/latest/topics/reactor/. However, I don't understand how to define an event.
13:32 Joseph Can someone clue me in/
13:32 nkuttler can't state files be pure python? for the next refactoring..
13:32 babilen nkuttler: Hmm, I have http://paste.debian.net/100607/ now which obviously doesn't work. What did you have in mind?
13:32 bezaban yeah, that would be nice nkuttler
13:33 GradysGhost joined #salt
13:33 Joseph sorry i meant tag
13:33 bezaban hmm. haven't tried reactors
13:33 nkuttler babilen: hm, what's the output?
13:34 kermit joined #salt
13:35 babilen nkuttler: http://paste.debian.net/100610/
13:35 nkuttler babilen: oh, sorry {{ ' ' }}
13:35 babilen heh, sure
13:35 babilen Should have seen that myself
13:36 nkuttler ;)
13:37 babilen nkuttler: Okay, that works, but I get two spaces now. "options quux  bar=128  foo=200"
13:37 joehoyle joined #salt
13:38 nkuttler babilen: well, yeah, the one after the {{ ' ' }} is preserved now
13:38 nkuttler {{ ' ' -}} i guess
13:38 babilen Why?
13:39 babilen heh
13:39 babilen *sob*
13:39 nkuttler babilen: the previous -%} only goes to the next tag
13:39 giantlock joined #salt
13:39 nkuttler afaik, but #pocoo for details
13:40 babilen .oO( Can't I have Python's .format() or string.Template ?)
13:40 babilen Oh, #pocoo are the people I can scream at?
13:40 nkuttler yeah
13:40 nkuttler but they'll probably tell you that you should just write a custom tag
13:40 babilen custom filter you mean?
13:40 nkuttler babilen: btw, did anybody ever reply to your question on google?
13:41 nkuttler babilen: or filter, yeah
13:41 babilen nkuttler: https://github.com/saltstack/salt/issues/12761
13:41 nkuttler nice
13:42 babilen It's just that I spend 80% of my time battling jinja's limitations right now
13:42 babilen I'm a programmer and system administrator and can handle Python!
13:43 babilen Can I render everything with mako? (i.e. states, pillars, managed files)
13:44 funzo joined #salt
13:44 babilen I know that I can choose mako as templating engine for managed files, but am not sure about pillars or states.
13:44 funzo joined #salt
13:44 babilen Jinja was just a very suboptimal choice IMHO, but I don't want to have a wild mix of different template engines in my codebase.
13:44 Joseph babilen: have you looked at pyobjects https://github.com/saltstack/salt/pull/10517
13:45 babilen Can I use that in pillars and states?
13:46 babilen But then mako would be perfect as I could just do my "heavy duty" data munging in Python blocks and then use that data in the template
13:46 babilen Jinja was developed with the idea that the data handling is done in the backend in pure Python and that templates only render that data
13:47 babilen Implementing complex logic in Jinja is just a nightmare.
13:47 Joseph babilen: according to the documentation you can, though i haven't tried that myself. https://github.com/saltstack/salt/blob/develop/salt/renderers/pyobjects.py#L91
13:47 nkuttler i thought jinja was really developed for web templating?
13:47 Joseph babilen: yes i very much agree.
13:47 timoguin you should be able to use mako and/or pyobjects for states and pillar
13:47 Joseph for anything complex,i would probably try out pyobjects
13:47 siciliansun joined #salt
13:47 sroegner__ joined #salt
13:48 babilen Okay -- I just realise that using jinja is not really an option as it just makes a bunch of things too hard that would be trivial in pure Python
13:48 babilen timoguin: How would I do that?
13:48 Joseph in practice, data generation usually requires a fairly sophisticated programming logic to generate data in an environmentally specific way. I think jinja sucks for that
13:48 babilen The downside to this is that I will start developing code that I can never share with the community (e.g. mako/pyobjects formulas) or expect people to be able to help me.
13:49 babilen Joseph: Absolutely
13:49 sroegner___ joined #salt
13:50 Joseph babilen, pyobjects is writing states in pure python. The person who did that had your precise complaint and created that functionality to address it.
13:51 timoguin babilen: pretty sure you can just use a shebang so salt knows what renderer to use
13:51 Joseph yes
13:51 babilen Okay
13:51 ajolo joined #salt
13:51 babilen Guess that I have to bite the bullet and accept the fact that I will use different renderers in my codebase. Not sure what my colleagues think of that.. How do you deal with this?
13:51 thayne joined #salt
13:52 Joseph babilen: that sounds awful. Why can't you just use pyobjects?
13:53 siciliansun left #salt
13:53 masterkorp hello
13:54 babilen Joseph: You mean everywhere? Well, formulas will bring in a bunch of jinja code for once. I also have a lot of states that are working right now that I don't necessarily want to reimplement (but I might consider that)
13:54 ndrei joined #salt
13:54 masterkorp once more and still unsuccesful  fetching repositories with gitfs
13:54 masterkorp [WARNING ] GitPython exception caught while fetching: 'Error when fetching: fatal: Could not read from remote repository.' returned exit status 2: None
13:56 Joseph hmmm, sounds nasty but i would segregate the jinja flavored sls and the pyobjects sls into separate environments
13:56 Joseph and probably just put the whole thing in git
13:56 masterkorp i can clone the repository with the root user
13:58 bhosmer joined #salt
13:58 babilen Joseph: I have everything in GitFS already. I mean it is really just situations such as this in which I think "This would be trivial with Python or Mako, but is unnecessarily hard because of jinja". Generally speaking I have no real problem with an yaml and jinja, but think that mako would have been a better choice due to the fact that it allows one to just sprinkle in pure Python.
13:58 vejdmn joined #salt
13:59 masterkorp how can i debug and ensure the ssh key is being pasth
13:59 ikanobori joined #salt
13:59 faldridge joined #salt
14:00 babilen Joseph: http://docs.makotemplates.org/en/latest/syntax.html#python-blocks -- which is essentially what I need. I am not too fond that by starting to use a non-standard renderer that documentation/blog posts/shared code/... produced by the community will either lead to a mix or necessitate me to rewrite everything.
14:00 bhosmer_ joined #salt
14:00 Joseph ah yes
14:00 Joseph i see what you mean
14:00 Joseph that's actually what i have needed many a time
14:00 ashw7n joined #salt
14:01 Joseph where if i could write a simply two or three lines of arbitrary python code, everything else in my sls would just work
14:01 Joseph instead it was torturous jinja logic
14:01 babilen exactly
14:01 babilen It's most often all you need
14:01 Joseph yes
14:02 babilen Which is why I think that adopting such a restricted templating language such as jinja was a mistake.
14:02 Joseph yes
14:02 Joseph i agree
14:02 Joseph and i think anyone who is using salt heaviliy would too
14:02 Joseph jinja is fine for the simple, 'i need to learn salt' use cases
14:02 bhosmer joined #salt
14:02 Joseph but real world it just doens't cut it
14:03 babilen Yeah
14:03 Ahlee at the same time, jinja makes starting easier, and salt's already a complex system
14:03 ndrei joined #salt
14:03 Joseph i shouldn't have to fight the template language to do trivial things
14:03 Ahlee Yeah, exactly
14:03 Ahlee well, the only thing stopping mako from catching on is people aren't using it (myself included)
14:03 babilen yeah
14:03 Joseph path dependency for sure
14:04 Joseph i started using jinja because that's how the tutorials train you
14:04 Ahlee as I have a hard enough time getting people using states.  Most everything is cmd.run in a state file
14:04 Joseph and i was like well if this is the default and what everyone uses....
14:04 Ahlee Joseph: good observation there
14:04 masterkorp [WARNING ] GitPython exception caught while fetching: 'Error when fetching: fatal: 'git+ssh//git@labs.mycompany.something:salt/salt-formula.git' does not appear to be a git repository' returned exit status 2: None
14:04 Joseph it was only when i started tryign to make it work for actual use cases that you see its short coming
14:04 mschiff joined #salt
14:04 babilen masterkorp: Yes, I asked you a number of detailed questions about an hour ago. Please answer those and try my suggestions.
14:05 Joseph ahlee...oh lord cmd.run
14:05 Joseph apparently people aren't understand the concept of configuration management
14:05 Joseph might as well just run a bunch of shell scripts and call it a day
14:05 timoguin masterkorp: if that's the url in your config, looks like you're missing a colon after git+ssh
14:05 babilen Joseph: Absolutely, it is also that the entire documentation is very jinja specific and that almost everything you read about salt assumes that default.
14:05 Joseph babilen: YES!
14:06 faldridge joined #salt
14:06 babilen Joseph: cmd.script then ;)
14:06 timoguin It'd be really nice if all the default tutorials contained a toggle switch
14:06 babilen That would be awesome
14:06 timoguin so you could see them written in the different renderers
14:06 Joseph so you take it for granted that that is the way its uspposed to be. But then you start saying things like "well but i want to run some code to query what existing users are there and then apply the user state module to them"
14:06 Joseph jinja makes that really hard to impossible
14:06 mschiff hey all. I am quite new to salt, so that may be very easy: In a state I want to use file.replace, but I want to file.touch the file before if it does not exist. Is that possible while still using the filename as ID?
14:07 Joseph mschiff: i personally thing relying on an ID is evil and that everyone should use the name explicilitly
14:07 babilen Joseph: Try to filter a list by a number of predicates and ensure that you pick only the first element (if multiple elements in the original list satisfy all constraints)
14:07 timoguin mschiff: use a more descriptive name for the ID, and pass the filename as the '- name:' argument
14:07 Joseph what timoguin said
14:08 mschiff Joseph: and timoguin: ok, thanks ;)
14:08 masterkorp timoguin: no that is a typo
14:08 masterkorp babilen: what parts of my config do you need
14:08 shwaiil joined #salt
14:09 funzo joined #salt
14:09 babilen masterkorp: Your master config where you define your GitFS remotes, the command that you use to *manually* clone the repository as root on the master (assuming your master runs as root) + applicable error messages from fileserver.update would be a start. *exact* copies without typos :)
14:09 Joseph babilen: it couldn't hurt to air these concerns on the saltstack community.
14:10 babilen Joseph: And there I thought that I just did that :)
14:10 Joseph we can't be the only ones who have these complaints. I believe its a fundamental short coming in trying to use the wrong templating language for the saltstack use case
14:10 Joseph oh haha
14:10 Joseph well that's a start
14:10 Joseph but i'd definitely hit the google group
14:10 Joseph and open a git issue against it
14:11 babilen Joseph: But it is true. I should probably write a mail to the mailing list or write a blog post or something along those lines in which I detail the problem.
14:11 Joseph yes
14:11 funzo joined #salt
14:11 Joseph once you get the core devs attention they are pretty responsive
14:11 mgw joined #salt
14:11 Joseph though they don't always agree with you :)
14:11 funzo joined #salt
14:12 babilen you realise that there is a problem if you spend most of your time battling limitations in your tools
14:12 masterkorp http://paste.debian.net/100625/
14:12 masterkorp babilen: ^
14:12 babilen Salt is awesome, but implementing logic is made unnecessarily hard.
14:12 Joseph omg yes
14:12 masterkorp full config
14:13 Joseph one of my core issues, is that when strip all the syntactic sugar aside, all you are doing is executing arbitrary python code on multiple machines in parallel
14:13 masterkorp learning new tools is always a pain in arse
14:13 Joseph i love python...let me use it!!
14:14 faldridge joined #salt
14:14 Joseph so if i can think of a way to implement some state specific logic in a python construct that would be a two liner instead of 500 lines of jinja code, then let me
14:14 babilen +1
14:14 lnxnut joined #salt
14:14 Joseph PS. I think jinja template syntax is hideous
14:15 babilen Joseph: I think what I will do is to finish the piece of code that I am battling with in jinja, mako and maybe one of pydsl, nacl and use those examples in my bug report/mail. That should be enlightening enough and should be a more constructive way of asking for changes.
14:15 Joseph right
14:16 Joseph i wonder if there's a way for them to add some additiononal functionality in SLS module to allow it to parse and evaluate python code IN ADDITION to jinja
14:16 babilen Joseph: The question is: What should we ask for? A switch in the default templating engine? Documentation with a switch as timoguin suggested (how to do that without the need to maintain num_of_renderes pieces of documentation) ?
14:16 ekristen joined #salt
14:17 Joseph hmm
14:17 Joseph that's a fair question
14:17 babilen Joseph: https://github.com/saltstack/salt/issues/12761 is what jinja allows you (custom filters), but that is still far away from "block of full-on python"
14:18 Joseph yea that's too paifnul
14:18 Joseph still
14:18 Joseph well isn't the core issue having the ability to embed inline python code blocks which is just python?
14:18 Joseph so why can't we ask for that?
14:18 Joseph whether its mako or something else is an implementation detail
14:18 Joseph our struggle is jinja or death
14:18 babilen Joseph: I mean it is easy to criticize, but there is no point in getting people's attention without suggesting something better. Hell, in the best of all worlds I would submit a pull request :)
14:18 Joseph yes
14:19 Joseph don't start fires and then fail to put out hte flame
14:19 Joseph I am not familiar enough with the code to say
14:19 Joseph but it seems like either you use JUST jinja or you have to go to some other render and be non conformant
14:19 Joseph is that your read on it?
14:20 babilen yeah
14:20 timoguin the docs are tricky, especially since most of it comes from docstrings
14:20 Joseph yes
14:20 timoguin and yaml/jinja is what typically gets put there
14:20 Joseph yes
14:20 Joseph because its easy for a new comer
14:20 babilen Right now I can't really think of anything better than: Make mako the default and provide documentation for it. And I am not ready to fight that battle yet (nor convinced that it is in fact not a different shade of grey)
14:21 babilen timoguin: You can't ask saltstack to change all their docstrings :-/
14:21 Joseph well you can....but i dont think they''ll respond kindly to the suggestion
14:21 Joseph hehe
14:22 timoguin just go through and change them all and send a PR. then act surprised when they don't merge
14:22 Joseph lol mean
14:22 timoguin and start a revolution?
14:22 Joseph ha GITHUB FORK!
14:22 babilen "And this is how I wasted a month of my life ..."
14:22 Joseph or two or three
14:22 babilen pepper!
14:22 Joseph you wrote pepper?
14:22 babilen no
14:23 masterkorp babilen: http://pastie.org/private/xwzjciihzgb7xz39r8vvbq
14:23 zooz joined #salt
14:23 babilen Oh, that exists? It was just the name of the hypothetical fork
14:23 shwaiil After uninstalling salt-minion through apt-get, then trying to install it again. The /etc/salt/minion file is not created but there's minion_id  minion.d pki. Though, apt-get install salt-master does create /etc/salt/master
14:23 shwaiil Any hints why this is happening ?
14:23 Joseph hmm well actually i am curious what other's in the community would say to this, specifically the core devs. I'd like to more frame this as a challenge that i am facing and what do people recommend
14:24 mateoconfeugo joined #salt
14:24 Joseph maybe theirs a secret out there that the core devs forgot to mention
14:24 masterkorp babilen: i think gitpython its not picking up
14:24 babilen Joseph: True
14:24 * babilen will be back in a few minutes
14:24 nkuttler shwaiil: apt will not re-created files you have deleted manually
14:25 nkuttler shwaiil: you can reinstall, purge and install the package though, or join #debian and i can make the helper bot send you a msg
14:25 nkuttler actually, no need to join, check your pm
14:25 shwaiil nkuttler: thanks for looking! I'll try purge, I only did uninstall
14:25 masterkorp i am totally cluless
14:25 shwaiil nkuttler: thank you!
14:26 zooz joined #salt
14:26 babilen shwaiil: You have to explicitly ask the packaging system to replace deleted configuration files. (it is assumed that you deleted them on purpose)
14:27 resmike joined #salt
14:27 Joseph babilen: I am going to start with a short post to the saltstack google group and see what happens
14:27 rojem joined #salt
14:27 Joseph and if i shall get flamed, let it be known i protected you :)
14:27 shwaiil babilen: ;)
14:28 babilen Joseph: I will happily add my 0.02€ to that later
14:29 Joseph stay tuned...i'll let you know when i post it
14:30 tyler-baker joined #salt
14:31 babilen masterkorp: "git@labs.company.com:salt/saltstack.git"  is not the same as "git+ssh://git@labs.company.com:salt/salt-formula.git"
14:33 alunduil joined #salt
14:33 viq babilen / masterkorp : also be aware that if this is for roots/pillars you need to replace : with /
14:33 viq so not git.example.com:repo but git.example.com/repo
14:34 babilen yeah
14:36 masterkorp viq: i tried both
14:36 masterkorp com/salt/saltsatck.git
14:36 viq That shoudl work
14:36 viq masterkorp: is the remote's public key in known_hosts of the account that's supposed to connect there?
14:37 masterkorp yes i can clone the repo from root
14:37 troyready joined #salt
14:38 viq passwordless ssh key in /root/.ssh/id_rsa ?
14:38 babilen Joseph: I think reasonable steps to take by the community right now are: 1. Explicit shebangs everywhere (so not to rely on the implicit default) 2. Documentation that makes it clear *eaarly on* that jinja is by no means the only (or a sensible choice), with some examples on what the other renderers offer
14:39 masterkorp http://pastie.org/private/dezcrqvq3f5tv7tjnrswq
14:39 masterkorp viq: yes
14:39 masterkorp look
14:39 Joseph sure
14:39 babilen masterkorp: That's still not the same repository
14:39 Joseph but for alt renders which should we recommend
14:39 Joseph time and resources are limited
14:40 Joseph in practice the most we'll get is one other renderer
14:40 Joseph should it be mako?
14:40 Joseph or pydsl
14:40 Joseph or pyobjects
14:40 Joseph not sure
14:40 babilen masterkorp: You have two different repositories in your master config and in your manual clone. Please try to clone git+ssh://git@labs.company.com:salt/salt-formula.git which you have in your master config (unless you want git@labs.company.com:salt/saltstack.git in there)
14:40 Joseph i'd favor pyobjects but i actually don't know enough about the others to say which one is the "best"
14:41 babilen Joseph: I think mako gets us quite far with its support for literal Python blocks
14:41 viq masterkorp: and how is that git repo defined in your master config?
14:41 Joseph and it has a community
14:41 babilen Joseph: I think pyobjects is too verbose to be the default
14:41 Joseph yes i can see what you mean
14:41 Joseph and probably too intimidating to a new comer
14:41 Joseph mako and jinja are similar enough
14:41 babilen yeah
14:42 viq masterkorp: also, what babilen said, try cloning explicitly git+ssh://
14:43 babilen viq, masterkorp: In case that is not clear: salt-formula.git is *not* the same as salt/saltstack.git -- masterkorp uses the former in the master config, but manually clones the latter.
14:43 masterkorp viq: http://pastie.org/private/bwgudujfsh56unjv5ziuq
14:44 masterkorp sorry those are typos
14:44 viq babilen: yeah, I didn't really look up to see previous conversation
14:44 babilen viq: Sure, just wanted to point that out.
14:44 babilen masterkorp: What are typos? Can't you copy and paste?
14:44 masterkorp s/saltstack/salt-formula/
14:45 viq masterkorp: so if this doesn't work, then you know where the problem is ;)
14:45 masterkorp viq: i have no idea why
14:45 taion809 joined #salt
14:46 viq masterkorp: yeah, but now you can debug normal git
14:46 viq masterkorp: what's doing the hosting of the git repo?
14:46 masterkorp viq: gitlab
14:46 masterkorp self hosted
14:46 viq masterkorp: did you add the key to the repos you want to clone?
14:47 masterkorp yes
14:47 masterkorp as deploy jet
14:47 bhosmer_ joined #salt
14:47 masterkorp if now i would not be able to clone ?
14:47 babilen Joseph: http://docs.saltstack.com/en/latest/ref/renderers/#composing-renderers ;)
14:47 viq masterkorp: but you just showed you are _not_ able to clone
14:47 babilen Joseph: If you want your colleagues to really hate you
14:48 masterkorp i can clone with syntax git clone git@labs.company.com:salt/salt-formula.git
14:48 babilen Can you?
14:48 jslatts joined #salt
14:48 babilen salt-formula != saltstack.git
14:48 Joseph babilen: you are killing. What do you think I am? A sadist?
14:48 Joseph !!
14:48 masterkorp just not git clone git+ssh://git@labs.company.com:salt/salt-formula.git
14:48 viq masterkorp: that's over git protocol. And you're telling salt to clone over ssh. And you just showed you can't clone over ssh yourself
14:49 masterkorp i just want it to work :)
14:49 masterkorp what is the syntax i need to use on the gitfs_remotes
14:49 babilen masterkorp: Why don't you use the git protocol in your master configuration? Just make sure you are consistent! (use the thing that works manually in your config)
14:49 viq masterkorp: either tell salt to clone over git:// or fix your git+ssh
14:50 sulky joined #salt
14:50 masterkorp git//git@labs.company.com:salt/salt-formula.git ?
14:50 masterkorp git://git@labs.company.com:salt/salt-formula.git ?
14:50 babilen yeah
14:50 babilen err, no
14:50 viq masterkorp: no, com/salt not com:salt
14:51 masterkorp root@salt-master:~# salt-run fileserver.update
14:51 masterkorp [WARNING ] GitPython exception caught while fetching: 'Error when fetching: fatal: unable to connect to git@labs.seegno.com:' returned exit status 2: None
14:51 masterkorp using git://git@labs.company.com/salt/salt-formula.git
14:52 kaptk2 joined #salt
14:52 viq Did you restart salt-master?
14:52 masterkorp yes
14:52 masterkorp i tried all methods :(
14:52 viq Because it looks like either you didn't, or you still have somewhere com:something in there
14:52 masterkorp its not
14:53 masterkorp same result with both : or /
14:53 viq masterkorp: no, do not use : in there
14:53 masterkorp like i said i tried with both
14:53 viq And I'm telling you : will not work.
14:54 viq I've been there, I know :P
14:54 Joseph babilen: https://gist.github.com/jaloren/993ded740d0265ba996a
14:54 Joseph can you revieew quicly
14:54 Joseph and let me know what you think
14:55 masterkorp viq: i am using / :(
14:56 thedodd joined #salt
14:59 viq masterkorp: rm -rf /var/cache/salt/*
14:59 viq then restart master, then try again
14:59 ashw7n joined #salt
14:59 babilen Joseph: Remove the last paragraph and let me make that suggestion. That way the thread will be active and I get to say what I wanted to say :)
14:59 babilen Joseph: I really like it apart from that.
14:59 masterkorp viq: same result
14:59 Joseph got it!
15:00 pentabular joined #salt
15:00 zach Has anyone deployed a salt master and minions to run everything over an openvpn link?
15:01 ipalreadytaken joined #salt
15:01 viq masterkorp: then try this: stop all salt processes, make sure none are present. rm -rf /var/cache/salt/* . grep for that url again. And only after verifying all that start the master again
15:02 patarr can I invoke a specific state instead of state.highstate?
15:02 manfred patarr: state.sls
15:02 patarr state.sls mysls?
15:02 manfred salt 'web*' state.sls webserver
15:02 patarr manfred: thank you very much
15:03 manfred you are very welcome :)
15:03 masterkorp viq: i did that, even rebooting the machine
15:04 Joseph babilen: here you go https://groups.google.com/forum/#!topic/salt-users/gmlluKmh07w
15:05 abe_music joined #salt
15:06 patarr manfred, when I do a file managed, will it create the whole directory tree if it doesn't already exist?
15:06 babilen Joseph: Ta!
15:06 * babilen replies
15:06 timoguin patarr: it should if you pass makedirs: True
15:06 abe_music Hey all, still looking for some insight/help with an orchestration issue we're having: https://groups.google.com/forum/#!topic/salt-users/JTn3hEX_8fk
15:06 patarr thanks timoguin :)
15:07 viq masterkorp: including the grep part ?
15:07 conan_the_destro joined #salt
15:08 masterkorp yes
15:08 masterkorp i sent an email to the salt users mailing list
15:09 masterkorp for now i will use the github repositories
15:09 jalbretsen joined #salt
15:09 patarr timoguin: but then that brings me to my original issue. I want to install an rpm that creates a user and the appropriate directories (so I dont need makedirs:True), but I want those files to be a requirement for the service. (Theyre config files). But if I do that, the pkg won't install because those file requirements are not fulfilled (because the pkg is not installed!) Circular logic :)
15:09 masterkorp i am pretty sure its ignoring my key
15:09 viq masterkorp: I am doing exactly what you're trying to do - salt master using git+ssh to a private gitlab repo with a deploy key
15:10 masterkorp can you give me a paste of your config ?
15:10 viq sec
15:10 Darnoth joined #salt
15:11 mgw joined #salt
15:11 viq masterkorp: here's the relevant part http://pbot.rmdir.de/utv0YCKQVNGj80wzAx1uHA
15:12 viq masterkorp: also are you sure that that deploy key is activated for the repo in question?
15:13 masterkorp yes
15:13 masterkorp if not i would not be able to clone it
15:15 viq masterkorp: you are _NOT_ able to clone it.
15:15 xmj viq: o/
15:15 viq You just showed this yourself when you tried using git+ssh url
15:15 viq xmj: oi
15:16 patarr could someone give me a tip? I have a require user in a service for a pkg that is supposed to install that user. Dependencies always fails because it won't install the rpm that will install the user it needs.
15:16 viq masterkorp: let me remind you: http://pastie.org/private/bwgudujfsh56unjv5ziuq
15:17 viq patarr: requires are for states, you need to define somewhere a state that will define that user to be able to require it
15:17 cpowell joined #salt
15:17 patarr viq but the rpm i'm installing with the state should install that user.
15:18 masterkorp yeah that does not work
15:18 viq patarr: read again what I said ;)
15:18 viq patarr: you need to require a state.
15:18 manfred patarr: like this http://ix.io/csq
15:18 masterkorp viq: still thank you very much for your input
15:18 xmj viq: how goes?
15:19 patarr manfred + viq here is what I Have http://pastie.org/private/ldyo74j7jtlzu9rbsdbxta
15:19 tharkun joined #salt
15:19 manfred patarr: you do not have a user.present state for that user, so you do not need the user: require
15:19 viq xmj: weekend people-busy, today work-busy, so eh
15:19 xmj good life?
15:19 manfred patarr: if you want to do it that way, make sure to add a user.present state
15:20 viq xmj: yeah, weekend was intensive and fun
15:20 patarr manfred, you've got a point. It's redundant. If I require the pkg, the pkg ensure the user will be there. so why am I checking for it.
15:20 manfred you would either need to add a user.* state, or remove that user: require
15:20 viq patarr: you are aware that there's a logstash repo? ;)
15:20 manfred salt formula*
15:21 viq patarr: also you're misusing prereq, that should be require
15:21 manfred viq: there is?
15:21 manfred https://github.com/saltstack-formulas?query=logstash
15:21 viq manfred: aye
15:21 manfred not in salt-formulas then :/
15:21 timoguin yea it's not much of a formula
15:21 viq https://github.com/elasticsearch/logstash/blob/master/docs/repositories.md
15:21 manfred ahh
15:22 patarr viq, on EPEL. Which I will not enable on production servers ;) and okay, I will change that right away. I just ran it, and there were no dependency issues but I did get an exception trace for a key error... lol
15:22 shwaiil Q: I guess you guys version control your pillars and sls files, right ?
15:22 viq patarr: no, https://github.com/elasticsearch/logstash/blob/master/docs/repositories.md
15:22 manfred shwaiil: https://github.com/gtmanfred/salt-states.git
15:22 manfred gitfs is a wonderful thing
15:23 patarr viq aah. Okay. I might use it.
15:23 shwaiil manfred: looks like, but I'm still learning salt, so doing it manually atm
15:23 manfred yar
15:23 manfred makes sense
15:23 patarr manfred: that is the salt state for kibana
15:23 shwaiil this is your stuff ? really tidy
15:24 manfred patarr: no idea
15:24 manfred oh
15:24 manfred yeah was saying i didn't see a formula for logstash
15:24 it_dude joined #salt
15:25 viq There's just too many ways you can put logstash together
15:25 manfred yar
15:25 patarr yeah. But here's a good one. But I'm not using it because theyre using the old monolith jar. They moved to a different structure in the most recent version.
15:25 patarr https://github.com/clausa/salt-logstash/blob/master/elasticsearch.sls
15:26 viq I need to figure out a good way to run two instances of LS on one box
15:26 patarr why? its multithreaded
15:26 viq patarr: but you need to restart it to apply new filtering rules
15:26 fragamus joined #salt
15:26 patarr viq true, but if you're going to be running two at once, don't you risk duplication of messages?
15:27 viq So I have one instance that receives logs and dumps them in redis, doing zero processing, and another that reads from redis, analyzes them, and shoves into ES
15:27 wowgmo joined #salt
15:27 viq With the idea being that the first one is very rarely touched, and the second can be restarted at will and you don't lose messages
15:27 meteorfox joined #salt
15:28 patarr ah yes, the consumer logstash could do that. I use MQ to do my load balancing and queuing.
15:29 _mel_ joined #salt
15:29 wowgmo I bootstrap 3 nodes with salt. I will set cassandra on them and as cluster.  I need guidance on how to use their ip to populate the cassandra.yaml file with salt
15:29 mateoconfeugo joined #salt
15:30 viq patarr: I'm just starting. And would still need something to push the logs onto MQ
15:30 timoguin wowgmo: look into the mine system. it will allow you to share things like that for use in your states or templated files
15:30 UtahDave joined #salt
15:30 patarr viq looks like ill need to end up going with those repos after all. salt bugs out with rpms that need --nogpgchec
15:31 viq patarr: aren't they signed? And you can add kes to be accepted using salt
15:31 _mel_ Hi. i got a ssh error on debian: [salt.loaded.int.module.cmdmod               ][ERROR ] Command 'service ssh status' failed. i can execute this on cmdline without problems.
15:31 patarr viq yeah. Might as well just add the repo and all that.
15:32 viq patarr: yeah, that's easier
15:32 patarr viq https://github.com/saltstack/salt/issues/12177
15:32 patarr looks like its something to do with the rpm name and the pkg state name
15:32 _mel_ it seams to fail only on the first run of salt
15:33 wowgmo awesome thanks
15:33 manfred _mel_: is it debian testing?
15:33 happytux joined #salt
15:34 _mel_ wheezy with latest salt backport
15:34 manfred i got nothing then, sorry
15:34 viq _mel_: salt-ssh ?
15:34 manfred wowgmo: the mine can become stale, also worth looking into publish.publish and the peering system, and then if it is cloud servers, possibley cloud.query
15:35 _mel_ salt is triggerd by preseed via 'salt-call -l info state.highstate'
15:35 ajolo joined #salt
15:36 vejdmn joined #salt
15:36 dsolsona joined #salt
15:36 _mel_ the daemon is configured like this:
15:37 patarr viq you're saying that the logstash repo is signed and doesn't need any key nonsense?
15:37 _mel_ http://pastebin.com/vWfJGvmz
15:37 n8n joined #salt
15:38 _mel_ do i need a extra require after the "service:" section in line 9-14
15:45 hartym joined #salt
15:45 hartym joined #salt
15:45 viq patarr: you need to add the key to your systems to recognize it, but yes, packages are signed
15:46 tligda joined #salt
15:46 viq patarr: eg http://pbot.rmdir.de/poghOsyzMeOHtrZ3L1CYPw
15:47 patarr thanks viq
15:48 wendall911 joined #salt
15:49 thayne joined #salt
15:53 schimmy joined #salt
15:54 JesseCW joined #salt
15:54 broke joined #salt
15:54 broke hi.. i have a problem with cron.file -- it keeps saying the file referenced doesn't exist even though the file is there
15:56 it_dude joined #salt
15:57 jhulten joined #salt
15:57 schimmy1 joined #salt
15:58 jhulten_ joined #salt
15:58 londo__ joined #salt
15:59 viq broke: how are you referencing the file? Can you paste your state somewhere?
16:00 broke http://pastebin.com/fwDi1G9R
16:00 viq broke: no, that's not how you do this
16:01 broke this was the previous version: http://pastebin.com/ysg8iN7S  it was working. until an update
16:01 viq broke: http://pastebin.com/KwmkWWUW
16:01 rgbkrk joined #salt
16:01 viq erm, source: salt://
16:02 viq broke: in the second one, s/name/source/
16:02 viq name, if anything, is the location of the file on the _destination_
16:02 viq Not "where to get the file from"
16:02 broke ok let me see
16:03 wowgmo building aws boxes with salt cloud. I set the block mapping under my profile but is not configuring my instance...am following http://salt-cloud.readthedocs.org/en/latest/topics/aws.html
16:03 TOoSmOotH Anyone know of a good way to get the latest saltstack on ubuntu 12.04
16:03 broke Comment: Unable to manage file: get_managed() got multiple values for keyword argument 'source'
16:04 broke must be from the salt:
16:04 viq broke: paste what you have now?
16:05 broke http://pastebin.com/DDExrwLq
16:05 TyrfingMjolnir joined #salt
16:06 viq broke: I think you need more indentation under cront.file:
16:06 pdayton joined #salt
16:07 viq broke: more like http://pastebin.com/a068ALDx
16:07 broke would have preferred json instead of yaml
16:07 viq IIRC JSON is valid YAML ;)
16:07 jcockhren !img me do it live!
16:08 jcockhren sorry. wrong channel
16:09 mgw joined #salt
16:10 scott_w joined #salt
16:10 * viq hands jcockhren a remote
16:10 cruatta joined #salt
16:12 davet1 joined #salt
16:14 broke new error..
16:14 broke http://pastebin.com/2S5EK3us
16:14 stephas joined #salt
16:15 viq broke: no, there's not a state function called 'name', you want '- file: clearcroncache' in the require
16:15 UtahDave broke: name: clearcroncache in your require to   file: clearcroncache
16:15 UtahDave ah, viq beat me to it
16:15 viq :P
16:16 broke ok name is now file.
16:16 broke Comment: Unable to manage file: get_managed() got multiple values for keyword argument 'source'
16:16 _mel_ can i get alerted by mail if a state-update goes wrong?
16:16 viq broke: paste again what you have now?
16:17 broke http://pastebin.com/jk973zJT
16:18 hipster joined #salt
16:20 masterkorp side question, what is the command used to geneare the password has in the users formula ?
16:20 viq And if you try kicking out the env and defaults lines ?
16:21 redondos joined #salt
16:21 redondos joined #salt
16:22 broke same error
16:22 broke i think the extra colon after salt is tripping it somehow
16:22 masterkorp any ideas ?
16:24 masterkorp how do you set the hightstate command ?
16:24 viq broke: quote it?
16:24 zain_ joined #salt
16:24 broke just did.. same
16:24 masterkorp salt "*" state.hightstate right »
16:24 masterkorp ?
16:24 broke yea
16:24 broke well, salt 'host'
16:24 babilen masterkorp: mkpasswd -m sha-512
16:25 broke i'm only doing it on one box
16:26 joehoyle joined #salt
16:26 broke masterkorp:  salt "*" state.highstate  # if you want it set on every minion
16:26 smcquay joined #salt
16:26 masterkorp zabbix.in.bitreserve.org:
16:26 masterkorp 'state.hightstate' is not available
16:26 masterkorp hmm
16:26 mnaser highstate
16:26 mnaser not hightstate
16:27 masterkorp fucking typos
16:27 babilen masterkorp likes typos :)
16:27 mnaser :P
16:27 timoguin typos are the shit.
16:27 timoguin it feels great to be like, "Ah, I know what your problem is... *WIZARD MODE*"
16:28 timoguin "that should be... a different letter..."
16:28 forrest joined #salt
16:29 viq hightaste ;)
16:29 timoguin that'd be a good alias for test=True
16:29 timoguin yea, give me a hightaste
16:29 viq :)
16:29 viq It tastes high ;)
16:29 broke http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html
16:30 babilen masterkorp: Did you figure out your gitfs clone problem?
16:30 broke well according to this page, name is used, not source.  i dunno.
16:30 masterkorp babilen: not yer
16:30 vejdmn joined #salt
16:30 ajolo joined #salt
16:30 masterkorp i opened a thread on the mailing list
16:31 KyleG joined #salt
16:31 KyleG joined #salt
16:31 babilen masterkorp: Yeah, I saw that, but thought that you arrived at the point that you can't clone manually either.
16:31 babilen masterkorp: Does "git clone git://git@labs.company.com:salt/salt-formula.git" work?
16:32 ramteid joined #salt
16:33 resmike joined #salt
16:33 masterkorp yes
16:34 n8n joined #salt
16:34 the_lalelu yay, my slapd+isc-dhcp-server-ldap+bind9 setup works ... wow - salt realy rocks. thank you guys. ;)
16:34 masterkorp érr no
16:34 masterkorp babilen: git@labs.company.com: Servname not supported for ai_socktype
16:34 masterkorp using the exack command
16:35 viq masterkorp:  and try com/salt in there ?
16:35 masterkorp yes
16:35 masterkorp viq: gives "Name or service not known"
16:36 babilen masterkorp: Err, make that "git clone git://git@labs.company.com/salt/salt-formula.git" :) (obviously with s/company/the.real.url/)
16:36 UtahDave the_lalelu: :)
16:37 masterkorp babilen: tried both
16:37 babilen masterkorp: And, what does the latter give you?
16:37 masterkorp the second gives name or service not known
16:37 masterkorp git@labs.company.com: Name or service not known
16:37 babilen masterkorp: You *do* use the correct URL rather than labs.company.com don't you?
16:38 masterkorp yes :D
16:38 ashw7n joined #salt
16:38 masterkorp i am not *that* dumb
16:38 babilen Ah, should be "git+ssh://" or without the git@
16:39 babilen depending on how you implemented that.
16:39 timoguin masterkorp: you don't have an ssh config screwing with things do you?
16:39 masterkorp timoguin: no
16:39 masterkorp babilen: that asks me for the password
16:40 babilen masterkorp: So, what about "git clone git://labs.company.com/salt/salt-formula.git" and "git clone git+ssh://git@labs.company.com/salt/salt-formula.git" -- How do you serve that repo?
16:41 druonysus joined #salt
16:41 schimmy joined #salt
16:41 nineteeneightd joined #salt
16:42 babilen bbl (good luck)
16:42 broke its because of the env
16:42 broke i had base defined.. but not prod.. for the base directories
16:43 broke it doesn't carry through (though it may have at one point?).  it works now.
16:43 broke after removing env: prod
16:44 schimmy1 joined #salt
16:49 ocdmw joined #salt
16:49 patrek joined #salt
16:50 broke Comment: Unable to manage file: 'NoneType' object has no attribute 'startswith'
16:50 shwaiil Q: Trying to understand https://github.com/saltstack-formulas/apache-formula/tree/master/apache. How would the top.sls look like to include this formula ?
16:50 broke on just 3 hosts, they throw this error for the crontemplate bit i have... but everyone else is fine now.
16:50 joehillen joined #salt
16:54 viq shwaiil: either - apache or eg - apache.php5
16:55 shwaiil viq: thanks for looking. ok, so I guess I didn't really understood the basics, because I'm not figuring out how the states vhosts are executed from
16:56 shwaiil I'm still learning and doing really basic stuff. like /srv/salt/users/init.sls
16:56 stanchan joined #salt
16:57 viq I'm not sure what you're asking
16:58 viq oh, that directory
16:58 viq - apache.vhosts.standard
16:58 shwaiil viq: yeah, on that directory there's a vhosts folder.
16:58 shwaiil Oh, I see! So basically, for everything in the apache folder, we'd have to mention it in the top.sls individually
16:59 shwaiil such as, - apache.vhosts.standard
16:59 masterkorp babilen: its gitlab
16:59 viq shwaiil: unless something already includes it, yes
16:59 shwaiil I was confused, because I couldn't understand where the files were being included from, I was so confused
16:59 shwaiil thanks viq
16:59 viq shwaiil: as you can see, pretty much everything there includes apache, so you don't need to explicitly put it in your top.sls
17:00 shwaiil viq: oh right
17:00 jmpf joined #salt
17:00 viq Unless that's all you want, or you want to be explicit
17:00 shwaiil viq: ok, to start, I'll be explicit :) total noob here
17:03 jeremyBass joined #salt
17:03 ajprog_laptop joined #salt
17:04 viq enough to deserve explicit tag? ;)
17:04 XenophonF joined #salt
17:05 XenophonF howdy y'all, i'm running into a problem with group.present
17:05 XenophonF http://paste.debian.net/100658/
17:05 XenophonF basically, it isn't updating the group membership
17:06 icebourg joined #salt
17:10 chiui joined #salt
17:10 jmpf I've asked this before but any downside to disabling the job_cache ? - we routinely run into problems where the inode cnt in the cache dir skyrockets - it's our code's fault no doubt but last time I set the cached job info to 2hrs and it is still getting filled up (inode cnt == 100%)
17:13 shwaiil viq: not sure if I did something wrong but I got:  No matching sls found for 'apache.vhosts.standard' in env 'base'
17:13 TyrfingMjolnir joined #salt
17:16 viq and including others from that formula works?
17:16 anuvrat joined #salt
17:16 borgstrom joined #salt
17:18 aw110f joined #salt
17:19 shwaiil viq: I just copied this files, to test vhosts
17:20 shwaiil the file is located /srv/salt/top.sls where - apache.vhosts.standard and then /srv/salt/apache/vhosts/*
17:21 shwaiil http://pastie.org/private/ltbw9anf3hatjtaocoxckg
17:22 chrisjones joined #salt
17:22 ml_1 joined #salt
17:24 fatbox joined #salt
17:24 jgarr is there a way to lookup pillar data that will be looked up just from a specific sls? I know I can run pillar.items to look up everything, but I'm testing with state.sls file dev and I want to make sure the correct data is there
17:25 resmike joined #salt
17:27 viq shwaiil: I assume the contents of https://github.com/saltstack-formulas/apache-formula/tree/master/apache are for you in /srv/salt/apache/ ?
17:27 shwaiil only the /apache/map.jinja /apache/vhosts/*
17:28 resmike_ joined #salt
17:28 viq shwaiil: you also need init.sls as it's included, and anything that includes
17:28 shwaiil oh ok :)
17:29 XenophonF left #salt
17:30 ashw7n joined #salt
17:31 frasergraham joined #salt
17:33 masm joined #salt
17:34 joehoyle joined #salt
17:34 abe_music joined #salt
17:41 analogbyte is there a way to get the top file only from one branch? I don't like the merging of top files
17:41 borgstrom joined #salt
17:42 UtahDave analogbyte: just use one top file in your base environment or master branch
17:43 Ryan_Lane joined #salt
17:43 austin_laptop joined #salt
17:43 borgstrom joined #salt
17:43 analogbyte UtahDave: and if other branches contain the same and possibly older variants of my base topfile? It seems to overwrite the definitions from my base topfile
17:44 patarr Why do I keep getting "Too many functions declared in state "pkg" " all I have is package.latest and service.
17:44 UtahDave Oh, I see, there are top files in other branches already.  Can you remove the other ones?
17:45 UtahDave patarr: can you pastebin your sls file?  Or at least that section?
17:46 n8n joined #salt
17:47 patarr UtahDave: http://pastebin.com/TRdRcGfL
17:47 analogbyte UtahDave: I could, but I really don't want to... any new branch from other people would contain the topfile to, which might age all over... I tried blacklisting those branches, but it does not seem to work, because when I call state.show_top, it still checks on thos branches
17:48 analogbyte and by 'those branches' I mean all branches but base and dev
17:48 UtahDave analogbyte: You might try pinning the minion to a certain salt environment, but I'm not sure there's a way to black list an existing top file
17:48 Joseph joined #salt
17:49 dpac|away joined #salt
17:49 UtahDave patarr: you were missing the "name" key.   http://pastebin.com/JertHDwW
17:49 patarr hah. Thanks UtahDave :)
17:49 UtahDave :) np
17:50 saurabhs joined #salt
17:50 patarr UtahDave: no information found for "logstash". I assume I have to explicitly define fromrepo?
17:51 Joseph babilen: question for you...and of course anyone else. I think there's a core problem in the saltstack configuration documentation. i think the metaphors and descriptors are really confusing. When i initially started learning the state configuration, i kept getting confused with the structure and syntax because i didn't understand what the pieces. In part because of they kept reusing the word state to mean different things.
17:51 patarr UtahDave: I think I found the issue. Error parsing config: Error parsing "gpgkey = 'salt://pki/rpm-gpg/GPG-KEY-elasticsearch'": URL must be http, ftp, file or https not "salt"
17:51 Joseph I'd like to think through ways to rework this information so that we have better metaphors/terms for the SLS system
17:52 Joseph and then submit an issue to get this fixed in the documentation sprint
17:52 UtahDave patarr: I wonder if you need to make sure it refreshes your package repo first.   Also, check to make sure the package name is exactly  "logstash"
17:52 testcore joined #salt
17:52 analogbyte UtahDave: I tried to use this: http://docs.saltstack.com/en/latest/ref/configuration/master.html#std:conf_master-gitfs_env_whitelist to be more specific... all minions are pinned to base atm... its just the top files doing strange stuff
17:52 patarr UtahDave: exactly. I tried a yum search and looks like the repo was entered incorrectly. I have to make it http
17:52 UtahDave Joseph: we're definitely open to improving that communication.  Please do start a conversation on that with your ideas!
17:53 UtahDave patarr: ah, ok
17:53 Joseph well lets start with something really basic.....the "pieces" in a SLS file
17:53 Joseph i hate the word component
17:53 vejdmn joined #salt
17:53 Joseph which is the only reference i can find for the thing that starts with a ID declaration
17:54 Joseph to mean SLS file actually contains a set of related states and each id references a particular state
17:54 ggoZ joined #salt
17:54 Joseph but this complicated by the fact that each id declaration could have multiple state declarations
17:54 timoguin yea, it's unclear when the entire SLS is called a state, and the individual blocks are called states
17:54 timoguin and the module themselves are called states
17:54 Joseph and in a sense each state declaration is itself a state
17:55 Joseph YES
17:55 Joseph omg yes
17:55 Joseph it took me like a wee kto figure out how it actually worked
17:55 Joseph and frankly i don't actually think there's any problem with the design its quite powerful and easy to use
17:55 Joseph once you figure out the method to the madness
17:55 Joseph <== one of the reason i love saltstack actually
17:55 UtahDave We have a document somewhere that diagrams out what each section should be called
17:55 resmike joined #salt
17:56 Joseph are you referring to this http://docs.saltstack.com/en/latest/ref/states/highstate.html#names-declaration
17:56 Joseph Highstate data structure definitions
17:56 UtahDave Yeah, down at the bottom  http://docs.saltstack.com/en/latest/ref/states/highstate.html#large-example
17:57 jgarr can I run pillar.get interactively from a minion? It's not pulling the data I want and I'm not sure why
17:57 UtahDave Joseph: But I do agree, that there's a TON of overlapping meaning.  That should be sorted out and then publicized so everyone can understand
17:57 UtahDave jgarr: yep!    salt-call pillar.et
17:57 UtahDave err,   salt-call pillar.get
17:57 Joseph yes utahdave
17:58 Joseph the huge problem is the one to many mapping between state and a definition
17:59 jgarr UtahDave: is that running against the master? It just keeps spitting out local:
17:59 Joseph related question utahdave, would it be accurate to say that each state declaration represents an instance of a particular state module in which a particular method on that module is being executed?
18:00 jgarr My ntp_conf isn't being pulled, using the ntp-formula https://github.com/saltstack-formulas/ntp-formula I'm guessing SALTENV=dev should look it up from the right env?
18:01 Joseph and here's another question for the crowd. how do you define a highstate component ....that's not actually defined anywhere in the saltstack documentation as far as i can tell
18:01 cruatta_ joined #salt
18:01 jgarr and it's not in pillar.items or pillar.item ntp_conf
18:01 Rojematic joined #salt
18:02 jhulten joined #salt
18:02 UtahDave jgarr: yeah, if it's a regular minion, it will pull the pillar data from the master
18:02 UtahDave jgarr: Is your pillar top file correct?
18:03 Joseph I think this lack of clarity on state leads directly to the massive confusion around requisites.
18:03 _jslatts joined #salt
18:03 rojem_ joined #salt
18:03 UtahDave Joseph: yes.
18:03 Joseph the requisite is actually elegant, powerful and quite easy to use...once you understand what's going on
18:03 Joseph the requisite system
18:04 UtahDave Joseph: The most important thing to remember, is that the sls files are a textual representation of what becomes a big python dictionary on the backend
18:04 jgarr UtahDave: is there an easy way to see a list of states the minion would get without listing out all of state.show_highstate?
18:04 UtahDave jgarr: try:     state.show_top
18:05 Joseph so the ID declaration is simply a key that points to one or more python dictionaries, which contain information for executing one or more state modules?
18:05 TyrfingMjolnir joined #salt
18:06 aw110f_ joined #salt
18:06 UtahDave Joseph: basically.    that's why you can't have   pkg.latest and pkg.installed under the same ID declaration.
18:06 resmike joined #salt
18:07 UtahDave pkg becomes a key in that dictionary, so it has to be unique
18:07 UtahDave inside the id declaration
18:07 Joseph what's the point of having multiple dicts in a single SLS file?
18:07 Joseph i mean multiple ID declarations
18:07 Joseph i mean i know conceptually
18:07 Joseph i am actually asking from a backend point of view
18:08 UtahDave so you can refer to all of them by the ID declaration.   You can require ALL the things in an id declaration
18:08 jgarr UtahDave: doh! I had match: grains (not grain)
18:08 jgarr UtahDave: thanks!
18:08 UtahDave jgarr: np!
18:08 timoguin it'd help a lot if we had the compiled data structure side-by-side with an SLS
18:08 timoguin things tend to click for me when i can see a visual representation of a data structure
18:08 thedodd joined #salt
18:09 chrisjones joined #salt
18:09 Joseph well saltstack is pythonic and i have a python background. If you gave me a python programmer, i could explain this in terms of python and they'd get it within a few minutes. But I don't think that works for the saltstack community. We don't to exclude people with different programming backgrounds
18:09 UtahDave yeah, I use    salt 'minionID' state.show_highstate  --out json            to get an idea of what the data structure looks like
18:09 eightyeight joined #salt
18:09 Joseph we don't want
18:10 UtahDave Joseph: Very true.  We do need a simpler way to talk about and describe each part so it makes sense
18:10 Joseph so it seems like we need to figure out a way to map all the pythonic idioms into a program language agnostic terms and metaphors
18:10 Joseph what kills me is a python dict works wonderfully me
18:10 broke the documentation reads too much like a programmer's manual
18:10 Joseph once i understood that's how it worked everything clicked
18:10 timoguin I attempted to explain the layers of the state system in my PyTN talk, but I think it was too much to cram in for a 45 min talk.
18:10 Joseph broke: yes agreed
18:10 timoguin and confused some
18:10 Joseph timoguin: that was quite ambitious
18:11 broke the majority of folks tryin to make salt work are not programmers but sys admins.. documentations should read more like man pages, with concrete examples.
18:11 Joseph yes
18:11 Joseph but that means clearly defined terms that only mean one thing
18:11 MTecknology It broked.. but, why?..  http://dpaste.com/3270VHJ/   :(
18:11 timoguin it's hard to balance showing the power and flexibility while still showing The Right Way
18:11 broke joseph: the term itself isn't important.. just that a means b
18:12 MTecknology oh, duhr..
18:12 Joseph for example, what's the purpose of multiple SLS files and what does state mean in this context especially when you have includes
18:12 Joseph in a way, a set of SLS files together represent the state that you want the system in
18:12 jgarr well, fixing top at least got me a new error. conflicting id ntp. but ntp is only in {states,pillar}/dev/ntp. Besides duplicate folders, is there any other reason there'd be a conflict id?
18:12 Joseph but there are multiple meaning of state at different layers there
18:12 Joseph broke yes
18:12 Joseph agreed
18:12 Joseph but that's the question i have
18:12 Joseph how do we clean up the word state here
18:13 Joseph does state mean everything defined in a SLS file, or does it mean the state module that is piece of a SLS file
18:13 Joseph etc
18:13 jgarr nvm, I got it. it was in the ntp/init.sls file
18:13 broke its everything. the final snapshot, i believe, of the directives you put in the sls files
18:13 jgarr there were two ntp: declarations
18:13 timoguin or does it mean the entire state of the machine...
18:13 Joseph broke: i can roll with that but then what do you call the pieces of that state
18:14 broke counties?
18:14 broke :P
18:14 UtahDave lol, broke
18:14 timoguin So OO, very wow!
18:15 Joseph broke: haha
18:17 mpanetta Statelets? heh
18:17 mpanetta Does it really need to be broken down/
18:17 mpanetta ?
18:17 nosleep77 joined #salt
18:17 mpanetta IOW, are people having issues with the fact that state information can span mulitple files?
18:18 resmike joined #salt
18:18 broke no i don't think it needs to be broken down, each minion has their state compiled.  there's the current state (actual) and the high state (at 4:20 AM)
18:18 mpanetta hah
18:19 broke the high state represents the ideal config that it should be in.  each minion can be assigned a different env.. each config id can be configured for a particular env and included or not included based on that.
18:19 mpanetta And each env can have a different set of states...
18:19 broke right
18:20 mpanetta We just started a salt meetup here, it seems that for some reason environments are confusing to people...
18:20 mpanetta Not sure why.  Maybe the way we explained them...
18:21 mpanetta I usually explain them in terms of what kind of environment you are deploying, like production, or test.
18:22 mpanetta And the environment defines what is different or what can chage between say production, and test.
18:23 MTecknology Is there a way to have cmd.run happen only if another state changes?
18:23 MTecknology I'm not sure it -watch works here..
18:23 jcockhren I think that's cmd.wait
18:23 MTecknology actually- sure it doesn't
18:24 MTecknology I don't see -watch for cmd.wait either
18:25 saltyrookie joined #salt
18:25 MTecknology -onlyif can only be another command, right?
18:25 saltyrookie can anyone guide me on the right direction, I need to run  a state only if a process is not running in a state.sls file
18:25 mpanetta Yeah I think so
18:26 masterkorp Guys what is the hash that i had on the users pillar data ?
18:26 masterkorp how do i generate one ?
18:27 it_dude joined #salt
18:27 MTecknology I have salt managing /etc/salt/minion.d/master.conf and if that file changes I need to restart the process. I get how to restart the process 1min after highstate finishes, but I can't figure out restarting it only if that file changes.
18:27 jalaziz joined #salt
18:28 mpanetta MTecknology: Watch does that.
18:28 broke do a run a command to pipe the restart into atd
18:28 mpanetta It shuld be there
18:28 broke and set that to +1m
18:28 MTecknology oh! cmd.wait DOES have watch!
18:28 mpanetta I hope so, I use it :P
18:29 it_dude joined #salt
18:30 MTecknology aight... time to try this out... I should see this jump from one master to two different masters AFTER highstate finishes
18:30 roolo joined #salt
18:30 broke beware of having too many masters
18:30 MTecknology what happens with too many?
18:31 broke power struggle.. fall of government
18:31 MTecknology I'm going to have 5, one master of master and then 4 syndics and states so that all minions will only connect to two syndics
18:32 broke how many minions?
18:32 MTecknology 600ish... up to 1,500 by the end of the year
18:32 rojem joined #salt
18:32 it_dude joined #salt
18:33 rojem joined #salt
18:34 zz_cro joined #salt
18:34 MTecknology Up until I updated to 2014.1.? I had an issue where the master couldn't handle the minions connected to it. That's been fixed, but I still have an issue with the master not handling all of the load if I decide to accidentally run state.highstate on all minions
18:34 bhosmer joined #salt
18:34 MTecknology the load average jumps to 20ish for 1-2 hours
18:34 bhosmer joined #salt
18:36 abe_music MTecknology, in your experience, how many minions could reasonably be supported with a single master?
18:36 MTecknology 200 of these boxes have 100-900 states that they run
18:37 joehoyle joined #salt
18:37 MTecknology abe_music: I'm a bit 'special', I also have 400 of these servers connected to the master via T1
18:37 jslatts joined #salt
18:37 abe_music ah, that must be nice :)
18:37 MTecknology heh... sure
18:38 MTecknology hundreds of states running across T1s is... it's a dream
18:40 MTecknology abe_music: you 'should' be able to get to ~10,000 minions connected to a single master before you have to start worry about syn flooding
18:41 zooz joined #salt
18:41 MTecknology With the changes made, if I were to only run highstate on 50-100 of the boxes at once, I could handle 2,000ish on one master
18:42 quickdry21 joined #salt
18:42 jhulten joined #salt
18:42 MTecknology master: [ salt-syndic1.corp.good-sam.com, salt-syndic2.corp.good-sam.com ]  <-- I have this in /etc/salt/minion.d/master.conf. The minion is connecting to the first syndic only, I was under the impression that a minion would connect to and maintain a connection with both masters
18:44 MTecknology oh... salt-master process is defuct.. that explains that
18:44 fivethreeo joined #salt
18:44 taion809_ joined #salt
18:45 cro joined #salt
18:45 MTecknology perfecT!
18:46 chiui joined #salt
18:47 hipster joined #salt
18:48 MTecknology too bad I can't test this better.. my salt call from the master gives up since highstate takes so long to finish and salt-call isn't really accurate of what's happening
18:49 MTecknology broke: do I sound in any way sane?
18:50 broke just as sane as the rest of us
18:50 MTecknology it's an improvement!
18:51 Ryan_Lane joined #salt
18:51 homelinen joined #salt
18:52 ghartz_ joined #salt
18:52 eliasp MTecknology: you might also want to read about 'batch' for targetting: http://docs.saltstack.com/en/latest/topics/targeting/batch.html and also: http://bencane.com/2014/05/19/using-saltstack-to-update-all-hosts-but-not-at-the-same-time/
18:54 xet7 joined #salt
18:55 MTecknology that helps when I'm running things from cli and remember to use it. Usually, when I run highstate on all minions, it's an accident
18:55 eliasp hehe, ok…
18:55 Ryan_Lane MTecknology: another approach is to run highstate with a returner
18:55 it_dude joined #salt
18:55 patrek_ joined #salt
18:55 Ryan_Lane and have it timeout immediately
18:56 MTecknology hm?
18:56 Ryan_Lane it'll turn into a job and you'll get the results back to a database or something similar
18:56 MTecknology writing a returner that sends to a db is planned
18:56 MTecknology I've been trying to figure out how I want to do it.
19:01 MTecknology Ryan_Lane: Is it possible to make all minions send to the default returner, whatever returner halite uses when halite issues a command, and also another that saves to a db?
19:01 Ryan_Lane1 joined #salt
19:04 rgbkrk joined #salt
19:04 resmike joined #salt
19:06 mgw joined #salt
19:11 jcockhren MTecknology: ext_job_cache setting on master sets the returner for all minions
19:11 ndrei joined #salt
19:12 MTecknology nice
19:12 it_dude joined #salt
19:14 timoguin jcockhren: nice work on the ES returner btw
19:16 MTecknology jcockhren: is it possible to have it send there in addition to the host running the job?
19:16 patarr timoguin: ES returner?
19:16 zirpu left #salt
19:16 MTecknology so  salt '*' cmd.run  will return to the person executing it in addition to whatever other returner I write
19:16 timoguin patarr: jcockhren wrote a returner for elasticsearch. it's currently a PR pending merge
19:17 rdorgueil joined #salt
19:17 patarr oh very neat
19:17 timoguin MTecknology: yea the CLI always returns
19:17 MTecknology ah, yay
19:17 cruatta_ splunk returner :)
19:18 timoguin splunk returner would be cool too
19:18 MTecknology I got thrown off by 'ext_job_cache: ... This will also disable the local job cache on the master'
19:18 hipster joined #salt
19:19 jcockhren MTecknology: yeah
19:19 jcockhren timoguin: thanks
19:19 jcockhren cruatta: do the thing
19:19 jcockhren \o/
19:19 MTecknology I want to write a returner that submits the data to a web api so that I don't need to install anything extra on the minion.
19:19 cruatta yeah let me just run that by my boss
19:20 jcockhren MTecknology: I've been thinking the same thing
19:20 MTecknology jcockhren: I send you $20 and you do it and I get to not think?
19:20 jcockhren the one downside of the returners is that it requires any client libs for the returner to be installed on the minions
19:20 jcockhren MTecknology: pay me in beers
19:20 jcockhren ;)
19:20 timoguin $20 worth of beers?
19:21 jcockhren maybe gittip?
19:21 jcockhren but whatevs. I'm going to write that
19:21 jcockhren so much we use have web endpoints
19:21 saravanans joined #salt
19:21 MTecknology if you come here, I'll brew you some
19:21 jcockhren "here"
19:21 jcockhren heh
19:21 saravanans hi all,
19:21 MTecknology my here
19:22 saravanans I am getting this error - Retrying connection to host ********* on port 445
19:22 saravanans while i provision a linux image
19:22 MTecknology oh....
19:22 saravanans salt thinks its windows and tries to check for 445 port (which should be 22)
19:22 MTecknology ext_job_cache.. disables local, but local isn't even used by default
19:22 jcockhren heh
19:23 timoguin saravanans: that's weird.
19:23 MTecknology ya, most all returners require extra stuff installed on the client
19:23 timoguin saravanans: are you defining windows options in your cloud profile?
19:24 jcockhren MTecknology: that will change.
19:25 MTecknology oh?
19:25 MTecknology because you're writing something?
19:25 saravanans oh, yes
19:25 jcockhren next month, I'm opening up an effort to create salt extentions and modules
19:25 jcockhren LTS style
19:25 saravanans i think thats the isse
19:26 jcockhren tip me and I'll write and maintain it
19:26 MTecknology nice
19:26 MTecknology I may have to do that
19:26 jcockhren b/c you all have better things to do. ;)
19:26 MTecknology I need to make $employer pay for a ssce exam
19:28 MTecknology I'm thinking it should be incredibly simple to write the returner and then I just need to write the API to store and the web app to view
19:28 MTecknology I'll probably tie this into halite in some way
19:28 MTecknology actually... halite just has the pretty views that I'll rip off
19:29 saravanans thanks timoguin
19:29 saravanans thanks others
19:29 broke ssce ?
19:32 Networkn3rd joined #salt
19:33 timoguin broke: the Salt cert
19:34 timoguin MTecknology: that'd be pretty sweet. a generic webhook type returner, and a single minion or two that accepts the POSTs and does the real returnin' work
19:34 XenophonF joined #salt
19:35 timoguin but then the minion running the API would return to itself and it would be too meta for comprehension
19:35 jcockhren MTecknology: for bonus points, do it without requests
19:35 n8n_ joined #salt
19:35 jcockhren all native libs bro
19:35 * timoguin nods
19:36 aberdine joined #salt
19:37 resmike joined #salt
19:39 jaycedars joined #salt
19:39 bluenemo joined #salt
19:39 saravanans joined #salt
19:39 saravanans Hi all
19:40 UtahDave hey, saravanans!
19:40 rgbkrk_ joined #salt
19:40 saravanans i am currently starting instances(aws ec2)
19:40 XenophonF hey all - i want to add users to the built-in wheel group, but group.present: addusers: ... doesn't do anything.  Salt just comes back with "Group wheel is already present"
19:40 XenophonF http://paste.debian.net/100658/
19:40 XenophonF i'm not really sure what I did wrong.
19:41 jalaziz joined #salt
19:41 saravanans and i am setting up the environment - via Script
19:41 saravanans script: /etc/salt/goagent.sh
19:42 saravanans how do i use salt to run the script and (later other updates) - when a new instance is started ?
19:42 eightyeight joined #salt
19:43 saravanans could you please point me - how to make salt trigger some actions / execute some steps - in the minion machines just after provisioning
19:43 UtahDave saravanans: you can set    startup_states: highstate      in your master config
19:44 saravanans UtahDave: ok, but where do i define what is meant by script: /etc/salt/goagent.sh
19:44 Ryan_lane joined #salt
19:44 saravanans UtahDave: ok, but where do i define what is meant by highstate
19:45 UtahDave saravanans: Are you famililar with what a Salt State is?
19:45 n8n joined #salt
19:45 UtahDave looks like that might be a bug with addusers.
19:47 hipster joined #salt
19:47 saravanans i am learning,
19:47 saravanans UtahDave: thanks for the heads up
19:48 aberdine joined #salt
19:48 UtahDave saravanans: Sure.  You need to create a simple Salt state, probably using   cmd.script
19:49 resmike joined #salt
19:50 XenophonF UtahDave, that's kind of what I'm thinking
19:50 XenophonF just looked at the code for states/group.py
19:51 XenophonF i'm running 2014.1.4 which appears to lack the "addusers" argument to group.present
19:52 n8n_ joined #salt
19:52 it_dude joined #salt
19:52 UtahDave oh, is that a new argument?
19:53 XenophonF yeah
19:53 UtahDave Hm. we should probably add the  versionadded argument to it
19:53 XenophonF hm, can i diff between branches in the github ui?
19:53 individuwill joined #salt
19:54 bigl0af_ joined #salt
19:54 Mr_N joined #salt
19:55 Voziv joined #salt
19:55 esogas_ joined #salt
19:55 CaptTofu joined #salt
19:55 the_lalelu joined #salt
19:55 txmoose joined #salt
19:56 rizumu joined #salt
19:56 eightyeight joined #salt
19:56 cwright joined #salt
19:56 saravanans joined #salt
19:56 MTecknology jcockhren: without requests?
19:56 bejer joined #salt
19:56 rawtaz joined #salt
19:56 jcockhren MTecknology: without http://docs.python-requests.org/en/latest/
19:56 insatsu joined #salt
19:56 MTecknology My entire intention was native libs since it prevents having to install anything which is the current headache
19:57 frozenice joined #salt
19:57 MTecknology oh, this is just another external lib
19:57 jcockhren cool
19:57 jcockhren so you win by default
19:57 robins joined #salt
19:57 jcockhren ;)
19:58 kamal_ joined #salt
19:58 wiqd_ joined #salt
19:58 hillna_ joined #salt
19:59 MTecknology I'm quickly realizing how much work this will be
19:59 jcockhren heh
19:59 jcockhren so tip me. I'll do it, and you can not think
19:59 timoguin negotiation.
19:59 jcockhren Not Thinking As A Service
19:59 timoguin it's like watching Pawn Stars but for developers
19:59 bretep joined #salt
19:59 jeffrubic joined #salt
20:00 timoguin i'll do it for $15 and you give me your left shoe
20:00 XenophonF UtahDave: I pushed modules/groupadd.py and states/group.py from the salt dev branch out to my clients, and group.present worked
20:00 MTecknology The returner itself should be easy. I still think that. building the db and the api is where I expect it to get tricky
20:00 XenophonF which i guess is OK for now
20:00 XenophonF maybe I'd better consider running the dev version of Salt
20:00 timoguin yea not in prod
20:00 UtahDave XenophonF: nice!
20:01 Nexus_x1 joined #salt
20:01 delkins joined #salt
20:01 MTecknology jcockhren: would you write the web api and web view too?
20:01 CeBe joined #salt
20:01 XenophonF i'm naturally reluctant to run a bleeding edge version of salt
20:01 Ryan_Lane XenophonF: as you should be :) things are broken in dev frequently
20:02 jslatts joined #salt
20:02 keekz joined #salt
20:02 XenophonF when is the next salt release scheduled?
20:02 TOoSmOotH joined #salt
20:02 Ryan_Lane soon I believe. beginning of June last I heard
20:02 jcockhren MTecknology: for community funded tasks, the community must agree on the scope
20:03 KyleG joined #salt
20:03 KyleG joined #salt
20:03 sifusam joined #salt
20:03 Ryan_Lane of course, I'm not in-the-know here. maybe whiteinge or UtahDave knows when it'll be?
20:03 jcockhren (and the community must tip)
20:03 cpowell joined #salt
20:03 jcockhren ;)
20:03 jcockhren either me directly or another opensource project of my choosing.
20:03 jcockhren like... openssl or something
20:03 MTecknology halite already handles prettification and authentication, I feel like I should be able to append to halite to do the authentication and viewing of past jobs
20:04 schristensen joined #salt
20:04 whiteinge the RC for Helium is _likely_ to be cut in the next couple weeks
20:04 ReconD joined #salt
20:05 MTecknology then just write an api for the returner
20:05 InAnimaTe joined #salt
20:05 whiteinge (skimming the scroll-back) note, requests has been added as a dep to Salt as of Helium
20:05 Ryan_Lane whiteinge: can I make a request that all my boto work makes it into Helium? :)
20:06 jcockhren whiteinge: for salt-master and minions?
20:06 whiteinge jcockhren: yes
20:06 jcockhren MTecknology: then that part is easy ^
20:06 whiteinge Ryan_Lane: i think that'll Just Happen (TM)
20:06 Ryan_Lane ah. excellent
20:06 MTecknology jcockhren: hm?
20:06 Ryan_Lane I need to finish up some modules soon, then
20:07 jcockhren MTecknology: python-requests are new helium dependencies
20:07 fxhp joined #salt
20:07 austin_laptop joined #salt
20:07 MTecknology oh
20:07 MTecknology nice
20:07 jcockhren but still need to support older versions b/c I don't like to live on the wold side ;)
20:07 jcockhren wild*
20:08 simonmcc joined #salt
20:08 whiteinge MTecknology: you may find this useful. the end-goal sounds similar to what you're describing (at least with a quick read), completely different implementation though: https://github.com/felskrone/salt-eventsd
20:08 __hudson__ joined #salt
20:09 whiteinge shovels the "returning" work off to external machines
20:09 mihait joined #salt
20:09 jrdx joined #salt
20:09 jcockhren whiteinge over there trying to take away my beer-tips
20:09 jcockhren ;)
20:09 it_dude joined #salt
20:10 * whiteinge competes hard for beer tips
20:11 * Ryan_Lane prefers whisky tips
20:11 vejdmn joined #salt
20:11 resmike joined #salt
20:12 Ryan_Lane we should really start a kickstarter style site, but where people can say "I want this bottle for this feature" and it'll purchase and ship one after being funded and completed
20:12 jrdx joined #salt
20:12 manfred Ryan_Lane: can't ship liquer to texas :(
20:12 timoguin ah yes, it'd be wonderfully illegal in most US states
20:12 timoguin :(
20:12 Ryan_Lane :D
20:13 MTecknology jcockhren: like I said... I didn't expect the returner to be difficult. I'll pitch in to sponsor the web view and api, though
20:15 forrest Ryan_Lane, just use gittip
20:15 forrest I will gittip you money for a bottle of alcohol
20:16 Ryan_Lane :D
20:16 forrest granted, with my big 0 dollar, and 0 cent money incoming, it's going to take a while
20:16 aberdine joined #salt
20:17 Kenzor joined #salt
20:18 aberdine joined #salt
20:21 manfred just a note, you can't transport it into the state, but we have an amazon distribution center in Texas... so I wonder if they would ship it to me any way cause it wouldn't cross state lines .... hrmm
20:23 it_dude joined #salt
20:23 forrest Ryan_Lane, you could buy whiskytips.com for the low low price of 2200 dollars.
20:23 jcockhren heh
20:23 Ryan_Lane1 joined #salt
20:24 manfred lol
20:24 jcockhren too bad whiskey.tips is already taken
20:24 forrest yea I checked that one
20:25 manfred i can't wait for that to be a thing though...
20:25 manfred what the hell is with all the random tlds...
20:25 manfred whiskey.foundation
20:25 manfred no thanks
20:25 manfred the tld shouldn't be longer than the domain
20:26 manfred whiskey.marketing
20:26 MTecknology ya, I remember when they opened up all the tlds. manfred you can buy a TLD if you really really want....
20:26 n8n joined #salt
20:27 MTecknology it only costs like a million billion dollars and it first come and... I strongly dislike the decision. I might even block those at work.
20:27 jchen blocking TLDs is the worst idea ever
20:28 jalaziz joined #salt
20:28 manfred just... limit it to like 3 letters, and let people do what ever they want, any compination of 3 letters... go crazy! make it four
20:29 manfred but why is .foundation...
20:29 manfred i want the domain, www.google
20:29 jcockhren so many just are just sitting on domains....
20:29 jchen jcockhren: yes, welcome to the internet :)
20:29 rglen joined #salt
20:29 jcockhren like... orgs just buying up blocks to sell 1000x times the TLDs price
20:30 MTecknology bargains is a tld
20:30 jchen http://www.toeppen.com/ <-- see bit about "domain speculation"
20:31 jchen probably the worst person i know in the world
20:31 wendall911 joined #salt
20:31 manfred the only usefull thing to come from the .sexy and .sucks tlds is http://rms.sexy
20:33 MTecknology blackfriday, bargains, boutique, camera, cheap, cleaning, clothing, luxury, plumbing, webcam, etc.
20:33 MTecknology so many TLDs that are just WTF?
20:33 n8n joined #salt
20:33 manfred rms.blackfriday
20:34 druonysuse joined #salt
20:34 druonysuse joined #salt
20:35 jcockhren sorry. I started the off topic segways. my bad!
20:35 XenophonF left #salt
20:38 chrisjones joined #salt
20:39 ashw7n joined #salt
20:39 conan_the_destro joined #salt
20:41 conan_the_destro joined #salt
20:44 ashw7n joined #salt
20:47 hipster joined #salt
20:48 jhulten joined #salt
20:54 troyready joined #salt
20:55 babilen Joseph: I've just stunbled over https://github.com/Psycojoker/dawdaw (with the same "everyone but me does it differently" problem)
20:57 Joseph babilen: looks fairly similar to pyobjects
20:57 Joseph i think the issue is that it goes too far....jinja templating plus inline python probably addresses 90% of the usecases
20:58 Joseph i think pure python is going to be too much of a turn off
20:58 Joseph especially for people who don't have a python background ha!
20:58 robinsmidsrod joined #salt
20:58 Shanky_ joined #salt
20:58 aberdine joined #salt
20:58 Shanky_ Hi
20:59 babilen Joseph: I think that template_language + python blocks is the way to goo too
20:59 babilen *go
20:59 babilen We wouldn't want to goo anything
20:59 Joseph *nods*
20:59 vexati0n joined #salt
20:59 Joseph that way for a novice "its easy" and for actual usage its as powerful as someone needs it to be
21:00 babilen Joseph: It's just that I see that the community is obviously working on "what do we actually want to write states with" -- I see this as a sign of the fact that the offered standard is not powerful enough *when you need it*
21:00 vexati0n I'm having a ridiculous time with a small minority of CentOS minions, where there is a gigantic delay at the end of its "loading grains" routine. I've set log level to garbage, and there's still no useful information. The grains load, then nothing happens for literally 5 minutes, then it authenticates with the master.
21:00 bemehow joined #salt
21:00 Joseph right and when people do pure jinja+yaml for moderately complex cases, the files are terrifying
21:00 tligda joined #salt
21:00 Shanky_ I needed some guidance regarding ssh keys-pair authentication using salt..
21:01 KennethWilke joined #salt
21:01 KennethWilke l
21:01 babilen Joseph: I mean in fact I would love to have a more lispy approach in that one writes states in a nice DSL (domain specific language) but would always have the possibility to harness the full power of the programming language.
21:01 Joseph just as long as you don't inflict lisp syntax on me!!
21:01 Joseph and i say that as someone who loves emacs :)
21:01 babilen Joseph: Maybe I should write a lisp-y/Clojure-y DSL based on https://github.com/hylang/hy :)
21:02 KennethWilke does anyone here use the glusterfs salt integration?
21:02 babilen Joseph: I will not comment on that as it would lead to a long and fairly off-topic discussion in this channel. Suffice to say: I like it :)
21:03 Joseph vexati0n: what's your network set up look like? does it reproduce if you do salt-call on the minion? Theres an external_ips grain that's evil and tries to contact an external website so you might be hitting a network time out
21:03 Joseph babilen: oh i understand. I guess thems fighting words :)
21:03 shwaiil joined #salt
21:03 shwaiil Hi
21:03 timoguin fyi, the external_ip grain has been removed from the main repo and put into salt-contrib
21:04 Joseph timoguin: true but most people are still 2014.3.1  or earlier and its still very much there.
21:04 Joseph I got burned by it real bad
21:04 babilen m
21:04 timoguin yep. it has been removed from the 2014.1 branch though. can't remember what specific bugfix release it was taken out of though
21:04 Joseph I was astonished that it ever gotten into the main branch in the first place it was crazy to me that i had a grain trying to access the internet without my consent
21:05 Ahlee easiest way to copy files on a minion from one path to another?  do I really need to define my own state for this?
21:05 Joseph cmd.run 'cp <src> <dst>'
21:05 vexati0n Joseph: can I disable the external_ip grain just by removing its .py file from the grains dir ?
21:05 Joseph vetation yes...that's exactly what i did
21:05 Ahlee damnit, was trying to avoid yet-another-cmd.run
21:06 Joseph well you asked for easiest...you didn't say recommended :)
21:06 Ahlee heh.
21:06 Ahlee True enough sir, true enough.
21:06 Ahlee i suppose a custom state is going to be best as I'll need to check source and destination
21:07 Joseph if you are doing it repetitively then i'd agee
21:07 Ahlee yeah, it's part of a deployment process
21:07 bhosmer joined #salt
21:08 Joseph well you could always use the state modules to set up nfs.....
21:09 Ryan_Lane joined #salt
21:11 vejdmn joined #salt
21:11 aberdine joined #salt
21:13 aberdine joined #salt
21:25 vexati0n Joseph: thanks for the tip but that doesn't seem to have solved it completely, though it's marginally better.
21:30 jgarr
21:32 rgbkrk joined #salt
21:34 Cidan does anyone know off hand if there's a way to launch EC2 machines using salt-cloud that use HVM and not PV?
21:34 druonysuse joined #salt
21:34 druonysuse joined #salt
21:39 tligda joined #salt
21:39 jgarr source: salt://files/ by default always references the files directory in the same dir as init.sls right?
21:40 jgarr I'm getting 'source file not found'
21:41 jgarr nvm, figured out I need the state path too (I think)
21:45 shwaiil joined #salt
21:47 hipster joined #salt
21:47 sgviking joined #salt
21:48 anuvrat joined #salt
21:49 taion809 joined #salt
21:53 ipalreadytaken joined #salt
21:56 tligda joined #salt
21:56 jnials joined #salt
21:56 MTecknology jgarr: it's relative to file_roots
21:59 sroegner____ joined #salt
22:02 Joseph vexati0n: can you run the salt-minion in the foreground with the log level set to trace?
22:02 Joseph then do a salt-run state.highstate
22:02 Joseph if you could put that in a gist and link it to us that would be good
22:02 joehh TOoSmOotH: isn't the latest available from the ppa?
22:03 TOoSmOotH I didn’t have the repos in there
22:03 TOoSmOotH had a drrrrr moment
22:04 dsolsona joined #salt
22:06 MTecknology jgarr: salt-call -l trace state.highstate
22:09 shwaiil joined #salt
22:11 andrej whiteinge : are you around?
22:11 jnials joined #salt
22:11 joehh googoo~.
22:11 joehh TOoSmOotH: good to hear it was resolved
22:12 ipalreadytaken joined #salt
22:13 TOoSmOotH so nice to have block.replace
22:13 TOoSmOotH :)
22:15 patarr I just made a state file that installs elastic search along with some configs. I checked on the system, and everything appears to be perfect. But salt-master never had anything returned to it.
22:15 patarr Any guess on why that is?
22:15 patarr the service was also not started.
22:17 patarr ah, the init script was never placed.
22:17 patarr but strange i got no output
22:18 mschiff Is there some example somewhere how to iterate over two dimentional pillar data within a state and how to access this data within a jinja template?
22:20 mschiff I am trying {% for foo, bar in ... and foo is accessible while bar is always 'undefined'
22:20 patarr but I reran the state and it worked.. can not get any weirder.
22:23 alunduil joined #salt
22:24 jrdx joined #salt
22:29 MTecknology mschiff: what does ... contain? That'll work on a dictionary. It's no different that python at that point
22:30 MTecknology for foo, bar in {'a': [1, 5, 2, 8], 'b': [4, 7, 9, 1]}   if foo == 'a', for number in bar
22:31 ipalreadytaken joined #salt
22:32 TyrfingMjolnir joined #salt
22:34 mschiff MTecknology: I am trying to get that data from pillar data... I am not sure how to do it, tried several things
22:34 mschiff salt['pillar.get']('servers:instances', {})
22:35 mschiff or same with .items() or .iteritems()
22:35 forrest patarr, salt will drop back to the command line during long running commands
22:35 patarr forrest: aah.
22:35 forrest patarr, look up the job id and you can get the output from the job if you want, you can also increase that value in the master conf
22:35 patarr forrest: thank you, very useful information
22:35 forrest np
22:36 rgarcia_ joined #salt
22:37 jnials joined #salt
22:37 forrest !runners.jobs.list_jobs
22:37 wm-bot4 http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.jobs.html#salt.runners.jobs.list_jobs
22:37 forrest patarr, ^
22:37 patarr cool bot :D
22:38 bhosmer joined #salt
22:38 patarr forrest: it would be cool if there was a command line flag for that
22:39 babilen There is (-t) if you want to raise the timeout value
22:39 patarr its default 5 seconds though. And this is waay longer than 5s
22:39 forrest babilen ++
22:39 babilen I would like it if salt would output the jid whenever it runs into a timeout
22:39 patarr Now that is a fantastic idea.
22:39 patarr But it would be nice to also have a flag like --wait so it will wait however long until the job comes back.
22:39 babilen Actually quite sure that came up in the past and found its way to the bug tracker already
22:39 forrest patarr, well, the way it works is the 5 seconds is on the master, then there's an additional 2 seconds on the minion where the salt master waits for a check in
22:39 forrest babilen, you should create an issue for that
22:40 forrest I think we have one actually for more details when a job exits, but I can't remember.
22:40 forrest patarr, in that case just set a high timeout
22:40 patarr forrest: so is that per like every little bit of communication? Because my shell was sitting there for like a good 40 seconds.
22:40 forrest yea that's because the combined timeout wasn't reach from what I understand
22:40 forrest so it would wait 5 seconds ask 'hey wtf' and get a response, so it kept waiting
22:40 babilen forrest: I don't need many additional details, but simply printing the jid would be of great help (and also provide some feedback for all the people who wonder "huh, what happened there? didn't it do anything?"
22:41 forrest and at some point it didn't respond, so the master dropped out. It usually takes a long time on package installs, or when you have to update a LOT of repo data.
22:41 forrest because those operations take a while *shrug*
22:41 forrest it can happen as well when you have a service that takes a long time to restart/start
22:41 forrest where the process has no update
22:41 forrest babilen, I agree, that's why I'm pretty sure there is an issue for this
22:41 babilen forrest: I'll check the issues tomorrow (getting late in Europe) and will file it if nobody asked for that yet. It seems to be such an obvious thing to do that I would be surprised, but who knows :)
22:41 meteorfox joined #salt
22:41 forrest cool
22:42 hipster joined #salt
22:44 hipster_ joined #salt
22:45 babilen forrest: https://github.com/saltstack/salt/issues/7978
22:45 babilen show_jid: True (should be the default IMHO)
22:47 forrest ahh cool, agreed
22:47 forrest that would be a quick fix in the default master conf
22:47 hipster joined #salt
22:48 jnials joined #salt
22:49 smcquay joined #salt
22:50 jnials joined #salt
22:53 jnials joined #salt
22:53 happytux joined #salt
23:01 jgarr can pillar data reference itself?
23:01 Outlander joined #salt
23:01 jgarr like, can I use {{ name }}.jinja inside pillar somhow?
23:01 jgarr not sure it would make sense to do, so maybe I'll re-think my pillar variable names and how data is being retreived
23:03 UtahDave jgarr: no, you can't, unfortunately
23:03 jgarr UtahDave: np, I'll just call the variables something else and have the {{ name }} in the state sls
23:03 UtahDave cool
23:04 elfixit joined #salt
23:04 ashw7n joined #salt
23:05 happytux joined #salt
23:08 jslatts joined #salt
23:13 jeddi joined #salt
23:15 jgarr is there a default warning to put in config files managed by salt? Ansible has a variable for it to put in templates {{ ansible_managed }}
23:15 jgarr just for consistancy and ease of notifying people trying to do things by hand
23:15 kermit joined #salt
23:18 mschiff MTecknology: Ok Im getting close.. bar is a dict and what I was missing is to set "context:" but how can I now put {{bar}} (the dict) and {{foo}} into the context? "context: {{bar}}" works and "context:\n  foo: {{foo}}" woth work
23:18 mschiff both work if I use either of them, but both at the same time?
23:19 UtahDave jgarr: No, people just create their own in pillar or something and put that in their managed files
23:20 faldridge joined #salt
23:21 jgarr UtahDave: I guess that makes sense, is it common to keep global pillar files? I never really thought of doing that. Always just make pillar per state file
23:24 jgarr is there a way to condense state.highstate output? maybe put states on a single line to condense the information?
23:24 UtahDave jgarr: yeah, there are two options in the master config.  search for terse
23:25 UtahDave terse_output: True   or something similar to that.
23:25 garthk joined #salt
23:25 jgarr state_output: terse
23:26 UtahDave ah, that's right
23:27 jgarr thanks
23:27 happytux joined #salt
23:32 happytux joined #salt
23:35 simonmcc jcockhren remember https://github.com/simonmcc/kitchen-salt/issues/2 ? Was looking at that today, you still need a name for your collection of states, even if it’s not a formula, I can add an alias like “collection_name” if that makes things clearer?
23:36 simonmcc also, for any kitchen-salt users, you can now set grains from inside your .kitchen.yml (https://github.com/simonmcc/kitchen-salt/blob/master/provisioner_options.md#grains)
23:38 jcockhren simonmcc: yeah. I thinks it's mostly due to the directory structure that's implied by formulas.
23:38 jcockhren like: "awesome-formula/awesome/init.sls
23:39 orbit_darren joined #salt
23:39 simonmcc which still ends up as /srv/salt/states/awesome/init.sls
23:39 simonmcc so we still need to know awesome so that we can call it by name
23:39 simonmcc state.sls awesome
23:40 jcockhren yeah
23:40 jcockhren so "collection_name" is fine
23:43 ashw7n joined #salt
23:44 redondos joined #salt
23:47 hipster joined #salt
23:48 dsolsona joined #salt
23:55 frasergr_ joined #salt

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