Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-06-18

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

All times shown according to UTC.

Time Nick Message
00:02 eculver_ joined #salt
00:05 Furao joined #salt
00:07 eculver joined #salt
00:09 jslatts joined #salt
00:15 Furao joined #salt
00:18 geggam joined #salt
00:31 geggam joined #salt
00:33 EntropyWorks so is is there a salt-master option for script_roots:
00:34 EntropyWorks trying to use salt.states.cmd.script and have setup environments and it doesn't seem to care about the environments set wit root_files: for finding the source
00:35 Furao joined #salt
00:37 Gwayne joined #salt
00:37 Gwayne joined #salt
00:37 robinsmidsrod joined #salt
00:40 bemehow joined #salt
00:44 cxz joined #salt
00:45 Furao joined #salt
00:46 danieljn left #salt
00:47 santagada joined #salt
00:48 danieljn joined #salt
00:48 danieljn left #salt
00:49 danieljn joined #salt
00:49 kermit joined #salt
00:54 djn joined #salt
00:55 Furao joined #salt
01:00 geggam_ joined #salt
01:03 UtahDave EntropyWorks: your scripts should all be in the file_roots.  then you can specify the source as salt://path/to/script
01:04 aat joined #salt
01:06 bemehow joined #salt
01:07 efixit joined #salt
01:09 EntropyWorks UtahDave: so I have https://gist.github.com/EntropyWorks/5801879  moving all the scripts to  /srv/salt/state/base would get ugly
01:09 UtahDave where are they now?
01:09 jacksontj joined #salt
01:10 geggam__ joined #salt
01:11 oz_akan joined #salt
01:13 Corey EntropyWorks: Your hierarchy is weird, I don't fully understand it, and thus it makes me angry.
01:14 copec joined #salt
01:14 EntropyWorks Corey: hehe
01:18 logix812 joined #salt
01:19 cxz hey guys i'm getting this error with salt-cloud
01:19 cxz [ERROR   ] Failed to get node data after 10 attempts
01:19 cxz not sure what i'm doing wrong here
01:19 cxz but this is using the aws/ec2 provider
01:19 santagada joined #salt
01:20 oz_akan joined #salt
01:27 UtahDave cxz: which driver are you using?  aws or ec2?
01:28 erasmas joined #salt
01:28 EntropyWorks UtahDave: well to run I have to move them into /srv/salt/state/base/scripts but was expecting them to able to run from /srv/salt/state/env/aw2_az1/somestate/scripts/blah
01:28 cxz how do i tell UtahDave ?
01:29 Deece joined #salt
01:29 cxz i'm using provider: aws
01:29 UtahDave EntropyWorks: why can't you use the second path?
01:30 UtahDave cxz: try using the ec2 provider.  it's newer and better and faster
01:30 cxz ok thanks
01:30 cxz brb in 10
01:30 UtahDave cool
01:31 jacksontj joined #salt
01:33 Nexpro joined #salt
01:33 cxz ok i can see it's using the deploy script now
01:33 cxz thanks
01:33 cxz !
01:33 mgw joined #salt
01:34 jacksontj joined #salt
01:34 UtahDave you're welcome!
01:40 * timl0101 is there a way to call
01:41 Corey t0rrant: Ghostbusters?
01:41 Corey timl0101: ^
01:41 timl0101 :-D
01:41 timl0101 is there a way to call file sources from files.managed in another environment then the sls?
01:41 Corey Good question, not sure. I'd *guess* not, but...?
01:42 timl0101 say my sls is in base but i want files to come from prod, qa, dev.. so i'm not duplicating the same sls files
01:42 timl0101 i may be able to manage with symlinks, but thats not really clean :)
01:43 UtahDave timl0101: yes, you can
01:43 UtahDave let me find the exact syntax
01:43 timl0101 thanks!
01:45 UtahDave it's something like   salt://otherenv@path/to/file
01:46 UtahDave Still haven't found the exact syntax. just a sec
01:46 EntropyWorks UtahDave: I found my problem. its somewhere between the keyboard and the chair... ugh..
01:48 UtahDave EntropyWorks: :)
01:57 pentabular joined #salt
02:00 jacksontj joined #salt
02:05 timl0101 UtahDave:  I see how to include sls files from other environments.  should i be defining a sls in say dev to include the sls from and override the source for that one file?
02:06 UtahDave timl0101: OK, just asked Tom. It's not documented yet.
02:06 dthom91 joined #salt
02:06 UtahDave salt://path/to/file?env=dev
02:09 timl0101 is that available in 0.15.3 or is it upcoming?
02:12 mikedawson joined #salt
02:15 jdenning joined #salt
02:18 pentabular joined #salt
02:18 auser joined #salt
02:19 auser hey friends
02:20 UtahDave timl0101: I think that's in 0.15.3.  That has been there for a while
02:20 UtahDave hey, auser!
02:20 auser I see you (creepy)
02:21 terminalmage joined #salt
02:24 timl0101 UtahDave: thanks.  is it a known issue that an sls file (apparently) cannot include an sls file from another env?  the second one never seems to be processed
02:24 djn joined #salt
02:29 pentabular suckas!  I'm sitting right here @ LinkedIn w/ thatch45!
02:29 auser I can see you too pentabular
02:57 Deece joined #salt
03:03 logix812 joined #salt
03:08 Furao joined #salt
03:08 oz_akan joined #salt
03:11 cxz UtahDave: is there a way to gzip the file.recurse module?
03:11 cxz copying a directory to ec2 seems to take forever
03:11 cxz specifically my ~/.vim/ directory
03:13 jeffmendoza joined #salt
03:24 Corey cxz: I have a couple of thoughts around that. :-)
03:24 cxz cool
03:24 cxz let's here them
03:24 cxz hear*
03:25 Corey 1. my .vim/ directory is in its own repository.
03:25 cxz i hope you aren't going to suggest zipping them
03:25 Corey (managed with vcsh)
03:25 cxz ah i kind of hate that
03:25 kleinishere joined #salt
03:26 Corey 2. You might write a wrapper around a tarball.
03:26 Corey cxz: What's actually in your .vim directory that takes so long to copy?
03:26 cxz plugins most likely
03:26 Corey I mean, my entire tree there is 56K.
03:26 cxz that's what seems to be it
03:26 cxz is that if you do du -skh on it?
03:26 cxz because i find mine to be way more than that ;P
03:26 Corey cxz: Yes.
03:26 Corey Granted, mine is somewhat minimal.
03:26 cxz 9.7M
03:27 cxz i should narrow it down
03:27 cxz alas
03:27 kleinishere joined #salt
03:27 cxz i don't use submodules either for my vim
03:27 Corey cxz: I'm somewhat unconvinced that salt (today, anyway) is the right tool for managing directories full of files like that.
03:28 cxz ok
03:28 cxz i would have thought so too
03:28 cxz it's only for CM
03:28 cxz not much else IMO
03:28 cxz anything other than that is stepping outside the boundaries a bit
03:28 Corey cxz: Yeah, from a sysadmin perspective I justify it with "why do you need to be comfortable editing files on your server, anyway," but that's not helpful. :-)
03:29 cxz haha yeh that too
03:29 cxz well salt can be used for other things
03:29 cxz like for instance setting up development environments
03:29 cxz where you may want editors
03:31 Corey Granted.
03:31 Corey cxz: I'd have it seed the vcsh repo, then just "mr -j8 up" when I log into the instance.
03:31 cxz what does all that mean
03:31 cxz sorry i've never used vcsh
03:32 cxz and what's mr/
03:32 cxz ?
03:32 Corey mr is fantastic for working with multiple repositories, vcsh lets you have different files in the same directory live in separate gitrepositories.
03:33 cxz this seems overly complex for my liking
03:33 cxz and i'm lazy
03:33 cxz :P
03:33 jacksontj joined #salt
03:35 bfrog salty vagrant doesn't deal with the minion config right
03:35 bfrog doh
03:54 quantalrabbit joined #salt
03:56 elbaschid left #salt
03:56 elbaschid joined #salt
03:56 quantalrabbit Anyone familiar with salt.states.pecl?  i want to make sure memcache module is installed but it appears to not work because the installation of memcache prompts for input.
03:57 aat joined #salt
04:00 Corey quantalrabbit: It's a pretty basic state, what's the problem?
04:01 quantalrabbit Corey: it pauses.  won't continue until i press <Enter>
04:01 Corey quantalrabbit: Okay, can you pastebin your state?
04:01 Corey quantalrabbit: Also, which OS are you on?
04:01 jalbretsen joined #salt
04:01 quantalrabbit Corey: Ubuntu 12.04
04:01 Corey k, I have one of those.
04:02 Corey quantalrabbit: Ready when you are. :-)
04:02 quantalrabbit Corey: not much to pastebin.  memcache:   pecl.installed
04:03 quantalrabbit Corey: no dependency problems just that it won't continue without pressing <Enter>
04:05 quantalrabbit doing a "sudo pecl install memcache" reveals that it prompts for "enable memcache session handler support? [yes] :"
04:11 Corey Interesting, I get a traceback.
04:13 james4k how do people typically manage their master's states? like, say you need to push changes to your state trees to production
04:13 Corey james4k: firstly, /srv/salt should be a repository.
04:13 Corey james4k: /srv/pillar (if you use it) should be a separate repo.
04:14 Corey quantalrabbit: Opened https://github.com/saltstack/salt/issues/5603
04:14 Corey quantalrabbit: How'd you step past that, force pecl installation manually?
04:15 quantalrabbit Corey: just pressed enter
04:15 Corey Weird.
04:15 quantalrabbit Corey: it simply stalled for me
04:15 Corey quantalrabbit: I'm not even getting to that point.
04:16 quantalrabbit Corey: what happens when you do "sudo pecl install memcache" ?
04:16 Corey quantalrabbit: pecl isn't installed itself.
04:16 Corey The module is supposed to install it if it's not present, though.
04:17 quantalrabbit Corey: ah... maybe that's expecting too much of salt :)
04:17 Corey quantalrabbit: Which package provides pecl?
04:18 quantalrabbit php-pear
04:18 Corey Okay, once that's installed, memcached installs properly.
04:19 quantalrabbit Corey: using salt?  or from commandline?
04:20 quantalrabbit Corey: did it pause? requiring an Return key press?
04:20 Corey quantalrabbit: None of that.
04:20 Corey [INFO    ] Executing command 'pecl list' in directory '/home/cquinn'
04:20 Corey [INFO    ] Executing command 'pecl install memcached' in directory '/home/cquinn'
04:20 Corey [INFO    ] {'memcached': 'Installed'}
04:20 kleinishere joined #salt
04:20 Corey (This is on 10.04, testing on 12.04)
04:20 quantalrabbit Corey: thanks
04:21 quantalrabbit Corey: if you need to uninstall "sudo pecl uninstall memcache"
04:24 Corey quantalrabbit: Worked correctly here.
04:25 Corey quantalrabbit: Okay, that's interesting.
04:25 Corey It's not actually installing it. :-)
04:25 quantalrabbit try pressing enter
04:25 Corey It's also not hanging.
04:25 Corey It returns successfully.
04:25 Corey [INFO    ] Executing command 'pecl install memcached' in directory '/home/cquinn'
04:25 Corey cquinn@plumbing /etc/apt/sources.list.d % sudo pecl install memecached
04:25 Corey No releases available for package "pecl.php.net/memecached"
04:25 Corey install failed
04:26 Corey Sweet.
04:26 Corey And I misspelled it.
04:26 Corey LOVELY!
04:26 quantalrabbit ha
04:26 quantalrabbit it is memcache without the "d"
04:26 Corey es libmemcached 1.0.x. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
04:26 Corey ERROR: `/tmp/pear/temp/memcached/configure' failed
04:26 Corey LOVELY, and it throws that error but returns 0.
04:27 Corey What kind of morons came up with that one?
04:29 quantalrabbit php5-dev package is also needed to for pecl to install memcache, i think.
04:29 Corey OOh, that's memcached. memecache hangs like you report
04:33 zonk1024 joined #salt
04:35 aat joined #salt
04:46 Deece joined #salt
04:52 quantalrabbit Corey: thanks for confirming
05:00 Boyd joined #salt
05:01 Boyd left #salt
05:02 kojikeneda joined #salt
05:07 middleman_ joined #salt
05:14 brutasse joined #salt
05:16 cxz hey guys i have cloud.providers.d/ec2.conf with 2 defined providers
05:16 cxz but it seems to always use just one
05:17 cxz even though i explicitly told salt-cloud to use my other provider
05:17 cxz hmm i just realized how vague that must have sounded
05:17 cxz basically the profile is not using the right provider
05:17 Corey cxz: Here's a thought, try linking a paste?
05:17 bemehow joined #salt
05:17 cxz ok
05:19 cxz here's my ec2.conf file: http://paste.ubuntu.com/5776149/
05:19 cxz let me upload my profiles
05:20 bemehow joined #salt
05:20 cxz http://paste.ubuntu.com/5776153/
05:20 cxz there's the cloud.profiles.d/ec2.conf file
05:24 quantalrabbit Corey: i've added a bug issue myself to clarify the problem.  https://github.com/saltstack/salt/issues/5604
05:26 auser joined #salt
05:26 lazyguru joined #salt
05:36 bemehow joined #salt
05:38 pcarrier_ joined #salt
05:39 krissaxton joined #salt
05:40 kojikeneda joined #salt
05:41 bemehow_ joined #salt
05:41 pcarrier joined #salt
05:41 pcarrier joined #salt
05:42 kojikeneda Whats the largest install known for Salt? I work for a really large hosting provider and we continually run into scale problems for the apps we test. We are researching salt and would like to know before doing a full blown POC.
05:44 auser I was just at the linkedIn meetup with the guys, LinkedIn has at a minimum 7k servers
05:44 auser I can't speak for larger ones, but I know they have at the lowend, at least 7k
05:44 auser I'm sure there are bigger ones
05:45 auser kojikeneda: ^^
05:46 Corey kojikeneda: Define "really large."
05:47 kojikeneda thats a good start. Without knowing 100% I'd say we are in the range of 25-30k , can you cluster Salt behind a load balancer or whats the recommended architecture?
05:48 Corey kojikeneda: That's not how salt scales.
05:48 Corey kojikeneda: Look into syndic, but additionally, salt can handle a *lot* before it falls over.
05:49 Corey It's a publish subscribe bus that uses a message queue, so as you load it it doesn't fall over or eat resources, it just adds to the queue.
05:49 kojikeneda ok cool, i'll do some reading on it. Just heard about the salt project today so still getting up to speed on how it works. Thank you.
05:53 jacksontj joined #salt
05:55 linuxmyjob joined #salt
05:56 jacksontj_ joined #salt
05:56 Furao 0.15 added multi master
05:56 Ryan_Lane joined #salt
05:57 Corey Actually that's targeted for 0.16.0, Furao
05:57 Furao really?
05:58 Corey SO it is written, anyway. :-)
05:58 Furao but thomas talked about it in last salt air
05:58 Furao http://salt.readthedocs.org/en/latest/topics/releases/0.15.0.html
05:59 Furao well it's not there
05:59 Ryan_Lane joined #salt
05:59 Furao I got so much states that it now takes 18 hours to run the tests suite
05:59 Furao need server with more I/O
06:00 azbarcea joined #salt
06:00 az87c joined #salt
06:01 Corey Furao: That's nutty. :-)
06:01 Corey In today's exciting episode, I took out the webchat a few minutes ago.
06:04 Furao I don't see a good reason to use the webchat
06:05 Furao it's a proxy for NSA anyway :P
06:07 elbaschid left #salt
06:11 waverider joined #salt
06:15 krissaxton joined #salt
06:15 spacedentist joined #salt
06:16 oliv_mc joined #salt
06:17 koolhead17 joined #salt
06:17 koolhead17 joined #salt
06:21 auser joined #salt
06:24 felixhummel joined #salt
06:27 waverider left #salt
06:30 chubrub joined #salt
06:30 jeffmendoza joined #salt
06:32 chubrub hey again, I'm stuck with escaping single quote in awk command when firing cmd.run from template: {{ salt['cmd.run'](' salt --out raw \'*\' network.ip_addrs eth0 | awk -F\' \'{split($6,a," ");split(a[1],b,".");print $4"\t"$2".domain.com\n"$6"\t"$2".int.domain.com\n10.10."b[3]"."b[4]"\t"$2}\' ') }}
06:33 chubrub the error I get is: /bin/bash: -c: line 0: syntax error near unexpected token `('                  /bin/bash: -c: line 0: ` salt --out raw '*' network.ip_addrs eth0 | awk -F' '{split($6,a," ");split(a[1],b,".");print $4"
06:34 chubrub tried many option with escaping and still no luck :( awk is working when i don't give -F\' parameter, but unfortunatelly I need it to separate ips from output
06:34 chubrub maybe some faced the problem before and found solution?
06:35 krissaxton joined #salt
06:36 pentabular joined #salt
06:38 Ryan_Lane joined #salt
06:40 felixhummel joined #salt
06:40 chubrub huh, figure it out :) it has to be fired like this: {{ salt['cmd.run'](' salt --out raw \'*\' network.ip_addrs eth0 | awk -F"\'" \'{split($6,a," ");split(a[1],b,".");print $4"\\t"$2".domain.com\\n"$6"\\t"$2".int.domain.com\\n10.10."b[3]"."b[4]"\\t"$2}\' ') }}
06:41 Furao why you try to do that?
06:41 Furao that burn my eyes
06:41 chubrub so, when cmd.run from template, every single quote has to be escaped (in awk additionally wrapped aroung double quote)
06:42 Furao you're doing bash/awk/sed around salt, not a good idea :)
06:42 chubrub @Furao: generating hosts file
06:42 Furao very bad idea
06:42 Corey What the...
06:42 chubrub hmm, why is that?
06:43 Corey chubrub: Let's take a giant step back here.
06:43 Furao http://docs.saltstack.com/ref/states/all/salt.states.host.html#module-salt.states.host
06:43 Corey chubrub: What's the actual purpose here? :-)
06:43 Furao salt is not an other wrapper around bash
06:43 Furao use jinja template to generate your host file
06:44 Furao that code with awk is totally unmaintainable
06:44 Furao I feel like it's perl in 1997
06:45 chubrub ok, host module could be a solution but I have to generate 3 ips: external, internal and vpn address which is based on internal address
06:46 chubrub yeah, I know that, but this was simplest the solution for me ;)
06:46 Corey chubrub: Right, so this is where jinja makes sense. :-)
06:51 chubrub unfortunatelly I'm not familiar with jinja yet (I started learning python couple days ago) ...
06:52 chubrub but it's good to know that it's possible to do that with jinja, so I can fix it up later ;]
06:52 auser joined #salt
06:52 zloidemon Hello
06:52 auser Hey zloidemon
06:53 zloidemon I have problem again :) How can I run service after upgrade configuration - 1. service name rebuild 2. service name update 3. service name restart instead service restart? :)
06:55 Corey zloidemon: Hmm. have the service rebuild as a cmd.run that watches the package, runs when it the package gets upgraded. Same with the update, tie it together with a semicolon?
06:56 linjan joined #salt
06:56 zloidemon Corey: Thank you. :) It's nsd3 dns server
06:56 felixhummel joined #salt
06:57 nrub joined #salt
07:03 f4cl3y joined #salt
07:05 aranhoide joined #salt
07:13 pentabular1 joined #salt
07:14 pentabular1 Corey is awesome. >:^]
07:19 auser Yes he is
07:21 Corey What'd I do now? :)
07:24 elbaschid joined #salt
07:25 agend joined #salt
07:28 ggoZ joined #salt
07:32 scott_w joined #salt
07:49 pentabular joined #salt
08:01 binaryechoes joined #salt
08:03 dh joined #salt
08:03 koolhead17 left #salt
08:06 chubrub hmm, I got strange message and not using pillar (removed test files from my root_files directory):    - Pillar failed to render with the following messages:     - Specified SLS intefaces in environment base is not available on the salt master
08:07 chubrub I restarted salt-master and minions and it didn't help
08:07 chubrub debug doesn't show anything related also
08:07 Furao your top.sls referer to non-existing files
08:14 chubrub @Furao: thx ;] the problem was with one minion, had to restart minion deamon
08:21 dh Is there a simple way to list all the minions belonging to a certain nodegroup?
08:21 krissaxton joined #salt
08:24 carlos joined #salt
08:25 Newt[cz] joined #salt
08:28 chubrub @dh: is it what you mean? salt -N nodegroup1 test.ping
08:31 dh Not quite, I'd like to avoid making requests to minions
08:31 krak3n` joined #salt
08:32 dh What I want is essentiali pick one random minion from nodegroup
08:32 dh And run command on that single minion
08:33 aat joined #salt
08:33 dh I don't know much about salt archidecture or internals.. I assume that list of minions and their grains etc are cached on master
08:34 dh But test.ping would work as a last measure, even though it would introduce a bit of unwanted latency
08:41 zooz joined #salt
08:57 vaxholm joined #salt
09:08 whiskybar joined #salt
09:28 swann joined #salt
09:29 Mouzz joined #salt
09:35 efixit joined #salt
09:37 Mouzz What is needed to make the states be enforced on the minions automatically? I have a (basic) /srv/salt/top.sls referencing one state file and when I run 'salt '*' state.sls [that one state] manually it works.
09:49 Mouzz Do I need jobs or the scheduler to keep minions in a state maybe?
09:52 jeddi I'm trying to use some jinja to make my database_grants .. can someone spot what's wrong with this?  http://rn0.ru/show/zW5KsTR3P8Brfw3FqhMm/   On the DB host I see only the *last* item in my list, in this case 'User' rights being granted.  If I change the order, then whatever is last on that list then gets added to the db rights list.
09:53 jeddi Mouzz: if you really trust it, then cron it.  but i think the idea is that since you're the one generating changes, you should be initiating  salt when yo'uve made a change (or want to propagate a change).
09:56 Mouzz jeddi: ok, thnx. I thought this also worked like puppet somehow. Manually works well then.
09:58 Lucas joined #salt
09:58 bemehow joined #salt
09:58 jeddi Mouzz: well, it's easy enough to cron up a highstate on all your machines.  the idea scares the willies out of me though :)
09:58 jeddi i mean - a highstate call on your master in a single cron fragment.  but affecting all our machines.
10:00 bemehow_ joined #salt
10:00 Mouzz jeddi: puppet does this by default I reckon. Maybe not entirely the same, but state is pushed from the puppet server to all clients.
10:01 jeddi Mouzz: oh, the way we set up puppet it didn't do this by default.   it was only when we wanted to push something out.
10:02 jeddi Mouzz:  oh - re-reading your first comment - you're doing 'state.sls] ... you know about state.highstate, right?
10:02 jeddi where it'll do everything in your top.sls, and all the states within?
10:02 Mouzz jeddi: Ok, I think my setup checks and pushes out state every 5 minutes (overwriting local changes) That why I put a line "managed by puppet" in every config file :)
10:02 jeddi Mouzz: i have many 'don't even think about changing this - it's managed by salt' comments at the top of most of my config files now :)
10:03 Mouzz I have started with salt yesterday afternoon :) I have seen it come by a lot of times but I'm not yet fully aware of what it means :)
10:04 jeddi Mouzz:  aha.  have you gone thru the two tutorials?  that'll give you a cleaner insight.
10:04 Mouzz jeddi: I thought I had. I'll re-read those quickly...
10:05 jeddi Mouzz: When I started I was doing a lot of ;  salt '*' state.highstate test=True
10:05 jeddi (or specifying a hostname rather than '*').   but yeah - that command there, without the test=True, could be put into cron for every however long .. 10 minutes, say .. on the master.  and it'd replicate the functionality you're describing.
10:06 jeddi personally i think that puts a bit of unneeded load on the minions (well, if you're doing any pkg handling, as i think it tries to pull in an apt-get update each time?) .. and .. as i say, a bit hairy if you want to start testing something, and forget to disable the cron entry.
10:06 arBmind joined #salt
10:07 Mouzz jeddi: Is 'salt '*' state.highstate' like 'salt '*' state.sls *' (if that was possible, maybe)
10:10 Mouzz I think it does...
10:31 arBmind1 joined #salt
10:32 djn joined #salt
10:40 adotbrown joined #salt
10:44 kvbik joined #salt
10:49 __number5__ joined #salt
10:59 jeddi Mouzz: i think i see what you mean, and the answer is 'probably, yes' :)
11:00 jeddi everything defined in your top.sls .. all the way down .. gets instantiated.
11:03 giantlock joined #salt
11:07 aleszoulek joined #salt
11:07 fredvd joined #salt
11:08 mikedawson joined #salt
11:17 Athreyan joined #salt
11:18 Athreyan do we have any demo link for this Salt?
11:23 krissaxton joined #salt
11:25 krissaxton left #salt
11:38 timl0101 joined #salt
11:40 fredsa joined #salt
11:42 fredsa Hello, I'm using salty-vagrant to provision a VM but it doesnt' provision it just echoes 2013-06-18 11:21:35,911 [salt.minion      ][WARNING ] Master hostname: salt not found. Retrying in 30 seconds 2013-06-18 11:22:04,478 [salt.utils       ][ERROR   ] This master address: 'salt' was previously resolvable but now fails to resolve! The previously resolved ip addr will continue to be used
11:44 fredsa Keeps doing that on repeat.  My config files are being copied to /srv/salt. top.sls contains base: '*' - web-server and web-server/init.sls is a copy/paste of https://raw.github.com/saltstack/salt-states/master/small/lamp-drupal/init.sls
11:45 fredsa Still new to salt so not sure what to expect
11:46 fredsa anyone able to help with this?
11:47 reinsle joined #salt
11:47 reinsle Hi *
11:47 arBmind joined #salt
11:48 reinsle anyone using salt syndic here? i'll try to get salt using syndic as proxy to get work
11:49 reinsle but a salt '*' test.ping returns me only the answer from directly connted hosts
11:55 oz_akan joined #salt
11:57 chubrub have a question to make sure that I'm thinking right. If I provide new minion with salt-cloud -p profile name, the name is going to be assigned to grains.id? I know I can check it by myself, but linode taxes 20$ per every new linode ;)
12:00 cleeming[foxx] joined #salt
12:04 zloidemon Furao: What do you use for monitoring services and visualisation data?
12:25 Lucas joined #salt
12:25 cron0 joined #salt
12:25 Furao zloidemon: monitor shinken, visual graphite
12:25 krissaxton joined #salt
12:26 Furao graylog2 centralized logging and sentry is also used for alerts from the system and client's applicatins
12:27 zloidemon Furao: Thanks. I'm looking it
12:31 zonk1024 joined #salt
12:36 vaxholm joined #salt
12:40 Furao I do have a pre-packaged version of all this :)
12:40 Nexpro1 joined #salt
12:40 Furao like 80 states where everything is integrated
12:41 Mouzz joined #salt
12:42 agend joined #salt
12:47 agend hi - i have a problem with controlling uwsgi with service state, uwsgi is installed with pip, and it starts find - but when it should restart it gets out of hand - there are Address already in use log messages, and pid in file does not point to existing process - what am I doing wrong? http://pastebin.com/vMK3Wyrb
12:48 jslatts joined #salt
12:49 yota joined #salt
12:50 Furao agend: https://github.com/bclermont/states/tree/master/states/uwsgi
12:50 Furao this is old and probably a little buggy
12:50 Furao but there is a lot into that
12:53 juicer2 joined #salt
12:54 backjlack joined #salt
12:58 agend Furao: thanks but i'd rather user uwsgi installed with pip then build it from repo
13:05 shrek joined #salt
13:06 shrek just install salt stack for the first time this morning and was wondering if it was possible to substitute the hostname into the config file for the "id"
13:07 shrek A oneliner along the lines
13:07 jchen joined #salt
13:07 shrek echo $HOSTNAME | awk -F. '{print $1}
13:09 __gotcha joined #salt
13:09 __gotcha joined #salt
13:09 necronian joined #salt
13:11 Gifflen joined #salt
13:14 mikedawson joined #salt
13:16 oz_akan joined #salt
13:18 nrub joined #salt
13:18 oz_akan joined #salt
13:23 racooper joined #salt
13:23 zooz joined #salt
13:28 shrek I found that leaving the "id" field commented out results in the FQDN being used as the "id"
13:30 shrek This will allow me to build a template for a test environment
13:32 oc_ how do i hide green output (i.e. stuff returning True to salt.output - state_verbose=False) from the command line (salt 'foo*' state.highstate)
13:33 shrek Embarrassingly I just noticed the comment above the "id" - doh. Sorry for not RTFM
13:33 __number5__ joined #salt
13:33 logix812 oc_ --out=quiet or --out=no_return
13:34 oc_ thanks
13:34 SEJeff_work shrek, For what it's worth, assuming you're using bash, the awk is redundant
13:34 logix812 oc_ there are a few options to choose from for --out as well. run: salt --help they are at the bottom
13:34 SEJeff_work echo ${HOSTNAME%%.*}
13:34 SEJeff_work :)
13:36 oc_ logix812: none of those did what I want either :~.. i.e. I still want to list all changes (blue) and errors (red) as YAML formatted output
13:39 m_george|away joined #salt
13:40 oc_ humm, I see the problem now. I think there might be need for another output option, something like: changes, errors & updates (both changed nd errors (blue and red))
13:41 efixit joined #salt
13:41 oc_ logix812: i've tried all out opts now:~ (i see in history I already tried no_return and quiet yesterday :)
13:43 logix812 oc_: you are just trying to filter the output basically if I understand it better?
13:43 logix812 omit the green, keep the blue and red?
13:44 oc_ yup
13:45 oc_ perhaps i can pipe the result through something that doesn't understand ansi, and grep away the green colors, suggestions to what will escape ansi?
13:46 subuk joined #salt
13:47 logix812 oc_: you can write a custom outputter
13:47 logix812 should be pretty straight forward if you just base it off nested
13:47 logix812 check out: salt.output.nested.py
13:47 logix812 or the highstate.py
13:47 nrub joined #salt
13:48 logix812 that's probably what you want
13:50 logix812 if you were going to go through the trouble of piping the result to filter it, might as well spend the "trouble" time just making the outputter =)
13:52 Khollowa_ joined #salt
13:53 fragamus joined #salt
13:58 fredvd joined #salt
14:02 m_george left #salt
14:02 mgw joined #salt
14:06 __gotcha joined #salt
14:06 __gotcha joined #salt
14:09 vaxholm joined #salt
14:12 aat joined #salt
14:15 opapo joined #salt
14:17 aberant joined #salt
14:18 kho joined #salt
14:19 shrek joined #salt
14:19 kho joined #salt
14:21 shrek SEJeff_work: replaced the awk expression within the config file with the echo id: '${HOSTNAME%%.*}' however it didn't work
14:22 nrub joined #salt
14:22 shrek Perhaps I should create a variable an env variable outside of the config file
14:23 KennethWilke joined #salt
14:26 krissaxton joined #salt
14:27 abe_music joined #salt
14:28 fspot joined #salt
14:29 MTecknology Is there any way to write a state that will run a command on the salt master instead of the minion?
14:29 MTecknology I imagine not...
14:31 Oct can't you target the master with this state ?
14:34 MTecknology hm?
14:35 wilkystyle joined #salt
14:36 wilkystyle hey all
14:36 MTecknology Oct: you can set a target in a state?
14:37 wilkystyle can someone refresh my memory regarding calling an individual rule from an SLS file? I'm not able to remember where in the docs I saw it… or maybe someone just told me previously, too.
14:38 Oct MTecknology: not in the state, but when you call the state, you can
14:38 MTecknology that's not what I was hoping for.. I need this in the state
14:38 MTecknology It looks like I'm going to get to use the reactor system for this
14:40 vaxholm joined #salt
14:40 aberant joined #salt
14:41 zooz joined #salt
14:42 abe_music Does anyone know if it's possible to setup the hostname of an EC2 machine when launched by salt-cloud? I'm basically wanting the box to have the same fqdn as what goes in Route53
14:45 conan_the_destro joined #salt
14:46 mikedawson joined #salt
14:46 Furao abe_music: https://github.com/bclermont/states/blob/master/states/_states/aws_route53.py
14:47 Furao this is a little old, as I don't update that anymore
14:47 Furao but this version worked for me
14:47 Furao now I have support few more DNS providers
14:48 reinsle left #salt
14:49 abe_music Furao: thanks, that's a cool state…i was doing it manually with boto's route53. Does that also set the machine's hostname locally to the box?
14:49 abe_music right now, i might have a box named foo.mydomain.com in route53 and that's all good, but the box itself thinks its hostname is ip-123-123-123-123.ec2.internal.
14:50 abe_music that kind of sucks for users that expect things like Hadoop to recognize the nice, easy to remember hostnames, but instead they have to go map them manually
14:51 Furao abe_music: just set your pillar to do what
14:51 Furao or in the .sls
14:51 alekibango joined #salt
14:52 abe_music Furao: thanks, i'll play with setting the hostname in the sls
14:52 teskew joined #salt
14:54 chrisgilmerproj joined #salt
14:56 krissaxton1 joined #salt
14:59 agend joined #salt
15:00 abe_music joined #salt
15:01 mgw joined #salt
15:02 oliv_mc joined #salt
15:06 kermit joined #salt
15:11 sgviking joined #salt
15:12 Odd_Bloke Is there any way to get salt to change the permissions of an existing directory?
15:12 Odd_Bloke Looking at the code, nothing happens if the directory already exists.
15:12 brianhicks joined #salt
15:13 oz_akan hi guys, does anyone "directory overlay" for states and pillar?
15:13 oz_akan -does anyone use-
15:15 geggam joined #salt
15:16 jeddi Odd_Bloke: can you paste the fragment you're using?  i'd have expected it to align the new permissions?
15:16 jeddi Odd_Bloke: if it doesn't, it sounds like a bug.
15:17 Odd_Bloke Wait, I might be an idiot.
15:17 jeddi Odd_Bloke: much empathy on that sensation.  :)
15:17 Odd_Bloke That's an affirmative.
15:17 Odd_Bloke Copy-pasted an example, forgot to change the mode. >.<
15:21 mgw joined #salt
15:22 jeddi Odd_Bloke: it'd be nice if we could redact the irc logs, huh?   get on the blower to the NSA - they probably have a way.
15:26 krissaxton joined #salt
15:27 jschadlick joined #salt
15:27 sgviking joined #salt
15:28 MTecknology How can I write a state that uses require_in and will sometimes fail?
15:31 MTecknology I'm thinking I want something like http://dpaste.com/1250796/
15:38 bubbs joined #salt
15:38 bubbs How can I remove all files in a certain directory with salt?
15:42 teskew joined #salt
15:43 jeddi bubbs: but keep the directory you mean?  or delete the directory recursively?
15:44 jeddi bubbs:  you could use cmd.run to do a once-off .. but do you mean you want to do this regularly via a state?
15:45 bubbs jeddi: yes, I'd like to use a state to recursively delete all files within a directory, but keep that directory
15:45 jdenning joined #salt
15:46 jeddi bubbs:  how about http://rn0.ru/show/I2gjAFOHmj3tkyWnHO7u/
15:46 bubbs jeddi: great, that will work! thanks
15:47 jeddi bubbs: remove the -rf if you only want to delete files but keep sub-directories, of course.
15:48 hazzadous joined #salt
15:51 hazzadous I'm attempting to set up a hadoop cluster with salt and wondering how I'd go about getting the ip address of a particular minion set with role hadoopmaster.  ie. I want to set fs.default.name in *-site.xml to said address.  How would one go about achieving this?
15:52 Lucas joined #salt
15:54 jalbretsen joined #salt
15:55 MTecknology I feel like I'm using salt for things that it was never designed to do, but... if this works, salt will be the bestest tool for this crazy task
15:55 MTecknology fun stuff.. magical but secure encryption/decryption
16:03 fredvd joined #salt
16:05 milind joined #salt
16:11 ek6 joined #salt
16:12 tdk2fe joined #salt
16:13 bubbs Also, is there any way to get the timestamp of the last salt provision from grains?
16:14 geggam anyone know a good place to find a list of the virtualization stacks salt is integrated with ?
16:15 ubercore joined #salt
16:21 geggam http://saltstack.com/products found it if anyone is interested
16:22 bensix2 joined #salt
16:23 santagada joined #salt
16:25 Odd_Bloke salt is reporting that it can't add a user to a group.  When I look on the machine, it's already in that group.
16:25 logix812 is there a common path that people use for their extension_modules or is it pretty much whatever you want. I'm talking about setting the extension_modules path in the master config.
16:25 Odd_Bloke Any idea what might cause that?
16:25 logix812 I was going to just use /srv/extmods
16:26 magmatt joined #salt
16:28 magmatt I'm failing to express this well in Google: I have a machine hosting git repos with keyed ssh.  I want to make several machines that have access to the git host.  What process do I follow to get the public keys on the new machines onto the git host?
16:28 magmatt or is there a better design?
16:29 dthom91 joined #salt
16:29 Odd_Bloke I get the following output: http://pastebin.com/bRjpXHPU and the user is in the group on the system.
16:29 kermit joined #salt
16:30 logix812 magmatt: So the underlying issue is just moving keys ya?
16:30 magmatt logix812: generating keys, then moving them
16:30 magmatt but maybe I want this? https://docs.saltstack.com/topics/tutorials/gitfs.html
16:30 logix812 well that will just provide access to your states
16:31 logix812 I understood your question as: I need to have my new machines have access to central machine that hosts repositories
16:31 magmatt logix812: correct
16:31 logix812 not necessarily read state information from them
16:31 magmatt correct
16:32 logix812 gitfs, as I understand it, is basically an alternate file_roots path
16:32 logix812 so I don't think that will get you where you are going
16:32 logix812 if you salt master is running on your repo master
16:33 logix812 you could have it generate the ssh keys
16:33 logix812 and deliver them to the minons
16:33 magmatt logix812: okay... and even if they're different machines, I could deliver the public keys to the repo box too
16:34 logix812 ya, you would just need to signal to it that there are new keys waiting
16:34 magmatt okay, so have the salt master generate the keys.  I'm new to salt (again), but I'll have a go at that
16:34 stas joined #salt
16:34 logix812 Well, I guess if they are on different machines
16:34 ubercore cp.get_file, and add a file_root on your master that holds the keys that need to be distributed
16:35 ubercore you can initiate the distribution of the keys from the master
16:35 krissaxton joined #salt
16:35 entil can the file_root be gitfs?
16:35 jschadlick Hey, is anyone having trouble using custom modules? I followed the documentation and created a trivial custom module, but cannot get it to work. My config and calls are here: https://gist.github.com/anonymous/5801328
16:35 ubercore as long as the master can talk to the repository, yes
16:35 entil not sure I enjoy the idea of distributing important files over git but I do that now through pillars and grains
16:36 entil dunno what you wre talking about originally but thanks for that, it may simplify my setup later. at least make it more versatile :)
16:37 magmatt can I skip the key generation/distribution and just have the minions get the repo data from the salt master?
16:37 magmatt repo <--> salt-master <--> minions
16:37 KyleG joined #salt
16:38 ubercore yes, that could work
16:38 ubercore what kind of files are you distributing?
16:39 magmatt application files
16:39 magmatt (python, html, css, js)
16:40 ubercore I guess it depends on your workflow, but yes that could work
16:41 entil I didn't know about cp.get_file, I just use file.managed to distribute bootstrappy files
16:41 vaxholm joined #salt
16:41 logix812 magmatt: you might also consider setting up a git push deploy for that stuff, with a post-receive that does a salt-call state.sls <your_deploy.sls>
16:42 logix812 depends on how much effort you want to put forth
16:42 magmatt logix812: yeah, we'll automate it eventually; I'm still trying to get it to happen once manually, though :)
16:43 entil not sure if I'm getting the doc right, but cp.get_file does a lot less than file.managed, like it doesn't do permissions and such
16:43 ubercore it can do permissions
16:43 magmatt how do y'all distribute your app code?
16:43 entil oh wait, that's a module and not a state, file.managed is a state?
16:43 magmatt through git? or other means?
16:43 felixhummel joined #salt
16:43 magmatt I have this right now: http://bpaste.net/show/ggYog9OUZdbs3dfEQI33/
16:43 KyleG left #salt
16:43 ubercore magmatt: we bundle up a tgz and send it out to minions
16:44 entil magmatt: I use file.managed to bootstrap the python virtualenv, ie. the stuff from requirements.txt that doesn't change (often enough to have been an issue yet) and run the extractions with cmd.run - then I use virtualenv.managed to figure out the rest; it does github deployments based on requirements.txt (noticing that most of the stuff is in place already)
16:44 magmatt ubercore: you bundle independent of salt, then do you update the states to send it to the minions?
16:45 kho joined #salt
16:45 entil we haven't touched our requirements.txt since starting using salt, so I'm not sure if the new bootstrap files will be a big deal or not, most likely they won't.
16:45 ubercore magmatt: basically, yeah
16:45 ubercore small python script makes the bundle and kicks off the process, when we want to do a deploy
16:45 entil I asked on the list if people use S3 or something else (S3 was mentioned here) for distributing files like that, because I'm sort of uneasy about having just a file_root and backups of it
16:45 kho joined #salt
16:45 ubercore like entil, we set up the virtual environment, etc, through normal states
16:46 entil (un)fortunately we do these huuuge blobs through github, so they're sort of backed up by design, and S3 should do the same
16:46 __gotcha joined #salt
16:46 __gotcha joined #salt
16:46 ubercore entil: there's a s3 backend in the HEAD I think
16:46 magmatt ubercore: and you version control your states?  So every deploy is a commit to the states repo?
16:46 ubercore not sure if it's the current
16:46 entil ubercore: I'm in no hurry, I don't have time for devops currently now that things work well enough :) 0.15.3 was released during this operation and I didn't even upgrade to that
16:47 entil but that's good news for sure
16:47 ubercore magmatt: no -- all that's version controlled is the stuff that sets up a user/chausette/circus/virtualenv, etc
16:47 ubercore so we push out deploys without touching the states at all
16:47 magmatt ubercore: oh, through cmd.run or something?
16:47 entil it'd help to encrypt all the encryption keys ;) have the decrypt key in git somewhere, maybe even github and the files on S3 to make them at least appear hard to break
16:48 ubercore yeah, but using the Python api
16:48 entil magmatt: no idea what your app is, but for python this so easy it feels weird
16:48 mgw joined #salt
16:48 entil all our states and pillars are on gitfs
16:49 entil the only downside is that changing eg. django's custom settings has to be done through salt, not the app itself, but that hasn't been a real problem yet
16:49 logix812 magmatt: we setup a custom pypi repo, and have the minions pip.install the latest version of our app packages. For staging testing we do push deploys via git
16:49 entil if I wanted to be real anal about this I'd split the custom stuff and requirements.txt files into their own gitfs roots but that'd start wasting repos on github and maybe even cost money for nothing :P
16:50 entil logix812: we did this to get rid of our custom pypi :D
16:50 fspot left #salt
16:51 entil no idea if chishop and friends have evolved significantly but there were issues like uploading checked who owned the package and denied everyone else uploading versions, and python binary distributions don't really seem to exist even, so just hoping github is available for every deployment made sense..
16:51 magmatt logix812: so if you want to deploy version X of your app code.  Do you change the master state files?  Or do you do something else?
16:51 logix812 don't touch the states after the initial configuration
16:51 __gotcha_ joined #salt
16:51 logix812 like the others have said
16:51 entil we could probably do gitosis or something but the biz guys want insight and key management for git and that's just too convenient to get through github for self-hosting.. and github isn't down that often
16:51 magmatt okay, so you don't use salt states for deploying
16:51 entil magmatt: we use fabric
16:52 magmatt what I'm hearing is "salt states for setup," "fabric/cmd.run/something else for deploy"
16:52 entil magmatt: but the only reasons for us to touch salt states after the initial config is changing a) custom settings (this has happened) b) requirements.txt (has not happened and won't for a while)
16:52 logix812 entil: ah good to know about your uploading issues, we have not run into that yet, but nice to know what potential issues there are
16:52 magmatt entil: right, and that's because you don't use salt for deploying
16:53 entil so I've pushed updated custom settings through salt after the initial deployment but all the daily deployments are with fabric
16:53 entil fabric roles are amazing, man
16:53 entil logix812: they may have fixed it. a friend of mine was about to do a benchmark shootout of different pypi implementations but then he didn't, and we gradually shifted towards github anyway, and now we finally got rid of it altogether
16:54 entil logix812: the thing with pip was, and I think it still is, that if you have an egg that's forked it won't necessarily find the correct one if you specify extra index, and if you specify index, it won't find anything else, and these don't mix
16:55 entil logix812: and worst of all, a requirements text file that does -r on a file taht specifies index, it lost track of all other files, so it sort of flattens it, and I hope this is fixed but it's too late for us - we're with github now :)
16:55 logix812 entil: We just manually upload the package via Fabric, we don't run though pip for the uplpading, so that might be why we are avoiding ownership issues
16:55 entil python requirement management is shit
16:55 bfrog is the maintainer of bootstrap here?
16:56 entil we did python setup.py sdist bdist whatever blaa upload
16:56 logix812 ya
16:56 logix812 that's what I meant
16:56 logix812 sorry
16:56 logix812 haha
16:56 logix812 fab ops.publish
16:56 logix812 on our end
16:56 entil and then it never gets the binaries anyway, so you got to have all sorts of compilation tools and crap... I should actually make sure we don't have those in our states anymore because the venv bootstrap tarball has all that
16:56 santagada joined #salt
16:57 entil nowait, we don't have for example pylibmc so there's a valid use case :(
16:57 entil but I don't like, philosophically, having build chains on the production servers
16:58 entil logix812: do you use fabric roles?
16:58 logix812 ya
16:58 entil man, they're the best
16:58 entil we correlate both our salt installations and fabric deployments through ec2 tags, something I've talked about here before, but it's a well-working system
16:59 entil the only possible itch is that if we need auto-scaling, that system probably doesn't allow tags, so I need to teach my salt states to understand user data as well as ec2 tags
16:59 entil or migrate away from ec2 tags, teach fabric roles to look at user data, but for the time being everything's great and the most important thing is that there's a means of coordinating salt and fabric the same way
17:00 logix812 when you pull your app code from github, I have yet to really mess with the git module, do you just have your restart states require the git latest state?
17:00 entil I haven't tried the git module :(
17:01 entil the requirements.txt ends in -e git+ssh for whatever is required for that environment to always be updated
17:01 entil then it becomes an issue of release management and policy, master HEAD must never be broken
17:01 logix812 Something has to trigger your restarts (assuming common python applications), where do you stick those in that process
17:02 logix812 fabric control that or does salt?
17:02 entil I have a cmd.wait on custom settings that does a pkill -HUP
17:03 logix812 ah, nice
17:03 entil nb. it's for supervisord, the initial deployment
17:03 entil fabric's sort of different... there's some overlap but the fabfile code and salt states aren't the same
17:03 entil I wrote this sort of a declarative framework back in the day for fabric, it's a kind of state
17:04 entil people at pycon.fi wanted me to release it but I never got around to cleaning the code and I'm not sure it's too special anyway... but there's just a function that looks through the data structure and reacts on what's defined, and they also end in pkill -HUP
17:05 stephen__ joined #salt
17:05 entil oh, and wget :D to make sure there's nothing obvious like a 500 error after pkill
17:05 entil those are embarrassing
17:06 entil so that's one point where salt and fabric *do* share code, they both act on ~/requirements.txt
17:06 entil which ends in -e git+ssh://... so the relevant code just gets updated, it works like magic
17:06 entil (if you count requirements.txt as code)
17:07 entil the big thing that blows with python and release management is that distribute's setup functions whatever requirement management seems like crap if you need to isolate your own code somewhere, and long dependencies, especially into private github repos and pypis gets too messy for any sanity
17:07 entil at least I couldn't figure that out
17:07 entil so all those problems went away by shifting thinking from "package requirements" to "environment requirements" - like magic
17:08 entil the company's packages don't even know what their dependencies are. some of the 3rd party stuff we pull from the public does, sure, but for all internal concerns and such it's much smarter to think in terms of environments
17:11 backjlack joined #salt
17:11 jlund joined #salt
17:14 jdenning joined #salt
17:16 jeblair joined #salt
17:17 hazzadous_ joined #salt
17:17 zonk1024 joined #salt
17:18 drdran joined #salt
17:18 KyleG joined #salt
17:18 jschadlick ls
17:19 entil . ..
17:19 jschadlick oops :)
17:19 KyleG jschadlick: ls: #salt: No such file or directory
17:19 KyleG lul
17:20 drawsmcgraw joined #salt
17:23 DerekRBN joined #salt
17:28 craig joined #salt
17:28 dthom91 joined #salt
17:29 magmatt left #salt
17:30 elduderino joined #salt
17:30 bemehow joined #salt
17:31 geggam joined #salt
17:32 bemehow_ joined #salt
17:33 efixit joined #salt
17:34 auser joined #salt
17:35 twiedenbein joined #salt
17:36 drdran joined #salt
17:38 Ryan_Lane joined #salt
17:40 mikedawson joined #salt
17:51 vaxholm joined #salt
17:52 drawsmcgraw Anyone have experience with states.file.managed() on Windows?
17:52 drawsmcgraw I'm getting 'global name __salt__ is not defined'
17:55 pentabular joined #salt
17:56 KyleG joined #salt
17:57 jdaggett joined #salt
17:57 admineric joined #salt
18:05 admineric If I write a custom runner can I use file_root/_modules to load/distribute it?
18:06 drawsmcgraw nevermind -> https://github.com/saltstack/salt/issues/5091
18:06 KyleG joined #salt
18:09 brianhicks joined #salt
18:11 aberant joined #salt
18:13 admineric I can put runners directly here /usr/lib/python2.6/site-packages/salt/runners. I will just do this unless I find a better way.
18:20 JasonSwindle joined #salt
18:22 mephx joined #salt
18:22 canci joined #salt
18:22 mirrorbox joined #salt
18:23 jdaggett joined #salt
18:26 nrub_ joined #salt
18:26 logix812 joined #salt
18:33 terminalmage joined #salt
18:34 efixit joined #salt
18:36 fys joined #salt
18:41 kermit joined #salt
18:50 williamthekid_ joined #salt
18:56 napperjabber joined #salt
19:13 jeffmendoza joined #salt
19:14 stas joined #salt
19:22 carmony joined #salt
19:27 introspectr3 joined #salt
19:28 introspectr3 left #salt
19:35 newyorker joined #salt
19:37 newyorker I'm experiencing a strange problem with salt states... in my salt sls file, I specify a command to run (iptables-restore) after iptables has finished installing. It never works when run with salt; but it always works when I run it manually. Code: http://pastebin.com/PJJpbPRD
19:38 djn joined #salt
19:38 elduderino joined #salt
19:38 newyorker Line 24 has the command iptables-restore < /etc/iptables/rules.temp
19:39 jdenning newyorker: have you tried quoting line 24?
19:39 newyorker jdenning: I'll try that right now
19:39 Younqcass joined #salt
19:39 aleszoulek joined #salt
19:40 newyorker jdenning: I just tried that, but it doesn't work... the command runs fine (salt debug output: http://pastebin.com/c4RGN4qw) but iptables still shows no rules
19:41 jdenning newyorker: Is that the same issue you had previously, or different now?
19:42 newyorker jdenning: yep, same issue. if I run `iptables-restore < /etc/iptables/rules.temp` manually the iptables rules are shown. But it never works when salt runs the exact command.
19:42 Corey newyorker: And /etc/iptables/rules.temp actually contains the rules, right?
19:42 newyorker Corey: yes
19:42 Corey I think it may be a redirection error.
19:43 newyorker Here's /etc/iptables/rules.temp in case you'd like it: http://pastebin.com/Zccp0sfV
19:43 newyorker Corey: hrmm, what would does that mean? redirection within salt? or is it iptables specific?
19:44 jdenning newyorker: So, it looks like you are generating the /etc/iptables/rules.temp in salt?
19:44 jdenning like w/ file.managed?
19:44 newyorker jdenning: yes, from a jinja template
19:45 jdenning newyorker: your probably need a require statement
19:45 newyorker jdenning: through file.managed, yes
19:45 jdenning in your iptables cmd..
19:45 jdenning like :
19:45 jdenning n/m just saw that you have one :)
19:45 newyorker jdenning: :)
19:48 krissaxton joined #salt
19:49 jdenning Hmmm..not sure, it looks good to me.  Just for experimental sake, I would try removing the requirement for pkg:iptables-persistent in iptables-restore (since that is also required by /etc/iptables/rules.temp maybe it's some kind of ordering issue?)
19:49 jdenning But I don't really think that *should* matter :)
19:51 newyorker jdenning: hrmm, good idea. hopefully this works, fingers crossed!
19:55 jdaggett joined #salt
19:59 newyorker nope, still dosen't work :(    here's what I have to do manually: http://cl.ly/image/1N3S3P462r25
20:00 logix812 I have a need where I will have to add potentially N number of authorized_keys to various systems.
20:00 logix812 Now I know I can salt '*' ssh.set_auth_key[_from_file], but I would need to do that piecemeal as new keys were added.
20:01 logix812 Ideally I'd like to just save the keys files on the server and part of a state as new machines come up, they just add the keys. My Guess is I will need to either write an external_pillar or a python based module to handle this
20:01 logix812 right path?
20:01 craig i am having an issue with "Duplicate Keys"
20:02 __gotcha joined #salt
20:02 __gotcha joined #salt
20:02 craig we have 4 diff masters and the errors come from minions attached to diff masters
20:03 jdenning newyorker: That sucks..you should probably take it to the mailing list (google-group)
20:09 Ahlee salt-api, anybody else have issues with incorrectly matched items?
20:09 Ahlee four nodes were down, so the salt-api apparently decided they must have the grain: i was matching on
20:18 LyndsySimon joined #salt
20:18 giantlock joined #salt
20:19 JasonSwindle LyndsySimon: Howdy!
20:19 LyndsySimon Hey. What's up?
20:19 JasonSwindle How goes your uWSGI config?
20:19 JasonSwindle and salt stack?
20:21 auser hey all
20:21 LyndsySimon I've moved to other projects for a bit, but will be picking it up later this week or early next.
20:23 hazzadous joined #salt
20:27 lex__ joined #salt
20:28 JasonSwindle LyndsySimon: ok
20:35 napperjabber joined #salt
20:41 milind joined #salt
20:43 mikedawson joined #salt
20:45 fredvd joined #salt
20:46 gadams joined #salt
20:49 gadams Oh wow! Salt has commercial offerings now
20:49 fragamus joined #salt
20:49 Kyle gadams: Seems so, Admiral Adama
20:49 * Kyle ducks
20:49 Kyle That's all I think when I see your nick :p
20:49 fragamus hi auser
20:49 auser hey fragamus!
20:50 gadams Oh god Kyle you're here too?
20:51 Kyle gadams: *maybbbe*
20:51 arBmind joined #salt
20:51 gadams Do I have to remind you about the restraining order? You're to keep a a minmum /24 network block away from me at all times.
20:52 Kyle gadams: :p
20:53 carlos joined #salt
20:53 carlos_ joined #salt
20:55 timl0101 joined #salt
20:57 james4k if you use gitfs for your file_roots, does it automatically pull new changes?
20:58 hazzadous auser: how fortuitous.  do you have your reactive salt stack source available anywhere by any chance?
21:00 auser I do hazzadous
21:01 auser what's up
21:02 hazzadous I had a look though your states repo but couldn't immediately link it up to the slide deck.
21:03 auser yeah, the source for that isn't public (yet)
21:03 hazzadous Ah ok
21:03 auser I'm working with the company I wrote it for to get them to let me open source it
21:03 auser should be this week, is what I'm getting
21:04 auser I'm also (as soon as my company blog is ready to go) sitting on a few blog posts that explain that and more
21:04 auser so… hopefully soon
21:04 hazzadous I was attempting to recreate but got slightly confused but the custom informer state, couldn't quite reproduce.
21:04 hazzadous ok great
21:05 jschadlick1 joined #salt
21:05 auser sure
21:05 auser that's public, I believe
21:05 auser sec
21:06 auser oh maybe not
21:06 auser lemme push that up
21:06 hazzadous yes you have something similar.  I should check that over.
21:06 hazzadous you have a similar all_by_roles
21:06 hazzadous but even so, was not able to reference that from within jinja.  Perhaps a version mismatch or something, not sure.  Very fresh salt for me
21:08 auser well, welcome
21:08 auser once you get it, you won't want to leave
21:09 hazzadous hopefully yes.  one of those leaps from just doing everything with fabric and blindly hoping it will pay off.  fingers crossed
21:09 auser hazzadous: https://github.com/auser/states/blob/master/states/_modules/informer.py
21:10 auser :) we are always here to help too
21:12 hazzadous thanks thats great.  I find joining what I want with what is available in the docs quite an effort, *just ask* seems to be the most enlightening
21:14 krissaxton left #salt
21:15 hazzadous whats peoples standard practice for salt master?  push to git with hooks to call highstate on all node?
21:19 KyleG joined #salt
21:30 nrub joined #salt
21:32 james4k does the gitfs backend work in masterless mode?
21:33 oz_akan joined #salt
21:41 auser hazzadous: you can do that, that's a pretty good way to run it
21:41 Ryan_Lane joined #salt
21:42 auser I use a custom tool (salt-cli)
21:45 hazzadous yes have seen that, haven't played yet
21:47 auser that's just what *I* use
21:48 maverik joined #salt
21:48 hazzadous fyi the get_roles seems to work, although not with --local, which I assume is expected.
21:49 hazzadous well, thinking about it, of source it wouldn't.
21:49 hazzadous I suppose the *I* is what I find most annoying atm.
21:49 maverik How can I properly use the unless feature of cmd.run in salt states? I'm trying to test for a directory with "  - unless: test /var/www" but it never works
21:50 hazzadous I assume you want test -d /var/www
21:52 maverik hazzadous: yes, I gue
21:52 maverik *I guess
21:53 maverik hazzadous: it works now! hooray, thanks!
21:54 napperjabber joined #salt
21:54 auser hazzadous: it uses salt-mine, so local shouldn't work afaik
22:01 hazzadous yeah, I suppose there's something to be said for simulating for testing purposes but not the end of the world
22:01 milind joined #salt
22:10 coolj joined #salt
22:12 bfrog so automating aws seems kind of like a pain
22:12 bfrog like how do people deal with deployment where there might be some sql migrations, new packages installed/configured, and applications rebuilt and restarted?
22:13 chrism very carefully =P
22:13 chrism (I don't have that answer, sorry)
22:13 mackstic1 write down the sequence of actions, break it into state chunks, create an appropriate dependency tree, win
22:13 bfrog I guess, just seems like a huge pita all around all the time
22:14 auser well....
22:14 auser you can use an overstate
22:14 auser in salt
22:14 bfrog then like trying to automate means some stuff will fail, some stuff will fail horribly and require resetting the state back to where it was
22:14 auser if we're talking about sql migrations in rails, you can do rake db:migrate on every launch
22:14 bfrog no, there's a php app and an erlang application in this case with hand written migrations
22:15 bfrog so like... I need to do mysql dbname < migrate_x.sql
22:15 auser speaking about how I'd do that in salt
22:15 auser I'd do the the same way I did it by hand
22:15 auser just written in a state
22:15 chrism yulp
22:15 chrism cmd.run is awesome for fallbacks =P
22:15 chrism although I try not to rely on it too heavily, of course
22:15 bfrog you can't redo that though
22:16 bfrog its not a repeatable action
22:16 bfrog at least not really
22:16 auser cmd.run is… kinda
22:16 chrism sure, so create a touchfile and test for the existance of it
22:16 hazzadous yes I think you rails state is a good example auser
22:16 auser ah thanks
22:16 auser the application.py one I did a few months ago?
22:16 bfrog I may as well have a shell script and cross my fingers
22:16 auser I thought I lost that one
22:16 auser heh
22:16 chrism is there any docs that i might be missing about how variables are passed from a state to a jinja template?
22:17 bfrog just trying to figure out how people manage to get this continual deployment thing going
22:17 bfrog or do they just not do sql migrations
22:17 auser you can use: - context:
22:17 auser chrism: or pillar
22:17 bfrog and like quick rollbacks
22:17 mackstic1 bfrog: by writing tests for each upgrade?
22:18 chrism trying to do a for vhost, args in pillar['key'].iteritems(), and I can access the main var obviously via " {{ vhost }} and the args via {{ args['subkey] }}, within the state, but that doesn't pass down
22:18 hazzadous well more that its a good example of how to encapsulate more complex states that aren't catered for with the given states
22:18 chrism hrm - context?
22:18 mackstic1 Your migration scripts can be wrapped into a transaction and rolled back if they failed(assuming a vaguely intelligent SQL engine)
22:18 bfrog so not mysql basically
22:18 chrisgilmerproj do i need to change my master config file to add custom modules to salt?  It appears that putting a python file in /srv/salt/modules and /srv/salt/_modules does nothing for me when adding my own python scripts
22:18 mackstic1 MySQL on top of InnoDB does transaction rollback fine
22:19 bfrog well fortunately mysql in my project seems to be on its way out...
22:19 bfrog mackstic1: no ddl transactions
22:19 hazzadous @bfrog yes the whole continuous deployment example is something I think is missing from the docs.
22:20 bfrog hazzadous: or just in general what I feel like is the most common thing right now, aws automation
22:20 bfrog or one of the most common use cases
22:20 mackstic1 Ah, for DDL's I guess not
22:20 hazzadous true
22:20 chrism hrm this might actually do it
22:21 bfrog like I mean typical app setup on aws you have some sql db (maybe several) and a bunch of app boxes with elb
22:22 bfrog maybe some others too, maybe webservers in front of that and some cache/redis boxes as ancillary instances
22:22 bfrog upgrading the app really means upgrading any number of those things with (ideally) a quick "shit, bad stuff happened, roll it back"
22:22 bfrog like basically I do that by hand now with some minor help with asgard
22:22 chrism auser: so if I do like http://pastebin.com/V9NXBDu2 within the "for vhost, args in pillar['key'].iteritems()" bit, I can access the vars in jinja via {{ variable2 }} ?
22:22 chrism if i read that right?
22:23 auser chrism: yeah… I think you can just do .items() if I'm not mistaken
22:23 auser and
22:23 auser but
22:23 auser take out the array in context
22:24 auser you can just set them as keys in that context hash
22:24 auser i.e. instead of - hostmae: just hostmae: {{ vhost }}
22:24 chrism ooooh
22:24 chrism okay
22:25 chrism so just like this? http://pastebin.com/zp5DAAyq
22:26 chrism i mean i can tinker around with it as long as that context switch will pass what I need to in the conditional
22:27 auser yeah
22:27 auser that should work
22:27 chrism nice nice
22:27 chrism that, is baller right there =)
22:27 chrism tyvm... I'm trying to clean up a lot of our states and get them ready to send over to saltstarters once they're agnostic of our environment
22:27 chrism hopefully help someone else out a bit if I can
22:28 hazzadous @bfrog currently reducing "what if shit happens" for migrations.  packaging vent etc.  not really sure about the best practice
22:28 hazzadous packaging=deb along with venv etc.  migrations haven't really though about yet
22:29 hazzadous thought*
22:30 chrisgilmerproj hey guys, could someone help me debug a problem with adding a module to saltstack out of the box?
22:31 austin987 joined #salt
22:31 auser what's the problm chrisgilmerproj
22:31 chrism chrisgilmerproj: best to just ask away
22:32 chrisgilmerproj i'm attempting to add a module to my master and sync it to my minions
22:32 APLU joined #salt
22:32 auser k
22:32 chrisgilmerproj i assumed i'd simply write a script with a method that returns true, put it in /srv/salt/modules
22:32 chrisgilmerproj and then sync_modules would do it
22:32 chrisgilmerproj do i need to edit my master config file to make it work?
22:33 chrisgilmerproj i'm on the latest salt debian distro for what its worth
22:33 hazzadous I get the feeling custom modules go in _modules
22:33 chrisgilmerproj i tried that too
22:33 chrisgilmerproj i put it in /srv/salt/_modules as well
22:33 chrisgilmerproj and put __init__.py files in both places just to be sure
22:34 chrisgilmerproj do they need to have a __virtual__() method in them?
22:35 hazzadous hmm,  not from my (very limited) experience.
22:35 chrisgilmerproj i'm under the impression from the docs that i install salt on master and minions, put a python script into /srv/salt/_modules/ and just hit go
22:35 chrisgilmerproj but that doesn't seem to work
22:35 hazzadous In the logs, does it highlight anything?
22:36 hazzadous it should say that its pulling in _modules
22:37 kermit joined #salt
22:37 chrisgilmerproj yeah, i'm seeing some error with an external pillar
22:37 chrisgilmerproj maybe this error is causing the issue
22:39 chrisgilmerproj got rid of that error
22:39 Deece joined #salt
22:40 williamthekid_ left #salt
22:41 hazzadous fixed @chrisgilmerproj ?
22:41 chrisgilmerproj nope
22:41 chrisgilmerproj i'm still not seeing it sync
22:41 chrisgilmerproj i'm using
22:41 chrisgilmerproj salt '*' saltutil.sync_modules
22:42 bemehow joined #salt
22:43 hazzadous hmm, you're paths set up in master config set up correctly, and using remote?
22:43 chrisgilmerproj which paths should i set?
22:43 chrisgilmerproj i have fileroots set
22:44 chrisgilmerproj under base i have /srv/salt/ and /srv/salt/modules/ and /srv/salt/_modules/
22:45 hazzadous is your minion set to use local or remote?
22:45 napperjabber joined #salt
22:46 chrisgilmerproj i'm using almost exactly the master template
22:48 chrisgilmerproj i'm just stumped
22:50 hazzadous hmm, yeah odd.  I gather that _modules under file_roots should sync.
22:50 chrisgilmerproj yeah, ditto
22:50 chrisgilmerproj its unclear in the docs if that's all that's needed
22:50 chrisgilmerproj but it implies it
22:51 hazzadous works for me(™)
22:51 chrisgilmerproj all your modules are in /srv/salt/_modules?
22:51 hazzadous yes
22:51 hazzadous under base env
22:53 hazzadous can you gist your master/minion/states?
22:54 chrisgilmerproj i've reset them to the default
22:55 fragamus joined #salt
22:55 chrisgilmerproj so basically https://raw.github.com/saltstack/salt/develop/conf/master and https://raw.github.com/saltstack/salt/develop/conf/minion
22:56 chrisgilmerproj i figure if i can do this out-of-the-box then we'll be set
22:56 chrisgilmerproj but it just doesn't seem to work
22:56 Deece chrisgilmerproj: if you run salt '*' state.show_highstate what do you see?
22:57 chrisgilmerproj Missing arguments executing "state.show_highstate": ArgSpec(args=[], varargs=None, keywords=None, defaults=None)
22:57 chrisgilmerproj for each host
22:58 chrisgilmerproj should i have included something?
22:58 carlos_ joined #salt
23:00 fragamus auser
23:00 napperjabber joined #salt
23:01 chrisgilmerproj Deece: should i have seen something with that?
23:02 hazzadous @chrisgilmerproj ok well if I put  something in _modules I see it synced (with the update of setting the master in the minion config to localhost)
23:03 chrisgilmerproj yeah, i set the "master" in the minion config file to my host name "salt1"
23:03 chrisgilmerproj i can run the test.ping command just fine
23:04 chjohnst_work joined #salt
23:04 chrisgilmerproj are you on debian?
23:04 chrisgilmerproj by chance?
23:05 chrisgilmerproj i'm on debian wheezy
23:06 hazzadous squeeze
23:06 chrisgilmerproj ahh
23:06 chrisgilmerproj was wondering if there were any libraries i'm missing but i think i've got them all
23:07 jacksontj joined #salt
23:07 hazzadous well if you can sync your states tree I'd be surprised if you missing something to sync the _modules
23:07 aat joined #salt
23:07 chrisgilmerproj yeah, i can sync states
23:07 chrisgilmerproj its a mystery for sure
23:08 hazzadous Afraid I'm quite green, someone else maybe?
23:09 hazzadous as the tree said to the lumberjack...
23:12 chrisgilmerproj yep
23:12 chrisgilmerproj thanks for your help hazzadous
23:15 aleszoulek joined #salt
23:21 pentabular1 joined #salt
23:21 hazzadous so in /var/cache/salt/minion/files/base/ what do you have?
23:21 chrisgilmerproj let me see
23:21 chrisgilmerproj on my minion or on my master?
23:22 hazzadous (on second run I do not see an explicit sync)
23:22 hazzadous on your minions
23:22 chrisgilmerproj ok, i see it on the minion
23:22 chrisgilmerproj yep, its in there
23:22 chrisgilmerproj but its an old version
23:23 chrisgilmerproj should i clear it?
23:23 bemehow_ joined #salt
23:24 hazzadous no from updating it should be re-synced afaict
23:25 chrisgilmerproj huh
23:25 chrisgilmerproj so it has this old version of my script
23:25 chrisgilmerproj which is interesting
23:25 chrisgilmerproj but if i sync now it doesn't get the new one
23:25 chrisgilmerproj and i can't access the old one via the salt command
23:27 hazzadous not really sure how if decided that if was new, maybe on mtime?
23:27 hazzadous s/if was new.
23:27 hazzadous it is new/
23:27 chrisgilmerproj yeah
23:29 hazzadous something to do with that maybe *straws clasped*
23:29 efixit joined #salt
23:30 chrisgilmerproj :)
23:32 cxz joined #salt
23:32 auser joined #salt
23:33 hazzadous futile I assume @chrisgilmerproj
23:33 auser back
23:33 auser what are you trying to do chrisgilmerproj
23:34 hazzadous sync _modules to minion
23:34 chrisgilmerproj yeah
23:34 chrisgilmerproj pretty straight forward out-of-the-box kinda thing
23:34 chrisgilmerproj i hope
23:36 chrisgilmerproj i'm using the default config files for master and minion
23:36 chrisgilmerproj and the latest debian wheezy install
23:38 hazzadous and with squeeze, the default master, minion with master as localhost I get whats expected
23:40 auser did you do saltutil.sync_modules ?
23:40 auser (sorry, on the phone)
23:40 chrisgilmerproj yep:)
23:40 auser what did that say
23:40 chrisgilmerproj it only lists the hosts
23:41 chrisgilmerproj it doesn't give any output
23:41 hazzadous for me that gives the expected synd
23:41 hazzadous sync
23:41 auser what do you have your log level set at?
23:41 auser you can do it with -l debug
23:45 chrisgilmerproj let me see
23:46 elbaschid joined #salt
23:46 chrisgilmerproj salt '*' saltutil.sync_modules -l debug?
23:47 napperjabber joined #salt
23:47 hazzadous hmm thats not valid for me
23:47 chrisgilmerproj doesn't work for me either
23:47 elbaschid hi everyone
23:48 elbaschid quick question about the template context in states
23:48 hazzadous what happens with salt-call saltutil.sync_modules --log-level=degug
23:48 chrisgilmerproj i set it in my master config
23:48 hazzadous s/
23:49 elbaschid i am trying to define a context variable as a list but doing that rendering fails
23:49 chrisgilmerproj so debug is the level now
23:49 chrisgilmerproj salt-call isn't on my path apparently
23:49 chrisgilmerproj let me find it
23:50 hazzadous so salt-call should be a little easier to debug, we're not going though the master, only retrieving the stats etc from it
23:51 Corey chrisgilmerproj: /usr/bin isn't in your path?
23:51 elbaschid Here's a pastebin http://pastebin.com/ztEBBc4J to put it into context
23:52 chrisgilmerproj i see /usr/bin
23:52 chrisgilmerproj but salt-call isn't in it
23:52 elbaschid are list not working in the context?
23:52 chrisgilmerproj salt, salt-cp, salt-key, salt-master, and salt-run
23:52 chrisgilmerproj did i not install something?
23:52 hazzadous how install you yeah?
23:53 chrisgilmerproj apt-get install salt-master
23:53 Corey chrisgilmerproj: You installed the salt master, not the salt minion on that node.
23:53 chrisgilmerproj yeah, salt-minion is on another host
23:55 hazzadous ok so on the minion, you have that stale state?  and you should be able to salt-call sync on the minion
23:55 bemehow joined #salt
23:56 chrisgilmerproj yeah, i ran on the minion  "salt-call saltutil.sync_modules —log-level=debug"
23:56 chrisgilmerproj and that did a bunch of fun stuff
23:56 hazzadous and that does't refresh the minion _modules.  you have your master set to correct paths, and have restarted it
23:56 chrisgilmerproj i get this error:
23:56 chrisgilmerproj [ERROR   ] Received bad data when setting the match from the top file
23:57 chrisgilmerproj the cache is still stale though
23:57 hazzadous hmm, donno
23:57 hazzadous error seems pretty serious
23:58 hazzadous whats your top file?
23:58 chrisgilmerproj i just killed that top file
23:58 chrisgilmerproj its gone now
23:58 hazzadous boom
23:59 Corey Uh, Salt doesn't cache.
23:59 chrisgilmerproj there we go!

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