Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-12-05

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

All times shown according to UTC.

Time Nick Message
00:00 terminalmage KyleG: "providers" is an option that has been around for a long time, but it's not going to do you any good unless you have the updated freebsdpkg and pkgng modules
00:02 KyleG terminalmage: Super weird behavior now.
00:02 KyleG I installed develop and I got this on highstate (did not touch the master, the minion is on develop) https://gist.github.com/kylegato/fa8c3520d3e18023a70b
00:03 KyleG reverted my minion back to 0.17.2 and highstate was working again minus the pkg bug
00:03 KyleG I always thought that "No Top file or external nodes data matches found" was something the master did and was not dependent on the minion
00:04 KyleG Now I'm kinda worried about the next release, lol
00:04 cdcalef joined #salt
00:05 cdcalef anybody use file.recurse extensively?
00:05 KyleG cdcalef: I use it for SSL Certs, nginx include files, tftp boot images, splunk configuration files, postfix configs
00:05 KyleG if that's extensive
00:05 KyleG idk
00:06 cdcalef pretty cool.  i'm wondering if its worth looking into using for deploy-ish things that are currently using a fabric script and rsync
00:06 jankowiak joined #salt
00:06 KyleG I don't see why not.
00:06 KyleG Only thing is, since you'll want to keep a versioning system
00:07 KyleG It's probably best to either package up or zip/tar your releases as version numbers, and then have salt execute a command to all of them to have them pull/scp/GET/rsync that zip/tar/package file and extract it
00:07 KyleG Symlink, all that good stuff
00:07 KyleG Because otherwise you could run into conditions where it's still updating the files recursively and then you have newer files and older files mixed together until it's done executing
00:08 anitak jcockhren: doesn't look like the returner…syslog isn't helping. I put the schedule in the minion config directly…still nothing :(
00:08 anitak something must be really broken in my setup
00:10 cdcalef KyleG true. depends on the deployment.
00:10 cdcalef just got a metric ton of dell servers i want to try slipstreaming ubuntu+salt-minion on
00:11 mgw left #salt
00:11 mgw joined #salt
00:14 cachedout joined #salt
00:16 erchn cdcalef: I built a system a while ago that basically used file.recurse to a temporary directory, and then used rsync to push into the destination directory, worked really nicely
00:16 erchn rsync guarantees atomic updates on a given file
00:17 anitak jcockhren: I am running Ubuntu 12.04.3 LTS…what are you running?
00:17 zandy joined #salt
00:19 bhosmer joined #salt
00:25 shinylasers joined #salt
00:31 futurisk joined #salt
00:31 anitak jcockhren: So I ran the same schedule on a mint salt-sandbox environment with Ubuntu 12.04.3. Everything works fine and I think I know where the problem is.
00:31 anitak on the mint system, the debug log has these entries:
00:31 anitak [INFO    ] Minion is starting as user 'root'
00:31 anitak [DEBUG   ] Minion "minion1.example.com" trying to tune in
00:31 anitak [DEBUG   ] Minion PUB socket URI: ipc:///var/run/salt/minion/minion_event_b1c1b95c5dc05eae04ae2ab6cd8ce5f9_pub.ipc
00:31 anitak [DEBUG   ] Minion PULL socket URI: ipc:///var/run/salt/minion/minion_event_b1c1b95c5dc05eae04ae2ab6cd8ce5f9_pull.ipc
00:31 anitak right after that…the schedule is being executed
00:32 fatbox_ joined #salt
00:32 anitak on my broken minion, the minion pub and pull urls are missing
00:33 pass_by_value joined #salt
00:36 __number5__ anitak: check libzmq on that minion
00:36 scott_w_ joined #salt
00:36 anitak what about it?
00:37 __number5__ anitak: first salt-call --versions
00:37 anitak so…actually…the pub and pull urls are not missing. the socket files actually got created on the broken minion. just the log entry is missing
00:37 anitak Salt: 0.17.2
00:37 anitak Python: 2.7.3 (default, Sep 26 2013, 20:08:41)
00:37 anitak Jinja2: 2.6
00:37 anitak M2Crypto: 0.21.1
00:37 anitak msgpack-python: 0.1.10
00:37 anitak msgpack-pure: Not Installed
00:37 anitak pycrypto: 2.4.1
00:37 anitak PyYAML: 3.10
00:37 anitak PyZMQ: 13.0.0
00:37 anitak ZMQ: 3.2.2
00:38 anitak those versions are the same like the ones on my mint salt-sandbox
00:39 __number5__ it looks alright, what's the error you have on the broken one?
00:40 pipps joined #salt
00:43 anitak no error
00:43 anitak that's the problem :(
00:44 anitak when running the minion in debug mode
00:44 anitak it just stops after this line:
00:44 anitak [DEBUG   ] Loaded sqlite3_return as virtual sqlite3
00:44 anitak no announcement of the socket happens
00:44 anitak and no schedule is being executed
00:45 Gifflen joined #salt
00:45 anitak this is happening across the board on all my minions it seems like
00:45 anitak so may be something is wrong with the master
00:46 fllr joined #salt
00:46 anitak oh...
00:46 anitak here is something interesting...
00:48 anitak at one point I had two masters configured for the minions
00:48 anitak in the minion config it looks like this:
00:48 anitak master:
00:48 anitak - master1
00:48 anitak - master2
00:48 anitak and that worked fine
00:48 anitak then I removed the second master
00:48 anitak so now the config looked like this:
00:48 anitak master:
00:48 anitak - master1
00:49 anitak and that doesn't work...
00:49 anitak I set it back to master: master1
00:49 anitak and e voila...
00:49 anitak all is working again
00:49 EugeneKay aliens.
00:51 anitak ^^
00:59 shinylasers joined #salt
00:59 fllr joined #salt
01:02 pipps_ joined #salt
01:06 SlickNik joined #salt
01:06 SlickNik hey guys
01:07 SlickNik I had a question, maybe someone might be able to help out.
01:07 SlickNik I was going through the upstart scripts for the salt-minion and noticed that the respawn section had been commented out.
01:07 SlickNik There was this comment added:
01:07 SlickNik # The respawn in the minion is known to cause problems
01:07 SlickNik # because if the main minion process dies it has done
01:07 SlickNik # so most likely for a good reason. Uncomment these
01:07 SlickNik # two lines to enable respawn
01:08 SlickNik I'm wondering what sort of problems we're talking about here.
01:11 SlickNik We've had salt crash a few times on boxes, so we're thinking of enabling respawn.
01:15 drogoh joined #salt
01:16 joehh1 SlickNik: I believe part of it is due to upgrades - if respawn is enabled, it can be very difficult to upgrade
01:16 JulianGindi joined #salt
01:17 JulianGi_ joined #salt
01:18 joehh1 respawn was enabled in the debian packaging which was autosynced to ubuntu saucy
01:18 joehh1 this caused https://bugs.launchpad.net/ubuntu/+source/salt/+bug/1250208
01:19 SlickNik joehh1: Thanks for the info!
01:19 joehh1 SlickNik: no worries, any guidance/thoughts/suggestions would be most appreciated :)
01:20 SlickNik Just had a couple of comments:
01:20 joehh1 SlickNik: if you get it working/replicate/don't replicate this issue with respawn, I'd be interested to hear
01:21 joehh1 also interested in comments - ie above comment is not exhaustive of situations I'm interested in hearing about... :)
01:21 SlickNik From what I'm reading the issue is with setting respawn on the salt-master, since on the salt-master we spin up multiple salt-master processes.
01:21 SlickNik Also, I believe that a respawn should still allow the service to terminate normally (exit code 0) and will not restart the service in that case.
01:21 jfzhu_us joined #salt
01:22 joehh1 yes - from memory we also spin up multiple on minion when doing a job
01:22 joehh1 ok
01:22 joehh1 I wonder what the exit codes are when the master exists - maybe that is the problem
01:22 SlickNik ah, a minion also spins up multiple processes? I wasn't aware of that.
01:23 joehh1 yeah - only one to start with, but I believe that jobs are (may be) handled by child processes
01:23 SlickNik gotcha
01:23 pipps__ joined #salt
01:24 joehh1 I think there is a config option about how to handle jobs
01:24 joehh1 multiprocessing - which defaults to True
01:24 brianhicks joined #salt
01:26 joehh1 I think the exit code will be the key - I'd been wondering how other services work with respawn and why they don't have this prob
01:27 joehh1 if the exit code is being set as expected by upstart, then I guess it will work properly
01:28 joehh1 maybe setting respawn with normal exit will do the trick
01:30 quickdry21 joined #salt
01:31 bemehow joined #salt
01:34 anitak joined #salt
01:36 nmistry joined #salt
01:37 fllr joined #salt
01:38 fllr joined #salt
01:39 AdamSewell joined #salt
01:43 MoonSweep joined #salt
01:45 redondos joined #salt
01:48 zandy joined #salt
01:50 sroegner joined #salt
01:53 BrendanGilmore joined #salt
01:53 MoonSweep left #salt
01:55 MoonSweep joined #salt
01:59 danielbachhuber joined #salt
02:04 mannyt joined #salt
02:05 quanta_ joined #salt
02:08 scott_w_ joined #salt
02:10 danielbachhuber joined #salt
02:17 redondos joined #salt
02:17 AdamSewell joined #salt
02:21 cachedout joined #salt
02:22 redondos_ joined #salt
02:25 Mort joined #salt
02:30 swc|666 left #salt
02:33 danielbachhuber joined #salt
02:33 mgw Is there a good way to inject the vars from /etc/environment into salt-minion on ubuntu?
02:34 pipps joined #salt
02:35 anitak joined #salt
02:42 xl1 joined #salt
02:44 th3reverend1 joined #salt
02:44 Ryan_Lane joined #salt
02:45 bemehow joined #salt
02:46 favadi joined #salt
02:52 mgw Corey: ping
02:56 joehh1 mgw: not being an expert on upstart, I suspect you/we could source the file roughly here https://github.com/saltstack/salt/blob/develop/pkg/salt-minion.upstart#L18
02:58 mgw http://serverfault.com/questions/128605/have-upstart-read-environment-from-etc-environment-for-a-service
02:58 mgw joehh1: ^
02:59 mgw but sourcing it would probably work too
03:01 joehh1 interesting trick with su
03:01 mgw it might be the more portable way, as it actually invokes pam
03:02 mgw not that /etc/environment is likely to be at any other location
03:02 joehh1 yeah - I'm guessing we would need that for 10.04 etc
03:02 mgw joehh1: which, su?
03:02 joehh1 it is a bit hacky and not very clear though - I can see it being removed by a well meaning helper
03:02 mgw # comments can handle that
03:03 mgw Assuming the well meaning helper were to read them
03:03 joehh1 yes su, agree about the comments
03:03 joehh1 hopefully either they would or the person applying the pull request :)
03:03 joehh1 so I think comments would be suffcieitn
03:03 mgw ok, I'll open a pull req on this, unless you want to
03:03 mgw It keeps annoying me
03:04 mgw some things don't work from behind a proxy
03:04 joehh1 I'm going to struglle today, so it would be better if you do - you are also better set up to test it
03:04 mgw because of it
03:04 MoonSweep joined #salt
03:04 joehh1 not that we have anything in /etc/environment, but I suspect that not going through pam
03:04 mgw joehh1: ok, don't struggle too hard :-)
03:04 joehh1 would account for a lot of the variation we see between debian and ubntu systems
03:05 joehh1 :)
03:06 joehh1 Do you think this change would break anyones systems? just thinking about
03:06 joehh1 whether we would apply it in 0.17.x or the next ferature release
03:08 nmistry joined #salt
03:09 scott_w_ joined #salt
03:11 mgw It's unlikely… but I suppose it could.
03:12 joehh1 a quick look seems to show that it only reads from /etc/environmen
03:12 bemehow joined #salt
03:12 joehh1 so hopefully only knowledge able people will have made changes there
03:12 mgw joehh1: https://github.com/saltstack/salt/pull/9042/files
03:12 joehh1 looks good to me
03:13 joehh1 I'll make the same change to the debian packages
03:14 joehh1 mgw: can you do the same to the syndic?
03:15 mgw ah, yeah
03:16 joehh1 thanks for that
03:21 mgw joehh1: updated
03:22 __number5__ you don't need su -c, just ". /etc/environment" within the script block will do
03:23 joehh1 will that do the export as well?
03:23 mgw __number5__: we discussed both ways, but thought su trick might be more portable
03:24 __number5__ yep, it might depends on upstart version
03:24 mgw I think for some versions you'd need "export VAR1 VAR2" etc
03:24 mgw which wouldn't work too well
03:25 __number5__ env stanza in upstart script supposed to do that
03:25 mgw We went with su based on what this guy (http://serverfault.com/questions/128605/have-upstart-read-environment-from-etc-environment-for-a-service) was told in #upstart
03:27 __number5__ I'm not familiar with older Ubuntu release, but any verion older than 12.04 should support ". /etc/xxx" well
03:29 mgw I've got to run now. Thanks for the help joehh1 and __number5__.
03:30 shinylasers joined #salt
03:30 mgw oh… does the pkg even replace the /etc/init files on upgrade?
03:31 mgw I guess even if not, it might be best to wait until the next major release to include this so that 0.17.2 and 0.17.3 don't behave differently in this regard.
03:31 mgw on fresh installs
03:32 pass_by_value joined #salt
03:33 joehh1 mgw: yes it does.
03:35 joehh1 mgw: is it worth adding a note to delay applying the PR?
03:36 quanta_ left #salt
03:36 anitak joined #salt
03:37 __cli joined #salt
03:39 mgw It won't go into 0.17 unless someone cherry-picks it
03:40 mgw joehh1: I've got to run… but go ahead and and add such a comment if you want,
03:42 sandGorgon joined #salt
03:42 joehh1 mgw: true - will do
03:45 Ryan_Lane joined #salt
03:46 diegows joined #salt
03:49 MoonSweep Hi, I have a question about the difference between grains and pillars. If I understood correctly, the main difference is that pillars are available only to targeted minions, making them a good choice for sensitive data. Does that means that the state files are all sent to all minions, and then parsed on each minion individually ?
03:49 matanya joined #salt
03:51 sroegner joined #salt
03:53 forrest joined #salt
03:55 shinylasers joined #salt
04:01 cli joined #salt
04:06 joehh1 MoonSweep: I'm not sure if the files are sent, but they are definietly available to all minions
04:07 MoonSweep Ok thanks
04:07 dvogt joined #salt
04:07 MoonSweep But I'm not quite sure to understand the difference, though
04:08 mgw joined #salt
04:09 joehh1 grains are minion specific and ofetn "generated" on the minion - os name, version etc
04:09 mwmnj joined #salt
04:09 eskp hey guys trying to query openstack with salt-cloud but getting 'Malformed response' at the moment http://paste.openstack.org/show/54469/
04:09 joehh1 pillars are set on the master and sent out to only the minion they are relevant for
04:09 eskp has anyone seen anything like that?
04:11 MoonSweep So the "real" difference is the way they are generated ?
04:14 bkparso joined #salt
04:14 bkparso Hi all - BRAND new to salt! I was just wondering if it was possible to set up a masterless minion using git/gitfs (i.e. it clones down the repos without me having to copy it all over from a local file)
04:15 NV MoonSweep: states are parsed on each minion individually (including the jinja templating, etc) but they are not pushed to minions - minions request individual files to be downloaded, but any authenticated minion can download any file, there is no per-minion ACLs etc
04:15 NV (that said, a minion would have to have its key accepted with salt-key before being able to request files I believe)
04:15 NV bkparso: I don't believe so, but you should be able to write a state that updates your file_roots from git easily enough :)
04:16 NV that said, I've never run masterless so I'm not 100% sure
04:16 MoonSweep I think it's a little bit more clear now
04:16 bkparso @NV ahh - so you would leave it all blank, and your very first call would be to clone down all the repos to /srv/salt on the minion?
04:17 MoonSweep I think the thing that really puzzles me is : what's the point of setting grains (beyond the core ones), since there is the pillar system ?
04:18 __number5__ you are not *setting* grains, they are collected from minion environment/machine
04:19 __number5__ pillar is like a central db, you push your data from there to minions
04:19 __number5__ it's perfectly fine if you don't have any custom grains
04:20 MoonSweep but there is a function to write grains, isn't it ?
04:20 NV yes
04:21 MoonSweep in the docs I read that "a common practice" is to assign roles to minions using grains
04:21 NV grains contain things like os name, version, ip addresses, etc (by definition grains are fixed information)
04:21 NV grains can also be sourced from the minion config file
04:21 NV (useful when you can get your vm bootstrap stuff to set it for you when you spin up the vm!)
04:22 NV you can also manage roles using pillars though if you wish to manage it centrally though
04:22 MoonSweep Well I guess I get it
04:23 higgs001 joined #salt
04:23 MoonSweep Thanks
04:24 rgbkrk joined #salt
04:24 MoonSweep I have another question, can I put a glob in a require_in statement ?
04:24 MoonSweep let's say that I have state that configures apt sources
04:25 rgbkrk Hey I'm doing that now
04:25 rgbkrk Well, without the glob
04:25 rgbkrk Haven't tried to use pkgrepo.managed yet
04:25 rgbkrk If no one answers, I would just try it and see what happens
04:25 MoonSweep instead of writing a "require" statement on every pacjage (or group of packages), can I simply write "require_in: pkg: *" in the former statement ?
04:25 rgbkrk oh
04:26 rgbkrk apt-get install * # hehe
04:26 MoonSweep :)
04:26 MoonSweep no, that's not the point
04:26 rgbkrk Well it is for that sources list
04:27 MoonSweep some packages are in the non-free section for example, and apt sources have to be configured properly for these packages to be available
04:27 rgbkrk Do the update, followed by installing the packages you specify
04:27 rgbkrk Yeah
04:27 rgbkrk I was only saying apt-get install in jest.
04:27 rhand joined #salt
04:28 MoonSweep for now I wrote "require: file: apt-sources-list" (with proper indentation of course)
04:28 MoonSweep on every package installation
04:28 MoonSweep isn't there a way to say that in one central place ?
04:29 jesusaurus i cant think of a way, no
04:29 MoonSweep the "require_in" is the closest thing I saw so far
04:29 MoonSweep but it would need to accept a glob of some sort
04:30 jesusaurus you can only require specific ids, theres no way to require all pkg ids
04:30 MoonSweep and I'm a little bit afraid to test it without being sure that it would do what I need
04:30 MoonSweep I see
04:30 MoonSweep it would be useful though
04:31 nmistry joined #salt
04:31 jesusaurus i agree, but it would require massive changes in the codebase
04:31 MoonSweep I understand
04:32 rgbkrk When I'm using require_in right now
04:32 cowyn joined #salt
04:33 rgbkrk I'm getting "Cannot extend ID blah in "base:stuff". It is not part of the high state."
04:33 rgbkrk (Those aren't my actual names, I typed that by hand because I'm on two machines)
04:35 jesusaurus my first guess is that you are requiring an id from another file, and that other file isnt being pulled in to the highstate
04:36 rgbkrk The setup is fairly simple
04:36 rgbkrk at https://github.com/rgbkrk/salt-states/rackspace-monitoring
04:36 rgbkrk Care to take a look jesusaurus
04:36 rgbkrk ?
04:36 anitak joined #salt
04:37 rgbkrk Just starting with this
04:37 jesusaurus that 404s
04:38 rgbkrk https://github.com/rgbkrk/salt-states-rackspace-monitoring
04:38 rgbkrk Somedays I wish I could copy pasta across two laptops
04:38 rgbkrk Sorry about that
04:39 MoonSweep Did you try Synergy ?
04:39 jesusaurus okay, so the require_in needs no reference the id, not the name
04:39 jesusaurus the name defaults to the id, but in your case here you are overriding the name
04:40 jesusaurus the id is what you have at line 1 of https://github.com/rgbkrk/salt-states-rackspace-monitoring/blob/master/rackspacemonitoring/init.sls
04:40 rgbkrk In the docs they're using base as the id
04:41 rgbkrk http://docs.saltstack.com/ref/states/all/salt.states.pkgrepo.html
04:41 jesusaurus thats in the top file
04:41 jesusaurus the top file is weird and different and stupid
04:41 jesusaurus (sorry, i have some gripes with the top file)
04:41 rgbkrk You're telling me
04:42 rgbkrk I could have thrown everything in the top file
04:42 jesusaurus but in general, an id is at the top level of a yaml file
04:42 rgbkrk I see, that doc is showing what it would be like in a top file
04:42 rgbkrk k
04:42 jesusaurus so, in your init.sls the id is rackspace-package
04:43 jesusaurus and there are two states with the same id, pkg and pkgrepo
04:44 jesusaurus so you can require 'pkg: rackspace-package' which will be exactly one state with one id once all the yaml is compiled into an object in-memory
04:44 rgbkrk oh
04:44 rgbkrk it's not performing the apt update and installing that package
04:44 mannyt joined #salt
04:45 rgbkrk require_in: Set this to a list of pkg.installed or pkg.latest to trigger the running of apt-get update prior to attempting to install these packages. Setting a require in the pkg will not work for this.
04:45 bkparso Is there any way to put a list of users somewhere, and have it loop through them in a YAML .sls document?
04:45 AdamSewell joined #salt
04:45 bkparso e.g. sudoers: users: {% for user in my_user_database %}{% user %}: 'ALL=(ALL) ALL'{% endfor %} ??
04:46 Ryan_Lane joined #salt
04:46 jesusaurus bkparso: most definitely
04:46 bkparso was I on the right path? Where can I find this in the docs? I don't want to have to modify multiple .sls files when changing users on a server
04:47 rgbkrk ok, that worked jesusaurus.
04:48 rgbkrk (sort of)
04:48 jesusaurus bkparso: the way i would do it is to put a sequence of users in pillar, then write a simple users formula to loop over the list in a template
04:48 jesusaurus rgbkrk: awesome
04:49 jesusaurus bkparso: what are you having trouble with? just wrapping your head around the yaml data structure?
04:49 bkparso @jesusaurus : Something like that I suppose, yeah
04:49 bkparso So I can just template directly in the top.sls?
04:49 bkparso Basically I'm trying to use the salt-forumulas right off the github repo
04:49 bkparso users and sudoers
04:49 bkparso And I'd like to put a list of users in one place, and have both those formulas pull from it
04:50 bkparso ** directly in init.sls **
04:50 jesusaurus unfortunately im not familiar with those repos, i wrote a lot of my own stuff before those were created
04:50 jesusaurus but what you want is a list of users in pillar
04:50 jesusaurus and then a formula that iterates over the pillar data
04:50 bkparso like /srv/pillar/my_users/init.sls ?
04:50 jesusaurus the structure of the pillar data is going to depend on what the formula expects
04:51 jesusaurus bkparso: yeah, something like that
04:51 bkparso and how do I reference that pillar data in another .sls file?
04:52 bkparso {% for user in my_users.user %} ?
04:54 jesusaurus if my_users/init.sls contains something like `users: [ 'user1', 'user2' ]` then it would be `{% for user in pillar['users'] %}`
04:54 bkparso perfect ! That oughta get me going I think
04:54 bkparso Thank you :)
04:55 jesusaurus you're welcome
04:55 sgviking joined #salt
05:05 nmistry joined #salt
05:08 bhosmer joined #salt
05:09 joelwhitehouse Salt states need a way to enforce that a gpg key has been pulled down.
05:10 Gifflen joined #salt
05:11 scott_w_ joined #salt
05:13 jesusaurus by 'salt states' do you mean formulae or state modules?
05:17 jesusaurus i would argue that making formulae dependent of the state of the system makes it difficult to be idempotent and makes your formulae much less static, and that level of system awareness belongs at the state-module level
05:19 Sheco joined #salt
05:19 bkparso Is there any way to use a "masterless" setup for initial config (e.g. salt states) but still tie-in a master for doing remote execution tasks?
05:20 joelwhitehouse jesusaurus, I want to turn this link into a formula: http://www.ubuntugeek.com/x2go-open-source-terminal-server-project-alternative-to-freenx.html
05:21 joelwhitehouse I can add their repo easily enough with 'pkgrepo.managed'
05:23 joelwhitehouse 'pkgrepo.managed' has an option for a keyserver and keyid... but it doesn't say gpg specifically.
05:25 shinylasers joined #salt
05:26 jesusaurus apt uses gpg keys. its the only type accepted (to the best of my knowledge)
05:27 JulianGindi joined #salt
05:29 MoonSweep left #salt
05:30 joelwhitehouse That's good to know, jesusaurus.
05:31 thelorax123 joined #salt
05:37 anitak joined #salt
05:43 higgs001 joined #salt
05:46 schristensen is it possible to set a jinja variable in one sls file which then includes another sls file, and use that jinja variable in the included file?
05:47 Ryan_Lane joined #salt
05:51 sroegner joined #salt
06:10 Gifflen joined #salt
06:10 stsang joined #salt
06:11 cloud joined #salt
06:11 scott_w_ joined #salt
06:13 stsang1 joined #salt
06:14 thelorax123 joined #salt
06:29 JoeDev joined #salt
06:38 anitak joined #salt
06:44 Ryan_Lane joined #salt
06:44 jkyle joined #salt
06:48 quanta_ joined #salt
06:48 quanta_ https://gist.github.com/quantonganh/7801152
06:48 quanta_ https://gist.github.com/quantonganh/7801125
06:49 quanta_ and the output when running: https://gist.github.com/quantonganh/7801138
06:49 quanta_ it looks like the pyopenssl module is not pick up when calling tls.create_self_signed_cert
06:50 pdayton joined #salt
06:52 quanta_ it will works if I running one more time: https://gist.github.com/7801192
06:52 dmalinovsky quanta_, http://docs.saltstack.com/ref/modules/all/salt.modules.tls.html#module-salt.modules.tls read 'configuration' note
07:00 quanta_ dmalinovsky: did it, restarted the minion, then re-run and got the same: https://gist.github.com/7801230
07:00 AdamSewell joined #salt
07:02 malinoff joined #salt
07:04 fllr joined #salt
07:06 malinoff quanta_, salt modules are loaded on minion startup. Salt executed __virtual__ function in tls module and got False result because pyopenssl is not installed.
07:07 malinoff Try to run salt['saltutil.sync_modules']() right after installing pyopenssl
07:09 Ryan_Lane joined #salt
07:21 juasiepo joined #salt
07:24 rojem joined #salt
07:29 jkleckner joined #salt
07:29 jkleckner left #salt
07:30 scott_w_ joined #salt
07:38 anitak joined #salt
07:45 echos joined #salt
07:46 echos joined #salt
07:51 shinylasers joined #salt
07:52 sroegner joined #salt
07:56 pengunix joined #salt
07:59 malinoff joined #salt
08:04 junedm joined #salt
08:04 fllr joined #salt
08:04 junedm left #salt
08:05 rojem goat
08:05 scott_w_ joined #salt
08:08 mooo_ joined #salt
08:12 mooo_ hey, salt is really cool tool, but one thing anoying me very much - the output :) I tried different options but it's still unreadable when lots of configs are aplied. What switches are you using when viewing highstate output?
08:13 mooo_ and one more question, is there a way to sort output by __run_num__?
08:14 slav0nic joined #salt
08:14 zz_Cidan mooo_: the default output normally works for me, but if it's really rough, maybe output to json and wrap the output in a script that displays it how you would like
08:15 zz_Cidan or, even better, write your own outputter
08:16 malinoff mooo_, man salt, search for --out option
08:16 zz_Cidan malinoff, he said he tried the options, he just doesn't like them
08:17 harobed_ joined #salt
08:17 zz_Cidan I think the reason the default works for me is, I only care about the errors
08:22 mooo_ hmm hmm, when I use default output it  gives me around 1000 lines, so it's hard to view and analyze. I've checked the options from man and the best for me at the moment is json. I was asking because maybe there is some undocumented trich which salt masters use ;)
08:22 mooo_ trick*
08:24 mooo_ it would be super cool if one line per state is logged, but as you said - i can write my own outputter ;]
08:25 zz_Cidan indeed
08:29 Ryan_Lane joined #salt
08:32 stephanbuys joined #salt
08:33 mikn_ Is there a tool for generating the lowstate on a state tree without it being in the file_roots? For testing
08:38 giantlock joined #salt
08:39 SlickNik joined #salt
08:42 dnsn joined #salt
08:42 Ryan_Lane joined #salt
08:47 thelorax123 joined #salt
08:53 shinylasers joined #salt
08:55 prooty joined #salt
08:56 prooty is it possible to template the top file? like if the hostname is foo, then give it the foo sls.
08:58 bemehow_ joined #salt
09:02 NV prooty: the hostname asin the hostname of the minion? you can already do that by matching on grains or minion id in the top file
09:02 NV no need for templating
09:03 NV but to actually answer your question, yes you can template it
09:03 zz_Cidan he means matching the host to a state
09:03 zz_Cidan so 'foo': - foo.sls
09:03 NV oh i see, then yes, you can
09:03 NV you might find that problematic though
09:03 NV because now every host needs a sls by the same name
09:04 zz_Cidan indeed
09:04 NV probably better is creating a python state file called 'hoststates' or something that dynamically generates a list of states to include based on hostname, but only after first checking that the state exists
09:04 NV (I do that except using a roles pillar dict instead of the hostname)
09:04 fllr joined #salt
09:05 NV all the flexibliity without the pain of having to have a bunch of empty dummy states just so it doesn't throw errors :P
09:06 prooty hmm, i guess. but at least i know it's possible.
09:06 prooty thanks for the suggestions.
09:07 JasonG_TA joined #salt
09:08 carlos joined #salt
09:20 ckao joined #salt
09:22 gammalget joined #salt
09:24 balboah joined #salt
09:25 zooz joined #salt
09:25 sgviking joined #salt
09:32 ertac joined #salt
09:32 cym3try joined #salt
09:33 cym3try can i install a master and minion on my laptop to manage my local config?
09:34 malinoff cym3try, you can set up a masterless minion, if you don't need to manage more than just one minion
09:35 cym3try cool..that's what i need then
09:36 malinoff cym3try, http://docs.saltstack.com/topics/tutorials/quickstart.html
09:38 lemao joined #salt
09:48 bemehow joined #salt
09:53 Ryan_Lane joined #salt
09:53 sroegner joined #salt
10:00 Ryan_Lane joined #salt
10:03 Ryan_Lane joined #salt
10:04 fllr joined #salt
10:11 dangerousbeans joined #salt
10:16 njs126 joined #salt
10:25 che-arne joined #salt
10:25 thelorax123 joined #salt
10:29 diegows joined #salt
10:36 njs126 joined #salt
10:38 njs126 joined #salt
10:45 Ryan_Lane joined #salt
10:45 mortis any salt-cloud pros here? :P im struggling with getting salt-cloud to find the profiles i just created ... it says it cant find the profiles tho i tried to put them in both cloud.profiles and cloud.profiles.d
10:46 mortis not exactly sure what im doing wrong here
10:46 mortis i can list the openstack provider and it seems fine
10:50 mortis oh theres something wrong here, i cant list the sizes ..hmm
10:50 mortis [ERROR   ] Failed to get the output of 'openstack.avail_sizes()': <MalformedResponseException in None 'Malformed response'>: 'code: 400 body: {"error": {"message": "get_version_v2() got an unexpected keyword argument \'auth\'", "code": 400, "title": "Bad Request"}}'
10:50 mortis bummer
10:52 mike251 joined #salt
10:52 * mike251 hi to all
10:54 igreg joined #salt
10:54 igreg Hello everyone
10:57 jean-phi1ippe joined #salt
10:58 thelorax123 joined #salt
11:02 scott_w joined #salt
11:04 fllr joined #salt
11:05 jean-phi1ippe is there a way to put a pillar call in a debconf state?
11:05 jean-phi1ippe http://hastebin.com/cegapegixe.hs
11:06 malinoff jean-phi1ippe, yes, of course
11:06 jean-phi1ippe it doesn't seem to work for me :p
11:06 elfixit joined #salt
11:07 malinoff What about {{ pillar['smtp'].get('servername', grains['id']) }} ?
11:07 jean-phi1ippe Will test it right away
11:10 pengunix joined #salt
11:10 jean-phi1ippe Rendering SLS nullmailer failed, render error: Undefined jinja variable; line 8 in template
11:11 jean-phi1ippe at that line :)
11:13 jean-phi1ippe I can find a workaround by skipping debconf and setting the files directly, but I found the debconf setup a nice feature
11:17 Iwirada joined #salt
11:24 mike251 jean-phi1ippe: so /// it doesn't add the pillar data?
11:25 mike251 jean-phi1ippe: try {{ pillar['smtp']['relay'] }}
11:27 jean-phi1ippe I think I found my problem
11:27 jean-phi1ippe it's in my pillar data
11:27 mike251 ah ok...
11:27 jean-phi1ippe pillar.items show an additional "-"
11:27 jean-phi1ippe sorry for that
11:27 mike251 so is a dictionary
11:28 mike251 is good that you discovered so fast :) sometimes.. i waste like 15 min with a stupid thing like that
11:29 bwghughes joined #salt
11:31 Ryan_Lane joined #salt
11:31 thelorax123 joined #salt
11:33 quantum-x joined #salt
11:33 quantum-x Anyone seen this issue when using 'recurse' - http://fpaste.org/59226/62432101/ -  "OSError: Cannot call rmtree on a symbolic link"
11:38 viq I am having a problem with FreeBSD - I tried setting 'providers: pkg: pkgng' in both minion config and in state, but salt keeps trying to use freebsdpkg provider and failing
11:40 zandy joined #salt
11:49 viq Any ideas what am I doing wrong/what could I do to fix this?
11:51 * viq nudges terminalmage as possible culprit ;)
11:51 matanya joined #salt
11:54 sroegner joined #salt
11:55 igreg Just starting to know saltstack was wondering if someone could answer a question about the CLI
11:56 mike251 igreg: shoot
11:58 igreg When I run `salt '*' foo.bar` the output is sent back once the function has completed its work. Is there is a way to display it progressively instead of at the end?
11:58 mike251 as far as i know... no
11:59 mike251 but why would you need that?
11:59 igreg My rationale was that I have long running functions and I was wondering if I could see the progress of those
11:59 mike251 not 100% sure...  but i think not...  i do not remember reading about that feature in the documentation
12:00 malinoff igreg, not right now. But salt guys are implementing this
12:00 elfixit joined #salt
12:00 mike251 malinoff:  great input as always :) thanks
12:02 igreg malinoff: thanks! is there is a place where devs are discussing this?
12:03 igreg maybe an issue tracker or something?
12:03 backjlack joined #salt
12:04 fllr joined #salt
12:06 harobed_ joined #salt
12:07 Sheco joined #salt
12:14 jcsp joined #salt
12:15 scott_w_ joined #salt
12:16 carnedepassaro joined #salt
12:20 bhosmer joined #salt
12:21 sandGorgon joined #salt
12:30 ninkotech joined #salt
12:41 sandGorgon joined #salt
12:42 sunand joined #salt
12:48 pdayton joined #salt
12:48 bhosmer joined #salt
12:55 jpcw joined #salt
12:55 jfzhu_us joined #salt
12:59 Brew joined #salt
13:01 fllr joined #salt
13:04 fllr joined #salt
13:05 pengunix joined #salt
13:08 jasg75 joined #salt
13:10 thelorax123 joined #salt
13:12 [diecast] joined #salt
13:12 mike251 left #salt
13:14 Ryan_Lane joined #salt
13:14 Brew joined #salt
13:14 quanta_ joined #salt
13:14 blee joined #salt
13:20 cowyn Hi, how can I use __opts__ from within runner?
13:21 cowyn I'm writing a runner, which will call the external git_pillar
13:22 cowyn got error:
13:22 elfixit joined #salt
13:22 cowyn File "/usr/lib64/python2.7/site-packages/salt/pillar/git_pillar.py", line 65, in __init__
13:22 cowyn for idx, opts_dict in enumerate(__opts__['ext_pillar']):
13:22 cowyn NameError: global name '__opts__' is not defined
13:23 diegows joined #salt
13:40 jslatts joined #salt
13:43 junedm joined #salt
13:44 Voziv joined #salt
13:44 ertac joined #salt
13:47 Sheco joined #salt
13:51 th3reverend1 left #salt
13:51 fllr joined #salt
13:53 thelorax123 joined #salt
13:53 _fllr_ joined #salt
13:54 danielbachhuber joined #salt
13:54 dangerousbeans joined #salt
13:54 danielbachhuber- joined #salt
13:55 sroegner joined #salt
13:56 Voziv Are ssh deploy keys a bad thing to keep in the salt git repo?
13:56 cowyn Voziv, you mean pri-key?
13:56 Voziv yeah, private key
14:00 cowyn imo, it's not a good idea, definitely
14:00 ipmb joined #salt
14:00 amahon joined #salt
14:01 brianhicks joined #salt
14:01 MZAWeb joined #salt
14:01 Voziv cowyn: Why is that? And how would you go about getting it out to servers?
14:04 thelorax123 joined #salt
14:04 fllr joined #salt
14:04 junedm left #salt
14:04 vejdmn joined #salt
14:07 trax joined #salt
14:07 trax hi .*
14:07 Ryan_Lane joined #salt
14:10 xerxas_ joined #salt
14:10 juicer2 joined #salt
14:10 shennyg_ joined #salt
14:10 pdayton joined #salt
14:11 racooper joined #salt
14:12 akitada joined #salt
14:12 JasonSwindle joined #salt
14:12 tyler-baker joined #salt
14:12 tyler-baker joined #salt
14:12 Gifflen joined #salt
14:13 WarheadsSE joined #salt
14:20 ertac joined #salt
14:21 quanta_ joined #salt
14:29 JasonG_TA joined #salt
14:39 grep_awesome just used salt to alter the apache configuration on a load pool in production. went quite smoothly. it's been a great tool so far.
14:40 quickdry21 joined #salt
14:42 portland joined #salt
14:44 juasiepo joined #salt
14:44 _ikke_ grep_awesome: nice
14:45 netzmonster joined #salt
14:46 Furao joined #salt
14:46 Furao left #salt
14:51 quanta_ joined #salt
14:52 netfu joined #salt
14:52 netfu hello
14:53 netfu I want to create a module / state that will need to read a file, potentially make a modification, and then write the result.
14:54 netfu my question is what is the best way to "roll up" the changes so the file might be only written once (rather than each modification to the file being handled as a separate modification)
14:54 netfu Is there a state or module that combines a set of changes that would be a good example to look at?
14:55 _ikke_ file.replace?
15:00 tempspace How do you pass kwargs to a salt module from jinja?
15:02 rlarkin joined #salt
15:03 kaptk2 joined #salt
15:03 sandGorgon joined #salt
15:04 fllr joined #salt
15:07 WarheadsSE left #salt
15:08 zandy joined #salt
15:09 sroegner joined #salt
15:13 alunduil joined #salt
15:14 Ryan_Lane joined #salt
15:15 JulianGindi joined #salt
15:21 Ryan_Lane joined #salt
15:25 cnelsonsic joined #salt
15:27 mgw joined #salt
15:27 jergerber joined #salt
15:28 mannyt joined #salt
15:28 favadi joined #salt
15:37 juso joined #salt
15:39 smccarthy joined #salt
15:39 zandy joined #salt
15:40 kermit joined #salt
15:40 MrTango joined #salt
15:41 portland hi i want to enable reposiroty over sls is there any way to do this? salt '*' pkg.mod_repo remi enabled=1 via cli is working fine
15:42 portland and how to do id over sls ;-)
15:42 AdamSewell joined #salt
15:44 zandy joined #salt
15:46 favadi joined #salt
15:47 juso Hi guys. Got a question on salt *.sls files - how can I form a string inside init.sls which contains minion id? I.e. I need to pass minion id as an argument to the salt-install
15:47 rojem joined #salt
15:48 favadi joined #salt
15:49 pass_by_value joined #salt
15:50 rjc joined #salt
15:53 m4yfield joined #salt
15:53 [diecast] joined #salt
15:53 mikkn How do you initiate the salt.Wheel.Wheel() python interface? It seems to require opts, but it's not documented anywhere what those might actually be...
15:59 jrdx joined #salt
16:00 nmistry joined #salt
16:03 yota joined #salt
16:04 fllr joined #salt
16:05 portland can i make something like that in sls file salt['pkg.mod_repo']('remi enabled=1')?
16:07 micah_chatt joined #salt
16:08 davidfischer joined #salt
16:13 erchn joined #salt
16:14 erchn hi guys, anyone know if when using module.run in a state, will a require of "module: <id dec>" work from another state declaration?
16:15 thelorax123 joined #salt
16:17 whiskybar joined #salt
16:18 amahon joined #salt
16:19 supplicant is there a salt module to install packages? all I see is the state.
16:19 pipps_ joined #salt
16:19 nahamu supplicant: "pkg"?
16:19 nahamu I may have misunderstood your question
16:20 supplicant nahamu: can I just do: salt some.host pkg.installed python-derp ?
16:20 nahamu I think you should be able to.
16:20 nahamu not that it's necessarily a good idea... ;)
16:21 lingo joined #salt
16:21 supplicant "pkg.installed" is not available.
16:21 supplicant well, time to read the docs harder
16:22 cachedout joined #salt
16:22 supplicant ah, state.single
16:22 erchn supplicant: I think you want pkg.install
16:23 supplicant salt some.host state.single pkg.installed name=python-derp
16:23 erchn state.single is another way
16:23 supplicant erchn: I don't see a pkg module in the list of modules
16:23 supplicant well... I guess it exists
16:23 nahamu it's virtual packge that wraps the one for your package manager
16:23 portland is there any way to use salt command in sls file? ;-)
16:24 portland i cant find anything about that :/
16:24 mohae joined #salt
16:24 supplicant nahamu: yeah, but.... I would expect to see it in the documentation
16:24 nahamu salt '*' pkg.list_pkgs
16:25 erchn supplicant: try pydoc salt.states.pkg
16:25 nahamu http://docs.saltstack.com/ref/modules/all/salt.modules.pkg.html
16:26 supplicant now I see it... right there at the top :( not in alphabetical order
16:26 nahamu it's "pkg.install" as erchn pointed out.
16:26 jalbretsen joined #salt
16:26 amckinley joined #salt
16:27 mattmtl joined #salt
16:28 jcsp joined #salt
16:28 schristensen joined #salt
16:30 che-arne joined #salt
16:33 * Gareth waves
16:33 pipps_ joined #salt
16:33 supplicant is it possible to use salt-ssh from windows? I know the master cannot be installed on windows
16:35 tyler-baker joined #salt
16:40 sandGorgon joined #salt
16:40 JasonSwindle joined #salt
16:40 mgw joined #salt
16:41 rojem joined #salt
16:43 amahon joined #salt
16:44 Faman joined #salt
16:45 zandy joined #salt
16:45 davet joined #salt
16:45 nmistry joined #salt
16:47 KyleG joined #salt
16:47 KyleG joined #salt
16:47 seanz joined #salt
16:49 davet joined #salt
16:51 pdayton joined #salt
16:58 mannyt joined #salt
17:01 rojem joined #salt
17:03 mikkn So, to answer my own question about the Salt Wheel python client requiring opts, you get the default opts with this: opts = salt.config.client_config(os.environ.get('SALT_MASTER_CONFIG', os.path.join(syspaths.CONFIG_DIR, 'master')))
17:04 fllr joined #salt
17:05 KyleG cedwards: First of all, good morning. Secondly, I figured out my issue. 0.16.4 looks for /usr/local/etc/pkg.conf which has been deprecated. That's what was going wrong in my production environment.
17:08 cedwards KyleG: I thought I saw a patch for that in more recent versions.
17:08 KyleG Yeah, it was switched to checking for the pkgng database
17:08 KyleG Haven't had time to troubleshoot my QA environment which runs the 0.17.2 and does that
17:08 KyleG Had to get a big push out in production yesterday
17:08 micah_chatt joined #salt
17:12 mgw joined #salt
17:15 shinylasers joined #salt
17:15 zandy joined #salt
17:16 pmcg joined #salt
17:16 hvn_ joined #salt
17:16 hvn_ left #salt
17:17 zandy joined #salt
17:17 Sheco joined #salt
17:18 troyready joined #salt
17:19 micah_chatt joined #salt
17:26 seanz joined #salt
17:28 nmistry joined #salt
17:28 JasonSwindle left #salt
17:29 juso guys, may be I reformulate the question - what's the easiest way to automatically (using salt-stack) upgrade salt-stack while preserving configuration (minion id etc.)?
17:30 juso tried to run it as an executable in sls, but this way requires minion_id be passed to the installer.
17:30 juso a bit stuck now
17:30 felskrone joined #salt
17:33 xet7 joined #salt
17:36 snave joined #salt
17:36 frosty996 so anyone have an example of using salt mine data in a state?
17:38 fllr joined #salt
17:39 mikkn juso: assuming the minion_id is your hostname you can do {{ grains.fqdn }}
17:39 mikkn juso: otherwise you can echo the contents of /etc/salt/minion_id, but I'm sort of a newbie as well, so I don't know exactly how to do that
17:43 mgw joined #salt
17:43 juso mikkn: thanx, the only problem is that even though generally minion_id is hostname, sometimes it may differ. BTW, where I can find all available values for {{ ... }}?
17:45 jcsp joined #salt
17:46 blee_ joined #salt
17:46 frosty996 juso: I believe grains.id is what you're after
17:50 micah_chatt joined #salt
17:52 zandy joined #salt
17:52 mpanetta joined #salt
17:57 scotticus joined #salt
17:59 juso frosty996, many thanx, will try it now
17:59 scotticus left #salt
18:00 frosty996 juso: you can find all the available grains like: salt 'minion_id' grains.items
18:00 smccarthy2 joined #salt
18:01 pdayton joined #salt
18:03 jdenning joined #salt
18:03 Heartsbane joined #salt
18:03 Heartsbane joined #salt
18:03 juso frosty, that's great, thanx a lot!
18:05 matanya joined #salt
18:05 jcsp1 joined #salt
18:06 bemehow_ joined #salt
18:09 micah_chatt joined #salt
18:09 fllr joined #salt
18:09 matanya joined #salt
18:10 bitz joined #salt
18:10 dfinn joined #salt
18:12 dfinn can a node group name be referenced like so?
18:12 dfinn source: salt://packages/blah/file.{{ grains['nodegroup'] }}
18:12 dfinn or something like that?
18:12 dfinn maybe not a grain
18:13 dfinn also, can a server be part of multiple nodegroups?
18:16 kermit joined #salt
18:23 dvogt joined #salt
18:23 schristensen is there a way to pass jinja variables between sls files (ones defined using 'set')?  It doesn't look like it to me, but it would be great if there is a way.
18:24 pdayton joined #salt
18:25 Gareth anyone running salt on Ubuntu 10.04?
18:26 dpippenger joined #salt
18:30 amahon joined #salt
18:34 matanya joined #salt
18:34 druonysus joined #salt
18:34 druonysus joined #salt
18:37 chrism joined #salt
18:38 chrism hey there, I go tthe 0.17.2 upgrade last night and now my salt minions are having problems finding certain packages (they install fine when called via yum -y install <packagename> from the VM though)
18:38 chrism any idea what's up there? not seeing any obvious bug reports
18:38 chrism specific error is "The following package(s) were not found, and no possible matches were found in the package db: <packagename>"
18:40 zandy joined #salt
18:44 jbub joined #salt
18:44 JasonSwindle joined #salt
18:44 chutzpah who would we want to contact if we want to pay someone to develop a feature in salt?
18:45 Chrisje joined #salt
18:45 _ikke_ info@saltstack.com
18:45 _ikke_ sales@saltstack.com perhaps
18:46 chilly_ joined #salt
18:49 chilly_ hi everyone, trying to run a normal 'salt-call state.highstate' on a minion, but getting strange output "Traceback (most recent call last):" followed by references to files and finally "IndexError: pop from empty list"
18:51 smccarthy joined #salt
18:51 chilly_ Traceback (most recent call last):   File "/usr/bin/salt-call", line 11, in <module>     salt_call()   File "/usr/lib/python2.6/dist-packages/salt/scripts.py", line 76, in salt_call     client = salt.cli.SaltCall()   File "/usr/lib/python2.6/dist-packages/salt/utils/parsers.py", line 116, in __init__     optparse.OptionParser.__init__(self, *args, **kwargs)   File "/usr/lib/python2.6/optparse.py", line 1214, in __init__     add_help=a
18:53 forresta joined #salt
18:59 pipps__ joined #salt
19:00 jimallman joined #salt
19:01 stsang joined #salt
19:03 pipps_ joined #salt
19:06 jslatts joined #salt
19:07 diegows joined #salt
19:13 mgw1 joined #salt
19:16 zandy joined #salt
19:22 xmltok joined #salt
19:25 abe_music joined #salt
19:31 rojem joined #salt
19:35 zooz joined #salt
19:36 cnelsonsic joined #salt
19:38 C5E3B7BDF99A4 joined #salt
19:43 netfu joined #salt
19:47 Brew joined #salt
19:55 Marion joined #salt
19:58 cowyn joined #salt
20:00 donatello joined #salt
20:01 schristensen is there a way to reload grains  in a state file?  like if a state file changes something which affects a grain and I need to see that later down in the file?
20:03 smccarthy2 joined #salt
20:03 forresta schristensen, I don't think so since the states are all compiled together. Your best bet would to use that variable that you are changing via something like 'set' http://jinja.pocoo.org/docs/templates/#assignments
20:04 _ikke_ statefiles are declarative, not procedural
20:05 forresta _ikke_, any further ideas on how to do what schristensen is asking?
20:08 _ikke_ forresta: nope
20:08 schristensen I see this: salt.modules.saltutil.refresh_modules() as a possibility.  perhaps?
20:09 pipps_ joined #salt
20:09 _ikke_ That's a command
20:10 forresta schristensen, what are you trying to do?
20:11 micah_chatt joined #salt
20:11 schristensen I'm trying to set a grain in a state file and have the new set value be available in other state files included from the parent one where I set the grain.
20:11 forresta which grain?
20:12 _ikke_ schristensen: Not sure, but aren't contexts more suitable for that?
20:12 schristensen I have this in a parent state file:
20:12 schristensen #  {{ salt['grains.setval']('server_role','memecached') }}
20:12 abe_music is the "sources" field of pkg.installed still valid? i'm getting this: NameError: global name '__SUFFIX_NOT_NEEDED' is not defined
20:12 schristensen oops typo on memcached
20:12 abe_music https://gist.github.com/abemusic/7813024
20:13 forresta abe_music, remove th single quotes.
20:13 abe_music forresta: k
20:13 balltongu joined #salt
20:14 abe_music forresta: same issue
20:14 abe_music brb
20:14 schristensen then the memcached.sls file includes yum.sls, which I want to be able to use {{ grains['server_role'] }} to determine a specific yum repo source file.
20:15 schristensen as an example
20:15 forresta yea, but you tested this and it didn't work right?
20:16 sandGorgon joined #salt
20:16 bhosmer joined #salt
20:16 zandy joined #salt
20:17 forresta abe_music, https://github.com/saltstack/salt/issues/8945
20:18 forresta abe_music, should be easy to go in and fix yourself.
20:18 forresta basepi, do you know if this was cherry picked for 0.17.3? https://github.com/saltstack/salt/issues/8945
20:19 schristensen hmm.  interesting.  I just tested it and it does work, sort of.  the included file sees the new value for the grain I set, but the parent state file sees the old value through out the run.
20:20 schristensen I guess that works good enough for my case.
20:21 basepi forresta: i have not yet, but only because i haven't cherry-picked in more than a week
20:21 basepi forresta: so it will be
20:21 forresta basepi, oh ok, I thought you were doing the cherry picking for this one, my bad
20:22 forresta shcristensen, you could always define a state that only sets that value I guess.
20:22 basepi forresta: i am.  i will be doing it this afternoon
20:22 basepi just have been procrastinating
20:22 forresta basepi, oh ok
20:22 forresta my condolences then :P
20:22 basepi hehe
20:24 forresta that reminds me after seeing that mailing list item relating to documentation versioning, for releases after hydrogen, has there been consideration to have dev.docs.saltstack.com versus the ones going into the stable to avoid confusion? Or are you guys just gonna try to enforce the usage of the versionadd?
20:24 basepi the goal right now is to try to enforce versionadded
20:24 wramthun joined #salt
20:24 forresta ok cool
20:25 forresta that should also provide historical data for people who aren't running the latest release which is good.
20:26 basepi talked to Tom just now, and he's saying we're probably going to start building docs for the releases, too
20:26 basepi i apparently missed that memo.  =)
20:26 forresta gotcha, yea that would be nice
20:27 forresta though I'm not familiar how sphinx handles that with versioning, do you just make a ton of copies of the docs for each release in the repo? Or pull from a tag for what gets built?
20:28 matanya joined #salt
20:30 JasonSwindle basepi:  Are you guys going to drop the next version before SaltConf?
20:30 JasonSwindle Or an RC soon^TM
20:30 JasonSwindle ?
20:31 basepi RC hopefully in the next week or two
20:31 JasonSwindle Great
20:31 basepi release before saltconf, assuming RCs go well
20:31 basepi (we expect 3-4 RCs)
20:31 JasonSwindle I was looking to move from .16.x to .17.x…..but I will hold off. :)
20:31 dan_johnsin Anyone familiar with using salt with supervisord?  I keep getting return state of False if it is already started (nginx: ERROR already started)
20:32 JasonSwindle dan_johnsin:  Sadly not.  I was looking at testing it out soon because I want to use something other than UpStart
20:32 forresta has anyone been seriously using Salt for Windows minions?
20:33 forresta I'm curious regarding your experience with it
20:34 dan_johnsin JasonSwindle: Yeah.  It looks like there might be some weirdness happening, even when I pass the restart flag it still returns an error.  It sets up everything correctly it seems
20:34 micah_chatt joined #salt
20:34 JasonSwindle Hmm, dang.  Ok.   SupD is low on my list at the moment.   Getting uWSGI into LogStash is taking up a lot of my time.
20:36 mannyt joined #salt
20:36 bt joined #salt
20:38 mannyt joined #salt
20:40 dave_den joined #salt
20:41 matanya joined #salt
20:45 abe_music forresta: cool, thanks for the link...looks like the fix is already in the develop branch and i just need to update. makes my life easier :)
20:45 forresta abe_music, yea should be a quick import to resolve it
20:47 matanya joined #salt
20:51 smccarthy joined #salt
20:51 cewood joined #salt
20:59 snave_ joined #salt
21:00 pentabular joined #salt
21:00 pentabular left #salt
21:01 giantlock joined #salt
21:02 druonysuse joined #salt
21:02 druonysuse joined #salt
21:09 AdamSewell joined #salt
21:11 matanya joined #salt
21:13 pipps_ joined #salt
21:16 zandy joined #salt
21:20 ccase joined #salt
21:25 pdayton1 joined #salt
21:33 jimallman joined #salt
21:35 Marion joined #salt
21:45 ertac joined #salt
21:45 AdamSewell joined #salt
21:48 bemehow joined #salt
21:49 amckinley joined #salt
21:52 JasonSwindle joined #salt
21:53 Gifflen joined #salt
21:53 zooz does anyone know what is the reason behind states definition being in inverse order.
21:53 zooz ?
21:53 forresta zooz, what do you mean?
21:53 zooz for instance you have:
21:54 zooz vim:
21:54 zooz - pkg.installed
21:54 zooz that kind of stuff
21:54 zooz naturally I want to define it in:
21:54 zooz pkg:
21:54 zooz - vim
21:54 zooz - installed
21:54 forresta you can do that
21:54 zooz something like that
21:54 pdayton joined #salt
21:54 zooz can I ?
21:54 forresta name    'puppetlabs-ntp'
21:54 forresta version '3.0.0-rc1'
21:54 forresta source 'git://github.com/puppetlabs/puppetlabs-ntp'
21:54 forresta author 'Puppet Labs'
21:54 forresta license 'Apache Version 2.0'
21:54 forresta summary 'NTP Module'
21:54 torrancew zooz: just keep in mind you're basically generating a YAML hash
21:54 forresta description 'NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.'
21:55 forresta project_page 'http://github.com/puppetlabs/puppetlabs-ntp'
21:55 forresta ## Add dependencies, if any:
21:55 forresta dependency 'puppetlabs/stdlib', '>= 0.1.6'
21:55 forresta ugh lame
21:55 forresta hang on
21:55 forresta http://docs.saltstack.com/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
21:55 forresta look at 'pkgs' in that section zooz
21:55 harobed_ joined #salt
21:55 zooz awesome stuff then
21:55 forresta zooz, I haven't tried that sort of list with a single item, but as torrancew said, yea you're basically creating a YAML hash
21:56 zooz I built similar stuff for puppet, designed my modules and their interfaces in a similar fashion
21:56 forresta so it's going to smash it all together into a dict
21:56 Gifflen joined #salt
21:56 forresta yea, you can also always use the 'name' option, to specify the name of the package you want installed if you don't want it as the top level definition.
21:57 zooz so for instance, I in my puppet I designed it to be like so: https://github.com/vaijab/puppet-nginx
21:57 robbyt joined #salt
21:57 zooz here is: https://github.com/vaijab/puppet-nginx#nginxvhost
21:57 zooz if you look at examples, so I was wondering if something is possible in salt
21:57 torrancew zooz: you just can't have two keys of the same name at the same level (including "pkg") - as long as you don't collide hash keys, and obey one or more of salt's recognized structures, you should be good
21:57 zooz I have used salt some time ago, but I am way outdated nowadays
21:58 zooz torrancew, does salt support hash merging?
21:59 zooz say if I define a 'pkgs' hash in multiple places, but at the end I want it to be merged into one
21:59 zooz (similar to what hiera does if you're familiar with it)
22:00 torrancew Not sure, pretty new to salt myself
22:00 torrancew I know what you're after (quite comfy in puppet/hiera land)
22:01 jrdx joined #salt
22:01 forresta boooooooo
22:01 torrancew just don't know if salt can do it. I presume in the worst case you could use hiera as a pillar and do it that way, perhaps?
22:01 torrancew booooo?
22:01 forresta I'm just joking
22:01 forresta about puppet
22:01 torrancew ah
22:01 torrancew says the guy that pastebombed a puppet Modulefile ;)
22:02 forresta Ugh, don't remind me, I want to stab foreman-proxy in the face right now.
22:03 torrancew haha
22:03 forresta torrancew, if there was legit salt support in RedHat Satellite, and foreman, I wouldn't be doing what I am :P
22:04 forresta but RedHat in their infinite wisdom has decreed that only puppet will plug into the new version.
22:04 pipps__ joined #salt
22:04 torrancew of satellite?
22:04 forresta yes
22:04 torrancew *nod*
22:05 forresta I look forward to the next call I'm on with them
22:05 torrancew AFAIK the foreman team is open to salt support though
22:05 torrancew They just don't have the expertise *on* the team
22:05 forresta That's very true, however the beta version of satellite doesn't seem to support anything but the puppet functionality
22:05 forresta or at least there's no (by default) options to use salt for the foreman component
22:06 torrancew I don't use satellite (or RH), so dunno anything about the integration of the two
22:06 forresta it's something new they are working on
22:06 forresta trying to make their all in one front end gui
22:06 torrancew ah
22:07 flebel joined #salt
22:07 forresta torrancew, if there's saltstack support in foreman, there aren't any docs on it. It was proposed at the May 2013 meeting, but I don't see any updates.
22:08 forresta except for this, lol http://projects.theforeman.org/issues/3732
22:09 torrancew forresta: I said, they're *open* to it :)
22:09 forresta yea
22:09 torrancew not "It totally works" :)
22:09 forresta lol
22:10 forresta I'm just gonna keep blaming redhat for forcing a config management system, instead of allowing 'plug and play'
22:10 torrancew I've heard gwmngilfen express interest in it a bit
22:10 torrancew ya
22:10 pipps_ joined #salt
22:11 moos3 anyone have away to auto add keys, for example, i'm trying to automate aws scaling with node registration and deletion of keys
22:12 forresta moos3, not in a secure way as far as I know, you could always set salt to accept all keys periodically on a cron or something
22:12 frosty996 moos3: salt-cloud
22:13 renoirb hi guys
22:13 forresta frosty996, does that support auto-joining the machine to the salt master?
22:13 frosty996 forresta: yep
22:13 moos3 salt-cloud, I'm using aws's autoscaling, and I want the node to come up, and pull down everything it needs and start nginx and be done
22:13 renoirb is there a way to know via grains what is the name of the master?
22:13 forresta frosty996, oh nice, haven't messed with salt cloud much
22:13 frosty996 forresta: am using it to build out a private cloud at rackspace now, it's handy
22:13 forresta frosty996, very cool
22:14 frosty996 moos3: then I'm not sure how to solve that...
22:14 JasonSwindle frosty996:  That is cool.  Are you a Racker? :)
22:14 C5E3B7BDF99A4 left #salt
22:14 moos3 yea i'm thinking i'm going to have to write something custom
22:14 ajw0100 joined #salt
22:15 frosty996 forresta: yah, it's actually mostly puppet based with salt being used for remote exec and for generating and placing puppet's keys on the instance
22:15 forresta renoirb, https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1316
22:15 frosty996 JasonSwindle: negative, I am a consultant for a rackspace customer
22:15 renoirb oh! nice!
22:16 JasonSwindle Ah ok.  Cool.  A lot of Rackers are in here.  I am one.
22:16 frosty996 JasonSwindle: awesome!
22:16 forresta don't trust JasonSwindle frosty996, he's shifty
22:16 frosty996 :-)
22:16 JasonSwindle <_<
22:16 forresta see
22:16 zandy joined #salt
22:17 forresta moos3, so why do you have to do the scaling from AWS, as opposed to using Salt to do so via salt-cloud?
22:19 moos3 because if the service gets a massive spike at 2am, I dont want to wake up and make it scale :D
22:19 forresta Pssh, then what are you gonna be doing at 2 AM? Sleeping??
22:20 forresta moos3, in reality though, if you write something cool like that, please bring that back, or create an issue to get it put into salt-contrib (which might be the wrong place, but still)
22:20 forresta as that would be cool
22:20 jrdx joined #salt
22:20 moos3 k
22:20 frosty996 moos3: does amazon support firing off some script after the instance is launched?
22:21 moos3 it does
22:21 forresta I was just going to bring up does the aws api support hooking BACK into the salt master, so you could fire off the event from aws, to salt-cloud, and then back to aws frosty996.
22:21 moos3 I have it firing off one script now on boot up of the images
22:21 moos3 ok
22:21 moos3 i'll play with that tonight
22:22 forresta cool
22:22 frosty996 I was wondering if that was possible myself
22:22 forresta I feel like that would be easy if you could just say 'oh shit traffic is high! Salt-cloud I am sending you a signal to build a box!'
22:23 jcockhren forresta++
22:23 forresta jockhren, have you done that?
22:23 jcockhren close. I have one blocker
22:23 forresta time :P
22:23 forresta *?
22:23 frosty996 salt-cloud is definitely the awesome. I wish we had started using it sooner.
22:24 jcockhren well... 2 blockers
22:24 jcockhren lol
22:24 forresta lol
22:24 frosty996 that's def my most common blocker!
22:24 zooz frosty996, ec2 instances have cloud-init by default
22:24 jcockhren other than time, I need a way to use salt as a webhook
22:24 forresta do you have what you're working on in a repo somewhere jcockhren? Maybe moos3 can take a look at that if he wants to explore doing it that way.
22:24 moos3 that would be really helpful
22:25 frosty996 zooz: so, similar to openstack then
22:25 forresta whoever was looking for redbeard2 in here, I just realized that is techhat
22:25 zooz frosty996, yeah, most of the EC2 APIs are Openstack compatible
22:26 zooz especially the metadata API
22:26 frosty996 moos3: if you can't get a callback to salt-cloud, you could probably whip up some sort of web API that uses pre-shared keys to kick off the salt-key -a <minion_id>
22:26 mikef joined #salt
22:27 frosty996 presumably you're kicking these guys off from an image?
22:27 jcockhren moos3, forresta: it's not that complex. I just have my states and pillar to provision boxes as needed. I just don't want to have to type in the salt-cloud command manually.
22:27 moos3 jcockhren yea
22:27 forresta jcockhren, oh so are you planning on firing it as an event though?
22:27 jcockhren like take an alert from newrelic and have a salt event cause modsaltcloud do something
22:27 forresta exactly
22:27 frosty996 oh nice!
22:28 jcockhren that'll also allow for automating site deployments (from a ci for instance)
22:29 redondos joined #salt
22:29 redondos joined #salt
22:29 jcockhren so.... I may just do that
22:30 forresta jcockhren, right but how are you planning on overcoming the web hook issue
22:30 forresta I mean in 90% of instances it seems much easier/faster to just shoot a command off to salt-cloud, which then connects back in and builds out the instance, than to somehow hook aws directly into salt after the box is built to join it up and run the highstate.
22:31 jcockhren salt-api
22:31 forresta yea but you're not gonna do that with a single command :P
22:31 SlickNik left #salt
22:32 cnelsonsic joined #salt
22:33 forresta moos3, the only other way I can think to do it, would be to run a job that runs on the minion and stores the minion key data, then connects over to the master (assuming the minion was ready to accept a salt build), compares the key against keys that are trying to be accepted, and then forces the salt master to accept, then runs the highstate.
22:33 jcockhren hmmmmmmm...
22:34 forresta but I don't really like that idea, as it adds more steps to the post install that aren't salt based.
22:35 jcockhren man... look
22:35 forresta ?
22:36 jcockhren I want to be able to communicate and control salt remotely AND programmaitically
22:36 Gareth woo. network module works on Ubuntu 10.04.
22:37 forresta did it not before Gareth?
22:37 Gareth forresta: hadn't tested it before :)
22:37 forresta oh ok
22:38 forresta I thought the module was OS agnostic for the most part and it was just the state which was an issue.
22:38 Gareth It only worked on Red Hat machines.  I submitted a pull request last night for Debian/Ubuntu machines.
22:38 forresta the module only worked on redhat machines??
22:38 Gareth yeah. rh_ip.py
22:38 jfzhu_us joined #salt
22:39 forresta oh I was talking about https://github.com/saltstack/salt/blob/develop/salt/modules/network.py
22:40 kermit joined #salt
22:40 Gareth forresta: ahh. yeah. I misspoke :) i meant the module for managing the network configuration.
22:40 forresta ahh gotcha
22:40 forresta so did you add a new module?
22:40 Gareth yeah.
22:41 forresta which one?
22:41 forresta your user/name isn't pulling on github for some reason
22:41 Gareth my PR hasn't been merged yet...but it will be debian_ip.py
22:42 diegows joined #salt
22:42 forresta ahh no wonder I didn't see it
22:42 jcockhren forresta: I'm going to have to add my own salt-cloud specific web thingy
22:42 forresta jcockhren, better get to it then :P
22:43 forresta Gareth, Did you pull any of this from existing code?
22:43 forresta Gareth, quite a lot of lines
22:43 jcockhren some sort of listener that can recieve stuff, auth and execute a module
22:44 forresta Gareth, and also, are you planning on adding unit tests?
22:44 forresta jcockhren, yea that would make sense.
22:44 jcockhren or just emit a signal
22:44 Gareth forresta: Yeah. There was a lot borrowed from the rh_ip.py module.
22:44 forresta Gareth, yea but a good chunk of the stuff you're using isn't in rh_ip either
22:45 Gareth forresta: the network configs between RH and Debian are quite different.
22:45 forresta Gareth, yea I know, that's why I was curious if you just went out and found all this, lol
22:46 BrendanGilmore joined #salt
22:46 forresta Gareth, this is cool, puts it well on the way to the network state actually supporting ubuntu, which would be sick
22:47 frosty996 btw, on an unrelated topic, if any of you folks admin PostgreSQL servers, there's an update today that fixes 3 data corruption bugs, 1 of which is in all 9.x versions: http://www.postgresql.org/about/news/1492/
22:51 elfixit joined #salt
22:52 frosty996 Is there a --highstate switch somewhere in salt-cloud? I'd love to have it call the highstate at the end of the setup process.
22:53 anitak joined #salt
22:53 mikef__ joined #salt
22:54 [diecast] joined #salt
22:54 renoirb What is the recommendation for managing DNS?  Should I have a zone file with file.managed, or it might cause me problem when I want to add entries later down the road?
22:56 Gareth renoirb: managing zone files?
22:57 renoirb I am creating a zone file to use in bind9.  I thought of using it to have an internal DNS for my nodes
22:57 renoirb Gareth: ^
22:58 renoirb I think I'll stash the idea and continue rely on hosts file. I thought of squeezing this feature while re-deploying.
22:59 bhosmer joined #salt
22:59 renoirb I'll have a look on the idea later, thanks Gareth
22:59 Gareth renoirb: I started using Salt to manage the zone files on home DNS servers, pretty easy setup.  I'll toss the states in a gist if you want to check it out.
23:00 thelorax123 joined #salt
23:00 renoirb Thanks Gareth!  I thought it is easy enough to do too. But now my VM always gets its /etc/resolv.conf changed and it blocks me. I should investigate later about it.
23:00 frosty996 yay! finally googled up a salt mine in state example: http://developer.rackspace.com/blog/marconi-and-salt-part-3.html
23:02 forresta renoirb, don't try to squeeze in stuff like that this late in the day :P
23:03 renoirb forresta: that's exactly what I had in mind.   I have still lots of other machines to migrate before that!  Focus!
23:03 forresta frosty996, I really need to update those docs, I have an open issue on them, just haven't messed with salt mine enough to know what's up
23:03 forresta renoirb, yea exactly haha
23:04 frosty996 forresta: :-)
23:04 forresta frosty996, if you wanna provide some simple/complex examples: https://github.com/saltstack/salt/issues/6655
23:05 frosty996 forresta: I might.  I want to write up a basic pgbouncer state
23:05 forresta that would be cool
23:06 forresta even if you just have the state available somewhere where it's not exposing private data, it could be used as an example
23:06 frosty996 yah, I still have to write it, but I need it for something next Thursday, so will get on it tomorrow and monday
23:07 forresta awesome
23:16 heewa left #salt
23:16 zandy joined #salt
23:18 fllr joined #salt
23:18 zandy_ joined #salt
23:18 rojem joined #salt
23:19 brendangilmor joined #salt
23:22 seanz left #salt
23:23 sroegner joined #salt
23:26 Gifflen joined #salt
23:28 renoirb Gareth: do you have a gist available on how you manage your zone files
23:28 renoirb ?
23:29 Gareth renoirb: let me post one.
23:32 Gareth renoirb: https://gist.github.com/garethgreenaway/7816101
23:32 renoirb Oh that's nice! (reading...)
23:34 KyleG1 joined #salt
23:36 renoirb well done Gareth. It is not exactly what I tried to achieve: I thought of finding a way to query all salt-minions, get their name and internal IP. Then build a local zone. Then making sure resolv.conf is using that DNS server.
23:38 KyleG joined #salt
23:38 KyleG joined #salt
23:40 Gareth renoirb: thanks.
23:41 foxx joined #salt
23:47 alunduil joined #salt
23:54 anitak joined #salt

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