Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-08-27

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

All times shown according to UTC.

Time Nick Message
00:13 ipmb joined #salt
00:13 dthom91 joined #salt
00:17 [diecast] joined #salt
00:25 mgw joined #salt
00:29 whit joined #salt
00:39 dthom91 joined #salt
00:40 ipmb joined #salt
00:44 gothix joined #salt
00:46 krissaxton joined #salt
00:52 kenbolton joined #salt
00:56 whit joined #salt
00:58 kstaken joined #salt
01:03 david_a joined #salt
01:11 mgw1 joined #salt
01:13 mgw2 joined #salt
01:16 jacksontj joined #salt
01:16 oz_akan_ joined #salt
01:18 dthom91 joined #salt
01:24 mgw joined #salt
01:25 whit joined #salt
01:31 gothix joined #salt
01:32 kstaken joined #salt
01:45 malinoff joined #salt
01:45 StDiluted joined #salt
01:46 krissaxton joined #salt
01:50 aat joined #salt
01:56 kenbolton joined #salt
01:58 kstaken joined #salt
01:58 Furao joined #salt
01:59 jpeach joined #salt
02:00 mgw1 joined #salt
02:01 malinoff Hi all
02:07 EnTeQuAk joined #salt
02:09 gamingrobot hi
02:10 shadowsun 2013-08-26 21:08:49,939 [salt.master                                 ][ERROR   ] Exception len(["58238402525d6f84f6ac1ae17a5d9ad7b13ee831\tnot-for-merge\tbranch 'master' of ssh://184.172.243.218/home/saltgituser/salty\n"]) != len(['stdin: is not a tty', ' = [up to date]      master     -> origin/master']) occurred in file server update
02:10 shadowsun Can anyone tell me what in gods name this means?
02:11 shadowsun I'm trying to use gitfs. It should be simple, right? O.o
02:12 xl1 joined #salt
02:13 dthom91 joined #salt
02:17 whit joined #salt
02:18 liuyq joined #salt
02:19 KyleG joined #salt
02:19 KyleG joined #salt
02:20 blee joined #salt
02:21 gothix joined #salt
02:23 malinoff joined #salt
02:24 malinoff joined #salt
02:30 gothix joined #salt
02:34 mwillhite joined #salt
02:34 liuyq joined #salt
02:37 kenbolton joined #salt
02:37 gothix joined #salt
02:38 [diecast] joined #salt
02:38 alunduil joined #salt
02:47 krissaxton joined #salt
02:49 whit joined #salt
02:51 jpeach joined #salt
02:53 aarkay joined #salt
03:00 kvt joined #salt
03:05 racooper joined #salt
03:06 toastedpenguin joined #salt
03:07 racooper joined #salt
03:26 ipmb joined #salt
03:26 tsing joined #salt
03:27 vipul joined #salt
03:35 littleidea joined #salt
03:35 felixhummel_ joined #salt
03:47 xl joined #salt
03:47 krissaxton joined #salt
03:58 forrest joined #salt
03:58 forrest_ joined #salt
04:07 jalbretsen joined #salt
04:13 Furao joined #salt
04:24 shadowsun 2013-08-26 21:08:49,939 [salt.master                                 ][ERROR   ] Exception len(["58238402525d6f84f6ac1ae17a5d9ad7b13ee831\tnot-for-merge\tbranch 'master' of ssh://server/home/saltgituser/salty\n"]) != len(['stdin: is not a tty', ' = [up to date]      master     -> origin/master']) occurred in file server update
04:24 dthom91 joined #salt
04:24 shadowsun can anyone translate that into something I can actually fix?
04:25 oz_akan_ joined #salt
04:31 forrest so you're trying to pull from a branch in git?
04:47 shadowsun forrest: not even a branch, I'm just pointing it at the project
04:47 forrest are you executing it as a command, or as the source for a file or what?
04:47 shadowsun No, gitfs_remotes in /etc/salt/master
04:47 shadowsun that's the error I'm getting in /var/log/salt/master
04:48 krissaxton joined #salt
04:49 forrest you restarted the master right?
04:49 Rorgo joined #salt
04:49 shadowsun Yes.
04:49 shadowsun And I've been wiping /var/cache/salt because it gives the data stored there priority over the data in /etc/salt/master
04:50 shadowsun i.e. if I change gitfs_remotes in /etc/salt/master, I must delete cache or it will ignore the configuration file in favor of stale data.
04:50 shadowsun This is 0.16.3
04:53 forrest what version of gitpython are you using?
04:53 shadowsun Good question
04:54 shadowsun yum isn't being very forthcoming on that front
04:54 forrest rpm -qa | grep git
04:54 shadowsun yeah
04:54 forrest doesn't show it?
04:54 jpeach joined #salt
04:54 shadowsun no, it actually does not
04:55 forrest can you launch a python console and try: import git
04:55 shadowsun sigh
04:55 shadowsun It helps if I'm on the right box
04:55 forrest were you getting the error on the wrong box?
04:55 forrest or just checking for git
04:55 shadowsun No
04:56 shadowsun I was checking the wron gbox because I'm a bit tired :)
04:56 forrest heh
04:56 shadowsun version 0.3.2
04:56 forrest sleep is good
04:56 forrest ok you should be ok then
04:56 shadowsun "should" is such a lovely word
04:56 shadowsun ;)
04:56 shadowsun It's whatever's current in CentOS
04:56 forrest for gitpython?
04:56 shadowsun yes.
04:57 shadowsun CentOS 6.4
04:57 auser hey all
04:57 forrest can you paste a gist of the file where you're declaring your gitfs_remotes?
04:57 forrest hi
04:57 shadowsun forrest: Yeah, I need to censor server IP though
04:57 shadowsun sec
04:57 forrest that's fine
04:57 forrest securitah and all that
04:58 shadowsun your favorite pastebin like thing?
04:58 forrest whatever
05:02 shadowsun http://fpaste.org/35016/37757976/
05:03 shadowsun deleted blank lines and lines starting with #, subbed a couple of things out, and that's all thats left
05:03 shadowsun I've got it pared down pretty far for troubleshooting as is
05:04 forrest did you try this? http://docs.saltstack.com/topics/tutorials/gitfs.html#gitfs-remotes-over-ssh
05:04 shadowsun Yes.
05:04 shadowsun put it back in that format for you
05:04 forrest ok, and you've tried adding .git I assume?
05:04 shadowsun yes
05:04 forrest none of the examples are the format you've listed.
05:04 shadowsun it finds the git file
05:04 forrest ok
05:05 shadowsun no, they're not
05:05 shadowsun it's doing a search, according to the strace on the sshd
05:05 middleman_ joined #salt
05:05 shadowsun it even checks for .git.git when I have .git there
05:05 shadowsun the hexadecimal string is actually a file
05:05 forrest yea I figured
05:05 shadowsun ./salty.git/objects/58/238402525d6f84f6ac1ae17a5d9ad7b13ee831
05:05 forrest did you pull the content down to the directory in question already?
05:06 shadowsun Which directory in question?
05:06 shadowsun the git project does have a file, yes
05:06 forrest you're getting that error when you try to update the machine right?
05:06 shadowsun no
05:06 shadowsun I start salt-master
05:06 shadowsun it tries to connect to the gitfs
05:06 forrest and bombs, ok
05:06 shadowsun it generates that error every time
05:06 shadowsun nope, it keeps running
05:06 shadowsun It just keeps polling and erroring, too
05:07 forrest I'm considering that bombing :P
05:07 shadowsun lol kk :)
05:07 shadowsun anyway
05:08 shadowsun - git+ssh://saltgituser@server/home/saltgituser/salty.git
05:08 shadowsun nuking /var/cache/salt and starting salt-master now
05:08 forrest ok
05:09 shadowsun http://fpaste.org/35017/75801631/
05:09 shadowsun Same behavior observed
05:09 forrest that error is really awful
05:10 forrest I've read it about 5 times now
05:10 shadowsun I'm not even sure what it's trying to accomplish with comparing the length of the strings
05:10 shadowsun yeah
05:10 shadowsun It's absolutely useless as far as I can tell
05:10 shadowsun i.e. completely not transparent
05:10 forrest yea
05:10 shadowsun just for kicks
05:10 forrest ok, so lets try to decrypt this thing one step at a time, so we get an exception, regarding the length
05:11 shadowsun yes
05:12 shadowsun of two completely different strings, both of which have something to do with salt
05:12 shadowsun erm
05:12 shadowsun git
05:12 shadowsun not salt
05:12 shadowsun git
05:12 forrest where the length of the file on branch master is not equal to the length of stdin, lol
05:12 shadowsun pretty much
05:12 forrest you're able to check this out yourself when you're sudo'd to the user right?
05:12 shadowsun could the not-for-merge<tab>branch master of ?
05:12 shadowsun what?
05:12 shadowsun omg
05:12 shadowsun Does it execute the git from the remote machine instead of the master?
05:13 forrest I don't know
05:13 shadowsun documentation... ;sec
05:13 forrest the files should be getting cached on the master
05:13 shadowsun "should"
05:13 forrest The gitfs backend hooks into any number of remote git repositories and caches the data from the repository on the master. This makes distributing a state tree to multiple masters seamless and automated.
05:13 shadowsun the destination will not be able to connect to git at all, because ssh is firewalled and they don't have a key
05:13 shadowsun yes
05:13 shadowsun the documentation leads me to believe that's supposed to be true
05:14 shadowsun But I never thought to strace the client box to check
05:14 forrest everything on the docs leads me to believe it's only the master
05:14 forrest starting the salt master shouldn't have any effect on the minions when it's building the cache
05:14 malinoff joined #salt
05:15 shadowsun agreed
05:15 forrest the error still pisses me off
05:16 shadowsun [pid  1936] execve("/tmp/tmpSC8vC2", ["/tmp/tmpSC8vC2"], [/* 7 vars */]) = -1 ENOEXEC (Exec format error)
05:16 shadowsun well, that's interesting
05:16 forrest was that from the strace on the master?
05:16 shadowsun no
05:16 shadowsun client
05:16 shadowsun -.-
05:17 shadowsun I'm going to have to go find what does that
05:17 forrest heh
05:17 tsing joined #salt
05:18 Ryan_Lane joined #salt
05:18 forrest but just to confirm, you CAN pull that exact URL down as the saltgituser on the master right? I wonder if it's having a problem because you're running the salt master as the root user?
05:18 forrest can you pull it as root?
05:19 forrest if not could you try git+ssh://saltgituser@server/home/saltgituser/salty ?
05:20 shadowsun Yeah, I can still clone without a problem
05:20 forrest as root?
05:20 shadowsun as long as I connect to the remote user saltgituser
05:21 shadowsun git pull git+ssh://saltgituser@server/home/saltgituser/salty.git succeeds
05:21 forrest lame
05:21 shadowsun http://ur1.ca/f8puf
05:21 shadowsun yeah
05:21 shadowsun i.e. the only problem I find is that salt's having a problem with... idk
05:21 shadowsun something
05:22 forrest I'd say file it as an issue
05:22 forrest if anything, there needs to be a better error for that
05:22 shadowsun no shit
05:22 forrest because that one it gives is worthless.
05:22 shadowsun :/
05:22 forrest lol
05:22 forrest I just can't figure out the error
05:22 Rorgo joined #salt
05:22 shadowsun Now can I
05:23 shadowsun now
05:23 shadowsun aha
05:23 shadowsun /usr/lib/python2.6/site-packages/salt
05:23 forrest the lenght of the a hash isn't equal to the lenght of stdin where stdin = [up to date]?
05:23 shadowsun idk?
05:23 shadowsun It's obviously expecting two strings of the same length
05:23 forrest yea
05:23 shadowsun But I don't even know where it's populating them
05:24 forrest yea I'm trying to look through the code now
05:26 shadowsun aha
05:26 shadowsun I found where it's deleting from /tmp
05:26 shadowsun so I can at least take a look at the file on the minion to make sure it's empty
05:26 shadowsun -r-x------  1 root   root      0 Aug 26 23:26 tmpMtK68T*
05:27 shadowsun Yep, it's empty.
05:27 forrest hmm
05:28 shadowsun So the problem definitely exists purely on the master, as the minion never makes a call to the remote server with the git repo
05:28 forrest yea it isn't even getting that far, and even if it did, the git repo should be stored on the master, the minion never even sees it.
05:29 shadowsun yeah
05:29 shadowsun salt/fileserver/gitfs/py ?
05:30 forrest not sure
05:30 shadowsun gitfs.py I mean
05:30 shadowsun but
05:30 shadowsun hrm
05:31 forrest ok lets go back to the error
05:31 forrest why are we getting a not-for-merge error?
05:31 shadowsun I have no freaking idea.
05:32 Jahkeup joined #salt
05:32 shadowsun For that matter
05:32 shadowsun I don't see where we're getting an actual errr
05:32 shadowsun the string simply says "not for merge branch 'master' of repo" as far as I can tell
05:32 forrest Yea I don't know
05:33 forrest you said you strace'd the start up right?
05:33 shadowsun it looks like this is coming out of gitpython itself
05:33 shadowsun Yeah
05:35 forrest lets go super ghetto on this.
05:35 forrest http://stackoverflow.com/questions/2472552/python-way-to-clone-a-git-repository
05:35 forrest can you try to do that from the python shell?
05:36 forrest using a similar line to what you were using before
05:36 shadowsun yes
05:37 shadowsun 'Initialized empty Git repository in /root/temp/salty/.git/'
05:37 shadowsun using import git
05:38 shadowsun git.Git().clone()
05:38 forrest but it initialized an empty repo and didn't pull the content down?
05:38 shadowsun Oh no
05:38 shadowsun it worked perfectly.
05:38 shadowsun -.-
05:38 forrest lol
05:38 shadowsun I know right?
05:38 shadowsun lol
05:39 forrest I'd file it as an issue to see if we can get more details from the team
05:39 forrest and call it a night
05:39 forrest you'll figure it out after laying in bed for 10 minutes
05:39 forrest brain is starting to shut down for the evening
05:39 shadowsun you know
05:39 shadowsun Is salt doing a clone?
05:42 forrest looks like it according to line 200 of git.py
05:42 shadowsun git.py isn't importing git
05:42 shadowsun so
05:42 shadowsun Is salt using gitpython?
05:43 forrest can you try
05:43 shadowsun yes, it is in fileserver.git
05:43 forrest return 'git' if __salt__['cmd.has_exec']('git') else False
05:43 forrest try to execute a salt command to check that?
05:43 shadowsun salt/fileserver/gitfs.py is
05:43 shadowsun hrm ok
05:43 forrest just to confirm it is 'finding' git properly
05:44 shadowsun cmd.python right?
05:44 forrest uhh I think we want to run it as a salt command?
05:44 shadowsun yes
05:44 shadowsun salt 'target' cmd.python "command"?
05:44 forrest I THINK so
05:44 forrest but I don't know for sure when you're running it against the master
05:44 shadowsun I don't even know how to do that?
05:45 forrest yea neither do I
05:45 forrest lol
05:45 forrest Ugh I've gotta head out and get some sleep
05:45 forrest if you file this as an issue, or solve it, can you let me know in the IRC tomorrow?
05:46 shadowsun yeah
05:46 forrest Great thanks
05:49 krissaxton joined #salt
05:57 shadowsun ./salt/master.py:                    'Exception {0} occurred in file server update'.format(exc)
06:01 dthom91 joined #salt
06:04 Furao joined #salt
06:04 ollins joined #salt
06:09 masm joined #salt
06:16 masm I'm trying to create e renderer that works by executing a subprocess. Does anyone know any example of code doing that?
06:17 nonuby joined #salt
06:17 nonuby joined #salt
06:19 Jahkeup joined #salt
06:26 gildegoma joined #salt
06:29 TheCodeAssassin joined #salt
06:43 malinoff masm: What's the problem you have?
06:45 masm No problem. I don't code in Python since 2006 and would like to see some code for inspiration.
06:46 masm For example, get some ideas of how to pass arguments (pillar, grains, etc) to the subprocess.
06:46 masm So, the idea is to be able to write a renderer in Ruby, for example.
06:48 masm What I'm actually trying to do is create a Racket language for the state system.
06:49 krissaxton joined #salt
06:55 Furao joined #salt
06:56 malinoff masm: The best way is to look on one of the existing renderers, for example - smtp: https://github.com/saltstack/salt/blob/develop/salt/returners/smtp_return.py
06:57 masm Right.
06:57 masm It's actually a renderer, not a ruturner.
06:57 ml_1 joined #salt
06:57 malinoff masm: And http://docs.saltstack.com/ref/returners/index.html this page should help
06:57 malinoff masm: i mean, returner, ofc :)
06:57 malinoff masm: It is a returner, just look at link
06:58 masm I've seen the code for the existing renderers. The big difference between what I'm trying to do and all existing renderers is that all of them just call other python code.
06:58 masm Ah!
06:58 masm OK, understand.
07:00 BbT0n joined #salt
07:00 balboah_ joined #salt
07:01 malinoff masm: Sorry for misunderstanding, so what's your need? Returner or renderer?
07:02 xl1 joined #salt
07:06 Xeago joined #salt
07:13 qba73 joined #salt
07:17 chuffpdx joined #salt
07:19 Jahkeup joined #salt
07:21 ronc joined #salt
07:21 masm malinoff: A renderer.
07:23 masm So, I don't want to use jinja+yaml. Instead, I want to call a subprocess that sends a JSON representation to standard output, which I parse and return from the renderer.
07:23 abele joined #salt
07:24 masm I just read about returners and saw some code and I don't think that can help in this task...
07:25 malinoff masm: why don't you try the py renderer?
07:30 az87c joined #salt
07:30 az87c_ joined #salt
07:32 vaxholm_ joined #salt
07:33 wimbo joined #salt
07:33 wimbo hello
07:33 wimbo can somebody help with states?
07:33 wimbo i need get some value for state
07:34 syngin wimbo: go on...
07:34 scott_w joined #salt
07:34 wimbo for example use 'salt \* state.highstate value=user' and in state config use ' name: {{value[user]}}
07:36 syngin hmm
07:36 syngin i'm not familiar with that kind of thing - lemme check...
07:37 wimbo can i get pillar from command line?
07:37 wimbo or only from pillars file?
07:37 syngin yeah
07:37 syngin salt \* pillar.items
07:37 syngin salt \* pillar.item KEY
07:38 wimbo so, i can use salt \* pillar.item username and in state file use {{pillar[username]}} ?
07:39 wimbo or how?
07:39 syngin {{ pillar['username'] }}
07:40 wimbo but if i use 'salt \* pillar.item username2' i need user in state file {{ pillar[username2] }}?
07:40 wimbo there i get value for key?
07:40 syngin what is it that you're trying to do?
07:40 syngin it sounds like things are the wrong way around.
07:40 wimbo im trying to get argument for state.highstate
07:40 syngin why?
07:41 Furao joined #salt
07:41 wimbo i create states file with creating mysql user, and i need to create different users on different minions
07:43 syngin and do you know what the usernames are beforehand?
07:43 wimbo yeap
07:43 syngin so your pillar data should contain all of the usernames only for the minion that the pillar is for.
07:43 syngin i.e., the pillar data for minion A and minion B is different.
07:44 syngin maybe something like each minion has a list of mysql usernames in the pillar for each minion that needs mysql users.
07:45 Furao joined #salt
07:45 malinoff wimbo: You can't pass any arguments to the highstate
07:47 syngin malinoff: are commandline arguments added like that (k=v) just passed into the state function as named params?
07:50 krissaxton joined #salt
07:50 malinoff syngin: Yes, except for the highstate. Highstate simply means, "hey salt, i've described all needed states and variables, please, look through *.sls files, top.sls files and pillars, get them all, run renderers and apply what you got to the minions described in my top.sls files"
07:51 syngin gotcha. thanks.
07:55 malinoff syngin: You're welcome. As i see, highstate is the highest abstraction level, so there shouldn't be any possibility to pass some concrete data to it. It's like python's "object" object.
07:58 wimbo so how i can get k=v?
07:58 wimbo sudo salt \* pillar.item k=v and from state can use {{ pillar[k] }} ?
08:00 aleszoulek joined #salt
08:01 malinoff wimbo: What exaclty do you want? Can you describe yout task please?
08:02 wimbo i need create mysqltable, user and password depengind on that minion i run state.highstate
08:06 malinoff wimbo: How this dependency looks like?
08:07 malinoff wimbo: Is it predefined for each minion, or calculates on the fly?
08:07 wimbo good thing to do on the fly
08:08 abele joined #salt
08:12 ninkotech joined #salt
08:12 ggoZ joined #salt
08:15 malinoff wimbo: I think, the best way would be to use grains. Since each minion has his own grains, and there is no predefined values, i would try this approach.
08:15 malinoff Something like https://gist.github.com/malinoff/6350959
08:15 malinoff http://docs.saltstack.com/ref/states/all/salt.states.mysql_user.html?highlight=state%20mysql#salt.states.mysql_user maybe this would help
08:17 malinoff This state will compile on the minion, and minion's id will be used in the username and the password fields.
08:17 wimbo how i can create table from salt.state.mysql_database?
08:17 malinoff Of course, you can use any grain you want
08:18 malinoff wimbo: You should use the mysql module for that. http://docs.saltstack.com/ref/modules/all/salt.modules.mysql.html?highlight=module%20mysql#salt.modules.mysql
08:19 wimbo i can use it from states?
08:20 Jahkeup joined #salt
08:20 malinoff I can't find such state. So, probably, you can't.
08:22 malinoff You can write your own state for this. https://github.com/saltstack/salt/blob/develop/salt/states/mysql_database.py - here you can find implementation of existing states.
08:23 zooz joined #salt
08:23 malinoff Oops
08:23 malinoff My bad
08:23 malinoff :)
08:23 malinoff http://docs.saltstack.com/ref/states/all/salt.states.mysql_database.html?highlight=state%20mysql#salt.states.mysql_database.present this state will create a db, if it's not present
08:24 wimbo http://pastebin.com/iKhZ3Crw
08:24 syngin joined #salt
08:24 wimbo can you check my example?
08:26 wimbo i need create db mc2_auto (for example), user auto and password id+pass
08:29 ollins Hi, what is the best way to upgrade an application (server with db) delivered as tar.gz with salt? Upgrading includes backup of db and config files. Is building deb-files (Ubuntu) the best way? But this seem to be a little bit too much. Any ideas?
08:29 zooz joined #salt
08:30 malinoff wimbo: As is see, it's all ok except 9th line, grains is just python's dict, and keys are strings, so you must explicitly define a key as a string.
08:30 malinoff wimbo: make {{grains['id'] }} and this should work
08:35 malinoff ollins: building deb package, as i see, is the simpliest way :)
08:37 wimbo thx, but i have another problem :)
08:37 malinoff wimbo: ?
08:40 wimbo oh
08:40 wimbo i fixed :)
08:40 ollins malinoff: I told myself that I have to do this. Thx.
08:40 wimbo http://pastebin.com/NubSqzfu
08:41 wimbo mysql module need to add "connection_user/pass"
08:42 malinoff ollins: It is not really difficult :) http://abz89.wordpress.com/2008/03/24/building-debian-deb-package-from-tarball-source-targz/
08:42 malinoff wimbo: Cool
08:43 ollins malinoff: very kind. Thx!
08:45 malinoff ollins: huh, i've been building an rpm package for the first time about 2 weeks ago. Just say 'thanks god i have a debian-based system' :)
08:46 qba73 joined #salt
08:46 ollins joined #salt
08:47 carlos joined #salt
08:51 krissaxton joined #salt
08:52 wimbo malinoff
08:52 wimbo can you help ?:)
08:53 malinoff wimbo: yes, i can :)
08:53 wimbo so i need use not static password for mysql user
08:54 wimbo for example i need use sql query SELECT PASSWORD(now()); save in variable and use in another state files
08:54 wimbo can i do that?
08:56 Jahkeup joined #salt
09:03 malinoff wimbo: I don't know exactly, but it seems you should take a look at docs.saltstack.com/topics/development/external_pillars.html
09:03 malinoff http://docs.saltstack.com/topics/development/external_pillars.html
09:05 malinoff wimbo: Pillars is just persistent storage that can be used in states (*.sls files) like that: {{ pillar['mysql_username'] }}  and available only for user you specified in pillar's top.sls file
09:08 wimbo i need use somethinf like state.sync_all ?
09:08 wimbo or what? to use pillart or they only on master?
09:09 felixhummel joined #salt
09:12 malinoff sync_all will just "sync all", that means, it will transfer all needed files to the specified minions
09:12 malinoff Pillars are defined on the master, but when you run highstate or sync_all they transfers to the minions
09:13 wimbo can you give example of top.sls file for pillar?
09:18 malinoff http://docs.saltstack.com/topics/pillar/index.html
09:24 mbs35 joined #salt
09:25 mbs35 how should someone start reading salt code ?
09:25 malinoff msb35: Do you mean source code?
09:26 mbs35 yes
09:26 mbs35 i have git cloned it
09:27 mbs35 i am novice to large code bases would like to get ideas how should that code be read
09:27 mbs35 any pointers how code is organized ?
09:28 malinoff mbs35: as usual. From the beginning: https://github.com/saltstack/salt/blob/develop/scripts/salt
09:31 mbs35 ok back to pencil and paper then thanks
09:31 malinoff Bye all, see you tomorrow
09:31 Jahkeup joined #salt
09:43 Nobbl joined #salt
09:43 Nobbl moin :)
09:51 joehh joined #salt
09:51 krissaxton joined #salt
09:56 nonuby joined #salt
09:56 nonuby joined #salt
09:59 Gwynn joined #salt
09:59 Gwynn Hi. I
09:59 Gwynn i'am newbie in salt, and need som help with salt logic
10:01 Gwynn I'm first start with user managment. I have hundreds servers, with different roles. As example admin server, development servers, application servers. And i need defferent users on this servers.
10:01 Furao joined #salt
10:02 Gwynn An example: admins servers only with admin users, de servers with admins and developers, application - with admins and support
10:04 Gwynn Can I place all of this users in one pillar ?
10:04 Gwynn example:
10:04 Gwynn users:
10:04 Gwynn admin1:
10:04 Gwynn role: admin
10:04 Gwynn uid: 3000
10:05 Gwynn devel1:
10:05 Gwynn uid: 4000
10:05 Gwynn role: devel
10:05 Gwynn How can i relate user roles with minions ?
10:05 s1acky joined #salt
10:07 s1acky hi all. I cant understand why if I do state.highstate sometime it return nothing? How can I debug it?
10:07 s1acky like this:
10:07 s1acky [root@control dc-files]# salt 'dc-nl2' state.highstate
10:07 s1acky [root@control dc-files]#
10:08 giantlock joined #salt
10:09 matanya joined #salt
10:11 linjan__ joined #salt
10:17 Gwynn1 joined #salt
10:18 MrTango joined #salt
10:19 Gwynn1 left #salt
10:19 Gwynn1 joined #salt
10:21 Gwynn joined #salt
10:21 nonuby joined #salt
10:21 nonuby joined #salt
10:31 aleszoulek s1acky: Not an ideal solution, but I try to run those commands with -t 1000. This basicaly sets the timeout high enought for the shell to wait for the result
10:32 Jahkeup joined #salt
10:37 s1acky aleszoulek: hmmm thanks
10:38 aleszoulek s1acky: But even in your example, there is a job cache that remebers the result of the command. So you could definitely look back what happened there.
10:43 whiskybar joined #salt
10:46 blee joined #salt
10:48 wimbo slacky: you can login to minion and run command "salt state.highstate
10:48 wimbo and you see what minion do
10:52 wimbo oh sorry
10:52 krissaxton joined #salt
10:52 wimbo run "salt-call state.highstate"
10:59 madduck could someone please take a look at http://slexy.org/raw/s29WmUvxl3? It seems I am missing something very obvious…
11:00 madduck the top data seem correct. The etc_hosts state is found and correct. But why can't I apply highstate?
11:03 madduck where is UtahDave anyway?
11:10 Spads_ joined #salt
11:10 Spads_ joined #salt
11:12 wimbo hey
11:12 wimbo can you get files tree on master?
11:13 wimbo salt understand this "black.virt.local" how directory black on same directory there top.sls, in this dir (black) exists dir virt, on dir virt exists dir local/init.sls or local.sls
11:13 Furao wimbo: check cp modules
11:14 wimbo ?
11:14 madduck wimbo: but black.virt.local is the *hostname*
11:14 madduck i don't understand why it's being treated as a state
11:15 wimbo what you want to do?
11:16 aleszoulek missformed top file?
11:17 aleszoulek hmm.. sry
11:18 madduck aleszoulek: the top data come from master_tops
11:18 blee joined #salt
11:18 madduck but looking at the state.show_top output, they seem right, no?
11:19 aleszoulek yeah... mine (working) returns similar output
11:20 ninkotech joined #salt
11:20 madduck can you show me just to be sure?
11:21 Slipo joined #salt
11:23 aleszoulek madduck: http://slexy.org/view/s2155W3aIq
11:24 madduck aleszoulek: yeah, identical. What version are you running?
11:24 nonuby joined #salt
11:24 aleszoulek 0.16.3 i believe
11:25 JPmx joined #salt
11:32 Jahkeup joined #salt
11:33 liuyq joined #salt
11:38 krissaxton joined #salt
11:52 mgw joined #salt
11:54 david_a joined #salt
11:55 aptiko joined #salt
11:59 wimbo who can help with mysql state?
11:59 bhosmer joined #salt
11:59 wimbo mysql_database.present
11:59 lemsto joined #salt
12:00 wimbo how i can enter to use utf8 on creating table?
12:01 dthom91 joined #salt
12:05 bemehow joined #salt
12:08 mgw joined #salt
12:09 aptiko I'm a salt newbie who knows Puppet and some Fabric. I'm somewhat confused. The equivalent of a puppet module is a salt formula? And a salt module is the equivalent of a collection of fabric tasks?
12:12 madduck aptiko: yes on module→formula, but I don't know what Fabric has to do with Puppet. A Salt module is just a piece of functionality that can be invoked, e.g. with a state. For instance, file.managed is a module to manage files, just like the File resource in Puppet.
12:12 madduck So I think salt module → puppet resource is more accurate
12:13 madduck you can use those directly for remote execution too, so maybe it's not too different from fabric
12:14 bhosmer joined #salt
12:16 aptiko madduck: Thanks. I think the word "module" is used in salt with many meanings. "Salt modules are the functions called by the salt command." (http://docs.saltstack.com/ref/modules/index.html).
12:16 aptiko Elsewhere these are called "execution modules".
12:16 madduck yeah, module is horribly overused
12:17 aptiko There are also "state modules" - I don't understand exactly what these are.
12:17 madduck sls modules?
12:17 aptiko If I wanted to write a formula in python, I'd use a state module perhaps?
12:18 madduck sounds about right…
12:18 madduck if a state module is a collection of states…
12:18 madduck (and sls file, or a directory with multiple related sls files)
12:20 waverider joined #salt
12:21 Jahkeup_ joined #salt
12:22 waverider joined #salt
12:28 brianhicks joined #salt
12:28 gmoro joined #salt
12:28 qba73 joined #salt
12:28 madduck aleszoulek, wimbo: very strange: https://groups.google.com/forum/#!topic/salt-users/howC5OTO2Mw
12:29 Spads joined #salt
12:30 mwillhite joined #salt
12:30 liuyq joined #salt
12:31 qba73_ joined #salt
12:34 matanya joined #salt
12:40 krissaxton joined #salt
12:42 kenbolton joined #salt
12:46 quantumsummers|c joined #salt
12:48 Nobbl joined #salt
12:53 ipmb joined #salt
12:56 juicer2 joined #salt
12:59 aptiko I want am at a loss as to how to achieve the salt state "make sure package XYZ is installed", where installing it requires compilation (./configure && make && makeinstall). Any pointers?
12:59 aptiko s/makeinstall/make install/
13:00 aptiko s/want//
13:01 oz_akan_ joined #salt
13:02 littleidea joined #salt
13:04 unicoletti_ joined #salt
13:05 Gifflen joined #salt
13:08 aat joined #salt
13:08 joehh aptiko: people often say "make a deb/rpm package", but you probably don't want to go that far
13:09 aptiko joehh: Yes, I know that is the correct way, and that's how I usually do it (in Puppet), but in this particular case I want to do it the simple way. I think cmd.run is what I need.
13:09 joehh one possibility is to use file.managed to get a bash script onto the machine and then use cmd.run
13:09 blee joined #salt
13:09 joehh to run your ./configure etc
13:10 joehh it may also be worth putting an unless "guard" on the cmd.run - need to check syntax there
13:12 joehh unless or onlyif to check if binary exists in the right place
13:12 anteaya joined #salt
13:12 oz_akan_ joined #salt
13:14 racooper joined #salt
13:14 jeffasinger joined #salt
13:22 whit joined #salt
13:23 alunduil joined #salt
13:28 Nexpro joined #salt
13:29 Odd_Bloke joined #salt
13:32 tomviner joined #salt
13:32 toastedpenguin joined #salt
13:33 tomviner hello there, I have a beginner question about using salt:
13:33 blee joined #salt
13:33 tomviner if I'm using commands like this over vagrant-salt: sudo salt-call --local state.sls zapp.database
13:34 tomviner what would the command for running a salt command be?
13:34 Nexpro joined #salt
13:34 tomviner e.g. say I wanted to append to a file, as in https://salt.readthedocs.org/en/v0.13.3/ref/states/all/salt.states.file.html#salt.states.file.append
13:42 m_george left #salt
13:45 Kholloway joined #salt
13:46 MrTango joined #salt
13:47 alunduil joined #salt
13:48 sgviking joined #salt
13:50 kaptk2 joined #salt
13:51 tyler-baker joined #salt
13:51 tyler-baker joined #salt
13:58 mmilano joined #salt
13:59 mannyt joined #salt
14:01 ggoZ joined #salt
14:06 whit joined #salt
14:07 ml_1 joined #salt
14:08 Furao i guess no one use reactor
14:09 Furao the doc is so incomplete
14:09 jams1 joined #salt
14:10 premera joined #salt
14:10 Furao 'reactor' is not even listed in the master settings :)
14:17 p3rror joined #salt
14:19 jams2 joined #salt
14:20 cron0 joined #salt
14:20 cron0 joined #salt
14:25 ml_1 joined #salt
14:27 KennethWilke joined #salt
14:27 tca joined #salt
14:28 bhosmer_ joined #salt
14:30 jams1 joined #salt
14:33 opapo joined #salt
14:34 qba73 joined #salt
14:34 gmoro joined #salt
14:34 chortlehoort joined #salt
14:34 [diecast] joined #salt
14:35 abe_music joined #salt
14:35 nonuby joined #salt
14:35 nonuby joined #salt
14:36 lazyguru joined #salt
14:37 s0undt3ch joined #salt
14:46 jalbretsen joined #salt
14:47 jams2 joined #salt
14:49 jams2 joined #salt
14:49 ml_11 joined #salt
14:55 krissaxton joined #salt
14:56 ckao joined #salt
14:56 jpeach joined #salt
15:00 waverider joined #salt
15:00 NotreDev joined #salt
15:04 forrest joined #salt
15:04 forrest shadowsun, did you figure that out?
15:06 JoAkKiNeN joined #salt
15:08 ksalman heya, I have a cmd.run that requires a long running git checkout (on the first run). Even though I require: the git checkout in cmd.run it looks like cmd.run is executed before git checkout is complete, and so cmd.run fails because some files aren't there yet
15:09 ksalman is it possible for me to make cmd.run wait until the git checkout is done?
15:11 jams1 joined #salt
15:12 teskew joined #salt
15:16 jams1 joined #salt
15:16 lemao joined #salt
15:17 unicoletti left #salt
15:22 danielbachhuber joined #salt
15:24 Jahkeup joined #salt
15:24 TheRealBill joined #salt
15:26 waverider left #salt
15:26 Jahkeup joined #salt
15:33 UtahDave joined #salt
15:34 StDiluted joined #salt
15:36 mjulian I renamed a minion and now I'm having issues sending it commands.
15:36 mjulian It has a new key, test.ping works, but it won't run highstate.
15:36 mjulian as in, it just sits forever.
15:37 mjulian Any thoughts?
15:37 renoirb Hi everybody :)
15:38 UtahDave Hey!
15:38 * madduck waves to UtahDave
15:38 madduck about time you show up ;)
15:38 KennethWilke howdy
15:38 UtahDave Everyone, Salt just reached 500 unique code contributors!!  http://www.ohloh.net/p/compare?project_0=salt
15:39 renoirb Hi UtahDave dave_den I am working on an environment based cluster
15:39 renoirb reading: http://www.saltstat.es/posts/environment-based-clusters.html
15:39 UtahDave lol   Yes, madduck.  You're quick with the timezone conversions, huh?   lol
15:39 renoirb and it feels something is missing
15:39 UtahDave howdy, KennethWilke!
15:39 madduck UtahDave: I expect helpful people like you to be available 24/7, is that too much to ask? ;)
15:39 Lue_4911 joined #salt
15:39 UtahDave lol.  madduck, I do my best.  :)
15:39 KennethWilke oo very nice @ contrib count
15:40 ksalman heya, I have a cmd.run that requires a long running git checkout (on the first run). Even though I require: the git checkout in cmd.run it looks like cmd.run is executed before git checkout is complete, and so cmd.run fails because some files aren't there yet
15:40 ksalman is it possible for me to make cmd.run wait until the git checkout is done?
15:40 madduck UtahDave: i know
15:42 carlos joined #salt
15:43 devinus joined #salt
15:46 UtahDave ksalman: a cmd.run that requires another state shouldn't start executing until the required state returns successfully
15:47 UtahDave renoirb: what do you feel is missing?
15:47 renoirb It finish without really describing what should be in each environment top file
15:47 renoirb in common I would make three 'base', 'development', 'production'
15:48 renoirb and then, if I really need to override I do in the subfolder ?
15:48 SunSparc joined #salt
15:48 UtahDave In that example he only has 1 top file.
15:49 UtahDave It's legal to have a separate top file for each environment, but I discourage that.
15:50 UtahDave If you follow his example there he has one top.sls that does all the matching for the 3 environments.
15:50 UtahDave mjulian: I would ssh into the minion and stop the minion service. Then run the minion in the foreground in debug mode.     sudo salt-minion -l debug
15:51 UtahDave mjulian: then run the hightstate from the master and see if the minion gives you any errors or tracebacks
15:51 mjulian UtahDave: I did that. Watching the console on the minion, it just keeps running a process list.
15:51 mjulian but no errors or tracebacks.
15:54 kvt joined #salt
15:56 renoirb UtahDave: so I misinterpreted or did not get something there. I only have to have a top.sls in common then, right?
15:57 UtahDave renoirb: yep!  that's what I highly recommend. Otherwise it gets complicated quickly
15:57 renoirb sure it gets complicated
15:57 renoirb since I only have one environment with a list of all
15:58 renoirb now i have to make the three environments in the same top file, but thats the only duplication we get
15:58 renoirb (just started vagrant workspace with recommendations, i want to see it working)
15:58 mjulian UtahDave: It repeatedly executes this: http://pastebin.com/Gts1RBdw
15:58 mjulian plus the output of the ps
15:58 mjulian waits a bit and does it again.
15:59 mjulian the master doesn't ever finish
16:00 mjulian And I just verified again that it works perfectly on another minion. It also worked fine before I renamed this minion.
16:01 krissaxton joined #salt
16:04 aat joined #salt
16:05 juanlittledevil joined #salt
16:06 UtahDave mjulian: what version of Salt?
16:06 KyleG joined #salt
16:06 KyleG joined #salt
16:06 krissaxton joined #salt
16:07 joakki joined #salt
16:07 mjulian 0.15.3 on master and minion
16:07 bitz joined #salt
16:10 juanlittledevil joined #salt
16:12 NotreDev joined #salt
16:15 madduck UtahDave: in case you are bored, here's a hard nut: https://groups.google.com/forum/#!topic/salt-users/howC5OTO2Mw
16:16 az87c joined #salt
16:16 BbT0n joined #salt
16:17 TheCodeAssassin joined #salt
16:17 az87c_ joined #salt
16:17 az87c__ joined #salt
16:17 az87c___ joined #salt
16:22 bitz joined #salt
16:24 TheCodeAssassin joined #salt
16:25 blee is there any reason why when installing 1 package in pacman (archlinux) salt actually runs a command to upgrade the entire system?
16:26 logix812 joined #salt
16:26 blee that was an unsuspected suprised last night when i ran salt to install iftop last night, heh
16:30 forrest that shouldn't be happening at all blee
16:31 cedwards blee: terminalmage is probably the one to talk to about that
16:31 UtahDave madduck: Yeah, I read through that this morning.  I'm suspecting that it's a bug, but I'll set up a test later today.
16:31 madduck UtahDave: I am about to start testing this too.
16:31 madduck just had to get reclass 1.0.1 out the door.
16:32 UtahDave ah, cool, madduck
16:32 TheCodeAssassin Hey UtahDave have you used proxmox with openvz before?
16:33 UtahDave No, I haven't, TheCodeAssassin
16:33 TheCodeAssassin Do you do virtualisation?
16:35 UtahDave I've used libvirt w/kvm before
16:35 teebes joined #salt
16:36 TheCodeAssassin Doesnt kvm perform worse then openvz?
16:37 UtahDave Bah!  My Peanut M&M jar is empty!!
16:37 Micromus_ joined #salt
16:37 xt and your stomach is full?
16:37 xt TheCodeAssassin: it's not doing the same task
16:37 xt TheCodeAssassin: but containers _should_ be faster than full virt
16:38 forrest Peanut M&Ms are the best variety, not so great for the gut though
16:40 dthom91 joined #salt
16:40 UtahDave TheCodeAssassin: I have no idea. I wasn't using it on production
16:40 carmony joined #salt
16:41 ml_1 joined #salt
16:41 TheCodeAssassin Ok, we are currently evaluating proxmox with openvz
16:42 TheCodeAssassin Was just wondering if anyone had experience with it
16:42 TheCodeAssassin Because im kinda new to it
16:43 chrisgilmerproj joined #salt
16:44 SunSparc joined #salt
16:45 chrisgilmerproj left #salt
16:45 mgw joined #salt
16:46 KennethWilke wow this git ext_pillar is killing me
16:46 UtahDave TheCodeAssassin: that's cool. I've used several different virtualization technologies, but only in a light way.
16:47 KennethWilke i'm sitting here watching it give me different results for different nodes run after run :(
16:51 forrest Does anyone live in Atlanta near the Georgia Tech campus?
16:52 TheCodeAssassin joined #salt
16:54 xt TheCodeAssassin: isn't LXC more popular these days?
16:56 matanya joined #salt
16:58 jacksontj joined #salt
16:59 mgw joined #salt
17:02 jbunting joined #salt
17:02 jbunting left #salt
17:05 terminalmage blee: https://wiki.archlinux.org/index.php/Pacman#Partial_upgrades_are_unsupported
17:06 Jahkeup joined #salt
17:08 mortis_ can you create several directories in one statement without recursing over a salt://somethng subfolder? like say /tmp/foo: /tmp/bar: file.directory ..etc
17:12 UtahDave mortis_: can you pastebin what you've tried so far?
17:13 mortis_ UtahDave: experimenting now :)
17:13 juanlittledevil joined #salt
17:14 kermit joined #salt
17:15 madduck UtahDave: i am close to giving up. I can't figure out from the source *at all* where the code diverges between top.sls and master_tops
17:16 krissaxton joined #salt
17:16 madduck I mean, my approach would be to verify where the two diverge in the data they return. But it's so obfuscated with the Loader… and it even seems as if the minion is causing the tops to be assembled!!?!?!??!!
17:17 mattmtl joined #salt
17:21 tuxIO joined #salt
17:23 UtahDave sorry, madduck. I'm not going to be able to set that test up until later today. I won't be able to help much until then
17:23 madduck UtahDave: was just wondering if you had an inkling as to where the two diverged, or where I should start looking…
17:23 bhosmer joined #salt
17:24 devinus joined #salt
17:24 UtahDave I don't unfortunately.  I haven't dug into the master tops code for 8 or 9 months
17:25 jacksontj question, when using the compound commands in the internal salt python API, how do you pass down kwargs to each module function?
17:28 jaequery joined #salt
17:33 alunduil joined #salt
17:37 devinus joined #salt
17:38 mattbarto joined #salt
17:39 entil I'm still utterly confused why salt sometimes tells me things like Comment:   State require.mdadm found in sls raid1 is unavailable
17:39 madduck UtahDave: I deleted Tom's email, but you might want to let him know that http://careers.stackoverflow.com/jobs/employer/SaltStack shows 0 jobs…
17:39 gamingrobot I see 3
17:39 entil under which circumstances are states unavailable? or what's wrong with them?
17:40 madduck gamingrobot: wtf?
17:40 madduck am i being discriminated for living in .eu? ;)
17:40 gamingrobot madduck: http://db.tt/zn5DZ1Aq
17:41 madduck 0 here
17:45 moondawg joined #salt
17:46 moondawg What site/document has the side by side comparison of saltstack, puppet, and chef?
17:46 alexandrel madduck: I see 3 also
17:47 kermit joined #salt
17:47 madduck moondawg: waste of time, as that depends on your use case.
17:47 moondawg madduck: config management for apache and jboss
17:47 Xeago joined #salt
17:48 blee terminalmage, fair enough, i guess we just need to be more vigilant
17:48 madduck i can't tell you. I hate Puppet and since I also hate Ruby, I won't touch Chef either.
17:48 alexandrel moondawg: You could make one.
17:48 madduck moondawg: so, use saltstack ;)
17:48 moondawg madduck: I need to make the case that saltstack is better
17:48 madduck it's faster
17:49 madduck the community is more open
17:49 madduck it's younger and thus more flexible
17:49 alexandrel it's in python... if you have inhouse python devs, the case is easy to make.
17:49 entil +1 for the salt community
17:49 madduck alexandrel++
17:49 moondawg madduck: that is good, but what features does saltstack have over puppet
17:49 madduck moondawg: it consumes 10% of RAM
17:49 racooper salt is a lot easier to get running than puppet, from my testing
17:49 madduck of the RAM usage of Puppet
17:49 carlos_ joined #salt
17:50 entil but -1 for things like googling for what an unavailable state means and getting nothing from google, when it seems like people could hit it and an faq entry or something would be nice
17:50 madduck Salt logging is still quite bad, but it's better than Puppet
17:50 moondawg madduck: I am a python dev surrounded by perl devs............yuck
17:50 jacksontj i run salt in single master with 8k+ minions without issue-- puppet has problems that big ;)
17:50 alexandrel moondawg: baw perl is a good shell script replacement.
17:50 madduck alexandrel--
17:50 alexandrel cool, back to 0.
17:50 madduck -1. you all start at -1
17:50 alexandrel :/
17:51 alexandrel can't help it, the more I learn about python, the more I realise it won't entirely replace perl for me...
17:51 madduck next time, try harder ;)
17:51 madduck perl is good for text processing.
17:52 moondawg I am in the process of rewriting 990+ perl and ksh scripts into a single python package as part of devops work
17:52 alexandrel jacksontj: no shit? 8k minions? not even federated?
17:52 alexandrel woa
17:52 moondawg fun stuff
17:52 madduck moondawg: that does not sound like unix.
17:53 moondawg madduck: it is what I inherited
17:53 madduck the 990+ scripts sound like unix. your plan does not.
17:55 moondawg madduck: not my choice. The scripts are very adhoc and break easily. So management said to rewrite them all. I am providing a framework written entirely in python that allows jobs(aka scripts) to be written as a python or java class.
17:55 madduck good luck
17:58 Lue_4911 joined #salt
17:58 jacksontj joined #salt
17:58 moondawg madduck: it has been fun thus far. Now it is a matter of bringing in a config management solution to replace all the rsyncing going on across a few hundred servers.
18:00 TheCodeAssassin joined #salt
18:00 TheCodeAssassin Xt, what is that
18:00 madduck if you consider this sort of thing fun, then I might have a job for you at the university here. SAY YES NOW! ;)
18:00 alexandrel hundreds? gawd it must be mess... the horrible crontab...
18:00 dave_den hey madduck - i'm going to start playing with reclass today. i saw your master_tops/tops.sls issue on the list. i can try to help you debug it if you let me know what git rev you are running
18:01 madduck dave_den: bleeding edge develop
18:01 madduck dave_den: (master). 0.16.3 minions.
18:01 madduck 0.16.3 does not work with reclass yet. :(
18:01 dave_den ok perfect.
18:01 Lue_4911_ joined #salt
18:02 dave_den i had an issue getting develop working yesterday because of https://github.com/saltstack/salt/pull/6888 so let me get set up without reclass first
18:02 madduck dave_den: that's fixed.
18:04 entil is it possible that my state.require(MDADM_STATE_NAME) definition is executed before the mdadm state is complete? because the salt state code for raid asks for salt.utils.which('mdadm') and if it wasn't completely installed, it might cause that issue, yes?
18:05 entil this is pydsl and afaict it's ok to pass the string name of the requisite like above
18:05 madduck dave_den: #reclass btw, but here works too
18:05 madduck #reclass /oftc
18:06 dthom91 joined #salt
18:06 giantlock joined #salt
18:07 dave_den madduck: #reclass on which irc network? says #reclass is empty on freenode
18:07 madduck irc.oftc.net ← dave_den
18:07 dave_den ah
18:07 madduck or .org
18:08 entil raah, put print statements into /usr/share/pyshared/salt/states/mdadm.py and it does find the mdadm utility, still the state is "unavailable"
18:08 cedwards moondawg: have you found any comparisons? still looking?
18:09 devinus joined #salt
18:09 moondawg cedwards: nope, not yet
18:10 cedwards moondawg: there are some decent blog posts out there. I'll see if I can dig a few up.
18:10 cedwards moondawg: in my experience though, having worked with puppet and salt, I prefer the syntax in salt for config management. it's more consise and expressive.
18:10 moondawg cedwards: thanks. whatever I am able to convince management to use.....they are going to buy into a enterprise license.
18:11 cedwards moondawg: as was mentioned earlier, salt is also much more scalable. 10k hosts to a single master is not unheard of. that just doesn't happen in puppet.
18:12 tuxIO joined #salt
18:15 moondawg cedward: as we look to the cloud for more horsepower, this will definitely be a requirement
18:16 brianhicks joined #salt
18:17 cedwards moondawg: salt-cloud makes cloud provisioning really easy.
18:17 cedwards moondawg: salt does config management, orchestration, cloud, etc. puppet does config management.
18:19 jpeach is there any way to introspect salt states from, say, a custom grain?
18:19 entil I actually came up with a theory as for why it fails. I required the string name, but maybe it's either state.require(pkg=NAME) *or* state.pkg.require(NAME)
18:19 jpeach what I'm thinking of is a way to know all the services that are being managed by salt, so that I can whack every service that is not being managed
18:20 entil and I didn't have pkg in there. gonna grab a snack and check the results when I'm back :P
18:20 cedwards moondawg: this has some interesting notes about why a user chose Salt after trying puppet: http://serverfault.com/questions/415713/what-advantages-features-does-puppet-or-chef-offer-over-salt-or-vice-versa
18:20 moondawg cedwards: give me an orchestration use case
18:22 cedwards moondawg: running one-off commands across a set of machines. gathering data from a central location.
18:22 cedwards moondawg: the config management system and the orchestration system leverage the same underlying modules, so you can template something via config management, or just apply it on the fly.
18:22 moondawg cedwards: got it. they do that today, but very adhoc
18:23 CheKoLyN joined #salt
18:23 moondawg cedwards: thanks for the help
18:24 druonysus joined #salt
18:31 mgw joined #salt
18:33 aleszoulek joined #salt
18:35 Xeago joined #salt
18:37 andrew_seattle joined #salt
18:38 jacksontj joined #salt
18:40 entil ok, now I'm getting real errors that might actually go down to a bug or confusion in the pydsl documentation!
18:40 entil TypeError: __call__() takes at least 2 arguments (1 given)
18:41 entil so I give it the string-type state name, and it complains pkg is None, so I give it both (unlike the documentation)
18:41 entil it still says PyDslError: Invalid a requisite reference declaration! mdadm pkg: None
18:41 entil dev_state.pkg.require(MDADM_STATE_NAME, pkg=MDADM_STATE_NAME)
18:41 entil MDADM_STATE_NAME = 'mdadm pkg'
18:44 mattmtl joined #salt
18:46 kvt joined #salt
18:54 anteaya joined #salt
18:57 Jahkeup joined #salt
18:58 Ryan_Lane is there a way for salt-call to timeout if the master is down?
18:58 Ryan_Lane when making calls that talk to the master
19:00 Ryan_Lane I'm trying to have puppet call saltutil.sync_all/saltutil.refresh_pillar on grain changes, but I don't want puppet to block everywhere if the salt master is down
19:01 Ryan_Lane also, I target grains in my top.sls, and I get this error on minions that don't match the grain: [ERROR   ] Targeted grain "deployment_target" not found
19:04 auser joined #salt
19:08 tuxIO joined #salt
19:09 zooz joined #salt
19:13 moondawg I have setup a scheduled job as a pillar on a minion, but I do not ever see it running. Here is my pillar tree http://pastebin.com/HvpvRjEp
19:13 Jahkeup joined #salt
19:14 StDiluted can you use jinja in a salt command line?
19:14 StDiluted like, echo a grain value into a config file?
19:17 moondawg The only job that I ever see run is "Running scheduled job: __mine_interval"
19:18 fremder99 joined #salt
19:19 moondawg "salt-call pillar.items" returns the corrent schedule data structure
19:19 dthom91 joined #salt
19:21 druonysus joined #salt
19:21 druonysus joined #salt
19:24 devinus joined #salt
19:24 z0rkito hey guys, having an issue getting my #!py states to return.  I've put together a test that replicates the issue i'm seeing for the rest of my states here: http://pastebin.com/fRjhGaGn
19:25 juanlittledevil joined #salt
19:26 z0rkito i wasn't able to find any docs on how to build the return dict from a #!py state, so i just dug around github until i could find any example... seems to be wrong tho based on the output im getting.
19:27 entil I can relate with my pydsl issues, putting print statements around pydsl.py to figure things out
19:27 entil unfortunately I don't know anything about py states either
19:29 qba73 joined #salt
19:29 moondawg z0rkito: have you tried putting the state in yaml format, turn on debugging "-l debug
19:30 moondawg z0rkito: and lookup at the output. Tailor your dict to the output
19:32 entil hey hold on
19:32 entil how do you see the rendered output exactly?
19:32 moondawg z0rkito: You should see something like "Results of YAML rendering:{'blah': {'blah': blah}}"
19:32 entil maybe I could debug this fscker somehow like that
19:33 entil then again, it dies on an exception so it probably doesn't render
19:33 z0rkito moondawg: yeah, that's what i started with, didn't work.  then went looking for examples/docs.  the docs on !py and !pydsl are extremely lacking.
19:33 entil +1
19:35 entil saying dev_state.pkg.require(pkg=mdadm_state) - which is totally against the documentation - leads to something that might work, but then it looks for name "set" in requisites and dies on PyDslError: No state function specified for module: pkg
19:35 littleidea joined #salt
19:35 entil which makes zero sense again
19:36 moondawg z0rkito: I have a test environment up and I am going to have to use some !py in the future so I am going to try and make your pastebin example work. Here I go
19:36 entil oh, it might actually be an internal state in salt, and thus maybe even valid, but then it's all about where that final exception comes from
19:37 moondawg z0rkito: good news, I got it to fail the same way you did. Now let me see if I can fix it
19:37 z0rkito moondawg: also, the "Results of YAML rendering: blah" is pre running the state, not the output generation.  the states run fine, just need to get the return from the states running working.
19:38 z0rkito moondawg: that's it building the state into a dict for salt to walk through and run, not the output of the running.
19:39 jacksontj joined #salt
19:41 mattbarto joined #salt
19:45 entil oh whoah whoah, I was doing pkg.require, right? that was the wrong keyword for the whatever declaration, and because pkg is everywhere I didn't get what it was referring to
19:45 entil I really hope everything gets fixed now, gotta try upgrading some others too and running a clean trial
19:46 bemehow joined #salt
19:59 Lue_4911 joined #salt
20:02 entil http://pastebin.com/5eF5uFEu appears to be a working thing
20:03 entil man I was confused about everything, now it seems so clear and I feel so stupid ;P
20:04 Gifflen joined #salt
20:07 FL1SK joined #salt
20:08 jacksontj i'm seeing some weird timeout errors on salt in production :/ looks to be limited to the compound command interface
20:08 jacksontj i send a command with test.arg and test.ping and i get a SaltReqTimeoutError
20:08 jacksontj but i did a cmd_async
20:09 jacksontj so, it seems that the job isn't being dispatched (which looks right, since i don't see the job on the minions or in the master log)
20:09 ronc joined #salt
20:12 kaptk2 joined #salt
20:18 juanlittledevil question for you guys. is it possible to stop the minion from writing to every open tty session whenever it receives a highstate from the master?
20:18 david_a joined #salt
20:22 aleszoulek joined #salt
20:23 moondawg z0rkito: will I did get something like this to go through. "ret = {'ls -la /dev': 'cmd.run'}"
20:23 moondawg z0rkito: I need to understand the data structure that is being used
20:24 moondawg z0rkito: line 1995 in state.py is where it is getting hung up at
20:25 isomorphic joined #salt
20:26 z0rkito moondawg: hmm interesting.
20:29 druonysus joined #salt
20:29 druonysus joined #salt
20:30 dthom91 joined #salt
20:32 z0rkito moondawg: so it's taking the ret has what it should be rendering instead of running the py and taking the ret as teh results from the py script.
20:32 z0rkito moondawg: seems kind of broken to me.
20:37 moondawg z0rkito: it is how salt expects the data to be formatted. I ended up getting what you originally had to go through "ret = {'name': {'test.sls': [{'changes': {},'result': None,'comment': '' }]}}"
20:38 moondawg z0rkito: it seems that dicts and lists are expected in certain areas of the dict
20:38 moondawg z0rkito: documentation would help here. Especially as the code base gets larger
20:41 mattbarto joined #salt
20:41 moondawg z0rkito: gotta run, but your ret['result'] = True would become "ret['name']['test.sls'][0]['result'] = True"
20:42 TheCodeAssassin joined #salt
20:42 auser hey all
20:44 bemehow joined #salt
20:45 mgw1 joined #salt
20:45 cce joined #salt
20:47 devinus joined #salt
20:48 dthom91 joined #salt
20:55 ggoZ joined #salt
21:01 forrest shadowsun, are you around?
21:02 auser joined #salt
21:03 az87c_ joined #salt
21:03 az87c joined #salt
21:03 az87c__ joined #salt
21:03 isomorphic joined #salt
21:04 az87c___ joined #salt
21:04 dthom91 joined #salt
21:05 TheCodeAssassin joined #salt
21:06 UtahDave yo, auser!
21:06 auser yo yo UtahDave
21:06 UtahDave juanlittledevil: what version of salt are you on?
21:08 KennethWilke joined #salt
21:08 mwillhite joined #salt
21:09 UtahDave Ryan_Lane: what version of Salt are you seeing this on?
21:12 Thiggy joined #salt
21:13 Thiggy What's the preferred way of updating a salt minion to a new version? Can I just use the bootstrapper?
21:16 druonysus joined #salt
21:16 druonysus joined #salt
21:16 Thiggy Oh derp. pkg.upgrade. Nothing to see here move along.
21:17 ipmb How do I confirm a salt key? That is, make sure the one I'm accepting is really the one from my minion?
21:18 tyler-baker joined #salt
21:18 tyler-baker joined #salt
21:19 forrest you'd want to view the key the minion generated, and compare that against the one that the master is trying to accept ipmb
21:19 ipmb I can use `salt-key -f {id}` on the master. How do I get the same info from the minion?
21:19 ipmb yeah, how do I view it on the minion?
21:20 forrest cat /etc/salt/pki/minion/minion.pub
21:20 ipmb got it. thx
21:20 forrest np
21:20 bhosmer joined #salt
21:21 alunduil joined #salt
21:28 mgw joined #salt
21:33 chrisgilmerproj joined #salt
21:33 chrisgilmerproj what happened to salt.verbose.display_verbose()?
21:39 chrisgilmerproj anyone ever use that?
21:40 chrisgilmerproj i basically want to print the output of a client.cmd() call
21:40 chrisgilmerproj salt.verbose.display_verbose(ret, '', __opts__)
21:46 jaredr joined #salt
21:47 chrisgilmerproj maybe a better question is how do you print the output of a client.cmd() call inside a runner?
21:49 devinus joined #salt
21:49 oz_akan_ joined #salt
21:49 juanlittledevil joined #salt
21:52 UtahDave chrisgilmerproj: sorry, I don't want to leave you hanging, but I've never used that.
21:54 chrisgilmerproj huh
21:54 chrisgilmerproj something my intern wrote into some code and i just cant find it anywhere
21:54 chrisgilmerproj maybe he was just going crazy
21:54 chrisgilmerproj what's the appropriate way to return cmd output inside a runner?
21:55 aat joined #salt
21:55 chrisgilmerproj i imagine there is some way that salt generally iterates through the output from all the minions
21:57 chrisgilmerproj or maybe its salt.output.display_output()?
21:58 [diecast] chrisgilmerproj have you tried importing the module and playing with it inside python
21:58 [diecast] or look at the source
21:58 chrisgilmerproj ahh, yeah, he did a find/replace
21:58 chrisgilmerproj and a bunch of stuff named output was replaced with the name verbose
21:58 chrisgilmerproj sorry for the confusion
22:00 drags interns love their unchecked hammers :)
22:10 twobitsprite left #salt
22:11 littleidea joined #salt
22:22 UtahDave SaltStack is growing and hiring!!   http://saltstack.com/careers
22:23 auser congrats UtahDave!
22:23 krissaxton joined #salt
22:24 auser that's awesome
22:24 xt my skillset applies to all three jobs! I should apply! :-)
22:24 xt hehe
22:25 Thiggy @UtahDave - The job listings don't list a locale. Where are you hiring at?
22:26 UtahDave thanks, auser!
22:26 UtahDave xt: Yes! please do! :)
22:26 xt i would be fun, but not in a position to move right now, hehe
22:26 UtahDave Thiggy: We're open to hiring world wide!
22:27 xt :(
22:27 Thiggy Cool beans
22:27 UtahDave The developer position especially can be remote.
22:31 bhosmer joined #salt
22:41 dthom91 joined #salt
22:41 auser joined #salt
22:43 blee_ joined #salt
22:52 littleidea joined #salt
22:53 eculver joined #salt
22:53 eculver joined #salt
22:55 chrisgilmerproj any thoughts on this error? "NameError: global name '__opts__' is not defined" when calling a runner inside another runner
22:55 mgw joined #salt
22:57 UtahDave it probably means you're importing another running directly.  If you want to call another runner you should use the __salt__['module'] paradigm.  This will cause the loader to add all the '__' dicts
22:57 jams1 left #salt
22:58 ronc joined #salt
23:00 oz_akan_ joined #salt
23:03 auser joined #salt
23:03 aat joined #salt
23:07 krissaxton joined #salt
23:08 chrisgilmerproj UtahDave: thanks! (sorry, phone call).  So to use the salt.runners.jobs stuff I'd actually use __salt__['runners.jobs']?
23:11 Fin1te joined #salt
23:12 terminalmage Is anyone here familiar with the overstate? I've never used it myself and I'm trying to set one up
23:12 g4rlic joined #salt
23:13 terminalmage wanted to know if the top-level declarations in the overstate.sls have to be unique or if they can collide with the ones in your other SLS files. and also, was looking to see if I could match using something other than globbing.
23:13 terminalmage about to dig into the code to find out for sure
23:13 terminalmage but if anyone knows offhand, I'd appreciate the insight
23:15 oz_akan_ joined #salt
23:15 g4rlic I'm trying to have salt pull a file via http.  It's a large Linux ISO, so I'd rather it not be stored in the salt tree and transferred over zmq.
23:16 g4rlic but using file.managed: and - source: http://url/file.iso doesn't fly
23:16 g4rlic :\
23:16 g4rlic "Comment: Unable to determine upstream hash of source file."
23:16 g4rlic Which makes sense.
23:16 g4rlic Resort to command.run and wget?
23:16 g4rlic any insight appreciated.
23:17 UtahDave g4rlic: just get the md5 hash of the file
23:18 g4rlic oh?  I can put that in Salt somehow?
23:20 UtahDave g4rlic: http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.managed
23:20 UtahDave source_hash  is what you need
23:20 kermit joined #salt
23:20 kermit joined #salt
23:23 terminalmage g4rlic: yeah, the hash is required for security, for http(s) and ftp source URIs
23:23 terminalmage because the file could be changed without your permission
23:25 g4rlic terminalmage: makes sense.
23:25 g4rlic UtahDave: perfect, worked a treat. thank you. ;)
23:25 dthom911 joined #salt
23:26 UtahDave you're welcome, g4rlic!
23:27 chrisgilmerproj UtahDave: that worked perfectly for me, thanks
23:27 UtahDave you're welcome, chrisgilmerproj!
23:32 kenbolton joined #salt
23:34 oz_akan_ joined #salt
23:37 jacksontj in the reactor system, can i create a job that will react and run a batch command across all hosts?
23:37 jacksontj i'm wanting to add an event for change in fileserver files-- which i would use to trigger a module update etc
23:37 jacksontj but i don't want to hammer the master with everyone at once
23:38 etw win 5
23:39 cewood joined #salt
23:40 [diecast] joined #salt
23:48 g4rlic my only worry so far, is that having to constantly MD5sum 6GB of data on every highstate is going to put a little wear and tear on the disks.
23:48 g4rlic how often does a minion highstate without being prompted?
23:49 jacksontj g4rlic: on the master dside?
23:49 jacksontj in develop i comitted a hash cache for the master just last week
23:49 g4rlic jacksontj: in our case, the salt master uses its own minion to configure itself once it boots up after its first kickstart.
23:49 jacksontj also, the minion doesn't run highstate on its own unless you add it to a scheduled task
23:49 g4rlic jacksontj: good to know.  I figure an entry in /etc/cron.d/ is the typical approach
23:50 jacksontj the minion actually has a scheduler built into it as well if you want to use that
23:50 jacksontj mine is all cron-- but that was before the scheduler ;)
23:50 BRYANT__ joined #salt
23:55 aat joined #salt

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