Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-09-03

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

All times shown according to UTC.

Time Nick Message
00:02 s0undt3ch NV: the top search field search the current project
00:02 s0undt3ch searches code and tickets
00:07 aat joined #salt
00:11 manfred left #salt
00:14 mmilano joined #salt
00:14 cedwards xmj: is there a more appropriate location for salt cache on freebsd than /var/cache/salt?
00:15 krissaxton joined #salt
00:23 sgviking joined #salt
00:25 NV why does salt-master call dmidecode?
00:29 noob2 left #salt
00:29 cedwards NV: to gather grains data about the hardware.
00:30 NV why is the master gathering grains? i thought that's what salt-minion would do...
00:32 cedwards where are you seeing dmidecode being called?
00:33 NV in /var/log/salt/master - warning messages appear because it's failing as i've got my salt master running as non-root
00:34 forrest yea that's why
00:34 forrest but technically you don't have to have them
00:36 NV sure but why does the master care at all?
00:36 NV the master should be using grains from minions, not itself, no?
00:37 forrest I assume it caches both
00:44 forrest NV, do you have a minion running on the master?
00:44 NV yes
00:45 NV which does run as root
00:45 forrest so what are you running where you're seeing that grain error get dumped into the logs?
00:45 forrest I assume you're getting something like this: 'Although \'{0}\' was found in path, the current user '
00:45 forrest 'cannot execute it. Grains output might not be '
00:45 forrest 'accurate.
00:46 NV yes, it displays a dozen or so times during master startup
00:46 forrest just restarting the salt-master service itself?
00:46 NV correct
00:48 forrest So it seems like here: https://github.com/saltstack/salt/blob/3e431cc9218133e020ff32dffb67c5a4f3bb7c1c/salt/grains/core.py#L397
00:50 forrest we just need to trace the service start call back to see what happens
00:50 forrest the service start calls https://github.com/saltstack/salt/blob/ea2c13df195c6f1fda6ebe9f02aedc541d1ab45f/salt/scripts.py#L14
00:51 forrest which just loads in https://github.com/saltstack/salt/blob/ea2c13df195c6f1fda6ebe9f02aedc541d1ab45f/salt/master.py
00:52 Katafalkas joined #salt
00:52 forrest there aren't a whole lot of lines mentioning the grains there, but that helps narrow it down. I've gotta go afk for a while, but we can try to trace it down when I get back if you don't want to do so now.
00:54 racooper joined #salt
00:57 m_george|away joined #salt
01:13 MTecknology joined #salt
01:14 lazyguru joined #salt
01:19 krissaxton joined #salt
01:19 kenbolton joined #salt
01:21 cmoberg joined #salt
01:22 littleidea joined #salt
01:23 eligos joined #salt
01:32 eligos joined #salt
01:33 avienu joined #salt
01:34 mwillhite joined #salt
01:38 vbabiy joined #salt
01:40 eligos left #salt
01:52 Katafalkas joined #salt
01:53 deepakmd_oc joined #salt
02:08 mmarch joined #salt
02:09 cowmix joined #salt
02:10 jinrou joined #salt
02:12 ipmb joined #salt
02:12 liuyq joined #salt
02:17 mgw joined #salt
02:19 xl joined #salt
02:19 vbabiy joined #salt
02:20 krissaxton joined #salt
02:21 jmp joined #salt
02:23 cocoy joined #salt
02:32 avienu joined #salt
02:42 mafrosis joined #salt
02:50 mwillhite joined #salt
02:53 Katafalkas joined #salt
03:00 mannyt joined #salt
03:01 littleidea joined #salt
03:02 Drexx joined #salt
03:06 littleidea joined #salt
03:10 scooby2 joined #salt
03:20 krissaxton joined #salt
03:29 Jahkeup joined #salt
03:49 UtahDave joined #salt
03:51 whyzgeek joined #salt
03:52 Jahkeup_ joined #salt
03:53 Katafalkas joined #salt
03:53 wolfpack joined #salt
03:57 Furao joined #salt
04:07 forrest Hey UtahDave, have you heard from terminalmage regarding how his tutorial went?
04:07 terminalmage forrest: it went well
04:07 forrest oh I thought you were away, cool
04:07 terminalmage yeah I was until a short while ago
04:07 UtahDave :)  I heard he did fantastic!
04:07 terminalmage yeah there was an issue with getting the projector working
04:08 terminalmage turns out ASUS put two almost-itentical-sized video connectors RIGHT next to each other
04:08 forrest lol
04:08 terminalmage micro HDMI and something else
04:09 aat joined #salt
04:10 crazysim joined #salt
04:10 terminalmage but yeah, the overstate stuff worked fine, no unexpected tracebacks
04:10 terminalmage no tracebacks whatsoever
04:10 forrest heh
04:11 terminalmage we had about 14 people there
04:11 crazysim joined #salt
04:13 forrest That's pretty good, aren't those tutorials usually kinda pricey?
04:13 terminalmage yeah, $125
04:13 forrest yea not bad then
04:13 crazysim joined #salt
04:14 Ryan_Lane joined #salt
04:15 forrest Are you going to the rest of the conference terminalmage?
04:15 terminalmage forrest: some of it probably
04:15 terminalmage but I need some rest :)
04:15 forrest Yea
04:21 krissaxton joined #salt
04:22 Jahkeup joined #salt
04:31 cmoberg joined #salt
04:31 NV forrest: heyia, had to afk earlier myself too - not too concerned RE: dmidecode by salt-master, just curious if there's any real gain from running salt-master as root that I'm missing
04:32 forrest NV, I've seen a few people who are still having issues posting question in the IRC when they aren't running as root, but most of that required functionality was taken out back around.. 0.12 I think it was?
04:32 NV mhm
04:34 efixit joined #salt
04:35 forrest I just don't see anything in the master.py that says "Hey don't run this grain stuff"
04:36 NV so it runs it, but doesn't use it?
04:36 NV ie, just hasn't been cut out of the master yet
04:37 forrest Not sure yet, still trying to figure out what all the code does. You've got this section: https://github.com/saltstack/salt/blob/ea2c13df195c6f1fda6ebe9f02aedc541d1ab45f/salt/master.py#L646
04:39 forrest But this is where the service actually starts: https://github.com/saltstack/salt/blob/ea2c13df195c6f1fda6ebe9f02aedc541d1ab45f/salt/master.py#L229
04:42 littleidea joined #salt
04:44 NV on an unrelated note, if i were to say pinch this from git https://github.com/saltstack/salt/blob/develop/salt/states/augeas.py - would i need to put it on all minions, or just the master?
04:44 NV i'm guessing minions need it too?
04:44 UtahDave NV: on the minions
04:45 NV drats
04:45 NV so many shiny things in git that I don't have yet :P
04:45 UtahDave you just drop the  module in  /srv/salt/_modules  and the state in   /srv/salt/_states   and then run   salt \* saltutil.sync_all
04:45 UtahDave bam!
04:45 NV oh hax
04:46 NV i believe the module is already in 0.16.3, just not the state
04:46 NV didn't realise you could distribute states like that though
04:46 NV i assume that would work for gitfs too if i make a _states folder in the gitfs repo?
04:47 UtahDave NV: I'm not sure, actually.  Seems like that would work!
04:47 NV one way to find out :D
04:49 mgw joined #salt
04:54 Katafalkas joined #salt
04:57 abele joined #salt
05:01 linjan_ joined #salt
05:01 gildegoma joined #salt
05:13 abele joined #salt
05:15 Nexpro joined #salt
05:21 krissaxton joined #salt
05:23 Furao joined #salt
05:25 goodwill Why MySQL!!! WHYYYYYYYYYYYYY!!! https://www.youtube.com/watch?v=emgJtr9tIME
05:25 goodwill WHYYY!!!!
05:37 perkins joined #salt
05:39 Furao goodwill: http://www.youtube.com/watch?v=1PoFIohBSM4
05:39 Furao mysql is a joke
05:40 jpadilla joined #salt
05:42 xmj joined #salt
05:44 Eugene "Because fuck you, that's why."
05:44 goodwill o_O
05:47 jinrou joined #salt
05:49 Eugene You asked
05:50 middleman_ joined #salt
05:53 Katafalkas joined #salt
05:55 Furao SELECT 1000/0 return Null
05:56 Furao my ex GF was running mysql in her brain
05:57 Furao both return crazy values for simple things
06:15 TheCodeAssassin joined #salt
06:26 NV http://pastie.org/private/nwlrkoxs94hsstmqsyrb3w - that config throws a The following requisites were not found: watch.file: /etc/postfix/main.cf for setting postfix to running
06:26 NV any idea how i can trigger a service to reload when augeas changes config options in a file?
06:27 NV or just watch for changes to a file in general (possibly from external sources?)
06:28 dthom91 joined #salt
06:29 forrest yea NV
06:30 forrest NV: http://docs.saltstack.com/topics/tutorials/states_pt2.html#require-other-states
06:30 forrest scroll down there to 'require vs watch'
06:30 unicoletti_ joined #salt
06:30 forrest here's a better one actually
06:30 forrest http://docs.saltstack.com/ref/states/requisites.html#watch
06:32 forrest Here's an example
06:32 forrest https://gist.github.com/gravyboat/6420340
06:32 forrest of using a managed file, and watching it.
06:34 NV in this instance though the file isn't managed, at least not entirely, augeas just sets a few parameters (at which point if it changes it it should reload postfix), but otherwise leaves the file editable
06:35 forrest You can't watch a file that isn't managed, because salt won't understand that it exists (at least not in my testing)
06:35 NV hrm
06:35 forrest you could do something really ghetto and add some jinja templating in there to check the md5sum of the file, and if it doesn't match, then restart the service
06:35 forrest but then you're updating that md5sum all the time
06:36 NV is there a way to watch for when the augeas state changes?
06:36 UtahDave that's correct.  Salt doesn't actually look at the filesystem.  It only watches the output of other states
06:36 NV watch.augeas: say?
06:36 UtahDave yep, you can watch anything
06:36 forrest what would be changing in your augeas state?
06:36 UtahDave - watch:\n  - augeas: youriddec
06:36 NV looking at the code of the augeas state i'm not sure how that would work though - guessing it still needs to be implemented? https://github.com/saltstack/salt/blob/develop/salt/states/augeas.py for reference
06:36 NV or am i missing some black magic happening here?
06:37 UtahDave NV: it doesn't depend on the augeus state to do anything
06:37 UtahDave the augeus state will just notify if it had changes.
06:37 UtahDave the watching state then decides what to do with that info
06:39 nishant joined #salt
06:39 krissaxton joined #salt
06:39 NV mhmm, "Invalid Changes data" from the augeas state - does that mean its not reporting if it made a change or not correctly?
06:39 NV (it is changing the file without issue, but that's showing up in the output)
06:40 nishant pwd
06:43 UtahDave NV: Hm.  I'm guessing that the augeas states is returning the wrong data structure.
06:43 UtahDave If so, a bug report would be very much appreciated.
06:44 NV did the data structure change between 0.16.3 and git? nabbed the state from git and put it in my _states dir as the augeas state is only newly added
06:45 NV looking at the file state at the moment to see if i can spot what's wrong, am quite keen to get this working so might do up a pull request if I can nut it out
06:45 NV assuming I'm not just doing something silly anyway :P
06:48 UtahDave NV: can you pastebin you sls?
06:49 NV http://pastie.org/private/nwlrkoxs94hsstmqsyrb3w
06:50 NV well, that still has watch.file, but the message displays even without watch there
06:50 UtahDave ah, there's your problem
06:50 UtahDave http://pastie.org/8293538
06:52 NV yeah, but it now always restarts postfix
06:53 NV http://pastie.org/private/cggjad8ifo3ahuj0kdy1hw
06:53 NV which is where I'm guessing the invalid changes data is coming into effect
06:54 NV looking at the file module, it looks like changes should be a dict with diff/new/etc in it, or empty if no changes were made
06:54 carlos joined #salt
06:54 UtahDave does that augeas command make a change every run?
06:54 NV no
06:55 TheCodeAssassin hi UtahDave, whats up?
06:55 NV /etc/postfix/main.cf hasn't been touched for 30 minutes or so now
06:55 UtahDave NV: ok
06:55 UtahDave TheCodeAssassin: hey!
06:55 TheCodeAssassin hey UtahDave, i want to use salt.modules.quota but i am missing a few states (i want to manage user quota's via states for a hosting service)
06:56 TheCodeAssassin is it "easy" to make new states?
06:56 UtahDave TheCodeAssassin: what states do you want to make?
06:57 TheCodeAssassin salt '*' quota.set /media/data group=painters file-hard-limit=1000
06:57 TheCodeAssassin what we want to do is limit disk space for users
06:57 TheCodeAssassin because we want to provide free hosting plans for the phalconphp community
06:58 UtahDave TheCodeAssassin: oh, there's already a quota module and state.
06:59 UtahDave TheCodeAssassin: you're wanting to add more functions?
06:59 TheCodeAssassin right now you can only turn it on
06:59 TheCodeAssassin via states
06:59 TheCodeAssassin but you cannot set any quotas
07:00 UtahDave ok, I see
07:00 UtahDave It's not super hard. You just have to return the correct data structures
07:00 UtahDave so remember, the state itself shouldn't actually do anything
07:01 UtahDave So you'll probably need to add  a  "get" function to the quota module
07:01 UtahDave then the State and use the "get" function from the quota module to determine if the quota has already been set
07:02 UtahDave If it hasn't already been set, then the State will use  the quota module to "set" the quota correctly
07:02 UtahDave does that make sense
07:02 UtahDave ?
07:02 UtahDave I
07:02 UtahDave I'd read through this: http://docs.saltstack.com/ref/modules/index.html
07:02 balboah_ joined #salt
07:02 UtahDave and this: http://docs.saltstack.com/ref/states/writing.html
07:04 TheCodeAssassin UtahDave: will do
07:04 xmj cedwards: /var/cache/salt works fine, in my eyes
07:04 TheCodeAssassin just noticed it wasn't there and we need it hehe
07:04 UtahDave that's cool, TheCodeAssassin.  Let me know if you need any help as you go along
07:05 TheCodeAssassin I will, thank you! :)
07:05 xmj cedwards: I put ccache into /var/cache (instead of /var/tmp, which is usually used), so it'd be there along /var/cache/pkg
07:05 UtahDave TheCodeAssassin: also, looking at the other modules and states for examples is a good idea, too
07:07 ml_1 joined #salt
07:19 abele joined #salt
07:23 ronc joined #salt
07:24 dthom91 joined #salt
07:25 jinrou joined #salt
07:31 malinoff Hi all
07:39 scott_w joined #salt
07:39 liuyq joined #salt
07:39 az87c_ joined #salt
07:39 az87c joined #salt
07:40 az87c__ joined #salt
07:43 vaxholm_ joined #salt
07:45 ProT-0-TypE joined #salt
07:46 ProT-0-TypE joined #salt
07:47 ProT-0-TypE joined #salt
07:53 aat joined #salt
08:01 AlcariTheMad joined #salt
08:01 jeffrubic joined #salt
08:08 emocakes joined #salt
08:09 matanya joined #salt
08:12 felixhummel joined #salt
08:16 sgviking joined #salt
08:18 matanya joined #salt
08:19 xl joined #salt
08:20 scott_w joined #salt
08:23 felskrone UtahDave: got my postcard yet? :-)
08:24 UtahDave I did!!
08:24 UtahDave it was great!
08:24 UtahDave lol, I was surprised when it got here.
08:24 felskrone hehe
08:24 felskrone told you ill send one :-)
08:31 dthom91 joined #salt
08:33 tomviner joined #salt
08:33 EnTeQuAk joined #salt
08:47 abele joined #salt
08:48 Jason-AVST joined #salt
09:00 ggoZ joined #salt
09:04 syngin joined #salt
09:05 kallek joined #salt
09:06 malinoff joined #salt
09:11 yota joined #salt
09:13 az87c_ joined #salt
09:43 MrTango joined #salt
09:59 Katafalkas joined #salt
10:02 gildegoma joined #salt
10:06 whiskybar joined #salt
10:17 Lue_4911 joined #salt
10:43 zooz joined #salt
10:45 giantlock joined #salt
10:54 gpkvt joined #salt
10:56 mgw joined #salt
10:56 gpkvt Hi, I'm having a problem with - watch. I'm watching a file which isn't changed, unfortenatly the command is still executed. My understanding was that if you use watch this shouldn't happen, am I wrong?
10:59 rockey joined #salt
11:06 matanya joined #salt
11:07 oz_akan_ joined #salt
11:11 jinrou joined #salt
11:14 fredvd joined #salt
11:15 jbunting joined #salt
11:16 bhosmer joined #salt
11:20 TheCodeA_ joined #salt
11:30 sfello joined #salt
11:31 baniir joined #salt
11:34 Tekni joined #salt
11:36 mwillhite joined #salt
11:46 ml_11 joined #salt
11:53 ml_1 joined #salt
11:53 anteaya joined #salt
11:56 xl a state will run whenever it is not met, even if the required/watched state has not changed
11:57 xl e.g. service.running will be executed whenever the service is NOT running yet
11:58 vbabiy joined #salt
12:00 joehh gpkvt: are you using cmd.run or cmd.wait to execute your command?
12:00 joehh cmd.wait will only run when the watched thing changes, cmd.run will run every time
12:01 linjan_ joined #salt
12:02 joehh http://docs.saltstack.com/ref/states/all/salt.states.cmd.html#salt.states.cmd.wait
12:02 teebes joined #salt
12:04 blee_ joined #salt
12:09 jinrou joined #salt
12:11 oz_akan_ joined #salt
12:14 ezraw joined #salt
12:19 liuyq joined #salt
12:25 ipmb joined #salt
12:30 rjc joined #salt
12:31 kenbolton joined #salt
12:33 oz_akan_ joined #salt
12:35 emocakes_ joined #salt
12:38 gpkvt @joehn it was cmd.run. thanks for you help, works now as expected
12:42 joehh gpkvt: We get stuck on this one regularly - feels like it should be in a faq or troubleshooting page
12:42 lemao joined #salt
12:42 gpkvt @joehh: sounds good to me, it's hard to spot for beginners in the docs
12:43 djn joined #salt
12:44 joehh yeah - the docs are generally complete, but beyond the work throughs can be tricky for beginners to navigate
12:46 Katafalkas Hey, is there a recommended / proper way of using salt-cloud in salt runners ?
12:53 littleidea joined #salt
12:53 vbabiy joined #salt
12:58 nocturn joined #salt
12:58 gpkvt @joehh: the docs are really great but because they are good it's a lot you can miss ;)
12:59 nocturn Hi, I'm new to saltstack, coming from puppet.  I created some basic sls files, but I get an error running them: Requisite declaration pkg:salt-minion in SLS base is not formed as a single key dictionary
12:59 nocturn What did I do wrong?
13:00 Furao used puppet before? :P
13:00 Furao nocturn: it's a list, it's - require: - pkg: salt-minion
13:00 Furao it's a list of python dict
13:00 Furao and not a dict
13:00 nocturn I have:
13:00 nocturn alt-minion:
13:00 nocturn pkg:
13:00 nocturn - installed
13:00 nocturn service:
13:00 nocturn - running
13:00 nocturn - require:
13:00 nocturn - pkg:salt-minion
13:01 TheCodeAssassin lol use pastebin
13:01 OrangeTux joined #salt
13:01 nocturn leading s missing
13:01 malinoff joined #salt
13:01 Furao nocturn: it's - pkg:SPACE salt-minion
13:01 nocturn Furao, OK!
13:01 nocturn thanks
13:02 Furao nocturn: https://github.com/bclermont/states/blob/master/states/salt/minion/init.sls
13:02 Furao it's weird to see such an old version
13:02 nocturn Thanks a lot, I really like salt
13:03 juicer2 joined #salt
13:03 nocturn puppet & mcollective are going out the door :-)
13:04 TheCodeAssassin nocturn: i did the same thing with chef, and chef was my replacement for puppet hehe
13:05 TheCodeAssassin but i've fallen in love with salt, like so many of us
13:05 nocturn I spent almost a day getting mcollective to run on RHEL6
13:05 nocturn only to find out that it won't due to bugs in ruby-stomp
13:05 nocturn salt was up in less than 1 hour with all my nodes in there
13:11 baniir joined #salt
13:11 pdayton joined #salt
13:12 Gifflen joined #salt
13:12 aat joined #salt
13:14 JoAkKiNeN joined #salt
13:15 brianhicks joined #salt
13:17 racooper joined #salt
13:19 welby any one have any ideas why i'd having issues whenever i add ext_pillar to my pillar roots, as soon as i do, i'm getting top file rendering problems, 'dict' object has no attribute 'endswith', config is https://gist.github.com/welbymcroberts/6423783. running 0.16.3/python 2.6.6 (rhel6)
13:20 cmoberg joined #salt
13:22 welby ah, never mind, might help if I read the docs correctly, ext_pillar doesnt go in the pillar_roots
13:23 m_george left #salt
13:26 pdayton joined #salt
13:26 OrangeTux I'm looking for administration software for a lot of machines and came acros salt. I saw the latest release of Salt is 0.16.x. Is it stable enouigh to use in a production environment?
13:29 backjlack joined #salt
13:31 nocturn Can I define variables for a certain scope like in puppet?
13:31 nocturn I want to have different NTP servers per env
13:34 TheCodeAssassin OrangeTux: well we are using it in production
13:34 TheCodeAssassin there are some issues, still
13:34 TheCodeAssassin like including pillar data and whatnot
13:35 TheCodeAssassin but if you don't go all fancy it's going to be fine
13:35 TheCodeAssassin OrangeTux:  what is your use case ?
13:35 TheCodeAssassin Because in a lot of cases, somebody already built state files for it
13:35 emocakes joined #salt
13:36 robertkeizer joined #salt
13:40 ksalman joehh: awww , well thanks =)
13:40 joehh no worries - I wish I could get it to lenny too
13:41 ksalman yea we have a lot of lenny boxes..i guess i'll have to upgrade them soon
13:42 joehh at least when we replace the lenny machines, they will be replaced by ones managed by salt. I'm hoping we can replace by the end of the year
13:42 martineg_ left #salt
13:42 toastedpenguin joined #salt
13:43 cmoberg joined #salt
13:53 tyler-baker joined #salt
13:54 Khollowa_ joined #salt
13:56 toastedpenguin left #salt
13:57 mannyt joined #salt
14:03 alunduil joined #salt
14:03 imaginarysteve joined #salt
14:08 joehh nocturn: I suspect that pillar data may be able to do what you want
14:13 Jahkeup joined #salt
14:14 _chjohnstwork joined #salt
14:14 cocoy left #salt
14:15 swa is there a way to retrieve the name of a role.. I'd like something like this in the motd : these roles are applied to this server : sshd, snmpd
14:15 akio joined #salt
14:17 ipmb joined #salt
14:18 jbunting joined #salt
14:21 anuvrat joined #salt
14:23 KennethWilke joined #salt
14:26 conan_the_destro joined #salt
14:26 conan_the_destro joined #salt
14:26 alunduil joined #salt
14:27 jaredr joined #salt
14:29 aat joined #salt
14:33 [diecast] joined #salt
14:33 JoeM joined #salt
14:35 JesseC joined #salt
14:36 jinrou joined #salt
14:39 lineman60 joined #salt
14:39 faldridge joined #salt
14:42 JesseC joined #salt
14:42 nocturn joehh, thanks
14:43 nocturn seems to do the trick
14:43 KennethWilke left #salt
14:43 KennethWilke joined #salt
14:44 jinrou joined #salt
14:44 jalbretsen joined #salt
14:45 joehh good to hear
14:46 abe_music joined #salt
14:49 dthom91 joined #salt
14:50 opapo joined #salt
14:54 racooper swa: roles are grains
14:56 racooper on the minion you could do salt-call grains.item role
14:58 Jahkeup_ joined #salt
15:00 KennethWilke howdy, does anyone know of a means to reference another node's grains via statefil
15:00 KennethWilke statefile*
15:00 KennethWilke ie a state for web-n01 to get the ip for mysql-n01
15:03 ckao joined #salt
15:04 ahale I ended up using a module that called publish.publish to get grains.items ip_interfaces to get info form another minion
15:08 Katafalkas joined #salt
15:08 mprymek joined #salt
15:09 Katafalkas joined #salt
15:09 honestly joined #salt
15:09 honestly joined #salt
15:12 whiskybar joined #salt
15:12 Katafalkas joined #salt
15:13 jbunting left #salt
15:14 Jahkeup_ joined #salt
15:14 whit joined #salt
15:16 jinrou joined #salt
15:17 Jahkeup joined #salt
15:17 lazyguru joined #salt
15:18 forrest joined #salt
15:24 Damoun joined #salt
15:25 isomorphic joined #salt
15:27 strind joined #salt
15:29 kaptk2 joined #salt
15:29 strind sudo salt rlrobert file.find /tmp/salty-vagrant name=vagrant-salt-\*.gem print=name returns the filename I'm looking for but
15:30 SunSparc joined #salt
15:30 faldridge joined #salt
15:30 strind - name: vagrant plugin install {{ salt['file.find']('/tmp/salty-vagrant name=vagrant-salt-\*.gem print=name') }} does only return []
15:30 avienu joined #salt
15:30 StDiluted joined #salt
15:31 devinus joined #salt
15:31 strind I should be able to get the output of file.find in a state module :P
15:31 CheKoLyN joined #salt
15:31 abele joined #salt
15:32 strind I would be greatful if any one could give me a helping hint on what I'm doing wrong
15:35 forrest when you run a normal find command on the command line I assume you're getting output back using that path and search strind?
15:36 unicoleti left #salt
15:36 strind jrpurdy: Jepp.
15:36 strind I guess I'm getting a list but don't know how to access the one element in the list
15:36 forrest can you just try print=name[1]
15:37 forrest because that looks like a blank list to me
15:37 forrest if it's returning []
15:37 abele joined #salt
15:37 strind Yes, looks pretty empty..
15:38 forrest so on whatever minion this sls runs on
15:38 forrest actuall don't even do tha
15:38 forrest t
15:38 UtahDave joined #salt
15:39 forrest do salt 'server_name' file.find /tmp/salty-vagrant name=vagrant-salt-\*.gem
15:39 forrest what does that return?
15:40 strind rlrobert:     - /tmp/salty-vagrant/vagrant-salt-0.4.0.gem
15:41 strind sudo salt rlrobert file.find /tmp/salty-vagrant name=vagrant-salt-\*.gem print=name gives me     - vagrant-salt-0.4.0.gem which is what I am looking for
15:41 strind But using that in my state file does not seam to work
15:42 strind {{ salt['file.find']('/tmp/salty-vagrant name=vagrant-salt-\*.gem print=name') }} <------ should give me the same result
15:44 UtahDave {{ salt['file.find']('/tmp/salty-vagrant', name='vagrant-salt-\*.gem', print='name') }}
15:44 UtahDave try that strind ^^
15:44 whiskybar joined #salt
15:45 * akoumjian regrets matching irc client notifications on 'salty-vagrant' regex
15:45 forrest lol
15:45 UtahDave lol
15:46 strind UtahDave: Nope, same error
15:46 jdenning joined #salt
15:47 TheCodeAssassin joined #salt
15:47 tuxIO joined #salt
15:48 StDiluted morning
15:48 StDiluted Anyone using a database as an external pillar?
15:48 strind Gotta go, thanks for sugestions :)
15:48 forrest Sorry strind
15:49 forrest Let me know if you resolve it
15:52 chrisgilmerproj joined #salt
15:54 wolfpack_ joined #salt
16:03 jaredr I see a bug with Salt 0.16.3 on CentOS 6.4:  pkg_resource.py imports and uses _prase_pkg_meta from yumpkg5.py. When it does that: NameError: global name 'collections' is not defined
16:05 jaredr So, if I edit pkg_resource.py and "import collections" at the top of the file, and restart the minion, it works properly.
16:05 juanlittledevil joined #salt
16:05 UtahDave could you open an issue on that, jaredr?  Or better yet a pull request?
16:10 mgw joined #salt
16:11 kermit joined #salt
16:12 baniir joined #salt
16:12 jergerber joined #salt
16:13 troyready joined #salt
16:15 teskew joined #salt
16:15 devinus joined #salt
16:16 bhosmer joined #salt
16:18 mmilano joined #salt
16:18 troyready joined #salt
16:20 chuffpdx joined #salt
16:20 kermit joined #salt
16:21 aat joined #salt
16:22 kermit joined #salt
16:24 bitz joined #salt
16:28 waverider joined #salt
16:30 baniir joined #salt
16:32 eightyeight joined #salt
16:33 KyleG joined #salt
16:33 KyleG joined #salt
16:40 Lue_4911 joined #salt
16:42 chrisgilmerproj left #salt
16:51 zooz joined #salt
16:55 Jahkeup joined #salt
16:57 devinus joined #salt
17:03 kenbolton joined #salt
17:04 fxhp OMG! highstate now returns a summary!
17:04 xmj joy
17:05 fxhp Succeeded: 59
17:05 fxhp Failed:     0
17:05 fxhp No more scrolling looking for "red" return data
17:05 forrest are you pulling from the dev branch fxhp?
17:05 xmj fxhp: what version is that? or custom plugin? or sorts?
17:07 fxhp salt-call --version
17:07 fxhp salt-call 0.16.0-2836-g8ec7e1a
17:08 xmj huh.
17:09 fxhp My salty-vagrant uses: salt.install_type = "git" and   salt.install_args = "develop"
17:10 jacksontj joined #salt
17:11 jacksontj terminalmage: yt?
17:12 giantlock joined #salt
17:16 aat joined #salt
17:17 kermit joined #salt
17:24 aat joined #salt
17:26 dthom91 joined #salt
17:27 Jahkeup joined #salt
17:30 Ryan_Lane joined #salt
17:35 baniir joined #salt
17:38 druonysus joined #salt
17:38 druonysus joined #salt
17:41 jalbretsen UtahDave:  Ready for the oddball bug of the week?
17:42 madduck Ah, olliewalsh stole #7000 from me!
17:42 jbunting joined #salt
17:42 UtahDave lol,  what's that jalbretsen?
17:43 UtahDave madduck: you missed it by 4 minutes!  :)
17:43 madduck dave_den, UtahDave: #6999 is the bug, or at least a large part of the problem we were discussing last week.
17:43 madduck UtahDave: I made #6999 and then scrambled to come up with something else, but I don't always have unwritten bug reports handy. That said, #7001 is genuine.
17:44 madduck and I lost 3 of those 4 minutes trying to figure out whether I was about to record a duplicate bug report.
17:44 madduck it's hard trying to be a good netizen and outperform the rest at the bug number bounty hunt
17:44 madduck olliewalsh has a typo in his report. it should just be annihilated.
17:46 baniir joined #salt
17:46 UtahDave lol
17:47 UtahDave madduck: make sure you have a good one ready when issue 10000 rolls around.  :)
17:48 ari-aws joined #salt
17:52 TheCodeAssassin joined #salt
17:54 anuvrat joined #salt
17:56 madduck UtahDave: I'd prefer #9999 actually.
17:56 UtahDave :)
17:56 * madduck gets ready to file 2998 issues
17:56 UtahDave if I remember correctly bug #6666 was a Windows bug.  :)
17:56 dave_den madduck: re: #6999, show_top with top.sls data no longer displays the entire top config for all minions. This was fixed in commit https://github.com/saltstack/salt/pull/6940
17:57 dave_den are you still having issues?
17:57 kermit joined #salt
17:57 madduck dave_den: right, but this is the minion doing the filtering on the output. There are different data flowing across the pipes depending on where the master gathers the data, and I think that is wrong.
17:59 dave_den i'll add a comment to the issue, but long story short: get_tops() was written so that it could compile the top.sls directly from the minion.
17:59 lineman60 joined #salt
17:59 dave_den when you use top.sls, the minion does not make a call to the master, it simply fetches top.sls from the fileclient
18:01 dave_den other than the incorrect output from state.show_top before pull #6940, what is the issue?
18:01 madduck dave_den: comment added
18:01 madduck dave_den: please have a look first.
18:01 Jahkeup joined #salt
18:02 oz_akan_ joined #salt
18:02 madduck argh! don't you think that top.sls should not even be available from fileclient, but abstracted by the master??
18:02 littleidea joined #salt
18:03 madduck as it is, the minion has to know about different tops backends.
18:03 madduck that just sounds like trouble.
18:03 dave_den madduck: yes, i think the minion should have to go through the master to get the applicable state tree.
18:03 madduck or the entire state tree
18:04 dave_den the minion does not need to know about which master_tops the master is configured to pul minion state from
18:04 madduck so i guess my issue could be retitle and repurposed, or should we open a new one to make this explicit?
18:04 dave_den let me add some comments to your issue 6999 so that we can clarify this and get a final decision on how to proceed.
18:04 * madduck is a bit demotivated again. Salt is nice in many ways, the community is great, but there are still so many issues that will take *months* or longer to get resolved. :(
18:05 dave_den madduck: again, with reclass configured on the master for master_tops, the minion doesn't need to know anything about it.
18:05 madduck dave_den: yeah, I know. This issue isn't so bad as it can be avoided easily.
18:05 dave_den the *only* place where the minion say the fully compiled top.sls data was in show_tops, which was purely informative for the sys admin
18:05 pdayton joined #salt
18:05 dave_den say/saw
18:07 jacksontj joined #salt
18:07 madduck dave_den: are you saying #6940 fixed this and now all the tops data are coming from the master?
18:07 madduck i am failing to turn that diff into answers without context ;)
18:08 dave_den heh, it's complicated, so i'm trying to explain why it works the way it does.  no worries, we will sort it all out
18:08 dave_den let me comment in the issue so i don't repeat myself or confuse things further
18:08 madduck ok
18:09 Lue_4911 joined #salt
18:09 dave_den gimme a few minutes. i tend to be verbose :)
18:09 jdenning joined #salt
18:09 TheCodeAssassin guys
18:09 TheCodeAssassin is there anything wrong here? https://gist.github.com/thecodeassassin/b13049124f870940b317
18:09 TheCodeAssassin first time i do upstream source file
18:10 madduck TheCodeAssassin: I think file.managed:source:http:// needs a checksum, no?
18:11 madduck TheCodeAssassin: "If the file is hosted on a HTTP or FTP server then the source_hash argument is also required"
18:11 TheCodeAssassin hmm
18:11 xmj ...which will be infeasible or impractical unless you use a predefined github branch.
18:11 TheCodeAssassin well that kinda defeats the purpose
18:11 TheCodeAssassin yeah xmj, read my mind
18:12 xmj s/branch/tag/
18:12 macduke joined #salt
18:12 TheCodeAssassin not gonna checkout the entire phpmyadmin branch to get only the create script
18:12 whyzgeek hi guys can somebody help me on how to do debugging? I want to run pdb in minion but I don't want to call it via salt-call. I want from master run salt and then go into debug mode on minion
18:13 madduck whyzgeek: so add pdb where you want it, start minion and go…
18:13 whyzgeek madduck: thanks let me try
18:13 TheCodeAssassin problem is, salt.state.archive is still in the salt-contrib and they ship the file now as a tgz
18:14 TheCodeAssassin *.gz
18:14 TheCodeAssassin so i can manually extract it, but that feels hacky
18:16 issackelly joined #salt
18:17 xmj TheCodeAssassin: don't they use tags?
18:17 xmj TheCodeAssassin: https://github.com/phpmyadmin/phpmyadmin/blob/RELEASE_4_0_6RC2/examples/create_tables.sql
18:17 xmj that'll be stable over time.
18:18 xmj so you checksum it once . . . and only have to modify blob/$TAG (and rechecksum) once there's a new release with new features to create_tables.sql which you want.
18:18 xmj or, you can use a definite commit number . . . instead of a definite tag.
18:20 waverider joined #salt
18:20 TheCodeAssassin hmm, i can do that...or i can checkout the https://github.com/phpmyadmin/phpmyadmin/tree/STABLE into /usr/share/phpmyadmin
18:20 TheCodeAssassin instead of installing the package
18:21 xmj .oO or you could learn a reasonable programming language (:
18:21 xmj kidding.
18:22 ml_1 joined #salt
18:23 TheCodeAssassin haha
18:23 TheCodeAssassin php is ok, only reason i use it is because it's easier to find php devs then to find python here in NL
18:23 TheCodeAssassin * python devs
18:24 TheCodeAssassin well not the only reason, also because of some legacy projects, but ok
18:24 xmj sorry, i didn't want to start a flamewar (:
18:24 waverider left #salt
18:26 TheCodeAssassin nah hear it all the time
18:26 TheCodeAssassin php has become a pretty decent language, just had a lot of hardships and idiots using it
18:26 TheCodeAssassin but i've seen some terrible python code as well
18:26 xmj <?echo("I find this very ugly.\n" . "However I do understand your recruiting issues.");?>
18:27 whyzgeek madduck: I don't know why my code doesn't execute. I added simple log on the minion and restarted it, it doest print anything. Shall I delete the pyc files?
18:27 whyzgeek is there anhy caching?
18:28 TheCodeAssassin for me its just tools, and i always pick the best tools for the job
18:28 TheCodeAssassin i still write my cli stuff in bash, just because i know it and it works well for me
18:28 TheCodeAssassin and bash is very, very ugly
18:28 drawsmcgraw joined #salt
18:28 TheCodeAssassin worse then perl and javascript
18:28 drawsmcgraw Those of you using the gitfs backend... how are you managing your pillars with sensitive information?
18:29 drawsmcgraw I'd love to keep all my pillars in Git but... don't want to expose all the sensitive details
18:29 mmilano_ joined #salt
18:29 madduck whyzgeek: should not be. Show me a diff.
18:30 TheCodeAssassin drawsmcgraw: you don't have to ship your sensitive information (like passwords) in git, i currently store them in /srv/pillar
18:30 rst joined #salt
18:31 xmj TheCodeAssassin: [another offtopic question] do you like BSD/MIT/ISC style licenses more than AL2,Mozilla,CDDL,(L|A)GPL ?
18:32 drawsmcgraw TheCodeAssassin: Fair enough. But we're looking at having more than one Salt Master and having everything (pillars, reactor files, etc...) in Git is really appealing
18:32 drawsmcgraw And yeah, we're not using the git_fs backend for the pillars.
18:33 drawsmcgraw BUT we do have a git project called 'srv-pillar' that we use to hold all our pillars
18:33 drawsmcgraw And we just 'git pull' 'em down onto new Salt mastes
18:33 issackelly left #salt
18:34 jinrou_ joined #salt
18:35 xmj what could possibly go wromg! :]
18:36 drawsmcgraw aww... :)
18:39 TheCodeAssassin ideally i'd put my pillar data in a database
18:40 p3rror joined #salt
18:42 drawsmcgraw Then extract the pillar from the DB and place it on the host during a new Master deployment?
18:42 matanya joined #salt
18:42 robertkeizer joined #salt
18:43 TheCodeAssassin well i created a bash script to bootstrap a new master
18:44 TheCodeAssassin you could rig it to deploy it with database data for example
18:44 TheCodeAssassin our pillar data is also generated from the database, has certain benefits for us
18:46 Mort01 joined #salt
18:47 andermic joined #salt
18:48 Mort01 joined #salt
18:49 drawsmcgraw TheCodeAssassin: Yeah I'm working towards that right now (pillars generated from the DB)
18:49 drawsmcgraw I like that approach. Seems simpler
18:49 drawsmcgraw No worries about encrypting/decrypting or keeping it safe. So long as the DB is safe.
18:50 cpickett joined #salt
18:50 baniir joined #salt
18:52 logix812 joined #salt
18:56 aboe joined #salt
18:57 abe_music joined #salt
19:00 nocturn Can I use the hostname grain as a variable in the source directive in an SLS file to have host specific versions of a config?
19:02 Eugene Yup.
19:02 Eugene {{grains['hostname']}}
19:03 Eugene xmj - I'm a big fan of the WTFPL. I dual-license under GPLv3+ for people who that isn't good enough for.
19:04 xmj lol, that's nonsensical
19:04 xmj WTFPL is bsd-ish, why would you need to dual-license that ;)
19:04 baniir joined #salt
19:05 Eugene Because some people have sticks up their asses about the name
19:05 madduck drawsmcgraw: reclass might be for you, although there isn't actually a DB backend yet…
19:05 madduck drawsmcgraw: http://reclass.pantsfullofunix.net
19:05 madduck TheCodeAssassin: ^^
19:06 xmj Eugene: duh
19:07 nocturn Thanks Eugene, will try that
19:07 TheCodeAssassin i am only guessing at what this does madduck
19:09 StDiluted Is anyone using a database (perhaps a noSQL db of some kind) as an external pillar?
19:09 drawsmcgraw madduck: Neat! Thanks
19:10 StDiluted ah, TheCodeAssassin was just talking about that, eh?
19:11 TheCodeAssassin yes yes
19:11 StDiluted Care to share any specifics?
19:11 StDiluted I'm thinking about doing that
19:11 StDiluted but not sure what direction to go
19:12 TheCodeAssassin well anybody take a different route i see hehe
19:12 StDiluted I was looking at possibly using Amazon's DynamoDB
19:12 StDiluted since we are on AWS
19:12 StDiluted but I'm not married to that
19:13 madduck drawsmcgraw: reclass has a storage plugin API that just has two functions and there are people already working on postgresql. Should be trivial to implement for any other DB, the big work is in figuring out how to represent/store data in the DB
19:14 madduck I am sure it's not "as-is-as-this" right now and that we have to do some work on the API, but I am perfectly happy and willing to work on this with anyone who's interested.
19:14 madduck s/who's interested/who shows me some code/ ;)
19:14 * xmj maniacally draws entity-relationship diagrams with n items
19:15 madduck that is to relational.
19:15 madduck s/to/so/
19:15 Eugene All this absurdity with databases. What's wrong with good ol flatfiles?
19:15 madduck I don't think pillar data are relational, but hierarchical in nature. Thus, ZopeDB, or reclass on top of some other DB
19:15 madduck Eugene: performance…
19:17 TheCodeAssassin I like the concept of storing my sensitive information in a database
19:17 TheCodeAssassin easy to backup, migrate
19:17 TheCodeAssassin zink of ze powah
19:17 Eugene `cp passwords.yaml passwords_backup.yaml`
19:18 madduck echo new password > passwords*
19:18 TheCodeAssassin to each his own Eugene
19:19 Eugene If you're reading the data from disk often enough to cause a performance hit you should really be evaluating your in-memory data structures.
19:20 Eugene I understand for large relational datasets containing customer info, but for Pillar data? Even involving thousands of hosts, the fs cache should be plenty sufficient.
19:20 madduck Eugene: unfortunately, ext_pillar is not designed to be persistent.
19:20 madduck Eugene: reclass currently only has yaml_fs, which you'll love.
19:20 Lue_4911 joined #salt
19:21 tuxIO joined #salt
19:21 aat joined #salt
19:22 dthom91 joined #salt
19:24 anteaya joined #salt
19:24 mprymek joined #salt
19:27 TheCodeAssassin madduck: you have a demo of this?
19:28 nineteeneightd joined #salt
19:29 aat joined #salt
19:33 devinus joined #salt
19:36 aantony joined #salt
19:37 jbunting joined #salt
19:40 drawsmcgraw At the risk of sounding pushy --> Is there an ETA for 0.17 ?
19:40 drawsmcgraw I'd love to try out the free Halite
19:41 zloidemon Hello, What does saltstack use async framework? twiste/diesel/etc?
19:42 TheCodeAssassin you mean 0mq?
19:42 Pate_ joined #salt
19:42 mgw joined #salt
19:42 ggherdov joined #salt
19:42 zloidemon TheCodeAssassin: 0mq is transport layer
19:42 TheCodeAssassin ah yes
19:42 Pate_ Hey Guys. I have an interesting source code deployment problem that is plaguing my local dev.
19:42 JimShoe joined #salt
19:42 Pate_ I'm using Salty vagrant for local provisioning
19:42 Pate_ on Ubuntu
19:44 UtahDave drawsmcgraw: We're working like crazy to get 0.17 ready. We're estimating about the 13th of Sep.
19:44 UtahDave zloidemon: multiprocessing
19:44 Pate_ I have a salt 'repo' state which downloads the latest stable project source from a Git repo and places it in /home/project/src. Supervisord is then configured to run python /home/project/src/run_project.py
19:44 drawsmcgraw UtahDave: Nice, looking forward to it!
19:45 dave_den zloidemon: salt uses straight python multiprocessing and threading
19:45 zloidemon UtahDave: I'm porting my code from mysql to tarantool, and I found problem with async.
19:45 zloidemon UtahDave: And I think need use same as salt as
19:46 Pate_ My problem is that local dev is annoying because supervisord is not running my local uncommitted code in /home/project/src and if I make changes in this directory, I risk salt overriding it from the remote repo.
19:48 Pate_ So, I see a few ways to make local dev fun again:1. commit every change and highstate my vagrant box: can't do that. 2. set up a symlink at /home/project/src to /srv/src, 3. add some conditional salt states that pulls code from my uncommitted repo, but this
19:49 Pate_ -but this seems like it might add a lot of complexity to my state files and I don't want to run highstate every time I change a single line of Python when I could just restart a supervisor service.
19:51 Pate_ How do you guys mount your working source code in Vagrant while keeping a sane source deployment cycle? GitFS comes to mind, but I'm not sure how to set this up for my working source code, especially locally.
19:54 madduck TheCodeAssassin: not really a demo. i mean, there are some examples in the code. Have a look at http://reclass.pantsfullofunix.net/salt.html and suggest improvements. Yes, it would be good to have a demo with reclass data and some sls files, but I just haven't had the time.
19:55 madduck drawsmcgraw: 0.17 is slated for the end of the week, but that is no guarantee
19:55 alekibango joined #salt
19:55 madduck drawsmcgraw: ignore what I said, UtahDave is authority.
19:55 jacksontj joined #salt
19:57 felixhummel joined #salt
19:58 UtahDave akoumjian: do you have a good answer for Pate_?
20:01 sfello joined #salt
20:01 Pate_ Thanks, @UtahDave :). I'm still new to Salt, but liking it so far.
20:02 UtahDave Pate_: cool!  Glad to hear that.
20:02 UtahDave I haven't used the salty-vagrant hardly at all, so I'm not much help there, unfortunately.
20:04 aat joined #salt
20:05 Pate_ Mm, m
20:05 Pate_ *M, maybe if I mounted my working source on /home/project/src, didn't update the repo for local dev
20:06 Pate_ ...that would solve both problems, but add more complexity to deployment (branching on env: prod/test/devl)
20:08 Pate_ How do I tell a state to run *unless* a grain has a given value?
20:09 akoumjian Pate_ UtahDave : The way we do this is in our sls file where the app's git.clone is applied, we have a template conditional
20:09 akoumjian Pate_: If the env == 'dev', we don't do any cloning. We do have the second state declaration that overrides our settings_local.py
20:10 scalability-junk anyone here using docker with salt? why would I wanna do that except from containers being more efficient and startup and installation times are better when using more than a few machines?
20:10 akoumjian Pate_: For every other env, we do a git.clone state, in addition to overriding settings_local.py.
20:10 scalability-junk would I just have my salt states use them to build the docker image and then distribute that?
20:10 akoumjian Pate_: Then we used shared folders to map our local directories to the same location as we normally git clone
20:11 scalability-junk and then in turn use salt to look for salt state changes and rebuild docker imagine with the new config and distribute the image again?
20:11 Pate_ akoumjian: awesome, that is exactly the solution I'm looking for.
20:11 scalability-junk you would loose the possibility to issue commands, faster updates, reaction system etc... or you would run 2 different deploy methods...
20:11 felixhummel joined #salt
20:12 bhosmer joined #salt
20:12 Pate_ Question 2: I'm keeping my salt config in a separate "salt-config" repo with some AWS credentials, which minions don't have access to. The salt-config repo then tells minions to fetch the project source from a git repo and templates their config files. Is this considered a good/bad practice?
20:16 felixhummel joined #salt
20:18 akoumjian Pate_: I don't know about good or bad, but it's what we do.
20:19 Pate_ sweet. nice to get some validation. It's a pain to have to pull two repo's for dev work, but it pays off in security. I'm still uneasy about how to limit the attack surface of the saltmaster.
20:19 Pate_ If the master is compromised, then so are all the minions, and any AWS creds in the salt-config repo.
20:20 akoumjian Yes
20:20 Pate_ I don't really see any way around this.
20:20 devinus joined #salt
20:20 TheCodeAssassin joined #salt
20:20 akoumjian You can make it a little harder for intruders by restricting salt command access via the wheel system
20:21 akoumjian So even if they get access to the salt master machine, they will need a certain users credentials (ie: root) to send commands to the minions
20:21 whit joined #salt
20:22 Pate_ hm, didn't know about the wheel system.
20:23 Jahkeup joined #salt
20:23 whit_ joined #salt
20:24 littleidea joined #salt
20:28 whit_ joined #salt
20:28 gordonm joined #salt
20:32 juanlittledevil joined #salt
20:33 bhosmer joined #salt
20:33 felixhummel joined #salt
20:38 jacob_s joined #salt
20:39 faldridge joined #salt
20:40 gatoralli joined #salt
20:41 gatoralli can I accept a salt key throught a python script or do i have to do it through the cli?
20:41 UtahDave yeah, you can use the python api
20:43 gatoralli UtahDave: through salt-api not the client api right?
20:44 whiteinge both. salt-api just uses the python api
20:44 whiteinge gatoralli: take a look at the "key" wheel module
20:44 gatoralli whiteinge: kk
20:45 whiteinge gatoralli: http://docs.saltstack.com/ref/wheel/all/salt.wheel.key.html
20:45 gatoralli whiteinge: ok, this is what i was looking for, thanks
20:46 whiteinge there's a better in-progress interface for calling those than what salt-api is currently using
20:46 jacksontj joined #salt
20:46 whiteinge looking to see if i can dig up more infos
20:47 whiteinge gatoralli: https://github.com/saltstack/salt/blob/develop/salt/client/api.py
20:47 whiteinge those changes will be in 0.17
20:48 gatoralli whiteinge: good to know
20:48 whit joined #salt
20:49 forrest Hey whiteinge, did they give you and terminalmage a timeline for when they'd have the tutorial video up?
20:49 whiteinge that said, instantiating the wheelclient directly yourself isn't likely to break
20:50 whiteinge forrest: i'll defer to terminalmage because i don't know. he may not be around until later (or possibly tomorrow) though
20:50 vbabiy joined #salt
20:50 forrest Yea I figured he was taking a little break after I talked to him yesterday
20:51 forrest just wasn't sure if they had updated you guys as to whether they would even have the tutorials up again this year.
20:54 xmj how do i tell salt-master that my minions had their IP moved (from 192.168.0.* to 127.0.0.*) ?
20:54 hjubal joined #salt
20:55 forrest I thought you didn't need to
20:55 forrest because the minions reach out to the master via the name
20:55 forrest and then once it connects it should pull all the grain data back
20:55 whit_ joined #salt
20:57 xmj true
20:57 xmj works
20:58 whit__ joined #salt
20:59 forrest ok cool, I thought I was missing something there for a minute
21:03 whyzgeek madduck: https://pastee.org/vesge
21:04 whyzgeek madduck: I just added one single log line and that doesn't show up. I even deleted the pyc and pyo files
21:09 xmj forrest: i thought it needed extra work but adjusting salt/minion master: and restartiing did it.
21:09 JesseC joined #salt
21:12 forrest xmj, ok cool.
21:14 dthom91 joined #salt
21:14 ksalman hm
21:14 ksalman the mysql_grants doesn't have an option for "identified by"? =(
21:15 forrest it supports additional arguments ksalman
21:15 forrest can you not pass it through as a connection arg?
21:15 ksalman can i do that in a state file?
21:16 forrest yea
21:16 ksalman huh this is news!
21:16 ksalman good news i might add
21:16 forrest Yea unless I am incorrect, the additional args are fine to use in state files
21:16 ksalman how would i do that ?
21:16 forrest you just treat it like other arguments
21:16 forrest hang on
21:16 forrest salt.states.mysql_grants.absent(name, grant=None, database=None, user=None, host='localhost', grant_option=False, escape=True, **connection_args)¶
21:16 forrest so you've got that
21:17 forrest well, that's absent
21:17 forrest but you know
21:17 baniir joined #salt
21:17 ksalman soo...i do a "--identified_by = xyz" ?
21:17 ksalman =)
21:17 forrest https://gist.github.com/gravyboat/6429748
21:18 forrest something like that in the sls I'm thinking
21:18 ksalman I will try it
21:18 forrest Once again, there's always the chance I'm absolutely wrong :P
21:18 ksalman haha
21:18 forrest but you should be able to do that.
21:22 forrest ksalman, let me know if that works or totally craps out on you when you test it please.
21:22 ksalman forrest: it seems it ignores the --identified_by
21:22 forrest when you run it on the command line?
21:22 ksalman no sorry, i put it in the state file
21:22 forrest as --identified_by?
21:23 ksalman yea
21:23 ksalman err
21:23 forrest can you try it like the example I posted?
21:23 ksalman -identified_by
21:23 forrest oh - identified_by
21:23 forrest gotcha
21:23 ksalman yea
21:24 forrest maybe it's an issue with the format? None of the examples use an item which has two words in it
21:24 forrest maybe just - identified by: asdf ?
21:24 ksalman i'll try differwent formats
21:24 forrest yea, maybe the connection args aren't treated the same way as kwargs :\
21:25 xmj eugh, how can I make salt 'minion' state.sls somesls < make moar fast?
21:25 forrest for the actual execution xmj?
21:25 xmj yea
21:25 forrest is the sls really complicated or does it execute commands or anything? Usually it's pretty fast
21:25 UtahDave xmj: can you pastebin your sls?
21:26 xmj ah
21:26 forrest Hey UtahDave, do you know how the **connection_args work for salt.states.mysql_grants? ksalman is trying to use identified_by, and I thought it could just be defined like the kwargs usually can, but that doesn't seem to be working.
21:28 ksalman I tried - identified_by, - identifiedby, - identified by, - identified-by. None of them appear to work
21:28 ksalman It doesn't throw an error either, just ignores it
21:28 whit joined #salt
21:28 forrest you're using .present right ksalman?
21:29 forrest and that user didn't have the grants manually added in the DB?
21:29 whyzgeek I am trying to spit out some extra log by adding a couple of log lines on minion cmd module. Somehow its not running my code, I can see log output before and after it but it doesn't run mine. Am I missing something?
21:29 ksalman forrest: yes I am. That is correct, it's a new user
21:29 forrest hmm ok, so are you dropping the user between runs?
21:29 UtahDave forrest and ksalman: have you followed it down to the execution module?
21:29 ksalman not dropping the user. I'll try that
21:30 linjan_ joined #salt
21:30 forrest ok cool, and UtahDave, we haven't gone down the chain that far yet
21:32 UtahDave forrest: ksalman: yeah, if you look in   salt/modules/mysql.py    line 99 is def _connect.  It is indeed not using identified_by
21:32 forrest Oh yea we know the option doesn't exist
21:32 forrest we're talking about the **connection_args
21:32 UtahDave line 128 is the start of the list of the options
21:32 forrest to see if we could pass it through that way, like you can pass through your own stuff in the kwargs
21:33 UtahDave right, so I'm telling you where it's getting lost
21:33 alunduil joined #salt
21:34 forrest gotcha, awesome thanks.
21:34 UtahDave i think you could probably add another _connarg() line there.  But I haven't tested it at all
21:35 forrest hey ksalman do you wanna try it?
21:35 forrest ksalman: https://github.com/saltstack/salt/blob/develop/salt/modules/mysql.py#L137
21:35 forrest for your local copy of the file if you modified it
21:35 ksalman forrest: i'll try it =)
21:36 forrest cool
21:38 xmj forrest: so ... tell me... those templates..
21:38 forrest the file templates?
21:39 xmj forrest: how do I get per-minion(=host with ip) openssh configs deployed :)
21:39 xmj from one template, with different "ListenAddress $IP" lines?
21:39 forrest Let me see if I have the bookmark on this machine, I'm at work currently so I might not have it imported, hang on
21:39 UtahDave xmj: stick each minion's LIistenAdress IP in pillar
21:40 xmj hm, that'd be one idea. i need it in MOAR places
21:40 honestly back to writing statefiles.
21:40 honestly wish me luck.
21:41 forrest so xmj yea, you base it off the grains data
21:41 forrest http://docs.saltstack.com/topics/targeting/grains.html
21:42 forrest if you run salt 'minion' grains.ls
21:42 forrest from the master
21:42 forrest you should be able to see which grain is available for the IP.
21:43 * xmj scratches head
21:43 xmj grains, pillars... hey i've barely grokked states :]
21:43 forrest so think of the grains like box information
21:43 forrest run that command I listed against one of the minions
21:43 forrest and you'll get data back about the box
21:44 forrest So here's a great example terminalmage made for his django project
21:44 forrest https://github.com/terminalmage/djangocon2013-sls/blob/master/foo/files/foo-vhost.conf
21:44 whyzgeek I wanted to override one system module with my own alternative. I added that module to _modules. However I see in the logs the old module is also gets called. However the new module is used to run the commands. Is there any reason for it?
21:46 forrest Now he's using pillar there
21:46 forrest BUT
21:46 forrest nothing says you have to do that
21:46 forrest it's just best practice really
21:46 xmj forrest: uh, well, i'm not sure about that really
21:46 xmj or, wait, yes, I am
21:47 forrest so run that command, and find the grain item that is for the IP of the box please
21:47 forrest because I don't remember it, and I need it for this exampel :P
21:47 forrest *example
21:47 xmj actually
21:47 xmj i'll use pillars
21:48 xmj and add the file where I *set* those IPs
21:48 xmj now that's neat.
21:48 aat joined #salt
21:49 forrest yea
21:49 forrest it's cleaner in the long run
21:49 forrest because I mean, we can write HUGE ssh_config file that works for 100 machines, but then we're doing tons of checks
21:51 xmj uh, see, sshd_config won't be the problem. optimally i'll just have one of it (and clean out the jail ssh's
21:51 xmj )
21:53 whyzgeek UtahDave: I am uning http proxy in my env. I noticed cmdmod module defaults to env={} if not is set. I changed that to use os.environ instead to it sets my http_proxy and https_proxy. I think that is mostly expected from cmdrun. Do you think it would be good idea to merge that in or you intentionally did empty env?
21:53 whyzgeek uning -> using
21:54 cedwards joined #salt
21:56 Pate_ Thank you, akoumjian. Your conditional templating helped me (a noob) to fix all my problems. :)
21:56 akoumjian Pate_: Awesome, I'm glad it worked out.
21:58 emocakes joined #salt
22:02 fragamus joined #salt
22:03 UtahDave whyzgeek: I'
22:04 UtahDave whyzgeek: I'm not sure why that was done.  Do you think that's a bug?
22:04 druonysus joined #salt
22:04 kermit joined #salt
22:06 jeffrubic joined #salt
22:08 Martinez joined #salt
22:09 pdayton joined #salt
22:11 xmj forrest: I'm trying out {{ grains['ipv4'] }} for now, let's see if it works
22:13 lemao joined #salt
22:13 jbunting joined #salt
22:13 xmj ha. not quite.
22:13 xmj How do I apply templating to file.managed ?
22:14 TheCodeAssassin joined #salt
22:14 Eugene Set template:jinja
22:15 xmj -ListenAddress {{ grains['ipv4'] }}
22:15 xmj +ListenAddress ['127.0.0.21']
22:16 xmj getting there :)
22:17 juanlittledevil joined #salt
22:17 xmj grains['ipv4'][0] did the trick, thanks much!
22:18 Pate_ xmj, if you're looking for a fallback value (I'm not sure that you are), you can use {{ grains.get('key', 'default-value') }} in case a given grain is not available.
22:20 xmj Pate_: I'm not, but thanks :-)
22:21 xmj (the only thing I need to find out is, what happens if the minion has more than one IP . . . and which one will be returned first)
22:22 Katafalkas joined #salt
22:23 UtahDave xmj: you might want to use grains.ip_interfaces
22:23 UtahDave then you can specify which nic you want to use.
22:24 UtahDave Of course, I guess each nic can have multiple IPs so...
22:24 pdayton joined #salt
22:24 xmj lo0 on minions 1,2,3 (one IP, bsd jail!), vtnet0 on minion4
22:25 xmj hmh
22:28 JaredR_ joined #salt
22:30 jslatts joined #salt
22:30 dthom91 joined #salt
22:32 jacksontj joined #salt
22:33 xmj I think it worked. the Diff shows a lot of empty lines where the {% %} magic was.
22:33 aantony hey guys.  I'm observing that the "cmd.run" state does not honor a stdin param.  Since the underlying cmd.run module does support stdin, it is surprising that this value is not propogated there.   Was this perhaps by design, or just an oversight?
22:34 oz_akan_ joined #salt
22:34 forrest sorry xjm, was in a meeting
22:34 forrest glad to see you got it though
22:37 xmj :)
22:43 jaredr joined #salt
22:43 jaredr test
22:44 JaredR_ test
22:46 jaredr_ joined #salt
22:46 jaredr_ test2
22:46 xmj forrest: yeah, the only question that bugs me now is how to get rid of all those empty lines
22:46 JaredR test2
22:47 xmj can i put {% if %} then {% endif %} into one line? (...not caring about readability)
22:47 JaredR Forrest and UtahDave and anyone else that has responded to me in the past week or so: I never saw your responses. Sorry about that. I was using a new irc client (xchat-gnome), and it didn't show any responses to anything… I thought the channel was mostly inactive.
22:47 JaredR :)
22:47 cbloss How do you guys target specific machines inside a pillar to define, say, the nginx config? Do you manually define grains in the minion.conf file?
22:48 UtahDave :) welcome back, jaredr
22:48 Jahkeup joined #salt
22:48 forrest JaredR, I don't remember, I just noticed your username kept changing a bunch
22:49 UtahDave cbloss: you can match on the minion name or any other type of matching that makes sense
22:50 JaredR cbloss: I define my grains in /etc/salt/grains (although I'm new to salt)
22:50 forrest xmj uhh I don't know if you can honestly
22:50 cbloss JaredR: Manually for each server?
22:50 Jahkeup joined #salt
22:51 cbloss UtahDave: I think I am just having a hard time grasping how to accomplish (correctly). Do you know of any examples online? I couldn't find anything that looked like what I wanted to do on SaltStarters
22:51 JaredR Yes, for each server. I have a bootstrap script that installs the minion and defines the grains. I don't know if I'll continue doing it that way, but that's what I'm doing for now.
22:51 cbloss just a lot of generic all web servers get the same vhosts (which isn't what I want)
22:51 aat joined #salt
22:52 UtahDave cbloss: have you looked at the apache salt-formulae repo?
22:52 cbloss JaredR: did you just modify the bootstrap that salt provides?
22:52 cbloss UtahDave: nope, but I'll search for it now
22:53 JaredR cbloss: No. I'm using a fab target to do the work.
22:53 cbloss fab target?
22:54 kenbolton joined #salt
22:54 JaredR Sorry… fab is like 'make' for python. I have a target that connects to the remote machine over ssh, and runs a shell script that I wrote to do the bootstrapping. I can pass in parameters to the fab target that determine a few grains of information.
22:56 JaredR cbloss: But I'm digressing from your original question, which was how to target specific machines inside a pillar.
22:57 cbloss UtahDave: doesn't the apache-formula set the same vhosts on all servers or am I missing something how this is working? (looking at https://github.com/saltstack-formulas/apache-formula/)
22:57 cbloss JaredR: yeah, that was a separate question I had for later though :)
22:58 UtahDave cbloss: basically you probably want to set which machines get which vhosts in your pillar.
22:58 UtahDave I think that's how whiteinge set up that apache sls
22:59 whiteinge that's right
23:03 jrobinson joined #salt
23:04 JaredR test3 (debugging gnome-xchat)
23:04 jrobinson test3 reply
23:05 jrobinson joined #salt
23:09 kenbolton joined #salt
23:12 JaredR_ joined #salt
23:12 JaredR__ joined #salt
23:14 JaredR_ So I have my pillar/top.sls file and it says that for host 'mongo-1', to include mongo/rs0 and mongo/rs1. Both rs0 and rs1 define mongo-rs-name: rs0, and the other one as rs1. How do I get the pillar stuff to be additive instead of replacing/clobbering each other?
23:22 benkay joined #salt
23:23 Katafalkas joined #salt
23:24 benkay left #salt
23:28 APLU joined #salt
23:28 salty-sailor joined #salt
23:28 salty-sailor quick question, how do I background a process when running salt from the master?
23:29 JaredR_ CTRL-Z
23:29 salty-sailor So I just let salt master stay open? that doesn't seem right
23:30 JaredR_ As I understand it, salt issues commands asynchronously, and the salt command has a timeout to wait for responses.
23:30 JaredR_ So you can hit CTRL-C and the command will continue to run on the minions.
23:31 whiteinge there's an --async flag that does the same as the ctrl-c
23:32 JaredR_ (you can take my answeres with a grain of salt, since I'm new to salt stack)
23:33 whiteinge no, you're spot-on. using ctrl-c or --async is the way to go. then you can look up the job later using ``salt-run jobs.list_jobs`` and ``salt-run jobs.lookup_jid XXX``
23:33 mafrosis joined #salt
23:34 salty-sailor but don't both of those leave a socket open?
23:35 UtahDave salty-sailor: everything in Salt is asynchronous.  It will finish executing everything in the background.  It's perfectly fine to do that.
23:36 mafrosis left #salt
23:36 JaredR_ Sockets are kept open all the time in salt. The minions connect to the server and keep their connection going.
23:36 kenbolton joined #salt
23:37 JaredR_ The salt master does not open TCP connections to the clients.
23:37 salty-sailor ah
23:37 salty-sailor okay
23:37 JaredR_ That's why it's so fast to issue commands to minions.
23:40 kenbolton joined #salt
23:41 rgarcia_ joined #salt
23:41 g4rlic JaredR_: I see what you did there w/ that pun.
23:42 dthom91 joined #salt
23:51 Jahkeup joined #salt
23:53 aantony joined #salt

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