Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-09-18

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

All times shown according to UTC.

Time Nick Message
00:01 pdayton joined #salt
00:05 whiteinge whyzgeek: you might have to escape the \n not only in pillar but in the state that uses it as well. there's sort of a nested templating there  pillar sls -> state sls (rendered via jinja)
00:07 whyzgeek whiteinge: thanks...  in sls I only use the key to read the content. I tried using double escape in the pillar but that fails.
00:08 falican joined #salt
00:08 whyzgeek whiteinge: do you know any sample working?
00:14 darrend joined #salt
00:19 aat joined #salt
00:22 sibsibsib_ joined #salt
00:26 jbunting joined #salt
00:35 alunduil joined #salt
00:38 sgviking joined #salt
00:44 isomorphic joined #salt
00:45 aat joined #salt
00:47 Gwayne joined #salt
00:47 Gwayne joined #salt
00:48 bemehow joined #salt
00:49 bemehow_ joined #salt
00:58 whit joined #salt
01:01 halfss joined #salt
01:04 eculver_ joined #salt
01:07 KyleG joined #salt
01:19 jbunting joined #salt
01:25 pdayton joined #salt
01:30 nu7hatch joined #salt
01:31 nu7hatch joined #salt
01:33 jpeach joined #salt
01:47 [diecast] joined #salt
01:53 deepakmd_oc joined #salt
01:57 diegows joined #salt
02:00 Neogenix joined #salt
02:00 Neogenix Hello all!
02:02 Neogenix what's the easiest way to mass install SaltStack across a few hundred boxen, if there's nothing on them currently to automate the install? Can salt do that itself over SSH?
02:02 isomorphic joined #salt
02:05 sixninetynine joined #salt
02:05 oz_akan_ joined #salt
02:07 Eugennerz salt-bootstrap is the closest thing
02:08 Eugennerz I'm pretty sure you can do it with the proper `ssh` invocation, but I don't know it offhand
02:09 Eugennerz it's basically `curl | sudo sh`
02:11 bhosmer joined #salt
02:11 nu7hatch joined #salt
02:11 Eugennerz man ssh indicates that you would do something like `ssh $HOST "curl $bootstrap_url | sudo sh"`
02:11 Eugennerz Probably in a for loop of some sort ;-)
02:11 mapu joined #salt
02:15 xl1 joined #salt
02:19 avienu joined #salt
02:19 brew joined #salt
02:21 baniir joined #salt
02:26 brew joined #salt
02:28 Brew joined #salt
02:29 Brew joined #salt
02:36 Brew joined #salt
02:38 Brew joined #salt
02:42 micah_chatt joined #salt
02:44 Brew joined #salt
02:46 pdayton joined #salt
02:48 higgs001 joined #salt
02:49 Brew joined #salt
02:50 pipps1 joined #salt
02:50 emocakes_ joined #salt
02:56 oz_akan_ joined #salt
03:03 wwliux joined #salt
03:04 pdayton joined #salt
03:04 Brew left #salt
03:06 gg joined #salt
03:11 lempa joined #salt
03:11 middleman_ joined #salt
03:11 vbabiy Does the top file get applied in order?
03:12 clone1018_ joined #salt
03:12 mannyt joined #salt
03:12 backjlack_ joined #salt
03:12 jpaetzel_ joined #salt
03:13 bdf_ joined #salt
03:13 cdunklau_ joined #salt
03:13 andyshin` joined #salt
03:13 keekz_ joined #salt
03:13 akoumjian_ joined #salt
03:13 bawnzai_ joined #salt
03:13 mattikus` joined #salt
03:13 zach_ joined #salt
03:13 viq_ joined #salt
03:13 pygmael joined #salt
03:14 yo61 joined #salt
03:14 mollerstrand joined #salt
03:14 multani joined #salt
03:15 cowmix joined #salt
03:16 avienu joined #salt
03:17 marcinkuzminski joined #salt
03:18 eskp_ joined #salt
03:18 eskp_ joined #salt
03:18 mirko joined #salt
03:18 Odd_Blok1 joined #salt
03:18 utahcon_ joined #salt
03:18 joonas joined #salt
03:18 Daviey joined #salt
03:18 keee joined #salt
03:18 andrew_seattle joined #salt
03:19 xpen joined #salt
03:19 blast_hardcheese joined #salt
03:26 aleszoulek joined #salt
03:26 ede joined #salt
03:26 xt joined #salt
03:29 aat joined #salt
03:47 pipps joined #salt
03:47 pdayton joined #salt
03:49 Lue_4911 joined #salt
03:50 xpen joined #salt
03:57 linjan joined #salt
04:00 vipul joined #salt
04:02 Fin1te joined #salt
04:07 oz_akan_ joined #salt
04:12 KyleG joined #salt
04:12 KyleG joined #salt
04:16 Furao joined #salt
04:24 micah_chatt joined #salt
04:25 gaoyang joined #salt
04:28 gadams joined #salt
04:32 cmthornton joined #salt
04:35 Ryan_Lane joined #salt
04:38 pipps joined #salt
04:41 kallek joined #salt
04:42 cmthornton joined #salt
04:45 druonysus joined #salt
04:46 Furao_ joined #salt
04:53 jcockhren late night bug fixes wooo \o/
04:57 Teknix joined #salt
04:58 jalbretsen joined #salt
05:02 countdigi joined #salt
05:07 linjan joined #salt
05:13 whiteinge whyzgeek: can you pastebin what you have so far?
05:13 iMil joined #salt
05:13 iMil joined #salt
05:15 Katafalkas joined #salt
05:25 berto- joined #salt
05:30 halfss joined #salt
05:39 nu7hatch joined #salt
05:43 nu7hatch joined #salt
05:44 sfello joined #salt
05:46 Furao joined #salt
05:47 bhosmer joined #salt
05:50 Katafalkas joined #salt
05:53 mannyt joined #salt
05:54 druonysuse joined #salt
05:57 abele joined #salt
05:58 dbraden joined #salt
06:00 nu7hatch joined #salt
06:02 halfss joined #salt
06:06 chuffpdx_ joined #salt
06:10 ekrem joined #salt
06:19 Teknix joined #salt
06:26 SpX joined #salt
06:29 ml_1 joined #salt
06:35 lempa joined #salt
06:37 felskrone1 joined #salt
06:43 xl1 left #salt
06:45 xpen joined #salt
06:47 xl1 joined #salt
06:54 sfello joined #salt
06:59 balboah joined #salt
07:02 davidone joined #salt
07:03 davidone joined #salt
07:10 felixhummel joined #salt
07:13 eculver joined #salt
07:17 adepasquale joined #salt
07:27 nu7hatch_ joined #salt
07:30 xl1 left #salt
07:31 xl1 joined #salt
07:31 lemao joined #salt
07:42 carlos joined #salt
07:42 xinkeT joined #salt
07:43 mfournier joined #salt
07:45 adepasquale joined #salt
07:46 Teknix joined #salt
07:50 ronc joined #salt
07:52 backjlack joined #salt
07:57 woebtz joined #salt
07:58 Nexpro joined #salt
07:59 drogoh joined #salt
08:01 mortis joined #salt
08:01 ze- joined #salt
08:04 MK_FG joined #salt
08:09 benno joined #salt
08:09 benno left #salt
08:18 bemehow joined #salt
08:22 13WAA6242 joined #salt
08:32 marcinkuzminski joined #salt
08:35 unicoletti_ joined #salt
08:38 Teknix joined #salt
08:44 sarcasticidiot_ joined #salt
08:44 bemehow joined #salt
08:47 fredvd joined #salt
08:51 havan_ joined #salt
08:52 ekrem joined #salt
08:54 N-Mi joined #salt
08:54 N-Mi joined #salt
08:58 Tekni joined #salt
08:58 yota joined #salt
09:08 ggoZ joined #salt
09:12 Teknix joined #salt
09:15 bemehow_ joined #salt
09:16 salty joined #salt
09:25 carmony joined #salt
09:25 nu7hatch joined #salt
09:26 fxdgear joined #salt
09:29 fxdgear joined #salt
09:30 nu7hatch joined #salt
09:32 bhosmer joined #salt
09:36 SoR joined #salt
09:37 SoR hello
09:38 olaf39 joined #salt
09:42 SoR is there any posibility to use nodegroups in {% if %} on  sls template?
09:44 olaf39 left #salt
09:54 hazzadous joined #salt
10:00 alekibango joined #salt
10:08 aleszoulek joined #salt
10:17 adepasquale joined #salt
10:19 matanya joined #salt
10:22 andrewclegg say I have a specific managed file I need to redeploy, and I want to do this faster than a normal state.highstate that checks everything
10:22 andrewclegg if there a way to tell salt just to deploy that one single state (and any direct dependencies)?
10:22 jcockhren state.single
10:22 andrewclegg aha!
10:22 andrewclegg thanks :-)
10:24 andrewclegg jcockhren: hmm, that's not *exactly* what I had in mind -- I was thinking of a state that's defined in a .sls file, not supplied on the command line
10:24 jcockhren state.sls
10:24 andrewclegg ok -- so the id parameter is the key for that state in the specified .sls file?
10:25 jcockhren yes. as far as I know
10:25 andrewclegg cool, thanks, I'll give that a go
10:32 jcockhren SoR: Could you make an issue on GH?
10:33 jcockhren I think being able to reference nodegroups with jinja would be possible if not implementable
10:44 andrewclegg SoR jcockhren we did something similar by defining groups of nodes with certain roles in the pillar, then generating top.sls dynamically using templating... so we can always get a list of "which nodes have role X" anywhere we need it
10:44 andrewclegg if that's what you mean
10:59 sarcasticidiot joined #salt
11:00 bemehow joined #salt
11:01 bemehow_ joined #salt
11:05 diegows joined #salt
11:06 p3rror joined #salt
11:07 logix812 joined #salt
11:29 pdayton joined #salt
11:39 sibsibsib_ joined #salt
11:54 Teknix joined #salt
12:06 sfello hi all
12:07 jbunting joined #salt
12:07 sfello If I were on the python shell on the salt master, how would I go about getting the same result as running "salt '*' mine.get '*' some_param"
12:12 TheCodeAssassin joined #salt
12:13 sfello or rather - is there a way to interrogate the mine database directly on the master?
12:14 Furao joined #salt
12:16 djn sfello: I guess you can just use the client api as with any other module: http://docs.saltstack.com/ref/clients/index.html#client-apis
12:16 djn I don't know if the database is directly accessible, but the above will do for access from python
12:17 sfello yeah… hmm …. i guess there is really no advantage over just doing salt '*' some.function
12:17 sfello there's no need to mine
12:18 sfello is there a decent saltstack-based monitoring app of some sort?
12:18 fredvd joined #salt
12:18 djn sfello: I havn't used the mine yet, but I think the data is persistent on the master, so your query is not prone to network outages or problems on the minion
12:18 sfello one that just issues commands like 'status.meminfo' and pplugs it into a graphing lib or something
12:18 djn sfello: I am using a homemade thingie for that, it;s easy
12:19 djn you specify scheduling with a returner in all of your minions confs you want to monitor
12:19 djn returner can be anything, just look at the docs... when using a remote database, it is exactly the thing you want, isn't it?
12:21 jslatts joined #salt
12:21 sfello err, sounds like.
12:21 sfello is this home made thingy open source?
12:21 sfello ;)
12:22 emocakes_ dont do it djn
12:22 emocakes_ he will make a startup out of it
12:23 djn sfello: nope not really... It's just not worth it, no big deal here ;) you config any of these
12:23 djn https://github.com/saltstack/salt/tree/develop/salt/returners
12:24 whit joined #salt
12:24 djn in your minion conf, and then do the scheduling for it like here http://docs.saltstack.com/topics/jobs/schedule.html
12:24 sfello cool - i will have a read :)
12:24 sfello thanks :)
12:25 sfello emocakes_: no way - got far too much startup on my hands already… !
12:25 emocakes_ orly?
12:25 djn then you can use whatever to look at the database ;) I haven't written anice usable  thingie for that yet
12:25 emocakes_ is salt like wmi?
12:29 jeff__ joined #salt
12:30 Thiggy joined #salt
12:30 aat joined #salt
12:31 piffio joined #salt
12:40 xl1 left #salt
12:46 oz_akan_ joined #salt
12:46 aat joined #salt
12:50 Odd_Bloke How can I see what the pillar for a particular hostname would be?
12:51 oz_akan_ joined #salt
12:53 linjan_ joined #salt
13:00 shinylasers joined #salt
13:01 carlos_ joined #salt
13:02 carlos__ joined #salt
13:02 Teknix joined #salt
13:02 ronc joined #salt
13:03 Gifflen joined #salt
13:06 juicer2 joined #salt
13:10 deedubs left #salt
13:12 ipmb joined #salt
13:13 bemehow joined #salt
13:17 bemehow_ joined #salt
13:19 Khollowa_ joined #salt
13:25 toastedpenguin joined #salt
13:28 shinylasers joined #salt
13:31 aptiko joined #salt
13:32 imaginarysteve joined #salt
13:34 whit joined #salt
13:37 bhosmer joined #salt
13:39 aherzog joined #salt
13:40 crashmag joined #salt
13:48 NotreDev joined #salt
13:50 ciss joined #salt
13:52 whit joined #salt
13:54 [diecast] joined #salt
13:55 micah_chatt joined #salt
13:56 StDiluted joined #salt
13:58 bemehow joined #salt
13:58 carmony How can I tell the salt cli command to set the salt.output.highstate state_verbose to false?
13:58 havan joined #salt
13:59 bemehow_ joined #salt
14:02 mannyt joined #salt
14:02 sssslang_ joined #salt
14:03 Brew joined #salt
14:05 jslatts joined #salt
14:10 mannyt joined #salt
14:12 mech422 anyone know you do the equivalent of : salt-call state.sls foo install  / salt-call state.sls foo remove  (eg, I'd like my salt states to be able to install and remove/cleanup stuff)
14:15 aat joined #salt
14:17 alunduil joined #salt
14:19 nocturn Hi all.  I see that salt supports git and svn, are there any plans to expand to bazaar?
14:19 mapu joined #salt
14:20 pdayton joined #salt
14:21 kaptk2 joined #salt
14:23 whyzgeek like test: { 'blash': "<multiline string>" }
14:27 backjlack joined #salt
14:27 ciss is there an estimated release date for 0.17.0? or at least a time frame, or a "not before …"?
14:28 whit joined #salt
14:29 Thiggy joined #salt
14:29 mohae joined #salt
14:30 cnelsonsic joined #salt
14:30 elsmorian joined #salt
14:31 dml_ joined #salt
14:32 elsmorian Hi all. Could anyone give me an example on how to use cron.set_env from a salt file? I've tried:
14:32 elsmorian cron.set_env:
14:32 elsmorian - user: root
14:32 elsmorian - name: MAILTO
14:32 elsmorian - value: "user@example.com"
14:32 elsmorian But it says cron.set_env is not available .
14:34 havan elsmorian: I guess cron.set_env is just for execution modules, there is no set_env function in cron state module
14:34 cedwards looks like set_env isn't supported in states yet.
14:35 elsmorian ahhh
14:35 elsmorian oh wow. Well, thats really helpfull- I didnt even realise there where execution modules and state modules!
14:36 elsmorian that tidies up a whole raft of confusion :)
14:36 elsmorian Any idea if there is a way to set a cron env in another way that is supported currently
14:36 elsmorian ?
14:37 cedwards elsmorian: the state modules are built on top of the remote execution modules, but you'll find some functions not yet implemented between the two.
14:38 mrwun joined #salt
14:39 elsmorian cedwards:  thanks, thats helpful :-)
14:39 Damoun joined #salt
14:43 mech422 anyone know you do the equivalent of : salt-call state.sls foo install  / salt-call state.sls foo remove  (eg, I'd like my salt states to be able to install and remove/cleanup stuff) ?
14:43 carmony When I try to execute 'salt --state-output=mixed "*" state.highstate' I get an error: salt: error: no such option: --state-output
14:43 carmony though it lists --state-output in the docs
14:43 carmony I'm running 0.16.4
14:44 tuxIO joined #salt
14:44 SoR jcockhren, andrewclegg I made some trick with grain['fqdn'][:4] == abcd
14:45 cedwards carmony: i get the same on 0.16.3
14:47 alunduil joined #salt
14:48 mmilano joined #salt
14:48 jpeach joined #salt
14:48 mgw joined #salt
14:48 carmony cedwards: I'm digging through the salt code. Do you know where off the top of your head where I can find the option parsing for the salt command?
14:48 lineman60 joined #salt
14:48 robertkeizer joined #salt
14:50 teskew joined #salt
14:50 cedwards carmony: not off the top of my head
14:52 diegows I
14:52 diegows hi
14:52 diegows I'm trying to use cp.push to receive files from the minions for it doesn't work
14:53 diegows I have file_recv: True
14:53 carmony cedwards: looks like it's a 0.17 feature
14:54 copelco joined #salt
14:55 SunSparc joined #salt
14:58 diegows fixed, I added the option in /etc/salt/master.d/local but it should be named local.conf :)
14:58 jcockhren SoR: hmm
14:59 aleszoulek joined #salt
15:03 pdayton joined #salt
15:03 higgs001 joined #salt
15:04 SoR jcockhren: I have nodegroup based on hostnames so this is working for now, but I make an issue on GH
15:04 cedwards any good documentation on setting up / using returners?
15:05 pdayton joined #salt
15:05 robertkeizer cedwards: I'll find you a link, half a sec. Writing a returner is really straight forward.
15:06 robertkeizer cedwards: Have you read this? http://docs.saltstack.com/ref/returners/
15:07 cedwards robertkeizer: yes. looking at implementing an existing returner
15:07 pavloos joined #salt
15:08 jbunting joined #salt
15:08 robertkeizer cedwards: Good way to start. The exiting returners are awesome documentation in and of themselves. Thats what I used to write the CouchDB one.
15:08 Katafalkas joined #salt
15:08 cro1 joined #salt
15:09 deepakmd_oc joined #salt
15:09 StDiluted joined #salt
15:10 deepakmd_ joined #salt
15:11 jalbretsen joined #salt
15:12 mgw joined #salt
15:18 dustyfresh joined #salt
15:24 whyzgeek just a note that I solved finally my multiline string problem refering to https://github.com/saltstack/salt/issues/5480
15:24 whyzgeek very good to know
15:24 pavloos can salt-cloud work with Rackspace cloud networks?
15:26 cedwards pavloos: http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
15:26 JaredR joined #salt
15:27 JaredR Good morning. I've been trying out ssh_auth, but apparently, it doesn't work when SELinux is enabled. I have to do a "restorecon -R -v ~/.ssh" before it will work.
15:28 cedwards JaredR: I ran into the same thing. I have a cmd.wait that watches the file and auto runs restorecon on a change.
15:28 anti joined #salt
15:28 forrest joined #salt
15:28 JaredR I haven't used cmd.wait.
15:29 cedwards JaredR: let me pastebin an example..
15:30 cedwards http://dpaste.com/1386359/
15:31 devinus joined #salt
15:31 bitz joined #salt
15:31 JaredR Nice. Thanks! I'll try it now.
15:32 JaredR Works beautifully. Thank you, cedwards!
15:32 cedwards np
15:33 BadLuck joined #salt
15:33 JaredR I don't see a grain that tells me whether SELinux is enabled or not.
15:33 BadLuck Hi, I'm trying this in a sls. {% set maindir = "C:/something/{{ grains['host'] }}/somethingElse" %}. The result is "C:/something/{{ grains['host'] }}/somethingElse". But I want something like "C:/something/myHostName/somethingElse". Any idea what I'm doing wrong?
15:33 cedwards I don't think that is a grain
15:33 cedwards JaredR: salt '*' selinux.getenforce is the only way I know to gather that.
15:34 aptiko joined #salt
15:36 JaredR That's helpful info.
15:37 cedwards JaredR: you might check out http://docs.saltstack.com/ref/modules/all/salt.modules.selinux.html
15:37 NotreDev joined #salt
15:37 pdayton joined #salt
15:42 pipps joined #salt
15:42 anti joined #salt
15:44 JoAkKiNeN joined #salt
15:45 mech422 BadLuck: try something like {% set maindir = 'some_stuff' + grains['host'] + 'some other stuff' %}
15:46 hvn joined #salt
15:46 jacksontj joined #salt
15:47 cdsrv joined #salt
15:48 BadLuck yes thanks, this is exactly what I just found
15:48 Katafalkas joined #salt
15:49 zach_ Is there a way to use `pkg' to do the equiv of 'yum --disableexcludes=all update' within a state?
15:49 zach_ or should I just use salt.states.cmd?
15:52 anti Is it me or are the salt-api docs hard to follow?
15:52 jcockhren anti: there's docs? ;)
15:52 anti hahaha
15:53 mech422 anyone know you do the equivalent of : salt-call state.sls foo install  / salt-call state.sls foo remove  (eg, I'd like my salt states to be able to install and remove/cleanup stuff) ?
15:53 unicoletti left #salt
15:53 anti well I installed through apt-get and feels like I was left out in limbo.  Was trying to get the cherrypy flavor up and running with no luck
15:54 ekool I can't wait for a comprehensive Salt book to come out :(
15:56 Eugennerz That will probably have to wait for a Stable release(1.0) first.
15:56 ekool Yah, I figured... I hope it comes soon. Salt is so amazing but the docs leave a lot to be desired.
15:57 jcockhren mech422: when you say "install stuff" you're including any added managed files?
15:57 jcockhren fwiw, I pondered salt having some sort of "rollback" for states
15:58 jcockhren that's hard b/c states can execute anything
15:58 mech422 jcockhren: yeah - I suppose.. I just wanna 'hook' in somehow so I can 'reverse' install actions on 'removal' - I'm fine with 'reversing' stuff manually, but I was hoping to do it from one .sls to keep things in sync
15:59 mech422 (eg someone updates /base/install_foo  but forgets to update /base/remove_foo - its easier to stay in sync if you just have /base/foo )
15:59 ekool I'm having a hard time figuring out the best way to handle this scenario. Installing mysql with salt, and I change the my.cnf file which also changes the innodb log size. The existing innodb log needs to be removed since its a size mismatch... so I need salt to handle the deletion of this as well. However, I want to make sure if this ever gets run on an existing server that if the log files are already correctly sized, to NOT delete them. I ca
16:00 jcockhren mech422: I know of no way to do that currently
16:01 mech422 jcockhren: blah - thanks!
16:02 JaredR joined #salt
16:03 zach_ anti: they're easy to read
16:04 anti You know you've installed salt-api incorrectly when the curl tests return json quoting back to the future instead of what is documented.  "Oh, my God. They found me. I don't know how, but they found me. Run for it, Marty!"
16:05 berto- joined #salt
16:06 bemehow joined #salt
16:08 JaredR joined #salt
16:08 jdenning joined #salt
16:09 pipps joined #salt
16:11 JaredR joined #salt
16:14 m_george|away joined #salt
16:14 KyleG joined #salt
16:14 KyleG joined #salt
16:16 KyleG joined #salt
16:16 KyleG joined #salt
16:17 deepakmd__ joined #salt
16:19 whyzgeek any suggestion as where to put an individual description on each host? currently I am assigning host  and roles in the state sls files and setting environment in pillars. I wonder if there is anyway to unify these as now adding a host needs two files to be edited.
16:21 jcockhren whyzgeek: grains?
16:25 m_george left #salt
16:25 anti zach_: are you using salt-api?
16:26 Thiggy @whyzgeek: I use a roles.sls where every minion has a "roles" grain, and for every role specified on the minion, it includes a state named <role>. https://gist.github.com/jthigpen/c0b08da5c5057e735e13
16:26 forrest I'd agree with jcockhren, you could right logic for a custom grain if you can't base your checks off of the existing ones.
16:27 Thiggy @whyzgeek: using this in top.sls you can just do *.whatever.com: \n - roles and it will include all the specified roles.
16:29 kermit joined #salt
16:29 JaredR joined #salt
16:29 forrest wow early in the morning apparently, *write
16:29 blee joined #salt
16:29 mech422 jcockhren: Hmm I can do 'salt minion grains.setval foo install ; salt minion state.sls foo' (or grains.setval foo remove..) - then check grains['foo'] in the sls file
16:29 whyzgeek Thiggy: this is very clever thanks. I am using grains with my own grain module but this looks neater
16:29 mech422 jcockhren: a bit nasty, but it should work
16:30 Thiggy @whyzgeek thanks. Hope it works for you.
16:31 jcockhren mech422: go for it
16:32 jcockhren mech422: that would be a good use case to write up
16:32 JaredR joined #salt
16:32 mech422 jcockhren: its too clumsy at the moment... I'm sure they'll add something cleaner...
16:33 cedwards I'm trying to use the mysql returner, but i'm not getting anything in the database
16:33 mech422 jcockhren: maybe the ability to call specific id's in an sls file from the command like - like you can call functions of modules ( salt-call grains.items, salt-call cmd.run, etc.)
16:34 jcockhren mech422: from a master, you can target using grains
16:34 mech422 jcockhren: yep...
16:34 JaredR joined #salt
16:34 jcockhren I think I missed your point
16:35 jcockhren low on sleep
16:35 mech422 jcockhren: I just need a 'hook' (parameter, entry point, whatever) so I can tell an 'install' from a 'remove' in an sls file
16:35 mech422 jcockhren: I can fudge it by setting a grain for now
16:36 Katafalk_ joined #salt
16:36 nu7hatch joined #salt
16:37 JaredR joined #salt
16:39 JaredR joined #salt
16:41 bemehow_ joined #salt
16:42 JaredR joined #salt
16:43 redondos joined #salt
16:45 JaredR joined #salt
16:47 tuxIO_ joined #salt
16:47 JaredR joined #salt
16:50 CheKoLyN joined #salt
16:50 JaredR joined #salt
16:51 whiteinge anti: the rest_wsgi module is *extremely* light. it only implements POST requests on the root URL
16:52 whiteinge (that silly message is returned when you send a GET request to the root URL)
16:53 whiteinge anti: i would recommend against using it unless you have a very specific need. the rest_cherrypy module is solid
16:53 JaredR joined #salt
16:54 anti whiteinge: any tricks to getting that operational?  I managed to get the wsgi one working by cloning from git then moving the netapi directory into an apache wsgi vhost setup pointing it at rest_wsgi.py instead of the wsgi.py shown in the example config on readthedocs
16:55 monokrome joined #salt
16:56 Ryan_Lane1 joined #salt
17:00 felixhummel joined #salt
17:01 whiteinge anti: what trouble did you run into pointing WSGIScriptAlias at the rest_cherrypy/wsgi.py?
17:02 JaredR So I want a newer copy of an nginx RPM to be installed from my salt URL. I'm using pkg.installed <newline> -sources: <newline> - nginx: salt://rpms/nginx-1.4.2-1...rpm, but since an older nginx is already installed, the new one doesn't get installed. What's a good way to get the new one to be installed?
17:02 micah_chatt joined #salt
17:02 Lue_4911 joined #salt
17:05 whit joined #salt
17:06 Kydo joined #salt
17:06 Kydo left #salt
17:07 premera_j_n_h joined #salt
17:07 aherzog joined #salt
17:08 jacksontj joined #salt
17:10 toastedpenguin joined #salt
17:11 hvn_ joined #salt
17:11 hvn_ left #salt
17:11 tuxIO joined #salt
17:13 anti whiteinge: I received "ValueError: Attempted relative import in non-package"
17:15 whiteinge anti: ah. that makes sense. will you please file a bug for that error?
17:15 whiteinge we'll get it fixed for the next release
17:15 anti will do, thanks!
17:16 toastedpenguin joined #salt
17:17 whiteinge anti: in the meantime, you can get it working either by editing two source files or bypassing apache and using salt-api's server
17:17 whiteinge i can walk you through either one if you have a preference
17:18 jpeach joined #salt
17:18 anti I'm not opposed to using salt-api's server
17:19 gmcwhistler joined #salt
17:20 anti I originally installed salt-api through apt-get
17:20 kermit joined #salt
17:21 anti i threw the rest_cherrypy config block into my master and the service still wouldn't start for me
17:23 whiteinge anti: did you install the python-cherrypy3 package?
17:23 jeff-ck joined #salt
17:24 Thiggy joined #salt
17:24 whiteinge (the salt-api docs really need a "How to get going from zero to running" section. they're layed out more in a "here's how salt-api works architecturally" sort of way)
17:24 Katafalkas joined #salt
17:24 Ahlee when using gitfs backend, how do you force gitfs to update and/or purge the cache
17:25 Ahlee ah, there it goes, looks to be around a couple minutes of caching
17:25 jcockhren Ahlee: got fileroot or pillar?
17:25 jcockhren s/got/for/
17:25 diegows joined #salt
17:25 devinus joined #salt
17:25 bemehow joined #salt
17:25 jamiem joined #salt
17:25 Ahlee fileroot
17:26 cedwards protip: if you're going to use a returner, be sure to open the firewall. been beating my head against a wall for half hour before i remembered that.
17:26 anti yes I have python-cherrypy3 package,  3.2.2-2
17:26 jcockhren Ahlee: found it?
17:27 logix812 joined #salt
17:27 Ahlee jcockhren: no, it just timed out and updated.
17:27 Ahlee I do not see how to forcibly invalidate
17:27 Katafalkas joined #salt
17:27 Ahlee short of actually rm -rf the cache on the master
17:27 jeff-ck ok. question regarding file.recurse. file.managed supports having multiple items in 'source', but file.recurse errors out with "AttributeError: 'list' object has no attribute 'split'". is there some way to do a 'if this file exists, do the file.recurse, otherwise move on' ?
17:27 piffio Ahlee: I was seeing the same behavior last night... still I wonder if there is a way to force the cache invalidation
17:27 jeff-ck trying to do something like this: {% for user in pillar['users'] %} {{user}}-homedir:   file.recurse:     - name: /home/{{user}}     - source: salt://core/users/homes/{{user}} {% endfor %}
17:28 Ahlee suppose i'll wander into the source for the fileserver
17:29 Teknix joined #salt
17:29 kermit joined #salt
17:31 jamiem joined #salt
17:32 mgw joined #salt
17:32 NotreDev joined #salt
17:33 Brew joined #salt
17:36 jeff-ck or here, i guess my question is--why doesn't this work? http://pastebin.com/SBgtQtcP
17:39 JaredR joined #salt
17:40 cro joined #salt
17:40 redondos joined #salt
17:42 JaredR joined #salt
17:45 JaredR joined #salt
17:45 jeff-ck *crickets*
17:46 whit joined #salt
17:47 jaequery joined #salt
17:49 jacksontj joined #salt
17:49 linjan_ joined #salt
17:50 JaredR joined #salt
17:52 nu7hatch_ joined #salt
17:53 nu7hatc__ joined #salt
17:53 Thiggy @jeff-ck have you done a state.show_sls to see what that is being rendered down for the minion?
17:53 JaredR joined #salt
17:55 ghanima joined #salt
17:55 druonysuse joined #salt
17:55 ghanima hey al
17:56 aleszoulek joined #salt
17:58 Thiggy Anyone have some states for installing copperegg monitoring agents?
17:58 Thiggy should be simple enough but #lazy
17:58 ghanima I am new to saltstack and and very impressed with the project... My background is primarily orchestration based products... with that said I was wondering if saltstack has a similar concept like mcollective where data generated on the client can be presented in a sort of aggregated view instead of individually... So for example the salt '*' test.ping instead of showing the result of each one is there a framework that allows to aggrega
17:58 Ryan_Lane joined #salt
17:58 ghanima a view of everything and not each individual request
17:58 ghanima Sorry I hope that make sense
17:58 JaredR joined #salt
17:59 ghanima 2nd question: Is there always a way to natively maniuplate the output from a module
17:59 jeff-ck here's my show_sls: http://pastebin.com/6LyaVS1F
17:59 jeff-ck seems to render fine
18:00 jeff-ck it seems like the file.recurse function doesn't have whatever file.managed has that allows it to have multiple sources
18:02 jkleckner joined #salt
18:02 jkleckner joined #salt
18:03 JaredR joined #salt
18:04 Thiggy @jeff-ck oic I get your now. That might be by design or perhaps a use case that wasn't considered? I can't answer that question.  The docs only list that multiple sources thing being a feature of file.managed specifically
18:05 JaredR @jeff-ck: I find myself looking at the salt source code to figure out what it's doing.
18:06 bemehow_ joined #salt
18:08 flupke joined #salt
18:09 [diecast] joined #salt
18:10 ghanima I was wondering if saltstack has a similar concept like mcollective where data generated on the client can be presented in a sort of aggregated view instead of individually... So for example the salt '*' test.ping instead of showing the result of each one is there a framework that allows to aggregate the results and present
18:10 ghanima a view of everything and not each individual request
18:13 Sid__ joined #salt
18:13 JaredR @ghanima: Salt has custom returners, so if you wrote your own returner, you could do it.
18:14 Sid__ Looking at a python based farmework for resource management
18:14 Sid__ basically something to replace puppet
18:14 Sid__ Can I use salt as a python library ?
18:15 Sid__ without yaml definitions
18:15 ghanima JaredR: is there a document that talks about returners.... Also is a returner on a per module basis I assume?
18:16 Sid__ i want resources defined in JSON to be executed on the managed host
18:16 JaredR @ghanima: I don't know much about returners, other than that they exist. "salt --help" mentions them.
18:18 flupke I can't get my require to work on an entire sls, could someone please take a look? https://gist.github.com/flupke/57135f86f62618a43ab1 (salt 0.16.3 on both sides)
18:18 seanz joined #salt
18:19 JaredR @flupke: I didn't know you could require an entire sls.
18:19 seanz Greetings. I'm trying to use svn.latest but getting this error: "State svn.latest found in sls nc-code is unavailable"
18:19 seanz (I'm putting the salt state on pastebin...link available momentarily)
18:19 cedwards Sid__: sounds like you might be looking for salt-api
18:19 forrest yea you can require an entire sls
18:20 Sid__ cedwards: precisely that, is there docs link you could point me to ?
18:20 flupke JaredR: it's a new feature in 0.16: https://gist.github.com/flupke/57135f86f62618a43ab1
18:20 JaredR @forrest: Nice feature.
18:20 forrest I'm trying to find it flupke
18:20 forrest JaredR, yea it helps make things less repetitive.
18:20 cedwards Sid__: http://salt-api.readthedocs.org/en/latest/
18:20 forrest http://docs.saltstack.com/ref/states/requisites.html#require-an-entire-sls-file
18:20 forrest boom!
18:21 forrest require an entire sls as of 0.16.0
18:21 seanz http://pastebin.com/jEqrDMWd
18:21 Sid__ thanks cedwards, appreciate it !
18:21 flupke oops I pasted the wrong link
18:21 flupke it doesn't work though
18:21 seanz Is there anything wrong with the way I'm calling svn.latest?
18:21 forrest is everyone doing 4 spaces now for state files?
18:22 robawt forrest: seanz meant only 2
18:22 robawt :)
18:22 flupke forrest: I use 4 spaces in every language, 2 spaces looks wrong to me now
18:22 forrest *shrug* just seen it a couple times the last few days
18:22 seanz The spacing hasn't mattered, from what I can tell, forrest, as long as it's consistent.
18:22 seanz I should say, both 4 and 2 spaces worked for me.
18:22 forrest yea it doesn't
18:22 forrest just wasn't sure why it had been so common
18:23 forrest flupke, can you confirm that simply by referencing postgres you can get it to apply the state
18:24 berto- joined #salt
18:24 flupke forrest: yes, if I require a part of the sls (for example pkg: postgres), it works
18:24 forrest odd,
18:25 seanz Anyone have any thoughts on my dilemma?
18:25 forrest you are running 0.16 right?
18:25 flupke yes 0.16.3 on minion and master
18:25 forrest seanz, what error are you getting?
18:25 seanz forrest: "State svn.latest found in sls nc-code is unavailable"
18:26 flupke seanz: it may be a missing dependency
18:26 seanz flupke: How could I tell?
18:26 forrest hmm, I'm not sure flupke, I've gotta run to a meeting, let me know if you figure it out
18:27 flupke seanz: it reminds me of an error I had with the apt module, but I just checked the svn module and it seems to run svn directly
18:28 flupke seanz: svn is installed on the minion?
18:28 seanz flupke: ............duh
18:29 seanz haha - Ok, I'm apparently so new to salt that I am not using common sense yet.
18:38 baniir joined #salt
18:38 TheBeast joined #salt
18:39 vbabiy Does the top file get applied in order?
18:40 bemehow joined #salt
18:43 bemehow_ joined #salt
18:46 hazzadous joined #salt
18:47 lineman60 joined #salt
18:49 lineman60__ joined #salt
18:50 ede joined #salt
18:50 aboe joined #salt
18:51 berto- joined #salt
18:51 ghanima JaredR: I looked at returners module and it seems that this module is only used to funnel data to another data store but its still per entry and not templating..
18:54 mmilano joined #salt
18:55 ml_1 joined #salt
18:55 lineman60__ joined #salt
18:55 devinus joined #salt
18:57 Ahlee ok.  So using gitfs for file_roots, specific branch.  When calling salt 'host' state.sls env="gitbranch" state, it finds the init.sls file, but that init.sls references a file in same directory (init.sls is just file.managed on /tmp/filetest.txt).  It can not find filetest.txt (and i've confirmed that in the gitfs cache the file is not there
18:58 Ahlee however, if I define a second gitfs_remotes, drop the filetest.txt into same branch name, the file is found
18:58 JaredR joined #salt
18:58 Ahlee both gitfs_remotes are seperate git repos
19:00 ggoZ oi
19:00 JaredR joined #salt
19:01 ggoZ i can use salt:// or http:// to denote resource type/location of the file
19:01 ggoZ is a file:// resource supported?
19:01 ggoZ or how do i reference a file in a plain filesystem
19:01 ggoZ if that is possible at all?
19:06 Eugennerz Pretty sure it's file://, yes
19:06 Ryan_Lane joined #salt
19:06 JaredR joined #salt
19:06 a1j joined #salt
19:07 a1j could you help me please with the schedule syntax of how to cal state? i e i want to run state.sls core.sudo  via scheduler, i specifyu state.sls as function, and where goes the parameter of core.sudo?
19:07 [diecast] joined #salt
19:07 UtahDave joined #salt
19:08 havan joined #salt
19:09 JaredR joined #salt
19:09 ggoZ hm
19:10 oz_akan_ joined #salt
19:11 oz_akan__ joined #salt
19:12 _0x4b joined #salt
19:12 ggoZ Eugennerz: if i specify the path with file://, the pkg.installed state wont find it
19:12 oz_akan__ joined #salt
19:12 ggoZ however, if i just type in absolute path
19:12 ggoZ it works
19:12 faldridge joined #salt
19:12 a1j in general - what is the syntax of passing parameter to function in schedule definition?
19:14 a1j ah... args:
19:16 mapu joined #salt
19:17 jagster02 joined #salt
19:18 nu7hatch joined #salt
19:21 nu7hatch joined #salt
19:22 nu7hatch joined #salt
19:24 pipps1 joined #salt
19:24 seanz Any way to actually check out code initially from subversion?
19:24 Jahkeup joined #salt
19:24 seanz It looks like you can only update to the latest revision.
19:24 seanz Of an already-checked out version.
19:25 darrend joined #salt
19:25 KennethWilke joined #salt
19:25 Jahkeup grr so it looks like (openstack-)quantum and salt are using different versions of msgpack.. has anyone run salt-minion out of virtualenv?
19:26 cedwards is there anything special I have to do to get a schedule: to run? I have it defined in masters.d/schedule.conf, but it doesn't seem to do anything.
19:31 flupke_ joined #salt
19:32 flupke_ joined #salt
19:36 shinylasers joined #salt
19:39 baniir joined #salt
19:43 Ryan_Lane joined #salt
19:44 shinylasers joined #salt
19:47 shinylasers joined #salt
19:47 jslatts joined #salt
19:48 cdsrv joined #salt
19:51 juanlittledevil joined #salt
19:51 JaredR Can a a pillar sly file include another pillar sly file somehow?
19:51 JaredR sls, not sly.
19:51 jslatts joined #salt
19:52 whit joined #salt
19:53 a1j cant get schedules to work. config.merge schedule - shows proper schedule but nothing gets executed
19:53 a1j (16.4)
19:53 nu7hatch joined #salt
19:57 jacksontj joined #salt
19:59 KyleG joined #salt
19:59 KyleG joined #salt
20:00 carlos joined #salt
20:00 berto- joined #salt
20:01 devinus joined #salt
20:01 mech422 a1j: that works? core.sudo I mean ?
20:02 mech422 a1j: I can't get state.sls to call anything but init...
20:02 saurabhs joined #salt
20:03 UtahDave mech422: yeah, you can do that.
20:03 mech422 is it core/sudo.sls ?
20:03 UtahDave yes.   /srv/salt/core/sudo.sls
20:03 UtahDave salt \* state.sls core.sudo
20:04 redondos joined #salt
20:04 a1j mech422: core.sudo alone works fine.
20:04 mech422 ohhh.. No... can I do /states/base/foo/bar.sls ?
20:04 mech422 he just renamed his 'base' to 'core' right ?
20:05 a1j mech422: i have other commands in schedule (including one that just touches file). nothing gets executed. I have redis as returner and i monitor it - no queries.
20:05 a1j log is empty too
20:05 bhosmer_ joined #salt
20:05 mech422 I want to run a 'helper' sls in a packages directory: /base/foo/init.sls, /base/foo/bar.sls, /base/foo/baz.sls  state.sls foo.bar chokes
20:05 mech422 hmm - maybe I need to try base.foo.bar
20:06 a1j mech422: no you did it right.
20:06 mech422 UtahDave: btw - the changes to allow templating in file.append (and multiple source files) are in...
20:06 a1j mech422: make sure last line of you sls file is empty line or ...
20:06 mech422 a1j: Hmm - let me check
20:07 UtahDave mech422: ah, nice!
20:07 a1j UtahDave: so if scheduler in 16.4 is working fine - how to test it and where to see errors?
20:08 mech422 UtahDave: yeah - pull request is in for that - still think anyone would want the watch_mod changes for file module ?  it adds an 'only_if_changed' parm so that file.X with a watch option acts like cmd.wait() and does nothign till the watch fires
20:08 mech422 a1j: oh crap - it worked! :-)  Thanks!
20:09 mech422 dunno what I was doing wrong before....
20:09 a1j mech422: i stepped on that one several times - now i always start sls files with --- and end with ...
20:09 mech422 a1j: Hmm - never heard that before.. I just end my with blank lines
20:09 a1j that if you had nonemty line
20:09 a1j last one
20:10 mech422 a1j: Cool - so now I can do salt-call state.sls foo.install or salt-call state.sls foo.remove
20:11 a1j is tehre anybody here who have scheduler working?
20:11 cedwards I'd like to know the same ^^
20:11 a1j mech422: yes. I wish you could also define alternative top.sls. Like use install.top.sls once (does heavy stuff) and generic top.sls only monitors whats mor dynamic
20:11 cedwards I have a scheduler setup with a returner, but I see nothing new in my database
20:11 UtahDave back soon. phone call
20:12 a1j cedwards: i was thingking that returner could be a problem but one recipe i have in scheduler is to touch file every 15 min, and that is not happening.
20:13 Ahlee is it possible to set up a schedule at like X time, instead of every Y minutes?
20:13 Ahlee like i want to run high state on all servers at 5 AM and 5 PM, minion time
20:13 berto- joined #salt
20:14 cedwards Ahlee: I think if you want it at specific times you'd just setup a cronjob
20:14 mech422 Ahlee: I'd go with cron as well...
20:14 mech422 thats what its good at :-)
20:14 Ahlee eh.
20:14 a1j OH! you need to restart salt-minion after you update schedule in pillar
20:15 a1j then it works fine!!!
20:15 cedwards a1j: i'm not using pillar for my scheduler. I just dropped a .conf in minion.d/
20:15 a1j does not seems like a good design. I'l create bug.
20:15 Ahlee i was really hoping not to have to pull in yet another utility
20:15 cedwards a1j: can you give me an example of setting up scheduler in pillar?
20:15 a1j cedwards: https://github.com/saltstack/salt/issues/6201
20:16 Ahlee and to counter, if cron is good at executing scheduled tasks, why does the scheduler exist at all? ;)
20:16 mech422 Ahlee: beats me
20:16 mech422 Ahlee: I'm assuming so you don't have to reparse the state tree for several thousand nodes every 5 minutes ?
20:17 Ahlee mech422: I don't want anything changing on servers during our business day
20:17 a1j Ahlee: cron is recipe for disaster if you try to execute job on 4000 machines simultaneously
20:17 Ahlee a1j: correct.
20:17 sfello joined #salt
20:19 Ahlee next question, top.sls has to be in file_roots? I moved it to gitfs, removed from disk, no longer can find top.sls
20:19 mech422 umm - if you have all 4000 nodes whack yer server at the same time - its not gonna matter what started them up :-)
20:19 Thiggy joined #salt
20:20 jacksontj joined #salt
20:20 Ahlee I do not even see top.sls in teh gitfs cache
20:21 a1j UtahDave: https://github.com/saltstack/salt/issues/7323
20:22 juanlittledevil joined #salt
20:24 a1j UtahDave: https://github.com/saltstack/salt/issues/7324
20:24 cedwards a1j: I've moved my schedule to pillar and now I see no schedule in pillar.data..?
20:25 mech422 a1j: this is cool - salt-call state.sls foo.install by passes init.sls, so I think I can {% set action = 'install' %} in install.sls and then 'require init.sls'
20:25 a1j cedwards: you need to include schedule.sls from top.sls
20:26 mech422 a1j: so all the real work is in init.sls, with a couple of 'helper' sls files for install, remove, reconfigure, whatever
20:26 a1j cedwards: to see that you schedule propagated to minion type "salt-call config.merge schedule"
20:26 cedwards a1j: in response to 7324 - http://docs.saltstack.com/topics/releases/0.16.0.html#random-times-in-cron-states
20:26 a1j cedwards: then you need to restart minion
20:26 a1j cedwards: i was not talking about cron
20:27 bemehow joined #salt
20:27 whiteinge seanz: did you get the svn module figured out?
20:27 seanz whiteinge!!! Greetings.
20:27 seanz No, I did not.
20:27 redondos_ joined #salt
20:27 a1j cedwards: i dont want to run salt-call from cron, then i need to write some watcher for zombie processes etc etc
20:27 seanz I think it should work...but "it doesn't".
20:28 forrest flupke, did you figure out the sls require?
20:28 whiteinge seanz: i missed your pastebin, do you still have that?
20:28 seanz whiteinge: Let me create a new one with just the relevant part.
20:28 seanz There's some extra stuff in there.
20:28 alunduil joined #salt
20:28 Ahlee a1j: another reason I don't want to go to cron, either.
20:29 seanz whiteinge: I sent it through pm
20:30 seanz (in case I missed a password reference or something -- don't think I did, but just in case)
20:30 a1j Ahlee: yeh does not seems like a right thing to do.
20:31 jdenning joined #salt
20:32 robawt awww yisssss
20:32 robawt whiteinge in the house
20:32 robawt get that man a cheap beer!
20:32 avienu joined #salt
20:33 forrest robawt you owe a lot of beers :P
20:33 robawt forrest: in this channel yes
20:33 robawt :D
20:36 flupke forrest: nope, I ended requiring on the pkgs inside them
20:36 whiteinge :D
20:36 whiteinge seanz: doing a little source-diving...
20:36 seanz whiteinge: Thanks! I was going to get to that eventually...
20:37 forrest weird flupke, that should have worked
20:38 flupke forrest: yes there is something fishy here, a friend has require: sls working with 0.16.3
20:39 flupke in fact I'm adapting his gitlab sls and learned about require: sls in it
20:39 forrest hmm, that seems very odd.
20:40 forrest because that feature has been supported since 0.16.0
20:40 Thiggy Is there any way to include a sls file but pass in like a context or custom variables?
20:41 flupke Thiggy: you could use jinja's predefined blocks
20:42 flupke Thiggy: or pillars
20:42 Thiggy Do you have an example?
20:42 cedwards I'm finding that the only thing that seems to make it through my returner is state.*
20:43 Thiggy I have this thing I want to do for various users, and I'd love to be able to include: - this_user_thing(username) from all the diff files that create users instead of having to copy and paste that into each user def sls.
20:43 Thiggy how would pillars solve that?
20:44 flupke Thiggy: you could have a list of usernames in pillars and do {% for user in pillar['users'] %}...{% endfor %} in the sls
20:44 scalability-junk as you only define the user once in a pillar and every sls is using the same pillar variable to retrieve your provided data
20:45 Thiggy But diff machines have diff users. Isn't pillar shared across all the minions?
20:45 scalability-junk you can have one pillar per minion group
20:45 whiteinge seanz: i don't have an svn server i can test with. does the following command at the cli work for you?
20:46 whiteinge seanz: svn --non-interactive update --username myuser --password mypass
20:46 Thiggy so for each minion group, I have to copy the usernames created into a pillar that targets only that group and then loop over that?
20:46 flupke Thiggy: yes pillars can be targeted to nodes or group in the top file, just as states
20:46 seanz whiteinge: It appears to.
20:47 Thiggy ok, I see *how* to make it work that way, but that's way more complicated than what I'm trying to achieve. I'll just copy and paste.
20:47 scalability-junk Thiggy: nope the way to go to make things easier in the future is to make all data reside in pillar files
20:47 scalability-junk and the logic in sls files.
20:48 scalability-junk then you can abstract it really really great
20:48 mech422 Thiggy: actually - if your going to copy and paste it... you can just paste it into a pillar file ?
20:48 flupke yes that's not that complicated, and in the end your state files are more maintainable and easier to write
20:48 whiteinge seanz: what version of salt?
20:48 whiteinge (on the minion)
20:48 seanz whiteinge: 0.16.4
20:49 Thiggy I must not be understanding something. I don't understand what the data is in this context.
20:49 scalability-junk the username is the data in this context
20:49 rhand_ joined #salt
20:49 Thiggy so, for example, let's say I have service1.sls and service2.sls and each one of them creates a user that service runs as
20:49 mech422 flupke: sorry - google is being useless - whats the require: - sls you mentioned ? is it documented anywhere ?
20:50 Thiggy and I want some common user configuration for those 2 users
20:50 Thiggy what would that look like?
20:51 flupke mech422: https://salt.readthedocs.org/en/v0.16.3-0/ref/states/requisites.html#require-an-entire-sls-file
20:51 mech422 flupke: ahh thanks!
20:52 flupke Thiggy: I'm not sure to understand what you want to do, can you provide an example?
20:52 Thiggy @flupke lemme gist something up
20:53 sieson joined #salt
20:55 sieson I am running a long running command remotely via salt like salt '1.2.3.4' cmd.run 'sleep 300 2>&1 > log' but it exits after a few seconds and the command runs in the background on the minion. If I remove "2>&1 > log" it waits until the command exits. Is that by design or do I need to something to make sure it waits until the shell command returns.
20:56 Thiggy @flupke Does this help: https://gist.github.com/jthigpen/ecf25ac2ca10258a39a1
21:01 whiteinge seanz: ah. this is why: https://github.com/saltstack/salt/pull/6814
21:01 whiteinge seanz: the password flag was added after 0.16.4
21:01 seanz whiteinge: Dang, thanks.
21:01 tempspace is anybody using salt-cloud with Softlayer successfully?
21:01 pipps1 joined #salt
21:02 seanz whiteinge: So I'll have to wait for the next version...
21:02 seanz whiteinge: Thanks a lot for verifying that.
21:03 UtahDave tempspace: I know we've been doing some internal testing wit Softlayer, but I'm not sure if support has landed in an official release yet.
21:03 whiteinge seanz: if you're wondering how it was you were supposed to know that...it's a bug and i'm fixing it. thank you for the report! :)
21:03 robawt whiteinge: great work
21:04 * robawt topgun highfives UtahDave
21:04 dh joined #salt
21:04 seanz whiteinge: haha - I'm glad you're on the job. :)
21:04 whiteinge seanz: in the meantime, if you grab the the svn.py execution module off github and put it in /srv/salt/_modules then do the same for the state module and put it in /srv/salt/_states then salt will distribute the new modules to your minions automatically
21:04 cedwards UtahDave: i'm having some issues with your mysql returner..
21:05 whyzgeek Thiggy: I tried to use the grains but this seems to be unfit to our model. I don't want to set anything on client side and also roles can change dynamically and I don't want to restart minions. Is there anyway to achieve this base on pillars? ref: https://gist.github.com/jthigpen/c0b08da5c5057e735e13
21:05 Ahlee sieson: i can't reproduce, unfortunately
21:05 seanz whiteinge: Trying now...
21:05 whyzgeek My only problem is that I can't assign roles in top file of the pillar
21:05 Ahlee sieson: even with salt -t 600 on a sleep 300 type deal
21:06 sieson Ahlee: so does it block for you and does not return until it hits 5 minutes?
21:06 Thiggy @whyzgeek I'm not really sure. Apparently I don't really know how pillar works, so I'm probably not the best to ask.
21:08 whyzgeek Anybody else? forest or UtahDave? I want to have a capability in pillar top file to specify a host and have a key and a list. Basically I want to assign roles to a host in pillar rather than grains.
21:08 Ahlee sieson: both ways block until 300 seconds expire
21:08 sieson Ahlee: thanks for looking. I have to dig a bit more into it
21:09 seanz whiteinge: Why do I need to do the same for the state module?
21:10 whiteinge there's a new version of that module too (passes the password argument through)
21:10 mattbarto joined #salt
21:10 seanz whiteinge: Is this the one: https://github.com/saltstack/salt/blob/develop/salt/state.py
21:11 flupke Thiggy: maybe you can use macros for this: http://jinja.pocoo.org/docs/templates/#macros
21:11 whiteinge seanz: https://github.com/saltstack/salt/blob/develop/salt/states/svn.py
21:11 seanz whiteinge: Oh, I meant the state file.
21:11 jhenrypb joined #salt
21:11 seanz OH. Got it.
21:11 seanz I get it now.
21:12 seanz whiteinge: Ok, I've copied them into place. Do I just do a highstate now?
21:12 whiteinge yes
21:12 seanz whiteinge: Genius! It seems to be working now.
21:12 Thiggy @flupke oh zany. so I could define the macro in an sls file that I include in the ones I want to use it in?
21:12 whiteinge woot
21:13 seanz whiteinge: (waiting for the output...)
21:13 Ahlee welp, confirmed in schedule.py, it has no concept of an at time and only works in seconds, presumably since minoin start
21:13 Thiggy @flupke also, am I just doing something insane? I feel like I've wandered into some weird corner case land when what I'm trying to do doesn't seem that special
21:13 whiteinge whyzgeek: pillar would be good for this. how do you define roles for your servers?
21:14 seanz whiteinge: Indeed! Code checked out! Thanks again! Exclamation points!
21:15 flupke Thiggy: yes you can use import for that: http://jinja.pocoo.org/docs/templates/#import , though your macros should not be defined in a sls file, but a jinja template
21:15 whiteinge seanz: (see the password arg) http://docs.saltstack.com/ref/states/all/salt.states.svn.html#salt.states.svn.latest
21:15 whiteinge ^^ thanks again for the report
21:15 robawt whiteinge: you're a magic maker
21:16 robawt video conf with seanz right now, he was so happy when it worked whiteinge
21:17 whiteinge he's got an infectious smile
21:17 jhenrypb left #salt
21:19 whyzgeek whiteinge: my aim is to do it at top file for pillars based on hostname or host regex and then define some list of roles. However I hit the problem of defining the key, value pairs in the top file. I want to be able to add/remove roles list a list similar to states sls file.
21:20 mech422 Sweet! it works
21:20 mech422 I figured out how to use grains and jinja to pass info between .sls's
21:20 whyzgeek However now I have problem because I have to create one sls file in pillar per host to assign the roles
21:21 ldlework mech422: link to your blog about this?
21:21 ldlework :)
21:21 mech422 so I can have a foo/install.sls, foo/remove.sls and a foo/init.sls
21:22 mech422 ldlework: what's this 'blog' you speak of ?
21:22 mech422 ldlework: is it like that new 'usenet' thingey ?
21:22 ldlework mech422: sorry, personal web article publishing endpoint
21:23 mech422 anyway - now I can do stuff like salt-call state.sls foo.install  or salt-call state.sls foo.remove
21:24 mech422 and keep all the 'stuff' in init.sls so its all in one place
21:24 ldlework can you write a blog about it?
21:25 mech422 ldlework: I dont blog - don't even have one...don't FB, tweeter, tweet, or non of that stuff...
21:25 whiteinge Thiggy: one possible solution is pillar. i left a comment on your gist
21:25 ldlework mech422: how will I benefit from your efforts?!
21:28 mech422 ldlework: oh - if you really care, I can paste bin it for you - its like 6 lines long :-P
21:28 mech422 ldlework: it just abuses jijna and sls in creative ways
21:28 ldlework mech422: I'm just being cynical. I have yet to even look directly at salt.
21:29 mech422 ldlework: ahh...see..thats why I don't blog :-P  No-one cares what I have to say anyway :-P  They just clicked thinking they were gonna see cat pix or boobies :-P
21:30 ldlework I'm still expecting them.
21:30 * ldlework stares.
21:30 jesusaurus whiteinge: i made a thingy: https://github.com/jesusaurus/salt-shaker
21:31 jesusaurus its not at all pretty yet, but its enough to help with manual testing of formulae
21:31 forrest I like that name jesusaurus
21:31 jesusaurus also, its making me a bit frustrated with what comes up as "errors" in salt
21:33 forrest are you planning to incorporate jinja parsing? Or still having issues getting the yaml fun working properly
21:36 jesusaurus no, i let salt.client deal with all that
21:36 jesusaurus because compiling the state requires compiling the pillar for a specific minion
21:36 jesusaurus I just want to know that it all compiles
21:37 jesusaurus so I basically just run state.sls against everything I find in the state top file with test=True
21:38 jesusaurus ideally this would be something that could run as an unprivileged user, but it will take some work both in salt and salt-shaker to get to that point
21:38 forrest Hmm
21:38 oz_akan_ joined #salt
21:39 cedwards I still can't get my schedule to work. i've tried three different ways
21:39 forrest It would be cool if you could test the state for all possible outcomes from the pillar data, and then report back on any failures onl
21:39 forrest *y
21:40 forrest then you could get around actually running the --test option if the grain data was populated somewhere for ease of access.
21:41 forrest err test=True, whatever.
21:41 mmilano_ joined #salt
21:42 KyleG1 joined #salt
21:43 imaginarysteve joined #salt
21:44 druonysuse joined #salt
21:44 druonysuse joined #salt
21:45 travisfischer joined #salt
21:45 jesusaurus forrest: yeah, it would pretty cool if i could manage to determine all valid pillar combos for a state, but with the way you can match in many different ways its nontrivial to algorithmically create the minion names
21:46 forrest right, my whole issue is that with the way you have it, you're still reaching out to the minion
21:46 jesusaurus so i made an id map thing, you can manually specify a list of valid minion ids for each state
21:46 forrest the cool thing about puppet parser validate is you can run it from anywhere, on just a repo you checked out from git for example.
21:46 jesusaurus no, its not reaching out to any minion nor master
21:46 jesusaurus its running locally
21:47 jesusaurus yeah, i really like puppet validate and puppet --noop
21:47 sieson left #salt
21:48 forrest how is it running locally? I thought that you had to run the commands off of the master for salt '*' state.sls test=True
21:48 jesusaurus no, this is doing salt-call --local
21:48 forrest ahh ok
21:48 forrest must have missed that when I was skimming, my bad
21:49 whiteinge jesusaurus: ooh! a thingy!
21:49 whiteinge very interesting
21:49 jesusaurus and it loops through the states in the top file, looks at the minion id map and attempts to run state.sls with the given ids for each state
21:50 redondos joined #salt
21:50 juanlittledevil joined #salt
21:51 nu7hatch joined #salt
21:51 forrest Hmm, I feel like it almost shouldn't care about the minion id map
21:51 forrest because all that matters is the logic itself
21:52 forrest because puppet parser validate is just a syntax check, nothing more.
21:52 Ryan_Lane joined #salt
21:55 nu7hatch_ joined #salt
21:56 jacksontj joined #salt
21:57 justin-real joined #salt
21:58 jacksontj joined #salt
22:00 justin-real joined #salt
22:03 EntropyWorks so I'm looking ate salt.states.debconfmod.set_file(name, source, **kwargs) and I can't use a jinja template source file right?
22:07 nu7hatch joined #salt
22:08 JaredR joined #salt
22:08 andrewclegg_ joined #salt
22:08 whiteinge whyzgeek: sorry, meatspace distractions. did you figure out a layout that would work? you can't define the key/value pairs in the pillar top file but pillar values all get merged into one giant dictionary so you could put them in a separate file (or several)
22:10 devinus joined #salt
22:11 JaredR joined #salt
22:11 faldridge joined #salt
22:11 faldridge left #salt
22:11 jesusaurus forrest: but you have to care about your minion name to get a correct pillar. the pillar is one of the large differences between salt and puppet
22:12 EntropyWorks because debconf.set_file doesn't seem to understand jinja templates this doesn't work... https://gist.github.com/EntropyWorks/6616468
22:14 forrest righ jesusauraus, but if you passed in data that was irrelevant or fake, it wouldn't know any better right?
22:15 jbunting joined #salt
22:16 JaredR joined #salt
22:20 jesusaurus EntropyWorks: yeah, it looks like salt.states.debconfmod.set_file(name, source, **kwargs) isnt doing any templating
22:22 JaredR joined #salt
22:22 jdenning joined #salt
22:24 seanz So is there a way to list out a bunch of commands to run, the same way you can list out multiple pkgs?
22:24 jesusaurus EntropyWorks: We might be able to modify salt.modules.debconfmod.set_file to use salt.modules.file.get_managed to fix that... I'm not sure if that would work
22:24 EntropyWorks I just updated the gist with what works but is not nice since it exposes the password
22:24 JaredR joined #salt
22:25 mech422 jesusaurus: I just updated file.append to support templating - got a nice lil get_template() method you could use real easy
22:27 pipps joined #salt
22:28 flupke left #salt
22:30 EntropyWorks my python foo is weak I may just open an issue and cross my fingers and work around the issues with cmd.script and hid it there
22:30 JaredR joined #salt
22:32 EntropyWorks which has its own jinja issues but I can work around them
22:33 JaredR joined #salt
22:33 kermit joined #salt
22:35 JaredR joined #salt
22:38 JaredR joined #salt
22:40 andrej joined #salt
22:40 robertkeizer joined #salt
22:40 JaredR joined #salt
22:41 andrej Where do I find a document that describes how to deal with temporarily unavailable minions, e.g. machines that are turned off, or laptops that are off-site?
22:43 cdsrv joined #salt
22:43 whiteinge seanz: you could use ``- names:`` in a cmd.run which each command on it's own line
22:43 JaredR joined #salt
22:43 whiteinge seanz: you couldn't depend on ordering though
22:44 nu7hatch joined #salt
22:45 pdayton joined #salt
22:46 JaredR joined #salt
22:47 seanz whiteinge: Ah, thanks. Is there any thought to enforcing ordering
22:47 seanz ?
22:47 seanz Or honoring it...
22:48 whiteinge seanz: the reason that method doesn't work with ordering is all states in a state tree are combined into one big thing and then ordered lexographcially. so each entry in ``- names`` will get expanded and then ordered that way
22:48 whiteinge seanz: this is changing in 0.17. default ordering will be done by the order each state appears in the file
22:48 JaredR joined #salt
22:49 whiteinge both (the new and the old) ordering methods are then modified by any explicit ``- order`` or ``requires`` statements
22:49 seanz whiteinge: Ah, I see.
22:49 oz_akan_ joined #salt
22:50 whiteinge seanz: tl;dr: for 0.16.x you want to do all ordering using requires statements
22:51 JaredR joined #salt
22:52 msheiny joined #salt
22:54 seanz whiteinge: Basic question:
22:54 JaredR joined #salt
22:54 seanz For commands listed under an ID...those aren't done "in order", either?
22:54 UtahDave cedwards: select `return` from salt_returns;
22:55 berto- joined #salt
22:56 jdenning joined #salt
22:57 JaredR joined #salt
22:57 faldridge joined #salt
22:59 JaredR joined #salt
22:59 jacksontj joined #salt
23:00 redondos joined #salt
23:01 ghanima hello all
23:01 ghanima anyone still on
23:01 JaredR joined #salt
23:01 insatsu joined #salt
23:03 robertkeizer Hi.
23:04 cedwards UtahDave: I can query every other column that way, except return.
23:04 JaredR joined #salt
23:04 ghanima When I execute a module
23:04 ghanima How can I aggregate the results of the data
23:04 UtahDave cedwards: does it work with the backticks? I think return might be a reserved word
23:05 ghanima so for example salt '*' test.ping
23:05 ghanima instead of getting the result of each node provide a summation
23:05 UtahDave ghanima: Well, you can have Salt return the data in json format. You could pipe that into an program you write to aggregate the data
23:06 robertkeizer ghanima: jq may be useful to you.
23:06 cedwards UtahDave: it does work with the backticks..
23:06 UtahDave ghanima: You could also write an "outputter" that does the aggregation for you.
23:06 ghanima robertkeizer: what is jq?
23:06 robertkeizer I would recommend just writting an output.
23:06 UtahDave cedwards: Yeah, I think return is a reserved word.
23:06 robertkeizer ghanima: sed for json. http://stedolan.github.io/jq/
23:06 cedwards UtahDave: also, and I think I found a github issue for this, but it seems only certain modules are returning.
23:07 JaredR joined #salt
23:07 cedwards UtahDave: I can't get test.* or service.* to show up
23:08 whiteinge seanz: correct. they're not executed in source order either. they still need requires statements even when they're under the same ID
23:08 ghanima @UtahDave: I read about outputters and I thought an outputter was how to data should be formatted not how the data should be represented... I.E yaml, json, text,, instead of being able to have the data format to like a jinja template http://jinja.pocoo.org/
23:09 ghanima robertkeizer: JQ looks really interesting let me take a look... thanks for the suggestion
23:09 JaredR joined #salt
23:10 UtahDave cedwards: that's very odd. What version of Salt?
23:10 cedwards UtahDave: 0.16.3 on CentOS
23:11 seanz whiteinge: Ok, thanks for the info.
23:11 UtahDave cedwards: try running your minion in debug mode and see if it gives you any clues.
23:12 cedwards UtahDave: I tried that. I don't see really any mention of returner stuff in there
23:12 cedwards UtahDave: let me see if I can find the github issue I stumbled upon earlier..
23:12 JaredR joined #salt
23:13 cedwards UtahDave: https://github.com/saltstack/salt/issues/6695, and https://github.com/saltstack/salt/pull/6711
23:14 JaredR joined #salt
23:15 pdayton joined #salt
23:17 robertkeizer cedwards: mysql issues again?
23:17 cedwards robertkeizer: might be patched in 0.17.x, but i'm having issues on 0.16.3
23:19 robertkeizer Ahh.
23:24 UtahDave cedwards: I'm trying to see if that pull req got cherry picked.
23:26 UtahDave cedwards: oh, wait. So test.ping works, but you can't get the result to show up in the mysql database when using the returner?
23:27 micah_chatt joined #salt
23:28 jacksontj joined #salt
23:28 cedwards UtahDave: correct. it works, as well as service.*, but the results never show up in the returner database.
23:29 cedwards I haven't gone through the entire list of modules, but i've noticed so far that those two don't show up.
23:29 UtahDave cedwards: do other commands show up in the database?
23:30 cedwards UtahDave: state.*, status.*, pkg.*..
23:30 UtahDave I'm really confused as to why some show up and some don't.
23:31 emocakes joined #salt
23:32 jacksontj joined #salt
23:34 mmilano joined #salt
23:34 cedwards I need to start teaching here in a second, but I'm sure I'll try to dig into it more tomorrow
23:35 UtahDave ok, sounds good, cedwards.  basepi just checked for me and that pull req has been cherry picked.
23:35 darrend joined #salt
23:38 micah_chatt joined #salt
23:42 jdenning joined #salt
23:43 lemao joined #salt
23:46 bemehow joined #salt
23:48 Thiggy In the salt documentation for runners, there's a line in the example: client = salt.client.LocalClient(__opts__['conf_file'])   <-- what does the __opts__['conf_file'] part do? I see other examples without that piece.
23:48 Thiggy (from http://docs.saltstack.com/ref/runners/index.html)
23:49 ghanima @UtahDave: I read about outputters and I thought an outputter was how to data should be formatted not how the data should be represented... I.E yaml, json, text,, instead of being able to have the data format to like a jinja template http://jinja.pocoo.org/
23:50 jacksontj joined #salt
23:50 UtahDave Thiggy: __opts__['conf_file'] is the path to the conf file that LocalClient needs.
23:51 UtahDave ghanima: You can do whatever you want with an outputter.
23:51 Lue_4911 joined #salt
23:51 UtahDave There's an outputter that was modified fairly recently to provide an aggregation of a hightstate result.
23:52 [diecast] joined #salt
23:53 Thiggy @UtahDave what config file is that? Is that documented? I'm turning up blanks in my googles
23:55 Thiggy nm: source tells all: c_path=os.path.join(syspaths.CONFIG_DIR, 'master'),

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