Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-09-17

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

All times shown according to UTC.

Time Nick Message
00:03 aat joined #salt
00:08 oz_akan_ joined #salt
00:11 juanlittledevil joined #salt
00:12 pdayton joined #salt
00:14 aat joined #salt
00:21 juanlittledevil1 joined #salt
00:24 pdayton joined #salt
00:28 halfss joined #salt
00:30 Gwayne joined #salt
00:32 schwarz joined #salt
00:35 Thiggy joined #salt
00:37 ni853753 joined #salt
00:42 jslatts joined #salt
00:43 EugeneKay joined #salt
00:44 halfss joined #salt
00:49 oz_akan_ joined #salt
00:51 bemehow joined #salt
00:52 avienu joined #salt
00:52 bemehow joined #salt
00:53 ekool joined #salt
00:53 emocakes joined #salt
00:53 oz_akan_ joined #salt
00:54 ekool Question: If I'm trying to deploy mysql-5.5 via salt -- i have an issue, I change the my.cnf and the innodb table size which requires the innodb log files to be deleted. I'm wondering what an elegant way to handle that is...
00:55 drags ekool: there is almost nothing elegant about how mysql handles innodb log files :)
00:56 ekool drags: yah, I feel yah. Just wondering if I need to do a cmd.run to nuke them manually or if there is a better way.
00:57 ekool drags: because if the config file doesn't match, mysql will refuse to start once it realizes the ib_logfile* will be incorrectly sized.
00:57 drags ekool: can't think of any elegant ways to do it with Salt specifically
00:57 ekool I wonder if Ubuntu allows you to specify a my.cnf during install so that you can have it start with the correct config the first time.
00:57 drags might be worth putting together a script to: check my.cnf, confirm ib_logfile size, if wrong then confirm mysql is shutdown before nuking
00:58 drags ekool: ooh, yeah that'd make things somewhat simpler
00:58 ekool drags: doing it that way does bring up a good question to me. It seems that if I did that, its a salt state you'd only want to run during
00:58 ekool boostrap... so you dont nuke legit data. Is that correct?
00:58 drags in previous experience I've wound up delivering the my.cnf and the datadir at the same time
00:58 drags and either the datadir contained correctly sized ib_logfiles, or didn't contain any
00:59 drags ekool: yeah managing ib_logfiles would most often be done during bootstrap
00:59 avienu cedwards: You here?
01:00 n93405 joined #salt
01:01 robawt is there a sane way to install a .deb file?
01:02 robawt i noticed from github comments it was a feature request for around 10.4 and added to pkg
01:03 robawt but i'm not seeing in the doc how to do without a PPA
01:04 drags robawt: check out the 'sources' argument to apt.install
01:04 robawt drags: tried that method, with a no go :\
01:04 drags :(
01:04 drags never tried it myself, sorry
01:05 robawt i don't mind putting a PPA up if it means I only have to salt it once haha
01:05 robawt until then i'd like something saner than cmd.run
01:12 EugeneKay joined #salt
01:16 Lue_4911 joined #salt
01:19 redondos joined #salt
01:19 mohae ekool, you can do a file,managed on the my.cnf and specify the source file, which would be your custom my.cnf
01:20 mgw joined #salt
01:22 jcockhren joined #salt
01:23 jergerber joined #salt
01:31 sibsibsib_ joined #salt
01:34 jacksontj joined #salt
01:41 joehh robawt: I've tended to do this with reprepo and add something to sources.list/sources.d
01:45 Thiggy joined #salt
01:55 rmt_ joined #salt
02:04 sixninetynine joined #salt
02:06 cowmix joined #salt
02:13 deepakmd_oc joined #salt
02:19 mech422 joined #salt
02:23 ekool joined #salt
02:28 xl1 joined #salt
02:28 Thiggy joined #salt
02:32 UtahDave joined #salt
02:35 pipps joined #salt
02:37 life joined #salt
02:37 life ??
02:40 mannyt joined #salt
02:52 jalbretsen joined #salt
02:56 Heartmender joined #salt
03:17 vipul joined #salt
03:29 mgw joined #salt
03:29 swa_mobil does anyone know if this has been resolved in another issue # ?  https://github.com/saltstack/salt/issues/2142 (
03:30 swa_mobil s/\(//
03:41 mannyt joined #salt
03:43 Ryan_Lane joined #salt
03:44 berto- joined #salt
03:59 saurabhs joined #salt
04:02 aat joined #salt
04:26 Lue_4911 joined #salt
04:34 UtahDave joined #salt
04:36 forrest hey UtahDave
04:36 UtahDave hey, forrest!
04:36 forrest I thought you were on a three day weekend today :P
04:41 Thiggy joined #salt
04:49 UtahDave lol, no
04:49 UtahDave I'm traveling today and tomorrow
04:49 forrest Ahh ok
04:50 UtahDave San Antonio!
04:50 forrest oh nice, you going down to see the rackspace guys?
04:51 middleman_ joined #salt
04:52 KFDM left #salt
04:56 Thiggy Oh cool I'm gonna be in SA this weekend.
04:58 Moltar joined #salt
05:02 UtahDave forrest: Yep!  partnerpalooza tomorrow
05:02 forrest nice
05:02 forrest hey did whiteinge go with you?
05:03 UtahDave nope
05:03 forrest lame ok
05:03 forrest I need to bother him, but I don't want to open an issue, heh.
05:07 halfss joined #salt
05:10 UtahDave ah, what about?
05:10 forrest http://docs.saltstack.com/topics/conventions/formulas.html, the formula_util.py that he links to in those docs doesn't exist anywhere, so when trying to write formulas in the new style they don't work.
05:11 forrest Terminalmage and I already looked for it yesterday :D
05:12 forrest I just figured if he was sitting in the hotel room with you I'd ask you to throw something at him
05:14 Katafalkas joined #salt
05:14 pdayton joined #salt
05:16 shinylasers joined #salt
05:20 hummus3 joined #salt
05:20 hummus3 anyone ever have strange errors after running an ec2-bundle-vol?
05:24 forrest can't say I have hummus3.
05:28 hummus3 hmmm, if (1)file.managed is a template, and you (a)include/(b)exclude source_hash, can you tell me what effect that has?
05:30 robawt it appears if i try to install from a /tmp vs salt directly it works
05:31 forrest hummus3, that's an interesting questions, thinking about it it would seem as though, what is the point of a file with a hash that is a template, as the finalized template, would be different than the hashed version (unless you created the file before hand and then copied the sum down), and B would be the method I would choose
05:31 forrest I don't know if that's the right train of thought though
05:35 pdayton joined #salt
05:38 druonysus joined #salt
05:41 hummus3 well the template still has a hash that changes occasionally, and this is related to my issue. running a (nested) state (via salt-call --local) that _should_ update a templated file always returns the same invalid result, and the file is not modified.
05:42 bhosmer joined #salt
05:42 hummus3 but if i run the lower-level state by itself, without the includes, it does update the templated file
05:47 berto- joined #salt
05:53 forrest I'm not sure hummus3, I've gotta get to sleep, let me know if you figure it out
05:56 StDiluted joined #salt
05:57 druonysus joined #salt
05:57 druonysus joined #salt
05:57 justin-real joined #salt
06:01 justin-real_ joined #salt
06:02 eculver_ joined #salt
06:03 gildegoma joined #salt
06:03 Nexpro joined #salt
06:04 andrew_s1attle joined #salt
06:04 canci_ joined #salt
06:04 viq_ joined #salt
06:04 doki_pen_ joined #salt
06:05 puppet_ joined #salt
06:08 faulkner- joined #salt
06:08 Psi-Jack- joined #salt
06:11 twinshadow joined #salt
06:12 LordOfLA|Weechat joined #salt
06:12 kevinbrolly joined #salt
06:12 halfss joined #salt
06:13 sashka_u1 joined #salt
06:13 ilin joined #salt
06:14 craig_ joined #salt
06:14 kriberg joined #salt
06:15 Odd_Blok1 joined #salt
06:15 kamal__ joined #salt
06:16 godog_ joined #salt
06:16 pnl_ joined #salt
06:16 premera_j_n joined #salt
06:28 _ilbot joined #salt
06:28 Topic for #salt is now Welcome to #salt - http://saltstack.org | 0.16.3 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers - Channel logs are available at http://irclog.perlgeek.de/salt/
06:28 ml_1 joined #salt
06:29 oz_akan_ joined #salt
06:32 mfournier joined #salt
06:40 pdayton joined #salt
06:40 emocakes_ joined #salt
06:48 unicoletti_ joined #salt
06:52 malinoff joined #salt
06:53 bemehow joined #salt
06:53 defunctzombie joined #salt
06:53 terminalmage joined #salt
06:53 deedubs joined #salt
06:53 akitada joined #salt
06:53 anuvrat joined #salt
06:53 scalability-junk joined #salt
06:53 ggherdov joined #salt
06:53 malinoff joined #salt
06:55 cowmix joined #salt
06:57 isomorphic joined #salt
06:58 mech422 UtahDave: you around?
06:58 UtahDave yeah. I should be in bed, though.  :)
06:58 UtahDave what's up?
06:58 mech422 just thought I'd mention...
06:59 mech422 modules/cp.py method 'get_file' claims to support template rendering - but its throwing away the parm as far as I can tell
07:00 UtahDave hm.
07:00 * UtahDave looking
07:01 malinoff Hi all.
07:02 balboah joined #salt
07:02 mech422 I think I'm gonna use modules/cp.py method get_template to pull in the template parts - that eventually boils down to a call to Client.get_template ... which returns a string (dest).  Not sure what to do with the string though..
07:02 mech422 should I just use a standard python open() ? or some salt helper method
07:03 linjan joined #salt
07:03 UtahDave hey, malinoff!
07:03 boite joined #salt
07:04 malinoff UtahDave: i've looked through the code, there're a lot of "try: #do smth except Exception: pass" stuff. We're trying to do something and if some error ocurred, we just pass through it. There is a common pattern for such situation: http://hg.python.org/cpython/rev/406b47c64480
07:04 UtahDave yeah, you're right, mech422. doesn't use the template var at all
07:04 gildegoma joined #salt
07:04 malinoff This link says it have been added in python 3.4
07:04 malinoff Probably it will be backported in python2
07:05 UtahDave mech422: for opening a file?
07:05 davidone joined #salt
07:05 mech422 yeah - not sure what this returns:
07:05 davidone joined #salt
07:05 malinoff UtahDave: I really want to implement this in salt (something like salt.utils.contextmanagers.ignored) and replace 'pass' with 'ignored' context manager.
07:06 xpen joined #salt
07:06 mech422 blah - pastebin being slow - gimme a sec
07:06 UtahDave mech422: ok
07:06 gildegoma joined #salt
07:07 UtahDave malinoff: can you pastebin what the code would look like that's using that context manager?
07:07 UtahDave oh, I guess there's an example in your pastebin already
07:07 mech422 UtahDave: I'm assuming after this: http://pastebin.com/CZW80eKF  that 'dest' would just be a normal file system path I can open() ?
07:09 mech422 joined #salt
07:09 UtahDave malinoff: I kind of like that.
07:09 sfello joined #salt
07:09 UtahDave several fewer lines of code, and the context manager makes sense
07:09 mech422 UtahDave: it just seems pretty useless to 'only' return the pathname, when the function already read all the data ... it could return (dest,data['data']) and save me re-reading the file :-P
07:10 UtahDave mech422: yeah, you appear to be correct, dest is a path for the file
07:10 malinoff UtahDave: http://pastebin.com/HHzSN73M
07:10 mech422 (btw 'the function' above is fileclient.Client.get_template() )
07:12 UtahDave malinoff: sometimes Tom likes to stick with vanilla python so developers can easily read all the code
07:12 malinoff UtahDave: gotcha
07:12 UtahDave but that does look pretty cool. I'd recommend putting together a simple pull req that adds the context manager and makes that change in 2 or 3 ugly spots
07:13 UtahDave and let Tom look it over.
07:13 malinoff UtahDave: Ok, thanks. I'll try :)
07:13 UtahDave cool
07:15 mech422 UtahDave: ok - I should have this wired up and cleaned up tonight.  it does seem a bit silly to read the file twice, but whatever...
07:16 malinoff UtahDave: It looks really good when the nested block is huge. Instead of looking through all this block and check which of exceptions are ignored, you can see this right before this block, that makes sence. Well, for me it is :)
07:16 UtahDave cool. thanks, mech422
07:16 mech422 UtahDave: I really like the 'ret' dictionary that a lot of the stuff uses, as you can stash stuff like the file contents in there :-)
07:17 UtahDave mech422: yep!
07:17 UtahDave malinoff: yeah, I think if you found one or two big ugly nested blocks like that it might convince Tom.
07:23 ronc joined #salt
07:30 halfss Hi, why halite does not use salt-api; the salt-api will be give up?
07:30 felixhummel joined #salt
07:38 xpen_ joined #salt
07:41 oz_akan_ joined #salt
07:42 linjan joined #salt
07:46 jaequery joined #salt
07:50 svx joined #salt
08:06 boite joined #salt
08:19 carlos joined #salt
08:19 ronc joined #salt
08:25 evan886 joined #salt
08:30 evan886 Hi all   ! I would  use the rsync with saltstack , but can not find the rsync moudle ,
08:31 carlos_ joined #salt
08:37 tomviner joined #salt
08:48 zooz joined #salt
08:48 pengfeix joined #salt
08:55 adepasquale joined #salt
09:07 backjlack joined #salt
09:10 isomorphic joined #salt
09:18 bhosmer joined #salt
09:19 godog joined #salt
09:26 az87c joined #salt
09:37 yota joined #salt
09:39 LucasCoz joined #salt
09:42 pengfeix_ joined #salt
10:05 logix812 joined #salt
10:08 pengfeix joined #salt
10:11 evan886 joined #salt
10:19 bemehow joined #salt
10:20 bemehow_ joined #salt
10:20 zooz joined #salt
10:21 zooz joined #salt
10:23 m0s joined #salt
10:25 m0s joined #salt
10:26 mastrolinux joined #salt
10:27 mastrolinux just tried file.sed with the flags parameter set to empty string flags='' but sed still executes on the whole file, not just the first match
10:27 mastrolinux do you have the same problem?
10:33 abele joined #salt
10:46 tuxIO joined #salt
10:54 SoR joined #salt
10:54 oz_akan_ joined #salt
10:59 joehh evan886: you can use the cmd.run or cmd.wait states
11:00 felskrone joined #salt
11:00 felskrone hey
11:09 Furao joined #salt
11:20 jbunting joined #salt
11:21 jbunting joined #salt
11:27 lemao joined #salt
11:30 xl1 left #salt
11:51 evan886 left #salt
11:54 bemehow joined #salt
11:54 bhosmer joined #salt
11:55 halfss joined #salt
12:10 blee joined #salt
12:13 ksk hey guys
12:14 ksk if i do a find for a modules name on a salt "client" there are two locations: /var/cache/salt/minion/files/ and
12:14 ksk /var/cache/salt/minion/extmods/
12:14 ksk which one gets executed by lets say salt-call?
12:21 ggoZ joined #salt
12:28 jslatts joined #salt
12:33 tuxIO joined #salt
12:41 aurigus joined #salt
12:42 tuxIO_ joined #salt
12:44 whyreal joined #salt
12:45 fredvd joined #salt
12:50 Pullphinger joined #salt
12:50 mech422 anyone know how to tie a pull request to an open issue on github ?
12:52 holmb mech422: Just mention the issue like #1234 in your PR message. That will create an indirect link through a "mention".
12:52 mech422 ahh - thanks
12:55 holmb mech422: For example, you could have used #7290 instead of the full URL http://github.com/saltstack/salt/issues/7290
12:55 mech422 hehe...
12:55 mech422 at least that one went thru
12:55 mech422 I just finished #6905, and it ate my dam pull request
12:56 sgviking joined #salt
12:57 juicer2 joined #salt
12:58 diegows joined #salt
12:58 holmb mech422: Regarding coding style, update #7290 with 4 space indents instead of 2.
12:59 holmb mech422: What does "SAH" mean?
12:59 mech422 my initials
12:59 mech422 if ya wanna bitch - wait till you see 6905 - its more then 1 line long :-P
12:59 holmb hehe
13:00 Ixan is there some unit tests for states? i'm working on support on aix, would be awesome if there was some overview of what wasnt working
13:01 mohae joined #salt
13:03 Gifflen joined #salt
13:03 mech422 holmb: arrg... I keep hitting 'send pull request' - but no pull is showing on the salt open issues list ?
13:04 holmb https://github.com/saltstack/salt/pulls
13:04 holmb And there?
13:04 mech422 doesn't seem to be there either ?
13:05 arthurlutz joined #salt
13:09 mech422 holmb: well anyway, if you wanna look at my repo ( https://github.com/mech422/salt ) support for multiple, templated source files has been added to file.append()
13:09 ronc joined #salt
13:09 mech422 holmb: and my initials are in there, and I used 2 spaces for indent, and prolly a bunch of other things wrong :-P
13:10 mech422 but it does work, for loosely defined values of 'work' :-D
13:12 micah_chatt joined #salt
13:12 xinkeT joined #salt
13:13 jergerber joined #salt
13:13 oz_akan_ joined #salt
13:14 multani what are the recommended ways of getting informations about other minions from one minion during a highstate run?
13:15 jslatts hey salt experts, any idea when this commit (https://github.com/saltstack/salt/commit/272dba3fa0553618d23497263ba058d20ff10ade) is going to make it into a release?
13:15 multani (beside fiddling with salt['publish.publish']
13:16 oz_akan_ joined #salt
13:19 redbeard2 joined #salt
13:20 Kholloway joined #salt
13:21 aat joined #salt
13:22 multani joined #salt
13:30 toastedpenguin joined #salt
13:30 toastedpenguin left #salt
13:30 toastedpenguin joined #salt
13:34 ipmb joined #salt
13:45 bemehow_ joined #salt
13:48 faldridge joined #salt
13:53 kaptk2 joined #salt
13:55 hazzadous joined #salt
13:58 mech422 holmb: gah - 4 space indent looks nasty :-P  Is there an 80 char limit too? I saw a comment about exceeding 80 chars in the file ?
14:00 Ixan you should probably follow PEP8, mech422
14:01 Ixan http://docs.saltstack.com/topics/style.html
14:01 cro1 joined #salt
14:01 whiteinge joined #salt
14:02 Sypher joined #salt
14:02 xt mech422: Ixan http://docs.saltstack.com/topics/style.html
14:02 mech422 lxan: thanks
14:02 mech422 xt: thanks
14:03 xt damn. I was too slow
14:03 Ixan you're getting old, xt
14:03 havan joined #salt
14:04 mech422 its like writing on a postage stamp with a crayon :-P
14:04 mech422 I need a drink, and a smoke before I can deal with this :-;
14:05 havan Hello, Iwas trying to comment out multiple lines in a file with file.comment state module, so far I've tried these with no luck: http://dpaste.com/1384666/
14:05 havan is it possible?
14:07 mech422 Ixan: so does this mean I can use 4 letter words in my error messages ? :-D
14:08 Ixan i'm not the salt code arbitraitor, but i wouldn't fucking do it ;)
14:09 holmb havan: The second try is more correct, but not quite right. Remove "-" in front of regex.
14:09 mech422 Ixan: dam - "yer screwed!" would make a really good error message...
14:10 havan holmb: remove "-" in front of regex? Are you sure? It's there in the docs (http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.comment)
14:11 avienu joined #salt
14:11 mapu joined #salt
14:12 jbunting joined #salt
14:14 havan holmb: I was pretty sure it's not gonna work but I tried it anyway: "... is not formed as a list"
14:14 opapo joined #salt
14:14 jcockhren joined #salt
14:16 sssslang_ joined #salt
14:18 [diecast] joined #salt
14:21 m0s joined #salt
14:27 mech422 havan: umm...I know my newb is showing... but shouldn't that be 2 file.comments ?
14:27 mech422 1 regex each ?
14:27 cedwards avienu: ping
14:28 avienu cedwards: Hey
14:28 avienu cedwards: I had what I *thought* was going to be an easy question but for the life of me I can't seem to figure it out LOL.
14:29 avienu cedwards: How do you add apache with SSL support on FreeBSD with Salt?
14:31 cedwards avienu: Is SSL a compile-time option? (I use nginx)
14:32 ben_ joined #salt
14:32 avienu cedwards: Yah, I could totally get it if I compiled apache-- but doesn't salt use pkg_add -r or pkg ? How do I specify to install something from /usr/ports
14:33 teskew joined #salt
14:33 mech422 havan: I think your problem is basically you can't have 2 fields named the same in
14:34 mech422 havan: yaml - I pasted your second example into http://nodeca.github.io/js-yaml and it only 'sees' the HWADDR regex
14:34 cedwards avienu: pretty sure terminalmage is currently working on compile support, but right now it's just repository packages
14:34 cedwards avienu: my systems just point to my poudriere repository and I use pkgng support..
14:35 BadLuck joined #salt
14:35 mech422 havan: here's what it shows for a parse of your second example: { '/etc/sysconfig/network-scripts/ifcfg-ib0': { 'file.comment': [ { regex: '^HWADDR.*' } ] } }
14:35 avienu terminalmage: Is that right? How is it going?
14:36 avienu cedwards: Just repository packages?
14:36 havan mech422: yes that's correct, yaml should be like this: http://dpaste.com/1384697/
14:36 mech422 havan: I'd try making it 2 ids, using the -name option on the second one
14:37 havan mech422: but that's not working either because salt module is expecting a string not a list
14:37 mech422 havan: I don't see where it says regex can be a list ?
14:37 mech422 make the second one:
14:38 BadLuck Hi, I have a .sls file. In this file I want to execute a ".bat" on a Windows minion. Then I have something like "start Launch_win32.bat:    cmd.run:    [...]" in this .sls. It's working. The .bat is executed and this .bat start some application and the .bat close. But, my minion do not return until every application lunched by this .bat is closed. The is a way to force the minion to return without waiting all application?
14:38 havan mech422: it doesn't :) I was looking for a way to comment out multiple lines in the same file
14:38 mech422 it munched it
14:38 mech422 dang it
14:38 jalbretsen joined #salt
14:38 cnelsonsic joined #salt
14:38 mech422 Havan: yeah - just use to ids
14:38 mech422 2 'rules'
14:38 mech422 put the -name option on the second rule
14:38 Koma joined #salt
14:38 SunSparc joined #salt
14:39 havan mech422: that may work, or I can use file.sed for the second comment I guess
14:40 havan or I can improve file.comment module to accept regex as a list
14:40 mech422 havan: http://pastebin.com/211pLvUf
14:40 mmilano joined #salt
14:40 jslatts joined #salt
14:41 mech422 havan: heh.. I just taught file.append() to use templates and multiple source files...
14:43 [diecast] joined #salt
14:43 unicoletti_ left #salt
14:44 terminalmage avienu: cedwards: right now I am working to get freebsd pkg_add and pkgng supported, might do ports after that
14:45 terminalmage the current freebsd package management support is disjointed to say the least. pkg_add is supported, but the same module also looks for pkgng and automatically tries to use it if it's there. then there's a dedicate pkgng module, which is incomplete
14:46 avienu terminalmage: So, same question to you, how would I add Apache with SSL support?
14:46 terminalmage so the current plan is to move the pkgng stuff out of the freebsdpkg module, and bring both pkg_add and pkgng up to speed, feature-wise
14:46 terminalmage avienu: I believe that one of the cmd states lets you specify a series of commands
14:47 terminalmage you could probably do a: cd /usr/ports/..... , then make install
14:47 terminalmage but that would still not be non-interactive
14:47 avienu terminalmage: Ugh!
14:48 terminalmage I'm not a freebsd expert, is there a better way to specify these params when running make?
14:48 Corey The topic is outdated.
14:48 Corey 0.16.4 is current.
14:48 terminalmage Corey: true
14:48 avienu terminalmage: I think you can use /etc/make.conf
14:50 terminalmage yeah, I'm planning on trying to get FreeBSD as well-supported as possible in the next few months
14:50 terminalmage so, a package frontend that supports building from the ports tree is on the roadmap
14:54 qba73 joined #salt
14:55 m_george|away joined #salt
14:58 havan mech422: the answer is in regex :) http://dpaste.com/1384728/
14:58 m_george left #salt
15:03 mech422 havan: LOL - cheater :-P
15:04 mannyt joined #salt
15:07 multani is there there a way to have a Salt state which sets several values for the same grain, so I can test for, for example: ``database-server in grains['roles']`` ?
15:08 multani (Salt 0.16.4 here)
15:09 pipps1 joined #salt
15:11 holmb multani: That will probably work just fine. As long as grains['roles'] is a list of strings, and database-server is a string.
15:11 imaginarysteve joined #salt
15:11 imaginarysteve clear
15:12 holmb It is the equivalent of if 'database-server in ['one-role', 'another-role']
15:12 multani holmb: yes, but I'm looking for a way to configure those roles using states only
15:14 multani holmb: actually, I'm looking for a way to accumulate values in a grain when my states are running
15:14 multani but maybe I'm doing something wrong here
15:15 smoof joined #salt
15:15 smoof hey guys
15:15 mapu joined #salt
15:15 smoof how's it going?
15:15 holmb multani: Grains are not supposed to be used as a generic purpose datastore.
15:16 ghanima joined #salt
15:17 ghanima hello all
15:17 multani holmb: hum, yes, I realize that
15:17 smoof I got a question that I hope someone can help me with
15:17 smoof it has to do with pillars
15:17 copelco joined #salt
15:17 smoof anybody got skillz with pillars?
15:17 ghanima question... the salt-contrib project. If I just want to add a single grain file it should be a simple as takingthat file in putting it into the systems grains directory correct
15:18 ghanima if that is the true is there a way to push that file to the rest of my minions
15:19 holmb ghanima: You can put your grains file in /srv/salt/_grains/ and then use salt '*' saltutil.sync_grains
15:19 copelco does anyone have an example of a state that requires a running supervisor service?
15:20 holmb smoof: Ask the question and we'll see.
15:20 mgw joined #salt
15:20 mapu joined #salt
15:21 holmb mgw: I PR:ed my esxi-init branch. Any comments are welcome.
15:21 ghanima holmb: I just checked and for some reason the directory /srv/salt doesn't exist on my saltmaster ois that something that has to be created outside of the default install
15:22 holmb ghanima: If it isn't there you can create it.
15:22 holmb ghanima: It corresponds to the file_roots setting in the master configuration file.
15:22 mapu joined #salt
15:23 mgw1 joined #salt
15:23 multani holmb: I have something like this currently: https://gist.github.com/multani/6595845
15:24 multani holmb: using the publisher system, I would like to retrieve my minions' grains and do something else on another minion depending on the content of the grains for each minions
15:24 ghanima holmb: Also to be clear when you say the grains file in relation to the salt-contrib you mean any file that exist in the grains directory?
15:24 dml_ joined #salt
15:24 holmb multani: per-hosts.{{ grains['host'] }} in your top.sls will not match per-hosts_foo,unless your host (salt id) starts with an underscore.
15:25 multani holmb: yes, that's a Gist limitation it seems, you can't use "/" in filenames
15:25 cwright joined #salt
15:25 multani (at least from the web interface)
15:26 holmb ghanima: I don't understand the question completely, but yes, you could take a file from salt-contrib/grains/*.py and put it in /srv/salt/_grains/ on your Master.
15:26 aurigus joined #salt
15:26 aurigus joined #salt
15:26 micah_chatt joined #salt
15:28 abe_music joined #salt
15:31 pdayton joined #salt
15:32 holmb multani: I think you should look into the event system.
15:32 Artanicus joined #salt
15:32 holmb multani: I haven't done anything with it myself so can't tell you exactly. But listen to the latest FLOSS podcast (with Thomas) and you will get an idea of what you can do with it.
15:34 devinus joined #salt
15:34 multani holmb: thanks for your help, I'll have a look :)
15:35 Artanicus Howdy. Any tips on how to use states from salt-contrib? I tried to just 'salt-contrib/link_contrib.py /srv/salt' but after that every highstate crashes unless I undo the links: http://pastie.org/8333328
15:37 StDiluted joined #salt
15:39 Artanicus ..could of course be just that salt-contrib is not in a usable state but seems unlikely since the previous commit is several weeks old :-)
15:40 [diecast] joined #salt
15:43 jcockhren joined #salt
15:47 balltongu joined #salt
15:48 halfss joined #salt
15:49 gramulhaozin joined #salt
15:50 gramulhaozin guys, can I provision windows with Salt ?
15:53 blee_ joined #salt
15:55 ghanima holmb: that worked thanks
15:56 holmb ghanima: Glad it worked.
15:56 Artanicus looks like my issue stemmed from dangling symlinks crashing the whole thing. Not a very helpful "error". And the root of the issue being link_contrib making shoddy links in the first place :-)
15:56 holmb gramulhaozin: There are efforts towards that goal but I don't know if it is complete, i.e. all things are there that you would need for a fairly standard deployment.
15:57 holmb gramulhaozin: You can however install software with Salt and manage Windows Firewall etc.
16:00 redondos joined #salt
16:03 juanlittledevil joined #salt
16:05 KyleG joined #salt
16:05 KyleG joined #salt
16:06 ze- joined #salt
16:08 gramulhaozin holmb: cool I will check it out
16:08 Lue_4911 joined #salt
16:08 tmmt joined #salt
16:08 jcockhren mech422: repost that pastbin when you get a chance
16:09 jcockhren mech422: from yesterday.
16:09 jcockhren got znc working
16:09 jcockhren just* got znc working
16:09 mech422 jcockhren: errr..sorry ?
16:10 mech422 jcockhren: I'm a bit slow today... which pastebin ?
16:10 jcockhren mech422: concerning the usage of file.managed to edit a config file in respect to installed addons for ceph
16:12 mech422 jcockhren: sorry - I've not a clue where that is... I was using file.append, and cmd.wait with a flag file - is that close enough?
16:12 jcockhren yeah
16:12 forrest joined #salt
16:14 CheKoLyN joined #salt
16:16 jcockhren mech422: no worries if you can't find/remember
16:17 jcockhren mech422: was just going to follow up to see how well it worked for you
16:17 blee joined #salt
16:19 forrest Hey whiteinge, when do you plan to commit the formula_util.py to the develop branch from http://docs.saltstack.com/topics/conventions/formulas.html ? I've been working on a formula or two, but none of them (or your new examples) work even with 0.16.4, or the develop branch, and I'm not sure if it's because that formula_util.py is missing, or if something is wrong with filter_by(), as the error complains about an unexpected keywork argument
16:19 forrest 'merge'
16:19 ldlework So someone I highly respect has voiced concerns for salt from a security perspective
16:20 ldlework It has me worried.
16:21 jcockhren ldlework: care to inline your concerns here? let's all discuss. besides, we can look at the source
16:24 lvh_ joined #salt
16:24 lvh_ Hi!
16:24 micah_chatt does anyone have much experience with pillar namespacing?
16:24 lvh_ https://github.com/saltstack/salt/blob/develop/salt/crypt.py#L186
16:24 ldlework jcockhren: ^
16:24 lvh_ I know that second positional argument is "padding". However, M2Crypto doesn't document what "4" means.
16:25 lvh_ (Cancel the quotes on the first word, I guess.)
16:26 ekool joined #salt
16:26 ldlework jcockhren: still around?
16:26 micah_chatt does anyone know if pillar data from another pillar can be included in a pillar?
16:26 cachedout joined #salt
16:27 ekool joined #salt
16:27 lvh_ I mean, reasonably speaking, it either means PKCSv1.5 or OAEP.
16:28 lvh_ But it would have to be OAEP with some hardcoded parameters, obviously :)
16:28 ekool Does anyone know if there is any talk of a Saltstack book coming out?
16:28 jcockhren ldlework: I'm here
16:28 ldlework jcockhren: lvh_ is voicing his concerns
16:29 forrest ekool, as far as I know there isn't one currently in the works, Salt is moving really fast right now.
16:29 lvh_ jcockhren: Hi! I'm a crypto guy. I'm trying to review the RSA-y bits of crypt.py. I can't figure out what the padding value "4"  means.
16:29 lvh_ I have to go right now, but I'll be back in a few minutes, and this client will stay open so I can see the backlog.
16:29 ekool I keep reading everything I can find but a book would be nice as well.
16:31 dave_den lvh_: without looking, i'm guessing it's the space needed for the verification pas string, which is literally the string 'salt'
16:31 dave_den s/pas/pad
16:34 balboah joined #salt
16:34 KyleG1 joined #salt
16:34 micah_chatt does anyone have experience including pillars in other pillars?
16:34 jcockhren lvh_, ldlework: yeah. got that. I was attempting to pull out some docs
16:36 forrest micah_chatt, there was this issue that has some examples, not sure if it's what you want though: https://github.com/saltstack/salt/issues/4389
16:36 micah_chatt Hmm that is similar, I'll check that out
16:39 pdayton joined #salt
16:41 jcockhren https://github.com/saltstack/salt/commit/dd348dfa798dc1f006ee4a7647effa4c3b0e67b8
16:41 jcockhren ldlework lvh_: ^
16:41 ipmb joined #salt
16:42 baniir joined #salt
16:42 micah_chatt forrest: basically what I would like to do, is something like this https://gist.github.com/micahhausler/6596974
16:42 micah_chatt basically, I'd like to update a dict in a different yaml, is that even possible?
16:43 jcockhren I'm *not* a crypyo guy so I can't say "why" it's the value 4
16:45 pdayton joined #salt
16:46 mannyt_ joined #salt
16:47 jslatts joined #salt
16:49 jcockhren lvh_: thatch45 is your person
16:49 lvh_ jcockhren: Cool, thanks.
16:49 lvh_ dave_den: What does "verification pad string" mean?
16:49 forrest micah_chatt, I imagine it is possible, but I don't know for sure, I haven't seen examples of someone expanding pillars like that.
16:50 jbunting joined #salt
16:50 lvh_ jcockhren: So, that probably means that it used to do unpadded RSA, and now it does some kind of padded RSA.
16:50 Furao joined #salt
16:50 lvh_ (I hope.)
16:51 jcockhren lvh_: most crypto have various paddings defined so one doesn't have to hardcode it
16:51 jcockhren like RSA.default_padding or something
16:51 dave_den lvh_: https://github.com/saltstack/salt/blob/develop/salt/master.py#L735
16:52 whit joined #salt
16:52 jcockhren but that's all I got so it's time for me to shutup. ;)
16:53 lvh_ jcockhren: Sure, but I would still like to know what that actual padding is :)
16:54 mgw joined #salt
16:55 lvh_ I don't think PKCS#1 provides such presets, but it's obviously possible that M2Crypto does.
16:55 cdunklau joined #salt
16:56 dave_den lvh_: what line of code are you wondering about?
16:57 lvh_ https://github.com/saltstack/salt/blob/develop/salt/crypt.py#L186
16:59 lvh_ I hope it's not just what it means in OpenSSL.
16:59 jcockhren http://www.openssl.org/docs/crypto/RSA_public_encrypt.html
16:59 lvh_ In OpenSSL, I think it's RSA_NO_PADDING. That would be bad.
17:02 lvh_ jcockhren: How do I contact thatch45?
17:02 lvh_ Or, anyone who knows how RSA padding works in Salt.
17:02 dave_den lvh_: http://www.heikkitoivonen.net/m2crypto/api/M2Crypto.RSA-module.html
17:02 jcockhren I guess my question would be: should it be using pkcs1_padding = m2.pkcs1_padding
17:02 dave_den pkcs1_oaep_padding = 4
17:02 jcockhren ?
17:02 lvh_ no
17:02 jacksontj joined #salt
17:03 lvh_ Oh, that's nice :)
17:03 lvh_ dave_den: I didn't find that one earlier. Thanks!
17:03 lvh_ jcockhren: No, it should be OAEP.
17:03 lvh_ (Well, Salt shouldn't be allowed to make that decision in its application code, but I'm guessing crypto types have told you that before :))
17:03 jcockhren I learned something today. thanks lvh_ dave_den!
17:04 jcockhren for the record, I was near that page and was *almost* the hero
17:04 jcockhren ;)
17:05 jcockhren lvh_: for education of me (and others here), could you explain your last statement?
17:06 lvh_ jcockhren: Right now, there's a vector for getting it wrong, right?
17:06 lvh_ jcockhren: I mean, I know your RSA public exponent was 1, but let's not talk about that. Let's say it was 3, which isn't uncommon, and actually leads to pretty fast math.
17:07 lvh_ jcockhren: Screw up padding (i.e. 3 instead of 4) and that means RSA is broken as soon as you send the same message more than twice.
17:07 lvh_ (From what I understand, Salt does that, so that would be bad, if padding was wrong.)
17:08 jcockhren lvh_: how about salt putting that into it's applicaiton code? Why is that bad?
17:08 KyleG1 left #salt
17:08 BadLuck Hi, I have a question about grain. If i do something like this in a sls "echo {{grains['ipv4']}}" I will get something like "[u'10.140.33.114', u'192.168.56.1'] ". I would like to have the first IP. There is a way to manipulate the result of {{grains['ipv4']}} to get the first ip as a string (exaple slipt, substr, cat...)? Thanks
17:08 jcockhren (bare with me)
17:08 lvh_ And I don't mean "broken by evil three letter agencies with umpteen million dollars", I mean "broken with high school math and maybe a calculator"
17:09 lvh_ jcockhren: Because there's APIs that mean you can't get it wrong.
17:10 jcockhren lvh_: ah.
17:10 lvh_ jcockhren: I understand you don't use TLS because of ZMQ.
17:10 dave_den right now the padding option is only needed in 5 places, but lvh_ is saying the more places you have to code it in your application, the higher likelyhood of someone screwing it up in one of those places. it could be easily moved to a dedicated library/method that ensures the encryption is done correctly and in a single location.
17:11 lvh_ nacl's box API couldn't be coerced into not doing anything, unlike the RSA implementation that was being called with a public exponetn of 1
17:11 lvh_ Right.
17:11 devinus joined #salt
17:11 jcockhren lvh_: I bet if you made a PR using m2.pkcs1_oaep_padding instead of the hardcoded value, crypto types would rejoice
17:11 lvh_ And, importantly, written by cryptographers and explicitly designed to be used by non-cryptographers :)
17:11 dave_den lvh_: there has been talk about nacl a while ago on the salt-users list, i think
17:11 dave_den can't remember where it was left off, tho
17:12 jcockhren now I have to read up on nacl
17:13 lvh_ jcockhren: well, I recommend reading the box API, but you can go ahead and not read about the crypto primitives ;)
17:13 lvh_ the good news is they're fast and pretty good.
17:14 lvh_ You can also get rid of CBC mode for free.
17:14 jcockhren see... this is why open source is so awesome
17:14 jcockhren a single line of code can serve as a gateway to so much more understanding
17:14 dave_den i must say, the naming is a great coincidence
17:14 fragamus joined #salt
17:15 lvh_ you also pronounce it "salt", apparently.
17:15 lvh_ I'm sure that won't cause confusion
17:15 dave_den indubitably
17:16 baniir joined #salt
17:20 tuxIO joined #salt
17:20 maveas joined #salt
17:23 Koma joined #salt
17:25 maveas I'm trying to remove salt-master after some testing on a local Ubuntu Desktop 13.10 but "apt-get purge" stalls. I'm currently trying to stop the deamon by "service salt-master stop" but it seems to freeze.. Any ideas?
17:26 jcockhren lvh_: any idea on a good source of nonces?
17:26 jcockhren in respect to the nacl?
17:27 jeff__ joined #salt
17:31 Ryan_Lane joined #salt
17:31 berto- joined #salt
17:33 baniir joined #salt
17:36 ggoZ joined #salt
17:38 clintonb joined #salt
17:40 cbloss is there a dev version of Salt that I can download that supports state_auto_order yet?
17:41 dk_ joined #salt
17:41 micah_chatt forrest: I think the route I need to go is with ext_pillars http://docs.saltstack.com/topics/development/external_pillars.html
17:43 ipmb joined #salt
17:43 forrest micah_chatt, ahh ok cool
17:44 micah_chatt does anyone here use ext_pillars?
17:44 mgw micah_chatt: yes
17:45 druonysus joined #salt
17:45 micah_chatt mgw: the documentation is not excessive on this, do you treat it like you do your regular pillars, with a  top file?
17:45 bhosmer joined #salt
17:45 micah_chatt but you can write pillar dicts in python?
17:45 gramulhaozin left #salt
17:46 mgw micah_chatt: ext_pillars is different from the python renderer
17:47 micah_chatt mgw: right, like follow the instructions about dunder functions and write an ext_pillar function that returns a dict of pillar data
17:47 mgw right
17:47 mgw examples: https://github.com/saltstack/salt/tree/develop/salt/pillar
17:47 micah_chatt ok, and you do have an ext_pillar/top.sls file?
17:47 mgw no
17:47 mgw you add it to your config
17:47 micah_chatt ok
17:48 micah_chatt ahhhh I see it
17:48 micah_chatt got it
17:48 ipmb joined #salt
17:50 mgw micah_chatt: pillar_dirs and ext_pillar options
17:56 micah_chatt mgw: is pillar_dirs documented anywhere? I can't find it even in the codebase
17:57 forrest you set the directory in your master settings
17:57 forrest so pillar_dirs = ['srv/pillars_ext']
17:57 forrest then inside there every pymodule containing a method called ext_pillars are added as extensions
17:57 forrest at least according to some issue.
17:58 Katafalkas joined #salt
17:58 micah_chatt ok, yea I just see zero documentation on it, nor is it in the master example config.
17:58 whit joined #salt
17:59 forrest yea if you can't find any docs it might be worth filing an issue to request them
17:59 micah_chatt mgw: forrest: I'll try it and see how it goes, thanks much
17:59 jacksontj joined #salt
17:59 forrest np
18:00 jxqz joined #salt
18:01 Guest60769 left #salt
18:05 baniir joined #salt
18:05 druonysus joined #salt
18:05 druonysus joined #salt
18:07 felskrone joined #salt
18:08 felskrone1 joined #salt
18:17 piffio joined #salt
18:23 devinus joined #salt
18:24 baniir joined #salt
18:26 Thiggy joined #salt
18:35 druonysuse joined #salt
18:35 druonysuse joined #salt
18:42 sfello joined #salt
18:46 goodwill whiteinge: ping
18:46 whiteinge goodwill: hi
18:46 forrest oh you are around
18:46 goodwill whiteinge: is there some quick "configtest" script to check the validitity of an .sls file
18:47 goodwill like for typos I can just import yaml ... but that does not seem enough
18:47 jcockhren goodwill: I've often thought the same thing myself
18:47 whiteinge goodwill: state.show_highstate does what you want albeit in an indirect way
18:47 forrest puppet parser validate equivalent :P
18:48 puppet forrest do not validate
18:48 whiteinge lol
18:48 forrest heh
18:48 Koma joined #salt
18:48 forrest hey whiteinge did you see my message from earlier by chance?
18:48 jcockhren maybe some quick way to expose sls compilation as a module or something
18:49 whiteinge forrest: sorry, no. my IRC bouncer had a hiccup over the weekend and yesterday
18:49 forrest ahh ok, let me repaste the spam then
18:49 whiteinge kk
18:49 jcockhren goodwill: maybe we should write it?
18:49 bemehow joined #salt
18:49 forrest Hey whiteinge, when do you plan to commit the formula_util.py to the develop branch from http://docs.saltstack.com/topics/conventions/formulas.html ? I've been working on a formula or two, but none of them (or your new examples) work even with 0.16.4, or the develop branch, and I'm not sure if it's because that formula_util.py is missing, or if something is wrong with filter_by(), as the error complains about an unexpected keywork argument
18:49 forrest merge
18:49 jdenning joined #salt
18:50 forrest it's the combo of parsing the jinja and yaml that's gonna be a bit of a pain jcockhren
18:51 jcockhren trying to get my states to work with gitfs is a constant: commit, push, commit push
18:52 jcockhren I dream of the day where salt sls validaty integrates with vim syntastic
18:52 whiteinge forrest: bah, formula_util.py is an unfinished thought. the actual filter_by() function lives in the regular grains.py
18:52 forrest so did you break filter_by()? :P
18:53 whiteinge forrest: that version of grains.py won't make the 0.16.x branch but it will be in 0.17
18:53 forrest ok so it's not even in develop right now?
18:53 whiteinge the correct version is in develop. if you grab that file off github and put it in your /srv/salt/_modules directory it should work
18:53 whiteinge (plus a saltutil.sync_modules)
18:53 forrest ok cool, I'll give it a shot later tonight when I've got some time, thanks.
18:54 whiteinge forrest: thanks for pointing out the bad doc
18:54 forrest Yea np
18:54 jcockhren silly question. minions have the whole salt core installed correct?
18:54 goodwill whiteinge: you are making me sad ;)
18:54 goodwill whiteinge: I hear that formula thing rocks
18:54 goodwill ;)
18:55 forrest yea the new formula style is cool
18:55 whiteinge goodwill: i'd recommend not trusting your source on that. he's a shady character
18:55 zooz joined #salt
18:55 jcockhren anyone here is going to be at PyTennessee?
18:55 robawt speaking of shady characters, hello whiteinge!
18:57 * whiteinge high-fives robawt in a possibly trustworthy manner
18:58 * robawt topgun highfives whiteinge
18:58 robawt is it bad form to make salt states dependent of one another?
18:58 robawt mixing together something that requires 'teh java'
18:58 forrest what do you mean robawt
18:58 forrest there's all sorts of stuff with includes and such
18:58 jcockhren I ask b/c I want to give a talk about using salt, b/c it's written in python and all
18:58 jcockhren the use case being automating deployments
18:59 doctorjnupe joined #salt
18:59 robawt so it's not bad form to have a saltstate that installs a service but requires java to then -require: -sls: javathinger
18:59 jcockhren hopefully, tell me if I do it wrong
18:59 jcockhren lol
18:59 whiteinge robawt: i'd say that's recommended form. make small states that each do one thing and tie them together with require/require_in (and other ilk)
18:59 robawt whiteinge: ok that feels better
18:59 robawt whiteinge: what about installing a standard service and then tweaking it?
19:00 whiteinge salt has an extremely robust dependency system for that reason
19:00 forrest robawt have I linked you the djangocon example?
19:00 robawt say I want a elasticsearch server, but then for a specific type of service, it needs that ES to have a specific cluster name.  I'd want ES to be one state, the service to be another, and have that service install the config, not the ES state
19:00 whiteinge robawt: if you need to tweak something unreleated to the thing you're tweaking, use require_in, watch_in
19:00 Ryan_Lane joined #salt
19:01 robawt forrest: no but i'm interested
19:01 robawt whiteinge: AWESOME!
19:01 forrest https://github.com/terminalmage/djangocon2013-sls
19:01 forrest and regarding the specific type of service, you could base that off grain data
19:01 jcockhren forrest++
19:01 chri_____ joined #salt
19:01 chri_____ joined #salt
19:02 robawt thanks for the example forrest
19:02 robawt thx for feedback whiteinge
19:02 whiteinge robawt: on a related note, i'd recommend avoiding complex jinja logic in favor of pillar and lookup tables (where you can)
19:02 nu7hatch_ joined #salt
19:03 robawt whiteinge: good point
19:03 robawt maybe i should refactor with more pillar before getting tricky
19:05 whiteinge jinja just wasn't designed for tricky  :)
19:05 robawt whiteinge: pillar is pretty tricky
19:05 robawt you can stop remembering things with pillar
19:05 robawt my minecraft server is pretty sexy with pillar to be honest
19:05 whiteinge it can be if it gets spread across many files
19:06 whiteinge robawt: if your pillar gets to that point, i'd recommend looking into generating it using an ext_pillar module
19:06 whiteinge generating pillar is pretty simple
19:06 whiteinge and *extremely* flexbile
19:07 robawt so what you're really saying is i can't have original ideas in #salt, y'all figured it out already
19:07 robawt ok check :D
19:07 druonysuse joined #salt
19:07 druonysuse joined #salt
19:07 whiteinge damn, skippy!
19:07 whiteinge s/,//
19:07 baniir joined #salt
19:08 whiteinge hm. we need a solid ext_pillar example in the docs :-/
19:09 whiteinge http://docs.saltstack.com/topics/development/external_pillars.html#ext-pillar
19:09 jcockhren speaking of ext_pillar
19:09 whiteinge robawt: ^^ read the section under the example
19:10 whiteinge robawt: tl;dr: a simple python function that gets passed all possible relevant data that is called once per minion. ultimate granularity. you can even store minion-specific configuration in a db somewhere
19:12 jcockhren how are environments defined when using ext_pillar (git backend)?
19:12 Ryan_Lane joined #salt
19:14 jcockhren let me just gist it
19:15 whiteinge good question. i'm not sure...
19:17 devinus joined #salt
19:17 jacksontj joined #salt
19:19 jcockhren https://gist.github.com/jcockhren/6599338
19:19 jcockhren I recently added the 2nd line
19:19 jcockhren does that approach even makes sense
19:20 jcockhren ?
19:20 jcockhren I want to ask the same thing in respect to states as well
19:21 jcockhren in the case of states *I think* the docs say you should define environments as branches
19:21 whiteinge i haven't used gitfs yet but that is my understanding
19:21 jcockhren If that's true I'm guessing, the master branch is automatically mapped to the base env
19:22 whiteinge yes
19:22 jcockhren hmmm
19:22 whiteinge is that gist not working as expected?
19:23 jcockhren before, I funk up my setup, I wanted to see if that approach even makes sense
19:28 felixhummel joined #salt
19:29 jcockhren hmmm
19:30 jcockhren I think I just thought of a good new feature for salty-vagrant
19:30 druonysuse joined #salt
19:31 jcockhren it'll be awesome-sauce, if one could set the environment for running the highstate
19:31 mgw joined #salt
19:31 jcockhren if I have a dev box, I need to to have everything for my dev environment
19:32 jcockhren salt.set_environment = :dev
19:32 jcockhren then, salt.highstate = true
19:33 jcockhren will run the "dev" env in the top file
19:33 jcockhren thoughts?
19:33 dave_den jcockhren: you can set the env in your minion config
19:34 mohae jcockhren, with the latest Vagrant there's no need for salty-vagrant
19:35 jcockhren mohae: yeah. I meant the "salt provisioner in vagrant"
19:36 jcockhren easier to type less letters
19:36 jcockhren lol
19:36 mohae trye
19:36 mohae true
19:36 Khazix joined #salt
19:36 nocturn joined #salt
19:37 aboe joined #salt
19:37 baniir joined #salt
19:41 juanlittledevil joined #salt
19:41 Gifflen joined #salt
19:43 __gotcha joined #salt
19:43 jcockhren dave_den: you mean with the "environment" variable?
19:45 jcockhren I'd like to keep my minion configs dumb
19:47 jcockhren I guess what I thinking is that highstate runs the base states, then have a way to follow up with a call to apply all the states of a specific env
19:48 forrest joined #salt
19:49 jcockhren hmmm. I think maybe I can leverage pillar?
19:50 nu7hatch joined #salt
20:00 williamthekid joined #salt
20:04 pipps1 joined #salt
20:06 ekrem joined #salt
20:07 jslatts joined #salt
20:08 jacksontj joined #salt
20:09 NotreDev joined #salt
20:10 NotreDev is there a way to store certain sensitive information (ssh keys, etc) in a git repo that the master doesn't see (but the minions do)
20:10 cachedout left #salt
20:12 zooz joined #salt
20:16 devinus joined #salt
20:18 felskrone joined #salt
20:18 SpX joined #salt
20:20 alexandrel joined #salt
20:25 whiteinge NotreDev: since the master controls the minions (which are probably running as root) the answer is the master can see anything on any of the minions. in order to restrict that for certain users on the master you can use salt's eauth/acl systems
20:26 dustyfresh joined #salt
20:28 alexandrel Is it possible to include+extend an sls file that contains an include+extend? Or will the 2nd extend+include override the first?
20:28 darrend joined #salt
20:30 josephholsten joined #salt
20:30 forrest why would you do that?
20:30 whiteinge alexandrel: you can use as many include/extend as needed
20:31 forrest alexandrel, can you not just T the file based on what you include?
20:32 p3rror joined #salt
20:32 forrest I'm not trying to say it's wrong, I'm just curious as to what situation you'd do that in
20:35 Ahlee anybody got theories why a state asking to install two packages always fails, though the packages install?
20:35 Ahlee well, first install says it fails, but rpm -qa shows the pckages as installed
20:36 pipps1 joined #salt
20:36 dustyfresh maybe they were already installed?
20:36 dustyfresh Failed to install because it may already exist? That's one of the only things I could think of.
20:37 Ahlee looks like it was due to specify .x86_64
20:37 dustyfresh ahh
20:37 Ahlee they were removed prior to salt call
20:41 Ryan_Lane joined #salt
20:43 juanlittledevil is gitfs for pillar something that's been implemented yet?
20:44 jcockhren juanlittledevil: yep
20:44 jcockhren I use it
20:45 juanlittledevil do you have a sample master config? I'm not sure how I should be setting it up.
20:45 juanlittledevil or do you know if it's documented somewhere?
20:45 micah_chatt is anyone using the salt python api?
20:46 micah_chatt I'm having auth trouble sending commands to my salt master process
20:46 piffio hi guys
20:46 jcockhren juanlittledevil: let me cook up a sane one for you
20:46 piffio I'm putting my hands on salt here, and I'm still missing a fundamental point here... what do I use in order to associate a server to an environment?
20:47 jalbretsen joined #salt
20:47 juanlittledevil jcockhren: Awesome! Thank you!!!!
20:47 piffio I'd like to use gitfs and branches for handling states in dev / qa / prod
20:47 piffio but then I still don't get how to "assign" a server to a specific environment...
20:47 piffio do I have to use grains for that?
20:48 piffio jcockhren: I'm interested too in pillars over gitfs! thanks :)
20:48 micah_chatt my external_auth section has ubuntu with all privileges, but I can't seem to connect
20:50 whiteinge micah_chatt: how are you passing auth credentials through LocalClient?
20:50 Ahlee piffio: in your minion, set environment: Branch
20:50 piffio Ahlee: ah! thanks
20:50 piffio will try that
20:50 Ahlee but you still may need a corresponding match in your top.
20:51 micah_chatt username='ubuntu', password='ubuntu'
20:51 jcockhren https://gist.github.com/jcockhren/6600457
20:51 jcockhren juanlittledevil: ^
20:51 jcockhren there's more to the story that's nowhere in the docs
20:52 jcockhren I'll inline here so it can be in the backlogs
20:52 Ahlee i see ordering states documentation has updated with information talking to features on 0.17.0 - is there a time frame on these?  state_auto_order sounds extremely good for sanity
20:52 juanlittledevil jcockhren: I will try that right now!!! Thank you!..
20:52 whiteinge micah_chatt: you also need eauth='pam'  (or whatever eauth backend you're using)
20:52 jcockhren juanlittledevil: this doesn't speak on whether or not the repo is private or public
20:53 Ahlee whiteinge: while you're here: somebody was asking about pepper the other day, is that project still alive?
20:53 woebtz joined #salt
20:53 whiteinge Ahlee: it's not dead...
20:53 micah_chatt whiteinge: thanks, that got it. I couldn't find that in the docs
20:54 sfello joined #salt
20:54 jcockhren juanlittledevil: so for a private repo, the "user" setting is where I the deploy key must originate from
20:54 jcockhren piffio: ^
20:55 Ahlee whiteinge: i'll take your response and extrapolate way too much off it.
20:55 jcockhren so I have a deploy key specific for my master reading from my private repos for both states and pillar
20:55 jcockhren juanlittledevil, piffio ^
20:55 whiteinge haha
20:55 whiteinge Ahlee: i don't have a need for it myself so i've only thrown personal time at it twice. what we need is a business case to spend work time on it! :)
20:55 Ahlee lol, i see.
20:56 Ahlee and as always, pulls accepted I'm sure :)
20:56 juanlittledevil jcockhren: the command syntax seems to be the same as gitfs_remotes:
20:56 oz_akan_ joined #salt
20:56 jcockhren juanlittledevil: nah. slightly different
20:56 whiteinge Ahlee: always! :D
20:57 jcockhren I'll put them together and let you see
20:57 Ahlee Looks like with gitfs, metadata (permissions in particular) aren't maintained
20:58 shellllbellll joined #salt
20:59 cjh any word on when 0.17 will land?
20:59 jcockhren https://gist.github.com/jcockhren/6600457
20:59 Ahlee is this expected, and/or is there a flag i can enable so a recursive managed directory from git maintains permissions
20:59 jcockhren juanlittledevil, piffio ^
21:00 jcockhren Ahlee: you mean like a submodule?
21:00 jcockhren hmmm
21:00 piffio jcockhren: thanks
21:00 juanlittledevil jcockhren: I see… ok well this will totally work for me. Thanks!!!
21:00 piffio is anyone using nodegroups for targeting nodes, btw?
21:00 Ahlee jcockhren: no, i have a recurisve directory defined in a state, that's stored in git
21:00 Ahlee the permissions on files aren't as expected
21:01 Ahlee they're coming in as umask 002, rather than what i expect which is what was checked into git
21:01 piffio basically, I'm trying to figure out what's the recommended way of targeting environments without using a regex on the top.sls file
21:01 jcockhren Ahlee: oh
21:02 whiteinge cjh: imminently
21:03 jcockhren Ahlee: what you can do is set the git-config globally now
21:04 jcockhren wait... that probably doesn't help you
21:04 jcockhren one sec
21:04 alexandrel forrest: it's a valid question, basicly I need to include+extend (read: overide) a managed.file entry handled by base, in a different environment.
21:04 whiteinge cjh: the rc should be out this week. i'm expecting any day now
21:04 forrest ahh I see.
21:04 jacksontj joined #salt
21:05 Ahlee oh. I wonder if it's a version
21:05 alexandrel it seems to work, but if I include a file that includes+extend as well, the first include+extend seems to be ignored.
21:05 jcockhren Ahlee: the file(s) you set umask 002 on, are there's sls files or files your placing somewhere?
21:06 Ahlee jcockhren: files i'm placing
21:06 jcockhren you're*
21:06 Ahlee they're scripts for launching the application the state is deploying
21:06 Ahlee so, while I could get around it by updating everything to sh foo.sh
21:06 whiteinge alexandrel: extend is additive so if you're extending the same value from multiple places you'll run into trouble
21:06 alexandrel whiteinge: so it seems ;)
21:06 jcockhren Ahlee: ok. do you happen to be on linux?
21:07 Ahlee jcockhren: Yes.
21:07 whiteinge alexandrel: think of it like combining dictionaries. the end result is a single dictionary
21:07 Ahlee git 1.7
21:07 Ahlee so i wonder if this is a git versioning thing?
21:08 mesmer joined #salt
21:08 jcockhren Ahlee: take a look in /var/cache/salt/gitfs/
21:08 jcockhren (on the master)
21:08 Ahlee on master or minion
21:08 Ahlee thanks
21:08 Ahlee ok
21:08 whiteinge alexandrel: if you need a different file.managed value for multiple environments you should look into pillar
21:08 Ahlee /var/cache/salt/master/gitfs ?
21:08 Ahlee /var/cache/salt/master/gitfs ?
21:08 jcockhren "refs" will contain the branches
21:08 cjh whiteinge: ok cool
21:08 jcockhren yep
21:09 alexandrel whiteinge: very good point.
21:09 williamthekid joined #salt
21:10 jcockhren Ahlee: are the umasks being changed?
21:10 jcockhren Ahlee: Also, if you're using file.managed, you can set the umask when you place it
21:11 Ahlee jcockhren: using recursive.
21:11 Ahlee the whole point was to NOT have to manually define each of htese files
21:11 jcockhren ah
21:11 Ahlee but, the performance of gitfs -> minion is proving insufficient
21:12 jcockhren Ahlee: salt.states.file.recurse
21:12 tuxIO joined #salt
21:12 jcockhren you can recursivly set modes for files and dirs
21:12 Heartmender joined #salt
21:13 jcockhren if I'm still missing you, create an issue on GH Ahlee
21:13 Ahlee word
21:13 jcockhren I'll be looking through the issues later tonight
21:16 Ahlee I think this is suitable
21:16 Ahlee thank you kindly good sir.
21:16 jcockhren no prob
21:19 JaredR joined #salt
21:20 piffio sorry guys, I feel very silly here, but in my /etc/salt/minion I read the following comment about the environment key
21:21 piffio # by statically setting it. Remember that the recommended way to manage
21:21 piffio # environments is to isolate via the top file.
21:22 piffio so, is the recommended way to use regex in the top.sls file?, as in
21:22 piffio qa:
21:22 piffio '*-qa':
21:22 piffio ...
21:22 piffio ?
21:23 Heartmender joined #salt
21:23 forrest yea that works
21:23 mmilano joined #salt
21:24 fxhp akoumjian: salty-vagrant might run into an issue in the future with how it is determining branch/tags
21:24 hazzadous joined #salt
21:24 piffio sure, but it implies that you use some kind of naming convention on your hostnames, which looks to me less flexible that just configuring the minion to bind to a specific environment. The thing that I'm trying to understand here is why this is considered as the recommended way of achieving this result
21:25 __gotcha joined #salt
21:25 __gotcha joined #salt
21:25 fxhp akoumjian: https://github.com/saltstack/salt.git/info/refs
21:27 maveas joined #salt
21:28 jcockhren http://docs.saltstack.com/topics/tutorials/states_pt4.html
21:28 jcockhren piffio: ^
21:28 jcockhren there's something else too
21:28 swa_work http://docs.saltstack.com/ref/states/top.html
21:29 jcockhren swa_work++
21:29 jcockhren piffio: http://docs.saltstack.com/ref/states/top.html#other-ways-of-targeting-minions
21:31 jacksontj joined #salt
21:31 piffio thanks
21:32 swa_work as well piffio http://docs.saltstack.com/topics/tutorials/pillar.html
21:32 nu7hatch joined #salt
21:33 eculver joined #salt
21:33 piffio yeah, I've been reading all that already. the problem is that for some reason it doesn't look straightforward to me, but I guess that I just need to get used to the whole architecture
21:35 swa_work I hear ya piffio
21:35 jcockhren piffio: do what you can to leverage pillar and the grains system
21:35 jcockhren tons of distinguishing information there
21:35 faldridge joined #salt
21:36 jcockhren but you could have an user case that isn't 'slick' like mine. ;)
21:36 jcockhren I kid
21:36 piffio :)
21:36 piffio thanks guys
21:36 swa_work yw piffio
21:37 piffio I'll try to come up with a working setup and come back with some more questions I guess :)
21:37 swa_work coolio piffio
21:37 jcockhren ha
21:38 swa_work well .. back to:
21:38 * swa_work &
21:42 bemehow joined #salt
21:43 ronc joined #salt
21:50 whyzgeek anyones knows how to put a multiline string with \n in pillars?
21:51 robawt whyzgeek: did you escape the newline?
21:51 robawt \<enter>
21:52 whyzgeek robawt: no let me try it
21:53 whyzgeek robawt: no it just adds it as a char
21:53 whyzgeek so it doesn't recognize it as escape
21:54 whyzgeek however I am using a json style as a value
21:54 cjbarnes18 joined #salt
21:54 whyzgeek like test: { 'blash': "<multiline string>" }
21:59 pipps joined #salt
22:02 bemehow joined #salt
22:07 oz_akan_ joined #salt
22:13 jasiek joined #salt
22:13 Heartmender joined #salt
22:14 jasiek hey, i wanted to add a feature to salt, namely a require parameter to file.accumulated. how would i go about setting up a test env for salt for development?
22:18 berto- joined #salt
22:18 pipps1 joined #salt
22:19 robertkeizer joined #salt
22:21 dave_den jasiek: https://github.com/saltstack/salt/blob/develop/HACKING.rst
22:22 kermit joined #salt
22:25 piffio when I use gitfs for salt-states how do I map the 'base' env to the master branch? is 'base' a required name or could it have any name?
22:33 mapu joined #salt
22:33 piffio ok, using master as environment instead of base doesn't seem to work... therefore I'm deducting that I need to have a 'base' branch in order for it to work properly
22:35 alekibango joined #salt
22:39 ronc joined #salt
22:51 carmony I've started documenting the little commands and bits of help that make it easier to troubleshoot salt. :P
22:51 carmony https://github.com/JustinCarmony/salt-troubleshoot
22:52 Ryan_Lane joined #salt
22:57 UtahDave joined #salt
22:58 sssslang_ joined #salt
22:58 jslatts joined #salt
23:00 jlund joined #salt
23:05 jacksontj joined #salt
23:08 emocakes joined #salt
23:15 maveas joined #salt
23:15 maveas joined #salt
23:18 forrest nice carmony
23:19 mmilano joined #salt
23:20 Katafalkas joined #salt
23:21 jacksontj joined #salt
23:23 JaredR joined #salt
23:24 josephholsten joined #salt
23:25 jpeach joined #salt
23:25 nocturn joined #salt
23:25 juanlittledevil can one of you guys tell me what this error means? "Exception len([]) != len(['ssh: Could not resolve hostname : Name or service not known', '']) occurred in file server update"
23:26 juanlittledevil I'm trying to setup gitfs btw...
23:26 jpeach when attaching config files, is there a way to do service.reload rather than service.restart?
23:29 jpeach I can see that states.service.mod_wwatch can take a "reload" argument, but how do I set that from the sls file?
23:29 juanlittledevil d'oh! I was missing the GitPython module.
23:30 sibsibsib_ joined #salt
23:31 forrest jpeach, just - reload: True perhaps?
23:32 jpeach forrest: as an option to service.running?
23:33 forrest as part of service
23:33 forrest http://docs.saltstack.com/ref/states/all/salt.states.service.html
23:33 forrest look at the redis example
23:34 jpeach forrest: oh
23:34 jpeach I was reading that exact page ,but the wrong part :)
23:36 mgw joined #salt
23:39 higgs001 joined #salt
23:45 ninkotech joined #salt
23:54 dbraden joined #salt
23:54 piffio joined #salt

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