Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-11-13

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

All times shown according to UTC.

Time Nick Message
00:00 pentabular left #salt
00:01 Gifflen joined #salt
00:12 teebes joined #salt
00:13 shuss joined #salt
00:13 CheKoLyN joined #salt
00:15 Drawsmcgraw1 joined #salt
00:20 mafrosis joined #salt
00:20 mafrosis lo salters
00:20 mafrosis I don't suppose anyone has a simple explanation of how I would use an esky build of salt? I dont really follow what it's all about
00:21 mafrosis salt.modules.saltutil.update says "This feature requires the minion to be running a bdist_esky build."
00:27 teebes joined #salt
00:33 kblock joined #salt
00:37 robinsmidsrod joined #salt
00:38 UtahDave mafrosis: an esky build is a completely stand alone "frozen" build of Salt that doesn't depend on your system packages.
00:39 KyleG https://github.com/saltstack/salt/pull/7678 this really upsets me. :\
00:39 KyleG I wish to send some of my dogs shit to basepi, anybody got his office address?
00:41 KyleG Ah crap, he works for salt. Well nvm then. I don't want to affect you other guys. :)
00:41 bhosmer joined #salt
00:41 teebes joined #salt
00:41 zandy joined #salt
00:41 UtahDave why are you mad about that, KyleG?
00:41 jslatts joined #salt
00:41 KyleG Because it broke my configuration….
00:42 KyleG My minions would start, but not communicate with the master and it made me scratch my head
00:42 mafrosis UtahDave: should I be using on of those?
00:42 KyleG Had to trace it down a little more than I wanted to, lol.
00:42 mafrosis This esky thing has been on my "figure out what it is and if I should be using it for a while now"
00:42 KyleG .
00:42 heewa How do I reference an issue in a pull request correctly?
00:44 EugeneKay "#123" will usually do it on github
00:44 heewa EugeneKay: Thanks!
00:44 heewa UtahDave: Ok, got a fix that's working for me, and it's pretty simple so it seems to make sense: https://github.com/saltstack/salt/pull/8469
00:44 zakm joined #salt
00:47 mafrosis UtahDave: presumably I would need to build my own esky install of salt for my target machines
00:47 mafrosis well at least I think that's how it works ;O
00:47 zakm hey folks, hoping someone can help wiht a grains.get scenario.. I am looking to fetch a grain dynamically, via the value of another grain.
00:47 zakm example grains
00:47 zakm ip_interfaces: {'bond0': ['...'], 'bond1': ['...'], 'bond2': ['...']}
00:47 zakm active_interface: bond1
00:48 zakm say i wanted the ip for bond1 .. salt['grains.get']('ip_interfaces:{{ salt['grains.get']('active_interface') }}' }}
00:49 mafrosis zakm: think you'd need to write a custom grain
00:49 zakm i guess i need to specify the dict key dynamically
00:49 mafrosis you certainly could do it that way, anyway
00:50 mafrosis return __salt__['grains']['ip_interfaces'][ __salt__['grains']['active_interface'] ]
00:51 mafrosis or something :p
00:51 zakm ok ,thanks will take a poke at it
00:58 ninkotech joined #salt
00:59 bemehow joined #salt
00:59 Drawsmcgraw joined #salt
01:00 scott_w joined #salt
01:06 ninkotech joined #salt
01:07 UtahDave heewa: thanks!
01:12 ajw0100 joined #salt
01:13 shuss left #salt
01:13 nicksor joined #salt
01:14 anitak joined #salt
01:15 nicksor left #salt
01:16 nicksor joined #salt
01:16 nicksor left #salt
01:20 Nexpro1 joined #salt
01:20 jhulten joined #salt
01:21 chutzpah joined #salt
01:21 chutzpah joined #salt
01:21 ninkotech joined #salt
01:21 Linz joined #salt
01:26 halfss_ joined #salt
01:27 zandy joined #salt
01:35 thelorax123 joined #salt
01:35 forrest joined #salt
01:37 pipps joined #salt
01:39 zandy joined #salt
01:39 deepakmd_oc joined #salt
01:40 bhosmer joined #salt
01:40 oz_akan_ joined #salt
01:49 DanGarthwaite joined #salt
01:50 Drawsmcgraw joined #salt
01:51 jacksontj joined #salt
01:51 ninkotech joined #salt
02:07 AdamSewell joined #salt
02:09 Linz joined #salt
02:10 zandy joined #salt
02:10 zandy joined #salt
02:10 jacksontj joined #salt
02:11 zandy joined #salt
02:15 anitak joined #salt
02:19 Boohbah left #salt
02:20 franky_ joined #salt
02:21 halfss__ joined #salt
02:22 oz_akan_ joined #salt
02:22 ninkotech__ joined #salt
02:22 halfss__ Hi, is there anyway to generate a random str in pillar?
02:24 Corey halfss__: Dare I ask what you're trying to do?
02:24 xl1 joined #salt
02:25 danielbachhuber joined #salt
02:26 halfss__ Corey: i want use pillar to manage many db password, but i do not want to write password one by one
02:27 forrest as far as I know you can't do that halfss__
02:27 forrest at least not in any way that makes sense
02:29 scott_w joined #salt
02:29 halfss__ got it, this feature can do in chef
02:29 Corey Well you COULD, but it would make no sense. You'd wind up with a new password every time pillar refreshed.
02:29 forrest Corey yea
02:29 forrest there's no way to store it
02:29 Corey I'd generate the contents of the pillar via script or similar, then it's static.
02:30 pears if you used a py-rendered pillar you could generate a password using the minion ID as the input to a hash
02:30 pears plus some other stuff ideally
02:30 pears not the best security though
02:30 honestly doesn't salt have a password generator thingy?
02:30 Corey I'm looking at the OpenSSL cookbook that does this in Chef. It's... kinda horrible.
02:31 Corey honestly: Why would you want it to? :-)
02:31 honestly where it writes a random string if it hasn't been written yet?
02:31 Corey There are tools that generate passwords already.
02:31 halfss__ Corey: thanks
02:31 halfss__ I'll use python to manage pillar
02:36 ebodine joined #salt
02:37 anitak1 joined #salt
02:41 ebodine1 joined #salt
02:43 thelorax123 joined #salt
02:46 Drawsmcgraw1 joined #salt
02:58 AdamSewell joined #salt
02:59 marcinkuzminski joined #salt
02:59 marcinkuzminski joined #salt
02:59 marcinkuzminski joined #salt
03:00 marcinkuzminski joined #salt
03:01 marcinkuzminski_ joined #salt
03:02 marcinkuzminski joined #salt
03:02 marcinkuzminski joined #salt
03:03 marcinkuzminski joined #salt
03:04 marcinkuzminski joined #salt
03:04 kuffs joined #salt
03:05 kuffs left #salt
03:13 Drawsmcgraw joined #salt
03:19 ravibhure joined #salt
03:20 xl1 joined #salt
03:22 Furao joined #salt
03:27 davet joined #salt
03:30 scott_w joined #salt
03:39 cbloss joined #salt
03:39 Baribal__ joined #salt
03:43 Katafalkas joined #salt
03:51 Drawsmcgraw1 joined #salt
04:07 anuvrat joined #salt
04:07 thelorax123 joined #salt
04:12 patrek joined #salt
04:20 davet joined #salt
04:28 drags joined #salt
04:30 scott_w joined #salt
04:42 jimallman joined #salt
04:45 dvogt joined #salt
04:50 junedm joined #salt
04:52 Katafalkas joined #salt
04:53 Katafalkas joined #salt
04:59 Katafalkas joined #salt
05:03 dh__ joined #salt
05:15 Drawsmcgraw joined #salt
05:16 smccarthy joined #salt
05:17 lemao joined #salt
05:31 zandy joined #salt
05:31 scott_w joined #salt
05:38 Drawsmcgraw1 joined #salt
05:48 matanya joined #salt
05:52 zandy joined #salt
05:56 matanya joined #salt
05:57 Destro joined #salt
05:57 dh joined #salt
05:59 junedm left #salt
06:03 Baribal joined #salt
06:07 halfss__ Hi, if i have a group could i get the index of the minoin in the group?
06:12 bhosmer joined #salt
06:14 jalbretsen joined #salt
06:15 Drawsmcgraw joined #salt
06:18 Katafalkas joined #salt
06:24 IJNX joined #salt
06:25 middleman_ joined #salt
06:30 linjan_ joined #salt
06:32 Katafalkas joined #salt
06:32 scott_w joined #salt
06:35 Katafalk_ joined #salt
06:38 Linz joined #salt
06:45 Lukin joined #salt
06:47 danieljn joined #salt
06:48 Lukin left #salt
06:49 Katafalkas joined #salt
06:53 Lukin joined #salt
06:55 Ryan_Lane joined #salt
06:57 Lukin Hello! Can someone help me out with a problem? I am trying to put a requirement from the npm states to the packages state, but it won't work. https://gist.github.com/mattias-lw/7444790
07:07 slav0nic joined #salt
07:13 Corey Lukin: Define "won't work"
07:15 carlos joined #salt
07:16 Lukin Corey: hmm, Got an error before, but not anymore. Must have made a spelling mistake or something..Thanks anyway...
07:18 lemao joined #salt
07:19 pdayton joined #salt
07:20 Drawsmcgraw left #salt
07:21 micah_chatt joined #salt
07:23 Katafalkas joined #salt
07:25 druonysus joined #salt
07:25 druonysus joined #salt
07:25 Katafalkas joined #salt
07:33 scott_w joined #salt
07:33 juasiepo joined #salt
07:41 \ask joined #salt
07:55 balboah joined #salt
08:07 giantlock_ joined #salt
08:09 harobed joined #salt
08:09 thelorax123 joined #salt
08:12 xerxas joined #salt
08:36 hvn joined #salt
08:37 hvn left #salt
08:44 kadel joined #salt
08:48 kpostrup does anyone have experience in using git backend for salt states for large setups?
08:49 kpostrup i want to use different branches for different environments. But from what I can read, I will need a completely different tree in the master branch, to suit a "base" environment
08:59 NV use multiple repos?
08:59 Ixan i've setup multiple repos to solve that issue. one repo per network zone, i.e., dev test production, which are managed by different people
09:01 tty-1 joined #salt
09:04 ranl joined #salt
09:06 bezaban hmmm.. do I push dhcp setup to all clients and use static leases with DNS update, or just simply generate internal DNS from salt data
09:06 ranl Hi Guys, did someone had an issue with mine and salt 0.17.1 ?
09:08 bezaban With the second option I don't get problems if dhcp fails, but a tiny bit more work when setting up new machines.
09:13 ravibhure1 joined #salt
09:15 kpostrup Ixan, by using multiple repos, do you then clone them locally on the salt master and access them using file_roots back-end?
09:19 lemao joined #salt
09:20 ajw0100 joined #salt
09:25 Ixan kpostrup: no, use the gitfs backend. setup your repos and serve them with git-daemon
09:27 zloidemon joined #salt
09:39 harobed_ joined #salt
09:44 Furao_ joined #salt
09:50 BbT0n joined #salt
09:51 bemehow joined #salt
09:57 IJNX joined #salt
10:04 bemehow joined #salt
10:06 bemehow_ joined #salt
10:07 fatbox joined #salt
10:08 bhosmer joined #salt
10:09 harobed joined #salt
10:10 harobed joined #salt
10:11 harobed joined #salt
10:12 harobed joined #salt
10:12 harobed joined #salt
10:13 harobed joined #salt
10:15 harobed joined #salt
10:21 harobed joined #salt
10:21 lemao joined #salt
10:22 harobed joined #salt
10:23 hazzadous joined #salt
10:35 whiskybar joined #salt
10:36 joehh joined #salt
10:55 zandy joined #salt
10:56 deepakmd_oc joined #salt
10:57 sroegner joined #salt
11:09 the_drow joined #salt
11:10 the_drow How do I trigger a south schemamigration every time git pulls new code?
11:12 _ikke_ That's not something you can do with git
11:12 _ikke_ the_drow: perhaps the post-merge is the best you can get
11:13 _ikke_ the post-merge hook*
11:13 the_drow I want to do it with salt
11:13 giantlock_ joined #salt
11:14 the_drow Right now I'm creating a vagrant box that contains the development database and it should migrate the model changes every time the code changes.
11:15 _ikke_ Perhaps you should use a deploy tool instead
11:16 the_drow _ikke_: Maybe...
11:19 the_drow _ikke_: Can't I just watch on the git part?
11:19 zandy joined #salt
11:29 bhosmer joined #salt
11:33 _ikke_ the_drow: That's not what salt does
11:52 dangerousbeans joined #salt
11:52 dangerousbeans Salt community, awaken! I have n00b questions
11:53 dangerousbeans This works:     salt '*' rvm.install
11:53 dangerousbeans but I want to define it as a state
11:53 dangerousbeans base:
11:53 dangerousbeans '*':
11:53 dangerousbeans - rvm.install
11:53 dangerousbeans this does not work :C
11:55 _ikke_ dangerousbeans: As far as I know, you have to split it up. Your top.sls defines what states belong to what minion, the specific statefiles define the actual state
11:57 harobed joined #salt
11:57 dangerousbeans okay so I'm using this guy: https://github.com/saltstack/salt-states
11:57 mike251 joined #salt
11:58 harobed joined #salt
11:58 * mike251 hi all
11:58 dangerousbeans which has inside the /small/ruby/ folder
11:59 dangerousbeans an dvm thing
11:59 dangerousbeans *rvm
11:59 dangerousbeans here: https://github.com/saltstack/salt-states/blob/master/small/ruby/rvm.sls
11:59 dangerousbeans which is what I want to run I guess but I'm getting lost
12:00 dangerousbeans so I tried: base:
12:00 dangerousbeans '*':
12:00 dangerousbeans - small.ruby.rvm
12:00 dangerousbeans which produces: Comment:   No states found for this minion
12:02 apergos joined #salt
12:02 viq dangerousbeans: you downloaded the file you linked to?
12:02 dangerousbeans viq: yeah I've checked out that entire repo and modified the top.sls file
12:03 dangerousbeans and then loaded that sucker onto my salt master
12:03 viq dangerousbeans: can you paste somewhere how you modified it?
12:03 viq dangerousbeans: also, do you have this file verbatim? What is the OS you're trying to run this against?
12:04 giantlock_ joined #salt
12:05 dangerousbeans viq: http://pastebin.com/dxcB6yUq
12:05 dangerousbeans Ubuntu Server 12.04 LTS
12:05 dangerousbeans (minion + master)
12:06 viq dangerousbeans: 1) no include in top.sls. 2) - small.ruby.rvm not rvm.rvm. 3) that state specifies ubuntu 10.04, you have to change that
12:07 dangerousbeans changed to:
12:07 dangerousbeans base:
12:07 dangerousbeans '*':
12:07 dangerousbeans - small.ruby.rvm
12:08 dangerousbeans Comment:   No states found for this minion
12:08 dangerousbeans :C
12:08 dangerousbeans what's confused me a bit is inside the /small/ruby/rvm.sls
12:08 dangerousbeans there's a bunch of sub...things
12:08 dangerousbeans like I don't want to install *all* of that, just one ruby or something
12:09 dangerousbeans in my top.sls, how do I define that?
12:09 dangerousbeans </noob>
12:09 viq dangerousbeans: where did you put the rvm.sls file?
12:09 tty-1 joined #salt
12:09 viq dangerousbeans: you don't, you modify the sls file
12:10 dangerousbeans viq: it's in /srv/salt/small/ruby
12:10 viq dangerousbeans: and did you modify that file?
12:10 dangerousbeans nope, vanilla
12:11 dangerousbeans but it has not installed ruby-1.9.2 which is defined in there
12:11 viq dangerousbeans: then it has no way of working on your system
12:11 viq dangerousbeans: {% if grains['os'] == 'Ubuntu' and grains['osrelease'] == '10.04' %}
12:11 dangerousbeans OH
12:12 viq You need to change that line for it to be able to match your system
12:12 pentabular joined #salt
12:12 dangerousbeans so the nested sls files are just applied in full, they're not a collection of state 'functions'
12:12 dangerousbeans that's where I was getting confused
12:12 dangerousbeans I thought you were meant to summon the .sls file from the top one, and then select which part of it you wanted to use
12:12 dangerousbeans (I used to use chef)
12:13 pentabular ahhhhhh! :)
12:14 dangerousbeans okay now it's off installing all kinds of rubiez
12:14 dangerousbeans THANKS :D
12:14 viq dangerousbeans: well, there may be functions inside the sls files, but you load a file, and insides happen. If you did not do some magic inside (like was done in the one you pasted) to limit what happens, everything happens
12:15 elfixit joined #salt
12:15 dangerousbeans Okay awesome. So my next question is if I wanted to make sure the minion ran apt-get update/upgrade before everything else, how would I do this?
12:15 dangerousbeans make an 'update_apt.sls' file?
12:15 viq dangerousbeans: well, usually most things that ask it to touch apt will make it run apt-get update
12:16 viq As for upgrade... If you want that, yeah, you could do an upgrade state
12:16 dangerousbeans viq: alright thanks. Slowly getting it
12:25 narekb joined #salt
12:28 gasbakid joined #salt
12:35 tty-1_ joined #salt
12:37 the_drow How do I configure postgres to listen to an IP using salt?
12:38 viq the_drow: drop it a (templated) configuration file ?
12:38 the_drow viq: I hoped there was a better way :P
12:39 viq Well, how would you normally do it with postfix, if salt was not involved?
12:40 viq Honest question, I don't know postgres that well
12:40 halfss joined #salt
12:41 the_drow viq: I'd edit /etc/ manually :P
12:41 the_drow No idea what postfix is
12:41 viq the_drow: postfix? smtp server
12:41 viq the_drow: well, now you can use salt to edit it for you ;)
12:41 the_drow Oh, I was talking about postgres
12:42 viq Argh, typo on my part, I was thinking postgres, wrote postfix :P
12:42 the_drow Got a link to a toturial that explains how to do it
12:42 viq mental tab completion error :P
12:42 the_drow lol
12:43 viq Share the link? ;)
12:43 hvn joined #salt
12:43 the_drow There was supposed to be a question makr
12:44 narekb left #salt
12:44 hvn hi all, I found that `round` and `int` of jinja2 does not work as expect, is this consider a bug? http://pastebin.com/dqtZM8SW
12:44 the_drow s/makr/mark
12:45 viq the_drow: well, http://www.postgresql.org/docs/9.1/static/runtime-config-connection.html and have salt deploy the config file and restart postgres when the file changes
12:46 the_drow viq: How exactly?
12:47 xl1 left #salt
12:47 joehh the_drow: what is your experience with salt? have you used file.managed in a state file?
12:47 the_drow joehh: Yup, but I never tried to template one
12:48 viq the_drow: combination of file.managed and service states
12:48 viq the_drow: well, if you know the IP address, you can hardcode it
12:49 viq http://docs.saltstack.com/ref/states/all/salt.states.file.html has examples of templating. You could get the data either from asking salt directly for IPs machine has, or eg put it in a pillar
12:49 joehh the_drow: viq beat me to it! :)
12:50 viq :P
12:50 joehh can you see the defaults and context "chunk"?
12:50 joehh They provide values that can be accessed in your template
12:51 joehh so you could do defaults:\n - listen_addresses: the ip addresses you care about
12:51 the_drow Oh right
12:51 the_drow Thanks
12:51 joehh and then in your template use listen_addresses = '{{context['listen_addresses']}}'
12:52 joehh but I'm rusty on the context bit
12:52 joehh need to check the jinja template docs
12:52 the_drow joehh: How do I specify which file to use? I'm not using a master
12:53 the_drow joehh: I mean I know I should use source but it seems that I can't use a relative path.
12:53 joehh so you are using salt-call?
12:54 joehh from memory anything salt:// will be relative to /srv/salt on the local machine
12:54 the_drow joehh: I'm using vagrant
12:55 joehh I'm not familar with vagrant
12:55 joehh regarding my rustyness from before: http://docs.saltstack.com/ref/renderers/all/salt.renderers.jinja.html#passing-variables
12:56 joehh back to most recent q, pretty sure it will be relative to /srv/salt
12:56 viq joehh: it will, saw some people use that and comment it is
12:56 viq the_drow: well, how are you using it in vagrant?
12:57 viq the_drow: because so am I. I am using vagrant to set up a master, and then 4 more machines slaved to that master
12:57 the_drow viq: I am using it masterless. Got it :)
13:02 viq Bah. I managed to make salt add ssh keys for users, but I can't make it remove them
13:02 blee joined #salt
13:02 bhosmer joined #salt
13:07 joeTSUNAMI joined #salt
13:13 the_drow joined #salt
13:13 gasbakid_ joined #salt
13:17 viq huh. http://pbot.rmdir.de/MES5lwIhhM0Oj0k1Y3HMkQ - need full key to add it, but removing works only if only the middle part is present
13:19 anti joined #salt
13:23 hvn left #salt
13:24 anti joined #salt
13:26 anti joined #salt
13:32 mwillhite joined #salt
13:33 the_drow joined #salt
13:34 the_drow Hi guys I have the following stateconf: https://dpaste.de/hSSK
13:34 the_drow For some reason it doesn't set the password
13:35 the_drow When I try to login using pgadmin I get An error has occurred:  Error connecting to the server: FATAL:  password authentication failed for user "postgres" FATAL:  password authentication failed for user "postgres"
13:36 the_drow Does anyone know what's wrong?
13:39 markm joined #salt
13:39 hazzadous on 0.17.1 here trying to use publish but getting KeyError: master_uri in "/usr/lib/pymodules/python2.7/salt/modules/publish.py", line 53, in _publish.  Anyone else experience this?  happens with salt-call on the minion and when run from the master.
13:40 ipmb joined #salt
13:40 the_drow I just used psql to set it manually and it works.
13:41 the_drow Could it be a bug?
13:41 mike251 i have a stupid Q myself : http://pastebin.com/prUPq8qe     how can i add the pillar data from a file in a subdir ?
13:42 cron0 joined #salt
13:43 joeTSUNAMI joined #salt
13:43 ggoZ joined #salt
13:43 Jahkeup mike251: you may be able to watch: - git: reponame, not sure though
13:44 Jahkeup whoa
13:44 Jahkeup that was bizzare sorry mike251
13:46 gildegoma joined #salt
13:47 brianhicks joined #salt
13:49 mike251 Jahkeup: i just want to ... put the pillar files into a sub-folder.... is that possible?
13:50 ktenney joined #salt
13:52 jetblack joined #salt
13:55 joehh the_drow: just a guess, but do you need to set anything in pg_hba.conf
13:55 mike251 how can i put the pillar files into a sub-folder and access it in top.sls ? .... :(
13:55 the_drow joehh: Umm I have a record there and it is able to connect after I change it manually
13:56 danielbachhuber joined #salt
13:57 the_drow joehh: So that's not the problem
13:57 joehh is it a chicken and egg problem?
13:57 joehh ie you can change it with psql due to pg_hba.conf saying trust for however you've connected
13:57 IJNX does anyone use masterless salt-ssh?
13:57 joehh but salt connects over a socket and so needs to supply a username and password
13:58 gasbakid joined #salt
13:58 the_drow joehh: I am not using a master. It's a vagrant box.
13:58 joehh and as it wants to change it, the password it has is "wrong"
13:58 the_drow joehh: There is no password for the postgres user by default
13:59 joehh yeah - so when you run psql as the postgres user before you set a password, you have to do so with a either a trust/ident connection in pg_hba.conf
14:00 joehh when salt(-call or otherwise) connects, it connects over a socket (which is almost never trusted)
14:01 gasbakid_ joined #salt
14:02 Tekni joined #salt
14:02 the_drow So what do I do?
14:03 the_drow joehh: This is my stateconf: https://dpaste.de/xAZp
14:03 the_drow joehh: It also creates databases using LATIN1 which is not good for me
14:03 the_drow I need UTF8
14:04 dangerousbeans joined #salt
14:05 aleszoulek joined #salt
14:05 scott_w joined #salt
14:06 bhosmer joined #salt
14:06 Furao the_drow: it's a bug in salt
14:06 Furao well that and something else
14:06 Furao postgresql need locale installed
14:06 Furao and configure BEFORE installation
14:07 Furao in my case, as servers install one shot with highstate, we had to hack salt.modules.apt
14:07 juicer2 joined #salt
14:07 Furao but my guy who fixed the bug did a pull request which was accepted by Thomas
14:07 scott_w joined #salt
14:07 the_drow Furao: so it should be on the development version?
14:07 HeadAIX joined #salt
14:08 Furao yes
14:08 mike251 guys do you have 1 sec ? for stupid pillar Q?
14:08 the_drow Furao: I get this when I'm trying to recreate the cluster manually https://dpaste.de/ys8W
14:08 Furao but you need to set environment variable AFTER you installed locale and defined them
14:08 Furao destroy cluster and recreate it
14:09 Furao locale-gen UTF-8 after install some package I don't remember the name
14:09 Furao locales
14:11 the_drow Furao: I manually did what was written in the comment of this post before creating the cluster and I think it works. https://coderwall.com/p/j-_mia
14:11 anti joined #salt
14:12 mgw joined #salt
14:12 Gifflen joined #salt
14:12 the_drow Nope. Now it won't connect
14:13 the_drow Goddamit
14:14 gasbakid joined #salt
14:14 the_drow Furao: Ok, step by step. What do I need to do?
14:15 racooper joined #salt
14:16 mpanetta joined #salt
14:17 willist joined #salt
14:17 sebgoa joined #salt
14:18 mapu joined #salt
14:19 toastedpenguin joined #salt
14:19 giantlock_ joined #salt
14:21 mike251 anyone able to answer me ?
14:23 the_drow Furao: I managed to make it work manually. Right now I'm freezing this into a box and I'll work on it later.
14:25 mike251 http://pastebin.com/JpWndSsd   ... anyone can take a look....?
14:26 mike251 i am trying to figure out the best option in managing pillar data for minions.
14:26 mike251 can anyone suggest ?
14:27 mike251 http://pastebin.com/68pzRfA3
14:27 oz_akan_ joined #salt
14:28 tty-1_ joined #salt
14:29 holmb mike251: That is a matter of taste and what works the best when you get more pillar data than what you have in your example.
14:29 holmb I usually use the second example.
14:29 mike251 yeah holmb ... i will have around 100 minions..
14:30 holmb Oh I think I understand now what you want....
14:30 mike251 holmb:  to centralize a bit the pillar data for all minions...
14:30 Khollowa_ joined #salt
14:30 joehh the_drow, Furao: can you get what you need via cmd.wait and a script?
14:30 holmb If you have pillar data that will have a counter (as in your example) then you can use the forloop functionality in jinja.
14:31 the_drow joehh: I'm lost so I have no idea. I spent all day making this work. It's packaged but recreating it won't be easy.
14:32 mike251 holmb: do you have an example? i will have 100 minions with more or less different data
14:33 holmb mike251: Not at hand, no.
14:33 holmb http://jinja.pocoo.org/docs/templates/#for
14:33 joehh the locale part I don't know about, but could you write a script to set pg password initially then once it is set, salt can manage
14:33 joehh you put the script into place with file.managed
14:33 DredTiger joined #salt
14:33 joehh then run it using cmd.wait with runas: postgres or similar
14:33 mgw joined #salt
14:34 holmb mike251: There are tons of examples at https://github.com/saltstack-formulas
14:35 mike251 thanks holmb !
14:35 holmb np
14:37 AdamSewell joined #salt
14:37 higgs001 joined #salt
14:42 Khollowa_ joined #salt
14:43 quickdry21 joined #salt
14:46 Brew joined #salt
14:51 bemehow joined #salt
14:53 joshe joined #salt
14:59 mpanetta Anyone around?
14:59 jimallman joined #salt
15:00 viq no
15:01 bhosmer joined #salt
15:01 mpanetta hah
15:02 * mpanetta is not having a happy day with salt. :(
15:03 mpanetta Despite using the work around that UtahDave suggested yesterday, salt-cloud is still installing 0.17.1 on all my minions :(
15:03 ravibhure joined #salt
15:08 viq Sorry, I know nothing about salt-cloud
15:09 UtahDave joined #salt
15:09 bhosmer_ joined #salt
15:14 anuvrat joined #salt
15:14 bhosmer joined #salt
15:17 tty-1 joined #salt
15:17 micah_chatt joined #salt
15:20 the_drow Furao: So, do you have the time to walk me through now?
15:24 mwillhite joined #salt
15:24 mpanetta UtahDave: Good morning!
15:25 UtahDave mpanetta: morning!
15:26 jergerber joined #salt
15:26 mpanetta UtahDave: So, I have bad new unfortunately :(
15:26 mpanetta *news
15:27 mpanetta UtahDave: the script_args thing gets passed down properly, but apparently it is ignored :(
15:27 oliva joined #salt
15:27 thelorax123 joined #salt
15:27 dan_johnsin joined #salt
15:27 mpanetta All my salt-cloud minions are 0.17.1
15:28 jcsp so for development I'm running 48 salt minions and one salt master on my mac mini.  Yeah, I'd say this is reasonably efficient software :-)
15:28 oliva hi there, is it possible to install the operating system with salt?
15:29 forrest joined #salt
15:29 mpanetta oliva: I don't think so, not in any direct manner. The minions need an OS to run on.
15:29 mpanetta You could PXE install your OS and then bootstrap a minion on it perhaps?
15:30 viq Or create VMs, though that still needs some kind of provisioning in place
15:30 jcsp oliva: typically you would use Cobbler/MaaS/etc to provision an operating system, and then the last line of your post-boot script would be to bootstrap the salt minion to take it from there.
15:30 viq cobbler, foreman (which sits on top of cobbler), razor, and whatever else is out there
15:31 viq ah, crowbar is another one I heard of
15:31 amahon joined #salt
15:32 oliva there is also xcat
15:32 mike251 guys what is the diff in jinja between {%-  and {% ???
15:33 forrest {%- doesn't createa a new line
15:33 viq mike251: the one with - removes emty values or whitespace at beginning, I think
15:33 viq oliva: oh, didn't know about xcat
15:33 forrest mike251, http://jinja.pocoo.org/docs/templates/#whitespace-control
15:33 forrest it's about 4 examples down
15:35 mpanetta UtahDave: Have any new suggestions I can try?  I'm stuck on this perf test until I can get a working deployment :(
15:36 tyler-baker joined #salt
15:36 tyler-baker joined #salt
15:38 bemehow joined #salt
15:39 cnelsonsic joined #salt
15:40 jalbretsen joined #salt
15:41 akitada joined #salt
15:42 dangerousbeans Hey I got new questions :D
15:42 smccarthy joined #salt
15:42 dangerousbeans I'm trying to push private keys onto my minions
15:42 dangerousbeans HOW CAN I DO?
15:43 mpanetta dangerousbeans: what kind of keys?
15:43 mpanetta For what?
15:43 mpanetta If it is something like SSH you can just put thefiles
15:44 viq Or pull stuff from pillars, there's even an option to create files from contents of pillars in file.managed
15:44 dangerousbeans mpanetta: yeah ssh keys
15:44 timbobsteve joined #salt
15:44 dangerousbeans okay so just write the files from a template or something?
15:44 timbobsteve Hi All
15:44 mpanetta viq: Ah cool, we just push the .pub files and add them to authorozed_keys I believe.
15:44 dangerousbeans just checking there was no del for it
15:45 dangerousbeans *DSL
15:45 forrest dangerousbeans, you should store keys in pillar, here's an example of users in pillar
15:45 forrest https://gist.github.com/UtahDave/3785738
15:45 oliva thank you all for your help
15:45 viq Oh, for that there is, but you asked about _private_ ketys :P
15:45 dangerousbeans viq: yeah I'm doing sketchy security practices
15:46 viq forrest: here's another ;) https://github.com/viq/cm-lab-salt/tree/users/salt
15:46 dangerousbeans one key to rule them all, one key to bind them
15:46 dangerousbeans forrest: thnx
15:46 dangerousbeans all over it like a wasp on jam
15:46 timbobsteve If I use publish.publish + pillar.get, I get a string value of the dict stored in pillar back, but I was hoping it would return a usable dict. Does anyone know a workaround for this? Trying to use it in a state file
15:46 viq dangerousbeans: https://github.com/viq/cm-lab-salt/tree/users/salt has pubkeys (and users) pulled off of pillars
15:46 alunduil joined #salt
15:47 forrest dangerousbeans, yea np
15:47 dangerousbeans viq: oh yeah I'm already watching your repoz, creepily
15:47 UtahDave mpanetta: Hm. That should be working. I wonder if there is a regression popping up here.
15:48 UtahDave mpanetta: can you pastebin what you're doing again so I can test it here?
15:48 mpanetta UtahDave: sure can
15:48 mpanetta https://gist.github.com/anonymous/b7ae9c2d7d9fd12ec244 <-- this is a typical config in my profiles file.
15:50 mike251 forrest:  thanks buddy!
15:51 forrest yea np
15:51 mpanetta UtahDave: I also can see where it passes the option to the bootstrap script
15:51 mpanetta I guess it just never does anything with it
15:51 zakm hey folks, is it possible to echo variables used in the "state" file during a highstate run?
15:52 zakm say i am assigning a grain/pillar to a context variable..
15:52 zakm and would like to see it in stdout during a highstate for debug purposes.
15:52 Mua joined #salt
15:53 UtahDave zakm: yeah, if you run the minion in the cli
15:53 zakm hey UtahDave , i am executing the highstate from minion cli as such "salt-call state.highstate"
15:53 mpanetta UtahDave: I can try and spin up a single minion and paste you any pertinent output if you need
15:53 zakm i would like to add some extra debug lines into the output.. from a specific state file
15:54 bhosmer joined #salt
15:54 UtahDave mpanetta: try this:     script_args: | git v0.16.4
15:54 mpanetta Ok
15:54 UtahDave zakm: yeah, you add print statements you'll see them at the cli.  I do that every day when testing
15:55 zakm oh :s that sounds easy enough . will give it a whirl
15:55 zakm {% print foo %} ?
15:57 timbobsteve UtahDave: in a gist you wrote (https://gist.github.com/UtahDave/5217462) you show ['publish.publish'].values() being used. Right now I get back strings when publishing "pillar.items"..... is there any way to get back a dict instead?
15:58 bitz joined #salt
15:59 teskew joined #salt
15:59 UtahDave zakm: Oh, wait. Sorry I thought you were building your own python execution module.
15:59 UtahDave that might work, but I haven't tried that.
16:00 davet joined #salt
16:01 halfss joined #salt
16:03 mpanetta UtahDave: Got an error while parsing the map file
16:03 mpanetta https://gist.github.com/anonymous/3aa036684912ef936074
16:03 jergerber joined #salt
16:03 mpanetta Er I mean the conf file for the profiles
16:04 mpanetta not the map file, sorry
16:05 UtahDave mpanetta: OK, let me grab a salt-cloud dev real quick
16:06 kyusan joined #salt
16:07 mpanetta UtahDave: Thanks :)
16:07 UtahDave mpanetta: I was told you might need to add quote around options when using a pipes.    script_args: '| git v0.16.4'
16:08 mpanetta Ah!
16:08 mpanetta Thanks!  I will check that now.
16:10 mpanetta UtahDave: So far so good.
16:10 mike251 hey ... i am looking at the mysql formula.... https://github.com/saltstack-formulas/mysql-formula/blob/master/pillar.example     the LOOKUP definition in the pillar .... is suppose to be overwritten by the MAP.jinja ?
16:10 UtahDave mpanetta: cool!
16:11 UtahDave timbobsteve: have you tried removing the .values()   ?
16:11 forrest mike251, http://docs.saltstack.com/topics/conventions/formulas.html#map-jinja
16:11 viq mike251: the other way around
16:11 forrest mike251, whiteinge updated the docs for that section
16:11 mike251 good... :) viq :)
16:11 deepakmd_oc joined #salt
16:11 forrest The merge keyword specifies the location of a dictionary in Pillar that can be used to override values returned from the lookup table. If the value exists in Pillar it will take precedence, otherwise merge will be ignored.
16:11 mike251 forrest:  i just wanted to double check
16:12 forrest mike251, yea for sure
16:12 mpanetta Ah damn
16:12 mpanetta UtahDave: No dice :(
16:12 GradysGhost joined #salt
16:12 mpanetta https://gist.github.com/anonymous/9a1f4b79e8462dd3caaa <-- deploy fails.
16:12 GradysGhost Good morning, folks
16:12 forrest hey
16:13 GradysGhost I'm looking for some guidance today on establishing state dependencies. For example, in my mind, what I want to do is have some state module called, say, 'foo' and then have another state called 'bar' depend on that 'foo' module.
16:13 mpanetta Oddly, that is the only exception I get...
16:13 pipps_ joined #salt
16:13 mpanetta And it does not reveal much :(
16:13 GradysGhost But I'm having trouble finding documentation about the 'require' term and how it works.
16:13 higgs001 joined #salt
16:14 UtahDave mpanetta: looking
16:14 forrest GradysGhost, how about this example: http://docs.saltstack.com/ref/states/ordering.html#requisite-statements
16:14 forrest the secone example down
16:14 * GradysGhost looks
16:14 forrest talks about where you include the network state, then you require the network sls as part of the httpd service
16:14 GradysGhost Well, what if 'foo' is an arbitrary state and not the name of a package.
16:15 forrest ?
16:15 forrest you just include the state
16:15 forrest then require it
16:15 GradysGhost Although I think I can use that in this particular case
16:15 forrest Can you elaborate further on what you mean though?
16:15 GradysGhost Hrm. Just including causes that state to be perceived as a dependency?
16:15 UtahDave mpanetta: I'm setting up a test here.  You're testing against rackspace cloud, I presume?
16:16 mpanetta UtahDave: Yes sir.
16:16 forrest GradysGhost, basically you're saying 'I want the items from the network state to be available in this state'
16:16 forrest when you do the include
16:16 mpanetta Would it help to know what version of salt-cloud I am using?
16:16 pmcg joined #salt
16:16 UtahDave mpanetta: yeah
16:17 GradysGhost Okay, forrest, thanks. I'll give it a shot. I had assumed that it would just include the state, but not necessarily as part of the dependency tree.
16:17 mpanetta UtahDave: 0.8.9
16:17 forrest when you just use include, it does
16:17 forrest it's just making the items inside of network available
16:17 zandy joined #salt
16:18 forrest unless there was a change ot the mechanism when the state ordering was changed... Do you know UtahDave? When you do an include in 0.17 or later, does it ensure that the included state runs first due to ordering?
16:19 UtahDave yes, includes should be executed first
16:19 mike251 is it safe to save a password in a pillar ? clear text ?
16:19 forrest UtahDave, ok awesome, well there you go GradysGhost
16:19 patrek joined #salt
16:20 forrest so just include, and it should run first
16:20 GradysGhost Sweetness! I'll make sure I've done the updates, write this state out, and give it a check.
16:20 forrest sounds good
16:22 viq mike25ro: as safe as the container. Anyone who can read the file can read the password. But only the machines assigned the pillar can get access to it via salt
16:22 GradysGhost mpanetta: UtahDave: I don't know much about saltcloud, but I might be able to help with Rackspace Cloud issues. I know this isn't the most official place for it, but let me know if there's anything I can do to help with that.
16:22 mpanetta GradysGhost: Thanks for the offer, I think at the moment I am hitting a bug. :(
16:23 mpanetta GradysGhost: Are you a fellow racker? :)
16:23 GradysGhost Indeed
16:23 mpanetta Cool :)
16:23 GradysGhost Former managed cloud support racker
16:23 GradysGhost But they're a Chef shop down there...
16:23 forrest booo
16:23 mpanetta Ah yes.
16:24 GradysGhost agreed
16:24 GradysGhost Took a course on Chef and cringed my way through it.
16:24 GradysGhost I think I'm allergic to Ruby.
16:24 mpanetta haha
16:24 UtahDave mpanetta: OK, I got it.
16:24 mpanetta I like ruby as a language, but it is too slow...
16:24 TheRealBill GradysGhost: Ruby is known to be allergenic. ;)
16:24 dangerousbeans so I'm having a problem with ssh_auth that I wanna run past you before I raise it as a bug
16:24 mpanetta UtahDave: Ok, whats up?  You repro my issue?
16:25 UtahDave mpanetta:   script_args: '-- git v0.16.4'
16:25 mpanetta AH!
16:25 mpanetta Ok
16:25 UtahDave root@boucha:~# salt 'davetest2' test.version
16:25 UtahDave davetest2:
16:25 UtahDave 0.16.4
16:25 dangerousbeans i incorrectly added a key on all my minions as - enc: ssh-aes
16:25 dangerousbeans so I updated the state file to show - enc: ssh-rsa
16:26 dangerousbeans but now it won't change the keys, as it sees them as duplicates
16:26 mike25ro viq thanks
16:26 viq mike25ro: at least that's what the pamphlets say, I didn't dig into the code to verify worst case scenarios ;)
16:27 baffle Is there any big bugs in the Ubunto Precise 0.17.1-2precise that I should know of? I'm having problems with stuff that used to work.. :)
16:27 mike25ro viq:  :) maybe i will :D
16:27 fwiles joined #salt
16:27 UtahDave I'll be in a meeting for a little while. feel free to pm me if something is urgent
16:28 timbobsteve does anyone know any good usage examples of peer and salt-mine ?
16:28 scott_w joined #salt
16:28 baffle As in, context does not seem to be passed to a file.managed?
16:29 mpanetta UtahDave: Thanks!
16:31 mike25ro guys... stupid question: can i put the pillar files into a subdir? like :  /srv/pillar/minions/ ?
16:31 pdayton joined #salt
16:31 viq mike25ro: yup, look at my examples ;)
16:31 timbobsteve mike25ro: Yes, just set your pillar_root in master config
16:31 mike25ro viq:  what examples? ...
16:31 jcockhren mike25ro: inorite
16:31 viq oh, sorry, it was someone else ;) https://github.com/viq/cm-lab-salt/tree/users/salt
16:32 mike25ro timbobsteve: i did that ... but it didn't pick the minions folder
16:32 backjlack joined #salt
16:32 mike25ro thanks viq
16:33 timbobsteve mike25ro: it depends on where your pillar top.sls resides... if it's in /srv/pillar then you need to ensure that you reference files in top.sls as "minion.something"
16:33 timbobsteve "minions.something" *
16:33 timbobsteve so that it knows to look in /srv/pillar/minions/
16:33 dave_den baffle: yes, there is an issue passing dicts via context.
16:33 viq Or, well, in top.sls you could simply have - minions, and then in minions/init.sls have logic on who gets what
16:35 bhosmer joined #salt
16:36 mike25ro timbobsteve:  and viq thanks guys
16:36 mike25ro i tried with minion.something... i might have made a typo... will try also tomorrow :)
16:36 timbobsteve mike25ro: np
16:36 * mike25ro out
16:36 mike25ro left #salt
16:38 jcockhren who's the person I need talk to about adding new formula repos?
16:38 whiteinge jcockhren: yo
16:38 forrest jcockhren, whiteinge
16:38 forrest oh he beat me to it
16:39 jcockhren whiteinge: so that gist from before could be a formula. I'm cleaning it up locally now and will be ready soon
16:40 jcockhren whiteinge: so you don't have to search through IRC logs: https://gist.github.com/jcockhren/7d33ee39479e9a3ee6f4
16:40 whiteinge ty :)
16:41 lineman60 joined #salt
16:41 whiteinge oh, i do remember that gist. awesome!
16:43 RobSpectre joined #salt
16:43 jcockhren whiteinge: later today/tomorrow, there will be a revision up that has better naming for the db backups
16:43 elfixit joined #salt
16:43 whiteinge jcockhren: i added you to the github org
16:44 RobSpectre Got a weird condition with a particular host.  I have a salt-call state.highstate on cron.  When it runs via cron, a particular state file gets fetched but does not get executed.
16:44 whiteinge jcockhren: when you're ready you can transfer the repo
16:44 jcockhren whiteinge: thanks! Will do
16:44 RobSpectre When I run the command on the host by hand, the state file in question does get executed.
16:44 RobSpectre Not sure how best to debug.
16:45 anti_ joined #salt
16:45 viq RobSpectre: with cron my usual first suspects are path, environment
16:45 RobSpectre viq: I thought so as well, but similarly dependent states are executing correctly.
16:46 viq Anything in logs?
16:46 viq RobSpectre: or add to the cron call -l debug and see what happens ;)
16:47 baffle dave_den: Hmm, I am using dicts.. But when I do state.show_sls the file.managed: - context contains the correct values? They just doesn't exist when I try to use them in Jinja.
16:47 RobSpectre viq: I'll give that a try.  Current log shows that the state is getting loaded, but it doesn't look like it is getting executed.
16:48 zandy joined #salt
16:48 dave_den baffle: it's a typing issue. what you are seeing in show_sls is the string representation of the dict. it's getting passed to context as a string, so when you try to use it in the template you are trying to access a string as a dict.
16:49 dave_den it's fixed in develop
16:49 dave_den baffle: i believe it's this commit https://github.com/saltstack/salt/commit/569016820a78661f452da9f567b496ce3fbdb51a
16:49 zandy_ joined #salt
16:50 dave_den or this one: https://github.com/saltstack/salt/commit/1309ef98877b80990acba0a386bbe555882c4649   maybe both :)
16:50 baffle dave_den: Did it happen between 0.17.0 and 0.17.1?
16:50 viq given pillar and state like so http://pbot.rmdir.de/tX8gTf1Fy_cI7-OCK59hvg how would I modify the state to not include users with 'remove: True' ?
16:51 pipps joined #salt
16:51 dave_den baffle: not sure. i assume it was introduced in 0.17.0 with state_auto_order.
16:52 baffle dave_den: I started out on 0.17.0 and now have 0.17.1.. I've had lots of problems with dicts, but I must say I'm not really sure if what I am seeing is the same thing...
16:53 elfixit joined #salt
16:53 timbobsteve dave_den: would the dict bug also affect using pillar.get via publish.publish and trying to use it to render jinja in an SLS?
16:54 dave_den viq: wrap your state in logic with {% if user['remove'] %}?
16:55 heewa RobSpectre: For that kinda stuff, I tend to throw prints into the salt source code on the minion. If that doesn't help, I'll throw in a '1/0' to raise an exception and get a stack trace. Might help.
16:55 dave_den timbobsteve: i think it only affects trying to pass dicts through context, but i am not 100% sure.
16:56 elfixit1 joined #salt
16:56 timbobsteve dave_den: cheers... what kind of errors would I be getting if that was indeed a bug I'm hitting?
16:56 dave_den ausually a jinja undefined variable error on your dict keys
16:57 bhosmer joined #salt
16:57 viq dave_den: ok, will try something like that
16:58 pipps_ joined #salt
16:59 timbobsteve dave_den: hmmm I'm getting ScannerError and it looks like what should be keys/vals in my dict are being passed wholesale to jinja e.g. grains['somevar'] ==  { 'somevar': 'somaval' } instead of "someval"
17:00 timbobsteve is there an easy way to debug jinja on the fly? like put print statements into the Jinja so I can watch what things look like at certain points in rendering?
17:01 dave_den timbobsteve: you can set your logging to 'garbage' and your minion logs will show you the rendered jinja
17:01 timbobsteve ahh ok cheers
17:02 timbobsteve dave_den: tried {% print somevar %} and that works too :P
17:02 UtahDave joined #salt
17:04 kaptk2 joined #salt
17:04 dangerousbeans okay right so, how do you make salt run one sls before another?
17:04 dangerousbeans <face of confusion.png>
17:05 timbobsteve dangerousbeans: I use "require"... but I'm not 100% certain that's the nicest way to do it :P
17:05 micah_chatt joined #salt
17:05 dangerousbeans timbobsteve: yeah this is what I thought but I can't figure out how to get it to work
17:05 dangerousbeans I have a folder called 'users'
17:06 dangerousbeans with a init.sls
17:06 dangerousbeans which I need to run before this other git stuff
17:06 iamacomp joined #salt
17:06 dangerousbeans so do I put - require:
17:06 dangerousbeans - users
17:06 dangerousbeans ?
17:06 timbobsteve nope
17:06 timbobsteve 2 secs
17:06 timbobsteve I'll put something on gist
17:06 dave_den require works on "module: ID declaration"
17:07 * dangerousbeans waits like a desert waits for rain
17:07 vejdmn joined #salt
17:07 elfixit joined #salt
17:07 iamacomp hello
17:07 mwillhite joined #salt
17:07 iamacomp i'm wondering about salt / saltstack / and digital ocean
17:07 dangerousbeans dave_den: so I'd put: - require:
17:07 dangerousbeans - module: users
17:07 dangerousbeans ?
17:07 dangerousbeans iamacomp: hey I used digital oceanz
17:08 iamacomp firstly, I'm a bit confused looking at the saltstack web pages
17:08 iamacomp is saltstack part of salt, or a divergent fork?
17:08 iamacomp i ask, because I've read that salt now supports digital ocean, but does that mean saltstack does as well
17:08 jrdx joined #salt
17:08 timbobsteve dangerousbeans: https://gist.github.com/daviddyball/41096b7a3729387d33c5
17:08 iamacomp or not
17:09 timbobsteve iamacomp: saltstack is the entire grouping of salt-related projects I believe
17:09 dave_den dangerousbeans: just like timbobsteve's gist  :)
17:09 dangerousbeans timbobsteve: THNX
17:09 timbobsteve dangerousbeans: no probs mate
17:09 viq iamacomp: think "saltstack" is the organization, "salt" is the project
17:09 viq iamacomp: basically it's the same thing
17:09 iamacomp cool
17:10 dangerousbeans iamacomp: this makes it clearer: https://github.com/saltstack/
17:10 dangerousbeans it's all under the umbrella of 'saltstack'
17:10 dangerousbeans like Black Mesa
17:10 iamacomp k
17:11 RobSpectre So strange.  Turned on debug.  The state is clearly getting parsed, rendered and loaded, but there is no further indication that it is getting executed in the debug log.
17:12 RobSpectre The state before it and the state after it execute, this one does not - only when using salt-call manually.
17:13 RobSpectre Cleared the cache as well.
17:13 dave_den RobSpectre: what state?
17:14 dave_den and what does your cron look like?
17:15 RobSpectre dave_den: A state I have defined for sickbeard.   Other states for the host execute.
17:15 dave_den can you pastebin it?
17:15 RobSpectre dave_den: 54 * * * * salt-call state.highstate -l debug
17:16 dave_den and like viq said, it's likely your path or environment variables being different in cron vs your login shell.
17:16 iamacomp ok, i'm reading through random docs pages, searching for auto scaling.
17:16 RobSpectre dave_den: Here's the whole state tree - https://github.com/RobSpectre/salt-states
17:17 iamacomp basically I'm looking at how hard it will be to do auto scaling of tomcat in digital ocean with saltstack
17:17 RobSpectre dave_den: But, it also works when I am not logged in and call highstate from the Salt master.
17:17 iamacomp any hints on where I should look?
17:17 dave_den RobSpectre: what specific state is not executing?
17:17 iamacomp maybe there is an example of autoscaling tomcat or apache or whatever already?
17:17 viq RobSpectre: why not set up a scheduler on master then?
17:17 RobSpectre dave_den: Host is 'mediacenter*' in top.sls.  sickbeard is the state that is not executing on cron.
17:18 RobSpectre viq: I have the cron set up on all the individual hosts so the cluster doesn't hit the Salt master all at the same time.
17:19 viq RobSpectre: it would be master pushing things out. And also I think you could stage them, say "do at most 2 in 5 minute window" or somethng like that
17:20 RobSpectre dave_den: Issue is with the debug log on cron, I don't see any reference to the state at all after it is loaded.
17:21 dave_den RobSpectre: change your cron to salt-call -l garbage and look for your compiled sickbeard state. also, your sickbeard state is probably going to fail if any users in your pillar do not have derp_password.
17:21 viq RobSpectre: a combination of http://docs.saltstack.com/topics/jobs/schedule.html and http://docs.saltstack.com/topics/targeting/batch.html
17:22 RobSpectre viq: Very helpful, thank you.
17:22 iamacomp on the saltstack website it references autoscaling, but I can't find any docs
17:22 iamacomp (although perhaps I'm looking in the wrong place)
17:22 RobSpectre dave_den: kk.  Will give that a go.  All the users do have the template values, otherwise I don't suspect the manual highstate would work.
17:25 iamacomp ?
17:25 jergerber joined #salt
17:25 tyler-baker joined #salt
17:25 tyler-baker joined #salt
17:27 RobSpectre dave_den: where is the output of -l garbage located?
17:27 troyready joined #salt
17:27 RobSpectre dave_den: extmods/output?
17:27 dave_den RobSpectre: it putputs to console when you run salt-call.
17:29 RobSpectre dave_den: but not the minion log?
17:29 dave_den RobSpectre: set file_log_level in minion config.
17:31 rgarcia_ joined #salt
17:32 jeff_oncell joined #salt
17:37 xmltok joined #salt
17:37 Linz joined #salt
17:37 xmltok joined #salt
17:38 KyleG joined #salt
17:38 KyleG joined #salt
17:38 KyleG basepi: Much love.
17:38 basepi KyleG: ;)
17:38 Linz joined #salt
17:38 basepi KyleG: I have to admit I laughed out loud when I saw your mention from yesterday
17:38 KyleG haha :P
17:39 basepi But for the record, diskless minions which have a pre-populated /etc/salt/minion_id was quite the edge case.
17:39 KyleG yeah, we tend to be edge. Our salt minions are such hipsters.
17:39 basepi luckily, easy fix.  sorry i made you code-dive
17:39 KyleG Hey no biggy man, it's a free open source project
17:39 KyleG Thank you for improving it.
17:39 KyleG :)
17:40 AviMarcus joined #salt
17:40 RobSpectre dave_den: Looking at the output, looks like file is getting rendered correctly and the results of the YAML rendering is valid...
17:41 RobSpectre dave_den: And then no further mention of the state in the logs.
17:41 basepi KyleG: happy to!  we owe a lot to our community, though, so thank you as well!
17:41 RobSpectre dave_den: no error mentioned.
17:42 anti_ joined #salt
17:44 viq https://github.com/viq/cm-lab-salt/blob/users/salt/roots/salt/users/group1.sls observe the jinja horrors! ;P
17:44 dave_den RobSpectre: if you're running salt-call from cron as root and it's working differently than salt-call as root from a login shell, the only thing suspect is a PATH or shell env issue. if the state file is being parsed and included, each state function should still show up in the final output, but possibly with 'failed' or did not execute due to an if_only/unless being satisfied.
17:45 * Gareth waves
17:45 mortisha joined #salt
17:45 dave_den RobSpectre: have you tried doing salt-call state.show_highstate from cron?
17:46 _ikke_ I was wondering, is there anything preventing a mitm attack between master and minions? It looks to me that the minions would just accept the instructions they get from the master they are connecting to, but no verification is done, is that correct?
17:47 viq _ikke_: key caching
17:47 RobSpectre dave_den: When I've seen other dependency failures in a state, that failure appears in the debug log.
17:47 jimallman joined #salt
17:47 RobSpectre dave_den: trying show_highstate now.
17:48 Gareth RobSpectre: howdy :)
17:48 _ikke_ viq: On the minion side?
17:48 RobSpectre Gareth: Hey dude.  How's LA?
17:48 viq _ikke_: both sides, yes
17:48 dvogt joined #salt
17:48 dave_den _ikke_: you can set a master key fingerprint in the minion config.
17:48 _ikke_ dave_den: ok
17:48 Gareth RobSpectre: nice :)  warm today.  hows NYC?
17:48 RobSpectre Gareth: Freezing today. ;)
17:48 viq dave_den: though even if you don't, I believe minion will remember the key of the master it connected after the initial key exchange?
17:49 _ikke_ viq: But what if the key of the master changed?
17:49 Gareth RobSpectre: hah. hows life at Twilio?
17:49 viq _ikke_: tough luck
17:49 _ikke_ viq: They will reject the master then?
17:49 viq _ikke_: I believe so, yes
17:49 RobSpectre Gareth: Going very well.  Been a wild year.  On vacation, so picking up my personal Salt project.
17:50 jacksontj joined #salt
17:50 dangerousbeans salt people: how do you run a command from a state with arguments?  :V
17:50 viq dangerousbeans: cmd.run has all the details
17:51 viq dangerousbeans: or if you need an example, https://github.com/viq/cm-lab-salt/blob/users/salt/roots/salt/pf/init.sls
17:51 higgs001 joined #salt
17:51 RobSpectre Gareth: How's the gear up for SCaLE12x?
17:51 viq or https://github.com/viq/cm-lab-salt/blob/users/salt/roots/salt/router.sls
17:51 dangerousbeans viq: THNX
17:52 Gareth RobSpectre: getting there.  should be a good show though.  got our first keynote speaker lined up, CFP is still open for another month or so.
17:53 RobSpectre Gareth: Righteous.  You been doing some stuff with Salt?
17:53 bhosmer joined #salt
17:54 Gareth RobSpectre: mostly personally stuff, $dayjob is a puppet/ruby shop.
17:54 Corey Despite living 20 minutes away, I've already booked a hotel room for SCaLE.
17:54 RobSpectre Gareth: Gotcha.  Been enjoying it so far.
17:55 cdcalef joined #salt
17:55 Mef1 joined #salt
17:56 Mef1 Quick question any update on when 17.2 will be available.  I'm broken in 17.1 I believe a fix was after but trying to get a "release".
17:56 Gareth Corey: easier to go up a few flights in an elevator at the end of the day :)
17:57 jslatts joined #salt
17:59 Corey Gareth: I owe some people some beers after the talks finish, they often tend to reciprocate... it's a bad scene. :-)
17:59 jhulten joined #salt
18:06 elfixit joined #salt
18:08 Gareth Corey: indeed
18:08 Gareth bbl.
18:11 bhosmer joined #salt
18:12 marcinkuzminski joined #salt
18:12 jimallman joined #salt
18:14 bhosmer_ joined #salt
18:16 jeff_oncell I have a file.directory state, that's recursing the mode. It just started failing with a message of "failed to change mode to 774" repeated over and over
18:16 jeff_oncell Any idea on where to start on debugging that?
18:16 nahamu any other esky packagers around?
18:16 nahamu I'm trying to package up a new salt for an older Linux and I'm hitting a "ImportError: Couldn't find the real 'site' module"
18:17 nahamu I may be going about this the wrong way... A carefully built virtualenv might be enough...
18:19 jY on the master is there any command i can send all the minions to show what a grain is
18:19 pipps joined #salt
18:20 nahamu grains.get
18:20 nahamu "salt '*' grains.get saltversion"
18:20 nahamu like that?
18:20 forrest jeff_oncell, I'd start by rerunning the state with -l debug, then review the output, if that doesn't reveal anything, hop on the box where the directory is trying to recurse to see if anything is messed up.
18:21 jY nahamu: yep.. now can i do something like salt 'saltversion:0.17.0' cmd.run 'hostname' ?
18:21 jY ohh need to add the -G
18:21 jY thanks
18:22 blafountain joined #salt
18:22 nahamu jY: no problem
18:22 blafountain i found a few bugs related to pkgrepo.manage on ubuntu
18:23 jY nahamu: one last one if you know can you add a grain for the top.sls like base: 'saltversion:0.17.0':
18:23 UtahDave joined #salt
18:24 blafountain https://github.com/saltstack/salt/blob/develop/salt/modules/apt.py#L32
18:24 blafountain for some reason, when running highstate that import is succesful, even though i don't have it installed
18:24 nahamu jY: I don't since I haven't written many state files yet... someone else in here should, though.
18:25 blafountain when i run it with salt-call it correctly fails and falls back to doing the correct thing
18:25 nahamu there is a way to match on a grain though
18:25 nahamu one sec
18:25 blafountain second, we're calling 'apt-add-repository' the correct command is 'add-apt-repository'
18:26 nahamu jY: http://paste.ec/?9eb65ab99d5c5c22#IloNitWwLu9mJcuJNPz+1lzyyNZj3EPSqsVxJm/Re70=
18:26 nahamu like that?
18:26 jY ya but it's not working for me
18:27 nahamu jY: pastebin it. someone might be able to help.
18:27 dangerousbeans joined #salt
18:27 higgs001 joined #salt
18:27 pentabular joined #salt
18:27 blafountain https://gist.github.com/blafountain/7453880
18:28 jY http://paste.ec/?84f464f703091728#PSHpt/w5whjdYZEzw168r8OH0tezSGgd0qNLPPFsHBc=
18:29 jY if i remove the os: with a * it works
18:30 nahamu I think you need "- match: grain" like in mine
18:30 nahamu but I'm guessing.
18:30 jY ok overlooked that let me see
18:30 pipps_ joined #salt
18:31 sebgoa joined #salt
18:31 jY nahamu: thanks.. that was it
18:31 nahamu jY: no problem. pay it forward. ;)
18:33 wramthun joined #salt
18:33 jacksontj joined #salt
18:34 scott_w joined #salt
18:35 matanya joined #salt
18:43 jeff_oncell forrest: is there a way to see the command that is being executed?
18:43 jeff_oncell running the command I would think it should run works fine, and -l debug doesn't show anything useful
18:47 pentabular joined #salt
18:48 zandy joined #salt
18:55 abe_music joined #salt
18:56 nob joined #salt
18:57 nob Hi Is there a way to run a single .sls from the command line
18:57 KyleG nob: salt 'box' state.single statename
18:58 KyleG http://docs.saltstack.com/ref/modules/all/salt.modules.state.html#salt.modules.state.single
18:58 nob |\m/ thanks
18:58 KyleG no problem
18:59 Vye joined #salt
18:59 Mef1
19:00 honestly I just noticed this in the cron docs
19:00 honestly > By default, the timing arguments are all * and the user is root.
19:01 Mef1 I've been looking into a problem I have had since moving from 16.4.  Previously in 16.4 my yaml was interpreted as a dictionary now post 17.0  it is being interpreted as a ordered dictionary...does anybody know why this change has come in
19:01 kermit joined #salt
19:01 abe_music curious, what would be the best way for salt to provision a set of machines to enable passwordless SSH between them?
19:01 dave_den Mef1: state_auto_order.
19:02 honestly * 6 * * * /sbin/reboot
19:02 honestly this is a... not very useful crontab
19:02 honestly lol
19:02 _ikke_ lol
19:02 UtahDave Mef1: I'm guessing it's because in 0.17 all sls files are ordered now
19:02 honestly and I was wondering why my syslog was completely filled with reboot messages :D
19:02 _ikke_ honestly: Was that for a server?
19:02 honestly yes
19:02 honestly well, kind of
19:03 honestly I want it to reboot at 6am every day
19:03 Mef1 Is there a way to turn it off?  I seem to be getting some strange behavior now things are being screwed up to the point where I'm getting parsing errors when passing structures to modules
19:03 AdamSewell joined #salt
19:03 AdamSewell joined #salt
19:03 honestly UtahDave: If I make the cron state more intelligent (i.e. if only minute is set, day, month, and hour are set *, and second is set 0) will it get merged?
19:04 _ikke_ honestly: Ah yeah, seen something like that before. Doing something every minute in an hour
19:04 honestly oh, there is no second. so ignore that.
19:04 Mef1 this paste bin describes the yaml that is getting interpreted differently
19:04 honestly or rather, move all the time params on up
19:04 Mef1 sorry http://pastebin.com/JXSuQU6m
19:04 pears am I allowed to use file.blockreplace on a file that is also file.managed?
19:05 jslatts joined #salt
19:05 _ikke_ pears: Do you have 0.18?
19:05 pears no
19:05 amckinley joined #salt
19:05 _ikke_ iirc, it's an 0.18 feature
19:05 pears oh balls I guess that means I can't use blockreplace at all
19:05 _ikke_ yeah, I ran into it too
19:06 _ikke_ New in version Hydrogen.
19:06 _ikke_ Hmm, I recall it mentioning 0.18 there
19:06 Baribal joined #salt
19:06 xmltok joined #salt
19:06 ajw0100 joined #salt
19:07 pears trying to figure out what to do for an /etc/sysconfig/iptables file where the rules will come from pillar
19:08 _ikke_ and that file already has contents?
19:09 Ryan_Lane joined #salt
19:09 _ikke_ but if it's managed, then why do you need blockreplace?
19:09 xmltok can external pillars be configured from a salt formula, or some other way than just the master config file? it seems weird to have to configure the django_orm ext_pillar on the master when it could be part of a django formula
19:09 _ikke_ You can just use jinja templates
19:10 pears I'm trying to work this into a role system
19:10 pears so that if the system isn't in any roles, it at least gets a basic iptables file
19:10 pears but membership in roles can add additional rules, depending on that role's definition
19:11 _ikke_ pears: would jinja'
19:11 _ikke_ pears: would jinja's include help?
19:11 pears no, all the data needs to come from pillar
19:11 blafountain UtahDave: does this make any sense to you https://gist.github.com/blafountain/7453880
19:12 bemehow joined #salt
19:12 _ikke_ pears: ok
19:12 Mef1 I turned off auto order by state_auto_order: False  in master file....didn't seem to do anything
19:12 pears I'm considering doing a thing where I do file.managed with contents= instead of using a source file
19:13 pears (my states are generated using the py renderer from pillar data)
19:13 pears but that seems kind of gross
19:13 dfinn1 joined #salt
19:14 dfinn1 is there a way to have test.ping return the failed nodes?
19:14 _ikke_ dfinn: There is a faq or something about that
19:14 dfinn ok, i'll see if I can find it
19:15 _ikke_ http://docs.saltstack.com/faq.html#id6
19:16 honestly yo UtahDave - https://github.com/saltstack/salt/pull/8496
19:17 jhulten joined #salt
19:18 dave_den xmltok: you can configure ext_pillar on minions, but you usually want to force your minions to go through your master to get to your pillar database.
19:18 UtahDave blafountain: does thte node.js server require adding in its public key?
19:19 bemehow_ joined #salt
19:19 dave_den xmltok: just make sure you've got your ext_pillar configured to only provide the pillar data to the appropriate minion.
19:19 jhulten joined #salt
19:20 blafountain UtahDave: its nothing to do with ppa... we're a bit further on it now...
19:21 blafountain UtahDave: if i restart the minion it goes back to working fine, basically it appears the bootstrap script is installing that software packing
19:22 blafountain UtahDave: and then something is removing it, we're trying to figure out what is removing it
19:22 blafountain https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh#L1263
19:22 xmltok dave_den: i can just add an ext_pillars to the minion config? i guess its better but its still a little weird since i need to reconfigure the minion on my node. basically what I am getting at is that I am writing a ceph formula, i need to then create a ceph git repo to store my ceph pillar data in, and reconfigure my masters to include yet another ext_pillar url. itd be nice to be able to inject something into the ext_pillar list from my formula
19:23 blafountain UtahDave: at the very least, there is a real bug here https://github.com/saltstack/salt/blob/develop/salt/modules/apt.py#L1024
19:23 blafountain UtahDave: that should be add-apt-repository not apt-add-repository... i can put a PR when i get a chance
19:26 whiteinge xmltok: ext_pillar needs to be configured in the master config (since pillar runs on the master)
19:26 jdenning joined #salt
19:26 whiteinge xmltok: a formula that requires an ext_pillar would have to mention so in the documentation
19:27 xmltok so i either end up with a massive list of git repositories in my master config, or i end up with a massive git repository full of pillar data.
19:27 xmltok maybe git isnt the right method for me to store my pillar data
19:29 Mef1 Here is a pastebin http://pastebin.com/L5Dt9dAP that describe my issue with ordered dictionaries.  Can anybody give me some insight?
19:30 [diecast] joined #salt
19:31 _ikke_ sounds like it is returning a string where you expect a dict
19:31 Chrisje joined #salt
19:32 jhulten joined #salt
19:32 xmltok joined #salt
19:33 whiteinge xmltok: you could put said list in a standalone /etc/salt/master.d/ext_pillar.conf file. at least it would cut down on the surrounding config noise
19:35 Mef1 first question why is this now an ordered dictionary. it didn't use to be.  If you see the yaml parser would not output an ordered dictionary
19:36 dave_den Mef1: state_auto_order.  http://docs.saltstack.com/ref/states/ordering.html#state-auto-ordering
19:38 Mef1 dave_den I turned off the state_auto_order on the master restarted the master and no difference.
19:38 xmltok what about a github/gitlab ext_pillar type. you would configure it to your account/team and then it could load in all pillar repositories in that account/team. so ext_pillar: github: 'xmltok', maybe with a filter '*-pillars' to only select my pillar repos
19:39 dave_den a lot of salt code handling dicts was changed to using ordereddict to support state_auto_order
19:39 xmltok the same kind of thing could be used for gitfs, so that you only need to configure the master once
19:39 markm joined #salt
19:40 aleszoulek joined #salt
19:40 whiskybar joined #salt
19:42 xmltok that might be pretty easy to write
19:43 scott_w joined #salt
19:44 bemehow joined #salt
19:47 davet joined #salt
19:48 forrest sorry jeff_oncell was in a meeting, did you get that figured out?
19:48 anuvrat joined #salt
19:48 zandy joined #salt
19:48 jeff_oncell forrest:  ehhh, I realized that I didn't actually need it to recurse
19:48 forrest oh ok
19:49 jeff_oncell So there's no point in bothering to spend any time on it
19:52 forrest Not a bad solution
19:54 ckao joined #salt
19:56 blafountain UtahDave: so we got to the bottom of it, if you're at all curious... our states pkg.removed - unattended-upgrades
19:56 blafountain UtahDave: which uninstalls python-software-properties
19:57 AdamSewell Is anyone familiar with salt-cloud here? Is it possible for salt-cloud to run some state files after it's created a new server with a cloud provider?
19:57 pdayton joined #salt
19:58 blafountain AdamSewell: salt-cloud has a 'start_action: state.highstate'
19:58 forrest AdamSewell, here are the docs on that if you're interested: http://salt-cloud.readthedocs.org/en/latest/topics/deploy.html?highlight=start_action#post-deploy-commands
19:58 Chrisje joined #salt
19:59 AdamSewell blafountain and forrest thanks
19:59 forrest np
20:00 AdamSewell now i just need to get my states locked down
20:01 pipps joined #salt
20:03 hazzadous joined #salt
20:03 higgs001 joined #salt
20:05 mpanetta_ joined #salt
20:09 UtahDave blafountain: ah, cool
20:09 jY can someone let me know what i'm doing wrong.. http://pastebin.com/s9YCPBsH
20:09 hazzadous joined #salt
20:09 jY it's always running the virtualenv
20:09 jY and go figure i see the error when i post here.. not using full path
20:10 _ikke_ Can salt-ssh be used to install salt-minion on new servers?
20:10 thelorax123 joined #salt
20:10 erchn joined #salt
20:11 UtahDave _ikke_: sure!
20:11 _ikke_ also in a (semi-)automated fashion?
20:11 erchn hi all, has anyone used the sources argument for pkg.installed?  if I list a few different RPMs there will they be installed in one command to resolve dependencies?
20:12 erchn sorry for the dumb question, i don't have a proper sandbox right now
20:12 jcockhren erchn: yes
20:12 erchn jcockhren: cool, thanks for the answer
20:12 jcockhren erchn: just like you're running it in a terminal
20:12 erchn perfect, thanks
20:18 [diecast] joined #salt
20:22 AdamSewell could someone explain what the difference between a highstate and a regular state is?
20:23 bhosmer joined #salt
20:23 UtahDave AdamSewell: a highstate is a term that refers to a command that causes the minion to scan the top.sls file to determine which sls files it should apply to itself
20:25 whiskybar AdamSewell: I tend to think about it as highstate = collection of states; this collection is individual for each machine and is defined in the aforementioned top.sls
20:26 AdamSewell hrm, so highstate would be a collection of all states
20:26 AdamSewell and a state is for a particular configuration?
20:27 _ikke_ AdamSewell: I guess the highstate is the final state that belongs to a minion, but I could be wrong
20:28 Ryan_Lane joined #salt
20:28 [diecast] joined #salt
20:29 whiskybar top.sls defines what highstate means for every machine
20:29 jcockhren AdamSewell: highstate is a collection of states specific to at least one minion that is enforced by salt
20:30 whiskybar it lists states and assigns them to machines
20:30 jcockhren AdamSewell: think of it like the desired starting state for a minion
20:30 _ikke_ There is also something called lowstate
20:31 [diecast] joined #salt
20:31 AdamSewell hrm
20:31 jcockhren AdamSewell: highstate is often used to enforce specific configurations across minions
20:31 AdamSewell maybe i just need to get my states figured out then do the highstate and low state stuff
20:32 UtahDave AdamSewell: don't worry about low state.  that's mostly useful for debugging
20:33 jcockhren AdamSewell: sort of. first think of packages/configurations you'll want for all (for subset) of minions (like monitoring, for example)
20:33 jcockhren highstate is then used to ensure that configuration is present for current and new minions
20:34 jcockhren basically, to ease the initial setup of a new machine
20:34 _ikke_ AdamSewell: You don't really need to 'get' highstate to use it
20:34 _ikke_ sls.highstate just applies the configured state to the minions
20:35 AdamSewell i think i got it
20:36 Ryan_Lane joined #salt
20:38 st_iron joined #salt
20:38 st_iron hello
20:39 UtahDave hey, st_iron!
20:39 forrest AdamSewell, if you want to see a completed project, take a look at : https://github.com/terminalmage/djangocon2013-sls
20:39 UtahDave mpanetta_: did that work for you?
20:39 st_iron I just started to introduce Salt to my company, and I need some help pointing to the right place in the documentation
20:39 forrest while it uses a few advanced techniques, it's very good
20:39 forrest hit us st_iron :P
20:40 mpanetta_ UtahDave: yep, it sure did :)
20:40 MK_FG joined #salt
20:40 st_iron where can I find docs about the template function where I can use for example an external file for my minion configs
20:40 st_iron because I have to set a SID file in every minion
20:41 st_iron so I need a template with "variables", I have to calculate the SID (the end of the hostname), and add it to the deployed file
20:41 st_iron is it possible with Salt?
20:42 dave_den st_iron: you can use file.managed, and point the source a a jinja template. http://docs.saltstack.com/ref/states/all/salt.states.file.html#module-salt.states.file
20:42 honestly joined #salt
20:42 st_iron oh, hello UtahDave, I just saw that you welcomed me :)
20:43 UtahDave mpanetta_: great! I need to add some docs with that as an example
20:43 mpanetta_ UtahDave: Yes, it would be helpful.  Thank you so much!
20:43 st_iron dave_den: thank you, I am checking it
20:43 isomorphic joined #salt
20:45 quickdry21 Hey all, I'm trying to install a specific package from a PPA. The version is available via apt after adding the PPA, but I'm getting packages failed to install/update - my sls and the output are here http://pastebin.com/uHRF9WtP
20:46 st_iron dave_den: it looks good, is there any way to use the `hostname -s` on all servers as a {% my_hostname = '' %} variable and truncate it to the last two characters?
20:46 dave_den quickdry21: try adding - refresh: True in mongodb-10gen
20:46 mpanetta joined #salt
20:47 dfinn1 joined #salt
20:47 quickdry21 Same thing.
20:48 zandy joined #salt
20:49 dave_den quickdry21: is the package actuallynamed mongodb-10gen?
20:49 quickdry21 yeah
20:50 quickdry21 normally i would do apt-get install mongodb-10gen=2.4.6
20:50 nob joined #salt
20:50 dave_den set your minino to log debug and see what you can find when it runs that state - it should give you a clue as to whats going on
20:51 forrest st_iron, you could base that information off of grains: http://docs.saltstack.com/topics/targeting/grains.html
20:51 forrest though you'd need to look up the information regarding how to parse just the last two characters inside of jinja
20:51 dave_den st_iron: you can either do {% my_hostname = salt['cmd.run']('hostname -s …') %} or you can use the pydsl renderer to use pure python and derive the SID. http://docs.saltstack.com/ref/renderers/all/salt.renderers.pydsl.html
20:52 nob Howdy, Is it possible to pass some template context vars into an sls being run like so salt '*' state.sls  mysls
20:52 Mua_ joined #salt
20:52 dave_den st_iron: also, you might want to just store the SID in pillar.
20:53 sebgoa joined #salt
20:54 st_iron ah both of them sounds good
20:54 st_iron thanks
20:55 st_iron I will have to do a lot of string manipulation in files
20:56 st_iron hmm, and I will have to read the $ORACLE_SID environment variable somehow :\
20:56 st_iron cmd.run will solve it, I think
20:56 jacksontj joined #salt
20:56 dave_den st_iron: you can also create custom 'helper' module/function that would be available through the salt[] dict in your templates.
20:57 dave_den that is a good way to abstract away the complexities in your templates.
20:58 dave_den st_iron: http://docs.saltstack.com/ref/modules/index.html#modules-are-easy-to-write
20:58 st_iron thanks, I am checking it too
20:59 st_iron at the moment the cmd.run state seems to be the quickest solution
20:59 jslatts joined #salt
20:59 Ryan_Lane1 joined #salt
20:59 st_iron I have a couple of BASH scripts with AWK and SED, probably I can call them temporary for the "dirty work"
21:00 st_iron *temporarily
21:00 st_iron I fell in love with Salt
21:00 amckinley joined #salt
21:01 quickdry21 dave_den: I tracked down, seems to be a problem with salt. Got this in the logs: [INFO    ] Executing command ['apt-get', '-q', '-y', '--force-yes', '-o', 'DPkg::Options::=--force-confold', '-o', 'DPkg::Options::=--force-confdef', 'install', '"mongodb-10gen=2.4.6"'] in directory '/home/gml' - but when I ran that same command on the command line, it installed sucesfully
21:02 dave_den quickdry21: are you running salt as a non-root user?
21:02 quickdry21 nope
21:02 quickdry21 from upstart
21:02 quickdry21 and as sudo salt-minion
21:02 dave_den hrm.
21:03 quickdry21 i've used pkgrepo.managed for other things, rabbitmq for one, and it worked just great
21:03 pipps joined #salt
21:03 dave_den ah, the in '/home/gml' was suspicious, but if you're launching from sudo it makes sense
21:03 quickdry21 yeah
21:03 quickdry21 just for logging
21:04 dave_den quickdry21: check the issues on github for apt insalling specific versions from ppa. i recall someone else having a similar issue recently
21:04 quickdry21 will do
21:07 _ikke_ joined #salt
21:10 AdamSewell does it make sense with states to put multiple packages in one state? for example, nginx in an nginx.sls or nginx, vim, etc into a websever.sls?
21:10 bhosmer joined #salt
21:12 heewa AdamSewell: I like to organize those kinda things into separate states, in a separate dir called 'components', which get included from a state in a dir called 'boxes' that describe my architectural stuff. So 'boxes/webserver.sls' would include 'components.nginx' and 'components.vim'.
21:13 forrest AdamSewell, check out that github link I pasted, it goes through what is pretty much the 'standard' way to do it
21:13 heewa AdamSewell: That way multiple boxes can use the same components. Or a component can depend on another component, like I use datadog to report on nginx, so the nginx component includes the datadog component, but so does the mongodb component.
21:13 forrest heewa has it right, keep things contained to themselves
21:14 amahon joined #salt
21:15 cewood joined #salt
21:15 AdamSewell ok, got ya
21:16 AdamSewell forrest, so this github link
21:16 AdamSewell these files would be in the /srv/ directory?
21:16 forrest https://github.com/terminalmage/djangocon2013-sls
21:16 forrest not all of them
21:16 AdamSewell well, like top.sls
21:16 forrest you'd have /srv/pillar
21:16 forrest and /srv/salt
21:17 forrest the pllar file lives in /srv/pillar, the top, as well as things like apache, foo, etc. all live in /srv/salt
21:17 forrest you don't need to worry about overstate right now I'd imagine
21:18 blafountain is there an easy way for the master to 'forget' about a minion... i know about salt-key -d, but we'll will want to bring up and down machines at different times... i would be interested in something like salt-key --purge
21:19 amckinley joined #salt
21:21 forrest for just a single key blafountain?
21:22 quickdry21 forrest: I'd like to know if it's possible to do it for "stale" keys. I'm constantly spinning machines up and down and it's a pain to keep the key list up to date.
21:23 forrest quickdry21, as far as I know there isn't functionality like that, someone else might know of a workaround, or an official method though
21:23 quickdry21 I usually just end up occasionally doing a salt-key -D and then a salt-key -A
21:23 dave_den quickdry21: you can have a minion revoke its own key
21:24 quickdry21 This would be for old minions who don't exist anymore.
21:24 dave_den quickdry21: also, you can create a reactor to a minion event
21:24 jimallman joined #salt
21:24 dave_den quickdry21: well, there's no way to know how long ago the minion last talked to the master
21:24 quickdry21 ah
21:24 dave_den but ther eis manage.down, which you could feed into salt-key -d
21:25 dfinn1 randomly manage.down just dumps my full list of minions.  running a cmd.ping they are all responding though.
21:25 dave_den easiest way would be to hfire an event or have the minion revoek its own key upon spindown
21:26 dave_den me type good
21:26 dave_den blerg
21:26 Ryan_Lane joined #salt
21:30 Corey UtahDave!
21:30 Corey I've got people whining about me about "salt --version" spitting out 0.17.0 in develop.
21:33 dottedmag Corey: release script doing 'strip -git from version / commit / tag / bump version and add -git back' helps to prevent such things.
21:33 * dottedmag had write one for CFEngine due to the exactly same problem.
21:33 dottedmag *to write
21:34 anuvrat joined #salt
21:34 Chrisje joined #salt
21:35 Corey I don't *think* I can do that in homebrew (I'm packaging it for Mac)
21:38 amahon joined #salt
21:38 DerekRBN joined #salt
21:38 dottedmag Corey: yes, has to be done upstream.
21:39 jhulten_ joined #salt
21:40 Ryan_Lane joined #salt
21:41 DerekRBN Hey there, I have a question about releases. It appears that I'm on 0.17.1 which is the latest release i can see on github. I'm having a issue with the ext_job_cache feature and need to update my master. I'm at reinvent and the guys at the booth told me to check out 0.17.2 how would i go about installing that?
21:42 dave_den DerekRBN: 0.17.2 is not officially cut yet, AFAIK.
21:42 dave_den it's not tagged in git, either
21:42 st_iron bye
21:43 pentabular joined #salt
21:45 AdamSewell forrest, would it make sense to have separate directories for nginx vs php5 and it's modules?
21:45 forrest I think so
21:45 AdamSewell or would it be better to just do a webserver.sls
21:46 forrest I'd have nginx as one thing
21:46 forrest then you could just include/require nginx in the php module if you want
21:46 dave_den DerekRBN: if you just need to install an arbitrary commit from github, you can use salt-bootstrap easily, e.g. salt-bootstrap git <commit_sha>
21:46 forrest so nginx/ php5/ and php/ or something like that
21:46 AdamSewell what about something like php5-curl
21:46 AdamSewell would that be a separate directory as well?
21:47 AdamSewell or just include it in the php5 sls
21:48 zandy joined #salt
21:50 vu joined #salt
21:50 mwillhite joined #salt
21:51 thelorax123 joined #salt
21:54 AdamSewell forrest, and everyone else, thanks for the help today
21:54 higgs001 joined #salt
21:55 forrest Ahh damn I didn't see his mesage before he left. I hope he does something like php5/curl.sls and doesn't put it all in the init :\
21:57 jslatts joined #salt
22:04 bhosmer joined #salt
22:05 tty-1 joined #salt
22:05 harobed_ joined #salt
22:06 jacksontj joined #salt
22:10 jhulten joined #salt
22:14 dfinn1 what might cause manage.down to report completely incorrect half of the time?
22:15 dave_den dfinn1: try salt-run -t 30 manage.down
22:15 dfinn1 ok
22:16 forrest dave_den, you should really make a pull of the troubleshooting docs
22:16 dave_den ?
22:16 forrest you're good at troubleshooting issues that come up
22:16 forrest so you should update the docs :P
22:16 dave_den oh, i thought you meant i should pull them down and read them
22:16 dave_den heh
22:17 forrest nah
22:17 forrest You should contribute since you have good ideas.
22:17 dave_den i try to do what i can for bugs and stuff. i havent done any doc PRs
22:17 forrest gotcha
22:18 dfinn1 setting the timeout to 30 has definitely fixed my inconsistent results.  thanks!
22:18 dave_den dfinn1: default timeout for salt-run is 1 second… kinda short.
22:19 thelorax123 joined #salt
22:19 HeadAIX_ joined #salt
22:20 dave_den salt docs say 0.17.2 is the current version. hrm
22:20 dfinn1 oh wow, yeah, i guess so
22:20 dave_den wonder when that happened
22:20 dave_den i still don't see it in git
22:23 forrest dave_den, the docs are built from the develop branch
22:23 forrest so the team is just updating the docs in prep for the release, which usually means it's a couple days out
22:24 thelorax123 joined #salt
22:25 forrest basepi, did you guys get salt-cloud integrated?
22:27 dave_den ah, yeah i see it in the doc source
22:27 eclectic joined #salt
22:30 dave_den anyone serving .mp4 files noticing a bug with Safari in mavericks that continues to do partial gets on the video over and over as fast as it can?  In some cases for a 100MB .mp4, the browser will get >41GB through partial content GETs
22:30 dave_den it's driving me crazy
22:31 mr_chris joined #salt
22:33 dlloyd did you mean to ask that in #salt?
22:34 oz_akan__ joined #salt
22:34 dave_den yeah, figured we might have some other admins in here.
22:35 dlloyd ah
22:35 basepi forrest: yes, i think tom said it's mostly working
22:35 dave_den it's off topic, i know :D
22:35 KyleG dave_den: Now I'm worried...
22:35 KyleG We're a digital asset management company
22:35 KyleG I'll get our QA guys to see if they can replicate that....
22:36 dave_den KyleG: i cant find anyone else reporting on it. I'm checking apple developer bug now
22:39 forrest basepi, awesome
22:39 Thiggy joined #salt
22:42 basepi btw, UtahDave is working on a last fix for Windows for 0.17.2 and then it's ready to be released!  =)
22:42 forrest sweet
22:42 jslatts joined #salt
22:44 dave_den nice
22:46 bemehow joined #salt
22:48 zandy joined #salt
22:49 NotreDev joined #salt
22:49 UtahDave basepi: where are you!!!!!
22:49 forrest he just responded a few minutes ago
22:50 NotreDev i'm looking for a pattern to add users to the system depending on configuration. grains.filter_by unfortunately limits me to a hashable item (e.g. i can't do 'mongo in node_type'). the best way to do this just in jinja2 code?
22:51 NotreDev or is there another specialty function that i should consider?
22:51 forrest NotreDev, you could do it that way, you could also write your own grain if you want.
22:51 pipps joined #salt
22:51 forrest NotreDev, I assume none of the existing grains work for you?
22:52 Gareth UtahDave: by the time you see basepi...its too late.
22:52 NotreDev forrest: nah, bc i want to be establish users depending on the role of the machine
22:52 forrest NotreDev, ahh I see. How do you currently determine which states get applied to specific machine roles?
22:53 NotreDev for states, i filter in top.sls, for environment specific data, i filter using a map.jinja2 file
22:53 UtahDave lol, he's back.
22:53 basepi I'm back!
22:53 forrest are you unable to use the same filtering that you use in the top.sls?
22:53 NotreDev the map.jinja2 file just executes on grains.filter_by
22:53 basepi yeesh, can't a guy go to the restroom around here?
22:54 forrest so NotreDev, viq qas doing this: https://gist.github.com/viq/7358604
22:54 NotreDev forrest: i asked that question a few days ago, and didn't get any response in here. can i do that same sort of filtering outside top.sls?
22:56 NotreDev forrest, but this isn't possible, right? http://pastebin.com/xTQjpVWy
22:56 forrest where does this live?
22:57 forrest NotreDev, jesusaurus also has a unique way he does things in his pillar
22:57 forrest https://github.com/jesusaurus/hpcs-salt-state/blob/master/apt/sample.pillar
22:58 forrest so he has all the distros set up, then simple iterates like this: https://github.com/jesusaurus/hpcs-salt-state/blob/master/apt/repo/distro
22:58 jesusaurus yep :)
22:59 jesusaurus i just use the pillar as a parameterization, i like my actual formulae to be deployment-agnostic
22:59 Gareth basepi: http://www.youtube.com/watch?v=jRWhxgJ0gF4
22:59 forrest jesusaurus, right
22:59 forrest NotreDev, does that kind of give you an idea of how to do what you want?
23:00 basepi Gareth: Noooooo!
23:00 forrest basepi, just use UtahDave's toaster oven
23:00 NotreDev i think those implementations are OK. i really want to be writing my own jinja2 filters and injecting them into salt's jinja2 environment
23:00 NotreDev haven't seen docs on how to do that, though
23:00 basepi forrest: lol
23:01 jesusaurus NotreDev: i know that feeling, but im resisting
23:01 ajw0100 joined #salt
23:01 NotreDev i come from a fairly extensive jinja2 background. i have all kinds of fun jinja2 filters :)
23:01 NotreDev instead i'm relegated to macros :(
23:02 forrest NotreDev, it seems like to me that it would be better to write a custom grain than to write a ton of jinja magic
23:02 forrest but that's just me
23:02 NotreDev i'm talking about pillars though, not grains
23:03 jkleckner joined #salt
23:03 forrest yea I was talking about for determining the type of node
23:04 linuxnewbie joined #salt
23:04 linuxnewbie joined #salt
23:05 linuxnewbie left #salt
23:05 NotreDev i may have thought of an even better way :)
23:05 forrest NotreDev, oh? How?
23:05 NotreDev let me see if it works
23:05 forrest ok
23:06 forrest either way I'd still be interested, worst case it might be a stepping stone idea wise
23:06 pipps_ joined #salt
23:06 pentabular left #salt
23:08 jY can a file notify a service to restart/reload or can a service just watch a file for a change then reload/restart?
23:11 jimallman joined #salt
23:12 ebodine joined #salt
23:13 mlister2006 joined #salt
23:13 forrest jY, use watch_in
23:14 jY forrest: thanks
23:14 forrest np
23:14 bemehow joined #salt
23:14 scott_w joined #salt
23:25 forrest NotreDev, I'm gonna head home. I'll be back on in probably 15 minutes, though I'll be away. If that method you're trying works can you just direct a message at me so I know where in the chat to look?
23:27 pipps joined #salt
23:35 halfss joined #salt
23:38 jhulten joined #salt
23:43 noob joined #salt
23:43 noob is salt free?
23:44 Guest48444 hello
23:44 Guest48444 can anyone give me any pricing details on salt?  is it free up to a certain # of nodes?
23:45 Guest48444 what does enterprise buy you?
23:48 mlister2006 nor sure about enterprise part. but community web page http://docs.saltstack.com/ , free to download and use it.
23:48 bhosmer joined #salt
23:48 honestly salt is published under a free license
23:48 zandy joined #salt
23:48 forrest joined #salt
23:50 honestly the apache license, namely
23:50 honestly so it's free to use
23:50 honestly no idea what the deal is with enterprise license
23:50 honestly probably very similar to MySQL
23:50 mlister2006 joined #salt
23:54 halfss joined #salt
23:56 Guest48444 thx
23:58 Guest48444 I can't get my minion to talk to my master - got any ideas?
23:59 honestly well, make sure master url is set properly in the minion config
23:59 honestly and then you need to accept the minion at the master
23:59 Guest48444 I started my minion in debug mode - it says [INFO    ] Using cached minion ID: ip-10-236-200-211.ec2.internal
23:59 honestly with the salt-keys utility
23:59 Guest48444 do I set a URL or just an IP

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