Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-09-16

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

All times shown according to UTC.

Time Nick Message
00:02 Andrevan joined #salt
00:04 jslatts joined #salt
00:05 terminalmage forrest: I think that the formulas might require 0.17.0
00:05 terminalmage with filter_by
00:05 terminalmage which is kinda annoying, since it's not yet out :)
00:06 terminalmage forrest: is filter_by causing a traceback?
00:06 forrest Yea, the docs that (I assume) whiteinge wrote reference that you need the formula_util.py module, but it doesn't exist anywhere.
00:06 forrest yea it does
00:07 terminalmage yeah that's not even in develop
00:07 gcw joined #salt
00:07 forrest yea
00:07 terminalmage weird
00:08 forrest and that's what I don't get, since your djangocon one presumably worked :P
00:08 terminalmage don't know how that slipped through
00:08 terminalmage well I didn't use grains.filter_by
00:08 terminalmage I used a jinja2-specific method
00:08 robawt wut?  somehow alternatives.set is no longer working for me
00:08 robawt this is very odd
00:08 terminalmage but whiteinge has been working on that to make a solution that is templating system agnostic
00:08 * gcw feels bad for not hanging out with anyone who came to town for Djangocon....
00:08 robawt 16.3 -> 16.4
00:09 mwillhite joined #salt
00:09 terminalmage robawt: more info would be *great*
00:09 terminalmage "not working" doesn't give us much to go on ;)
00:09 forrest oh you're totally right terminalmage, I didn't realize that whiteinge had written the jinja map differently for pip for your the djangocon stuff than the one in saltstack-formulas *facepalm*
00:09 juicer2 joined #salt
00:10 robawt terminalmage: i had a handly vim.sls i made that used the update-alternatives tool to set vim as the default system-wide editor.  i have installed salt via PPA in ubuntu and for whatever reason my state that worked before now ceases to function
00:10 forrest robawt, what version of salt?
00:10 forrest also, did you restart the service?
00:10 forrest whenever I boot a new ubuntu machine, if I don't update the box first, it installs 0.12 or some garbage
00:11 terminalmage robawt: SLS? traceback?
00:11 robawt forrest: 16.4
00:11 robawt terminalmage: yessir, I'll get a pastebin of the highstate error
00:11 terminalmage thanks
00:11 forrest yea terminalmage I'll have to ask whiteinge about that, seems odd that it's missing, I don't know how he was testing the formulas he wrote, I tried using his and they bomb out even with the develop content.
00:12 noob2 joined #salt
00:12 noob2 with salt multimaster do i have to do anything special to fail over the minions when i do a salt-call and the first master is dead?
00:12 robawt forrest: terminalmage http://pastebin.com/Q8G29661
00:13 forrest the second master exists in the minion's config right noob2?
00:14 noob2 yup
00:14 noob2 forrest: i just noticed that i don't say salt-call servername, so i guess it's automagic :)
00:14 robawt terminalmage: forrest: the only reason why I'm complaining is that this does work in 16.3, so maybe I should roll back to 16.3?  I double checked my syntax against the doc
00:14 forrest did you restart the service and clear the cache robawt?
00:15 robawt what's the command to clear salt's cache?
00:15 forrest just trash /var/cache/salt
00:15 robawt ah ok
00:15 forrest did you upgrade the minions as well? Or just your master?
00:15 robawt forrest: fresh installed OS running salt minion & master to itself
00:15 forrest noob2, yea according to the docs, once you restart the minion after updating the configs: Now the minions will check into the original master and also check into the new redundant master. Both masters are first-class and have rights to the minions.
00:15 forrest ok yea, trash the cache, restart both services.
00:16 robawt planning on running my machines from this box and keep the master under salt as well forrest
00:16 forrest makes sense
00:16 robawt same error about alternatives.set is unavailable
00:16 aat joined #salt
00:16 noob2 forrest: awesome :D
00:16 terminalmage you shouldn't need to remove the cache
00:17 robawt i might be the only one using alternatives ...
00:17 terminalmage robawt: there is no alternatives.set state
00:17 terminalmage there's an alternatives.install
00:17 terminalmage maybe it was renamed at some point?
00:17 terminalmage looking
00:17 forrest http://docs.saltstack.com/ref/states/all/salt.states.alternatives.html#salt.states.alternatives.set
00:17 robawt terminalmage: http://docs.saltstack.com/ref/states/all/salt.states.alternatives.html#salt.states.alternatives.set
00:17 robawt pointing to 16.4 docs too
00:17 forrest hmm
00:17 robawt forrest: beat me by 2 seconds
00:17 forrest maybe the docs are out of date if terminalmage is looking at the code
00:17 terminalmage there are no "0.16.4 docs"
00:17 forrest *flexes google muscles*
00:17 terminalmage there's just the docs
00:19 terminalmage alternatives.set and alternatives.auto were added on Sept 6th
00:19 terminalmage They're not in 0.16.4
00:19 terminalmage I'll add a note in the docs to mention that these are available as of 0.17.0
00:20 robawt terminalmage: ok.  must have been a fluke that it worked before
00:20 forrest robawt are you sure it worked in 0.16.3?
00:20 robawt thanks for checking it out terminalmage
00:20 forrest maybe you pulled in the develop branch for some of it or something?
00:20 robawt forrest: i always install via PPA on my personal machines
00:20 forrest oh
00:20 forrest hmm
00:21 terminalmage I'm absolutely certain that it would never have worked in 0.16.3
00:21 terminalmage https://github.com/saltstack/salt/blob/v0.16.3/salt/states/alternatives.py
00:22 robawt terminalmage: well last week between watching judge dredd and picking forrest's brain I installed via PPA and got a minecraft server going using oracle java and alternatives to set the path, then copied it over to vim to edit the default editor
00:23 robawt it is possible amazon instant streaming opened a time warp into the future, but i was distracted by my project to take much more advantage of it
00:23 robawt i really do appreciate you checking the code for me
00:23 robawt i should've looked there after seeing the doc lined up with my .sls
00:24 terminalmage dunno, do we have git packages in the PPA?
00:24 * terminalmage shrugs
00:24 terminalmage I'm not a fan of debian/ubuntu
00:24 * robawt shrugs
00:24 forrest terminalmage are you pudating the docs or should I?
00:24 forrest *updating
00:25 terminalmage forrest: https://github.com/saltstack/salt/pull/7263/files :)
00:25 forrest nice
00:26 robawt talk about customer service
00:26 terminalmage yeah, we get a lof of nice contributions from community members, but newcomers rarely know to put versionadded directives and things like that into their docstrings
00:26 terminalmage so this causes confusion as we don't really maintain different versions of the docs
00:27 terminalmage robawt: :D
00:27 robawt terminalmage: so there is either dev docs or mainline docs, that's it right?
00:27 terminalmage there are a bunch of other docs-related commits that I have pending as pull requests right now
00:27 terminalmage going to wait for them to be merged and then push them all at once to docs.saltstack.com
00:28 terminalmage robawt: docs.saltstack.com contains the docs from git, but manually pushed whenever we feel the need to
00:28 robawt terminalmage: thanks to you it works: {% if grains['os'] == 'BROKENUNTIL-0.17' %}
00:28 robawt :D
00:28 terminalmage we don't have it automated because so many things get linked into the docs, from state/module/returner/etc. docstrings, etc.
00:28 robawt that makes sense
00:29 terminalmage so we push them manually, otherwise they'd be getting rebuilt constantly
00:29 forrest yea I just learned that a couple nights ago terminalmage, merge got approved and 6 hours later the docs weren't in there, didn't realize that you guys have to manually build them
00:29 forrest Thought that I boned it up
00:29 terminalmage yeah. I think readthedocs watches git and rebuilds
00:29 terminalmage but our sphinx theme is nicer
00:29 robawt quick pillar 'best practice' question: I can have /srv/pillar chmod 700 with no problems since salt runs as root, yes?
00:29 forrest yea
00:29 forrest plus it shows up first when you google xyz saltstack
00:29 terminalmage robawt: should not be a problem
00:30 robawt ok now i have to buy terminalmage & forrest a beer
00:30 robawt my #salt beer list grows
00:30 oz_akan_ joined #salt
00:30 terminalmage :)
00:30 terminalmage and I was just stepping away, too
00:30 terminalmage hehe
00:31 terminalmage it's sunday, but I get back from watching football and find regressions in develop
00:31 terminalmage "just when I thought I was out... they pull me back in"
00:31 forrest lol
00:31 forrest develop hasn't built properly all week :\
00:32 forrest just don't log into the IRC on Sunday
00:32 terminalmage oh it has, but the unit tests have odd failures that we think are resource-related
00:32 oz_akan_ joined #salt
00:32 forrest ahh ok
00:32 terminalmage with travis
00:32 terminalmage I've seen a couple tests come through as "Passed" or "Fixed"
00:32 forrest Yea some of the errors are very odd
00:34 terminalmage yeah
00:35 forrest I'm surprised you guys are around as much as you are on the weekends.
00:35 terminalmage yeah I usually try to stay away. but then I start getting emails...
00:35 terminalmage need to turn off the notifications for my work email on the weekends :)
00:35 forrest you don't get emails from the RIC right?
00:35 forrest *IRC
00:35 terminalmage no I do not
00:35 forrest yea I refuse to set up email on my cellphone
00:35 forrest for work
00:35 terminalmage just from the tracker
00:35 forrest ahh
00:35 terminalmage issue tracker
00:35 joehh forrest: re the 0.12 in 12.10 (quantal), I think there is some sort of auto sync from debian unstable when the ubuntu release is made
00:36 forrest joehh, yea I'm really not sure, it's happened on every ubuntu 12.10 build I've done, it's either install salt, update everything, update salt, or update everything, install salt
00:36 forrest I haven't really dug into it at all.
00:36 forrest ubuntu isn't my main distro, I just test on it
00:37 terminalmage forrest: When it comes down to it though, Salt is just really damn fun to hack on
00:37 terminalmage plus I have a github streak that I am compelled to keep oing
00:38 terminalmage *going
00:38 terminalmage https://github.com/terminalmage
00:38 forrest terminalmage, Understandable, I don't write a ton of straight up code for saltstack because it's a bit intimidating, but it is fun
00:38 forrest lol yea I know
00:38 terminalmage you can probably tell when I started working for saltstack full time
00:38 terminalmage :D
00:38 forrest he
00:38 forrest *h
00:40 terminalmage forrest: you use online backup for your computers at home?
00:40 forrest no
00:40 terminalmage ahh
00:40 forrest why?
00:41 robawt NASs are cheap now, and you can lock them up
00:41 terminalmage I've been using CrashPlan for a few weeks ago, it's really nice.
00:41 terminalmage Linux client
00:41 terminalmage you can use your own blowfish key
00:41 Gwayne joined #salt
00:41 terminalmage heard about it on Hak5
00:41 forrest I don't know how much I trust any backup site
00:42 terminalmage yeah... the only reason I trust them is because I am using my own key
00:42 forrest yea
00:42 terminalmage and I'm also not putting anything important there that I'm not already encrypting
00:42 forrest right
00:42 forrest my main thing is I don't really have that much on my home PC that would be a concern to lose
00:42 terminalmage I created a 10GB truecrypt volume for my sooper sekrit files (tax documents, etc.)
00:43 forrest heh
00:43 terminalmage I also threw all my dev VMs on there
00:43 terminalmage so if this laptop is stolen, I can still get at my dev environment
00:44 forrest ahh yea, for me I do all my dev work on remote machines I connect into
00:44 forrest ends up costing me 20 bucks a month usually
00:44 terminalmage the stuff that was local anyway, the rackspace stuff I can get to whenever
00:44 terminalmage I use the saltstack rackspace account :)
00:44 forrest yea
00:44 terminalmage I only have like 2 VMs
00:44 emocakes what should i do with 72gb of ram
00:44 terminalmage on rackspace
00:44 forrest I ended up moving off rackspace, was spending too much spinning up VMs
00:45 terminalmage you could go to digitalocean. very quick to provision because they use the same keys for all their VMs :D
00:45 emocakes digitalocean is good
00:45 forrest I'm using digital ocean
00:45 emocakes get good speeds as well
00:45 terminalmage who needs entropy
00:45 forrest hah
00:45 emocakes http://i.imgur.com/BXgVcyD.png
00:45 terminalmage actually I think it was one key per IP
00:46 emocakes that is on the $5 box
00:46 robawt emocakes: ++digitalocean
00:46 emocakes im setting up a dedi at hetzner though
00:46 emocakes installing hyper-v on it
00:46 emocakes *gasp*
00:48 alunduil joined #salt
00:50 forrest this doesn't look too bad terminalmage, 3 bucks a month
00:50 forrest do you have to download their application though?
00:50 emocakes link?
00:51 forrest http://www.crashplan.com/
00:51 emocakes ahh crashplan
00:51 emocakes you are just looking for backup?
00:51 forrest I'm not currently
00:51 forrest just looking at it because it was linked.
00:51 emocakes backblaze
00:51 terminalmage forrest: yeah you do
00:51 forrest ehhhhh
00:51 emocakes http://www.backblaze.com/
00:52 terminalmage background service, java-based
00:52 forrest java??
00:52 terminalmage yes
00:52 forrest hmm
00:52 terminalmage I've been using their free trial
00:53 terminalmage I was intrigued when I heard that you could use your own key
00:53 forrest yea that's a nice feature
00:53 terminalmage yeah. that's pretty much a must in today's world
00:54 __number5__ have you tried tarsnap?
00:55 terminalmage yeah I have
00:55 __number5__ http://www.tarsnap.com/
00:55 terminalmage will probably try them out as well
00:56 robawt anything i could plug into my local NAS i'd be happy about
00:56 forrest terminalmage, are most of the guys at salt using arch as their main distro? I assume you guys all have laptops of some variety
00:57 terminalmage The sales guys use Macs
00:57 terminalmage Tom has a Macbook, dual booting Arch and MacOS
00:57 emocakes macs will use samba2
00:57 emocakes at the next release
00:57 emocakes so no need to worry about shitty afp anymore
00:57 emocakes im getting rid of my firewire storage
00:58 emocakes and consolidating that into a big server
00:58 terminalmage base pi (don't want to summon him here with a mention so I split up his name) has a macbook
00:58 emocakes looking at some drives to buy at the moment
00:58 terminalmage whiteinge's laptop died last month while I was out in SLC
00:58 terminalmage he used to have a thinkpad I think, but now has a macbook
00:59 robawt the money has changed him :\
00:59 forrest that's a bummer, I'd be sad to lose a thinkpad
00:59 robawt :P
00:59 terminalmage I got an Asus Zenbook Prime
00:59 terminalmage screw macos
00:59 terminalmage it's gotten worse and worse
01:00 terminalmage I wiped Windows 8 off of this zenbook and installed Arch on encrypted LVM
01:01 forrest you just boot to whatever arch's equivalent is of run level 3 though right?
01:01 terminalmage yeah, then run startx to launch AwesomeWM
01:01 emocakes asus zenbooks are sexy as hell
01:01 emocakes windows 8 isnt bad on the zenbook
01:01 terminalmage I don't need any damn display manager, GET OFF MY LAWN
01:01 emocakes i put 8.1 on mine recently
01:01 emocakes i mean, apart from the fact that its windows
01:01 emocakes im also getting sick of macos
01:02 UtahDave terminalmage: I run a Dell Lattitude E6530!!
01:02 terminalmage yeah my zenbook is less than an inch thick
01:02 forrest are you the old man at the office terminalmage
01:02 emocakes the screen is amazing on the zenbook terminalmage
01:02 forrest Shaking our virtual stick at people
01:02 terminalmage UtahDave: nice
01:02 emocakes almost as nice as the retina
01:02 terminalmage forrest: I kind of am... not the oldest dev there, but I'm in the neighborhood
01:03 terminalmage emocakes: yes it is
01:03 UtahDave I hate writing talk abstracts for conferences. Pycon requires a ton of crap
01:03 terminalmage though I like to hook up to a 24" monitor
01:03 forrest yea it does UtahDave :\
01:03 terminalmage UtahDave: I know right?
01:03 forrest Are you finishing your proposal on the due date? lol
01:03 terminalmage I submitted mine last week
01:04 terminalmage UtahDave: I thought up a really nice talk idea for SaltConf
01:04 UtahDave seriously, I feel like I'm spending more time on all their requirements than I'll actually spend giving the tutorial.
01:04 UtahDave terminalmage: Oh, yeah?
01:04 robawt UtahDave: someone before you has ruined all of the fun and forced them to make it unfun
01:05 forrest Notes for SaltConf, use a better streaming service than what puppet has used twice in a year that only has 'potato' resolution, make sure your keynote/all presentations aren't a commercial for products to buy.
01:05 terminalmage yeah... so, I was watching this BSD-related web show, to learn more about BSD. They had a tutorial of using poudriere to set up a binary package build system
01:05 terminalmage that's something we can salt
01:06 forrest terminalmage, on that note, it would be pretty slick to see a setup of a mock/koji setup
01:06 terminalmage yeah
01:06 forrest weblogic would also be awesome
01:08 forrest hey terminalmage, how is the support on Arch for mulitple monitors?
01:08 UtahDave terminalmage: that's a great idea
01:08 forrest constantly one of my pet peeves about the linux distros.
01:08 terminalmage UtahDave: I know... I want to get this salted and then see if I can get interviewed on the show
01:08 emocakes has to be better than on os x forrest :P
01:08 terminalmage get more BSD folks looking at salt
01:09 Teknix joined #salt
01:09 UtahDave terminalmage: very cool.
01:09 bhosmer joined #salt
01:09 forrest emocakes, heh
01:09 terminalmage forrest: it really depends on your desktop environment/window manager
01:09 UtahDave terminalmage: I wonder if cedwards would have any advice for you on that.
01:10 terminalmage I don't use a DE, I use a WM, and I have a script that I wrote which reads from a YAML-formatted config file and then uses xrandr to detect the connected monitors and set up multi-monitor support
01:10 terminalmage it's pretty slick
01:10 terminalmage I need to clean it up some and make some of it not be hard-coded, then I'm gonna throw it on github
01:10 forrest Yea I wrote something similar on Fedora that handles all the positioning, it just sucks that I HAVE to do that
01:10 terminalmage yeah... so I'm really just using xrandr under the hood
01:11 terminalmage but I have the xrandr command being dynamically built by the python script
01:11 forrest yea that's better than what I have
01:11 forrest mine just goes through and rotates the displays and sets the resolution properly
01:11 terminalmage yeah I like it, but it does need some work and more features
01:11 terminalmage so you can set the resolution in the config file
01:11 Tekni joined #salt
01:11 forrest I'd appreciate if multiple monitor support was there out of the box
01:12 Thiggy joined #salt
01:13 terminalmage yeah, the issue with that is that there are 1823474545 different DE/WM options in Linux
01:13 terminalmage so, it's something that everyone has to either A) implement for themselves, like KDE and Gnome, etc. do, or B) make you do it yourself
01:14 forrest yea
01:14 cedwards terminalmage: catching up on the backlog. you're talking about salting the poudriere setup?
01:14 terminalmage yeah
01:14 cedwards pretty sure we have a poudriere module, but i haven't used it
01:14 terminalmage yeah I've seen it
01:15 terminalmage but I want to work up something that's nice and polished
01:15 terminalmage that I can show off
01:15 terminalmage so, I'll be working on testing with it
01:15 terminalmage and seeing if it needs to be improved
01:16 terminalmage then I'll get some SLS together and make something that's pretty
01:16 terminalmage and then see about trying to get interviewed
01:16 terminalmage cedwards: I also mentioned earlier, I'm going to try to work on the BSD package stuff this week
01:17 terminalmage strip the pkgng stuff from freebsdpkg and put into the pkgng module
01:17 cedwards awesome
01:17 terminalmage make freebsdpkg for pkg_add and pkgng for pkg
01:17 terminalmage is pkgng the default starting in FBSD 10?
01:17 terminalmage thought I heard that
01:17 cedwards yeah
01:18 terminalmage cool
01:18 terminalmage yeah, you said you had a jail you were going to setup for me to do my pkgng dev work, I'm ready for that now
01:19 terminalmage sorry it took so long for me to get around to it... there's always something to do
01:23 cedwards oh, sure, let me spin something up for you
01:24 robawt offtopic, but whoever decided to make a ufw rule for salt, thanks for continuing to save me 5 minutes
01:25 jacksontj joined #salt
01:25 oz_akan_ joined #salt
01:39 sibsibsib joined #salt
01:40 halfss joined #salt
01:50 jacksontj joined #salt
01:51 ipmb joined #salt
02:00 jbirdman_w joined #salt
02:02 jbirdman_w joined #salt
02:09 jbirdman_w joined #salt
02:10 xl1 joined #salt
02:20 robawt it's insane how much work you can get done when you go to terminal only and pound out ideas
02:31 sssslang joined #salt
02:41 jbirdman joined #salt
02:55 countdigi joined #salt
03:03 deepakmd_oc joined #salt
03:11 aat joined #salt
03:15 xpen joined #salt
03:35 aat joined #salt
03:41 mech422 anyone around that could advise me on a 'policy' thing ?
03:41 mech422 I'm adding multiple source file support to file.append(), and I need to figure out what to do about the 'changed' state ...
03:42 mech422 if you run a state with 'sources: foo bar baz' and then run it again later with 'sources: foo bar' - there's no way to tell the file changed
03:43 mech422 so it is it a "don't do that" or should I just force the state to changed if you use multiple sources ?
03:43 xpen joined #salt
03:46 CheKoLyN joined #salt
03:48 aat joined #salt
03:51 oz_akan_ joined #salt
04:04 UtahDave mech422: can you pastebin an sls example using what you're adding?
04:07 mech422 http://pastebin.com/mbSyWTkx
04:08 mech422 the concating of the templates is easy enough
04:08 mech422 but it gets a bit more complex trying to figure out if anything 'changed'
04:10 UtahDave your example is a bit confusing.
04:10 UtahDave so you'd either use - source or - sources,  but not both, right?
04:10 mech422 right
04:10 mech422 and thats my test case - not an example :-P
04:10 mech422 source / sources, source_hash / source_hashes are mutually exclusive
04:11 mech422 'text' should be as well, as the original code throws 'text' away if you have a 'source'
04:12 UtahDave OK, so file.append is supposed to do nothing if the new text already appears in the body of the file somewhere. If not, it appends it to the end of the file.  Is that correct according to your understanding?
04:12 mech422 yeah
04:12 UtahDave I've never looked at that code, so you may understand it better than I
04:13 UtahDave OK, so I guess the question is if you want to treat the whole concatenated result of the sources as one block of text for that comparison
04:13 mech422 right
04:13 UtahDave Or if you should check for the existence of each fragment separately.
04:14 mech422 not sure I can do each fragment...
04:14 mech422 I'm still pretty shallow in the code, but it looks like its just shipping a full file to the minion and doing a diff ?
04:16 UtahDave ok, I'm looking at the code.  What happens right now if you use multiple lines of text when using  - text  ?
04:16 UtahDave Does it address each line separately?
04:16 mech422 beats me :-P
04:16 mech422 but if you have a '- text:' and a '- source' - it throws away 'text'
04:17 malinoff joined #salt
04:18 UtahDave ok, it looks like it does treat each line separately.
04:18 UtahDave you're in luck!  This should be easy
04:19 UtahDave just make the contents of each source file an item in the "text" list and everything will just work.
04:19 UtahDave look at line 1940
04:20 mech422 UtahDave: actually - I do that... but I just made one big chunk out of it
04:21 mech422 http://pastebin.com/0mjCUYiP
04:21 UtahDave see how line 1933 makes a list out of the contents of the one source file?
04:22 mech422 I could actually preserve the chunks ... 1933 is a comment ?
04:22 mech422 I'm working from a clone of the head on github
04:22 UtahDave mech422: yeah, so just have _get_template_texts return a list.
04:22 UtahDave each item in the list is the contents of one of the source files.
04:22 UtahDave ok, so our lines are probably off
04:22 mech422 but yeah.. I've got that... the end of _get_template_texts just does  return ''.join(foolist)
04:23 mech422 thats not a problem
04:23 UtahDave but I was referring to this:
04:23 UtahDave if isinstance(text, string_types):        text = (text,)
04:23 mech422 but when I pull one template file out of the middle, its not regenerating
04:23 mech422 yeah - its makes a tuple
04:24 mech422 lets me try copying the code back to my minion
04:24 UtahDave ''.join(foolist) is joining all the sources into one text chunk
04:24 mech422 maybe I was out of sync with myself
04:24 mech422 yeah - which then gets turned into a tuple by that other line
04:25 UtahDave mech422: Yes, but that's your problem. It gets turned into a ONE item tuple
04:25 mech422 so does text ?
04:25 mech422 how can it treat each line of text 'seperately' then ?
04:26 UtahDave if you have _get_template_texts return a list or tuple, then it will work just how you want.
04:26 sunabc joined #salt
04:26 mech422 oh - actually - it does work
04:27 mech422 I must have forgotten to push to my minion
04:28 mech422 so the next step would be to add the same to file.managed
04:29 UtahDave cool.
04:30 UtahDave well, time for bed. I have an early flight tomorrow.
04:30 mech422 Thanks for the help
04:31 UtahDave you're welcome.  Thanks for helping make Salt more awesome
04:31 UtahDave !
04:31 UtahDave :)
04:36 Teknix joined #salt
04:38 xpen_ joined #salt
04:38 mech422 UtahDave: Oh!
04:38 UtahDave what's up?  I'm still here
04:38 mech422 UtahDave: one other thing - I hacked the file state to support mod_watch
04:38 mech422 err.. watch_mod
04:38 UtahDave how does that work for the file state?
04:39 mech422 anyway, it basically allows you to add 'only_if_changed' as a parm to say file.append
04:39 mech422 and instead of behaving like 'require', it behaves like cmd.wait() - nothing happens till the watch fires
04:40 mech422 think anyone would be interested in that ?
04:42 UtahDave that does sound pretty interesting.
04:42 UtahDave Be sure to send that as a separate pull request from your other feature.
04:43 mech422 yeah - actually it would prolly be stupid to add multiple sources to file.managed() - then it would be files.managed() :-P
04:43 mech422 so I'll just clean up what I got so far
04:44 luminous ugh, jinja rendering errors are so annoying in salt :(
04:44 xpen joined #salt
04:46 bhosmer joined #salt
04:46 xpen__ joined #salt
04:54 UtahDave joined #salt
04:58 luminous with git.latest, can rev be a tag?
04:59 UtahDave yep
04:59 luminous hrm..
05:01 halfss joined #salt
05:05 luminous aye, yes
05:05 luminous fantastic
05:21 noob2 joined #salt
05:27 freeminds joined #salt
05:28 halfss joined #salt
05:35 hummus3 joined #salt
05:37 hummus3 is there a way to turn off jinja parsing in a (pillar .sls) file thats actually a (#!py that contains non-pillar jinja)?
05:37 Katafalkas joined #salt
05:39 Katafalkas joined #salt
05:40 redondos joined #salt
05:44 JoAkKiNeN joined #salt
05:50 robawt is it possible to check if Salt has a file and if not go download it?
05:52 Katafalkas joined #salt
05:58 halfss joined #salt
05:58 malinoff {% if not salt['file.file_exists']('path/to/the/file') %}
06:05 Heartmender joined #salt
06:07 forrest hummus3, just put #!renderer at the top
06:07 forrest so if you want yaml and mako #!mako|yaml
06:08 forrest or if it's python and yaml #!py|yaml should work
06:08 forrest check out the renderers page: http://docs.saltstack.com/ref/renderers/index.html
06:10 abele joined #salt
06:14 middleman_ joined #salt
06:24 dbryan joined #salt
06:27 dbryan I'm getting an error when trying to use postgres states - 'State postgresql_database.present found in sls db.postgresql is unavailable'. What's the deal? Running 'salt-call postgres.db_list' and othr modules works; I've configured the minion appropriately per the module docs.
06:27 dbryan oh never mind - the state is 'postgres_database', not 'postgresql_database'.
06:32 dbryan left #salt
06:33 gildegoma joined #salt
06:35 ml_1 joined #salt
06:36 TheCodeAssassin joined #salt
06:40 TheCodeAssassin joined #salt
06:51 felixhummel joined #salt
06:51 middleman_ joined #salt
06:52 TheCodeAssassin joined #salt
06:54 balboah_ joined #salt
07:00 LucasCozy joined #salt
07:00 vaxholm joined #salt
07:01 ronc joined #salt
07:05 deepakmd_ joined #salt
07:08 sfello joined #salt
07:14 Katafalkas joined #salt
07:15 Katafalk_ joined #salt
07:19 adepasquale joined #salt
07:20 vaxholm joined #salt
07:21 vaxholm left #salt
07:28 adepasquale joined #salt
07:34 Katafalkas joined #salt
07:35 s1acky joined #salt
07:35 pt|Zool joined #salt
07:37 nkuttler joined #salt
07:37 nkuttler joined #salt
07:38 robinsmidsrod joined #salt
07:41 Katafalkas joined #salt
07:50 redondos joined #salt
08:07 aleszoulek joined #salt
08:08 Katafalkas joined #salt
08:12 Katafalk_ joined #salt
08:12 tomviner joined #salt
08:14 xpen joined #salt
08:16 xpen_ joined #salt
08:18 xpen_ joined #salt
08:18 redondos joined #salt
08:19 Katafalkas joined #salt
08:22 bhosmer joined #salt
08:23 xpen joined #salt
08:39 davidone joined #salt
08:40 gildegoma_ joined #salt
08:47 redondos joined #salt
08:47 dbraden joined #salt
08:48 bemehow joined #salt
09:00 MrTango joined #salt
09:03 p3rror joined #salt
09:04 redondos joined #salt
09:11 xpen_ joined #salt
09:12 xpen_ joined #salt
09:13 zooz joined #salt
09:22 redondos joined #salt
09:32 deepakmd_oc joined #salt
09:41 Katafalkas joined #salt
09:41 lemao joined #salt
09:47 bemehow joined #salt
09:49 aptiko It's amazing: it's almost 4 months past the date I wanted to give it to you, and it still refuses to arrive to your hands.
09:50 redondos joined #salt
09:50 aptiko I wonder what will happen next. Most likely an accident to the aeroplane that carries the mail to Germany. I hope only the mail is destroyed and that the crew and passengers are safe.
09:53 bemehow joined #salt
09:53 bemehow joined #salt
09:56 ml_1 joined #salt
09:58 bemehow_ joined #salt
10:04 ml_11 joined #salt
10:07 az87c joined #salt
10:08 bhosmer joined #salt
10:18 redondos joined #salt
10:19 deepakmd_oc joined #salt
10:24 ollins joined #salt
10:30 svx joined #salt
10:37 Jahkeup joined #salt
10:45 redondos joined #salt
10:53 scott_w joined #salt
11:03 redondos joined #salt
11:04 p3rror joined #salt
11:05 carlos joined #salt
11:12 logix812 joined #salt
11:15 ggoZ joined #salt
11:22 redondos joined #salt
11:30 deepakmd_ joined #salt
11:36 backjlack joined #salt
11:44 boite joined #salt
11:45 emilisto hey, do you guys know of any neat solution for controlling the salt master remotely?
11:45 emilisto of course you can ssh to it
11:46 emilisto but it'd be nice if there was a way to control the salt master from my local compuer, e.g. using fabric, so you could write fabric scripts like "fab deploy web", that in turns runs `salt-call web state.highstate` on the salt master
11:47 xl1 [salt.master      ][ERROR   ] Exception 'Error when fetching: fatal: loose object 9dea...77b9 (stored in ./objects/9d/eadd...77b9) is corrupt' returned exit status 2: None occurred in file server update
11:49 oz_akan_ joined #salt
11:49 xl1 When running overstate I got a BIG surprise that an older gitfs revision of sls files are used.
11:49 xl1 Salt 0.16.0 it is. Any ideas?
11:50 xl1 git status and git fsck doesn't report the corruption
11:51 jslatts joined #salt
11:51 halfss joined #salt
11:51 redondos joined #salt
12:06 blee joined #salt
12:19 ajspin joined #salt
12:19 redondos joined #salt
12:26 arthurlutz joined #salt
12:33 renoirb left #salt
12:33 renoirb joined #salt
12:37 redondos joined #salt
12:51 oz_akan_ joined #salt
12:54 redondos joined #salt
12:55 jbunting joined #salt
12:57 linjan joined #salt
12:58 Ahlee $ ps -eaf | grep -c salt-minion
12:58 Ahlee 835
12:58 Ahlee um.
13:01 redbeard2 joined #salt
13:01 brianhicks joined #salt
13:03 juicer2 joined #salt
13:05 cron0 joined #salt
13:06 Gifflen joined #salt
13:15 pdayton joined #salt
13:16 ipmb joined #salt
13:18 kermit joined #salt
13:21 nbari joined #salt
13:23 redondos joined #salt
13:26 jbunting joined #salt
13:28 jbunting joined #salt
13:29 Kholloway joined #salt
13:30 jslatts joined #salt
13:33 jergerber joined #salt
13:35 matanya joined #salt
13:35 Gifflen joined #salt
13:38 micah_chatt joined #salt
13:38 Furao joined #salt
13:39 shinylasers joined #salt
13:40 oz_akan_ joined #salt
13:42 Ahlee so if i run salt '*' cmd.run 'ps -eaf | grep -c salt-minion' looks like on average 4 are running, and I can't reconcile that. One daemon, plus one worker, why two additional processes/threads?
13:43 JimShoe left #salt
13:43 Ahlee and, here's another minionion with 39 salt-minion
13:48 kaptk2 joined #salt
13:49 mattmtl joined #salt
13:49 bemehow joined #salt
13:52 redondos joined #salt
13:54 mannyt joined #salt
13:54 sssslang_ joined #salt
13:57 mannyt_ joined #salt
14:06 bemehow_ joined #salt
14:08 redondos joined #salt
14:08 ktenney joined #salt
14:10 viq Can salt be told to connect through a SOCKS proxy?
14:12 lorimar hi all. i'm fairly new to salt. I've got a minion that I'm trying to set up a yum repo on and install packages from. When I attempt to run this though, I get a  "Name pkgrepo.managed in sls openldap_dev is not a dictionary" error. http://pastebin.com/FnCbTDZ0
14:17 honestly lorimar: you have too many dashes there
14:17 honestly in your pkgrepo.managed state
14:18 lorimar honestly: where should I not have dashes? In the require_in?
14:20 honestly wait, sorry
14:20 honestly you are missing an id for the state
14:20 aat joined #salt
14:21 honestly try it like this: http://paste.ubuntu.com/6115110/
14:21 deepakmd_oc joined #salt
14:22 lorimar honestly: gotcha. fixed that and now getting a new error...
14:22 lorimar Cannot extend ID openldap-ltb in "base:openldap_dev". It is not part of the high state.
14:22 tuxIO joined #salt
14:22 honestly your require_in statement must refer to a state id
14:23 lorimar honestly: aha
14:23 lorimar fixed. thanks much!
14:23 honestly (:
14:23 jalbretsen joined #salt
14:24 diegows joined #salt
14:28 lorimar honestly: ok, new error... "cannot retrieve metalink for repository: epel. Please verify its path and try again"
14:28 lorimar http://pastebin.com/BMfwsvHG
14:29 lorimar and the current contents of my sls file: http://pastebin.com/FnCbTDZ0
14:29 lorimar seems like it is trying to use epel for these packages rather than the new repo i defined
14:29 JaredR joined #salt
14:30 opapo joined #salt
14:31 cnelsonsic joined #salt
14:31 jbunting joined #salt
14:33 UtahDave joined #salt
14:33 honestly I can't help you with that, I have no clue about yum
14:34 tuxIO_ joined #salt
14:37 juicer2 joined #salt
14:38 lineman60 joined #salt
14:39 renoirb hey everybody
14:39 lorimar honestly: apparently I needed to restart salt-minion for some reason....
14:40 lineman60 joined #salt
14:40 honestly lorimar: hm. maybe you can't add a repo and install a package from that repo during the same state execution
14:41 honestly that would be rather disadvantageous
14:43 ggoZ joined #salt
14:45 renoirb Hey people, how can we make sure a file.managed is ran after a code update, in a require: statement, but which module to use:   require: pkg?  file?
14:45 lineman60 joined #salt
14:46 lineman60 joined #salt
14:47 lineman60__ joined #salt
14:48 noob2 joined #salt
14:49 deepakmd_ joined #salt
14:49 honestly renoirb: what do you mean by code update?
14:49 renoirb in my case it is a rsync from a repository
14:50 renoirb but regardless of it, honestly (the person), i want to make sure that if the file is changed, that the file.managed is enforced
14:51 renoirb so i have a code.webappname that takes care of syncing throughout the nodes the code and will eventually overwrite a config file
14:51 renoirb and in the webappname I have a config.sls that takes care that the config dir exist, and that the config file match against a patch through file.managed
14:51 renoirb and whether I run the state.sls code.webappname
14:51 renoirb or
14:51 renoirb state.sls webapp
14:52 renoirb it runs it. but I succeeded, honestly :)
14:52 renoirb My question is that whether it is normal that in the other file I have to use include: webappname.config and not simply a require in the rsync statement
14:54 noob2 joined #salt
14:54 noob2 left #salt
14:57 noob2 joined #salt
14:57 noob2 salt: how does one setup mysql users when the root user requires a password to log in?
14:58 gimpygoo joined #salt
14:59 m_george|away joined #salt
15:00 StDiluted joined #salt
15:02 copelco joined #salt
15:06 UtahDave joined #salt
15:07 faldridge joined #salt
15:08 Furao joined #salt
15:09 zooz noob2, install a /root/.my.cnf file first?
15:09 forrest joined #salt
15:09 noob2 zooz: so i should specify the default user/pass in there?
15:09 noob2 and salt will pick it up?
15:11 Tekni joined #salt
15:12 zooz that's how I do this with puppet
15:12 zooz but I am not sure what salt uses to create mysql users
15:12 zooz if it shells out and uses mysql client
15:12 Gifflen_ joined #salt
15:12 zooz them ~/.my.cnf will be picked up
15:12 zooz then*
15:13 Khollowa_ joined #salt
15:13 noob2 i see
15:13 noob2 i'll give that a try
15:13 zooz maybe looking at mysql module's code could help
15:13 premera_j joined #salt
15:14 noob2 yeah i should check that out
15:14 gadams_ joined #salt
15:15 noob2 i see, the code says we need to define the user/pass in the minion file
15:15 balltongu_ joined #salt
15:16 pjs joined #salt
15:17 Gareth joined #salt
15:17 noob2 zooz: that worked :)
15:17 zooz cool
15:18 mjulian joined #salt
15:18 mjulian joined #salt
15:21 micah_chatt does anyone know if its possible to access pillar data when writing custom grains?
15:23 forrest noob2, you should store all your passwords in pillar
15:23 noob2 forrest: it'll pickup my mysql password in there?
15:23 forrest sure, take a look at https://github.com/terminalmage/djangocon2013-sls/blob/master/pillar.example
15:24 forrest so you can see there the password for the DB
15:24 forrest https://github.com/terminalmage/djangocon2013-sls/blob/master/foo/db.sls
15:24 noob2 ah nice
15:24 noob2 thanks :)
15:24 forrest and then over there, you reference it because you're pulling in the pillar data for the actual database state file
15:24 forrest yea np, just more secure!
15:24 noob2 yup
15:25 noob2 i'm getting this on my second mysql host: State mysql_grants.present found in sls mysql is unavailable
15:25 noob2 the first one worked fine
15:25 redondos joined #salt
15:25 shinylasers joined #salt
15:26 forrest you might try running it with the debug option noob2
15:26 noob2 ok
15:27 akio joined #salt
15:27 redondos joined #salt
15:29 Furao joined #salt
15:33 BadLuck joined #salt
15:34 Jahkeup joined #salt
15:34 JaredR joined #salt
15:36 BadLuck Hi. I got an issue. Everything was working fine and know I have this problem. When I "salt '*' test.ping", my minion respond "ssclientWin: True". But if I execute my empty sls "salt 'ssclientWin' state.sls test -v t 60" I got "ssclientWin:  Minion did not return". I tried to restart the service "service salt-master restart", same issue. Any ideas? thanks
15:39 forrest Try it with a timeout of 5 seconds
15:39 nliadm joined #salt
15:39 BadLuck same
15:40 forrest is the sls totally blank?
15:40 BadLuck I ran my minion and in debug mode, and my minion receive the commande
15:40 BadLuck yes
15:40 forrest Hmm, can you check the status of the job in the job queue?
15:40 BadLuck I don't know the command
15:41 forrest salt-run jobs.list_jobs
15:41 forrest or salt-run jobs.active to see if it's still considered 'running'
15:42 BadLuck the first one have a lots of stuff
15:42 BadLuck the "active" is empty "{}"
15:42 forrest yea it's probably a list of historical jobs
15:43 forrest ok, modify your state to just do something, any thing.
15:43 BadLuck on the minion i got "[INFO    ] Returning information for job: 20130916114113586235"
15:43 forrest just to run a cmd to echo 'test' or whatever
15:43 BadLuck ok
15:43 forrest on the master try salt-run jobs.lookup_jid 20130916114113586235 as well
15:43 forrest see what that returns
15:44 bhosmer joined #salt
15:44 forrest did you recently upgrade the version of salt on the monion by chance?
15:44 BadLuck My minion is printing a lot of thing, but my master still return "Minion did not return"
15:44 BadLuck no
15:44 BadLuck I was testing to execut commant
15:45 forrest Hmm that's very odd, did you run it with the timeout of 5 seconds again?
15:45 BadLuck by i was not able to do want I want and I start to get this issue
15:45 teskew joined #salt
15:46 BadLuck same error, and still my muions is spamming when I excute this
15:46 BadLuck but I dont see error exempt some "[DEBUG   ] Failed to import module virt, this is most likely NOT a problem:"
15:46 kaptk2 joined #salt
15:46 forrest Hmm, yea I'm not sure then :\
15:46 forrest what returned on the job lookup? That it didn't finish?
15:48 BadLuck sorry, I do not understand this. I don't know if it's because my englis is bad or if because I do not know Salt enough
15:48 forrest ok the master run: salt-run jobs.lookup_jid 20130916114113586235 as well
15:48 BadLuck I got "ssclientWin:"
15:49 forrest ok, can you find the job ID for the command you ran that printed text on the minion?
15:49 Furao joined #salt
15:50 BadLuck ok, the latest line on hte minion is "[INFO    ] Returning information for job: 20130916114536499547". and on the master I got "root@ssmaster:~# salt-run jobs.lookup_jid  20130916114536499547" return "ssclientWin: ---------"
15:51 forrest Yea I'm not sure where to go from here if a command works, but a state doesn't.
15:51 cro1 joined #salt
15:51 forrest you're on 0.16.3 or 0.16.4 right?
15:51 BadLuck I'm check
15:52 BadLuck 0.16.3 on the master
15:52 nfx9 joined #salt
15:52 kaptk2 joined #salt
15:52 BadLuck same on minion
15:52 Furao joined #salt
15:53 BadLuck my last chance is to use my VM backup
15:55 forrest I don't think you should have to do that.
15:55 forrest Clearly the machine is connecting and working, so lets try the following
15:55 forrest on both the minion and master, delete /var/cache/salt
15:55 forrest then restart the service on both
15:56 BadLuck ok, 1 minut
15:56 forrest then run "salt 'ssclientWin' state.sls test" and see what that returns.
15:57 devinus joined #salt
15:57 forrest actually even better, "salt 'ssclientWin' state.sls test -l debug"
15:59 pipps joined #salt
15:59 cro joined #salt
16:00 BadLuck salt: error: no such option: -l
16:00 BadLuck without -l?
16:00 BadLuck haaa -L
16:00 BadLuck huummmm
16:00 BadLuck non error
16:01 BadLuck I will check If I got my result
16:02 troyready joined #salt
16:03 pipps joined #salt
16:03 BadLuck with "salt 'ssclientWin' state.sls test -L debug" I got nothing (bu I dont have my echo file) and with "salt 'ssclientWin' state.sls test -v t 60"  "Minion did not return"
16:04 KyleG joined #salt
16:04 zooz joined #salt
16:05 KyleG joined #salt
16:05 noob2 left #salt
16:10 forrest I'm not sure at this point the BadLuck, might be worth waiting around for someone more proficient in troubleshooting that sort of error.
16:10 forrest *then
16:10 BadLuck thanks for your help
16:10 jslatts joined #salt
16:12 redondos joined #salt
16:16 Furao joined #salt
16:21 toastedpenguin joined #salt
16:22 jcockhren joined #salt
16:22 jcockhren left #salt
16:23 forrest yea np BadLuck, sorry I didn't have a solution
16:23 jcockhren joined #salt
16:24 devinus joined #salt
16:24 Lue_4911 joined #salt
16:24 CheKoLyN joined #salt
16:25 adepasquale joined #salt
16:28 SunSparc joined #salt
16:30 halfss joined #salt
16:30 Thiggy joined #salt
16:31 jacksontj joined #salt
16:33 Ryan_Lane joined #salt
16:33 tedski joined #salt
16:35 tedski good morning... i'm using saltstack 0.16.4 on ubuntu 12.04 with gitpython 0.3.2rc1.  I'm unable to use gitfs as a fileserver_backend.  salt-master shows the error: [WARNING ] GitPython exception caught while fetching: len([]) != len(['Permission denied (publickey).', ''])
16:35 tedski the key is in ~/.ssh/id_rsa of the user salt-master is running as
16:35 tedski as that same user, i'm able to clone the repo over ssh
16:36 Furao joined #salt
16:37 m0s joined #salt
16:39 m0s hi guys, quick Q for you. what about https://github.com/saltstack/pepper ? seems that there were no progress last 3 month. any news on that? or is there any other tool with a same purpose?
16:39 shinylasers joined #salt
16:42 [vaelen] joined #salt
16:44 eculver joined #salt
16:44 eculver joined #salt
16:44 Ahlee oh man. I wish I'd have seen that before creating an almost exact replica of it.
16:45 cro Ahlee: Did you publish yours?
16:46 boite joined #salt
16:49 Ahlee cro: nah, can't open source it
16:49 cro Ahlee: np
16:52 forrest tedski, is that the latest release of gitpython? I know sometimes there are issues with older releases.
16:54 teebes joined #salt
16:58 terminalmage tedski: that error suggests that you have an auth issue
16:59 terminalmage en(['Permission denied (publickey).', ''])
16:59 terminalmage I meant: ['Permission denied (publickey).', '']
16:59 jacksontj joined #salt
17:01 terminalmage I've never gotten that error with gitfs and a key
17:01 bitz joined #salt
17:01 mr_chris joined #salt
17:02 faldridge_ joined #salt
17:02 terminalmage what are the permissions on the private key?
17:02 mr_chris Why is it that running test.ping only returns something when true but nothing when false? It's sort of useless like that.
17:02 tedski terminalmage: i know, but, auth works just fine outside of salt
17:03 bemehow joined #salt
17:03 terminalmage mr_chris: test.ping tests if the minion is able to communicate. The master just displays the return data from the minion. Why would you expect that it would display any return data if there is nothing to display?
17:04 mohae joined #salt
17:04 terminalmage mr_chris: you can use the "-v" option to see which minions aren't responding to a given command
17:04 terminalmage tedski: what are the permissions on the key?
17:04 terminalmage the private key
17:05 mr_chris terminalmage, I figured that if the salt master has a key for a server and test.ping is not successful, that "False" would be a good indicator of it. For example, you have 150 servers and you want to ping all of them, "False" would be much easier to pick out in that than looking for the one that isn't there.
17:05 mr_chris I haven't tried -v yet.
17:06 terminalmage mr_chris: that's just not how salt works. it displays the return data from functions that it tells the minion to execute
17:06 tedski terminalmage: 0600
17:06 terminalmage if the minions aren't communicating, they can't respond
17:06 mr_chris terminalmage, -v is actually helpful here. "Minion did not return"
17:06 jacksontj joined #salt
17:06 terminalmage mr_chris: yeah, -v is the way to go
17:07 terminalmage mr_chris: you can also use the manage.down runner to get a list of minions that do not respond
17:07 tedski terminalmage: i'm connecting to an enterprise github instance if that matters
17:07 mr_chris That's true that they can't respond, but that's no reason the the master shouldn't tell you about it. It's good for reporting purposes.
17:07 terminalmage mr_chris: salt-run manage.down
17:07 mr_chris Ah cool.
17:07 mr_chris Thanks for the tips.
17:08 tedski terminalmage: doh!
17:08 terminalmage mr_chris: the master will tell you about it, with -v
17:08 tedski i think it's a typo on my end
17:08 tedski hah
17:08 terminalmage tedski: lol really
17:08 terminalmage ?
17:08 mr_chris Indeed it does. Thanks again.
17:08 terminalmage whoops
17:08 tedski of course, right?
17:08 tedski monday
17:09 terminalmage mr_chris: no prob. using -v is a more elegant solution, code-wise, than writing something that interferes with the way that salt fundamentally works. try using "salt-run manage.down", I think that will be quite helpful in helping you identify minions which aren't talking to the master
17:10 mr_chris terminalmage, I did. That works well too. Could you please explain how salt is fundamentally intended to work in this context?
17:10 terminalmage mr_chris: yours is a common question
17:11 mr_chris I guess that means I was negligent in my googling, then.
17:12 terminalmage mr_chris: master tells minions to do things. master then listens on a zeromq socket for minions returning results. master displays results.
17:12 terminalmage mr_chris: the master is not what is running the functions, these are all happening client-sidfe
17:12 terminalmage client-side
17:13 mr_chris And so they don't report something that isn't there.
17:13 mr_chris Makes sense.
17:14 mr_chris So it, being the master, doesn't report something that isn't there, that something being a response from the client.
17:14 terminalmage yeah, they only report what they get back. the manage.down runner is designed to address this specifically. it's still run from the master, but it knows what it's looking for and can display better information. this is because runners are executed on the master, rather than the minions
17:14 terminalmage mr_chris: correct
17:15 mr_chris Thanks for clarifying.
17:15 terminalmage no prob. salt is a many-headed beast. :)
17:16 terminalmage mr_chris: I am going to add your question about test.ping to the FAQ we recently added to the docs, if it is not already there
17:16 pipps1 joined #salt
17:16 terminalmage we do get this question frequently in the IRC
17:16 mr_chris I don't see it there.
17:17 terminalmage mr_chris: ok, give me a few and it will be there :)
17:17 jaequery joined #salt
17:17 mr_chris Thanks. I will check there first next time I have what would seem like a common question.
17:18 JoAkKiNeN joined #salt
17:18 terminalmage mr_chris: cool. and please let us know if there is anything else we can add to it. this is a new page (added within the last week or two), and we want to make it as helpful as possible.
17:19 mr_chris Q: Why is the communicate between the minions and master sporadic and wonky? A: Check the versions of the minions and master. Make sure they match.
17:19 forrest terminalmage, while you're updating the faq, you should add a link to the troubleshooting docs on that page.
17:20 terminalmage forrest: ooh, good idea
17:20 forrest and vice versa on the troubleshooting page
17:20 forrest Or I'll do it when I get home so you don't steal mah commits
17:21 forrest Another good one on the faq would be restarting the service after an upgrade, as well as clearing the cache files.
17:22 terminalmage mr_chris: you don't always need to have the same versions of master and minion. it's true that certain version bumps make this necessary, but that's not the case most of the time. what we see causing this issue more often than not is using zeromq2 instead of zeromq3
17:22 luminous question: when processing sls and jinja templates, does salt keep track of what sls it is on, such that a jinja error might lead to telling us where the bad .sls is?
17:22 terminalmage forrest: clearing the cache after an update really should not be necessary
17:22 forrest I meant them as two different line items, my bad
17:23 luminous Rendering SLS ssl failed, render error: Traceback (most recent call last): <<< is helpful, but I imaine we can go further?
17:23 terminalmage luminous: it tells you right there, "ssl"
17:24 forrest terminalmage, so item 1: restarting the service after upgrade. item 2: Clearing cache files when you don't see updates.
17:24 terminalmage forrest: what do you mean by "when you don't see updates"
17:24 mr_chris terminalmage, Makes sense.
17:25 forrest A pretty common question is that people will update a state, run it, and the error output is identical. Had this problem yesterday with some mysql credentials, so the error was still spitting back the old data.
17:25 luminous terminalmage: I noticed the detail after posing the question, but I'd have simply reworded my question. so.. is it difficult for salt to give us more info when running into problems rendering .sls?
17:25 forrest are you running the debug option luminous?
17:25 terminalmage forrest: there might have been some sls caching issues, but I think those are resolved
17:26 forrest terminalmage, on what release? The guy yesterday was on 0.16.4
17:26 terminalmage luminous: well, the issue here is that it's just loading one big string of yaml
17:26 luminous yea, so that is a bit difficult
17:26 terminalmage and that error is coming from yaml.safe_load
17:26 luminous is that one string per .sls?
17:26 terminalmage yaml.safe_load()
17:26 terminalmage yeah, each sls file is rendered individually
17:27 luminous tricky
17:27 terminalmage luminous: also, giving the line number isn't feasible because we allow templating
17:27 terminalmage so what gets fed to the yaml loader is often different from what was in the .sls file because of lines conditionally added by the templating
17:27 luminous yep
17:28 terminalmage and the jinja directives not being present in the result of the templated text
17:28 luminous and approximate line nubmers isn't so great
17:28 terminalmage yeah
17:28 forrest that reminds me, is there ever going to be an equivalent to 'puppet parser validate' added?
17:28 forrest basically just a syntax check?
17:28 forrest or maybe I missed it somewhere in the docs (or you just use test)
17:28 terminalmage terminalmage: we have a couple bug reports for sls caching, which I have not been able to replicate against git
17:29 luminous so, thinking aobu this, I think the best next step for render / sls / etc errors would be to provide a better format for the error
17:29 terminalmage her
17:29 bhosmer joined #salt
17:29 terminalmage er...
17:29 terminalmage forrest: we have a couple bug reports for sls caching, which I have not been able to replicate against git
17:29 forrest yea I figured that was aimed at me
17:29 luminous terminalmage: pythonistas are used to tracebacks, but they scare regular folks
17:29 terminalmage I'm talking to myself now... that's when you know you're about to go crazy :D
17:29 forrest lol
17:29 tedski maybe it wasn't the typo
17:29 tedski - git+ssh://git@github.corp.domain.com:user/repo.git
17:30 terminalmage luminous: true. yeah, we pass through the error from the loader and that's about as good as we can do right now
17:30 tedski am i nuts or is that syntactically correct
17:30 forrest It's just something I notice people encounter every once in a while, they come into the chat, then we notice the updates aren't there, clear the cache, restart, the service, and it's ready to rock
17:30 terminalmage tedski: this is your remote?
17:31 tedski yes
17:31 tedski in gitfs_remotes:
17:31 terminalmage tedski: can you try removing everything up to and including the double-slash?
17:31 terminalmage and before you try testing, delete your gitfs cache on the master
17:32 tedski so, just use git@...
17:32 terminalmage tedski: /var/cache/salt/master/gitfs
17:32 terminalmage tedski: yeah, try that
17:32 terminalmage I haven't tried authenticated gitfs_remotes before, so I'm just guessing on this
17:33 tedski okay
17:33 devinus joined #salt
17:34 renoirb anybody has experience with cron.set_env in a state definition?
17:34 renoirb AS I read in the docs, cron is a module and cannot be directly defined in a state file
17:35 BadLuck joined #salt
17:35 terminalmage renoirb: cron.set_env adds environment variables to the top of the "these lines are managed by salt" area of the rendered crontab
17:35 pipps joined #salt
17:36 renoirb terminalmage: sure, i'd like to add a MAILTO env variable through it
17:36 terminalmage so, they're global, making it unfeasible to support this in states since you can have them spread out
17:36 terminalmage renoirb: we have an open issue to make set_env work with states
17:36 renoirb terminalmage: so it means I would have to create a file in /etc/profile.d/  instead then
17:37 terminalmage renoirb: I don't follow
17:37 terminalmage renoirb: https://github.com/saltstack/salt/issues/7014
17:37 renoirb I wanted to add a environment variable for my cron tab to ensure the MAILTO variable is a specific email
17:37 renoirb thanks terminalmage
17:38 renoirb it explains why I have issues with it
17:38 terminalmage yeah, right now you have to run that with a module function
17:38 terminalmage with states, as you can see in my comment in 7014 there, I need to do some testing on different platforms to make sure that it is implemented properly
17:38 jslatts joined #salt
17:39 terminalmage it's on the roadmap though
17:39 renoirb anyway, terminalmage the current use case for such is something that can be done differently. It is fair enough to not be a priority then :)
17:39 KyleG Hey guys, I moved a server to a new host and it seems that the master cached the hostname "localhost.my.domain" for this new box, even though the hostname is now properly set. Is there a specific cache directory I have to empty on the master to make it recognize the correct new hostname?
17:40 terminalmage KyleG: delete the key from the master
17:40 terminalmage salt-key -d localhost.my.domain
17:40 KyleG did
17:40 terminalmage ok
17:40 KyleG I just got past it, I manually set the id: in the minion config
17:40 terminalmage ok, then if you restart the minion it should try to auth with the new id
17:41 KyleG yeahp that worked
17:41 terminalmage cool
17:41 m_george left #salt
17:42 Ryan_Lane joined #salt
17:42 KyleG thanks
17:43 aat joined #salt
17:44 mesmer joined #salt
17:46 BadLuck Hi, everything worked and I good this problem on my windows minion. The command "salt 'ssclientWin2' test.ping" is working, but if I try "salt 'ssclientWin2' state.sls test -v t 60" (test.sls can be empty and I got the same problem) I got "Minion did not return". I restarted, rebooted, reinstall... sane issue. Anyone have an idea?
17:46 forrest no progress huh BadLuck
17:46 BadLuck no
17:47 BadLuck I fons something on internet, but I did not undestand his fix
17:48 BadLuck "add a crontab on salt-master with a test.ping" supposed to be a fix, but I don't understant wat is a "crontab"
17:49 Tekni joined #salt
17:50 forrest I don't see how adding a crontab entry would fix that
17:52 BadLuck Someone is writing : "I will try to add a crontab on salt-master with a test.ping. I think it would avoid firewall timeouts."
17:52 logix812 joined #salt
17:53 BadLuck and later he is writing "Yes, it works !!!"
17:53 drags BadLuck: it sounds like that user had a mis-configured or overly restrictive firewall
17:53 forrest agreed
17:54 forrest I don't think you're encountering that issue BadLuck, it works fine as a command for you, then immediately fails as a state file
17:55 BadLuck yes, it's was working... I tought I broke my .sls and I clear it. Never work after
17:55 dave_den BadLuck: is your sls file empty?
17:55 BadLuck I readd a echo command inside
17:55 Katafalkas joined #salt
17:56 felixhummel joined #salt
17:56 BadLuck now there is something like "echo bla > c:/blattxt  cmd.run"
17:56 dave_den BadLuck: on the minion, try doing: salt-call -l debug state.sls test
17:57 BadLuck thanks, I' trying that
17:57 forrest he's been seeing output on the minion when we were messing with this before dave_den
17:58 BadLuck I see a lot of thig, but this seem interesting "←[01;31mData failed to compile:←[0m" , "SLS test does not render to a dictionary←[0m",   "Error when rendering state with contents: echo bla > c:/blat.txt cmd.run←[0m"
17:58 dave_den sorry, i haven't read the backlog.
17:59 mesmer joined #salt
17:59 dave_den BadLuck: your sls file does not seem to be formatted properly
18:00 BadLuck I will tri to fix this first. I was trying an empty file and I added an echo. I probably did a mistake
18:00 dave_den BadLuck: http://pastebin.com/Je4HJAm2
18:01 BadLuck My network configuration blck this website
18:01 dave_den make sure there are 4 spaces in front of cmd.run
18:01 dave_den echo hi:
18:01 dave_den cmd.run
18:01 BadLuck 4 spaces? ok.. i did not know the number of space matter
18:01 dave_den ^ 4 spaces before cmd.run
18:02 BadLuck ok, I retry
18:02 dave_den BadLuck: yes, the sls file needs to be in proper yaml format.
18:02 jacksontj joined #salt
18:02 BadLuck ok, no error now
18:02 forrest lol
18:02 forrest awesome
18:02 faldridge joined #salt
18:03 BadLuck with the other commant on the minion
18:03 BadLuck I did not try on the master
18:03 dave_den BadLuck: http://docs.saltstack.com/topics/troubleshooting/yaml_idiosyncrasies.html
18:03 Thiggy joined #salt
18:03 BadLuck on the master: did not work
18:03 BadLuck still "Minion did not return"
18:03 saurabhs joined #salt
18:04 Katafalkas joined #salt
18:05 BadLuck I did a mistake in the .sls, but I dont think it's my real problem
18:05 dave_den badluck: if you change your minion config, change your log_level to log_level: debug
18:05 dave_den then restart your minion and try to send the state.sls test again
18:05 dave_den see if anything shows up in the minion's log file
18:06 BadLuck ok, I will try
18:06 racooper joined #salt
18:07 BadLuck I have a lot of thig, but I see this "[WARNING ] The minion function caused an exception: Traceback (most recent call last):" "File "salt/minion.py", line 633, in _thread_return"
18:08 BadLuck and I saw this "KeyError: 't'"
18:08 dave_den BadLuck: what version of salt are you running on the minion?
18:08 BadLuck 0.16.3
18:09 BadLuck on my minion and master
18:09 BadLuck on minion I installed "Salt-Minion-0.16.3-AMD64-Setup.exe"
18:11 dave_den BadLuck: it should definitely not be raising an exception - can you post the minion's debug log file when you ran 'salt  …. state.sls test' so we can see it?
18:11 BadLuck Ok, I will add it. ad I will post the link. thanks
18:14 BadLuck I post the minion log at https://groups.google.com/forum/#!topic/salt-users/I08n6MqXYU8 (the lastest comment)
18:17 Koma joined #salt
18:18 dave_den BadLuck: can you try removing the output redirect from test.sls?  delete the '> c:\test.txt:  part
18:18 BadLuck ok
18:19 BadLuck "Minion did not return"
18:19 bemehow_ joined #salt
18:19 dave_den BadLuck: do you still see the "KeyError 't'" in the minion log?
18:20 BadLuck yes
18:20 BadLuck and thank for this help
18:21 dave_den you're welcome
18:21 BadLuck "[WARNING ] The minion function caused an exception: Traceback (most recent call last):"  "KeyError: 't'" without the "> c:\test.txt"
18:22 dave_den well it seems like it's definitely a bug in the state rendering. i don't have windows installed, so i can't test it myself, sorry :(
18:22 KennethWilke joined #salt
18:23 BadLuck ok, thanks
18:23 BadLuck I will try with another PC
18:24 BadLuck if it's work with another PC, I will be "unblocked"
18:24 dave_den [DEBUG   ] Skipping empty.txt, it does not end with an expected extension
18:25 dave_den do you have a file named empty.txt in the directory or subdirectories of c:\salt   ?
18:25 BadLuck I will search
18:25 dave_den also, if you can post your minion config that may help.
18:25 BadLuck I have 4 "empty.txt"
18:25 dave_den where?
18:26 BadLuck conf/pki/empty.txt
18:26 BadLuck var/cache .... 2x
18:26 BadLuck var/run/empty.txt
18:26 BadLuck and they are empty
18:27 BadLuck my config is 409 line, seems big for the forum
18:27 dave_den try removing the entire var/cache directory and restarting your minion
18:28 BadLuck already tried, but I will retry to see if this warnig disapear
18:29 saurabhs Hi I had a question around salt extended salt modules. If I write a custom module, do I have to copy it to every minion or salt master will take care of it (just like it pushed states and pillar to the minion)
18:30 BadLuck the "empty.txt" error is gone, but I still have the "no return"
18:30 dave_den saurabhs: this might help: http://docs.saltstack.com/ref/file_server/dynamic-modules.html
18:30 terminalmage saurabhs: http://docs.saltstack.com/ref/modules/index.html#modules-are-easy-to-write
18:32 dave_den BadLuck: sorry, i think that's about all i can recommend to try for now. hopefully the mailing list might have other suggestions.
18:33 jslatts joined #salt
18:33 BadLuck perfect, thanks, I will try with my other PC and hope
18:34 saurabhs dave_den: Thanks thats helpful
18:34 saurabhs terminalImage: thanks
18:36 berto- joined #salt
18:38 nfx9 joined #salt
18:40 mohae BadLuck, do you have any tabs in your file?
18:40 jacksontj joined #salt
18:40 BadLuck no tabs, just 4 spaces
18:41 BadLuck the same file is working on a PC ans fail on another PC.
18:43 mohae oic, from your forum post. It looks like it doesn't like the path declaration...can you try /C/ instead?
18:43 berto- joined #salt
18:43 zooz joined #salt
18:44 BadLuck I removed " < c:\text.txt"
18:45 mohae oh, sorry
18:45 BadLuck no problem, can be hard to follow what I tested :)
18:49 nfx9 joined #salt
18:53 mohae BadLuck: It looks like there is a 't' coming from your state.sls as an arg. Could this be causing the error? It looks like it looks for a jid that then includes the jid of the state.sls, your output ends shortly there after
18:53 tuxIO joined #salt
18:54 mohae or is state.sls a salt thing? I need to keep diving deeper, apparently
18:56 BadLuck I need to open state.sls?
18:57 mohae BadLuck, no, I was just looking through your output. There's a state.sls that gets processed, including an array of args.
18:57 wangofett joined #salt
18:57 mohae I'm thinking that's where the 't' comes from that is causing the error...but that's a wag
18:58 mohae BadLuck, what is it your trying to do, maybe I can try and replicate in my environment
18:59 BadLuck Right now, I just want to make it work, then my test.sls is "echo hi:     cmd.run" and I run "salt 'ssclientWin2' state.sls test -v t 60" I do not pass any argument
19:00 BadLuck I do not pass any argument in my .sls nether in my command
19:00 BadLuck false... I hae test -v t 60
19:00 BadLuck t?
19:00 BadLuck hummm
19:01 BadLuck not that bad
19:01 mohae BadLuck, ya,
19:01 BadLuck -t?
19:01 mohae BadLuck: I look at the line of output that says: command details {'tgt_type': 'glob', 'jid': '20130916140655489769', 'tgt': 'ssclientWin2', 'ret': '', 'user': 'sudo_ubuntu', 'arg': ['test', 't', '60'], 'fun': 'state.sls'}
19:01 mohae looked*
19:01 BadLuck *%?*$*%*/$%%
19:01 BadLuck that is
19:02 BadLuck thanks you very much
19:02 BadLuck stupid mistake
19:02 mohae BadLuck, np, spurrious characters are the bane of our existence sometimes
19:05 cachedout joined #salt
19:08 dave_den mohae: ah, good catch.
19:08 BadLuck_ joined #salt
19:09 dave_den if that's not already fixed in develop, we should open an issue to make sure salt-minion doesn't choke on that
19:09 Thiggy joined #salt
19:10 BadLuck_ thank you, IT's my stupid miskate, but can I add a suggestion? To have a message like "invalid agrument" instead of "minion did not return"
19:11 dave_den BadLuck_: yes, that is a bug and should definitely be fixed.
19:12 whyzgeek joined #salt
19:12 pdayton joined #salt
19:15 pipps joined #salt
19:16 eculver joined #salt
19:16 eculver joined #salt
19:19 m_george|away joined #salt
19:20 faldridge_ joined #salt
19:20 diegows joined #salt
19:21 baniir joined #salt
19:21 jbunting joined #salt
19:24 Thiggy joined #salt
19:25 tonthon Hi, is there a way to override a pillar value ?
19:25 tonthon I've got a main one and I'd like to override it for some specific minions
19:26 baniir does the gem state support rbenv
19:26 tonthon I've tried the following : http://pastealacon.com/33156 but it doesn't work
19:31 KyleG1 joined #salt
19:33 mesmer joined #salt
19:33 KyleG joined #salt
19:33 KyleG joined #salt
19:36 m_george left #salt
19:39 kermit joined #salt
19:47 Khollowa_ joined #salt
19:50 ronc joined #salt
19:50 Ryan_Lane1 joined #salt
19:55 Ryan_Lane joined #salt
19:56 jacksontj joined #salt
19:58 hjubal joined #salt
19:58 hjubal joined #salt
20:08 Brad_K joined #salt
20:08 Brad_K joined #salt
20:08 KyleG1 joined #salt
20:08 mmilano joined #salt
20:08 Brad_K that's interesting.  i have 0.16.4.
20:08 p3rror joined #salt
20:09 zooz joined #salt
20:11 KyleG joined #salt
20:11 KyleG joined #salt
20:18 Brad_K also interesting that the chat logs are hosted at http://bit.ly/9ozmm5, when salt is written in Python.  This might be an interesting topic to take up with the PSF, and see if any official http://bit.ly/9utVfi facilities could be used towards this end.
20:19 Thiggy If I have a runner that calls client.cmd to run some stuff on a minion, can I inspect the return value from that to see if it timed out or if it actually completed? Does anyone have an example of that?
20:20 Brad_K i saw something recently on the salt-users list about a call timing out and producing output to that effect on the salt-master.
20:22 oz_akan_ joined #salt
20:23 Brad_K Thiggy: see http://bit.ly/dZPFZN
20:23 Thiggy @Brad_K that link took me to the google groups homepage
20:23 Thiggy But I should be able to find it from here, thanks!
20:25 Brad_K Thiggy: sorry, the link I posted worked for me, but the shortened bitly version doesn't.  Dunno how that's getting in there.
20:25 Thiggy I found the salt-users group and subscribed, I'm searching around for timeout related posts.
20:26 Brad_K Thiggy: it's one of the most recent threads.  The subject is "Minion did not return".
20:26 Thiggy Ah there it is. Thank you
20:27 baniir joined #salt
20:27 Brad_K Hope that's useful.
20:30 pdayton1 joined #salt
20:31 carlos_ joined #salt
20:32 carlos_ joined #salt
20:33 jacksontj joined #salt
20:44 Brad_K brb
20:55 Thiggy Is anyone using gitfs with a standalone minion (`file_client: local` on the minion)?
21:01 aptiko joined #salt
21:04 \ask Thiggy: no, but we use it with reasonable success on the master...
21:05 \ask speaking of file_client – is there a way to do things differently in an .sls based on the file_client setting?
21:05 Ryan_Lane1 joined #salt
21:05 Thiggy @\ask I'm using it on our master too. I'm wanting to setup a masterless minion to do dev/testing on, but this may be more complicated than it's worth…
21:05 \ask basically I want to skip a bunch of rules if file_client: local   (we use that in our vagrant boxes for testing salt rules, so I don't want it to run the stuff to configure/start the salt-minion).
21:06 \ask Thiggy: ah, funny -- the way I've been doing that is to just have a checkout of the git repo that I test from; that works better for my workflow because then I can keep fussing with it until it works and then I commit/push.
21:06 \ask the one problem I run into is our "saltminion" sls that'll mess with the local setting.
21:08 nickname1234 joined #salt
21:08 nickname1234 Question: how can I do targeting in individual salt states?
21:08 pipps joined #salt
21:09 nickname1234 Instead of just the top file.
21:09 nickname1234 The reason I'd like this functionality is so I can have a set of states (the highstate) that executes periodically enforcing those states
21:09 nickname1234 then a particular state that only gets executed manually from the salt master
21:10 Thiggy \ask: you can query the minion config via config.get
21:10 Thiggy \ask: http://d.pr/i/nZxL <-- you should be able to use that in a jinja template
21:12 cjh if i have multi masters setup in salt should it show that in my grains?  it only shows one master
21:13 renoirb hey people, is it possible to use in the same state declaration a file.managed and a file.append?
21:14 Ryan_Lane joined #salt
21:14 Thiggy @renoirb according to this comment from UtahDave, no. https://github.com/saltstack/salt/issues/4508#issuecomment-20771923
21:15 renoirb Thiggy: oh, but it is two different
21:15 renoirb file.managed, file.append
21:15 renoirb not the same key then
21:15 renoirb it says "contains multiple state decs of the same type"
21:16 Thiggy but they both come from the file module, which is I think what kills it? "you can't have have two functions from the same state module under the same
21:16 Thiggy ID declaration."
21:16 nickname1234 Thiggy: is right
21:16 renoirb oh, i see
21:19 jacksontj joined #salt
21:19 sfello joined #salt
21:22 Thiggy \ask: Do you use branching in your gitfs setup?
21:23 KyleG joined #salt
21:23 KyleG joined #salt
21:24 nickname1234 is there a way to set the environment at runtime?
21:29 Thiggy @nickname1234 some (a lot?) of module functions can accept a env parameter. "salt.modules.state.sls(mods, env='base', test=None, exclude=None, queue=False, **kwargs)"
21:34 nickname1234 hmm
21:36 nickname1234 Looking at that again, it wouldn't be ideal to use environments in this case
21:36 Thiggy @nickname1234 can you do something with grain targeting to solve your minion targeting problem?
21:36 nickname1234 See Thiggy , I basically want a production environment that gets enforced on a cron job, then a release module that gets executed manually
21:37 Thiggy Have you considered runners, or using the salt reactor?
21:37 nickname1234 but I want to be able to structure that release script like a top file, so that I can target nodes specificially
21:37 saurabhs hi I didn't find good docs on extending grains. http://docs.saltstack.com/topics/targeting/grains.html#writing-grains is not very clear on what this file needs to contain. Should it contain a fixed method which will be called by salt or what? are there some sample for custome grains
21:37 nickname1234 I probably could do it with grains, but it's not as clean looking
21:37 nickname1234 what are salt runners?
21:38 Thiggy moment plz.
21:39 nickname1234 Reading the docs for salt runners, I don't think that will fit
21:39 nickname1234 http://docs.saltstack.com/ref/runners/index.html
21:39 Thiggy http://docs.saltstack.com/ref/runners/index.html <-- they let you run code from python modules, they're super easy to write. you can just call salt-run mymodule.myfunction and it'll execute it
21:39 nickname1234 but it executes on the master, not the minions
21:40 Thiggy If you look at the example at the bottom of the page, it shows how to target minions and execute commands on them
21:42 ronc joined #salt
21:42 faldridge joined #salt
21:44 nickname1234 hmm yeah I see that now
21:44 nickname1234 I'm still not sure that's what I want
21:45 devinus joined #salt
21:47 colinbits joined #salt
21:48 colinbits I have a list of users I want to add to a server. And depdendent on the services running I want to make sure thoughs users are adding to a group. Is there a way I can do this without the user.present state?
21:49 colinbits ServerA -> http -> webgroup, ServerB -> nginx -> nginxgroup
21:50 jacksontj joined #salt
21:50 colinbits I know i can add a pillar point and say if_httpd, or if_nginx in my sls and then add the group. But it would be nice for when I was declaring the service I could add them there
21:51 jacksontj joined #salt
21:53 eliasp joined #salt
21:54 jslatts joined #salt
22:03 bhosmer joined #salt
22:05 kermit joined #salt
22:05 copelco joined #salt
22:12 renoirb hey people
22:12 renoirb how can we say we require a cron?
22:12 renoirb pkg?
22:13 drags renoirb: require that a cron job is setup?
22:13 renoirb yes
22:13 renoirb i have a pillar that define a task to run
22:14 drags I would setup the job by dropping a file.managed file in /etc/cron.d, then you can 'require' on that file resource
22:14 renoirb a file that is file.managed
22:14 renoirb and I want to be sure the crontab exist
22:14 Brad_K that works for clients that use /etc/cron.d.  but that won't work on clients that use some other method of controlling cron.
22:15 Brad_K or clients that don't have any kind of cron, like Windows.
22:15 renoirb drags: My cron service is similar on https://github.com/kevva/states/blob/master/cron/init.sls
22:15 renoirb I have the appropriate pillar to make it so.
22:16 drags renoirb: oh, I didn't even know about the cron module :x
22:16 renoirb in the pillar, the name of the {{ job }} would be a shell script
22:16 nickname1234 What is the reason for the "base" environment being authoritative? Shouldn't salt execute the states from the environment I tell it to?
22:16 renoirb oh :x
22:16 renoirb :)
22:16 drags I would imagine it's the same as other require's though, 'require: - cron: <job>'
22:16 drags but I'm just guessing now :)
22:17 renoirb do you know drags where to find all the possible 'require' values?
22:17 renoirb it is unclear what can be 'require'-d
22:19 drags renoirb: I think any state can be managed with require: http://docs.saltstack.com/ref/states/requisites.html#require
22:19 renoirb drags: yeah, by calling an other state file
22:19 renoirb i was thinking if it is possible by the key of an other one
22:19 drags renoirb: generally it's called by key, not by the state file
22:20 renoirb e.g. I have a state hello-key:  with stuff, and then later I can do require: - pkg: hello-key
22:20 renoirb but doesn't work
22:20 drags can you paste that state file?
22:20 renoirb more than one :)_
22:20 renoirb :/
22:20 drags heh
22:20 renoirb wait, ill create a pastie
22:20 drags is hello-key similar to:
22:20 drags hello-key:
22:20 drags pkg.<something>
22:20 drags or is hello-key the filename?
22:22 falican joined #salt
22:23 halfss joined #salt
22:26 renoirb drags: https://gist.github.com/renoirb/6587436
22:26 renoirb see
22:26 pdayton joined #salt
22:26 redbeard2 joined #salt
22:27 carlos_ joined #salt
22:28 drags renoirb: cool, couple things here
22:28 drags first, does the pillar-cron-piwik file apply currently?
22:28 drags I think it should be like:
22:28 renoirb sure drags  :)
22:28 drags pikwi_archive_con:
22:28 renoirb not on all
22:28 drags cron:
22:28 drags <opts>
22:29 drags (man I am a bad speller)
22:29 UtahDave joined #salt
22:30 renoirb but the point of the salt/cron/init.yml for loop is to actually add them only when needed, I wonder how I could augment that cron.present block with a require of an external file.managed from there
22:30 renoirb i am never sure how i can create a key and add multiple definition
22:31 drags renoirb: for the original question: the 'require' on line 29 of the first file should be:
22:31 drags - require:
22:31 drags - cron: piwik_archive_cron
22:31 renoirb e.g. salt-cron-init.yml file, I could add an optional require: file: {{ args.get('managed_script') }} in a if block and add a 'managed_script': pointing to my file.managed
22:31 renoirb oh!!!
22:32 renoirb require: cron
22:32 renoirb sure!
22:32 renoirb hahaha
22:32 renoirb you can do that then
22:32 renoirb i wasn't sure
22:32 drags yar, to your question about "what can be required", I'm not sure if there's a list, but according to the docs it seems like any defined module would work
22:32 drags so, 'pkg', 'file', 'cron', etc.
22:34 drags and the arguments to those are the 'name' of the resource (ex: - pkg: 'php-piwiki', - file: '/srv/webplatform/piwik/tmp', - cron: 'piwiki_archive_cron')
22:34 alunduil joined #salt
22:36 renoirb drags: do you know a command that can list those defined modules ?
22:36 jacksontj joined #salt
22:36 pipps1 joined #salt
22:37 drags renoirb: http://docs.saltstack.com/ref/modules/all/index.html#all-salt-modules
22:37 drags this is the built in list, and the list changes depending on the environment the minion is running in
22:38 drags custom modules can also be added
22:38 baniir joined #salt
22:38 renoirb oh, drags, you just glued things in my mind now, thanks :)
22:38 drags nice!
22:39 renoirb this means we can require a pillar?
22:39 drags yeah I've only been scratching the surface of salt, and there's a lot of good doc available, but it takes a couple readings to congeal and for the concepts to emerge
22:40 cro joined #salt
22:42 drags renoirb: not sure about requiring a pillar, do you mean just the existence of the pillar on the master?
22:45 renoirb yes, drags. But that's fine, it is fairly easy with a jinja if :)
22:49 juanlittledevil joined #salt
22:50 UtahDave KennethWilke, TheRealBill and other rackers.  Hey, be sure to come by the Salt booth at the partnerpalooza tomorrow!
22:51 juanlittledevil Hi guys. quick quesiton. Can I pass or specify a version number to the pip.installed state module?
22:52 juanlittledevil for installing a specific version of a pip?
22:55 drags juanlittledevil: there isn't an explicit "version" key in the pip.install args, but pip package names can be specified including the version <pkg>==<version>, so you might want to try that
22:55 juanlittledevil so instead of pkgname: use pkgname==version:
22:56 drags juanlittledevil: http://www.pip-installer.org/en/latest/usage.html#examples
22:56 drags indeed
22:56 Ryan_Lane joined #salt
22:56 drags pip install requests==1.2.3
22:56 juanlittledevil worth a try. thanks!
22:56 Ryan_Lane joined #salt
22:56 aat joined #salt
22:59 baniir joined #salt
23:01 halfss joined #salt
23:03 Ryan_Lane joined #salt
23:05 ccase joined #salt
23:13 berto- joined #salt
23:32 berto- joined #salt
23:33 bemehow joined #salt
23:34 bemehow_ joined #salt
23:34 bhosmer joined #salt
23:37 aat joined #salt
23:43 jslatts joined #salt
23:53 pipps1 joined #salt
23:54 forrest joined #salt
23:54 forrest gmail.com
23:54 forrest window fail
23:55 pdayton joined #salt
23:56 dbraden joined #salt

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