Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-09-19

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

All times shown according to UTC.

Time Nick Message
00:08 mr_chris joined #salt
00:12 ghanima @Utah: what is the name of that outputter do you know
00:13 Jahkeup joined #salt
00:14 jslatts joined #salt
00:18 andrej Where do I find a document that describes how to deal with temporarily unavailable minions, e.g. machines that are turned off, or laptops that are off-site?
00:19 UtahDave ghanima: the highstate outputter
00:19 mech422 andrej: I don't mean to be flip - but you can't really do anything except wait for them to come back on can you ?
00:20 ghanima @UtahDave: Oh its called highstate
00:20 andrej Ummm ... that's quite true.  I was just wondering whether there's a way to skip them in certain runs
00:20 mech422 andrej: Oh - they'll get skipped automatically...
00:21 andrej E.g., if I do a salt 'linuxhosts' cmd.run 'aptitude update' I would like the output to continue faster ...
00:21 Ryan_Lane1 joined #salt
00:21 jslatts joined #salt
00:23 Ryan_Lane joined #salt
00:23 mech422 andrej: hmm - you could start more remote jobs at once (that will hide the problem), or you could do a salt 'linuxhosts' test.ping and capture the output to see who responds (but that adds the time for a test.ping run...)
00:24 andrej Is there a simple way to reduce the timeout value?
00:25 andrej I don't expect the number of hosts we have to grow astronomically, so just reducing the time might be a good enough option
00:25 mech422 http://docs.saltstack.com/ref/cli/salt.html (-t timeout)
00:26 andrej d'oh
00:26 andrej thanks :)
00:26 mech422 np
00:28 andrej I must say that I'm very impressed.  From zippo to a semi-meaningful test setup w/ a master anad two minions it only took me about 1.5h ... salt is quite easy to grasp, and well documented.
00:28 andrej I had a hard time w/ some other popular engines/frameworks
00:28 forrest Yea it's nice huh andrej
00:29 forrest I couldn't get people to believe me when I told them I had a salt master and it was building out a simple configuration in an hour or so.
00:29 jcockhren same here
00:29 jcockhren salt is nice
00:30 jcockhren setup is a breeze.
00:30 jcockhren and doesn't require a 4GB puppet master
00:30 andrej Heh
00:30 forrest lol yea
00:31 andrej I'm looking forward to playing lots more with this
00:31 jcockhren the frustration I had just "trying out" puppet made it not worth it
00:33 cdsrv joined #salt
00:35 jcockhren </rant>
00:38 aat joined #salt
00:40 andrej I'm evaluating salt because I have no inclination to learn anything about ruby :)
00:40 forrest that's a fair reason
00:41 forrest 0.17.0 should be coming out soon too andrej, which brings some cool new features
00:41 mmilano joined #salt
00:41 andrej I'm not fluent in python, but can read it well enough, and have written some meaningful code
00:41 forrest most of what you need in salt will be yaml, and jinja2, which is pretty easy to learn
00:41 andrej I'll keep looking ;)
00:41 forrest yep gotta evaluate all the options!
00:41 jcockhren puppet isn't just ruby.... ruby is great. RAILS is a dependency
00:41 forrest and mcollective if you want remote execution
00:42 jcockhren rails is a ghetto
00:42 jcockhren we all know this
00:42 forrest Don't act like Zed :\
00:42 forrest rails is very cool
00:42 forrest just, not my preferred thing
00:42 jcockhren Zed's rant left me in tears
00:43 jcockhren I don't harbor such hate for rails. I just like to remind myself of that day I read that
00:43 andrej imho it makes programmers do stupid things w/ databases that a DBA could have solved more ellegantly server side
00:44 daBrado left #salt
00:44 zach_ yaml++ jinja2++
00:44 andrej and with these words I shall depart for now :)
00:44 andrej later
00:44 zach_ it's like picking up mIRC syntax from 15 years ago ;)
00:44 andrej left #salt
00:47 bemehow joined #salt
00:52 ronc joined #salt
00:55 oz_akan_ joined #salt
00:56 higgs001 joined #salt
01:04 emocakes joined #salt
01:04 aparsons joined #salt
01:04 aparsons hello
01:04 aparsons i had a question about salt and grains
01:04 aparsons i have the ec2 grains running
01:04 aparsons they show up in halite
01:04 aparsons but, when i execute "salt '*' grains.ls" they dont show up
01:05 aparsons so, i cant do something like:  salt '*' grains.get ec2_availability-zone
01:06 Gwayne joined #salt
01:07 Code_Bleu joined #salt
01:09 cnelsonsic joined #salt
01:25 Gwayne joined #salt
01:25 aparsons i used this script here:  https://github.com/saltstack/salt-contrib/blob/master/grains/ec2_tags.py
01:30 bhosmer joined #salt
01:36 logix812 joined #salt
01:36 aparsons it looks like whats happening is that grains is returning twice
01:36 aparsons once for core level stuff (os, cpu, etc), and once for ec2 stuff
01:37 aparsons return: [ cpu_flags , cpu_model , cpuarch , defaultencoding , defaultlanguage , domain , fqdn , gpus , host , id , ip_interfaces , ipv4 , kernel , kernelrelease , localhost , lsb_distrib_codename , lsb_distrib_description , lsb_distrib_id , lsb_distrib_release , master , mem_total , nodename , num_cpus , num_gpus , os , os_family , osarch , oscodename , osfinger , osfullname , osrelease , path , ps , pythonpath , pythonversion , saltp
01:37 aparsons and then immediately aftter: return: [ cpu_flags , cpu_model , cpuarch , defaultencoding , defaultlanguage , domain , ec2_0=clique , ec2_ami , ec2_ami-id , ec2_ami-launch-index , ec2_ami-manifest-path , ec2_availability-zone , ec2_device-number , ec2_ephemeral0 , ec2_hostname , ec2_instance-action , ec2_instance-id , ec2_instance-type , ec2_kernel-id , ec2_local-hostname , ec2_local-ipv4 , ec2_local-ipv4s , ec2_mac , ec2_owner-id , ec
01:38 sibsibsib joined #salt
01:39 Nazca joined #salt
01:45 Code_Bleu what is the format for using USE flags in sls file?
01:47 bemehow joined #salt
01:53 mmilano joined #salt
01:54 juicer2 joined #salt
01:55 Gwayne joined #salt
01:58 Thiggy joined #salt
01:59 jalbretsen joined #salt
02:05 sixninetynine joined #salt
02:10 jbunting joined #salt
02:12 Gwayne joined #salt
02:15 ioreku joined #salt
02:18 berto- joined #salt
02:34 Jarus joined #salt
02:39 cyp joined #salt
02:48 bemehow joined #salt
02:53 oz_akan_ joined #salt
02:53 Furao joined #salt
02:56 avienu joined #salt
03:03 Gwayne joined #salt
03:05 __number5__ wow, can't wait to see 0.17.0 release!
03:06 anti joined #salt
03:08 nu7hatch joined #salt
03:13 Ryan_Lane joined #salt
03:16 cro1 joined #salt
03:17 Gwayne joined #salt
03:17 pygmael left #salt
03:18 aranhoide joined #salt
03:18 aranhoide are the docs for cmd.wait correct?  http://docs.saltstack.com/ref/states/all/salt.states.cmd.html ?
03:18 aranhoide the example for cmd.wait there doesn't make sense to me
03:19 aranhoide a 'watch' causes the state watching to perform an action, not the other way around, right?
03:20 aranhoide so how does it makes sense that mycustompkg:pkg.installed watches postinstall.sh:wait ?
03:20 mech422 watch is funky
03:21 mech422 'watch' is really 'sneaky freakin require'
03:21 mech422 with 'bonus execution if the module supports it'
03:21 terminalmage aranhoide: http://docs.saltstack.com/ref/states/requisites.html
03:21 mech422 basically, when you 'watch' something you get 'required'....and a special function is called when the watch fires
03:22 mech422 cmd.wait is probably what you want
03:24 pipps joined #salt
03:25 aranhoide mod_watch is checked in the state that 'watches', right?  not in the one that is 'watched'
03:25 terminalmage aranhoide: of course. I'm not sure how it could work any other way
03:25 mech422 aranhoide: in the state WITH the watch statement
03:26 terminalmage aranhoide: think of it this way: how should every other state know what to do if they're being watched?
03:26 terminalmage it's the state watching another state that takes the action (by running mod_watch)
03:26 aranhoide alright, I get that.  but in the light of that model, the example in http://docs.saltstack.com/ref/states/all/salt.states.cmd.html doesn't make any sense to me
03:27 aranhoide yes, that was my understanding, thanks :)
03:27 terminalmage which example? that's a huge page.
03:27 aranhoide shouldn't the watch statement be in the cmd.wait state?
03:27 mech422 aranhoide: its the cmd.wait thats throwing you off..
03:27 qba73 joined #salt
03:28 aranhoide terminalmage: the one after the title "Should I use cmd.run or cmd.wait?"
03:28 terminalmage ahh. yes, the wording does not make sense there, I agree
03:28 terminalmage I will fix this
03:28 aranhoide thanks a lot
03:29 terminalmage no prob, thanks for catching that
03:29 mech422 aranhoide: cmd.wait works the way I expect... but the ones that don't support watch_mod always seem backwards to me
03:30 aranhoide the example just above the one that confused me is more like what I expect
03:30 aranhoide gotta go, thanks all!
03:30 mech422 yeah
03:30 mech422 oops
03:31 nu7hatch joined #salt
03:48 bemehow joined #salt
03:53 oz_akan_ joined #salt
03:55 mannyt joined #salt
03:56 jpeach joined #salt
03:57 jpeach when I get the error "Cannot extend ID foo in "bar". It is not part of the high state.", what can I do to figure out what I've done wrong?
03:58 Eugennerz Paste what you're actually doing, instead of foo and bar.
03:58 mannyt joined #salt
03:58 jpeach Eugennerz: Cannot extend ID trafficserver in "base:trafficserver.collector". It is not part of the high state.
03:59 Eugennerz Now I can honestly say I have no clue, instead of generally saying no clue. ;-)
03:59 jpeach lol
03:59 Eugennerz What's your statefile that's generating this look like?
03:59 jpeach I have trafficserver/init.sls, trafficserver/packages.sls and trafficserver/collector.sls
03:59 jpeach collector and init include packages
04:00 Eugennerz Sounds like a cart-before-horse issue in an extends declaration, maybe?
04:00 mech422 your trying to extend yourself ?
04:01 jpeach collector.sls looks like this: http://apaste.info/23cC
04:01 mannyt joined #salt
04:01 jpeach I'm not using the extend: anywhere :-/
04:01 Eugennerz I suspect the problem is your include:
04:02 Eugennerz Try doing an include of just "packages" ?
04:02 jpeach would the init.sls be implicitly included in the collector.sls?
04:02 Eugennerz My understanding is yes.
04:02 jpeach ohhhh, that's not what I want
04:02 jpeach lemme experiment a little ...
04:03 Eugennerz That's what /she/ said.
04:04 jpeach hmm
04:04 jpeach I moved init.sls to cache.sls, and packages.sls to init.sls since I need the packages included in all the substates
04:05 jpeach I get the identical error
04:05 jpeach salt-call -l trace doesn't show any logs that really help :(
04:05 mnemonikk joined #salt
04:06 mech422 it thinks your trying to extend the state... do you have trafficserver.collector defined anywhere else ?
04:07 jpeach not afaict ..
04:07 jpeach is there a way I gat get it to tell me what states it thinks I have?
04:07 mech422 I couldn't tell ya...
04:08 mech422 grep trafficserver ? :-P
04:09 jpeach yeh I did that :)
04:11 mech422 what do the other 2 state files look like ?
04:18 pipps1 joined #salt
04:21 jpeach mech422: thanks for yr help, I'll have to pick this up again tomorrow ...
04:24 jaequery joined #salt
04:30 faldridge joined #salt
04:35 NotreDev joined #salt
04:35 jpeach I think that the extend is implicitly caused by the watch_in
04:36 jpeach oh, man I am an idiot
04:37 jpeach I have a watch_in for service:trafficserver, but I commented out that service so that I could debug something else
04:38 pipps1 joined #salt
04:42 jpeach I filed https://github.com/saltstack/salt/issues/7336
04:49 bemehow joined #salt
04:55 Katafalkas joined #salt
05:06 xinkeT joined #salt
05:07 bhosmer joined #salt
05:11 Lue_4911 joined #salt
05:13 sssslang_ joined #salt
05:18 mech422 left #salt
05:36 JesseC joined #salt
05:38 aat joined #salt
05:45 sfello joined #salt
05:49 bemehow joined #salt
06:06 gildegoma joined #salt
06:12 nu7hatch joined #salt
06:32 ml_1 joined #salt
06:35 nu7hatch joined #salt
06:36 nu7hatch joined #salt
06:37 nu7hatch joined #salt
06:38 aranhoide joined #salt
06:38 nu7hatch joined #salt
06:41 aranhoide does anyone know from the top of your head: will a `cmd.run` state with an `unless` clause which succeeds in preventing the command from being actually run trigger any other states `watch`ing it?
06:44 elsmorian joined #salt
06:50 havan joined #salt
07:01 sfello joined #salt
07:05 balboah joined #salt
07:10 nu7hatch joined #salt
07:11 davidone joined #salt
07:11 davidone joined #salt
07:17 malinoff joined #salt
07:24 Damoun joined #salt
07:34 adepasquale joined #salt
07:35 atyagi1024 joined #salt
07:37 bemehow joined #salt
07:49 sssslang_ joined #salt
07:58 jasiek joined #salt
08:01 mfournier joined #salt
08:01 evax joined #salt
08:08 felixhummel joined #salt
08:12 balltongu joined #salt
08:15 Ryan_Lane joined #salt
08:17 Ryan_Lane joined #salt
08:21 logix812 joined #salt
08:21 Ryan_Lane joined #salt
08:26 N-Mi joined #salt
08:26 N-Mi joined #salt
08:27 aleszoulek joined #salt
08:31 ciss joined #salt
08:42 mephx joined #salt
08:43 bhosmer joined #salt
08:55 qba73 joined #salt
09:08 elsmorian1 joined #salt
09:14 ronc joined #salt
09:20 ggoZ joined #salt
09:30 JesseC joined #salt
09:31 nocturn Hi all.  Will salt add support for bazaar as it does for git and svn?
09:44 bemehow joined #salt
09:59 FL1SK joined #salt
10:04 ciss i'm test-driving salt. following the walkthrough, i created a formula similar to the first vm.sls example. running it received "Data failed to compile" on the master, but the package installed fine. wouldn't "data failed to compile" imply a complete failure to process the formula?
10:05 uta joined #salt
10:06 uta Hey does anybody know how I can set environment variables when calling a salt module?
10:12 xl1 joined #salt
10:12 mastrolinux joined #salt
10:16 zooz joined #salt
10:19 mastrolinux is there a way to specify a temporary pillar from the command line just before running the state.sls state?
10:24 adepasquale joined #salt
10:34 az87c joined #salt
10:38 Furao joined #salt
10:45 honestly ciss: are you sure the package wasn't already installed?
10:47 adepasquale1 joined #salt
10:48 ciss honestly: i'm *fairly* sure. the package was mc (midnight commander), which shouldnt be a default on a fresh ubuntu 12.04.3 server install. but i'll run the sls again and see what happens
10:50 ciss honestly: just tried again (with installed and removed package). the error is independent of the minion state / outcome.
10:51 honestly ciss: run "salt-call -l debug state.sls <state name>" on the minion
10:51 ciss honestly: so this is not something that happens to many at the beginning?
10:51 honestly it shouldn't happen
10:54 lemao joined #salt
10:54 ciss honestly: as far as i can see, no errors on the minion
10:54 honestly hm
10:55 ciss could it be just a formatting problem, a missing shebang, or something similar?
10:56 ciss btw, salt version is 0.16.4
10:58 adepasquale joined #salt
10:58 mastrolinux1 joined #salt
10:58 honestly that's a rather old version
10:59 honestly I think 0.16.6 is stable right now
10:59 ml_1 joined #salt
11:01 malinoff The latest stable version is 0.16.4
11:01 mastrolinux1 http://docs.saltstack.com/topics/releases/ yes!
11:01 xl1 left #salt
11:01 pviktori joined #salt
11:02 ciss are there any estimates when 0.17.0 will be available? the milestone date has already been passed
11:03 malinoff ciss: Nop
11:03 ciss i'd love to get my hands on halite, but i'd also rather play it safe
11:04 N-Mi if it's the same as Enlightenment 0.17.0, expect approximately 10 years until release
11:05 ciss that's a fairly short release cycle. i suppose it will still contain a lot of bugs?
11:06 fredvd joined #salt
11:08 adepasquale1 joined #salt
11:09 ciss honestly: i guess i omitted the important part: "The function "state.sls" is running as PID 2368 and was started at 2013, Sep 19 12:48:44.329007 with jid 20130919124844329007"; unfortunately i'm not sure what *problem* the message is telling me about
11:10 honestly that's not a problem
11:10 honestly unless you expected the function to not be running when you got it
11:11 malinoff left #salt
11:11 oz_akan_ joined #salt
11:11 ciss honestly: i assumed it was displayed in context to "data failed to compile:" (since there were no other messages). also related to this might be:
11:11 ciss [ERROR   ] An extra return was detected from minion *****, please verify the minion, this could be a replay attack
11:11 ciss i get this on each call
11:12 honestly sounds like something is very wrong with your setup
11:12 honestly what OS are you on?
11:12 ciss hold on a second, please ...
11:12 uta is there a good way of changing LD_LIBRARY_PATH from salt? Anything I do doesn't seem to work...
11:13 TheCodeAssassin joined #salt
11:13 ciss honestly: looks like i accidentally ran two minion processes
11:14 honestly ciss: ah, that would explain it
11:14 ciss yep
11:14 ciss thanks for taking the time to debug this
11:17 ciss ah, yes. installing the salt-minion package (on ubuntu 12.04) also registered a service. i was assuming i had to launch salt-minion manually (probably following the tutorial to tightly), and ended up with two processes
11:20 jslatts joined #salt
11:20 jhermann ciss, "launch" meaning exactly what?
11:21 ciss jhermann: calling "salt-minion —debug-level=debug" from the command line, as described
11:22 ciss at that point i was unaware of the service already running
11:23 jhermann yep, "too manual" to check lock files and the like, i guess
11:31 ciss jhermann: pardon?
11:38 bhosmer joined #salt
11:46 elsmorian joined #salt
11:58 jbunting joined #salt
12:00 jbunting joined #salt
12:01 blee joined #salt
12:08 mastrolinux joined #salt
12:11 mike25ro joined #salt
12:12 mike25ro hey guys ... one Q.... are the pillars available at any time?
12:12 krissaxton joined #salt
12:12 mike25ro meaning .. if i have a state and i run it like : salt 'myServer' state.sls myState .... and in my state i iterate through pillars .... should work?
12:18 joehh mike25ro: I think so - I often use them in .sls files if that is what you mean
12:18 joehh ?
12:19 mike25ro yeah... i just saw on a blog that a dude ... couldn't access data from a pillar in a state (which was run manually not through highstate... and i couldn't believe that)
12:19 mike25ro joehh: thanks
12:20 bhosmer_ joined #salt
12:20 sibsibsib joined #salt
12:23 adepasquale joined #salt
12:38 piffio joined #salt
12:52 faldridge joined #salt
12:54 mike25ro guys i was wondering ... how does salt manage its minions if a minion is on DHCP? i suppose the best solution would be to have a static dhcp based on mac, right?
12:54 mastrolinux salt should use the key
12:54 mastrolinux so the ip does not matter
12:55 mastrolinux you can change the ip as many times as you want as long as your key is the same as before
12:56 mastrolinux different topic, I am using module.run and the output is: Module function s3.get executed
12:57 mastrolinux but I do not have the output of the module itself
12:57 mastrolinux and it was indeed not properly executed
12:57 oz_akan_ joined #salt
12:57 jslatts joined #salt
12:58 hazzadous joined #salt
13:07 ipmb joined #salt
13:08 oz_akan_ joined #salt
13:08 adepasquale joined #salt
13:14 JoAkKiNeN joined #salt
13:15 mike25ro thanks mastrolinux
13:20 diegows joined #salt
13:22 juicer2 joined #salt
13:24 krissaxton1 joined #salt
13:30 toastedpenguin joined #salt
13:31 terminalmage joined #salt
13:31 shinylasers joined #salt
13:32 mapu joined #salt
13:34 mike25ro another Q ... and i promise i will stop for today
13:34 bhosmer_ joined #salt
13:35 mike25ro I was wondering if it is possible to chain masters ... or to have multiple masters for the same minions..... having in mind that .. one master will manage infrastructure (users bla bla ) and another master... where developers can connect and manage their applications... configs etc.
13:35 mike25ro is this ... smth that can be done.. OR is feasible?
13:39 piffio IIRC since salt 0.16 there is support for multi-master
13:39 piffio but I'm not sure whether you can have them handle different configs.. probably yes
13:39 jergerber joined #salt
13:40 piffio http://docs.saltstack.com/topics/tutorials/multimaster.html
13:41 jeddi joined #salt
13:41 jeddi left #salt
13:44 mgw joined #salt
13:45 nu7hatch joined #salt
13:46 StDiluted joined #salt
13:46 Ahlee mike25ro: yes, multimaster works that way.
13:47 uta hey guys, is there an obvious reason why using a runner with 'salt-run' on the master would work, whereas 'salt-call publish.runner' on the minion wouldn't?
13:48 Kholloway joined #salt
13:52 imaginarysteve joined #salt
13:53 imaginarysteve joined #salt
13:53 mike25ro Ahlee: thanks1
13:55 Thiggy joined #salt
13:56 jeff__ joined #salt
13:56 mech422 joined #salt
14:01 aat joined #salt
14:01 adepasquale joined #salt
14:06 nocturn My salt deploy on CentOS 6 keeps giving this error on state.highstate at random (but never clearing automatically): The function "state.highstate" is running as PID 6375 and was started at 2013, Sep 05 16:49:30.883503 with jid 20130905164930883503
14:06 nocturn I can go in and kill the process on that minion
14:07 nocturn but it randomly hits all my minions
14:09 mech422 nocturn: got a long running task in one of your states?  any other suspicious processes running when it happens ?
14:09 mgw joined #salt
14:09 nocturn mech422, no.  this one is hanning for 15 days by now
14:09 nocturn I have 2 salt installs, one on Ubuntu and one on CentOS with very similar state files
14:09 nocturn only CentOS is affected
14:10 nocturn mech422, killing the minion and rerunning state.highstate often finishes in seconds
14:10 krissaxton joined #salt
14:10 mech422 nocturn: ahh - can't help ya there - I'm debian/ubuntu only... sounds like it might be a centos problem ?
14:11 nocturn I think it's CentOS specific
14:11 mech422 sounds like it
14:11 nocturn or python on centos or something
14:11 andrewclegg wow, saltutil.sync_all is really slow, given that we only have a few KB of custom python modules, and ~20 servers
14:12 andrewclegg unless... <thinks aloud> ... it's waiting to hear an acknowledgement from minions that no longer exist
14:12 carlos_ joined #salt
14:13 mmilano joined #salt
14:15 mannyt joined #salt
14:17 namtab joined #salt
14:18 minaguib joined #salt
14:18 errr joined #salt
14:18 errr joined #salt
14:18 johnsocp joined #salt
14:18 Ryan_Lane joined #salt
14:18 cro joined #salt
14:20 ermolenkot joined #salt
14:20 twiedenbein joined #salt
14:21 adepasquale1 joined #salt
14:21 mohae joined #salt
14:21 mnemonikk joined #salt
14:22 JaredR joined #salt
14:26 [diecast] joined #salt
14:27 whyzgeek joined #salt
14:28 maveas joined #salt
14:28 Ryan_Lane joined #salt
14:28 aat left #salt
14:29 teskew joined #salt
14:31 dml_ joined #salt
14:35 jeff__ joined #salt
14:36 carlos joined #salt
14:38 alunduil joined #salt
14:38 SoR left #salt
14:39 mike25ro left #salt
14:39 SoR joined #salt
14:40 carlos__ joined #salt
14:40 andrewclegg nope, even if you trim out defunct nodes, saltutil.sync_all is hella slow
14:43 cdsrv joined #salt
14:45 Ahlee number of servers sholdn't matter
14:45 Ahlee but the fileserver leaves much to be desired.
14:46 Ahlee running time salt '*' saltutil.sync_modules to copy two files across 400 nodes now andrewclegg, will share results
14:47 Ahlee previously i've just been targeting them individually so this should be an interesting test
14:48 andrewclegg ok, thanks. about the only issue I have with salt is that it seems inexplicably slow sometimes, never sure whether that's a result of our specific environment or a common problem
14:48 Ahlee nocturn: I also see that infrequently. cent5/cent6 only
14:48 jalbretsen joined #salt
14:49 nocturn Ahlee, It's very frequent for me, I filed an issue on github https://github.com/saltstack/salt/issues/7347
14:49 emocakes joined #salt
14:51 robertkeizer joined #salt
14:51 mgw joined #salt
14:52 andrewclegg Ahlee: do you see really high cpu usage on the master when a sync is running? I've got 4 cores at 100%
14:52 ipmb any tips on debugging custom returners?
14:56 ipmb I'm not getting any output from print or logging statements in the returner
14:59 adepasquale joined #salt
14:59 m_george|away joined #salt
15:01 Gifflen joined #salt
15:06 StDiluted joined #salt
15:07 pdayton1 joined #salt
15:08 UtahDave joined #salt
15:08 StDiluted andrewclegg: yeah I've noticed that as well
15:08 StDiluted hey UtahDave
15:09 andrewclegg StDiluted: it could be this https://github.com/saltstack/salt/issues/4985
15:09 UtahDave hey, StDiluted!
15:09 andrewclegg my version of salt is quite far out of date
15:09 andrewclegg need to do an upgrade...
15:10 ipmb hmm, my custom returner doesn't seem to be called at all
15:11 forrest joined #salt
15:11 ipmb It gets imported because I get an error if I put 1/0 in it I see the crash
15:11 ipmb but if I move 1/0 into my returner function I don't get an error
15:12 StDiluted andrewclegg: I have noticed similar and I am up to date
15:12 andrewclegg hmm, maybe not then...
15:12 alunduil joined #salt
15:12 ipmb am I doing something wrong here? https://dpaste.de/03oPd/
15:13 jbunting joined #salt
15:14 ccase joined #salt
15:14 avienu joined #salt
15:15 Thiggy joined #salt
15:19 fredvd joined #salt
15:19 Gifflen joined #salt
15:23 nu7hatch joined #salt
15:28 faldridge joined #salt
15:28 havan joined #salt
15:31 Ahlee andrewclegg: real    4m20.603s
15:32 andrewclegg Ahlee: that's not bad, maybe it will improve when I upgrade salt. have set a todo
15:32 Ahlee andrewclegg: and yes, i see extremely high cpu utilization
15:33 andrewclegg that's the bit that worries me -- it's going to make the master a scalability bottleneck
15:33 Ahlee four cores, most time being spent in kernel
15:33 cedwards ipmb: i hope you get that figured out. i'm interested in seeing support for that.
15:33 BadLuck joined #salt
15:33 ipmb got it
15:33 Ahlee andrewclegg: multi-master is the cop out answer to that
15:33 ipmb had a bad key, but the error wasn't surfacing anywhere
15:33 Ahlee running it again, the job went into the bakcground this time
15:33 Ahlee i can see it still cranking away
15:34 ipmb cedwards: this works https://dpaste.de/i0NwQ/
15:34 justin-real joined #salt
15:34 ipmb need to add in the ability to exclude stuff and have things sent as counters instead of gauges
15:37 higgs001 joined #salt
15:39 JaredR joined #salt
15:40 danielbachhuber joined #salt
15:40 BadLuck Hi. I think I don't understand correctly the watch/wait. I want to unzip a file only if the file changed. I do this "myfile.7z  \n  cmd: \n  -wait  \n  file: \n - managed \n - source: {{somewhere}}" and this "7z myfile.7z  \n  cmd.run: \n -watch : \n - cmd: myfile.7z \n - require: \n - file.managed: myfile.7z".  (sorry about \n) Any ideas what I'm doing wrong? salt tell me the file in in correct state, but unzip anywait. thanks
15:42 cedwards BadLuck: might be easier if you pastebin the actual state. :)
15:42 BadLuck Can i copy paste here?
15:43 talso pastebin..
15:44 BadLuck I will search about pastebin
15:44 copelco joined #salt
15:44 cedwards BadLuck: pastebin.com, dpaste.com, dpaste.de,.. there are plenty
15:44 BadLuck too bad "Access to this site has been denied for security reasons"
15:44 BadLuck I don't have acces to this web site
15:45 Gifflen joined #salt
15:47 jacksontj joined #salt
15:48 faldridge joined #salt
15:50 mr_chris So why your Jinja templates start getting crazy long and complicated, is there a way to drop down to straight python to generate sls data based on pillars?
15:50 mr_chris *So when
15:51 pipps1 joined #salt
15:53 devinus joined #salt
15:53 NotreDev joined #salt
15:53 cdsrv joined #salt
15:53 shinylasers joined #salt
15:54 Ryan_Lane joined #salt
15:55 redondos joined #salt
15:56 pipps1 joined #salt
15:56 sssslang_ joined #salt
15:57 StDiluted mr_chris: i wrote an external pillar to handle that
15:58 JaredR joined #salt
15:59 StDiluted it takes tags from aws and determines what pillar values to return for that particular minion
15:59 m_george left #salt
16:00 Lue_4911 joined #salt
16:00 forrest_ joined #salt
16:00 adepasquale joined #salt
16:01 cedwards BadLuck: does this help at all? http://intothesaltmine.org/blog/html/2013/03/01/using_the_cmd_module_in_salt_states.html
16:01 JaredR joined #salt
16:02 jkleckner joined #salt
16:02 shinylasers joined #salt
16:02 SunSparc joined #salt
16:03 higgs001 joined #salt
16:03 JaredR joined #salt
16:06 JaredR joined #salt
16:06 jpeach joined #salt
16:07 shinylasers joined #salt
16:07 QauntumRiff joined #salt
16:07 jkleckner joined #salt
16:07 mgw joined #salt
16:08 QauntumRiff I have a directory permissions issue. http://pastebin.com/cS5KWfCS  The top part is my sls file, where I want to chmod 2775 the directory (recursively) but the bottom is an ls -la, you can see that the group is not getting write
16:08 QauntumRiff is something wrong with my syntax?
16:08 JaredR joined #salt
16:09 Thiggy Has anyone put together a bash tab-completion script for salt {module}.{function}s yet?
16:10 cedwards Thiggy: not that i've heard of
16:10 nu7hatch joined #salt
16:10 forrest joined #salt
16:11 JaredR joined #salt
16:12 Thiggy Oh! Oh ho! https://github.com/saltstack/salt/blob/develop/pkg/salt.bash , https://github.com/saltstack/salt/pull/1802
16:12 QauntumRiff hmm, I don't have a leading zero, but I wonder if this could be part of my problem:
16:12 QauntumRiff Warning
16:12 QauntumRiff When using a mode that includes a leading zero you must wrap the value in single quotes. If the value is not wrapped in quotes it will be read by YAML as an integer and evaluated as an octal.
16:13 QauntumRiff might not like 2775 as a permission?
16:13 Thiggy @cedwards not only does it exist, but it was already installed on my system. #derp
16:14 Thiggy @cedwards I had just never tried. It totally works. It's slow though, and it doesn't suppress logging output so it's pretty noisy.
16:14 cedwards Thiggy: I'm surprised I'd never heard of it. I maintain packages and that would be a nice addition.
16:14 JaredR joined #salt
16:16 forrest QauntumRiff, try wrapping that value in quotes
16:16 Thiggy I got so excited about salt bash completion I forgot what I was working on...
16:16 forrest I actually wrote that documentation
16:16 JaredR joined #salt
16:17 forrest technically it should only be caught as an octal when there is a leading zero with YAML according to their docs.
16:17 Ahlee salt.states.file.absent(name) - I'm assuming this means absent doesn't work on multiple items, so if i know i want to remove /opt/foo, /opt/bar, and /opt/baz i can't just specify those three under same definition?
16:18 jcockhren I think 0.17.0 is going to be AWESOME
16:18 zulumojo joined #salt
16:19 QauntumRiff forrest: I am not seeing it make a difference wrapping in single quotes
16:19 QauntumRiff group still does not have write
16:19 forrest ok cool, you shouldn't.
16:19 jcockhren UtahDave: How much time do I have to close some more issues before the next release?
16:20 QauntumRiff forrest: I'll try explicity setting dir_mode and file_mode I guess
16:21 forrest yea give it a shot, can you repaste your sls if that doesn't work? Was dropped out of IRC.
16:21 QauntumRiff forrest: <headslap> i was setting 'dir_mod' not "dir_mode"
16:21 QauntumRiff :)
16:21 Thiggy when I run salt foo system.shutdown, it returns "shutdown: time expected" BUT the documentation doesn't show any arguments for system.shutdown: http://docs.saltstack.com/ref/modules/all/salt.modules.system.html#module-salt.modules.system
16:21 forrest lol
16:22 zulumojo left #salt
16:22 JaredR joined #salt
16:24 shinylasers joined #salt
16:25 shinylasers joined #salt
16:27 Brew joined #salt
16:27 UtahDave jcockhren: the 0.17 RC is about to be cut and released.
16:27 mmilano joined #salt
16:28 jcockhren O_O
16:28 jcockhren let me hurry then
16:28 UtahDave ok. what are you working on, jcockhren?
16:28 vedant joined #salt
16:29 jcockhren https://github.com/saltstack/salt/issues/7287 and saltcloudmod
16:29 jcockhren and maybe a few low hanging issues I can find
16:30 jcockhren don't wait for me though
16:30 UtahDave ah, cool.
16:30 jcockhren I just need to be faster
16:30 UtahDave you rock, jcockhren!
16:30 vedant hi everyone
16:30 MatthewT1 joined #salt
16:30 vedant I'm having trouble wrapping my head around how to format SLS files. I want to create the file /var/file.log exists and put "row1" and "row2" as its contents, but I don't know how to combine "file.touch" and "file.append" to accomplish that
16:31 Brew1 joined #salt
16:31 vedant oops, s/create/ensure
16:31 forrest vedant, why don't you use file.managed?
16:32 forrest if it will only have 'row1', and 'row2' as the contents
16:33 vedant my understanding was that file.managed requires a source, and i'd prefer not to have a source file stored somewhere
16:33 forrest yep that's true.
16:33 UtahDave vedant: I think you can specify the contents using file.managed now
16:34 claudep joined #salt
16:34 forrest oh you're totally right UtahDave
16:34 UtahDave vedant: yeah: http://docs.saltstack.com/ref/states/all/salt.states.file.html?highlight=file.managed#salt.states.file.managed
16:34 forrest contents
16:34 forrest Default is None. If specified, will use the given string as the contents of the file. Should not be used in conjunction with a source file of any kind. Ignores hashes and does not use a templating engine.
16:34 vedant excellent, let me try that
16:35 Katafalkas joined #salt
16:36 MatthewT1 I'm trying to right a module, but I keep getting "modulename" is not available when I try to run it from the terminal - what's the first thing I should double check?
16:36 MatthewT1 write*
16:37 Katafalkas joined #salt
16:37 bemehow joined #salt
16:37 MatthewT1 Its in _modules, and I'm just running "salt 'hostname' modulename"
16:38 UtahDave MatthewT1:  did you run   salt \* saltutil.sync_all
16:38 krissaxton joined #salt
16:40 claudep can anyone tell me why I always have 6 salt-master processes even with "worker_threads: 2"?
16:43 mastrolinux left #salt
16:44 cyp joined #salt
16:45 vedant @forrest, @UtahDave: the contents argument to file.managed works, thank you! Do you know how to give it a multiline value?
16:45 vedant putting "\n" in the string didn't work, and im having trouble figuring it out from the source, because i can't find where in the source tree the code for file.managed is
16:45 forrest can you try \\n vedant?
16:46 mech422 vedant: should be in states/file.py
16:46 vedant forrest: I'll try that
16:46 mech422 vedant: I think a bare 'return' will work as long as the string isn't quoted ??
16:46 vedant mech422: i'm there, it's just that the last line of managed actually calls  __salt__['file.manage_file'], and i have no idea where that is
16:46 mech422 vedant: but then you can't have a ":" in the text or it screws up the yaml parser
16:47 mech422 vedant: salt/fileclient.py
16:47 mech422 vedant: its a twisty lil maze of dynamic dispatch :-)
16:49 vedant twisty indeed.  forrest: "\\n" actually doesnt work
16:49 forrest bummer
16:50 carmony in the salt documentation, I'll see things like an .. automodule:: salt.states.file
16:50 carmony so does it just generate based off of the module docs?
16:50 mech422 vedant: try "content: | this \n is \n a multi-line\n string"
16:50 mech422 vedant: according to yaml, '|' should force it to preserve line breaks
16:50 vedant what does pipe do?
16:50 vedant ah
16:51 forrest ahh was just gonna suggest that mech422 :D
16:51 mech422 but the pipe comes firs, is which is counter-intuative...
16:51 forrest the doc links on sourceforge weren't working
16:51 * mech422 hates YAML
16:51 berto- joined #salt
16:51 mech422 forrest: great minds think alike :-D
16:51 forrest Let's not go too far here, I was just googling!
16:52 vedant beautiful!!
16:52 vedant that worked!
16:53 vedant nb: the newlines need to be actual newlines in the sls file
16:53 vedant which is obvious in retrospect
16:53 forrest so just \n ?
16:53 forrest or actually a new line
16:53 vedant just an actual new line
16:53 forrest indented 4 spaces or whatever
16:54 vedant everything after | is preserved, one indent level past the indent level of "contents:"
16:54 vedant so
16:54 forrest yea makes sense
16:54 mech422 oh yeah - I just used '\n' so it would show up right in irc
16:54 forrest I'll try to put up an example tonight when I get home
16:54 vedant right
16:55 Thiggy so if I use the bootstrapper to install from git, do I use the bootstrapper again to upgrade versions? The version upgrade story is something I've never been clear on
16:55 vedant i couldn't find the function that's supposed to be at __salt__['file.manage_file'] in salt/fileclient
16:55 jacksontj joined #salt
16:56 forrest Thiggy, yea you can just run the bootstrap again and it will pull in all the new content
16:56 Thiggy @forrest thanks
16:56 mech422 vedant: my bad - what lvl are we on ? states/file.py uses modules/file.py...
16:56 forrest though I don't know about the master/minion conf...
16:57 forrest might be safe to back that up first, and then report back on the reuslts
16:57 forrest *results
16:57 mech422 vedant: which then calls into 'cp.cache_file' and friends
16:57 forrest Thiggy, I have an example up now on the bootstrap page that shows you how to pull in a specific tag version if you need to do that.
16:58 Thiggy I have that as well
16:58 MatthewT1 @UtahDave: doing that made it sync but I'm still havving issues running the module http://pastebin.com/sWUA2kiN
16:58 Thiggy @forrest I had to hang back on 16.0 for a while because of that nfs mount bug
16:58 forrest Thiggy, gotcha
16:58 Thiggy @forrest thank you though
16:58 forrest yea np
16:58 vedant @mech422: beautiful, found it
16:58 forrest let me know about the master conf if you don't mind
16:58 forrest I'm not sure what will happen there when you pull from git
16:58 forrest everything else should be fine though
16:59 anteaya joined #salt
16:59 UtahDave MatthewT1: is your module stacktracing, by chance?
16:59 UtahDave hey, anteaya!
16:59 KyleG joined #salt
16:59 KyleG joined #salt
16:59 anteaya UtahDave: hey there
17:00 MatthewT1 I don't think it is, its just pulling something from the pillar
17:01 carmony UtahDave: would you like individual PRs for small doc changes, or would 1 PR with a few in them be alright?
17:02 pipps joined #salt
17:03 UtahDave carmony: generally we want pull reqs that aren't so huge that it takes 3 weeks to look over everything.   :)
17:03 UtahDave carmony: Sending 100 small pull reqs is painful, too
17:04 UtahDave MatthewT1: what version of Salt are you on?  I remember there being a bug where you had to run   saltutil.sync_all twice before the module was actually available.
17:04 carmony lol, I'll do reasonable chunks :)
17:04 UtahDave carmony: cool. Thanks!
17:06 kaptk2 joined #salt
17:07 * whiteinge waves at robertkeizer
17:11 carmony hrm, UtahDave, when I try to add the .. versionadded: 0.17 to http://docs.saltstack.com/ref/cli/salt.html it doesn't show up after I build it
17:11 Thiggy I'm using file.recurse to populate my saltmasters runners with clean: True, will the disappearing .pyc files cause a problem or should I create an exception for those?
17:11 nu7hatch joined #salt
17:11 carmony http://paste2.org/yZZAGWjD -- line 50
17:14 Brew joined #salt
17:14 Ryan_Lane joined #salt
17:14 kolaman joined #salt
17:15 kolaman hi all, I am new to saltstack. I just prepared my salt-master and now want to install salt-minion on ubuntu is there any stable package of salt-minion available for ubuntu 12.04 ?
17:15 kolaman I can only see latest not the stable releases for salt minion (using ppa for ubuntu)
17:15 whiteinge carmony: the docs on saltstack.org aren't built as often as on RTD
17:15 Gifflen joined #salt
17:16 carmony whiteinge: yeah, I'm building them locally
17:16 carmony and it doesn't show up, but was just referecing the doc I was working on
17:17 CheKoLyN joined #salt
17:17 whiteinge oh
17:18 whiteinge carmony: you need two colons
17:18 whiteinge .. versionadded:: 0.17
17:18 carmony whiteinge: ... yeah, you're right. Thanks :P
17:18 ipmb Hey guys, I've got an interesting idea that I know salt can do, but I need some help wrapping my head around it :)
17:18 ipmb I'm using it to collect metrics and want to use the salt scheduler
17:19 ipmb but I want to run different functions on different minions and don't want to have to define them in each minion config
17:19 cedwards kolaman: i don't know that there is a stable vs latest release in the PPA..
17:19 fragamus joined #salt
17:20 mech422 ipmb: put them in pillar ?
17:20 kolaman cedwards: actually ppa are only for latest release but as I'll be moving this to prod. soon so I need some stable release on client side
17:20 cedwards ipmb: you should be able to setup the scheduler centrally in pillar and then target appropriately
17:20 ipmb so I'm thinking of building a custom module which reads data from the pillars to build the function list and run them all
17:20 ipmb where do I do the targeting cedwards?
17:20 ipmb I *think* I need to build a custom module, but that's where I'm unsure
17:21 cedwards ipmb: in the pillar top.sls
17:21 ipmb yes, I got that
17:21 forrest kolaman, I know that 0.16.3 is available from the PPA.
17:21 ipmb so now I have a list of functions that needs to run on the minion
17:22 kolaman forrest: can you please share that PPA
17:22 ipmb do I write a custom module to read and run those?
17:22 hvn joined #salt
17:22 forrest http://docs.saltstack.com/topics/installation/ubuntu.html
17:22 forrest should just be able to use that PPA kolaman
17:22 ipmb …and then schedule that custom module
17:22 cedwards ipmb: i assume you're using the built-in scheduler to run your functions?
17:23 CheKoLyN joined #salt
17:23 ipmb I would like to, yes
17:23 carmony PR issued
17:24 KyleG left #salt
17:24 cedwards ipmb: in my mind you should be able to use the built-in scheduler and pillar to define all your checks and just tell them to use your returner
17:24 cedwards ipmb: the only extra/new piece of this puzzle is your new returner
17:25 ipmb by default, the scheduler won't run against other minions though will it?
17:25 ipmb If I define it on the master, it will only run functions on the master?
17:25 kolaman forrest: that PPA provides 0.16.4
17:25 cedwards ipmb: if you define it in pillar and target it to minions it should run on them
17:25 forrest oh cool, someone must have built the latest stable
17:25 cedwards ipmb: http://docs.saltstack.com/topics/jobs/schedule.html#scheduler-with-returner
17:25 * robertkeizer waves at whiteinge .. didn't see that until now. Time to get some food.
17:26 ipmb cedwards: I'm on that page
17:26 ipmb where is the targeting?
17:26 ipmb that's the piece I'm missing :)
17:26 ipmb or one of them :P
17:26 cedwards ipmb: toss something like that into meminfo.sls (or whatever) and in /srv/pillar/top.sls target that sls to your minions
17:27 ipmb ohhhh
17:27 ipmb I thought this lived in /etc/salt/master
17:27 GoKage joined #salt
17:27 cedwards ipmb: like base: \n '*': \n - meminfo.sls
17:27 cedwards that'd target that pillar schedule definition to all hosts in base env
17:27 * ipmb facepalm
17:27 ipmb "schedule option to the minion config file or to the minion's pillar."
17:27 ipmb ok, that makes a lot more sense
17:28 ipmb then next question… if I want to run 15 functions at a 5 minute interval, is there going to be overhead incurred by defining each one separately?
17:29 mapu joined #salt
17:29 carmony UtahDave: here is the PR if you want https://github.com/saltstack/salt/pull/7348
17:30 KyleG1 joined #salt
17:31 offby1 joined #salt
17:31 cedwards ipmb: i don't know that i have an answer for that
17:33 whyzgeek I have been trying to simplify assigining roles and environments to hosts using pillars. However, it proved to be very difficault with current design of salt. It is assumed that this job should be done via grains. However, I want to centerally manage them and change them without minion restart. So grains are not usable for me. Any other suggestions?
17:33 whyzgeek It would be ideal if I could assign some key, value right at pillar top file.
17:34 whyzgeek Now I resort to some redundant repetion because of this
17:36 JaredR joined #salt
17:36 mattbarto joined #salt
17:38 aboe joined #salt
17:39 jalbretsen joined #salt
17:39 mech422 anyone using mako templates ?
17:39 alunduil joined #salt
17:40 bemehow_ joined #salt
17:40 tuxIO joined #salt
17:41 alunduil joined #salt
17:42 JaredR joined #salt
17:44 JaredR joined #salt
17:44 ipmb Is there something I need to do after defining "schedule" in the pillar?
17:46 cedwards ipmb: I heard in here yesterday that you need to "salt '*' config.merge schedule"
17:46 cedwards but I'm not 100%. I still can't get my pillar-defined schedule to work as expected
17:46 ipmb hmm, yeah, it didn't show up
17:47 cedwards didn't show up in..?
17:47 cedwards my schedule shows up in my pillar.data, but doesn't seem to actually run
17:47 opapo_ joined #salt
17:49 ipmb ah, i've got another bug
17:50 alunduil joined #salt
17:53 JaredR joined #salt
17:53 krissaxton joined #salt
17:54 berto- joined #salt
17:54 piffio I have a doubt about gifts for states and top.sls
17:54 piffio imagine I have top.sls in every branch ('base', 'qa', 'prod')
17:55 piffio which one is taken into account when I run a highstate on a speficif machine (bound to a specific environment)?
17:55 piffio or are we supposed to only have the top.sls in the base branch?
17:55 JaredR joined #salt
17:55 mohae Hi, I'm trying to add a Percona repo but I get an aptsources.sourceslist python module not found when running it on Wheezy. It install properly on Precise. Here is the state file excerpt and the output http://pastebin.com/cT2uArxq
17:57 kula joined #salt
17:58 ipmb ok cedwards I think I'm in the same place you are now (schedule defined in pillar and not running)
17:58 ipmb are you still working on it or did you give up?
17:58 mohae anybody else have problems adding a repo in Wheezy, or has an example of sucessfully adding one?
17:58 JaredR joined #salt
17:58 micah_chatt joined #salt
17:58 ipmb config.merge schedule shows it
17:59 mech422 mohae: try adding a space before the closing '%}' on your set repo_name
17:59 cedwards i was just working on it yesterday and really haven't looked at it again yet this morning
17:59 jcockhren mohae: there's a bug that forces one to create a repo sources file
17:59 MatthewT1 Is there a way to see what modules a minion has available to it?
18:00 jcockhren even on precise
18:00 mohae mech422 d'oh! How'd I miss that
18:00 mech422 mohae: many eyes, shallow bugs, etc etc
18:00 mohae jcockhren, I haven't had a problem with creating a sources file in either yet...
18:00 JaredR joined #salt
18:01 jcockhren mohae: word?!?!
18:01 mohae mech422 well...it didn't fix it
18:02 mohae looking at the code, I'm trying to figure out why the apt_support is being set to False here, or not set to True
18:02 piffio I guess I'll just try nuking the top.sls from the 'qa' branch and see what's going to break
18:02 mech422 mohae: ahh well - it was worth a shot
18:02 pdayton joined #salt
18:02 mech422 mohae: my current 'chain of blame' goes yaml->jinja -> my stupidity -> bug :-P
18:03 krissaxton joined #salt
18:03 ipmb cedwards: any chance you had your schedule for less than 60 seconds?
18:03 mohae well mine usually starts with me...I'm just trying to figure out if it is a bug. I'm still leaning towards the problem being between the keyboard and chair
18:03 JaredR joined #salt
18:03 cedwards ipmb: 5 min..
18:04 druonysuse joined #salt
18:04 ipmb mine started working when I changed the interval fwiw
18:04 mech422 mohae: my usually starts with me... but yaml worked its way up to top spot :-P
18:05 justin-real joined #salt
18:05 mohae mech422: ya, I had been trying my best to avoid YAML, but like some other things that I've been trying to avoid, it seems to be impossible
18:05 mech422 mohae: yep - same here... '-item: foo' vs '- item: foo' always gets me
18:06 JaredR joined #salt
18:06 cedwards ipmb: let me tinker with mine a bit..
18:06 cedwards ipmb: what type of checks are you running?
18:06 mohae mech422: but for the most part, Salt has been very beneficial to my sanity.
18:06 ipmb cedwards: https://dpaste.de/kazkB/
18:08 JaredR joined #salt
18:08 jcockhren mohae: nm. the bug has been resolved (a while ago)
18:10 ipmb hmm, returners don't have access to args/kwargs?
18:10 Ahlee Too many functions declared in state "file" in sls ptp
18:11 JaredR joined #salt
18:11 mohae jcockhren: thanks, I thought I had seen an old bug relating to repos. I'm just trying to figure out where/why the apt_support flag is being set to False. Looks like an import error from the sourceslist does it...so more digging
18:12 Ahlee http://pastebin.com/CEfE4MXs
18:13 Thiggy joined #salt
18:13 JaredR joined #salt
18:14 Ahlee idealy, i want the daemon to restart if any file finds its way into /opt/ptpd (this is a contrieved example using ptp in place of the real service)
18:15 jcockhren anyone going to: http://devopsdays.org/events/2013-atlanta/ ?
18:16 piffio ok, it looks like top.sls is needed in every branch
18:16 JaredR joined #salt
18:19 JaredR joined #salt
18:20 Ahlee oh damnit. was missing - source
18:20 Ahlee I really, truly hate YAML.
18:21 cedwards UtahDave: any idea why I'd only get return data for specific functions? Still not seeing anything for status.*, test.ping, etc.
18:21 JaredR joined #salt
18:22 mech422 mohae: looks like you need the 'python-apt' package
18:23 mohae mech422: hmm, that makes sense. I'll try that.
18:24 mech422 mohae: it tries to import and sets apt_support to False on error
18:24 Thiggy Any protips for having a runner and a module share code?
18:25 mohae mech422: yes, that was what I was seeing in the code. I was trying to figure out what would cause the import to fail
18:26 ml_1 joined #salt
18:27 KyleG1 left #salt
18:27 mech422 mohae: yeah - that package isn't installed by default
18:27 mech422 so the import fails
18:28 cedwards ipmb: i've been changing up the commands i'm running and the schedule, and i don't see any change in pillar.data for my schedule.
18:28 claudep left #salt
18:28 ipmb sudo salt-call saltutil.refresh_pillar
18:30 piffio I'm seeing a weird behavior here with gitfs for salt states
18:30 seanz Dumb question for the crowd: Is there a way to run salt '*' state.highstate on the master such that I'll see all the streaming output from the minion(s) as the commands are executed?
18:30 piffio I don't have a master branch, HEAD is the 'base' branch, and I only have 1 other branch called 'qa'
18:30 piffio still, this is what I get in the master (after cleaning up the whole cache)
18:31 sfello joined #salt
18:31 cedwards ipmb: I just get 'None' returned when I run that
18:31 piffio http://pastebin.com/A0HTRF2u
18:31 ipmb yep, that's expected
18:32 ipmb if you run pillar.get schedule, you should see the new info
18:33 piffio and of course there is nothing in the master ref
18:33 cedwards ..and one of my schedules is still not showing up.
18:33 piffio is gitfs expecting a 'master' branch and a 'base' branch?
18:33 jcockhren piffio: my understanding is that 'master' branches are mapped to the 'base' environment
18:33 ipmb cedwards: are you defining them in multiple files?
18:33 jcockhren seanz: use the "-l debug" flag
18:34 cedwards ipmb: yes
18:34 piffio my understanding is that I still don't understand it :)
18:34 seanz jcockhren: Ah, thanks!
18:34 jcockhren lol
18:34 ipmb cedwards: they're probably overwriting each other
18:34 seanz jcockhren: I'm guessing that all of that output is not generally desires, since it's been relegated to a debug status.
18:34 piffio once I'll get this straight I'll try to submit a documentation update
18:34 piffio since the current doc on gitfs is pretty thin
18:34 ipmb I don't know if there's a simple way to extend a dictionary defined in a different pillar
18:34 piffio lunch for now, bbl
18:34 ipmb iirc, there's an open issue for it
18:35 jcockhren seanz: there's other flags too
18:35 jcockhren seanz: all, warnings, etc
18:35 jcockhren not "etc" literally
18:35 seanz jcockhren: Also, where would I use that command? I tried on state.highstate and got the error "no such option: -l"
18:36 jcockhren did i just confuse myself?
18:36 jcockhren :/
18:36 jcockhren you can use that flag in salt-cloud and running the daemon
18:37 jcockhren (salt-master daemon, from the cli)
18:38 jcockhren salt-master -l debug. good enough for me for testing
18:38 jcockhren hmmm
18:39 jcockhren I think the flag effects the contents of /var/log/salt
18:39 jcockhren /var/log/salt/master to be precise
18:40 jcockhren so a "salt-master -l all &"
18:40 jcockhren could be followed by a: "tail -f /var/log/salt/master"
18:41 jcockhren to watch the logs
18:41 jcockhren sudo as needed
18:42 seanz jcockhren: Ah. So no direct way to just see all that output when running a command?
18:42 matanya joined #salt
18:43 cetex I'm slightly annoyed by the missing ability to log what commands are run on the salt-master.
18:43 mohae mech422: thanks for your help!
18:44 jcockhren cetex: yeah.
18:44 seanz jcockhren: Thanks for the help. I'll get used to the options. :)
18:44 cetex we'd like to log the commands that are run, without removing any other functionality, so we can push it to our event notification system so people know who did what, and when, if things break..
18:44 UtahDave MatthewT1: salt 'minionname' sys.doc
18:44 MatthewT1 Thanks!
18:45 Brew1 joined #salt
18:45 ipmb cetex: a custom returner won't work for you?
18:46 cetex I've looked at it and setup a simple syslog returner, but it is launched on all minions that runs the command, and so logs a couple of lines (2?) from each minion.
18:46 jcockhren yeah, I think it'll be great to set the log level with the startup script
18:46 UtahDave seanz: there's not really a way to see the stream of the minion's salt executions from the master yet.
18:47 UtahDave But we're getting there.  0.17.0 has a whole bunch of improvements to Salt's event subsystem, which will allow for following the minion's output like that
18:47 seanz UtahDave: Ah, thanks. Good to know I'm not the only one who might want that feature. :)
18:48 UtahDave seanz: yeah, it's come up quite a bit, but until the event system started getting fleshed out it wasn't easy to do.
18:48 UtahDave It will be awesome once it's all finished
18:48 seanz UtahDave: salt is already awesome. :) That will just increase its awesomeness.
18:49 UtahDave :)
18:49 seanz "Awesome-ality", as I like to never say.
18:49 UtahDave lol
18:49 Ahlee http://pastebin.com/yZYVHBhU - I'd expect if i put a new file in ptp/files/ on the master, when that file gets pushed to the minion, it would execute service PTPSlv restart given i'm watching anything under /opt/ptpd/*, yet the daemon isn't restarting.  Am I missing something?
18:50 micah_chatt would anyone have any interest in a django/orm pillar? Maybe something like this https://gist.github.com/micahhausler/6627970
18:50 Ahlee Based the watch: off https://github.com/saltstack/salt/issues/663
18:50 xinkeT joined #salt
18:51 jcockhren micah_chatt: me me me
18:51 jcockhren o/
18:52 micah_chatt I thought it up last night and have been thinking about it all day
18:52 jcockhren there's also:
18:52 jcockhren https://github.com/terminalmage/djangocon2013-sls/blob/master/pillar.example
18:52 micah_chatt didn't see that one
18:53 UtahDave Ahlee: Ah, ok.
18:53 micah_chatt very nice, even if it is mysql ;)
18:53 UtahDave Ahlee: So here's where your sls is falling down.  When you "watch" something, you're watching the ID declaration or Name of the item. Not the actual directory on the filesystem or anything
18:53 UtahDave Ahlee: So for your watch you need:     - file: /opt/ptpd
18:54 Ahlee and that will get anything recursively under that directory?
18:55 littleidea joined #salt
18:55 Ahlee trying it out. thanks.
18:55 UtahDave Ahlee: yep!
18:55 micah_chatt jcockhren: yea, this would be for getting data OUT of the database and into pillars
18:55 littleidea joined #salt
18:55 micah_chatt similar to the mongo pillar
18:56 Ahlee UtahDave: so effectively the formatting has changed since issue 663?
18:56 jcockhren did I misunderstand? micah_chatt
18:56 micah_chatt maybe I misunderstand
18:57 Ahlee UtahDave: is there a flag to immediately invalidate gitfs?
18:57 Ahlee cache time seems to be between 5 and 10 seconds
18:57 UtahDave Ahlee: I don't think there is
18:58 micah_chatt jcockhren:  say I'm a SaaS provider, and have multiple clients and store information about my clients in a django project/db
18:58 Ahlee UtahDave: ok. Thanks.
18:58 micah_chatt jcockhren: I want to render pillar data from my database into pillars
18:59 UtahDave micah_chatt: are you making an external pillar for that?
18:59 micah_chatt UtahDave: I'm thinking about it,
18:59 havan joined #salt
19:00 UtahDave micah_chatt: If you're getting external data to put into pillar, then it really should be an external pillar.
19:00 micah_chatt right
19:00 UtahDave building external pillars are really easy. kula wrote some fantastic documentation on that.
19:00 jcockhren micah_chatt: so what are you backing those pillars with?
19:00 Ahlee UtahDave: That did restart the daemon as expectd. Thank you.
19:00 micah_chatt Salt has been great, but I'm generating a lot of AWS key pairs dynamically
19:00 UtahDave Ahlee: you're welcome!
19:01 micah_chatt and storing them in a django DB
19:02 whiteinge whyzgeek: pillar is definitely the way to go. sorry we didn't finish our conversation from yesterday. can you pastebin what you have so far? i might have some more specific suggestions if i can see how you've got things organized
19:02 jcockhren micah_chatt: oh using the django ORM?
19:02 micah_chatt UtahDave: jcockhren: so I'm thinking of writing an ext_pillar to access the django project on my salt master and read the data using the django ORM
19:02 micah_chatt correct
19:02 jcockhren ooooh
19:02 micah_chatt instead of figuring out the SQL
19:02 jcockhren hmm
19:03 micah_chatt thoughts?
19:04 UtahDave that would be fine, micah_chatt.  Just make sure to document well that the django ORM is a required dep
19:04 krissaxton joined #salt
19:05 StDiluted to do partial matching of a grain in a top.sls file, could I do 'ec2_vpc-id:vpc-*':\n - match: grain
19:05 StDiluted so that it only matches if the minion has a vpc-id?
19:05 micah_chatt UtahDave: right. I usually have a virtualenv per django project, so the venv location would be in the master config. The assumption is that django and any other dependencies for the project would be installed there
19:06 hazzadous joined #salt
19:07 micah_chatt UtahDave: jcockhren: I can't keep up writing out newly created/updated/revoked credentials to my pillar .yml files, and so I need a way to dynamically look up that information
19:07 UtahDave StDiluted: yep!
19:07 StDiluted micah_chatt: write an external pillar that looks it up and returns
19:07 tuxIO joined #salt
19:07 StDiluted thanks UtahDave
19:08 Gifflen joined #salt
19:08 micah_chatt StDiluted: thats what I've been discussing
19:08 micah_chatt is there a way that problem has traditionally been handled?
19:08 micah_chatt using mongo?
19:08 UtahDave micah_chatt: that should work fine
19:08 jcockhren micah_chatt: does it have to call the django views directly?
19:09 micah_chatt jcockhren:  I'm assuming that its model data, not view generated data.
19:09 jcockhren micah_chatt: so basically interpreting the QuerySets itself?
19:09 jcockhren hmmm
19:09 micah_chatt yea, really simple. Just model fields
19:10 micah_chatt it could certainly expand
19:10 micah_chatt but an initial version just accessing model fields
19:10 jcockhren micah_chatt: any thoughts on migrations?
19:10 micah_chatt so given https://gist.github.com/micahhausler/6627970
19:10 micah_chatt the admin would have to maintain that the referenced fields are up to date
19:10 micah_chatt again, this is a beginner idea
19:12 pipps1 joined #salt
19:12 Gifflen joined #salt
19:13 micah_chatt so like  Clients.objects.only('tasty_pie_api_key', 'tasty_pie_username')
19:14 micah_chatt jcockhren: the other thought I had was making a django package with a `mange.py salt_bridge` command
19:14 micah_chatt where in the django admin you could configure what fields get dumped on that command
19:14 micah_chatt that way migrations would auto update
19:14 mgw UtahDave: do you know the latest on salt-ssh? I tried it a few days ago and ran into a few issues
19:14 mgw I'd like to use it to deploy sat
19:15 mgw s/sat/salt
19:15 micah_chatt jcockhren: but I didn't like that as much
19:15 jcockhren djangomod could be leveraged I imagine
19:16 micah_chatt mostly because you don't necessarily know the format of the data coming out
19:16 micah_chatt where if you define it in salt, you can expect it
19:16 jcockhren micah_chatt: there was a short discussion on an issue to allow for more generic subcommands without touching the args list
19:17 jcockhren micah_chatt: I think your first thought would be more ideal than using the bridge
19:18 micah_chatt jcockhren: me too
19:19 jcockhren wouldn't that mean that pillar.get calls yeild DB queries?
19:19 jcockhren is that how mongo.ext_pillar works?
19:19 micah_chatt (sigh) yes
19:19 micah_chatt correct
19:19 micah_chatt BUT it would allow for dynamic key update/adding/revocatoin
19:20 jcockhren could we instead model the (somewhat broken) gitfs for pillar for updates?
19:21 jcockhren every 60 sec or something
19:21 jcockhren just thinking aloud
19:21 micah_chatt potentially
19:22 micah_chatt honestly this is a workaround for not using an enterprise level system
19:22 micah_chatt like zookeeper
19:22 micah_chatt or a legit LDAP setup
19:22 micah_chatt neither of which I care to configure
19:22 honestly hey, that's what I do
19:23 UtahDave mgw: it will be in 0.17.0 RC and is in develop.
19:23 UtahDave what issues did you see, mgw?
19:24 micah_chatt honestly: I'm somewhat allergic to Java
19:24 honestly micah_chatt: aren't we all
19:24 mgw It was a few days ago in develop… it was complaining that options had no attr list
19:24 honestly I also use salt instead of ldap
19:24 mgw UtahDave: And in fact it didn't
19:24 jcockhren micah_chatt: here, we use gitfs as our pillar backend. a dev clones the repo. adds their keys and pushes
19:25 jcockhren then it's populated in the needed places
19:25 mgw I was able to get by that by commenting that bit of code, but I didn't want to do any work on ssh knowing that Tom is actively developing it
19:25 jpeach joined #salt
19:25 micah_chatt right, but I want it automated.
19:25 UtahDave mgw: Hm. Please open an issue on that. I think Tom thinks it's about ready to go. We'd like to get all those little things ironed out during these RC releases
19:27 ml_1 joined #salt
19:27 mgw UtahDave: I'll test again on latest develop
19:27 jcockhren micah_chatt: yeah. I think having django ORM as a backend is a good idea
19:27 jcockhren at the same time it screams halite to me
19:28 jcockhren b/c it's something that could be useful on that front
19:28 UtahDave mgw: cool
19:29 micah_chatt jcockhren: cool, UtahDave: do you think that might be a good contribution to salt core? or just as a 3rd party addition?
19:29 mgw UtahDave: It's still doing it
19:30 mgw opening an issue
19:30 UtahDave micah_chatt: I think as an external_pillar it would be a GREAT contribution to salt core.  :)
19:30 UtahDave thanks, mgw.  I need to do some testing on that, too, actually.
19:30 JaredR joined #salt
19:30 micah_chatt jcockhren: its more for business side integration then actual devops management
19:30 micah_chatt but seeding business information that is relevant to servers
19:30 Brew joined #salt
19:31 jcockhren micah_chatt: whenever you're ready for some testing. I'll help
19:31 micah_chatt deal, I think I just figured out what I'm doing this weekend
19:31 jcockhren :)
19:33 mgw UtahDave: It's so basic, I wonder if I have some obvious mistake
19:33 JaredR joined #salt
19:33 mgw I have my /etc/salt/roster set up with a single target, hawking
19:33 mgw https://gist.github.com/mgwilliams/0d702bfe788445531126
19:33 NotreDev joined #salt
19:33 mgw looking at the code though, it seems a bunch of options were removed, perhaps in favor of the roster system
19:34 mgw e.g., somewhere I remember seeing an -L option, allowing a list of targets
19:34 mgw but salt-ssh -h doesn't show that now
19:35 JaredR joined #salt
19:38 gildegoma joined #salt
19:39 justin-real joined #salt
19:39 sfello joined #salt
19:39 UtahDave mgw: I'm not sure.
19:39 ipmb just released a few modules for gathering stats with Salt: https://github.com/lincolnloop/salt-stats
19:39 JaredR joined #salt
19:40 pipps joined #salt
19:40 UtahDave ipmb: that looks cool!
19:40 ipmb thanks :)
19:41 jcockhren ipmb++
19:41 jcockhren seriously
19:41 jcockhren I'll be using that tomorrow
19:41 havan joined #salt
19:42 ipmb cool!
19:42 ipmb I was working on of dashboard too and realized I was doing it all wrong...
19:42 ipmb https://github.com/lincolnloop/salmon
19:42 cedwards ipmb: I setup salmon on one of my machines not long ago, but I could never get email alerts to trigger
19:43 ipmb hmm
19:43 ipmb yeah, I'm going to be revisiting it and making it a lot simpler soon
19:43 cedwards granted it was on a FreeBSD machine. Maybe there's something different going on there.
19:43 ipmb using the scheduler and building a custom returner is going to make it a lot easier
19:43 bitz joined #salt
19:44 ipmb UtahDave, jcockhren: is there any overhead to firing off a scheduler job?
19:44 whyzgeek hey guys is it normal that salt frequently uses the old templates and you need to restart minion to make it work? I have been debugging something for half an hour and realized that its simply don't pick up the changes.
19:44 cedwards yeah. i think the scheduler plus most any of the returners could easily backend a status page
19:44 ipmb That is, if I fire off 20 of them all at the same time, is that an issue?
19:45 ipmb or is there a more efficient way to do it/
19:45 ipmb ?
19:46 jpeach is this the right syntax for managing a daemontools service: http://apaste.info/4dw4 ?
19:48 cedwards jpeach: looks right to me
19:48 mgw UtahDave: https://github.com/saltstack/salt/issues/7357
19:48 jcockhren ipmb: schedule execution uses multiprocessing
19:49 jcockhren ipmb: some salt veteran would have to confirm about performance in practice
19:50 jpeach cedwards: oh, looks like my daemontools packages uses /var/services and salt looks in /var/service
19:50 jpeach thanks :)
19:50 ipmb cool, thx
19:55 hjubal joined #salt
19:55 mgw UtahDave: https://github.com/saltstack/salt/issues/7357
19:55 mgw UtahDave: sorry, sent that twice!
19:57 JaredR joined #salt
19:57 Ryan_Lane1 joined #salt
20:00 littleidea joined #salt
20:01 brianb_ joined #salt
20:01 Ahlee if I currently don't have a returner defined, is it possible to specify all details at run time? i.e. feed in a redis hostname and have the job return there?
20:02 Ahlee I'm trying to use salt to completely remove salt installed from source and then reinstall salt via RPM.  Current plan is to copy bash script to all minions, then use salt to schedule a run of that script
20:03 Ahlee so, yeah, nevermind feeding in. that sounds sufficiently hacky.
20:05 krissaxton joined #salt
20:06 alunduil joined #salt
20:10 Katafalkas joined #salt
20:11 Ryan_Lane joined #salt
20:11 jpeach cedwards: do you know whether the -provider mechanism works correctly for 0.16.4? afaict state.service refuses to use daemontools
20:12 cetex have you checked that daemontools is service-compatible?
20:13 offby1 Is it me, or is the on-line documentation confusing?  For example, at the bottom of http://docs.saltstack.com/topics/tutorials/starting_states.html, I see a section titled "Next Reading", with a link to "Pillar Walkthrough".  However, at the very bottom of the page, I see "previous", "next", "modules", and "index" links ... and the one labeled "next" goes somewhere else (namely "states_pt1").  Which leaves me wondering: which page
20:13 offby1 should I read next?
20:13 Thiggy @whyzgeek I wrote up a thing on our roles based config mgmt and how we got there: http://thiglife.com/2013/09/19/role-based-state-management-with-saltstack/
20:13 cetex I've had issues when init-scripts not properly implemented (but working from a bootup-perspective) wouldn't work with the "service" command.
20:14 Ryan_Lane joined #salt
20:15 jpeach cetex: I can use the daemontools module directly and it works; ie/ salt-call daemontools.start/stop
20:15 berto- joined #salt
20:15 jpeach so I *think* that the daemontools end is ok
20:15 cetex then i have no idea. :)
20:15 jpeach I hacked some logging into the daemontools module, but I don't see that output when I user the service state
20:15 jpeach cetex: :)
20:17 UtahDave offby1: I would continue with where the "Next" links go.  Then when you've finished the series, read that link to the Pillar docs.
20:19 scofflaw joined #salt
20:19 offby1 UtahDave: exactly the opposite of what I'd guessed, but thanks
20:23 UtahDave offby1: there's no hard fast rule. Whatever helps you understand Salt.
20:24 piffio UtahDave: can you help me with some doubts of the gitfs mecanisms?
20:25 UtahDave piffio: sure! what's up?
20:25 piffio I should be done with meetings for today and I'd like to narrow this down
20:25 piffio basically, it is my understanding that when using gitfs for salt states, branches are mapped to environments
20:26 piffio therefore, I have a repository with a 'base' branch and a 'qa' branch
20:26 piffio but, for one thing, on the salt master it keeps looking for a master branch
20:26 UtahDave ah, ok.
20:26 piffio therefore, first question: is the master branch required? is it mapped to the base environment?
20:26 UtahDave your git master branch becomes the "base" environment
20:26 piffio OK, that wasn't clear
20:27 UtahDave other branches and tags become environments of the same name
20:27 piffio so I can rename my base branch into master again
20:27 piffio cool
20:27 UtahDave yep
20:27 piffio thanks
20:27 piffio other point that is not clear
20:27 UtahDave ok
20:27 piffio I have my repo with a top.sls file
20:28 piffio but: do I need to have top.sls in each branch? And, if so, which top.sls is used when I issue a highstate?
20:28 mattbarto joined #salt
20:28 UtahDave No, you only have to have a top.sls in the master branch
20:28 piffio OK
20:28 piffio great
20:28 MatthewT1 Okay, so you don't have to put modules in top.sls, right? I'm still not sure why the heck I can't get mine to work
20:28 UtahDave If you put a top.sls in each branch/environment, that will work, but all the top.sls files will be merged into one big python dict
20:29 piffio I'm going to fix all this then, since it wasn't clear and I was running different experiments in order to find it out
20:29 piffio cool that makes sense
20:29 UtahDave piffio: That gets complicated very quickly. We recommend using just a single top.sls in the master branch/base environment
20:30 Thiggy Are there any Seattle-based salt enthusiasts? I'd love to have someone local to compare notes with.
20:31 Ahlee oh. i didn't realize all top.sls's got merged into a single dict
20:31 Ahlee that's good to know.
20:31 UtahDave MatthewT1: can you pastebin what you have?
20:32 piffio UtahDave: that's a lot of useful informations. Not sure that the same are available online. If not, is it possible to send contributions for the documentation?
20:32 UtahDave Thiggy: there are quite a few Seattle area Salt enthusiasts.  akoumjian lives up that way, there are a bunch of HP employees up there who use Salt.
20:32 Thiggy @UtahDave thanks
20:32 UtahDave piffio: that would be awesome!  the docs are found in the "docs" directory in the Salt github repo.
20:33 UtahDave piffio: help with the docs is VERY much appreciated. Even small things help.
20:34 UtahDave s/things/changes
20:35 andrej joined #salt
20:35 MatthewT1 UtahDave: This is the module I made, but no matter what I do I can't seem to get any minions to see it - http://pastebin.com/8imvc2tb its realy simplistic, I'm just trying to spit out something from the pillar
20:35 piffio sounds good, I'll do my best then
20:36 andrej The ubuntu install of salt-stack seems to be missing the salt-call executable that the man-pages talk about ... where can I find it?
20:36 MatthewT1 http://pastebin.com/sWUA2kiN shows the issue I keep running into
20:37 MatthewT1 oh wait
20:37 UtahDave andrej: you have to install the salt-minion to get salt-call
20:37 andrej Thanks UtahDave
20:38 UtahDave MatthewT1: shouldn't that be   salt 'MINION' munkiclient.version    ?
20:38 UtahDave andrej: Thank you!
20:39 justin-real joined #salt
20:40 jpeach cedwards: I found https://github.com/saltstack/salt/issues/4397 :-/
20:41 cedwards jpeach: that was my ticket, and it was fixed
20:41 cedwards or, rather, he pointed out the proper usage to me
20:43 jpeach that same syntax does not work for me
20:50 mgw For some reason I thought there was a way to optionally include an sls only if it exists.
20:51 mgw http://docs.saltstack.com/ref/states/include.html
20:51 UtahDave Hey, ipmb.  Are your salt-stats modules the type of thing that would be useful to include in the regular Salt modules? For example, add the nginx.status to the nginx Salt module?  https://github.com/saltstack/salt/blob/develop/salt/modules/nginx.py
20:51 mgw I don't see it there though
20:51 ipmb UtahDave: cool. I won't have time to do a pull request today
20:52 ipmb but it's got a LICENSE, so if anyone else is motivated, feel free to grab it
20:52 UtahDave ok, that's great, ipmb! thanks!
20:52 UtahDave mgw: I'm not sure if I've heard of that option before.
20:54 JaredR joined #salt
20:55 Gifflen joined #salt
20:57 Gifflen joined #salt
20:57 ronc joined #salt
20:59 andrej Hmmm ... there must be some part of crucial information I fail reading ...
21:00 andrej I'm following http://intothesaltmine.org/blog/html/2012/12/11/managing_users_with_salt.html and http://intothesaltmine.org/blog/html/2013/04/19/configuration_management_with_salt_stack_part_2.html but can't understand how the part 2 of config management integrates with using users.sls
21:02 andrej What I would like to do is to create a new user on a minion.
21:02 UtahDave andrej: salt 'myminion' state.sls users.sls
21:03 UtahDave andrej: Or if you have your top.sls set up correctly, you could run    salt 'myminion' state.highstate
21:04 andrej UtahDave - the first incantation ran w/o error, but no new user was created
21:04 andrej I haven't played with top.sls yet
21:04 UtahDave andrej: can you pastebin your users.sls   and also the command you ran?
21:05 andrej Gimme a sec
21:06 krissaxton joined #salt
21:06 nu7hatch joined #salt
21:09 offby1 Would it make sense for a couple of developers to each run a salt master on their desktops, and use them to provision production minions?  They'd keep /srv/salt in git, and do "git pull" before deploying.  Is this insane?
21:09 andrej http://http://pastebin.com/SUKLRk5t
21:09 offby1 Or is the salt master typically a single central server?
21:09 JaredR joined #salt
21:10 andrej salt 'playpen-andrej.reannz.co.nz' state.sls users.sls
21:10 jcockhren offby1: there's multimaster support now
21:10 andrej playpen-andrej.
21:10 mike25ro joined #salt
21:10 offby1 jcockhren: is it intended for the scenario that I just described?
21:12 whyzgeek \q
21:13 mike25ro hey guys, I want to keep all the ips in pillars .. like  ip: 192.168.33.XX  - this is just fine... but i want to do now smth like ip: {{ 192.168.33. }}XX  ... so to store the 192,168.33 in a separate file... is this possible?
21:13 whiteinge whyzgeek: did you see my reply from earlier perchance?
21:13 mike25ro and to load that file inside the pillar...
21:14 whyzgeek whiteinge: no sorry
21:14 whyzgeek it is bad internet here
21:14 ipmb what's the syntax for passing args to functions in a schedule?
21:14 mgw UtahDave: yeah, i guess that option doesn't exist. Maybe I'll add it.
21:14 jcockhren offby1: It has the compacity for that. Though I wonder about the case of multiple devs attempting to runs states on the same minions (at the same time)
21:15 halpo joined #salt
21:15 ipmb `function: cpu_times True` doesn't seem to work
21:15 jcockhren that'll be my only concern, but they may be solved in-house with a conversation
21:15 whyzgeek whiteinge: can you send it again. I am solving my problem in some other way
21:15 whyzgeek it is painful but it looks promising
21:15 offby1 jcockhren: yeah, it's probably not the greatest idea.  But it sounds like, apart from the multimaster support that you just mentioned, the intent is for there to be just one salt-master, and for it to (presumably) be on a centralized and reliable server, as opposed to a developer's desktop.  Does that sound right to you?
21:16 whiteinge whyzgeek: re: pillar. could you pastebin what you have? i might be able to offer some ideas if i can see how you have things organized
21:16 whyzgeek whiteinge: sure :)
21:17 UtahDave offby1: it kind of depends on your environment. The salt master has a constant connection to all your minions.
21:17 UtahDave offby1: generally people will have their production systems not be controlled directly by their developers' laptops
21:18 UtahDave offby1: the new salt-ssh will allow for just connecting when you want to make changes, which might be a better option in your scenario
21:18 UtahDave offby1: otherwise you'd probably be better off having your developers ssh in to your master. You can better control authentication and authorization that way, too.
21:19 UtahDave andrej: what was the output of the return?
21:19 Ahlee possible to embed cmd.run within a state file?
21:20 tuxIO_ joined #salt
21:20 UtahDave Ahlee: yep. it's a regular state that can be in a state file
21:21 Ahlee got it
21:21 mapu joined #salt
21:21 Ahlee http://docs.saltstack.com/ref/states/all/salt.states.cmd.html
21:21 Ahlee google. i can use it.
21:21 Ahlee sometimes ;)
21:21 Brew1 joined #salt
21:25 offby1 UtahDave: thanks; that sounds eminently sensible :)
21:26 ipmb offby1: we use a simple shell or Fabric script
21:26 ipmb edit locally, commit & push, script master to pull
21:28 felixhummel joined #salt
21:29 kermit joined #salt
21:29 fredvd joined #salt
21:31 troyready joined #salt
21:32 faldridge joined #salt
21:41 andrej UtahDave : it only echoed back the minions name
21:41 mattbarto joined #salt
21:44 UtahDave andrej: ssh in to your minion. stop the salt-minion process. then start the minion in debug mode;      sudo salt-minion -l debug
21:45 andrej ok
21:45 UtahDave andrej: then run the command again on the master.  The minion output will often show you an error or stacktrace
21:46 andrej [ERROR   ] No matching sls found for 'users.sls' in env 'base'
21:46 UtahDave andrej: is your users.sls found here?   /srv/salt/users.sls
21:46 andrej On the master - yes
21:47 UtahDave oh, I see.   omit the .sls when calling the sls from the cli
21:47 UtahDave salt 'minionname' state.sls users
21:50 andrej Cool - thanks for that; got something to work with again :)
21:51 andrej If I didn't actively push this - would salt on the minion at any stage pick this up automaticall? Or coould I schedule runs on the minion via cron to "synchronise" with changes on the master?
21:52 jcockhren andrej: you could use a scheduler
21:53 UtahDave andrej: Salt doesn't do anything automatically to your minions, unless you tell it to do so
21:54 UtahDave you can set up repeating jobs in the Salt scheduler or with a unix cron
21:54 Boohbah joined #salt
22:00 mgw UtahDave, basepi: salt-ssh is fixed now :-).  Would it be odd to have a "literal" roster module, that simply connects to the target *as* the hostname or ip? I don't see a way to simply call 'salt-ssh 172.20.20.20 test.ping'
22:00 mgw maybe this is what scan does
22:02 basepi mgw: not sure.  like i mentioned in that issue, i know very little about the implementation of salt-ssh
22:02 basepi need to get up to speed
22:02 basepi but targeting by ip doesn't work we should make it work
22:02 basepi but if* targeting....
22:03 redondos joined #salt
22:03 mgw ip seems to work like this:
22:03 mgw by adding --roster=scan
22:03 troyready joined #salt
22:03 mgw but I expected it to take something like 172.20.20.20/32 as the target
22:03 mgw not just the ip, which it does
22:07 forrest the compound matchers should be catching that mgw
22:07 krissaxton joined #salt
22:07 mgw forrest: how do compound matchers work with salt-ssh?
22:07 nu7hatch joined #salt
22:07 jcockhren quit
22:07 mfournier joined #salt
22:08 forrest oh sorry I thought that was a command argument
22:08 forrest my bad
22:11 justin-real joined #salt
22:13 forrest hmm mgw, I'm surprised it doesn't take the compound matchers after looking at the command
22:13 forrest but you tried it and no dice huh?
22:20 pipps joined #salt
22:22 sgviking joined #salt
22:26 faldridge joined #salt
22:26 lacrymology joined #salt
22:27 andrej Thanks again gents (both UtahDave and jcockhren), and sorry for the late response - had a meeting
22:28 lacrymology I'm having issues getting my custom modules loaded. I've got a files_root set up and a _modules/ directory inside it, but none of the modules inside it appear in sys.list_functions (although there's a function defined in <files_root>/_states/test.py
22:29 oz_akan_ joined #salt
22:29 lacrymology top.sls loads test.sls which talks about this test state, so that might have something to do with it
22:31 jbub joined #salt
22:32 backjlack joined #salt
22:32 pipps joined #salt
22:42 raghavp joined #salt
22:45 pipps joined #salt
22:50 andrej if I wanted to make it so the user gets a GID identical to his UID created ... would I have to write a state file for grou-creation and run that first?
22:50 UtahDave lacrymology: did you execute   salt \* saltutil.sync_all
22:50 UtahDave andrej: yeah
22:51 andrej Or did I just overlook something in the user creation?
22:51 andrej Heh
22:51 andrej You're too fast for me ;)
22:52 CheKoLyN Hello all,  is there a way to escape  \n in jinja
22:52 lacrymology UtahDave: I did now, and nothing. I had also manually restarted master and minions before (dev setup with just one minion running in the same machine)
22:59 jacksontj joined #salt
22:59 lacrymology UtahDave: actually, I'm not sure the state I've defined in _states/test.py is actually being loaded, it's called .sleep and I just realized test.sleep already exists in the core modules
23:00 Code_Bleu what is the format for using USE flags in sls file?
23:00 lacrymology ah, it is run as a state, not when I call the function. I'm still kind of hazy with this
23:03 offby1 Just checking -- having two minions up at once that have the same /etc/salt/pki/minion/minion.pem is an unspeakably dumb idea, yes?
23:03 hazzadous joined #salt
23:07 Boohbah joined #salt
23:07 lacrymology I don't even know what to look at in the logs for ths
23:07 krissaxton joined #salt
23:09 lacrymology I just found the files are even under cache/minion/extmods/modules
23:10 mohae joined #salt
23:12 Ryan_Lane joined #salt
23:13 raghavp joined #salt
23:14 nu7hatch joined #salt
23:16 lacrymology aaand.. somehow, it got fixed
23:19 raghavp joined #salt
23:19 Gifflen joined #salt
23:21 nu7hatch joined #salt
23:23 raghavp joined #salt
23:25 raghavp joined #salt
23:25 offby1 http://docs.saltstack.com/topics/tutorials/gitfs.html mentioned "GitPython"; it'd be helpful if it included a link
23:26 UtahDave offby1: pip install gitpython
23:28 jacksontj joined #salt
23:28 offby1 UtahDave: I figured that out now but it'd be nice if the page just came out and said it.  (I tried "aptitude install python-git" first, and that's either some other package, or a very old version)
23:29 anteaya joined #salt
23:32 cedwards UtahDave: trying to troubleshoot this returner issue again..
23:33 cedwards UtahDave: would there be any reason one returner would work better than another? maybe try another to troubleshoot why I'm not getting everything returned?
23:33 UtahDave still happening, huh?
23:33 UtahDave cedwards: well, it just depends on its implementation.
23:34 UtahDave I'm still somewhat baffled as to why some commands end up in the returner and some don't
23:34 cedwards unless I'm doing it wrong somehow..
23:40 berto- joined #salt
23:53 lacrymology ok, so I was able to run my module, finally, and I've run into something.. __opts__ not defined.
23:53 lacrymology I'm calling a state function from within a module function.. I'm guessing that's wrong?
23:55 jesusaurus yeah, you won't have state context when running a module function
23:55 forrest joined #salt
23:58 CheKoLyN I figured it out:  I had to do \\n to escape it the newline in the template
23:59 forrest for the jinja template?
23:59 bhosmer_ joined #salt

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