Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-07-15

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

All times shown according to UTC.

Time Nick Message
00:08 felixhummel joined #salt
00:09 emocakes joined #salt
00:11 KyleG joined #salt
00:21 dthom91 joined #salt
00:32 emocakes joined #salt
00:34 logix812 joined #salt
00:42 jslatts joined #salt
00:58 tpe11etier joined #salt
01:01 Newt[cz] joined #salt
01:05 maspwr joined #salt
01:16 jbunting joined #salt
01:20 Jahkeup_ joined #salt
01:22 tpe11etier joined #salt
01:26 emocakes joined #salt
01:26 Nexpro joined #salt
01:28 aat joined #salt
01:33 jslatts joined #salt
01:38 liuyq joined #salt
01:46 raydeo joined #salt
01:47 kleinishere joined #salt
01:55 [diecast] joined #salt
01:55 [diecast] joined #salt
01:59 dthom91 joined #salt
02:04 StDiluted joined #salt
02:18 godber joined #salt
02:20 napperjabber joined #salt
02:24 [diecast] joined #salt
02:37 jslatts joined #salt
02:40 kleinishere joined #salt
02:43 whit joined #salt
02:58 avienu joined #salt
03:28 napperjabber joined #salt
03:29 bluemoon joined #salt
03:36 aat joined #salt
03:43 whit joined #salt
04:04 kleinishere joined #salt
04:07 dthom91 joined #salt
04:20 koolhead17 joined #salt
04:20 koolhead17 joined #salt
04:23 bluemoon joined #salt
04:26 Jahkeup_ joined #salt
04:33 efixit joined #salt
04:35 kleinishere joined #salt
04:52 dthom91 joined #salt
04:53 mgw joined #salt
04:53 jhauser joined #salt
05:02 StDiluted joined #salt
05:05 jalbretsen joined #salt
05:08 middleman_ joined #salt
05:22 dthom91 joined #salt
05:26 dthom911 joined #salt
05:28 LarsN joined #salt
05:33 nigeldunn joined #salt
05:34 kleinishere joined #salt
05:42 knightsamar joined #salt
05:46 mgw joined #salt
05:49 maspwr joined #salt
05:52 emocakes_ joined #salt
06:07 isomorphic joined #salt
06:16 whit joined #salt
06:18 az87c joined #salt
06:18 az87c_ joined #salt
06:39 cxz joined #salt
06:42 linjan joined #salt
06:43 oz_akan_ joined #salt
06:46 whit joined #salt
06:47 dthom91 joined #salt
06:49 knightsamar y\
06:51 Nexpro joined #salt
06:59 davromaniak joined #salt
07:00 davromaniak hello
07:02 davromaniak On a SLS file, when setting a variable with eth0 IP address, it work
07:03 davromaniak in "-context:", I use "ip: {{ grains['ip_interfaces']['eth0'][0] }}"
07:03 davromaniak but when I try to use "eth0:1" to get eth0:1 IP Address, I get an error when putting minions in highstate
07:04 davromaniak here is what I wrote in the sls file : "ip: {{ grains['ip_interfaces']['eth0:1'][0] }}"
07:04 davromaniak here is the error I get : "UndefinedError: 'dict object' has no attribute 'eth0:1'"
07:04 tonthon joined #salt
07:05 davromaniak and in "salt '*' grains.items", I can't see the eth0:1 interface, is that a normal behavior ?
07:07 oliv_mc joined #salt
07:13 agend joined #salt
07:15 emocakes joined #salt
07:18 Nexpro joined #salt
07:22 maspwr joined #salt
07:26 pkruithof joined #salt
07:26 pkruithof I'm having trouble installing a package using a ppa repo (on Ubuntu)
07:26 davromaniak now, after I rebooted the minion, the master sees eth0:1 IP address as the main IP address for eth0
07:27 davromaniak hmm, strange
07:27 pkruithof The state file looks like this:
07:27 pkruithof nodejs:
07:27 pkruithof pkgrepo.managed:
07:27 pkruithof - ppa: chris-lea/node.js
07:27 pkruithof - require_in:
07:27 pkruithof - nodejs
07:27 pkruithof pkg.installed:
07:27 pkruithof - version: 0.10.13-1chl1~raring1
07:27 pkruithof - require:
07:27 pkruithof - pkgrepo: nodejs
07:28 pkruithof when calling highstate (through Vagrant), I'm seeing the right commands: ie:
07:28 pkruithof [INFO    ] Executing command 'apt-add-repository -y ppa:chris-lea/node.js' in directory '/root'
07:28 pkruithof and then:
07:28 pkruithof [INFO    ] Executing command 'apt-get -q update' in directory '/root'
07:29 pkruithof which gives an error: [DEBUG   ] stderr: W: GPG error: http://ppa.launchpad.net raring Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
07:30 pkruithof The thing is, when I issue these commands manually, they work. Somehow the key is not imported or something when adding the repo. The only output I see after that command is: [DEBUG   ] stdout: OK
07:31 scott_w joined #salt
07:31 pkruithof doing this step manually I see output like: gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
07:39 kleinishere joined #salt
07:48 dthom91 joined #salt
07:50 whiskybar joined #salt
07:50 qba73 joined #salt
08:04 davromaniak hmmm, nevermind for my issue, I checked the code, and it's not possible to do so. I patched the ip_interface grain and asked performed a pull request in case the devs find it usefull
08:06 emocakes joined #salt
08:18 dthom91 joined #salt
08:23 rroa joined #salt
08:23 bemehow joined #salt
08:27 zooz joined #salt
08:30 bemehow_ joined #salt
08:34 Newt[cz]1 joined #salt
08:38 zooz joined #salt
08:43 efixit joined #salt
08:45 MrTango joined #salt
08:56 hazzadous joined #salt
08:57 fredvd joined #salt
09:04 kleinishere joined #salt
09:12 emilisto how do I import support for json and yaml filters in my jinja templates?
09:13 emilisto I try to do {{ pillar['common']|yaml }}, but salt complains that yaml is an unknown filter
09:16 whiskybar joined #salt
09:18 dthom91 joined #salt
09:20 krissaxton joined #salt
09:20 krissaxton left #salt
09:39 emilisto nv, realized template filters is a very new feature
09:40 emilisto (got it working by using salt daily if someone else wonders)
09:42 iMil hi there
09:42 iMil can the file.comment/uncomment state handle an entire block?
09:42 iMil i.e.
09:42 iMil - regex: ^<VirtualHost foo:80>.*?</VirtualHost>
09:43 iMil or should I use file.sed
09:44 az87c joined #salt
09:49 carlos joined #salt
10:00 giantlock joined #salt
10:04 akitada joined #salt
10:08 lemao joined #salt
10:11 rroa_ joined #salt
10:19 dthom91 joined #salt
10:49 dthom91 joined #salt
10:51 networkpadawan joined #salt
10:53 networkpadawan hi all, anyone has a bootstrap script for a raspberry minion?
10:55 bemehow joined #salt
10:57 rroa joined #salt
11:13 diegows joined #salt
11:14 jbunting joined #salt
11:15 oz_akan_ joined #salt
11:28 erasmas joined #salt
11:29 jslatts joined #salt
11:35 pkruithof joined #salt
11:35 krissaxton joined #salt
11:37 blee_ joined #salt
11:37 napperjabber joined #salt
11:43 BRYANT__ joined #salt
11:49 s0undt3ch joined #salt
11:49 dthom91 joined #salt
11:52 Newt[cz] joined #salt
11:54 Jahkeup_ joined #salt
11:56 bemehow joined #salt
11:58 dzen mh seems my master does not looks for pillar in /srv/pillar :'(
11:58 dzen 2013-07-15 11:47:12,486 [salt.loader                                 ][DEBUG   ] loading pillar in ['/var/cache/salt/master/extmods/pillar', '/usr/lib/python2.7/dist-packages/salt/pillar']
12:01 krissaxton joined #salt
12:04 KennethWilke joined #salt
12:05 bemehow joined #salt
12:07 tpe11etier joined #salt
12:12 reddye joined #salt
12:15 Jahkeup_ joined #salt
12:19 dthom91 joined #salt
12:20 blee_ joined #salt
12:22 _david_a joined #salt
12:26 fredvd joined #salt
12:28 logix812 joined #salt
12:41 jeffrubic joined #salt
12:43 unicoletti_ joined #salt
12:47 gmoro_ joined #salt
12:53 dzen seems the doc here is http://docs.saltstack.com/topics/development/external_pillars.html
12:53 dzen is outdated
12:53 dzen https://github.com/saltstack/salt/blob/develop/salt/pillar/mongo.py
12:54 dzen what should be exactly the function definition ?
12:57 rroa_ joined #salt
12:58 brianhicks joined #salt
13:00 cloq joined #salt
13:01 qba73 joined #salt
13:01 Gifflen joined #salt
13:01 [diecast] joined #salt
13:01 [diecast] joined #salt
13:01 jslatts joined #salt
13:02 anteaya joined #salt
13:03 cloq hello, am I right in assuming that modules generally cannot be used in state files? so far I manage user passwords with sed on /etc/shadow, but I can see there's a shadow module already present so somehow embedding it into a state would be a cleaner solution
13:04 oz_akan_ joined #salt
13:04 juicer2 joined #salt
13:05 cloq ah, sorry, user.present pass is defined by hash as well, for some reason i thought I'd have to be in plain
13:05 cloq it*
13:06 oz_akan_ joined #salt
13:06 BRYANT__ joined #salt
13:08 Jahkeup_ joined #salt
13:09 Jahkeup__ joined #salt
13:09 Bastion2202 joined #salt
13:11 Kholloway joined #salt
13:13 LyndsySimon joined #salt
13:15 Bastion2202 joined #salt
13:18 mgw joined #salt
13:24 racooper joined #salt
13:26 avienu joined #salt
13:29 timoguin_work joined #salt
13:33 StDiluted joined #salt
13:33 kermit joined #salt
13:35 aat joined #salt
13:45 joehh cloq: modules can (and should) be used in state files
13:45 joehh have a look at the hg state file - from memory, it uses the hg state extensively
13:45 felixhummel joined #salt
13:45 joehh I'm a little rusty on it, but I think it is accessed something like __salt__['modulename'].function
13:46 fredvd joined #salt
13:53 Bastion2202 joined #salt
13:55 teskew1 joined #salt
13:55 toastedpenguin joined #salt
13:55 dthom91 joined #salt
13:56 Danhad joined #salt
13:58 dahunter3 joined #salt
14:00 blee joined #salt
14:02 linjan_ joined #salt
14:03 aberant joined #salt
14:04 pentabular joined #salt
14:05 seb` joined #salt
14:12 reddye left #salt
14:12 stevedb joined #salt
14:13 kho joined #salt
14:13 kho joined #salt
14:16 felixhummel joined #salt
14:19 opapo joined #salt
14:21 ipmb joined #salt
14:34 cron0 joined #salt
14:39 mgw joined #salt
14:41 jalbretsen joined #salt
14:42 bemehow joined #salt
14:54 bemehow_ joined #salt
14:56 teskew joined #salt
14:56 tempspace So, let's say we wanted to take a password hash that's on a file on our master and load it into a pillar dynamically, what's the best way to do that?
14:59 StDiluted joined #salt
15:00 unicoletti left #salt
15:11 blee joined #salt
15:22 SEJeff_work tempspace, Write an external pillar module that does just that. Read up on ext_pillar in the docs
15:23 dzen got question about ext_pillar SEJeff_work :x
15:23 pentabular joined #salt
15:23 SEJeff_work can't answer it, I'm mostly heads down right now
15:23 dzen it seems that the pillar is executed only one ?
15:23 dzen once
15:23 dzen okay
15:23 SEJeff_work Yes until you run refresh_pillar
15:24 dzen mh
15:26 chrisgilmerproj joined #salt
15:29 tempspace Wouldn't this run on the minions?
15:29 tempspace I'm looking for the master to update the pillar and for the minions to use the pillar data generated from the master
15:29 SEJeff_work Sorry guys, give me 10-20 minutes
15:29 SEJeff_work and I'll be back
15:30 samsalt joined #salt
15:32 samsalt joined #salt
15:34 FL1SK joined #salt
15:40 FreeSpencer How can I disable salt-mini?
15:41 erasmas joined #salt
15:42 qba73 joined #salt
15:43 gmoro_ joined #salt
15:43 jacksontj joined #salt
15:45 kenbolton joined #salt
15:48 smoof joined #salt
15:49 smoof hello all!!!
15:54 avienu joined #salt
15:54 KyleG joined #salt
15:58 smoof joined #salt
16:00 TheRealBill joined #salt
16:03 aat joined #salt
16:06 whit joined #salt
16:07 KyleG joined #salt
16:08 whit_ joined #salt
16:09 whit_ joined #salt
16:12 maspwr joined #salt
16:12 whit_ joined #salt
16:17 bastion2202 joined #salt
16:18 maspwr joined #salt
16:19 UtahDave joined #salt
16:24 rbstewart joined #salt
16:25 gmoro_ joined #salt
16:28 UtahDave Morning!
16:29 akoumjian UtahDave: morning!
16:29 qba73_ joined #salt
16:29 kstaken joined #salt
16:30 jdenning joined #salt
16:31 KennethWilke UtahDave: howdy!
16:31 UtahDave Howdy!
16:31 KennethWilke how it goes today?
16:33 whit_ joined #salt
16:33 UtahDave It's going great!  I have a lot of cool Salt related stuff to work on today.
16:33 UtahDave You?
16:35 whit joined #salt
16:35 mgw joined #salt
16:39 danjellz joined #salt
16:40 aat joined #salt
16:42 bastion2202 joined #salt
16:42 aat joined #salt
16:46 jlund joined #salt
16:47 spudbook joined #salt
16:51 whiteinge clone1018: no, sorry. i was delayed triaging a potential issue. i should get the release cut today
16:54 aranhoide joined #salt
16:54 kleinishere joined #salt
16:56 eculver joined #salt
16:58 StDiluted morning all
16:59 logix812 joined #salt
17:01 jacksontj joined #salt
17:02 smoof Morning all
17:07 smoof joined #salt
17:07 smoof hello all
17:08 smoof Hello utahdave
17:13 smoof so how many people have done gitfs with salt?
17:13 UtahDave hey, smoof!
17:13 UtahDave We have quite a few people that use gitfs. It's a pretty popular new feature
17:14 krissaxton joined #salt
17:14 smoof awesome. I have had issues getting it to work but I'm using gitlab as the backend and not sure if that's the issue or not.
17:14 smoof I haven't done much in the way of trouble shooting
17:15 smoof but was curious if anybody had best practices before I get to deep into it.
17:15 UtahDave I haven't used it very much myself yet. It's still fairly new.
17:15 jbunting joined #salt
17:15 UtahDave I'd recommend asking on the mailing list.
17:15 smoof well, I gotta actually do what I'm supposed to do first... :)
17:16 smoof I was just casually asking first
17:17 smoof I think I'll actually start looking to see what I did wrong and actually try to see what the problem is with my setup.
17:17 StDiluted how do you use cmd_iter?
17:17 StDiluted I want to make sure I'm getting the response to the commands
17:17 StDiluted in some cases
17:19 smoof StDiluted - I haven't used that one yet so i'm of no help :)
17:24 krissaxton joined #salt
17:28 tpe11etier joined #salt
17:30 bemehow joined #salt
17:32 spudbook joined #salt
17:37 clone1018 whiteinge: awesome!
17:37 clone1018 thanks
17:41 jacksontj in the reactor system-- you can create SLS files to run after an event fires-- how can you look into what is the actual event message? (I imagine its in __salt__ somewhere, right?
17:42 Gifflen_ joined #salt
17:44 UtahDave jacksontj: There are 2 varialbes made available in the reactor sls file.  the 'tag' variable and the 'data' variable.  The contents are in the 'data' variable.
17:44 aat joined #salt
17:44 Gifflen_ joined #salt
17:44 jacksontj ah, i see :)
17:44 cnelsonsic joined #salt
17:44 jacksontj perfect :D
17:45 cnelsonsic left #salt
17:45 Ryan_Lane joined #salt
17:46 opapo joined #salt
17:46 aat joined #salt
17:47 kenbolton joined #salt
17:54 kaptk2 joined #salt
17:55 Jahkeup_ joined #salt
17:56 felixhummel joined #salt
17:57 StDiluted Is there a way to make sure that apt installs are quiet, or do not ask questions?
17:58 StDiluted for instance, one of the packages I'm installing uses dbconfig-common to set up mysql, but I don't want that to happen when installing the pkg with salt
17:58 StDiluted or are they just quiet by default
17:58 druonysus joined #salt
17:59 UtahDave they are quieted by default.
17:59 StDiluted ok cool
17:59 StDiluted thanks
17:59 akoumjian StDiluted: For reference, here is an example of the options the pkg.install module command uses: apt-get -q -y  -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef   install nginx
18:00 StDiluted nice
18:00 akoumjian Basically: be quiet, say yes to everything, when it comes to config files, always choose the existing config over the pkg config
18:00 StDiluted thank you for that
18:04 diegows joined #salt
18:04 brianhicks joined #salt
18:07 jalbretsen UtahDave:  Have you had any bug reports for sysctl where even if you have a Test=True, some it will be set, some it won't? Version 0.15.3
18:09 dthom91 joined #salt
18:09 UtahDave not lately, jalbretsen
18:10 UtahDave jalbretsen: wait, that's not true
18:10 jalbretsen I'll send you an email with my findings
18:10 UtahDave jalbretsen: https://github.com/saltstack/salt/pull/5731
18:11 napperjabber joined #salt
18:11 jalbretsen ah
18:11 jacksontj joined #salt
18:11 jalbretsen okay, then I'll just see if it turns up later
18:14 Thiggy joined #salt
18:15 UtahDave col
18:15 Thiggy Should I be able to do a "require: - pip: python-package-name" in an sls file?
18:15 UtahDave cool
18:15 Thiggy with newlines and syntax that's real, of course.
18:15 UtahDave Thiggy: yes, if you are defining  python-package-name:\n  - pip.installed      somewhere else
18:16 Thiggy Yeah, I am.
18:16 jodell joined #salt
18:16 Thiggy Ok thanks, wasn't sure if it wasn't working because that wasn't a thing or if I'm screwing something else up.  (It's the latter)
18:16 kermit joined #salt
18:18 aranhoide Thiggy: are you sure you've installed pip itself?
18:19 jeffasinger joined #salt
18:19 maspwr joined #salt
18:20 Thiggy Yeah pip is installed via ubuntu package, and then I have requires on the pip.install definitionis for that particular package so they have the right order.
18:20 Thiggy Pretty sure it's just me missing something obvious, but this was the first time I needed to put a dependency on pip installing something, and I couldn't find any examples of that, so I wasn't sure if I was expecting an unreasonable level of magic
18:21 dthom91 joined #salt
18:22 aranhoide do you get any errors, or does state.highstate report success (without your package installed)
18:23 Thiggy Ooooh I just figured it out. I have 2 definitions with the same name (one of them being the pip.installed declaration)
18:23 Thiggy #derp
18:24 Gifflen joined #salt
18:32 aranhoide didn't salt complain?
18:34 danjellz Hey guys, i have a master and 2 minions (one windows, one amazon ami). I can run commands like salt '*' cmd.run 'dir' or 'ls -llh' against each and they give the expected responses.
18:35 danjellz But when trying to use states, state.highstate comes back with Data failed to compile: ----------     No matching sls found for 'webserver' in env 'base' on Linux, and  State: - no     Name:      states     Function:  None         Result:    False         Comment:   No states found for this minion         Changes: on windows
18:36 auser joined #salt
18:36 auser hey all
18:36 danjellz Trying to follow the states_p1 tutorial. top.sls is base:   '*':     - webserver and file roots has been uncommented
18:37 chrisgilmerproj left #salt
18:37 auser what's going on danjellz?
18:37 danjellz hello :)
18:37 Thiggy @aranhoide I'm sure it did, but I probably missed it in all the output.
18:38 aranhoide | grep False
18:38 aranhoide helps highlight the failed states
18:38 auser I just got here… what are you trying to do?
18:39 capricorn_one joined #salt
18:39 Thiggy that's a good idea.
18:40 jschadlick joined #salt
18:41 stevedb joined #salt
18:44 [ilin] joined #salt
18:54 Jahkeup_ joined #salt
18:58 cbdev left #salt
19:03 mgw joined #salt
19:09 isomorphic joined #salt
19:09 auser danjellz: did you figure it out?
19:11 danjellz yes, sorry i dont know how to reply directly
19:11 jimallman joined #salt
19:13 auser UtahDave: holla
19:13 UtahDave yo, auser
19:19 cjh_ joined #salt
19:24 spudbook joined #salt
19:26 hebz0rl joined #salt
19:27 dzen 'moin
19:29 auser mornin dzen
19:36 napperjabber joined #salt
19:37 auser Hey all
19:37 mikedawson joined #salt
19:38 whiskybar joined #salt
19:38 rlb I'm trying to debug a problem, and so I followed the docs and ran "salt-call -l debug ...", and I was surprised to see that the output didn't include the stdout/stderr from cmd.run calls.  Is there a way to turn that on?
19:45 bemehow joined #salt
19:45 qba73_ joined #salt
19:45 UtahDave rlb:  have you tried -l trace   ?  I'm not sure if the cmd.run outputs the all that detail.
19:46 qba73_ joined #salt
19:47 Thiggy joined #salt
19:48 jacksontj joined #salt
19:50 chrisgilmerproj joined #salt
19:52 StDiluted Can a debconf file be a jinja template, so that information for the debconf gets populated from the pillar?
19:52 krissaxton joined #salt
19:56 pentabular1 joined #salt
19:57 rlb UtahDave: not yet, but thanks, I may later -- for now I've just added "exec" logging to the script.
19:57 chrisgilmerproj left #salt
20:01 UtahDave StDiluted: yep!
20:04 frogcrush joined #salt
20:05 jslatts joined #salt
20:06 spudbook joined #salt
20:06 thingles joined #salt
20:07 Thiggy joined #salt
20:09 timl0101 joined #salt
20:10 akoumjian UtahDave: I'm losing minions. :-( I thought it would be fixed upgrading from 15 to 16, but no such luck.
20:10 UtahDave :) really? losing connection to them?
20:11 akoumjian UtahDave: Yeah. They don't respond to any master commands, it's like they timeout after so many days. Restarting the minion service brings them back
20:12 UtahDave anything in the logs?
20:12 akoumjian UtahDave: Odd part is that my webserver minions seem to stay connected, but my task queue and search instance minions go out.
20:12 aberant joined #salt
20:12 UtahDave akoumjian: what OS?
20:13 akoumjian UtahDave: ubuntu precise
20:13 UtahDave can you see if there are a bunch of extra salt processes on a stuck minion?
20:13 akoumjian UtahDave: I've been getting this since 0.16.0, but I don't think it's related: https://gist.github.com/akoumjian/8f71cf62345100c68d38
20:14 blee joined #salt
20:15 UtahDave yeah, probably not.
20:16 * akoumjian may just run an hourly cronjob to restart minion, yuck
20:17 UtahDave akoumjian: does restarting the master fix the problem?
20:17 UtahDave what's the output of   salt \* saltutil.versions_report
20:18 akoumjian UtahDave: I already restarted all the minions, so I can't test restarting the master. :-/
20:18 lemao pkg.installed for a virtual package always returns false
20:19 rlb so if I have a node with a require/file: and a cmd.run:, the require will be satifsfied before the cmd.run fires, right?
20:19 akoumjian UtahDave: Is that the correct command? I'm getting that it's not available
20:20 _FL1SK joined #salt
20:20 akoumjian I believe everything is on 0.16.0
20:20 erasmas joined #salt
20:21 smoof joined #salt
20:21 [vaelen] joined #salt
20:21 UtahDave rlb: yes
20:21 gmoro_ joined #salt
20:21 z3uS joined #salt
20:21 morganfainberg joined #salt
20:22 UtahDave ah, sorry, akoumjian.     test.versions_report
20:25 rlb UtahDave: ok -- fwiw, the require/file was to install the script that the cmd.run runs, and it looked like cmd.run failed with "bash: file not found", but it's probably just something else I've missed.
20:27 tpe11etier joined #salt
20:27 stevedb joined #salt
20:27 cron0 joined #salt
20:33 rlb UtahDave: it does look like it's updating the file *after* trying (and failing) to execute the cmd.run.  Here's essentially what the state file looks like: https://www.refheap.com/9db7b50fe80e13eed34ecc864
20:33 rlb UtahDave: wonder if I'm doing anything obviously wrong...
20:35 kermit joined #salt
20:35 kermit joined #salt
20:37 jslatts joined #salt
20:40 dthom91 joined #salt
20:40 felixhummel joined #salt
20:42 chrisgilmerproj joined #salt
20:45 morganfainberg left #salt
20:45 morganfainberg joined #salt
20:48 rroa_ joined #salt
20:49 jesusaurus does anyone have a good example of file.accumulated handy?
20:51 chrisgilmerproj left #salt
20:53 ipmb joined #salt
20:57 jslatts joined #salt
20:58 younqcass joined #salt
21:02 auser Hey all, so we've been working on building up some material with SaltStack and today we are passing them along to the IRC room. If you've had trouble with things in the past, or are struggling with things now, we want to make this site the most relevant content beyond the docs, from a tutorial perspective.
21:03 auser So if you are interested in a detailed, step-by-step tutorial on any particular topic, please feel free to ping me and let me know. We have been getting a lot of contributions from clients and other members of the community
21:03 efixit joined #salt
21:05 StDiluted hey auser
21:05 auser hey StDiluted
21:18 auser how goes StDiluted
21:18 StDiluted going alright. Doing some other little things besides salt today
21:19 StDiluted but when I get back to it I am going to have to figure out environments
21:19 StDiluted not looking forward to it because it seems sort of… difficult to grok
21:19 auser gotcha… well
21:20 auser does this help: http://www.saltstat.es/posts/environment-based-clusters.html
21:21 zooz joined #salt
21:21 StDiluted yes that helps immensely
21:22 auser Feel free to sign up for the mailing list too… we will be publishing content both there and on the website
21:22 StDiluted I can populate the environment grain with an ec2 variable as well, since I'm already pulling the tags
21:22 StDiluted thanks!
21:23 auser of course
21:24 ipmb joined #salt
21:25 auser This is the first time I've really publicized the site at all… it's a big ugly
21:25 auser but want to start getting it out there
21:29 jhauser joined #salt
21:30 woolcap joined #salt
21:30 stevedb joined #salt
21:30 scotticus joined #salt
21:31 scotticus how to i get the minion to send its key to the master again?
21:32 scotticus the master had accepted but the minion never recognized this
21:32 scotticus i removed the keys, cycled both services (salt-minion, salt-master) and neither is picking anything up
21:35 giantlock joined #salt
21:38 zooz joined #salt
21:40 dthom91 joined #salt
21:50 jslatts joined #salt
21:54 auser scotticus: what shows up on the master when you do salt-key -L
21:54 scotticus auser: yeah i figured it out...i'm an idiot :)
21:55 auser ah, np
21:55 scotticus the minions didn't pick up the right master ip
21:55 auser :)
21:55 scotticus set that manually, bob's your uncle.
21:57 zooz_ joined #salt
21:58 pentabular joined #salt
21:58 lemao is it true that I can't refer to a nested pillar (a:\nb\nc: value) using pillar['a.b.c'] and need to use pillar['a']['b']['c'] ?
21:58 auser you need to use the latter one lemao
21:58 auser *I believe*
21:59 lemao auser: too bad ... I will convert all those nested pillars to a_b_c instead
21:59 lemao too much typing
21:59 auser yeah… I wonder if it'd be possible to do it otherwise
22:00 auser Mind if I ask what you're doing?
22:00 auser brb
22:02 lemao I have a bunch of properties that are a.b.X, a.b.Y, a.b.c.Z, etc it just maps nicely into a nested structure.
22:04 auser sure
22:05 auser I do that too
22:05 auser check this out...
22:05 auser this is how I handle that
22:05 auser https://github.com/saltstack-formulas/redis/blob/master/redis/templates/redis.conf.jinja
22:05 hazzadous joined #salt
22:05 auser I have nested pillars
22:05 auser redis:
22:05 auser vm:
22:05 auser etc. etc.
22:06 auser it also makes it easy to extend
22:06 auser as you can setup defaults
22:06 auser I should write a post on that
22:10 napperjabber joined #salt
22:13 brianhicks so it looks like supervisors.running will always restart the given service if provided with the restart flag. Is there a way to make it only do that if the watched state changes?
22:13 brianhicks s/supervisors/supervisord/
22:18 rlb I'll try to remember to tell UtahDave when he gets back, but fwiw, a config more or less like this one, does appear to try to run /some/file before it's copied to the minion.  For the first salt-call, the cmd.run fails (no such file), while the file.managed succeeds.  Then for the second salt-call run cmd.run succeeds since the file is now there: https://www.refheap.com/9db7b50fe80e13eed34ecc864
22:20 oz_akan_ joined #salt
22:24 brianhicks rlb: looks like the require isn't actually in the cmd.run state?
22:26 rlb ok, so that's my misunderstanding, then -- I thought require applied to the entire node.
22:26 rlb perhaps I just misread the docs.
22:26 rlb thanks much
22:26 rlb I'll see if that fixes it.
22:26 LyndsySimon joined #salt
22:27 rlb i.e. I thought that all the requires inside foo would be satisfied before any other nodes inside foo acted.
22:28 nliadm I took a stab at fixing the batching command: https://github.com/hank-at-code42/salt/compare/batching
22:28 nliadm I can't test it right now, confident it's horribly broken
22:28 jschadlick joined #salt
22:28 nliadm but someone else might be interested before I can finish and test it
22:30 kermit joined #salt
22:31 brianhicks rlb: did it work?
22:31 rlb not sure yet -- it'll take me a bit to find out
22:34 UtahDave joined #salt
22:39 oz_akan_ joined #salt
22:41 dthom91 joined #salt
22:42 auser cool nliadm
22:43 nliadm I find the current batching code very confusing
22:45 dthom911 joined #salt
22:47 kenbolton joined #salt
22:51 rlb UtahDave: brianhicks solved my problem -- perhaps I misread the docs, but I'd thought that a top-level require in a state meant that nothing in the state would happen until that require had been satisfied, i.e. like this: https://www.refheap.com/9db7b50fe80e13eed34ecc864
22:51 rlb I was apparently mistaken.
22:53 UtahDave oh, ok
22:56 rlb UtahDave: and I think you were right about -l trace (thanks) -- I think it does show the output.
22:56 UtahDave ah, good. I thought so.
22:56 StDiluted auger are you there?
22:56 StDiluted err auser*
22:56 auser yes, what's up StDiluted
22:57 StDiluted regarding your article about environments
22:57 rlb One other thing I noticed was salt complaining about duplicate keys, but that didn't seem to stop it.  Is there anything like -Werror that will make something like that an error?
22:57 StDiluted how would you use a different software version depending on environment?
22:58 rlb Or could I perhaps use something like test=True and grep the output for the error message?  Just wondering what the best practice might be.
22:59 StDiluted the version of mysql installed by states in /srv/salt/development/states could be different than in /srv/salt/production/states ?
23:00 StDiluted I was under the impression that things could be accessed across environments
23:00 rlb StDiluted: one way might be a pillar - http://docs.saltstack.com/topics/pillar
23:00 rlb See the httpd example there.
23:00 rlb etc.
23:00 StDiluted well, sure that's fine if the names of the package are different
23:00 StDiluted that's not what I mean exactly
23:02 auser (sorry -- back StDiluted)
23:02 StDiluted no worries
23:02 MrTango joined #salt
23:02 auser yeah, simply use pillar data
23:02 StDiluted I'm in no hurry ;)
23:02 auser so you want a different version of mysql installed per. environment?
23:02 StDiluted perhaps
23:03 StDiluted not in this case, but if I wanted to set up a test of a new version
23:03 auser yep
23:03 auser the way *I* do this is
23:03 StDiluted and install 5.6 on a development env
23:03 pentabular1 joined #salt
23:03 auser (sec, finding link)
23:03 StDiluted thanks
23:03 StDiluted I appreciate the assist
23:03 StDiluted this is the first time I've worked in an environment with different envs
23:04 auser urg, I need to create it
23:04 auser sec.
23:04 StDiluted no worries
23:04 bastion2202 joined #salt
23:06 logix812 joined #salt
23:08 auser so here's how I do it
23:09 auser https://github.com/saltstack-formulas/node/blob/master/node/init.sls#L2
23:09 auser I put versions in my pillar data
23:09 StDiluted I see
23:09 auser so when my pillar is compiled with my states, the appropriate version is filled in there and thus all is well
23:09 StDiluted ok
23:09 StDiluted that makes sense
23:09 auser <~ this is good content for another article
23:09 auser btw
23:09 auser thanks :)
23:10 StDiluted that makes sense. It's a little more complex than I'm at right now I think, but I need to get there
23:10 auser no problem
23:10 TheRealBill does anyone here know if when using the gitfs backen it support using the ssh config in .ssh/config?
23:10 auser I'll explain it in greater depth in another article, which… you will know if you sign up for the mailing list (wink wink)
23:13 auser UtahDave might know, TheRealBill
23:14 UtahDave TheRealBill: gitfs will use the credentials of the user Salt is being run as
23:15 TheRealBill hmmm.
23:15 TheRealBill I am able to pull from git using the git command using git+ssh but the saltmaster process isn't pulling anything down. (all on same node)
23:16 TheRealBill I know it uses the credentials, but that isn't the same as using the config settings.
23:16 UtahDave so if you're logged into the cli as the user and can run all your git commands, then gitfs should be good
23:16 TheRealBill UtahDave: that's what I thought, but that isn't what I get.
23:17 UtahDave TheRealBill: ok, have you seen this?
23:17 UtahDave http://docs.saltstack.com/topics/tutorials/gitfs.html?highlight=gitfs#gitfs-remotes-over-ssh
23:17 TheRealBill which leads me to wonder if it jus thas support for using the key, but not the config environment.
23:17 TheRealBill UtahDave: ues
23:17 TheRealBill yes*
23:17 TheRealBill but it doesn't say if it uses the ssh config envrionment or just the key
23:17 TheRealBill for example ...
23:18 TheRealBill I have to do a bit of ssh tunnelling, using netcat in the config file, to work around dumb networking limits.
23:18 TheRealBill it works fine from the command line, so the config is correct.
23:18 UtahDave TheRealBill: ah, I see.  Tom says that it should.
23:18 jslatts joined #salt
23:18 TheRealBill but if the gitfs backend doesn't read and use the .ssh/config file, it won't work. Which is the result I see.
23:19 TheRealBill UtahDave: well that is  good and bad then. ;)
23:19 UtahDave :)
23:19 TheRealBill good that it does, bad that it isn't working.
23:23 TheRealBill ok .... it seems there is a "magic restart the master 5 times" method to get it working. ;)
23:23 TheRealBill and remove the cache tree for good measure. ;)
23:23 UtahDave TheRealBill: :)  You figured it out!
23:24 TheRealBill yar
23:27 rlb when do minion sls startup_states take effect?  I just had a minion that didn't seem to pay any attention to the startup_states until I restarted it (again) -- I had already restarted it after I changed the config to add the startup_states.
23:27 rlb Though note if it matters, that after the first restart, the minion's key still hadn't been accepted by the master.
23:27 UtahDave rlb: that actually makes sense.
23:27 UtahDave startup_states only happens when the minion starts up.
23:28 rlb or more directly -- what's the correct way to add startup_states to a minion config so that we're *sure* the minion acts on them?
23:28 UtahDave rlb: just make sure the minion is authenticated first.
23:28 rlb For example, do I have to wait until after the minion has been accepted by the master before I restart it?
23:28 rlb ok, that'll complicate things a bit, but I should be able to manage it.
23:29 rlb So is the issue just that minions won't automatically retry a startup_state?
23:29 UtahDave rlb: are you using Salt Cloud?  that will authenticate if for you before the minion starts up
23:29 UtahDave rlb: only when they start up.
23:29 rlb no, not at the moment, I'm not.
23:30 rlb ok, the minion has to be authenticated because it's only going to try once, when it starts up.  Thanks.
23:30 UtahDave yep, that's exactly right.
23:30 rlb is there a way to ask from the minion if it's been authenticated?
23:31 rlb (if not, no big deal, I have a backchannel)
23:31 UtahDave well, you can attempt to run a highstate or something and you'll get a notification
23:31 cxz joined #salt
23:32 rlb OK, probably makes more sense to just use the channel that I'm using to handle telling the master that it's OK to auth this minion in the first place.
23:36 rlb is there a way for an unprivilged user on the master to get a list of the authenticated minions?
23:37 rlb i.e. something like salt-key --list authenticated, but that can be run by "not root"?
23:39 TheRealBill via sudo it could be
23:39 UtahDave yeah, you'll have to give that user sudo rights to salt-key
23:40 TheRealBill you can in sudoers specify the fill command with arguments to limit access to salt-key for that user
23:40 TheRealBill full* command
23:40 rlb UtahDave: ok, thanks -- I'd rather not, so I'll probably just have the cronjob that's approving new minions touch a file for each that the unprivileged user can see.
23:40 rlb "for each that's approved"
23:40 rlb that way no one needs extra privileges
23:41 jalbretsen joined #salt
23:42 dthom91 joined #salt
23:43 napperjabber joined #salt
23:44 TheRealBill rlb: it appears /var/cache/salt/master/minions is readable by unprivileged users. So an "ls" there might work too.
23:44 TheRealBill though that may not be intended. ;)
23:44 rlb heh -- thanks, I'll take a look once some minions come up
23:45 rlb (being able to just "test -e X" for an already existing X would certainly be simpler.
23:45 rlb )
23:48 mikedawson joined #salt
23:49 teskew1 joined #salt
23:56 rlb TheRealBill: that looks like it'll work for now -- and I can always do something more complicated later if necessary.  Thanks again.
23:56 jschadlick left #salt
23:57 mgw joined #salt

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