Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-10-29

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

All times shown according to UTC.

Time Nick Message
00:01 Mars__ joined #salt
00:02 pipps joined #salt
00:02 wibberwock anyone run into this problem: saltutil.cmd in pillar template can only query 3 hosts, otherwise responses are dropped
00:02 redondos joined #salt
00:02 redondos joined #salt
00:04 Mars__ New to salt and have a fairly advanced questions around bonding and if statements
00:05 forrest Just throw it out there Mars__
00:05 forrest if someone knows the answer they will do try to help
00:05 Mars__ We have a fairly complicated build process
00:06 Mars__ and I am trying to get salt to handle the build of a KVM server for my cloudstack deploy
00:06 Mars__ When it kickstarts it doesn't bond the interfaces
00:06 Mars__ I want Salt to do it
00:06 Mars__ I can get it to pull the IP address from the eth0 interface
00:07 Mars__ but then it fails on subsequent runs because eth0 no longer has an address
00:07 Mars__ I want to do some kind of if statement
00:07 Mars__ or similar
00:07 Mars__ but not having much luck
00:07 forrest are you just creating the bond file?
00:08 Mars__ well
00:08 Mars__ I have tried both ways
00:08 Mars__ using the build in interface stuff
00:08 Mars__ and just copying over the files and populating
00:08 wibberwock figured it out: salt uses two threads on the master for each minion-master connection for a saltutil.cmd inside  a pillar template.  unfortunately, this is not a threadpool, and whether or not additional connections are completed is a crapshoot. this means that the request will fail if the number of connections is more than 2x # of worker threads
00:09 wibberwock *not acting like a threadpool
00:09 Mars__ either way
00:09 Mars__ fails on the second run
00:09 forrest when you did it like this: http://docs.saltstack.com/ref/states/all/salt.states.network.html
00:09 forrest what failed?
00:10 Mars__ nothing
00:11 Mars__ if I populate the address
00:11 Mars__ in the init.sls file
00:11 Mars__ but I want to dynamically set the IP address
00:11 Mars__ not statically
00:11 Mars__ and that is what I am having an issue with
00:12 xmltok joined #salt
00:12 Mars__ I have been messing with pillar, but I haven't figured out how to set a variable
00:16 wibberwock Mars_:  create a pillar file, use jinja tempting and inside jinja use the salt['saltutil.cmd'] to get ip addresses
00:16 wibberwock Mars_: I've just spent 2 days debugging why it was failing :|
00:17 Gareth Mars__: for your bonding when eth0 doesn't have an address, sounds like you could use an unless clause.  test to see if eth0 has an address and do your bond magic unless it doesnt.
00:19 bemehow joined #salt
00:22 hazzadous joined #salt
00:24 mannyt_ joined #salt
00:24 Mars__ how did you call it with the saltutil.cmd?
00:24 Mars__ I am trying to look it up in the docs and not having much luck
00:24 bemehow_ joined #salt
00:25 Mars__ also checking to see how the unless clause works
00:26 bemehow joined #salt
00:27 bhosmer joined #salt
00:29 bemehow_ joined #salt
00:38 pentabular joined #salt
00:41 UtahDave joined #salt
00:41 wibberwock minion_ipaddr = {{ salt['saltutil.cmd']('minion.hostname', 'network.ipaddrs').more_parsing_here() }}
00:41 wibberwock make sure you have more salt master worker threads than 2x the number of minions you will hit with the saltutil.cmd query
00:44 cachedout joined #salt
00:47 bemehow joined #salt
00:50 ipmb joined #salt
00:50 timoguin joined #salt
00:50 vkurup joined #salt
00:54 Mars__ is there a way to use wildcards in pillar?
00:54 Mars__ Something like: {% if salt['network.in_subnet'] == '*/24' %}
00:58 wibberwock best store that in a grain, then use salt['saltutil.cmd']('G@subnet:1.2.4.5', 'network.ipaddrs', expr_form='compound')
00:58 wibberwock ^ er that is one way
00:58 wibberwock you want to avoid network queries, they are slow
01:02 Ryan_Lane joined #salt
01:04 StDiluted joined #salt
01:13 redondos joined #salt
01:14 josephholsten joined #salt
01:14 Trebortech joined #salt
01:21 aserdp joined #salt
01:28 mannyt joined #salt
01:37 oz_akan_ joined #salt
01:38 Ashtonian joined #salt
01:45 druonysus joined #salt
01:46 cachedout joined #salt
01:46 pdayton joined #salt
01:48 v0id_ any eBooks on salt yet?
01:50 pentabular joined #salt
01:53 taylorgumgum joined #salt
01:56 jalbretsen joined #salt
01:57 mgw joined #salt
01:57 bhosmer joined #salt
02:03 cowmix joined #salt
02:05 xl1 joined #salt
02:15 bhosmer_ joined #salt
02:16 terminalmage v0id_: not salt-exclusive, but this was recently released: https://gumroad.com/l/taste-test/rubyweekly
02:16 terminalmage a little steep, if you ask me, for an ebook
02:19 bhosmer joined #salt
02:24 malinoff joined #salt
02:25 Ashtonian has anyone talked about getting chocolatey (http://chocolatey.org/) to work with salt as a module?
02:27 krissaxton joined #salt
02:31 flebel joined #salt
02:33 mannyt joined #salt
02:39 taylorgumgum joined #salt
02:40 aserdp_ joined #salt
02:42 pipps joined #salt
02:44 malinoff Hi guys
02:44 malinoff Anybody here?
02:44 * Ashtonian waves
02:44 mwillhite joined #salt
02:44 malinoff Cool :) Can i get file.managed from the git source?
02:44 malinoff I understand how to get a file from the master or via http
02:44 malinoff But I'm stuck with git
02:49 aserdp joined #salt
02:51 godber joined #salt
02:51 mannyt joined #salt
02:54 prooty joined #salt
03:09 mapu joined #salt
03:11 prooty hello. i am trying to create a template for a monitrc file. it is the configuration file used by mmonit, a monitoring system.
03:12 jjasinski_ joined #salt
03:12 prooty specifically, i would like to be able to use a template to monitor disk usage on mount points.
03:13 prooty on monit this looks something like "check filesystem hostname with path /"
03:14 prooty so i would like to be able to get the mounts on the salt-minion, something similar to the output of "df"
03:15 prooty i can see that this is available on mount.active, but i read that running module functions in a jinja template is executed only on the master, so this is not useful in my case. https://groups.google.com/forum/#!topic/salt-users/AyhLudjvqvg
03:16 prooty is it available as a grain somehow, or something similar? or is there a better approach? thanks.
03:17 cachedout joined #salt
03:32 anuvrat joined #salt
03:39 jjasinski_ Hi, I'm trying to push a full directory tree through the template engine; I'd like to recursively go through and replace all of the jinja context variables.  The sls file that defines this behavior is available here:  http://hastebin.com/fatigulera.yaml .  However, the directory is being copied over properly, but the context variables are not being replaced.  Does anyone know why the context variables are not bei
03:39 jjasinski_ replaced when using this logic?
03:44 jjasinski_ I'm running 0.17.1 btw
03:48 forrest jjasinksi_, I'm not extremely familiar with file.recurse as I don't use it too often. Did you try using the 'context' option?
03:48 forrest http://devopsreactions.tumblr.com/post/65031866520/realizing-that-accidentally-deleted-code-was-already
03:48 forrest sigh copy pasta fail
03:48 forrest context
03:48 forrest Overrides default context variables passed to the template.
03:48 forrest I don't know if you have to set that or not for the options you've defined to take effect (you're talking about user, dir_mode, etc. right)?
03:49 lesnail joined #salt
03:50 jjasinski_ Thanks forrest.  I haven't done anything with the context.  I'm new to that concept as it relates to salt, but will check it out.
03:51 forrest I'm not totally sure if that's what you need to do, but it's worth a shot. So right now are the name (path), and the user (owner of dir) getting set properly?
03:52 jjasinski_ I've been using them in other sls files successfully.  They are being set in the pillar
03:52 forrest so exactly which items are not getting set properly?
03:54 jjasinski_ I'm not able to pass, for example, the {{ sites_dir }} and {{ project_name }} to the jinja template…. it works when
03:54 jjasinski_ I use file.managed
03:54 jjasinski_ I'd been using the "- defaults" to pass it into the template.
03:54 forrest ahh so you're trying to set the defaults for the files that live within the directory
03:55 jjasinski_ Ya
03:55 forrest ok, as far as I am aware (feel free to prove me wrong here), file.recurse doesn't work like that.
03:56 forrest basepi are you around?
03:56 basepi Sorta. On my phone.
03:56 jjasinski_ Ok… do you know if there a different way to accomplish that?  (I have a directory tree that I would prefer not to explicitly manage all 20 or so files, if I can help it)
03:57 forrest basepi, ahh let me ask terminalmage, BY THE POWER OF GRAYSKULL!
03:57 forrest jjasinski_, yea I can understand that
03:57 basepi lol
03:57 basepi Ping me if you need me. =)
03:57 forrest Will do, we'll see if terminalmage responds first.
03:57 forrest he might be doing burpies though...
03:59 jjasinski_ (for some context, I'm trying to manage a django project template)
03:59 forrest jjasinski_, looks like it should work
03:59 forrest https://github.com/saltstack/salt/issues/2708
03:59 jjasinski_ Thanks… looking
03:59 forrest how about trying - template: jinja?
03:59 forrest that option is missing from your paste
04:00 jjasinski_ That's a good thought… I'll give it a try
04:00 forrest cool
04:00 forrest and I assume these templates work if you just try to apply them singularly right?
04:01 jjasinski_ Ya (I've tried for other files in the state tree using the same mechanism)
04:01 forrest ok cool, just wanted to make sure
04:03 jjasinski_ Nice, I think that did it… I get some errors when I do that, but the errors indicate conflicts with some django template tags (I probably just need to look up the syntax for escaping {{ }} in salt)
04:03 forrest awesome
04:03 jjasinski_ Thank you very much for your help
04:03 forrest I need to see if that is somewhere in the docs, and if not add it
04:03 forrest yea np
04:04 bhosmer joined #salt
04:04 forrest yea looks like it isn't in the docs, I'll update it and put in a pull request.
04:05 jjasinski_ That's great!
04:09 prooty joined #salt
04:14 prooty hello. does anyone have a suggestion for me?
04:16 forrest prooty, sorry I missed that one. You could use a state cmd, and then the reactor system (http://docs.saltstack.com/topics/reactor/index.html) perhaps?
04:17 forrest jjasinkski_, is this clear enough:  The template option is required when recursively applying templates.
04:18 forrest I can't really think of a better way to word it.
04:19 Gifflen joined #salt
04:19 falican joined #salt
04:21 falican how do people manage private keys with salt? For example I want to provision a server and have it able to access our github for checkout.
04:21 forrest usually that data gets stored in pillar falican
04:22 jjasinski_ forrest.. looking
04:22 forrest I think one sentence covers it
04:22 forrest I just can't think of a better way to word it that's as clear.
04:24 jjasinski_ forrest - I think that states it well
04:24 forrest ok cool, wanted to make sure it wasn't too confusing. Thanks
04:25 jjasinski_ Sure thing
04:25 pipps_ joined #salt
04:29 bretep[hirevue] joined #salt
04:29 prooty forrest, no worries. i'm sorry but i don't know how to use the reactor system in my case. do you mean to use it instead of monit to monitor the disk usage?
04:29 forrest prooty, oh I'm an idiot, I misunderstood your question
04:30 falican thnx forrest
04:31 forrest falican, np
04:32 forrest prooty, I'm trying to think of a good way to do this, so just to clear things up, you want to build the template info, based on data on the minion (in this case the mounts) correct? Mmonit just has a static config file that holds this data?
04:33 prooty yes that's correct.
04:33 forrest jjasinksi_, do you mind if I steal your file.recurse from earlier (modified for simplicity) as an example in the file state?
04:33 forrest and I assume the mounts are always different prooty?
04:35 forrest prooty, can you run salt 'name_of_example_minion' grains.ls?
04:35 prooty not really, but it could be. for example, some servers could only have one disk on /. others could have two disks, one on / and another on /mnt.
04:35 forrest I see
04:35 forrest ok, try that grains command, I can't remember if there is a grain for mounted filesystems
04:37 prooty yeah, the thing is i already tried salt '*' grains.items. on a default install there are no grains for mounted filesystems.
04:37 forrest lame
04:38 prooty forrest, brb. thanks for looking into my question. i'll reply later.
04:41 forrest prooty, sounds good. I'll throw out a couple suggestions for you. If you know certain types of machines are going to have specific mounts, I'd consider dumping the data into pillar (as sub items) so you would write two template files, one for each system type (app versus web for example), if that's not acceptable, the next best solution I can think of is a custom grain to determine the the mounts, and then populate that data into the templa
04:41 forrest te. The last option is to write some magic in the reactor system, but you'd have to do some crazy jinja there.
04:42 terminalmage forrest: sup?
04:43 forrest we figured it out terminalmage, we were discussing templates within file.recurse, figured out you had to use the - template option for it to parse.
04:43 forrest sorry for bugging you
04:44 terminalmage ahh, yes. if that's not explicit enough, file an issue for improved docs, or better yet, submit a pull request :-)
04:44 forrest I'm already working on it
04:45 forrest *puts on cool guy shades*
04:45 terminalmage sweeeeeet
04:45 terminalmage awesome.
04:45 forrest hey are we supposed to keep examples simple?
04:45 terminalmage ok, i'm out. night man
04:45 forrest later
04:54 nmistry joined #salt
04:55 berto- joined #salt
04:57 mwillhite joined #salt
05:02 druonysus joined #salt
05:02 druonysus joined #salt
05:17 prooty thanks for the suggestions forrest. i was thinking of those as well.
05:18 forrest yea np, let me know what you end up doing, it's an interesting use case.
05:21 flebel joined #salt
05:23 nmistry joined #salt
05:24 malinoff I hope some one will help me
05:24 malinoff Can i get file.managed from the git source?
05:24 malinoff I understand how to get a file from the master or via http
05:24 malinoff But I'm stuck with git
05:24 forrest via git_fs malinoff?
05:24 pipps joined #salt
05:25 malinoff forrest, not as backend for states
05:25 forrest oh
05:25 forrest :(
05:25 malinoff forrest, I need to get only one file that will be transfered to a minion
05:25 malinoff e.g.
05:25 malinoff /etc/something:
05:26 malinoff file.managed:
05:26 malinoff - source: git:// what's here?
05:26 forrest I use the git state
05:26 forrest http://docs.saltstack.com/ref/states/all/salt.states.git.html
05:27 forrest can you not do that either?
05:27 bretep[hirevue] joined #salt
05:28 micah_chatt joined #salt
05:30 forrest Hmm, does anyone activate a virtualenv, then run commands from within it? And if so, is there a better way to do that than with cmd.run?
05:31 malinoff forrest, I don't need to get all the repo, I need just a single file
05:33 forrest I haven't checked out a single file before
05:33 forrest there's this post on SO
05:33 forrest http://stackoverflow.com/questions/16674680/python-saltstack-how-can-i-manage-a-file-which-is-in-a-git-repo
05:33 forrest but that uses git_fs.
05:35 middleman_ joined #salt
05:35 malinoff forrest, Wow I wonder how I missed that! But anyway, it's no the perfect way, I really don't need that file on the master
05:36 forrest yea, git_fs is really the preferred method I think.
05:36 forrest then it will pull straight from your repo
05:36 malinoff forrest, It's not the best way imo
05:36 forrest it might not be in your situation, but I don't have a better solution
05:45 __number5__ forrest: if you need to run a python script in a virtualenv, directly run the bin/python in that virtualenv will work
05:46 forrest yea I was hoping there was a more elegant way than cmd.run, thanks though __number5__!
05:50 __number5__ actually it's not hard to achieve that with a custom module: http://www.virtualenv.org/en/latest/#using-virtualenv-without-bin-python
05:50 forrest yea I was more curious if it was possible to do from within the virtualenv state somehow
05:52 bhosmer joined #salt
05:53 flebel joined #salt
05:53 malinoff It looks like I can't retrieve one file from remote repo even from console :(
05:54 forrest that might be worth proposing an issue on/starting a discussion on the usergorup malinoff
05:54 forrest I've gotta head out for the evening, have a good one
05:54 malinoff forrest, In `git` mailing list? :)
06:05 Destro joined #salt
06:12 BogdanR Hi, I want to install salt with --prefix so I can make a build script and package it for some distro
06:12 Corey BogdanR: Which distro?
06:12 BogdanR NimbleX
06:12 Corey Does setup.py take a --prefix?
06:13 BogdanR No
06:13 Corey Hmm.
06:13 BogdanR So I wanted to ask how can I simulate this behavior
06:13 Corey That's a good question.
06:19 anuvrat joined #salt
06:22 __number5__ BogdanR: python setup.py install did support --prefix
06:23 BogdanR __number5__: So why was this removed?
06:24 BogdanR How would I handle this now?
06:24 __number5__ it's still there, I just test it, it works
06:25 __number5__ you need to checkout the source
06:25 BogdanR __number5__: I downloaded salt-0.17.1 from the site
06:26 __number5__ BogdanR: is NimbleX deb based or yum based?
06:26 BogdanR Neither
06:26 BogdanR It uses squashedfs packages
06:28 dave_den1 joined #salt
06:29 scooby2 joined #salt
06:29 BogdanR __number5__: http://pastie.org/pastes/8439236/text
06:29 cyp joined #salt
06:29 BogdanR What am I doing wrong here?
06:30 snikkers joined #salt
06:30 __number5__ should be 'python setup.py install --prefix=/root/testpy/
06:30 cce joined #salt
06:30 JesseC joined #salt
06:30 indymike joined #salt
06:30 NV err, just updated salt, getting http://pastie.org/private/2wtytnq19pq71ocbsyg - is it just me or should like 296 have pwuser.pw_gid not pwuser.gid as per http://docs.python.org/2/library/pwd.html
06:30 ksalman joined #salt
06:31 BogdanR __number5__: Too early for me :)
06:31 BogdanR Thanks
06:31 dork joined #salt
06:31 f47h3r joined #salt
06:31 __number5__ np
06:31 SEJeff_work joined #salt
06:31 ewong- joined #salt
06:32 fxdgear joined #salt
06:33 tempspace joined #salt
06:33 esogas joined #salt
06:33 BogdanR __number5__: But this would work similar to "make install DESTDIR=..." ?
06:33 pviktori joined #salt
06:34 __number5__ BogdanR: It should be, it follow normal Linux structure (bin/lib/share/etc.)
06:35 pipps joined #salt
06:37 __number5__ NV: what's the version of your python? even python2.6 docs says pw_gid http://docs.python.org/2.6/library/pwd.html
06:37 __number5__ oops, sorry
06:38 __number5__ NV: I think that's a bug already fixed in develop branch
06:38 NV __number5__: that's the pooint ;)
06:38 Nexpro1 joined #salt
06:38 __number5__ https://github.com/saltstack/salt/blob/develop/salt/utils/verify.py#L296
06:38 NV ah cool
06:40 NV hrm, just noticed some odd hosts appearing in unaccepted keys
06:41 NV any way to figure out what IP the host was that made the request?
06:42 Nazca joined #salt
06:55 aserdp joined #salt
06:57 NV so what is the best way to update minions?
07:03 Destro I do it as follow, /srv/salt I create the sls files and then push them to the respected servers - example "salt '*' state.sls iptables" - if there are better ways let me know. I work on push, do not want to pull configs on the working environment, rather have control when configurations change ?
07:05 NV ah sorry, probably should have been a bit more specific
07:05 NV i mean update salt-minion from 0.16 to 0.17
07:14 packeteer updating minions via salt is problematic afaik
07:14 packeteer best to do it out of band
07:15 packeteer ie. salt-ssh
07:22 berto- joined #salt
07:23 linjan joined #salt
07:24 bhosmer joined #salt
07:25 az87c joined #salt
07:25 gildegoma joined #salt
07:34 mirko joined #salt
07:34 giantlock joined #salt
07:40 bhosmer joined #salt
08:05 flebel joined #salt
08:05 carlos joined #salt
08:05 caleido joined #salt
08:06 caleido hello.. I'm experiencing an issue installing salt stack at mac os, following this tutorial: http://docs.saltstack.com/topics/installation/osx.html. anyone here who could help?
08:06 krissaxton joined #salt
08:07 matanya joined #salt
08:13 caleido I posted my question at SOF: http://stackoverflow.com/questions/19652877/installing-saltstack-at-mac-os-error-ld-library-not-found-for-lssl
08:15 malinoff joined #salt
08:19 balboah joined #salt
08:19 tallpaul joined #salt
08:20 sebgoa joined #salt
08:21 throwanexception joined #salt
08:21 jeddi joined #salt
08:26 [ilin] joined #salt
08:27 carmony joined #salt
08:27 throwanexception joined #salt
08:30 networkpadawan joined #salt
08:31 anuvrat joined #salt
08:32 pmrowla joined #salt
08:41 krissaxton left #salt
08:45 ollins joined #salt
08:45 ollin joined #salt
08:52 swa joined #salt
08:52 unicoletti_ joined #salt
08:52 networkpadawan joined #salt
08:57 zooz joined #salt
09:14 nn0101 joined #salt
09:21 Iwirada joined #salt
09:28 bhosmer joined #salt
09:28 bretep[hirevue] joined #salt
09:34 bhosmer joined #salt
09:42 bhosmer joined #salt
09:47 aserdp_ joined #salt
09:54 nocturn joined #salt
09:56 ssbarnea joined #salt
10:02 giantlock joined #salt
10:04 linuxnewbie joined #salt
10:04 linuxnewbie left #salt
10:04 uffiole joined #salt
10:04 donatello joined #salt
10:06 uffiole hi. What does the "%u" mean pls?
10:06 uffiole in my case this line
10:06 uffiole AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 /etc/ssh/authorized_keys/%u
10:06 uffiole the sls has no template statement.
10:07 Furao that's ssh stuff not salt
10:07 uffiole it is not replaced in no case
10:07 Furao man sshd_config
10:08 uffiole but sshd won't start, garbage at end of file
10:08 Furao escape it
10:17 uffiole thx for patience.  It seems as if only one auth.key file entry is accepted by _this_ sshd installation. No idea yet what's the real prob here. But for now I dismiss the rest
10:17 arnoldB hm. why would salt/ jinja complain about just a %
10:17 uffiole yep it's no salt issue
10:17 uffiole the template file is reproduced correctly
10:18 arnoldB uffiole: sorry. I've read "salt won't start". it's sshd
10:20 MTecknology joined #salt
10:21 neuwerld joined #salt
10:23 krissaxton joined #salt
10:24 backjlack joined #salt
10:24 avdhoot joined #salt
10:25 neuwerld left #salt
10:26 mVla joined #salt
10:26 mVla hello
10:29 bretep[hirevue] joined #salt
10:31 mVla I'm using salt 0.17 & getting always the same errors :TypeError: run_all() got an unexpected keyword argument 'python_shell'
10:31 mVla and found nothing on google
10:32 linjan joined #salt
10:32 mVla more precisely : salt 0.17.1
10:33 jumperswitch joined #salt
10:34 TheCodeAssassin joined #salt
10:36 mVla did someone managed to use salt 0.17.1 ?
10:39 flebel joined #salt
10:43 networkpadawan joined #salt
10:53 bhosmer joined #salt
10:55 gildegoma joined #salt
11:01 snikkers joined #salt
11:08 flebel joined #salt
11:09 qba73 joined #salt
11:14 bretep[hirevue] joined #salt
11:15 d10n joined #salt
11:18 Katafalkas joined #salt
11:18 Katafalkas joined #salt
11:20 diegows joined #salt
11:22 bhosmer joined #salt
11:31 flebel joined #salt
11:33 sgviking joined #salt
11:40 networkpadawan joined #salt
11:43 viq Is there any good example how to get users out of a pillar? https://gist.github.com/UtahDave/3785738 seems to be the best I found so far, http://russell.ballestrini.net/understanding-salt-stack-user-and-group-management/ second best but they are still a bit lacking I would say
11:48 networkpadawan joined #salt
11:57 srage joined #salt
12:01 vkurup joined #salt
12:01 networkpadawan joined #salt
12:07 pdayton joined #salt
12:15 bretep[hirevue] joined #salt
12:22 arthurlutz joined #salt
12:22 flebel joined #salt
12:25 arthurlutz Hi, i'm bupping into a problem with salt-ssh
12:25 arthurlutz I have a state called vim/init.sls and am trying to apply it
12:25 arthurlutz salt-ssh '*' state.sls vim - tells me No matching sls found for 'vim' in env 'base'
12:26 arthurlutz salt-ssh '*' state.sls states.vim - works, but Source file salt://vim/vimrc not found
12:26 arthurlutz when I change salt://states/vim/vimrc it works
12:26 ksk joined #salt
12:26 ksk hey
12:26 arthurlutz any idea why ?
12:29 viq arthurlutz: what is the directory one level up from vim/ ?
12:30 viq arthurlutz: and what is your file_roots setting?
12:33 pentabular joined #salt
12:35 viq Is there any good example how to get users out of a pillar? https://gist.github.com/UtahDave/3785738 seems to be the best I found so far, http://russell.ballestrini.net/understanding-salt-stack-user-and-group-management/ second best but they are still a bit lacking I would say
12:36 foxx joined #salt
12:36 arthurlutz viq: file_roots:
12:36 arthurlutz base:
12:36 arthurlutz - /srv/salt/states
12:36 arnoldB viq: don't do that
12:37 viq arnoldB: why not?
12:37 arthurlutz viq: one level up from vim is states/
12:37 arnoldB viq: sending the same question several times
12:37 viq arnoldB: ah, thought you meant the content, not fact of the question. Sorry.
12:38 amahon joined #salt
12:38 viq arthurlutz: hm, looks correct, though I don't know anything about salt-ssh
12:40 arnoldB arthurlutz: does it work with an installied minion?
12:40 blee joined #salt
12:40 arthurlutz arnoldB: yes
12:40 arnoldB viq: you write "but they are still a bit lacking I would say". what do you mean?
12:41 Ahlee anybody know of any prefab modules for interacting with aristas or cisco switches?
12:43 jrdx joined #salt
12:45 viq arnoldB: for one, I would like to specify group membership based on 'os' grain. Different ways to get ssh keys in, not sure which I prefer. One of them has beginnings of support for removing users, but it's incomplete. They don't change group membership if definitions change.
12:46 pentabular joined #salt
12:46 viq https://gist.github.com/viq/7213934 - here's my current attempt, but I'm having problems with getting that "group per os" part working
12:47 brianhicks joined #salt
12:51 arnoldB viq: group1.sls is a sls file. why not pillar?
12:51 viq arnoldB: it is a pillar, admin.sls and group1.sls are in pillar
12:52 jslatts joined #salt
12:52 arnoldB ok
12:53 swa joined #salt
12:54 arnoldB viq: I would move the logic (the content of admin.sls) to the users.sls
12:55 viq arnoldB: state, or pillar?
12:55 arnoldB viq: IMHO pillars shouldn't contain any dynamic data.
12:55 arnoldB viq: state
12:56 viq OK. Though plenty of examples do show dynamic data in them
12:56 logix812 joined #salt
12:56 timoguin joined #salt
12:56 logix812 I get a KeyError when I __salt__['postgres.version']
12:57 viq arnoldB: though how would I reference that adm_group then?
12:57 logix812 is postgres.version only made available AFTER postgres is installed?
12:57 logix812 if I do a second provisioning run
12:57 logix812 everythign works peachy
12:58 viq logix812: what version of postgersql do you have installed when you don't have it installed? ;)
12:58 logix812 Well, my states that use postgres.version
12:59 logix812 require:
12:59 logix812 - pkg: postgres
12:59 logix812 (properly instaleld)
12:59 logix812 so they don't run till after it installs
12:59 viq logix812: I would test whether installed is enough, or does it need to be running
12:59 logix812 ahhh
12:59 logix812 good idea, I'll try that too
13:00 logix812 oh ya, version runs some SQL
13:00 arnoldB viq: move the code of admin.sls to the state in users.sls?
13:00 viq arnoldB: Yes. But then in group1.sls I reference that. When it was in pillar, I was trying to get the pillar value. If it's in state, how do I get to it?
13:02 arnoldB viq: do you really need it? if so, why?
13:03 viq arnoldB: "maybe". On most platforms default sudo installation (well, one line uncommented) allows group wheel to run it. Except debian derivatives, who haven't heard of group wheel and instead use group sudo
13:05 viq And using platform specific group seems "cleaner" than adding an explicit group to all the systems for that reason.
13:06 arnoldB viq: if you want to remove the membership of the sudo group in another state, you fetch name of the group with the same mechanism (if OS = X; name = y; ..)
13:07 arnoldB viq: I don't understand why it should be necessary to store dynamic data in pillar.
13:07 Gifflen joined #salt
13:07 arnoldB (K)eep (It) (S)imple (S)tupid
13:08 viq arnoldB: http://docs.saltstack.com/topics/tutorials/pillar.html  does exactly that
13:08 Zuru joined #salt
13:09 arnoldB viq: where?
13:09 arnoldB ok
13:09 arnoldB hm
13:10 anteaya joined #salt
13:11 racooper joined #salt
13:11 oz_akan_ joined #salt
13:12 srage joined #salt
13:13 arnoldB viq: have you executed  saltutil.refresh_pillar ?
13:13 viq yes
13:15 Ahlee is there a way to view the documentation as a snapshot? I see on docs.saltstack.com stuff from 0.18.0, and I don't care about anything past 0.16.3.
13:15 mVla Do somebody know what /var/cache/salt/minion/extmods/modules/* are user for ?
13:15 flebel joined #salt
13:15 arnoldB viq:  is the correct group name listed in pillar.data?
13:16 bretep[hirevue] joined #salt
13:16 viq Ahlee: http://salt.readthedocs.org/en/v0.16.4/  ?
13:16 Ahlee mVla: That's where _modules/ are stored
13:16 juicer2 joined #salt
13:17 Ahlee so if you have _module/foo.py on your master, run saltutil.sync_modules, then the minions store the python modules at that location
13:17 Ahlee viq: know what the difference is between docs.saltstack.com and salt.readthedocs.org?
13:17 viq arnoldB: not sure what that is, but I pasted output of 'salt db1 pillar.get adm_group' below the gist
13:18 Ahlee although, thank you. That is good to know.
13:19 mVla Ahlee: thanks ! :)
13:19 viq Ahlee: sorry, not sure. I think docs.saltstack.com they maintain themselves, and readthedocs are generated from what's in the repo... But I think they try to have most stuff in the repo, so they should be same. But that's me guessing
13:19 arnoldB viq: that's state.sls or something. you mean the comment below the gist, right?
13:19 viq yes, comment below the gist
13:19 SEJeff_work joined #salt
13:20 viq arnoldB: specifically https://gist.github.com/viq/7213934#comment-939404
13:20 arnoldB https://gist.github.com/viq/7213934 these are reports from states
13:20 arnoldB ah ok
13:20 arnoldB haven't refresh that site
13:22 sebgoa joined #salt
13:22 arnoldB viq: I'm not sure but I guess you need an extra loop for args['groups']
13:22 viq arnoldB: https://gist.github.com/UtahDave/3785738 which I'm basing off doesn't
13:24 rgbkrk joined #salt
13:24 arnoldB viq: hm sorry. don't have a test env here. for me it looks ok then
13:26 viq want test environment? That's exactly what I'm doing ;) https://github.com/viq/cm-lab-salt
13:28 arnoldB I just can't access my test env at the moment. I'm also about to drive home in a half hour
13:28 * viq nods
13:28 Khollowa_ joined #salt
13:29 honestly I'm getting a weird salt/pillar issue here
13:29 honestly https://gist.github.com/duk3luk3/7214640
13:29 honestly looks like my minion is out of sync
13:29 honestly but I ran saltutil.sync_all
13:30 arnoldB honestly: did you run saltutil.refresh_pillar ?
13:31 honestly shouldn't sync_all refresh pillar data?
13:31 honestly damn
13:32 honestly running it with salt-call from the minion directly worked
13:32 arnoldB dunno
13:32 mgw joined #salt
13:32 honestly (the state doesn't use pillar btw)
13:32 honestly oh well.
13:34 flebel joined #salt
13:34 viq arnoldB: thank you for assistance :) I'll poke it some more, if you want final result will be in my cm-lab-salt ;)
13:35 arthurlutz does salt-ssh require python-msgpack to be installed on the host machine ?
13:35 honestly is there a way to tell salt to print a summary report of salt-calls?
13:36 honestly I just want to be able to see which minions the state succeeded on and which it didn't
13:36 honestly at a glance
13:36 honestly and then scoll up if anything failed...
13:36 ashtonian joined #salt
13:36 viq honestly: returners?
13:36 m3rk joined #salt
13:36 honestly viq: ?
13:37 viq honestly: http://docs.saltstack.com/ref/returners/all/index.html
13:37 m3rk Is salt more used to manage application deployment? Or can salt be used to manage a network from an IT perspective?
13:38 honestly hrm
13:38 honestly m3rk: both, but more "generic network management"
13:38 honestly m3rk: but it's pretty easy to set up deployments
13:38 arthurlutz m3rk: both
13:38 m3rk honestly: well i was looking for the "generic network management"
13:38 honestly m3rk: see the salt-formulas repo for lots of deployment formulas
13:38 m3rk honestly: I was reading up on chef but it seemed the wrong solution
13:38 honestly ok (:
13:39 viq depends what you mean by "network management", I don't think salt can manage cisco and such
13:39 honestly m3rk: I'm using salt to manage openvpn and set up a poor man's ldap
13:39 honestly ldap auth*
13:39 honestly also crontables
13:39 honestly and ssh config
13:40 arnoldB I see salt for configuration manamgent and remote execution. this also handles software deployment
13:40 m3rk viq: I'm looking more for getting information about hosts, and making sure that they have the same software installed
13:40 viq m3rk: if those are *nix machines, you may also take a look at ansible. Very similiar concept to salt, some people say it's easier, though I prefer power of salt
13:40 micah_chatt joined #salt
13:40 m3rk viq: *nix, Windows, OS X
13:40 viq Ah, I don't think ansible does windows
13:41 viq m3rk: what didn't you like about chef?
13:41 Ixan I'm having an issue with a custom returner. I've copied the couchdb_returner.py into /srv/salt/_returners, but it seems like it doesnt get synced when i run saltutil.sync_returners
13:41 m3rk viq: it didn't seem like the right solution for what I need, it seemed like it was for scaling application level deployments
13:41 arnoldB m3rk: you can check whether it is installed and you can let salt ensure that it is installed
13:42 viq m3rk: no, chef manages systems too, people do use it to do what you say. Same with puppet
13:42 m3rk arnoldB: will it give me serial numbers etc across the network?
13:42 arnoldB m3rk: what serial number?
13:42 viq m3rk: you may be interested in http://ralph.allegrogroup.com/
13:43 m3rk arnoldB: Like on OS X it has the serial number, or on Dell the help key
13:43 m3rk viq: you're the man
13:43 arnoldB m3rk: if there's no comfortable module you can execute arbitary shell commands too
13:44 viq m3rk: another one: http://www.ocsinventory-ng.org/en/
13:44 mpanetta joined #salt
13:44 m3rk viq: Yea I was looking at OPSI but it doesn't do OSX
13:45 bretep[hirevue] joined #salt
13:45 viq m3rk: http://www.ocsinventory-ng.org/en/about/features/supported-os.html lists OSX
13:46 m3rk viq: thanks for the help
13:46 viq :)
13:46 viq time to finally look for some food ;)
13:47 m3rk viq: always good to get some food :D
13:49 joehh joined #salt
13:51 timoguin viq, thanks for the ralph link.
13:51 timoguin project looks really promising
13:51 trevorj joined #salt
13:51 pass_by_value joined #salt
13:51 permalac joined #salt
13:53 trevorj For the raring PPA release, what about pre-compiling the manpages in the sdeb?
13:53 mapu joined #salt
13:53 trevorj What's the ETA on a saucy PPA release?
13:55 fragamus joined #salt
13:59 pdayton joined #salt
14:00 mgw joined #salt
14:00 kermit joined #salt
14:01 c0bra joined #salt
14:03 mannyt joined #salt
14:03 Ymage joined #salt
14:03 networkpadawan joined #salt
14:03 abe_music joined #salt
14:09 aberant joined #salt
14:11 mua joined #salt
14:15 flebel joined #salt
14:18 opapo joined #salt
14:19 ipmb joined #salt
14:23 m_george left #salt
14:28 cachedout joined #salt
14:29 jergerber joined #salt
14:30 flebel joined #salt
14:30 bretep[hirevue] joined #salt
14:31 ncjohnsto joined #salt
14:34 ashtonian joined #salt
14:40 brianhicks I'm trying to set up salt-cloud, and I keep getting `KeyError: 'ec2.get_configured_provider'`. Is this common?
14:45 brianhicks anyone?
14:45 gmcwhistler joined #salt
14:46 mgw joined #salt
14:47 HeadAIX joined #salt
14:47 jrdx joined #salt
14:48 scristian joined #salt
14:48 darrend left #salt
14:48 cnelsonsic joined #salt
14:49 unicoletti_ left #salt
14:52 cowmix3 joined #salt
14:52 ksk hey guys
14:52 felixhummel joined #salt
14:52 mmarch joined #salt
14:53 ksk i like using file.find  - but im afraid it does not come with all the nice features gnu find has - is it planned to add some?
14:53 mwillhite joined #salt
14:54 brianhicks found a solution to my problem: if you misspell `private_key` as `privatekey` it gives that error. I'll open a bug.
14:55 dave_den1 left #salt
14:55 alunduil joined #salt
14:55 dave_den joined #salt
14:56 aberant joined #salt
14:57 oz_akan_ joined #salt
14:59 pentabular joined #salt
15:02 ksk eg right now i wanted to use "-perm" but will have to iterate over the find with "print=mode" and check that for myself
15:02 jcsp joined #salt
15:03 xmltok joined #salt
15:04 bhosmer joined #salt
15:09 pentabular1 joined #salt
15:10 flebel joined #salt
15:10 cachedout joined #salt
15:11 cachedout joined #salt
15:15 utahcon in my /top.sls I have 'crwm*-(dev|test|stg)': which I would expect to match crwmi-dev, crwmi-test etc... however it doesn't seem to be matching at all
15:16 mVla bye
15:16 mVla left #salt
15:19 tempspace Is pip.installed broken for anybody in 0.17.1?
15:21 jimallman joined #salt
15:21 viq utahcon: and what 'match' statement do you have underneath it?
15:21 flebel joined #salt
15:24 utahcon viq this is my current top.sls http://pastebin.com/4TPXTMuw
15:24 utahcon not sure what you mean about the match statement underneath it
15:25 pipps joined #salt
15:25 pipps_ joined #salt
15:26 viq utahcon: that won't work
15:27 utahcon ah ok
15:27 viq let me find syntax
15:27 utahcon thanks
15:27 smccarthy joined #salt
15:27 cachedout joined #salt
15:27 StDiluted joined #salt
15:28 utahcon I thought this http://docs.saltstack.com/topics/targeting/globbing.html made it seem like it would
15:28 bhosmer joined #salt
15:28 utahcon and crwmi-* did work
15:28 viq utahcon: http://docs.saltstack.com/ref/states/top.html#other-ways-of-targeting-minions
15:29 viq utahcon: yes, because that's not using PCRE
15:30 viq utahcon: and that page also mentions the '-match: pcre' ;)
15:31 utahcon ah ok
15:31 utahcon that makes sense
15:31 utahcon thanks!
15:32 pipps_ register
15:32 jalbretsen joined #salt
15:33 elfixit joined #salt
15:34 bretep[hirevue] joined #salt
15:36 flebel joined #salt
15:39 brimpa joined #salt
15:40 pentabular joined #salt
15:42 Ryan_Lane joined #salt
15:49 lusid joined #salt
15:52 anuvrat joined #salt
15:58 londo joined #salt
15:59 micah_chatt joined #salt
16:00 viq Bah, any ideas why {{ salt['pillar.get']('adm_group') }} does not get the proper data in here? https://gist.github.com/viq/7213934
16:01 pentabular left #salt
16:02 eliasp_ joined #salt
16:06 crashmag joined #salt
16:07 21WABO9HT joined #salt
16:07 1JTAA574L joined #salt
16:07 robawt viq: {{pillar['admin_group']}}
16:07 robawt guessing here, i haven't seen your pillar
16:07 21WABO9HT left #salt
16:07 viq robawt: https://gist.github.com/viq/7213934 the top file there
16:08 bhosmer joined #salt
16:08 bhosmer_ joined #salt
16:09 pkimber joined #salt
16:09 flebel joined #salt
16:09 HeadAIX joined #salt
16:10 robawt viq: is the pillar top file allowing the host in question access to admin.sls?
16:10 bhosmer__ joined #salt
16:10 ml_1 joined #salt
16:11 viq yes, it has:
16:11 viq 'db1':
16:11 viq - users.admin
16:11 viq - users
16:12 logix812 when using the latest vagrant are there any known issues around initially running highstate when using gitfs?
16:12 logix812 even when I call saltutil.sync it seems to need to wait a good 60 seconds or so
16:12 logix812 before it actually knows my gitfs states exist
16:12 bhosmer_ joined #salt
16:13 KyleG joined #salt
16:13 KyleG joined #salt
16:14 forrest joined #salt
16:15 taylorgumgum joined #salt
16:15 bemehow joined #salt
16:19 noob21 joined #salt
16:19 noob21 salt: can you schedule salt-ssh calls to certain minions?  i found out this morning that cron jobs don't work properly in docker containers :( . I can't use salt-call on a cron schedule like i normally do
16:19 jcsp joined #salt
16:20 bhosmer_ joined #salt
16:20 noob21 if anyone has an easier idea i'm all for it
16:20 forrest noob21, I don't believe there is a built in scheduler function for salt-ssh.
16:20 noob21 darn
16:21 lusid Is it ridiculous to use the return data of a grains call from a salt publish command to build a list of IP addresses in a Jinja template?
16:21 noob21 so any ideas about how i can periodically get my states to run on the docker containers?
16:22 viq lusid: I believe it's either that, or use the mine system
16:22 forrest noob21, The only way I can think would be to write your own service that polls the time.
16:22 bhosmer joined #salt
16:22 forrest it might be worth asking over in the docker IRC?
16:22 forrest seems weird you can't use cron
16:22 noob21 yeah i'll hit them up also
16:22 noob21 yeah it's stupid
16:22 forrest ok, if they provide a solution can you let me know?
16:23 noob21 yeah i'll find out in a sec
16:23 dave_den noob21: what's running in the docker?
16:23 lusid viq: Thanks. I'll take a look at the mine functionality.
16:23 forrest cool
16:23 noob21 dave_den: just django, nginx and uwsgi
16:23 noob21 but i'd like to use salt to automate the container setup
16:23 noob21 maybe i'm thinking about these containers the wrong way.  i'm trying to shoe horn them into being like vm's
16:24 lineman60 joined #salt
16:24 dave_den why not just use lxc containers instead of docker if you're going to have salt configure them anyway?
16:24 bhosmer joined #salt
16:25 noob21 dave_den: good question.  i found docker much easier to setup than lxc containers
16:26 dave_den i'm prejudiced against docker, but i would just use lxc containers.
16:27 noob21 forrest: you're right i could just python my way out of this problem.  write a little script that sleeps for 1hr and then subprocess calls state.highstate
16:27 noob21 dave_den: hating on the new hotness ;) ?
16:27 forrest noob21, yea it would be ghetto
16:27 forrest but you could do it
16:27 bhosmer_ joined #salt
16:27 noob21 oh totally, it's super ghetto
16:27 forrest but so is cron not working
16:27 forrest lol
16:27 noob21 exactly
16:27 noob21 my question in #docker seems to be getting crickets
16:28 dave_den noob21: no, i just don't get the appeal of docker. :)
16:28 noob21 it's just easy portability
16:29 noob21 the port forwarding in one command is handy also
16:29 forrest noob21, it might take longer over there to get an answer, the salt irc spoils you :\
16:29 bhosmer joined #salt
16:30 luketheduke joined #salt
16:30 luketheduke joined #salt
16:30 noob21 forrest: the docker channel answer was: anachron or use supervisord or the like
16:30 noob21 yeah you guys are awesome
16:30 forrest that's... lame
16:30 utahcon is it possible to change a value IN a file that is managed using jinja? I want something in a config file to change based on the server it is going to.
16:30 forrest why does cron not work?
16:30 forrest utahcon
16:30 forrest yes
16:30 noob21 that's a good question.  i'm not sure
16:31 noob21 lemme attach to that container again and see if there's any cron logs
16:31 bhosmer__ joined #salt
16:31 utahcon forrest: is that where the - template: jinja comes in/
16:31 jdenning joined #salt
16:31 utahcon nm found it
16:31 utahcon thanks!
16:31 forrest utahcon, exactly. Take a look at http://docs.saltstack.com/topics/tutorials/states_pt3.html
16:31 viq noob21: you may also try in ##infra-talk
16:32 forrest utahcon, ok cool. I believe there is a page for actually templatizing files as well
16:32 noob21 viq: cron nerds live there?
16:32 gildegoma joined #salt
16:32 troyready joined #salt
16:32 viq noob21: admin nerds live there
16:33 Corey noob21: Log into the container. Is there a process with "cron" in the name running?
16:33 noob21 lemme check, one sec
16:33 ksk anybody used the "print" option for file.find? it works using "salt-call" but not inside a module; it get an "SyntaxError: invalid syntax"
16:33 noob21 Corey: no cron process
16:34 Corey Well, there you go.
16:34 pkimber joined #salt
16:34 noob21 heh
16:34 krissaxton left #salt
16:34 mgw joined #salt
16:34 noob21 goofy containers
16:34 Corey noob21: So work around it.
16:35 Corey There's a persistent Salt connection to the minion inside the container, right?
16:35 Corey Leverage the master's cron to schedule jobs to fire up via salt.
16:35 noob21 yeah there's a running salt minion
16:36 noob21 well i should say salt-call works but there's no salt minion process running
16:36 noob21 when i start the init script nothing happens
16:37 noob21 Corey: so if i just run cron that works it looks like.  i see a cron process now.
16:37 noob21 it must be super bare bones and doesn't enable or start anything
16:37 Corey Sounds like Docker woes then. We do kinda require a working environment minionside. :-)
16:38 noob21 haha yes
16:38 noob21 i'll just write a state that kicks off the cron process if it's not pgrep able
16:38 noob21 that should get this somewhat sane
16:39 Corey noob21: Uh, that's horrible. :-)
16:39 noob21 lol...
16:39 Corey They don't have a systemd equivalent?
16:39 noob21 it's an ubuntu base image
16:39 noob21 upstart i guess
16:39 Corey update-rc.d doesn't exist there?
16:39 noob21 lemme check
16:39 viq noob21: why would you do that to yourself? ;)
16:39 noob21 it does
16:40 noob21 lol..
16:40 noob21 you guys :D
16:40 Corey noob21: update-rc.d crond enable or whatever it's calle.
16:40 noob21 lets see what's in the rcX files
16:42 dave_den docker doesn't exec init, right? it just starts the process or script you specify in your dockerfile, i thought
16:42 noob21 i believe that's what is going on yes
16:42 noob21 it gives you a little box, runs what you want and calls it a day
16:42 dave_den right.
16:42 dave_den so just start cron and your app…?
16:42 noob21 yeah i think that should be fine
16:42 redondos joined #salt
16:43 noob21 i'm trying to automate all this crap
16:43 noob21 so i was hoping to start ssh and then have salt to the rest
16:43 noob21 enable cron, start my crap, etc
16:43 dave_den you can do that, too
16:44 viq ssh? or would running a minion inside make more sense?
16:44 noob21 i've got a minion in there yeah
16:44 noob21 but i need cron to kick off the initial call
16:44 networkpadawan joined #salt
16:45 dave_den i think there's some confusion here
16:45 dave_den noob21: if you have salt-minion running in your docker, why use salt-ssh?
16:45 ksk file.find has an option "print=" - how am i supposed to use that in python as its a reserved word!?
16:46 noob21 oh i see what you're saying
16:46 noob21 so yes the salt-minion is running but in order to have the state of the machine change you either need to push from the master or pull from the minion right?
16:46 pentabular joined #salt
16:47 viq noob21: yeeees.... but check out the reactor system
16:48 viq http://docs.saltstack.com/topics/reactor/index.html
16:48 noob21 hmm ok
16:48 noob21 salt has too many tools :D
16:48 viq That way salt master can tell minion to run highstate when it connects
16:48 noob21 so i'd start the salt minion service and then the master would say run highstate
16:48 pentabular left #salt
16:48 viq aye
16:49 noob21 that sounds good
16:49 dave_den noob21, if you have salt-minion running in your docker, you can use the built-in schedule to continuously have the minion apply a state. http://docs.saltstack.com/topics/jobs/schedule.html
16:49 viq There's also that
16:49 noob21 yeah i was wondering about that also
16:49 dave_den also, you can have salt-minion run highstate on startup
16:49 dave_den so when you create your docker, just start salt-minion and have the highstate do the configuration.
16:50 noob21 how does the scheduler work?
16:50 dave_den http://docs.saltstack.com/topics/jobs/schedule.html
16:50 noob21 yeah i'm looking at it
16:50 kaptk2 joined #salt
16:50 noob21 at the given minute does it tell the minion to execute a highstate or is it more the master pushing changes down at x minute?
16:51 noob21 oh that's right i tried setting this up on the master with a returner.
16:51 noob21 i'll setup a highstate also for every 60 mins
16:53 linjan_ joined #salt
16:55 noob21 with the minion scheduler will it prevent another highstate call from happening if the previous one is stuck?
16:55 ahwitz joined #salt
16:56 ahwitz Anybody active?
16:56 jdenning joined #salt
16:57 dave_den noob21: yes. only one highstate can be running at any time
16:57 dave_den which makes sense
16:57 dave_den dueling highstates would be madness  :)
16:57 noob21 perfect.  that'll remove my crappy cron tab hack to only run salt call if pgrep for it fails
16:58 noob21 yeah i've had problems where my init scripts would hang forever and the salt-call would never end
16:58 dave_den that's an issue with an improper init script, yeah
16:58 flebel joined #salt
16:59 bhosmer joined #salt
17:03 xmltok has there been any updates with regards to spm since the august salt-users discussion?
17:03 noob21 dave_den: yeah the script was screwed up.  the ceph start script would try to start a monitor and just hang forever
17:05 ajw0100 joined #salt
17:05 dave_den xmltok: i believe that's what saltstack-formulas is supposed to be working toward. https://github.com/saltstack-formulas
17:06 utahcon Is there a way in jinja to use substr or regex to simplify this: http://pastebin.com/HNQuLtWX
17:06 utahcon for example capture the string after the - and make part of the variable based off of that?
17:08 xmltok dave_den: yeah, there was some talk about versioning and being able to do includes. i'm looking to start writing formulas for internal apps but i am worried about making formulas depend on other formulas, and untested changes. for example if i have a dozen formulas that depend on my apache formula and i change that apache formula, there is no way to keep my dozen formulas on the old version of my apache formula until i have tested them.
17:10 dave_den utahcon: can you just use pillar instead?
17:10 xmltok i could tag versions in my git repos but i dont think there is a way to map a tag to an environment, it would have to be the version for the entire environment
17:10 jacobw joined #salt
17:11 dave_den when you use gitfs for your file_roots, the branch name is the environment name
17:11 dave_den you can do branch based versioning
17:11 viq Bah, I'm starting to doubt you can use pillar in a pillar
17:11 xmltok does the dev: http example on http://docs.saltstack.com/ref/states/include.html discuss my problem? I could have my apache formula with a bunch of tagged versions, each of my dozen apps could select which tag to include?
17:14 xmltok if i understand it right, i could 'include: 1.0: http' in my app formula that depends on the 1.0 version, and use a git tag to create 1.0 in my http formula
17:14 KyleG left #salt
17:15 UtahDave joined #salt
17:15 bhosmer joined #salt
17:16 viq https://gist.github.com/viq/7213934 - I still didn't manage to get this to work properly...
17:17 bhosmer_ joined #salt
17:20 bhosmer joined #salt
17:20 viq UtahDave: maybe you'll know, since I'm basing stuff off of your gist ;) Based on https://gist.github.com/UtahDave/3785738 I'm trying to modify it, namely list groups in another pillar, but failing - https://gist.github.com/viq/7213934
17:20 dave_den xmltok: can you not do branch based development?
17:21 dave_den xmltok: if not, you can use jinja in your state files to do conditional includes
17:22 bhosmer joined #salt
17:22 UtahDave viq: looking
17:23 viq thanks :)
17:23 xmltok branched meaning prod/dev/base? yeah, but i am worried about not having specific versions of formulas. in chef i could have apache cookbook version 1.0, 1.1, 1.2, and one app cookbook tested on 1.0, another on 1.2, so each one could have the specific version that was tested and working. i dont see how i can do that if everything is in just in prod or dev
17:23 Psi-Jack In a state that I use file.recurse in to pull a whole directory from, how do I then go through certain files in it, making sure they are permissioned specifically?
17:23 xmltok what i could do is have my apache formula tagged with 1.0, 1.1, 1.2, and use a 1.0: apache  in one formula, and 1.2: apache in another
17:23 ccase_ joined #salt
17:24 dave_den xmltok: if you want to do that, then use jinja in your state files to include the proper version
17:24 UtahDave Psi-Jack: have some other states the require the file.recurse state that set the permissions correctly
17:24 Psi-Jack For example: http://paste.hostdruids.com/view/c1763762
17:24 bhosmer joined #salt
17:24 Psi-Jack UtahDave: The state? I have prereq now for the file, how would I do it for the exact state if it's in the same file?
17:24 xmltok jinja to template out the version information so i could keep the version number in something other than the state file?
17:25 ccase_ joined #salt
17:25 dave_den xmltok: you can organize your states either by directories or by appending a version
17:25 dave_den so say you had apache.sls
17:25 UtahDave viq: can you pastebin your pillar top.sls?
17:25 ctdawe joined #salt
17:25 dave_den you could simply do apache-1.0.sls, apache-1.2.sls
17:25 viq UtahDave: https://gist.github.com/7219036
17:26 dave_den and then in your including statefile, use jinja to include the proper version of apache
17:26 Tekni joined #salt
17:26 UtahDave Psi-Jack: where is your state that your prereq is referring to?  You can't refer to the file directly. You can only refer to another state that manages that file
17:26 viq UtahDave: most of the config is at https://github.com/viq/cm-lab-salt though the user stuff not yet, as I didn't get it to work yet
17:27 bhosmer_ joined #salt
17:27 Psi-Jack UtahDave: You see what I'm trying to do from my paste? I need activemq-bin to require activemq-files. The state itself is activemq.init.sls
17:27 Psi-Jack Err. activemq/init.sls :)
17:27 Ahlee ooo goody
17:27 UtahDave Psi-Jack: just a sec. Let me sort out viq's problem and then I'll look more closely at yours.
17:27 Psi-Jack Sure. :)
17:27 xmltok dave_den: i get it, then i can still promote version changes through environments. if i was to use a 1.0 and 1.2 tag i wouldn't be able to test those tags in dev before they are released to prod
17:27 viq UtahDave: thank you :)
17:28 Psi-Jack That unless I have I noticed just threw me a curveball too. :)
17:28 jslatts joined #salt
17:28 xmltok or you just make it so you are not allowed to alter tagged versions once they are cut. maybe do a 1.0-snapshot and 1.0-release type of thing
17:29 dave_den xmltok: you can store the available version info in pillar, then apply the desired versions by targeting that pillar at minions. then use that pillar data in your state file
17:29 amckinley joined #salt
17:30 Katafalkas joined #salt
17:32 xmltok jamming the version info into a pillar also makes it easier to find out what formulas are still referencing old state files
17:32 UtahDave viq: pastebin the output of    salt 'db1' state.show_sls users.group1
17:32 xmltok do people usually have another git repo for just their pillar data?
17:32 xmltok im looking at git repos for each formula, a git repo for the top file and custom grains, and another repo for pillar data?
17:32 dave_den xmltok: if you're using file based pillars, absolutely
17:33 viq UtahDave: huh, it's empty: https://gist.github.com/viq/7219151
17:33 xmltok and probably one more private repo for secure pillar data
17:33 bemehow joined #salt
17:33 xmltok man there is a blog post in here on some best practices for salt masters
17:33 xmltok and another one on managing versions and releases for formulas
17:34 UtahDave viq: I would focus on that one sls file for right now.  Isolate it and figure out what's going on with that.
17:34 viq UtahDave: though that's a pillar, would that matter?
17:34 dave_den xmltok: there's a need for more real-world deployment strategies being used, for sure
17:34 UtahDave viq: oh, really?  Let me look again
17:35 viq UtahDave: yes, only users.sls is state, rest are pillar files
17:35 UtahDave viq: OK, you can't call for a pillar from another pillar.
17:36 UtahDave while the pillar is being compiled, the 'pillar' dict is emtpy, until the very end
17:36 viq UtahDave: bah... any good way around it?
17:36 dave_den UtahDave: with the exception of ext_pillars. the previously compiled pillar gets passed to the next pillar. you could hack it by chaining ext_pillars
17:37 UtahDave viq: grains for the minion are available, so I would move the logic you have in admin.sls into group1.sls
17:37 UtahDave dave_den: yes, ext_pillars is the way to go if you want complete control of how your pillar is built.
17:37 UtahDave You don't even have to actually connect into an external data source, if you don't need
17:38 viq UtahDave: but group1.sls is a pillar as well...
17:38 UtahDave viq: right.
17:38 bhosmer joined #salt
17:38 UtahDave viq: so move that test for 'debian' into group1.sls under the "groups" dict
17:38 viq UtahDave: ah, ok. Would I be able to define that at the top somewhere, or would I have to have the if block for each user?
17:39 UtahDave Yeah, you could define that at the top
17:39 viq And how would I call it from the user definitions?
17:40 druonysus joined #salt
17:40 UtahDave just set the jinja variable at the top.   So if you set adm_group to be a jinja variable under groups you would put  - {{ adm_group }}
17:40 viq Sweet, let me try
17:41 UtahDave Look up the syntax to set a jinja variable.
17:41 UtahDave Psi-Jack: OK, I think the problem you're running into is that when you use a requisite you have to point the requisite to another state within your sls file.
17:41 Psi-Jack Ahh part of it, yes.
17:42 Psi-Jack UtahDave: The other part is activemq-files has an unless statement, so it never gets fired after it's already deployed. :)
17:42 utahcon is it possible/correct to run commands like 'rm -Rf /var/www/*' in a state?
17:42 utahcon or a better example, git checkouts?
17:42 viq utahcon: there's cmd state, and there are specific states too
17:42 UtahDave Psi-Jack: So if you want to prereq:\n  - file: /opt/activemq/bin/activemq    , then you have to have something like    file.managed:\n - name /opt/activemq/bin/activemq
17:42 UtahDave utahcon: Yep, you can do anything you want with a cmd.run
17:43 dave_den utahcon: with cmr.run, yes.
17:43 dave_den cmd.run, even
17:43 utahcon I know about cmd.run
17:43 utahcon can you do cmd.run from within a state?
17:43 viq utahcon: http://docs.saltstack.com/ref/states/all/salt.states.git.html#module-salt.states.git
17:43 dave_den for git checkouts, use the git state
17:43 viq utahcon: yes
17:43 UtahDave utahcon: yeah
17:43 utahcon cool
17:43 utahcon thanks
17:43 toofer joined #salt
17:44 dave_den utahcon: be aware there are command modules and state modules.
17:44 Psi-Jack utahcon: Hmmm. What I really want is to always just insure /opt/activemq/bin/activemq is permissioned out, after directory /opt/activemq/bin exists, but only after.
17:44 Psi-Jack UtahDave: ^^
17:44 Psi-Jack UtahDave: I have another issue with other file.managed that's sourced in, but also depend on /opt/activemq/bin existing.
17:44 dave_den utahcon: e.g. http://docs.saltstack.com/ref/modules/all/salt.modules.cmdmod.html   and  http://docs.saltstack.com/ref/states/all/salt.states.cmd.html
17:46 pentabular joined #salt
17:46 toofer left #salt
17:47 networkpadawan left #salt
17:49 Ryan_Lane joined #salt
17:49 bemehow joined #salt
17:50 UtahDave Psi-Jack: So what you'll want to do is have a file.managed with a - name /opt/activemq/bin/activemq  with no source and that sets that correct file permissions.  Have that file.managed require the original file.recurse
17:50 flebel joined #salt
17:50 Psi-Jack UtahDave: Interesting.
17:50 mr_chris Just found an odd case. I'm setting up rsyslogd like so. http://paste.linux-help.org/view/61d4a97b Problem is, while it successfully starts rsyslogd, whether it was running or not it returns that the service is already running and nothing needed to be done, like so. http://paste.linux-help.org/view/5d20aa59
17:53 dave_den mr_chris: are you sure when installing the rsyslog package rsyslog didn't start automatically and salt is telling the truth?
17:54 Kholloway joined #salt
17:54 mr_chris dave_den, Post-installation, if I manually stop rsyslog and let salt restart it I get the same results. I have verified that salt is actually starting it, but is not reporting it as "was not running but now started".
17:54 mr_chris It's centos so when you install a package you have to manually enable and start it.
17:55 dave_den what version of salt?
17:56 wibberwock joined #salt
17:56 Psi-Jack 0.16.4
17:57 diegows I'm reading the doc about developing a custom salt module, but is not very clear if I can write a state modules leaving them in the ${FILE_ROOT}/_modules
18:01 srage joined #salt
18:01 viq Some cluestick why salt is so unhappy about what I tell it to do? https://gist.github.com/viq/7219585
18:01 UtahDave diegows: customs state modules go it   file_root/_states
18:02 UtahDave viq: you're not setting a jinja variable at the top. You're just outputting text
18:02 viq ..oh
18:02 UtahDave viq: http://stackoverflow.com/a/4181605/114866
18:03 viq Thank you!
18:03 UtahDave use your same if statements, but set the jinja var
18:04 diegows UtahDave, thanks... found more details in the documentation.
18:04 viq yeah, trying, though still seems unhappy, will look a bit more
18:05 nahamu given https://groups.google.com/d/msg/salt-users/_9ynHspSgjk/GSi6_qHNVHEJ should the email.mime.* move from the Windows only FREEZER_INCLUDES.extend to the main FREEZER_INCLUDES?
18:05 nahamu I just hit a similar failure where salt is looking for email.mime.audio (why I'm still not sure; the state to be applied was very minimal...) on SmartOS...
18:06 jslatts joined #salt
18:07 UtahDave nahamu: Yeah, it won't hurt. Feel free to move it.  I didn't realize that the * would import the entire module so 'email.mime.*' is a better option than listing them all like I did
18:07 gmcwhistler left #salt
18:07 viq UtahDave: still doesn't like what I'm doing - https://gist.github.com/viq/7219585
18:07 s0undt3ch__ joined #salt
18:07 Psi-Jack UtahDave: Thanks. It seems I've corrected the problem, partially was the difference of thinking in literal file paths, and state names, which usually, in our states, point directly to managed explicit files, in this state, they were not. :)
18:07 ashtonian joined #salt
18:07 nahamu I haven't tested that fix yet, but if it does help I'll open a pull request.
18:07 UtahDave cool, thanks, nahamu
18:08 UtahDave Psi-Jack: great!
18:08 Psi-Jack Much appreciated. :)
18:08 nahamu UtahDave: do you guys have a CLA?
18:08 mr_chris dave_den, 0.16.4
18:09 mr_chris I should test this with other services to narrow it down.,
18:09 UtahDave viq: 'sudo'  and 'wheel'   you need those quoted to be strings
18:09 UtahDave nahamu: CLA?
18:10 jdenning joined #salt
18:10 viq Contributor Licence Agreement ?
18:10 viq UtahDave: thanks, that worked! Thank you for your help :) And sorry for being such a noob ;)
18:11 UtahDave oh.  Nope!  It's all Apache 2.0 license. You maintain the copyright, but the code stays under the Apache license
18:11 UtahDave viq: great!  No problem. I'm not that great with jinja, myself
18:11 logix812 is there a regression in 0.17.1 with gitfs? I get this error:
18:11 logix812 Exception [Errno 2] No such file or directory: '/var/cache/salt/master/gitfs' occurred in file server update
18:11 viq I'm not even at the crawling level ;)
18:12 logix812 but when I install 0.17.0
18:12 logix812 it works great
18:14 ckao joined #salt
18:16 UtahDave logix812: when you upgrade to 0.17.1 are your master and minion both upgraded to 0.17.1?
18:16 logix812 ya
18:16 logix812 I'm doing a clean install of both each time
18:16 TheCodeAssassin joined #salt
18:16 viq UtahDave: you think it would work to have that jinja variable declaration in top.sls pillar, and then include groups as needed per machine?
18:16 nahamu UtahDave: looks like that fixed it for me.
18:16 logix812 (running it in vagrant)
18:17 nahamu I'll open up a pull request in a few minuites.
18:17 nahamu *minutes
18:18 UtahDave viq: I'm not sure on that. It depends on jinja evaluation vs yaml evaluation. All the jinja gets evaluated first, and then the yaml is all converted to a big dict.
18:18 UtahDave You'd have to test that.
18:18 UtahDave nahamu: cool
18:19 viq UtahDave: I will, thanks
18:19 UtahDave logix812: I'm not seeing a specific gitfs issue on github.  Can you open an issue on that?
18:19 logix812 willd o
18:19 logix812 will do
18:19 UtahDave thanks!
18:20 bemehow joined #salt
18:21 bemehow joined #salt
18:21 adamisos joined #salt
18:21 mapu joined #salt
18:22 Katafalkas joined #salt
18:23 jcockhren kibana + salt is a good fit so far
18:23 snikkers joined #salt
18:23 jcockhren a good way to look at the success/failure rate repeated processes
18:24 viq UtahDave: seems it doesn't work. oh well
18:24 jcockhren of* repeated
18:24 viq jcockhren: oh? Do you have some configs to show? ;)
18:24 jcockhren vig: configs for which?
18:25 jcockhren salt? or the work to git it into kinaba?
18:25 jcockhren get*
18:25 viq both ;) How to put salt stuff into logstash, do you set logstash up using salt, anything interesting on logstash side?
18:26 jcockhren viq: I'm not using logstash b/c when I tested it, it was too much for my minions
18:26 jcockhren viq: salt->syslog->fluent->elasticsearch->kibana
18:26 dave_den jcockhren: fyi, there is node-logstash and lumberjack which are much more lightweight for minions
18:26 viq jcockhren: you don't need to run logstash on minions
18:27 viq Or just ship syslog to central location, and run logstash there
18:28 viq Since that sounds like what you're doing anyway, just with fluent ;)
18:28 jcockhren dave_den: yeah. I saw lumberjack
18:28 jcockhren viq: not exactly, every minion has a fluent client
18:29 flebel joined #salt
18:29 viq ah
18:30 jcockhren dave_den, viq: I experimented with the rsyslog stuff but had some issue with getting fluent to generate the key value pairs for the log from others
18:30 jcockhren fwiw, that was when I first started messing with fluent. Since then I found their plugin repo
18:31 nahamu UtahDave: https://github.com/saltstack/salt/pull/8166
18:31 viq https://github.com/glucoseinc/fluent-plugin-logstash ;)
18:32 pdayton joined #salt
18:32 jcockhren viq: yeah. I use https://github.com/uken/fluent-plugin-elasticsearch
18:32 * viq nods
18:33 viq looking at http://docs.fluentd.org/articles/free-alternative-to-splunk-by-fluentd
18:33 nahamu Wow, that was merged fast! :)
18:34 jcockhren I'm considering creating a fluent logger
18:34 jcockhren returner
18:36 lineman60 okay I am not sure if this is user error or a bug. When I install mysql-server via saltstack with the service: -running  it errors becouse the package is mysql-server but the serviec is mysql
18:36 viq lineman60: service: -name mysql
18:36 lineman60 okay user error
18:36 viq lineman60: or: https://github.com/viq/cm-lab-salt/blob/master/salt/roots/salt/mysql.sls
18:36 lineman60 thanks
18:38 viq jcockhren: I wonder if logstash and flume can coexist on same elasticsearch+kibana
18:38 viq Well, sure they can, just whether they can use same index/whatever it's called
18:38 viq So you search from both
18:39 viq But I guess at that point you can just pipe from flume to logstash I guess
18:39 jcockhren viq: yep. with the elasticflume sink
18:40 jcockhren https://github.com/Aconex/elasticflume
18:41 viq actually the one you linked previously - https://github.com/uken/fluent-plugin-elasticsearch - seems to have stuff for it
18:43 brimpa joined #salt
18:43 bemehow_ joined #salt
18:44 pdayton joined #salt
18:45 brimpa joined #salt
18:47 flebel joined #salt
18:55 kermit joined #salt
18:55 pipps joined #salt
19:01 bemehow joined #salt
19:02 mapu joined #salt
19:02 utahcon viq: did you mean to leave those crypt lines in there?
19:02 utahcon nm
19:05 linuxnewbie joined #salt
19:05 linuxnewbie left #salt
19:06 mortnacl joined #salt
19:08 anteaya joined #salt
19:12 berto- joined #salt
19:23 bretep[hirevue] joined #salt
19:26 amahon joined #salt
19:30 BrendanGilmore joined #salt
19:31 ajw0100 joined #salt
19:31 bemehow joined #salt
19:31 flebel joined #salt
19:33 Teknix joined #salt
19:36 ashtonian joined #salt
19:36 giantlock joined #salt
19:37 xinkeT joined #salt
19:39 saltbeginner Am a beginner as my handle would suggest :). Just wanted to know if one can capture the output of a state and use it a variable in the next. I have some configuration where when the cmd is run would return a id and this needs to be captured and  from there on to be used as a variable in the next state run.
19:40 bretep[hirevue] joined #salt
19:40 ajw0100 joined #salt
19:41 noob2 joined #salt
19:42 linuxnewbie joined #salt
19:42 linuxnewbie joined #salt
19:42 linuxnewbie left #salt
19:46 Ryan_Lane joined #salt
19:48 utahcon if a command expects input, can salt answer those prompts/
19:50 swa joined #salt
19:52 utahcon nm, found it
19:53 utahcon ok, well found half the answer: http://docs.saltstack.com/ref/states/all/salt.states.pecl.html#module-salt.states.pecl
19:53 utahcon can someone help me with the syntax?
19:53 dave_den saltbeginner: no, you cannot do that in the same state run.
19:54 flebel joined #salt
19:54 dave_den utahcon: what syntax?
19:54 blee_ joined #salt
19:55 utahcon dave_den: for pecl is this the right syntax for defaults? http://pastebin.com/qEDQcwSe
19:55 srage joined #salt
19:55 pipps_ joined #salt
19:55 utahcon pecl state modeul: http://docs.saltstack.com/ref/states/all/salt.states.pecl.html#module-salt.states.pecl
19:56 jacobw joined #salt
19:57 dave_den i assume 'defaults' takes a dict, but i have no idea
19:58 dave_den so it's probably in the format of '    answer_one: whatever\n    answer_two: blah'
19:58 saltbeginner dave_den: Thanks for that. But if one would have to achieve that, how would one go about [if not in one state run]
19:59 dave_den saltbeginner: what are you trying to do, exactly?
20:01 bemehow joined #salt
20:01 jacksontj joined #salt
20:01 saltbeginner basically, I am trying to see if I can automate docker dynamic container. Issue is that the docker container would dish out the ID, that needs to be inspected for the IP address on it. This then has to be used in the nginx loadbalancer with the port mapping
20:01 smccarthy joined #salt
20:02 jacksontj i'm trying to cut a release ov 0.17.1 but i'm getting quite a few unit test failures in the tests-- are these known bugs? Or am i just doing something wrong on my end
20:02 forrest saltbeginnner, the reactor system might be what you want
20:02 forrest http://docs.saltstack.com/topics/reactor/index.html
20:02 saltbeginner ok let me check that
20:03 imaginarysteve joined #salt
20:05 redondos joined #salt
20:05 redondos joined #salt
20:06 dave_den saltbeginner: you can use an overstate to run two states in succession
20:06 dave_den one for setting up the docker container, the next to pull the ip of the container and update nginx loadbalancing
20:07 dave_den what's with docker today
20:07 dave_den sheesh
20:07 dave_den :D
20:07 forrest it's the new hotness
20:08 redondos joined #salt
20:08 redondos joined #salt
20:09 jacksontj looks like my issue is that i didn't have salt-testing installed in my virtual env, but it isn't added to requirements.txt
20:09 pipps joined #salt
20:09 jacksontj or the docs
20:11 rlarkin I'm not as far as reactor yet, hopefully in two days.  I'm pretty eager to play with it
20:12 nahamu Is there a recommended way to spin builds of salt either based on develop or with backports?
20:12 nahamu there are some patches in develop that make things work properly on SmartOS and I spin esky builds.
20:13 nahamu at the moment I just manually tweaked the files from a 0.17.1 checkout, but there's probably a better way.
20:13 nahamu can I make esky builds with a fourth component to the version number?
20:16 nahamu salt/version.py suggests that the numbering scheme is about to change anyway...
20:17 forrest the next major release will use the new version nahamu
20:17 flebel joined #salt
20:19 s0undt3ch joined #salt
20:20 nahamu forrest: "next major" meaning "the release that might otherwise have been 0.18" (as opposed to "the release that might otherwise have been 1.0")?
20:20 forrest correcty
20:20 forrest *correct
20:21 nahamu so now I have 2 questions... :) How should I do it today, and how should I do it in the new world?
20:21 KyleG1 joined #salt
20:23 imaginarysteve joined #salt
20:24 carmony UtahDave: ever find those slides? :P
20:28 toofer joined #salt
20:28 flebel joined #salt
20:29 Ryan_Lane1 joined #salt
20:31 Ryan_Lane joined #salt
20:31 druonysuse joined #salt
20:36 zooz joined #salt
20:36 nahamu interesting... doing an esky build from a checkout of develop spits out a zipfile named salt-0.17.0-1645-ga29bb61.solaris-2_11-i86pc_64bit.zip (I would have expected 0.17.1 not 0.17.0...)
20:37 flebel joined #salt
20:37 forrest is it basing off the branches, as opposed to the tag value perhaps nahamu?
20:37 nahamu should the version of salt/version.py in develop get the hardcoded version bumped?
20:37 nahamu forrest: I think the 0.17.0 part comes from salt/version.py
20:38 nahamu https://github.com/saltstack/salt/blob/develop/salt/version.py#L336
20:39 bemehow joined #salt
20:39 Teknix joined #salt
20:41 wibberwock any way to do this in salt outside of salt.cmd: find . -name "*.pyc" -exec rm {} \;'
20:47 bemehow joined #salt
20:49 nahamu is the master branch pretty much abandoned? (is there a place on the web with the answer to that question that I should have checked?)
20:50 cro nahamu: Yes, and no, not that I'm aware of.
20:51 jhujhiti left #salt
20:52 koblas joined #salt
20:53 KyleG joined #salt
20:53 KyleG joined #salt
20:53 nahamu It seems like 0.17.1 was never merged into develop.
20:54 nahamu (Whether or not it should have been is of course up for discussion...)
20:54 koblas Trying to debug why my sls files are not on a minion, however the top.sls file is being copied.  "ERROR Getting No matching sls found for 'apt_sources' in env 'base'"  however I have apt_sources/init.sls on the master.
20:55 cewood joined #salt
20:55 timoguin nahamu, from what i understand, bugfixes are cherry-picked from the develop branch to the releases branches
20:56 diegows I was thinking if there is a criteria to choose between grains and pillars. I understand the difference, but sometimes you can use them for the same purposes, for example, to assign attr, value to a specific host (this is my case now)
20:56 diegows I would use grains, but... pillar is a good choice too. Is good to have that information centralized to recover a node with the same properties using just the name
20:58 forrest well, grains are for information based on the system itself usually diegows, pillar is for 'more' static, or global items
20:58 forrest like users you want on every box, etc.
20:59 druonysus joined #salt
20:59 brimpa_ joined #salt
20:59 Katafalkas joined #salt
20:59 timoguin and pillar is for anything with sensitive data, as it's compiled and sent to the minion it's intended for.
20:59 forrest yep
20:59 timoguin rather than broadcast to all
21:00 carmony we use pillar for lots of user credentials
21:00 carmony i.e. mysql passwords, ssh keys, etc
21:01 imaginarysteve joined #salt
21:01 chrism_ joined #salt
21:03 xnxs joined #salt
21:03 diegows ok, thanks... I wanted to hear other opiniones :)
21:03 toofer left #salt
21:03 noob2 left #salt
21:03 alekibango joined #salt
21:04 retr0h_ joined #salt
21:05 eliasp joined #salt
21:06 hazzadous joined #salt
21:07 scalability-junk joined #salt
21:08 wibberwock joined #salt
21:10 baoboa joined #salt
21:11 micah_chatt joined #salt
21:14 pkimber joined #salt
21:14 lineman60 joined #salt
21:14 taylorgumgum joined #salt
21:14 anuvrat joined #salt
21:14 jergerber joined #salt
21:14 Ymage joined #salt
21:14 canci joined #salt
21:14 MK_FG joined #salt
21:14 robinsmidsrod joined #salt
21:14 tseNkiN joined #salt
21:14 Zethrok joined #salt
21:14 octagonal joined #salt
21:14 clone1018 joined #salt
21:14 zz__ joined #salt
21:14 eskp joined #salt
21:14 ede joined #salt
21:14 EvaSDK joined #salt
21:14 nahamu joined #salt
21:14 alexandrel joined #salt
21:14 eightyeight joined #salt
21:14 clone1018 joined #salt
21:15 Thiggy joined #salt
21:16 pears can anyone think of a way in states to ensure that a group has a certain user in it, where that user is not managed by salt?
21:16 cowmix joined #salt
21:16 pears e.g. an ldap user
21:17 pears who still needs to be in a local group
21:18 m0hit joined #salt
21:18 taylorgumgum joined #salt
21:18 viq pears: you can get users to manage from LDAP
21:19 m0hit Hi. I'm running into issue 7953: KeyError on ext_job_cache on 0.17.1. What is the way around it? https://github.com/saltstack/salt/pull/7953
21:19 pears viq: I'd rather not :)
21:20 m0hit I know there is a fix for this 11 days ago, but don't want to use an unrealeased version since our salt master is running 0.17.0
21:20 pears I just want to say "this group should exist, and should have these members: [...]"
21:20 forrest m0hit, you could always manually modify the file.
21:20 pears but the states.group module doesn't seem to have a way to express that
21:21 viq pears: file.append ?
21:21 m0hit forrest: we have about 50 minions running. will adding ext_job_cache: '' to the salt-minion config (/etc/salt/minion) work?
21:21 forrest m0hit, I'm not sure.
21:22 m0hit hmmm. sad about these releases that don't work at all.
21:22 m0hit I'll try it out and update the issue.
21:22 bemehow_ joined #salt
21:23 pears viq: file.append seems like a good start, but I'd guess if the line to append changes (like if the group membership changes) you'd end up with multiple group definitions in the file
21:23 viq pears: yeah...
21:24 viq There's also file.replace
21:24 scott_w joined #salt
21:25 viq pears: so something along the lines of group.present, and then file.replace to fix the line with content you want. A bit hackish...
21:25 pears yeah
21:25 pears I will ruminate on this, thanks for the input
21:25 viq Maybe it's a job for augeas?
21:25 pears wuzzat?
21:26 viq It's a configuration abstraction system
21:26 viq http://docs.saltstack.com/ref/states/all/salt.states.augeas.html#module-salt.states.augeas
21:27 bemehow joined #salt
21:28 adamisos joined #salt
21:28 imaginarysteve joined #salt
21:28 koblas is there any good reason that *.sls would not get copied to a minion?  salt '*' saltutil.sync_all doesn't appear to get them there, just errors in the log.
21:29 CheKoLyN joined #salt
21:30 flebel joined #salt
21:31 whiteinge joined #salt
21:35 alunduil joined #salt
21:47 pears viq: I guess maybe I can use group.preset and then file.sed depending on that
21:47 pears only slightly vomity
21:48 wibberwock joined #salt
21:48 m3rk joined #salt
21:52 whiteinge joined #salt
21:52 adamisos joined #salt
21:53 bhosmer joined #salt
21:53 juanlittledevil joined #salt
21:55 juanlittledevil howdy guys. I have a silly question. Is there a recommended way to add headers/banners to files managed by salt other than manually adding it to every managed file?
21:58 ajw0100 joined #salt
21:58 koblas Finally figured it out - you have to have local roots before gitfs roots...
21:59 jumperswitch joined #salt
21:59 m3rk viq: you still here
21:59 UtahDave juanlittledevil: A lot of people will add a simple jinja var at the top of the files that gets filled in by a pillar variable
22:00 pears anyone know where there's documentation for this? http://docs.saltstack.com/ref/pillar/all/salt.pillar.pillar_ldap.html
22:04 pdayton joined #salt
22:04 smccarthy joined #salt
22:06 jslatts joined #salt
22:07 kermit joined #salt
22:13 flebel joined #salt
22:14 Ryan_Lane joined #salt
22:19 ajw0100 joined #salt
22:20 bhosmer joined #salt
22:23 pipps joined #salt
22:24 bemehow joined #salt
22:25 pipps_ joined #salt
22:26 cachedout joined #salt
22:33 bemehow joined #salt
22:35 backjlack joined #salt
22:37 newellista joined #salt
22:39 jpholbrook joined #salt
22:46 newellista I have a requirement to install ruby from source, without rvm or rbenv.  Can someone please point me to an example of using a state file to download a source file (wget|curl) and then run tar, make, etc?
22:47 juanlittledevil joined #salt
22:48 forrest You'd probably want to use the cmd state newellista http://docs.saltstack.com/ref/states/all/salt.states.cmd.html
22:48 juanlittledevil UtahDave: Yes that's actually how I'm considering doing this…. Thanks for the response. sorry (I was in a meeting).
22:49 newellista forrest: Thanks.  Could I use file.managed to do the download?
22:50 forrest to download the source tarball? Sure
22:52 godber joined #salt
22:52 m0hit joined #salt
22:55 bemehow joined #salt
22:57 jcsp joined #salt
22:58 newellista forrest: thanks
22:59 forrest np.
23:02 Fandekasp joined #salt
23:04 diegows is there a way to wait for a grain to apply an state?
23:12 jdenning joined #salt
23:14 UtahDave newellista: https://gist.github.com/UtahDave/6125409
23:14 m0hit_ joined #salt
23:14 g4rlic joined #salt
23:14 newellista UtahDave:  Thanks!  I'll take a look
23:15 jslatts joined #salt
23:17 g4rlic so, I've run into a doosie of an issue today.  One of my states used file.recurse:.  We use salt 0.16.4 on the master.  Our minions were upgraded to 0.17.1 without our notice (not your problem), and all of a suddent, weirdness appeared in the / tree of the minion.
23:18 steveoliver working on some pillar / states — this debug output isn't really helpful (as far i can see, doesn't point to a line in a file I'm working on) — http://paste2.org/Wt4zv2Vz — this is when running state.highstate.  is there a[dditional] debug option[s] for state/highstate?
23:18 g4rlic When you have this master/minion disparity, salt-minion does something unexpected, and starts overwriting /etc/ on the minion and other weird behavior.
23:19 g4rlic obviously, it doesn't happen on 0.16.4 for both master and minion.  I still haven't tested 0.17.1 as both either.
23:19 g4rlic (I'm about to though.)
23:19 g4rlic Either way, fair warning to anyone who uses CEntOS as the master, and FEdora as the minion, and uses the EPEL packages.  This particular version mismatch has essentially destroyed the VM's it was on, in terms of their expected functionality.
23:20 UtahDave steveoliver: state.show_sls mysls,otherslsfile
23:20 UtahDave steveoliver: state.show_highstate
23:21 UtahDave g4rlic: ouch.
23:22 NV UtahDave: what is the recommended way to update clients? (going from 0.16 to 0.17 on rhel)
23:22 NV i could log into all manually and run yum --enable-repo=... salt-minion
23:23 NV but seems sort of silly
23:23 UtahDave NV: first, always upgrade your master first
23:23 NV yeah, i did that (im fine doing that one manually with yum :P)
23:23 NV its just how to update the many deployed minions?
23:24 UtahDave Hm. Actually, maybe not this time. There's a security fix that make 0.17.1 not be able to talk to older minions.   Hmm.
23:24 steveoliver UtahDave: thanks!
23:24 UtahDave steveoliver: yep!
23:24 steveoliver exactly what i was looking for :)
23:24 UtahDave ah, good to hear!
23:24 NV hrm, i can still test.ping my older minions running 0.17.1 on the master?
23:25 UtahDave NV: I would test with one or two minions first.    salt 'minion' pkg.latest salt-minion
23:25 NV although i did notice a couple of minions hung up
23:25 NV and wouldnt reconnect
23:25 NV had to manually restart them
23:25 UtahDave NV: also    salt 'minion' cmd.run  'apt-get upgrade salt-minion'
23:25 UtahDave NV: how many minions are you updating?
23:26 NV only a half dozen atm - still in the process of migrating from puppet for most of my hosts
23:27 UtahDave ok.  You might run   salt '*' pkg.latest salt-minion     before upgrading your master.
23:27 NV hrm "pkg.latest" is not available.
23:28 UtahDave what os, NV?
23:28 NV RHEL6
23:28 g4rlic UtahDave: indeed. ;)  still working on the 0.17.1 test on CentOS.  (Fedora 19's package repacks into CentOS 6.4 quite easily)  I'll pipe up when my test is finished.
23:29 UtahDave NV: try pkg.install
23:29 NV wait, pkg.latest is a state, dont i need state.single in front of that?
23:29 UtahDave thanks, g4rlic
23:29 UtahDave NV: yeah, that will work, too
23:31 xmltok joined #salt
23:31 * Savagedlight hugs salt
23:31 Savagedlight This thing is awesome.
23:31 nmistry joined #salt
23:31 honestly :D
23:32 honestly Savagedlight: https://github.com/duk3luk3/dirty-user-sync-formula
23:32 Savagedlight that is indeed a dirty user sync :o
23:32 NV hrm, pkg.latest updated 0.16.3 to 0.16.4
23:32 NV any way to make it fetch from epel-testing to get 0.17.1?
23:33 NV (related: i thought you said 0.17.1 couldn't talk to 0.16 minions?)
23:33 UtahDave NV: Hm. maybe we fixed that.  There was a small protocol change that was causing stacktraces.'
23:34 forrest NV, did you add the epel-testing repo?>
23:34 honestly UtahDave: how's my bug? :3
23:34 honestly did you manage to repro it?
23:35 NV forrest: yeah, but to use it you usually have to specify --enablerepo=epel-testing on the yum command line
23:35 forrest ?
23:35 forrest just manage it with salt
23:36 forrest and you don't have to do that, you can just modify the yum.repos.d file to have enabled=1 set
23:36 forrest by default when you install the epel-testing rpm it's set to 0
23:37 NV would rather not enable epel-testing globally, just want salt from it
23:37 NV although i just noticed the fromrepo parameter of pkg.latest
23:37 NV so will make use of that
23:37 berto- joined #salt
23:37 steveoliver is this a correct pillar (user/init.sls) to be addressed as i.e {% if 'root' in pillar.group.admin.members %} ?
23:38 steveoliver http://paste2.org/xtVI90LG
23:38 NV bah, when using it it does yum -y --disablerepo=* --enablerepo=epel-testing install salt-minion
23:38 NV any way of making it do the enablerepo without the disablerepo as well? epel-testing doesn't contain all the dependancies, like sshpass
23:38 canci joined #salt
23:40 oz_akan_ joined #salt
23:41 UtahDave honestly: what's the link to your bug?
23:44 g4rlic UtahDave: ok, confirmed, this bug is only using file.recurse when the master is 0.16.4 and the minion is 0.17.1.   When master and minion are both the same, either 0.16.4 or 0.17.1 (just finished testing the latter), everything appears normal.
23:44 honestly UtahDave: uhh, lemme find it
23:44 pipps joined #salt
23:44 honestly UtahDave: https://gist.github.com/duk3luk3/7182795
23:44 honestly it's an old bug that was supposed to be fixed
23:45 honestly lemme find the issue
23:45 g4rlic I don't even know if this should be filed as a bug report even, since it's kind of an edge case.  But EPEL does lag Fedora mainline, so this is likely an issue other people will come across eventually.
23:45 honestly we talked about it the other day
23:45 g4rlic note that I experienced a similar discrepancy before, when the master was 0.16.0, and the minion was 0.16.4, and this bug did *not* appear.
23:45 honestly UtahDave: here's the issue: https://github.com/saltstack/salt/issues/4916
23:47 UtahDave honestly: yeah, looks like it has been fixed
23:47 honestly UtahDave: well, no
23:47 honestly https://github.com/saltstack/salt/issues/4916#issuecomment-27354405
23:48 honestly that issue was closed 6 months ago but the bug is back
23:48 UtahDave g4rlic: Yeah, there was a slight protocol change to fix a security issue
23:48 jslatts joined #salt
23:48 UtahDave honestly: have you tested against the develop branch?
23:48 honestly UtahDave: ugh, I hadn't found the time for that yet
23:49 honestly is there a quick way to get the develop branch set up on a ubuntu and then go back again?
23:49 bemehow_ joined #salt
23:49 honestly running latest stable from the ppa right now
23:49 jasiek joined #salt
23:50 Trebortech_ joined #salt
23:53 Vivek_ joined #salt
23:53 tonthon_ joined #salt
23:53 a1j_ joined #salt
23:53 mollerst1and joined #salt
23:53 AlcariTh1Mad joined #salt
23:53 chrism joined #salt
23:53 supplica1t joined #salt
23:53 Boohbah_ joined #salt
23:56 backjlack joined #salt
23:56 m0hit joined #salt
23:56 cbloss anyone have any idea when 0.17.2 is going to be released? salt is broken for me at it's current state on ubuntu's stable branch
23:56 z3uS| joined #salt
23:57 cbloss and there isn't a good way to change versions back and forth (that i'm aware of)
23:57 joonas_ joined #salt
23:58 UtahDave cbloss: what's broken exactly for you?
23:58 joonas joined #salt
23:58 cbloss UtahDave: https://github.com/saltstack/salt/issues/8079
23:59 honestly UtahDave: I don't know if I'm doing it wrong, but this is what I get: https://gist.github.com/duk3luk3/7224861
23:59 UtahDave ah, yeah.
23:59 lynxman joined #salt
23:59 UtahDave probably next week.

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