Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-11-16

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

All times shown according to UTC.

Time Nick Message
00:01 EugeneKay Hm. It looks like that's not available in the states git module.
00:01 EugeneKay Which would explain it
00:01 EugeneKay Sounds like a viable bug to me ;-)
00:02 heewa abe_music: nice, glad it worked out. Still I'd recomment a stable place. At least stick with one commit on develop, sometimes things get wonky as people work on stuff.
00:02 abe_music yeah, i'm on a single commit :)
00:02 abe_music no new functionality i'm interested in, but really wanted salt and salt-cloud integration
00:03 snewell EugeneKay: Thanks.  Nice to know I'm not totally crazy :D
00:03 EugeneKay I seem to remember there being discussion here about the git state module needing a total rewrite
00:03 EugeneKay But that could just be my limited experience with(and hatred for) it coming out.
00:09 DredTiger joined #salt
00:12 mwmnj joined #salt
00:13 thelorax123 joined #salt
00:14 pdayton joined #salt
00:18 mapu left #salt
00:25 nocturn joined #salt
00:29 bhosmer joined #salt
00:30 amckinley interesting error: http://pastebin.com/w1DgjcdT
00:30 amckinley NameError: global name 'RSA' is not defined
00:34 amckinley shouldnt that have been an import error long before it became a NameError?
00:36 log0ymxm joined #salt
00:39 zandy joined #salt
00:41 pipps__ joined #salt
00:44 KyleG joined #salt
00:44 KyleG joined #salt
00:46 heewa amckinley: crypt.py wraps it in a try-catch and says "No need for crypt in local mode." I guess the logic for when it's in local mode or not isn't as strong as it thought..
00:46 amckinley heewa: so its a real bug? i can probably fix it; just wanted to make sure i wasnt doing something wrong first :)
00:52 sroegner_ joined #salt
00:55 pipps_ joined #salt
00:59 zandy joined #salt
01:00 pipps joined #salt
01:03 rgbkrk joined #salt
01:04 mgw joined #salt
01:04 mgw left #salt
01:06 anti joined #salt
01:08 heewa amckinley: I have no idea, haha! I'm branch new to the codebase. Sounds like you need m2crypto installed correctly, and the only code thing is that there's not a nice error message for you.
01:08 heewa Not sure if you'd call that a "bug" or not. Plus what would you do? Make every places that wants to use RSA first do an if-check and log a nice message? Meh..
01:09 amckinley i feel like saying "no crypto in local mode" is pretty lame. might just make that module loading required for all callers
01:10 NotreDev joined #salt
01:11 heewa amckinley: I think they want you to be able to run master-less salt (meaning local only) without requiring m2crypto, which is actually a legitimate pain in the ass on some OSes, like Ubuntu, which completely misconfigures it.
01:12 heewa But you can't check if you're in local mode during import. So it's left kinda implicit, and for you it breaks at runtime.
01:13 amckinley gotcha, thanks for the info
01:13 heewa Maybe you can put an explicit check in the first function the gets called that needs RSA, and log a nicer message telling the user they need the m2crypto library.
01:14 ddv joined #salt
01:17 hellome joined #salt
01:18 helderco joined #salt
01:21 heewa amckinley: Or, if this isn't too clever for them: https://gist.github.com/heewa/ffac2020110ad9b111b2
01:21 heewa Woops, 1 sec, forgot to use it.
01:21 MrTango joined #salt
01:22 heewa ok, updated
01:23 cnelsonsic joined #salt
01:30 cdcalef joined #salt
01:30 jankowiak joined #salt
01:36 zandy joined #salt
01:37 jacksontj joined #salt
01:44 mgw joined #salt
01:52 halfss joined #salt
01:58 Gifflen joined #salt
02:01 vipul joined #salt
02:08 bemehow joined #salt
02:10 pipps joined #salt
02:11 snuffeluffegus joined #salt
02:14 xcbt joined #salt
02:21 franky joined #salt
02:25 amahon joined #salt
02:29 redondos joined #salt
02:30 stooch1122 joined #salt
02:32 Furao joined #salt
02:52 forrest joined #salt
02:54 ajw0100 joined #salt
03:02 kamal joined #salt
03:02 Guest83093 joined #salt
03:06 kamal_ joined #salt
03:06 clone1018 joined #salt
03:08 stooch1122 joined #salt
03:09 kamal_ joined #salt
03:09 clone1018 joined #salt
03:15 stooch1122 joined #salt
03:20 Gifflen joined #salt
03:21 clone1018 joined #salt
03:31 stooch1122 joined #salt
03:35 Baribal_ joined #salt
03:36 stooch1122 joined #salt
03:38 amahon joined #salt
03:44 mwillhite left #salt
03:47 stooch1122 joined #salt
03:50 nickwoodhill joined #salt
03:52 nickwoodhill Hi , I just stared using saltstack, and i am using most basic example that is given on site,
03:52 nickwoodhill Data failed to compile: ----------     The function "state.highstate" is running as PID 13006 and was started at 2013, Nov 15 22:51:09.331779 with jid 20131115225109331779
03:52 nickwoodhill and getting the above error
03:52 forrest hey nickwoodhill! Are you going through the tutorial?
03:52 nickwoodhill yes,
03:52 forrest can you link me the section you're at?
03:52 nickwoodhill i searched google, but not hint is working
03:53 nickwoodhill http://docs.saltstack.com/topics/tutorials/states_pt1.html
03:53 forrest ok, are you running a master minion setup? Or a masterless minion?
03:53 nickwoodhill I just one one server and one minion
03:53 nickwoodhill very simple setup
03:54 forrest Hmm ok, so you've been able to ping your minion and everything right?
03:54 nickwoodhill oh yes
03:55 nickwoodhill both by IP and name
03:55 forrest awesome, ok, what does your directory structure look like? You just have /srv/salt/top.sls, and /srv/salt/webserver.sls on your master?
03:55 nickwoodhill i am using ubuntu 12.04 as OS
03:56 nickwoodhill salt-key -L , shows that key is accepted
03:56 forrest ok
03:57 stooch1122 joined #salt
03:58 nickwoodhill salt-minion -l debug ; doesn't seem to be giving to much hint
03:58 forrest gotcha, does your directory structure look like what I listed above?
03:59 nickwoodhill i changed the directory as /salt/states/base
03:59 forrest in your master conf?
03:59 nickwoodhill yes, and them created the directory
03:59 forrest ok, does your top file and webserver.sls live there?
04:00 nickwoodhill yes
04:00 forrest can you move your top file to /srv/salt, and then re-run?
04:01 forrest /srv/salt/top.sls that is
04:04 nickwoodhill now new error:   Minion did not return
04:04 forrest ok cool, you can move it back then
04:05 forrest I just wanted to make sure it was picking it up properly
04:05 forrest so can you paste your top.sls, and weberver.sls into something like pastebin? I'd like to see what they look like
04:05 ckao joined #salt
04:06 forrest and you restarted the salt master after modifying the master config right?
04:06 nickwoodhill yes i did
04:06 nickwoodhill root@pitstop:/srv/salt# more top.sls base:   '*':     - apache
04:06 nickwoodhill root@pitstop:/srv/salt# more webserver.sls apache:                 # ID declaration   pkg:                  # state declaration     - installed         # function declaration
04:07 nickwoodhill opsss, sorry i skipped the pastebin message,
04:07 forrest all good, it's just hard to read if it's in here :P
04:08 nickwoodhill http://pastebin.com/RZt4Xvgu
04:08 nickwoodhill new error
04:08 forrest that's what you get when you moved it back to /salt/states/base?
04:08 forrest It should live in /salt/states/base. I just wanted to make sure it was 'working' after you modified the file_root
04:09 nickwoodhill ohh, i changed everything as per document.
04:09 nickwoodhill now my file_root is /srv/salt
04:09 forrest oh you changed it back to the default?
04:09 forrest and moved all your files?
04:09 UtahDave joined #salt
04:10 nickwoodhill yes, exactly as per document, i just want to see it running successfully
04:10 forrest understood, can you try salt '*' state.sls webserver
04:11 forrest I think I see where the issue is though
04:11 forrest nickwoodhill, it looks like to me in your top.sls, you reference - apache right?
04:11 forrest however your state file is named webserver.sls
04:11 nickwoodhill http://pastebin.com/pj1XtXpc
04:11 forrest so you should be referencing - webserver
04:12 nickwoodhill yes
04:12 stooch1122 joined #salt
04:13 forrest so your two files look like this currently? https://gist.github.com/gravyboat/7495855
04:16 nickwoodhill This time it did somethig :) on minion side , but still getting the errror. (my top.sls has apache , now i changed to webserver asd given in the example)
04:17 forrest gotcha, yea so when you reference the item in your top, you use the actual name of the state file, not the items declared inside it
04:17 forrest I'd say see what happens when you try to install apache on the minion manually. OR you can run salt '*' state.sls webserver -l debug
04:17 nickwoodhill Data failed to compile: ----------     The function "state.highstate" is running as PID 14266 and was started at 2013, Nov 15 23:16:49.568898 with jid 20131115231649568898
04:17 forrest and you'll get more output
04:17 forrest you got that error again?
04:18 forrest I'm thinking that's because maybe it's still trying to finish the previous run?
04:18 nickwoodhill http://pastebin.com/Sf0X73aq
04:19 nickwoodhill Missing configuration file: /root/.salt
04:20 forrest did you install your minion as a user other than root?
04:20 nickwoodhill nope
04:20 nickwoodhill everything by user root
04:22 UtahDave nickwoodhill: you can ignore that notification about missing that config file.  It's not necessary
04:22 log0ymxm joined #salt
04:25 Furao joined #salt
04:28 nickwoodhill salt.master                                 ][ERROR   ] An extra return was detected from minion xxxxxxx, please verify the minion, this could be a replay attack
04:28 nickwoodhill this is a new error now
04:28 UtahDave nickwoodhill: what version of Salt are you on?
04:29 nickwoodhill salt 0.17.1
04:31 nickwoodhill I am going to give a try tomorrow , Thanks @forrest & @UtahDave
04:32 nickwoodhill have a good weekend
04:32 UtahDave you, too!
04:32 forrest nickwoodhill, yea np, I'll spin up an ubuntu machine and see if I can duplicate your problem
04:32 forrest they're both ubuntu?
04:32 forrest and you installed via the ppa?
04:32 nickwoodhill yes, both are VM , ubuntu 12.04
04:32 forrest ok
04:32 nickwoodhill Description:Ubuntu 12.04.2 LTS Release:12.04 Codename:precise
04:33 opapo joined #salt
04:33 forrest cool
04:33 nickwoodhill yes via ppa
04:33 nickwoodhill root@pitstop:/srv/salt# more /etc/apt/sources.list.d/saltstack.list deb http://ppa.launchpad.net/saltstack/salt/ubuntu precise main
04:33 forrest ok great
04:34 nickwoodhill left #salt
04:35 ConceitedCode joined #salt
04:36 Chrisje joined #salt
04:39 kermit joined #salt
04:45 anuvrat joined #salt
04:47 xl1 joined #salt
04:47 xl1 left #salt
05:05 halfss joined #salt
05:06 forrest nickwoodhill, I know you are gone, but if you check the log tomorrow before I come back, the issue is that Ubuntu doesn't have apache, but apache2, so the install was failing because apache doesn't exist.
05:08 lemao joined #salt
05:15 druonysus joined #salt
05:15 druonysus joined #salt
05:29 steveoliver is there a known issue with undefined jinja variable errors being thrown on last instances?
05:29 steveoliver it seems that keeps happening
05:29 forrest in 0.17.1 steveoliver?
05:29 steveoliver yes sir
05:30 forrest I haven't seen anyone bringing that up for discussion in here :\
05:30 steveoliver on master, at least
05:30 alunduil joined #salt
05:30 steveoliver one sec
05:30 steveoliver yep
05:31 steveoliver https://github.com/circatree/salt-states/blob/master/ceph/eval.conf <— last grains['localhost'] is throwing error "Undefined jinja variable; line 60 in template"
05:31 steveoliver and no errors visible on the first instances
05:32 forrest is it only occurring on some machines?
05:32 steveoliver i've only tried this state on one - let me test
05:33 jesusaurus steveoliver: ive noticed that something somewhere (possibly inside the jinja lib) processes things backwards (presumably by pushing them on to a stack)
05:33 steveoliver oh, well that smells like something
05:33 steveoliver :)
05:33 forrest jesusaurus, so it actually processes line 60 first?
05:33 steveoliver thx
05:33 jesusaurus can you confirm that the minion has the grain? it might be an issue with grains failing to load
05:33 steveoliver i just did
05:33 jesusaurus forrest: ive seen something similar with pillar errors
05:33 forrest jesusaurus interesting
05:34 steveoliver yep
05:34 steveoliver it's in 'ls' and i get the value...
05:34 jesusaurus forrest: i had a similar error with pillar, replaced it salt['pillar.get'] and the next-to-last pillar access cause the error
05:34 forrest really? what the hell
05:35 steveoliver grain exists for all minion
05:35 steveoliver http://paste2.org/amcL5G37
05:35 jesusaurus hrmm
05:35 forrest steveoliver
05:35 steveoliver (highstate)
05:35 steveoliver forrest: ..
05:36 forrest can you try to write a really simple state that bases some data off of the grains localhost data?
05:36 steveoliver sure
05:36 forrest so we can confirm whether it occurs everywhere, or only in a tempalte
05:36 forrest *template
05:36 steveoliver um, a state, with grain['localhost'] ..
05:36 steveoliver k
05:36 forrest well, just like if grain['localhost'] == 'asdf' type jinja thing
05:36 jesusaurus can you also try replacing that final {{ grains['localhost'] }} with {{ salt['grains.get']('localhost') }}
05:37 forrest oh good idea jesusaurus
05:37 jesusaurus can you do that? i dont use grains often
05:37 forrest do what?
05:37 jesusaurus access grains through salt['grains.get']
05:37 forrest I have no idea
05:37 forrest I never use them like that
05:37 forrest worth a shot though
05:39 zach joined #salt
05:40 snewell joined #salt
05:41 steveoliver yep - works
05:41 forrest the grains.get?
05:41 forrest or the state
05:41 steveoliver state using grains.get to create directory with localhost in name
05:41 forrest interesting...
05:42 jesusaurus curious
05:42 jesusaurus and you only had to change the one occurence?
05:42 steveoliver http://paste2.org/jb11UgfL
05:42 steveoliver state:
05:43 steveoliver http://paste2.org/12wJZam4
05:43 steveoliver so lemme mess with jinja template
05:44 steveoliver start over
05:45 steveoliver https://github.com/circatree/salt-states/blob/master/ceph/eval.conf
05:45 steveoliver that's what i'm working with
05:46 steveoliver is line 39 good?
05:46 steveoliver maybe not related, but i didn't understand the syntax of the [-1]
05:46 Jarus joined #salt
05:47 forrest that's just the item in the list
05:47 Chrisje joined #salt
05:47 steveoliver the −1 is a key, got it
05:47 steveoliver on the returned list
05:47 forrest >>> a = [1, 2, 3]
05:47 forrest >>> a[-1]
05:47 forrest 3
05:47 steveoliver oh, last one
05:47 steveoliver first in from end
05:47 forrest right
05:48 bezaban joined #salt
05:48 steveoliver is that a yaml thing
05:48 steveoliver ?
05:48 forrest no that's python
05:48 steveoliver oh, ok
05:48 forrest when you're using jinja, stuff between {{ and }} is python code
05:49 steveoliver or rather compiled to
05:49 steveoliver thx
05:49 jbub joined #salt
05:49 forrest np
05:59 bhosmer joined #salt
06:03 icarus joined #salt
06:03 steveoliver i implemented jinja template to test that localhost grain in a new template, and all good....
06:04 forrest same format as your original one?
06:04 steveoliver no
06:04 steveoliver it is local, though
06:04 steveoliver the other state is coming from that git repo
06:05 steveoliver using git backend for the "issue" state
06:05 steveoliver i'll keep messin' around
06:11 jcockhren I've been trying to figure out how to develop a formula+script that will allow a user to setup their own machine
06:12 jcockhren in my personal case it only requires the states+pillar to be cloned from git and set the file_client to local
06:12 jcockhren (then highstate)
06:12 jcockhren but what about others?
06:12 forrest other users?
06:13 jcockhren other people's situations
06:14 jcockhren let me outline my thoughts here
06:14 jcockhren 1. dotfiles
06:14 jcockhren 2. SSH key gen or importing
06:15 jcockhren 3. dev software
06:15 jcockhren 4. dev environments
06:16 jcockhren categorizing all this needed stuff for a single machine is a lot of work to do at once
06:16 jcockhren I think the greatest benefit is where a user keeps their config up to date
06:17 jalbretsen joined #salt
06:17 jcockhren I'm thinking if my machine dies. I want to be able to run a script that install salt masterless and gets
06:17 jcockhren my setup close to a workable state
06:18 jcockhren or if I get a new machine, I need some basic things installed I'd use for development and/or play
06:19 jcockhren basically, use salt for provisioning local boxes, not just server orchastration
06:19 jcockhren hmmm
06:19 jcockhren that's what's happening in a way when I use salty-vagrant
06:21 jcockhren I guess I could template out the dotfiles
06:21 jcockhren there are cases where the home directory is slightly diff across multiple machines
06:22 jcockhren /home/timj vs /home/tim
06:22 jcockhren 5. pathogen setup
06:28 UtahDave jcockhren: yeah, that would be really useful
06:33 trevorj joined #salt
07:00 robawt joined #salt
07:06 pcarrier joined #salt
07:07 forrest jcockhren, sorry didn't mean to ignore you, was getting distracted working on some stuff.
07:09 lemao joined #salt
07:10 jcockhren UtahDave: still just some rough thoughts.
07:10 forrest he's away
07:10 jcockhren forrest: np
07:10 jcockhren ha
07:10 forrest and that was me responding :P
07:11 forrest oh you were responding to his thing earlier
07:11 UtahDave jcockhren: I think it would be a cool project
07:16 halfss joined #salt
07:20 jcockhren Yeah. the thing is, the personal machine setups would have to cover OSX to be useful any
07:20 jcockhren I think it can sit on top of homebrew
07:20 forrest jcockhren
07:20 forrest http://docs.saltstack.com/topics/tutorials/walkthrough_macosx.html
07:21 forrest benben did a pull request for that yesterday (I'm updating it now), and that talks about using homebrew
07:21 jcockhren awesome
07:22 jcockhren so basically we can install the minion and do a salt-call
07:23 forrest pretty much
07:24 forrest jcockhren, you any good with RST?
07:25 jcockhren haven't used it, but can learn
07:25 jcockhren need help?
07:25 forrest nah I'm good, I can look up what I need, but I figured if someone knew offhand I'd ask
07:26 jcockhren I think the personal machine setup can be packaged as a formula
07:26 forrest yea I agree
07:37 forrest jcockhren are you on a mac?
07:41 jcockhren forrest: all 3 major platforms
07:41 forrest on mac in a termina, when you chown a file, is it : or . to modify user and group? so if I do sudo chown user:group file
07:41 forrest does that work?
07:41 forrest *terminal
07:41 jcockhren yes
07:41 forrest ok cool
07:42 forrest thanks
07:48 rmt joined #salt
07:48 sroegner_ joined #salt
07:58 nn0101_ joined #salt
08:00 xl1 joined #salt
08:00 halfss_ joined #salt
08:01 Damoun joined #salt
08:04 xl1 left #salt
08:10 xl1 joined #salt
08:10 forrest jcockhren you still around?
08:11 jcockhren yeah
08:12 forrest https://github.com/gravyboat/salt/blob/29147e49f166ae820dd8ebf19b5e8e52cc2f756f/doc/topics/tutorials/walkthrough_macosx.rst
08:12 forrest there's the new version of the macosx if you want it
08:12 jcockhren awesome. thanks
08:12 forrest np
08:14 forrest ok that's enough for me tonight, I'm outta here, have a good one
08:15 jcockhren later
08:21 gasbakid joined #salt
08:27 bemehow joined #salt
08:28 aib_233 joined #salt
08:28 lemao joined #salt
08:52 Furao joined #salt
08:55 gasbakid_ joined #salt
08:56 Ryan_Lane joined #salt
08:57 harobed_ joined #salt
09:28 Furao joined #salt
09:32 harobed joined #salt
09:49 tty-1 joined #salt
09:51 gasbakid joined #salt
09:51 foxx[cleeming] joined #salt
09:51 foxx[cleeming] joined #salt
10:25 Katafalkas joined #salt
10:36 kamal joined #salt
10:37 zandy joined #salt
10:38 Nazzy joined #salt
11:04 halfss joined #salt
11:23 bhosmer joined #salt
11:25 Nazzy joined #salt
11:48 zandy joined #salt
11:52 zandy_ joined #salt
11:53 Katafalkas joined #salt
11:55 jefferai joined #salt
12:20 helderco joined #salt
12:22 jefferai joined #salt
12:23 jefferai joined #salt
12:27 gasbakid_ joined #salt
12:29 jefferai joined #salt
12:33 jefferai joined #salt
12:34 gasbakid__ joined #salt
12:37 tty-1 joined #salt
12:38 kermit joined #salt
12:40 hvn joined #salt
12:40 hvn left #salt
12:59 Furao joined #salt
13:01 Katafalkas joined #salt
13:09 jcockhren joined #salt
13:16 crashmag joined #salt
13:22 zandy joined #salt
13:24 anuvrat joined #salt
13:26 halfss joined #salt
13:28 hvn joined #salt
13:30 hvn left #salt
14:00 Teknix joined #salt
14:01 wunki joined #salt
14:02 jcockhren joined #salt
14:03 DredTiger joined #salt
14:10 Chrisje joined #salt
14:10 tdillio joined #salt
14:11 gasbakid joined #salt
14:14 snewell joined #salt
14:16 Chrisje joined #salt
14:22 DredTiger joined #salt
14:24 DredTiger joined #salt
14:29 [diecast] joined #salt
14:32 jankowiak joined #salt
14:45 bhosmer joined #salt
14:55 MrTango joined #salt
15:00 thelorax123 joined #salt
15:05 gasbakid_ joined #salt
15:08 hvn joined #salt
15:12 gasbakid__ joined #salt
15:20 mgw joined #salt
15:39 diegows_ joined #salt
15:56 smccarthy joined #salt
16:04 gasbakid joined #salt
16:04 jankowiak joined #salt
16:09 tdillio joined #salt
16:09 tdillio Should I have 68 salt-master processes running when I only have 3 minions?
16:10 halfss joined #salt
16:11 xt no
16:12 tdillio actually, htop must show duplicates, using ps shows 9 master processes: "/usr/bin/python /usr/bin/salt-master -d"
16:12 tdillio each on using between 4% an 7% memory, is that normal?
16:16 tdillio It seems realyl odd, why do I need 9 salt-master processes? http://pastebin.com/VNgKeRbZ
16:16 mgw1 joined #salt
16:17 halfss joined #salt
16:23 IJNX joined #salt
16:30 xt I think you can tune the number
16:32 Nazca__ joined #salt
16:35 teancom joined #salt
16:36 tdillio thanks xt, chaning worker_threads in the salt-master config brought the number down to 5, which is an improvement
16:40 zandy joined #salt
16:41 godber joined #salt
16:42 Furao joined #salt
16:42 bemehow joined #salt
16:42 B3open joined #salt
16:43 zandy joined #salt
16:45 B3open joined #salt
16:53 bemehow joined #salt
16:54 zandy joined #salt
16:56 zandy_ joined #salt
16:59 tdillio Does the minion only need port 4506 open to communicate with the master?
17:04 B3open joined #salt
17:06 B3open left #salt
17:10 B3open joined #salt
17:15 B3open joined #salt
17:18 pdayton joined #salt
17:20 JulianGindi joined #salt
17:21 foxx joined #salt
17:21 foxx joined #salt
17:32 cnelsonsic joined #salt
17:32 bemehow joined #salt
17:34 bemehow_ joined #salt
17:44 B3open left #salt
17:48 matanya joined #salt
17:50 sroegner_ joined #salt
17:51 NotreDev joined #salt
17:56 zandy joined #salt
18:01 Nazzy joined #salt
18:02 redondos joined #salt
18:09 jsm joined #salt
18:09 mgw joined #salt
18:11 redondos_ joined #salt
18:14 davet joined #salt
18:19 pviktori joined #salt
18:31 matanya joined #salt
18:34 gasbakid_ joined #salt
18:36 bemehow joined #salt
18:37 matanya joined #salt
18:41 matanya joined #salt
18:46 matanya joined #salt
18:54 lineman60 joined #salt
18:55 zandy joined #salt
18:56 ajw0100 joined #salt
19:13 thelorax123 joined #salt
19:19 bemehow joined #salt
19:23 snuffeluffegus joined #salt
19:30 pdayton joined #salt
19:35 pdayton1 joined #salt
19:41 matanya joined #salt
19:47 pdayton joined #salt
19:47 matanya joined #salt
19:55 zandy joined #salt
20:03 ajw0100 joined #salt
20:07 matanya joined #salt
20:07 gasbakid joined #salt
20:10 UtahDave joined #salt
20:10 Ryan_Lane joined #salt
20:11 andyshinn` joined #salt
20:12 bhosmer joined #salt
20:13 forrest joined #salt
20:17 NotreDev joined #salt
20:19 thelorax123 joined #salt
20:27 xet7 joined #salt
20:28 mapu joined #salt
20:34 helderco joined #salt
20:39 Katafalkas joined #salt
20:45 gasbakid_ joined #salt
20:46 matanya joined #salt
20:55 zandy joined #salt
20:58 mephx joined #salt
21:09 Katafalkas joined #salt
21:20 CheKoLyN joined #salt
21:22 sgviking joined #salt
21:23 isomorphic joined #salt
21:38 donatello joined #salt
21:42 msciciel joined #salt
21:45 msciciel hi, is it possible with salt to generate configuration file on one server which is  based on grains from all hosts ? for example i would like to generate nagios services configuration and services list is stored in grain on minion.
21:45 msciciel or generally to iterate in file over grains from all minions
21:49 matanya joined #salt
21:55 zandy joined #salt
22:01 forrest msciciel, as far as I've seen there isn't a way to do that, however you can use a lot of things for workarounds, such as the reactor system http://docs.saltstack.com/topics/reactor/index.html
22:02 forrest msciciel, for that though I'd probably store all the data inside of pillar
22:02 msciciel forrest: is it possible to set pillar data from minion somehow ?
22:03 forrest Not that I've seen
22:03 forrest do you have so many machines it would be prohibitive to list them?
22:04 forrest an external pillar might work for storing the data if you don't want it in the main pillar file http://docs.saltstack.com/topics/development/external_pillars.html
22:04 tty-1 joined #salt
22:05 msciciel i have 2000 machines and i'm trying to generate nagios configuration which will include all hosts
22:06 forrest jesusaurus are you around?
22:07 _ikke_ msciciel: Mines allow you to set data from minions
22:07 msciciel my first start was to export list of checks via grains and somehow generate configuration file for nagios
22:07 forrest _ikke_, can you re-use that data inside of a template or something though?
22:08 forrest maybe a returner would work better in this case?
22:08 msciciel _ikke_: is it possible to iterate over mines from all hosts in template ?
22:08 forrest http://docs.saltstack.com/ref/returners/
22:12 bemehow joined #salt
22:15 steveoliver hey forrest: remember my issue with [http://paste2.org/amcL5G37] yesterday?  This is what is causing the issue: "{{ salt['network.ip_addrs'][-1] }}", which was being evaluated (at least so far as it's representation in salt state.sls stdout) as "<function ip_addrs at 0x9d30a3c>"
22:16 forrest ahh ok
22:16 steveoliver http://paste2.org/Up1Hm5N1 <— this is what got the state to pass
22:16 forrest so the function wasn't being interpreted. How did you fix it
22:16 forrest lol
22:16 steveoliver i determined it by that
22:16 forrest yea
22:16 steveoliver it showed me the state change
22:17 forrest what happens if you just make it 'network.ip_addrs'
22:17 forrest instead of [-1]
22:17 steveoliver ok
22:17 forrest see if that returns a list, or another function instance
22:18 steveoliver this is from a state in salt/salt-states that i'm sure is just written against an older salt api
22:18 forrest ahh yea
22:18 forrest a lot of those still haven't been updated :\
22:18 forrest I think there was a migration over to salt-formulas mostly
22:19 steveoliver i'll get this one over there… :)
22:19 forrest lol
22:19 steveoliver …so, no, that didn't help
22:20 steveoliver still evaluates the same as paste
22:20 druonysus joined #salt
22:22 forrest ok, at least we know that it's just returning a function
22:22 forrest so you need to interpret that function data somehow.
22:22 forrest you might have to look at what exactly that's using when the code runs
22:23 steveoliver interestingly, the state now passes?
22:23 forrest I'm not sure how that's gonna work though if it uses non-standard libs...
22:23 forrest when you chopped the [-1]?
22:23 steveoliver yes, I guess that did it
22:23 forrest but does it return the function again?
22:23 steveoliver not so interesting...
22:23 forrest or actual values
22:23 steveoliver no values yet.
22:23 msciciel forrest: _ikke_ : so is there any way to iterate over all minions in template  ? :)
22:24 forrest msciciel, not that I remember off-hand, I'm sure there is, that's why I was trying to summon jesusarus since I think he's working with a pretty large env.
22:24 forrest the mine/returners can probably do it, but I don't have an example :P
22:25 _ikke_ msciciel: I haven't looked extensively in them, but I believe you could
22:26 msciciel i'm thing about creating pillar data by executing salt '*' grains.item checks and then using that pillar in state file
22:26 steveoliver (… $ salt 'minion' network.ip_addrs gives me the value)
22:26 forrest steveoliver, it returns an actual value?
22:26 steveoliver from the cli
22:26 steveoliver not from the template
22:26 forrest hm
22:28 steveoliver still <function ip_addrs at 0x96c6aac>
22:31 steveoliver … ran it again, after adding (which brought back the undefined jinja variable error) and removing the [-1], then my state changed to:
22:31 steveoliver <function ip_addrs at 0x96c7aac>
22:31 steveoliver 6->7
22:31 thelorax123 joined #salt
22:31 forrest 6 to 7?
22:32 steveoliver ..c6aac -> …c7aac
22:32 steveoliver (not that i needed to point it out to you) :)
22:32 forrest isn't that just the location in memory?
22:32 steveoliver apparently
22:33 steveoliver ok, so maybe i should be getting my ip from another grain… lol
22:33 forrest isn't there a grain for the ip address of just the server?
22:34 forrest just do salt 'server' grains.ls
22:34 forrest and you can see the whole list
22:34 steveoliver yeah
22:34 steveoliver last in ipv4 looks like what i want
22:34 steveoliver so how can i see all grains' values listed like this?
22:34 forrest salt 'server' grains.items
22:35 forrest will return the actual values
22:35 heewa UtahDave: btw, that pillar problem I was having on develop branch is no longer happening.
22:35 steveoliver fqdn_ip4 ...
22:36 forrest steveoliver, keep in mind that if you return an IP, you need to split it, then take the value of [-1]
22:36 forrest >>> a
22:36 forrest '192.168.0.1'
22:36 forrest >>> a.split('.')
22:36 forrest ['192', '168', '0', '1']
22:36 forrest >>> a.split('.')[-1]
22:36 forrest '1'
22:36 forrest I think you'll have to do that for when you return the IP
22:36 UtahDave heewa: ah, good!
22:37 steveoliver forrest: i lost ya there..
22:37 steveoliver what good is the '1' ? :)
22:37 honestly forrest: err wut
22:37 forrest you only want the last octet right?
22:37 steveoliver no
22:37 forrest or do you just want the IP?
22:37 steveoliver the ip
22:37 steveoliver :)
22:37 forrest oh you're good then
22:37 forrest sorry
22:37 steveoliver sorry
22:37 forrest honeslty?
22:37 honestly sok
22:37 steveoliver fqdn_ip4 ?
22:37 steveoliver seems safe
22:37 steveoliver :)
22:37 forrest sok?
22:37 steveoliver isok?
22:38 steveoliver it's ok ?
22:38 honestly ^
22:38 forrest Just give it a shot steveoliver
22:38 steveoliver sure
22:38 steveoliver forrest: don't mind me :)
22:38 forrest honestly, I still don't know what you were asking about, lol
22:38 forrest ok steveoliver
22:38 steveoliver lol
22:38 steveoliver forrest++
22:38 honestly forrest: why did you take [-1] instead of [3]
22:39 forrest honestly, steveoliver was using [-1] earlier
22:39 forrest I just didn't want to break from what was previously being used too much
22:39 steveoliver forrest: that was from old code that was expecting a list of ips, apparently
22:39 honestly lol
22:39 forrest steveoliver, gotcha
22:40 honestly that makes some amount of sense
22:40 steveoliver this is the first state i kinda cargo culted over
22:40 forrest steveoliver, :P
22:40 steveoliver 'swhat i get
22:40 steveoliver all good, though, i'll post a PR
22:41 forrest cool
22:42 inver joined #salt
22:43 steveoliver then in the template, fqdn_ip4 evaluates as an array, so i do need to use −1 now
22:43 steveoliver grains['fqdn_ip4'][-1] ?
22:43 steveoliver tias… i know
22:43 steveoliver don't mind me
22:44 steveoliver …finally
22:44 steveoliver tks again, sorry for the noise
22:46 forrest steveoliver, no reason to apologize, if I didn't feel like seeing what was going on in the IRC it's pretty easy to close the window.
22:46 JesseC joined #salt
22:49 inver greetings all: I'm having fits trying to pull minion data into a pillar file e.g. http://pastebin.com/ggsfi7TM I've also been trying to get mine.get to work in a similar fashion, going so far as copying code verbatim from others who supposedly have this working.  Is there some kind of definitive resource on how to properly invoke salt['publish.publish'] and (preferably) salt['mine.get']?
22:55 zandy joined #salt
23:30 melinath joined #salt
23:33 Vivek joined #salt
23:33 lyddonb joined #salt
23:40 steveoliver forrest: https://github.com/saltstack/salt-states/pull/39
23:41 forrest Nice
23:41 forrest Next I assume you're going to port it to a formula?
23:41 steveoliver right
23:41 steveoliver yes
23:41 forrest ok
23:49 Katafalkas joined #salt
23:53 matanya joined #salt
23:55 zandy joined #salt
23:57 diegows_ joined #salt
23:58 mpanetta joined #salt

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