Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-01-20

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

All times shown according to UTC.

Time Nick Message
00:03 psyl0n_ joined #salt
00:15 Veticus joined #salt
00:28 juicer2 joined #salt
00:35 kalloc joined #salt
00:39 mgw joined #salt
00:43 scuwolf joined #salt
00:43 fxhp joined #salt
00:54 taion809 joined #salt
00:55 taion809 joined #salt
00:56 srage joined #salt
01:03 ConceitedCode joined #salt
01:07 MedicalJaneParis joined #salt
01:07 MedicalJaneParis left #salt
01:11 MedicalJaneParis joined #salt
01:12 jimallman joined #salt
01:14 rojem joined #salt
01:19 kalloc joined #salt
01:25 jpihl joined #salt
01:28 srage joined #salt
01:35 kalloc joined #salt
01:36 rojem joined #salt
01:37 kalloc_ joined #salt
01:39 shennyg joined #salt
01:44 bejer joined #salt
01:45 higgs001 joined #salt
01:52 psyl0n joined #salt
02:08 bemehow joined #salt
02:18 holys joined #salt
02:20 jfzhu_us joined #salt
02:30 yomilk joined #salt
02:32 favadi joined #salt
02:34 holys_ joined #salt
02:36 kalloc joined #salt
02:39 Furao joined #salt
02:46 ajw0100 joined #salt
02:52 bemehow joined #salt
02:54 jimallman joined #salt
03:05 ajw0100 joined #salt
03:11 ajw0100 joined #salt
03:15 holys joined #salt
03:18 holys_ joined #salt
03:19 n8n joined #salt
03:20 scuwolf joined #salt
03:20 holys_ joined #salt
03:22 holys joined #salt
03:26 MK_FG joined #salt
03:35 kalloc joined #salt
03:37 holys joined #salt
03:37 rojem joined #salt
03:44 bazafizik joined #salt
03:48 fllr joined #salt
03:50 yomilk joined #salt
03:58 ajw0100 joined #salt
04:05 Shish joined #salt
04:07 holys_ joined #salt
04:09 opapo joined #salt
04:22 higgs001 joined #salt
04:25 ajw0100 joined #salt
04:33 bhosmer joined #salt
04:35 kalloc joined #salt
04:40 middleman_ joined #salt
04:41 rojem joined #salt
04:47 troyready joined #salt
04:48 ajw0100 joined #salt
04:48 NotreDev joined #salt
05:19 higgs001 joined #salt
05:35 taion809 joined #salt
05:35 kalloc joined #salt
05:54 anuvrat joined #salt
06:01 fllr joined #salt
06:03 fllr joined #salt
06:26 Psyke joined #salt
06:27 eclectic joined #salt
06:29 Bosse joined #salt
06:29 MedicalJaneParis joined #salt
06:35 kalloc joined #salt
06:36 Furao joined #salt
06:36 sroegner joined #salt
06:45 Furao joined #salt
06:56 holys joined #salt
07:01 rmt joined #salt
07:07 gammalget joined #salt
07:11 slav0nic joined #salt
07:13 matanya joined #salt
07:17 leonardinius joined #salt
07:23 porri joined #salt
07:27 ckao joined #salt
07:33 ndrei joined #salt
07:35 kalloc joined #salt
07:37 ravibhure joined #salt
07:39 ravibhure1 joined #salt
07:43 gancl joined #salt
07:45 Shenril joined #salt
07:46 holys_ joined #salt
07:48 taion809_ joined #salt
07:48 ndrei joined #salt
07:48 leonardinius joined #salt
07:55 balboah joined #salt
07:55 bowen joined #salt
07:56 favadi joined #salt
08:01 ndrei joined #salt
08:02 Furao joined #salt
08:02 linjan joined #salt
08:04 fllr joined #salt
08:06 fllr joined #salt
08:08 fllr joined #salt
08:16 helminthe joined #salt
08:16 svx joined #salt
08:22 yomilk joined #salt
08:24 martoss joined #salt
08:25 sroegner joined #salt
08:31 elm- joined #salt
08:31 harobed_ joined #salt
08:35 kalloc joined #salt
08:36 giantlock_ joined #salt
08:37 kalloc_ joined #salt
08:38 gurubert joined #salt
08:39 taion809 joined #salt
08:39 fllr joined #salt
08:40 yomilk joined #salt
08:41 fllr joined #salt
08:43 elm-1 joined #salt
08:53 njpatel joined #salt
08:59 njpatel joined #salt
09:11 KoFFiE left #salt
09:12 strgcloud joined #salt
09:21 Koma joined #salt
09:21 favadi joined #salt
09:23 ConceitedCode joined #salt
09:30 aleszoulek joined #salt
09:34 ConceitedCode joined #salt
09:36 phez joined #salt
09:38 phez Could anybody help me with the installation of SaltStack using push technology only (so push from mast to minion). In our setup communication from minion to master is not possible
09:41 nkuttler phez: sounds like you'd want something like salt-ssh with a different transport layer?
09:41 nkuttler though i'm not sure if the minion talks to the master over ssh tbh
09:41 nkuttler (i think not)
09:46 leonardinius I'm currently playing with salt-ssh. As far I understand it works as following: master compiles/packages/zips boostraped version of salt-minion, uploads it over the wire/ssh/scp to target minions and executes something like 'unzip' it and execute .. '
09:47 leonardinius so, phez, if master <-> minion communication is an option (authored by and managed by salt master, not initiated by minion itself) - then salt-ssh is the answer
09:51 nkuttler yeah, that's how i read it as well
09:53 phez Okay, for some things thats no problems, but I think it's not possible to send files with salt-ssh.
09:58 bhosmer joined #salt
10:04 leonardinius phez, what do you mean by that? 'Salt File Server' functionality (e.g. cp.get_file) ?
10:06 phez leonardinius, that what i meant. I think thats not possible
10:07 ndrei joined #salt
10:07 derelm joined #salt
10:07 leonardinius phez, might be. worth trying thoiugh. it's something i have not tried this yet. My assumption if that cp.get_file salt://xx should work, however cp.get_file /other/path might not
10:08 leonardinius phez, sorry for so many typos
10:14 phez The typos are no problem, but cp.get_file salt://xx does not seem to work. I get no output after the clientname
10:14 sroegner joined #salt
10:18 zooz joined #salt
10:31 gurubert left #salt
10:31 leonardinius phez, you might be right. I've just tried to do salt-ssh '*' cp.get_file 'salt://xxx' '/tmp/1.txt'; salt-ssh '*' -r 'ls/tmp'; and don;t see the file created there
10:32 leonardinius phez, I myself am complete salt rookie, however I would expect this scenario to work
10:33 leonardinius phez, since the file should be copied to minion anyway (at least it does gets unpacked and installed via file.managed scenario)
10:33 phez I'm a beginner as well, just started looking at the product :-)
10:33 leonardinius phez, same here ;)
10:36 leonardinius phez, I will create ghihub issue for it, will paste url here
10:38 martoss joined #salt
10:42 fllr joined #salt
10:42 phez ok
10:42 phez thanks
10:43 leonardinius phez, here you go https://github.com/saltstack/salt/issues/9851 Please update as appropriate
10:44 pelme left #salt
10:44 kalloc joined #salt
10:49 jcsp joined #salt
10:53 elm- joined #salt
10:59 nocturn joined #salt
11:01 ndrei joined #salt
11:18 faust joined #salt
11:24 andrewclegg joined #salt
11:25 andrewclegg is there any way to do a "soft" dependency between two sls files? i.e. something in sls 1 requires or watches something in sls 2, *if* sls 2 applies to this minion?
11:25 ndrei joined #salt
11:26 andrewclegg I don't want to include sls 2 in sls 1 as there may be times when sls 2 is needed without sls 1... in which case the dependency doesn't matter
11:28 andrewclegg or when sls 1 is needed without sls 2, rather
11:28 diegows joined #salt
11:35 leonardinius andrewclegg, as fai i can tell, require: sls:slsname or watch: sls:name ir supported
11:36 leonardinius andrewclegg, i believe i've seen thid is on requisites documentation
11:36 leonardinius andrewclegg, yeah, see it here http://docs.saltstack.com/ref/states/requisites.html#requisite-and-requisite-in-types
11:38 andrewclegg leonardinius: won't that cause sls:slsname to be executed? the behaviour I'm looking for is "don't cause this dependency to be executed, but if it's going to be executed anyway, I want to go AFTER it"
11:38 andrewclegg alternatively a way of getting the currently-applicable highstate definition for the current minion
11:38 andrewclegg so I can template based on that
11:39 leonardinius Hi All, does anybody know why `salt-ssh '*'  apt.install gitolite 'debconf=salt://gitolite/gitolite.answers'` gives something like minion1: Function apt.install is not available ? As per documentation that should work, right?  http://docs.saltstack.com/ref/modules/all/salt.modules.apt.html#module-salt.modules.apt
11:40 leonardinius andrewclegg: as far I can tell - it should not execute it
11:40 andrewclegg ok, thanks leonardinius, I'll try it
11:40 leonardinius andrewclegg: eee, other way to do so might be watch_in
11:41 leonardinius andrewclegg: e.g. sls1: - watch_in on sls2; then -> if sls1 gets updated, it will trigger sls2
11:42 leonardinius andrewclegg: that way sls1 will know about sls2, but sls2 might not know abaout sls1 and still dpend on it
11:44 leonardinius andrewclegg: My wrong on my first suggeston. Have reread http://docs.saltstack.com/ref/states/requisites.html#require-an-entire-sls-file 2 times and I see it will use/include sls file. Still hope for watch_in, require_in though.
11:44 fllr joined #salt
11:45 leonardinius Anyone, should pkg.install work with debconf option or not? I see documenattion on it however seems whole debconf module is missing
11:45 beanux joined #salt
11:45 andrewclegg leonardinius: I'll give them a try. otherwise I can probably work around it by using hardcoded "order" rather than require/watch
11:46 fllr joined #salt
11:49 bhosmer joined #salt
11:52 Psyke leonardinius, could you post a snippet of how your state file looks like, with debconf? I can maybe then run a test on my server and see.
11:57 leonardinius Psyke, https://gist.github.com/leonardinius/8518829 is it enough to test against?
11:58 leonardinius Psyke, it seems what even running salt-call --local debconf is missing
11:59 Psyke Yip, I gave it a try on my test server. It returns "Function debconf is not available"
12:01 leonardinius Psyke, as per http://docs.saltstack.com/ref/modules/all/salt.modules.apt.html#module-salt.modules.apt documentation it should be supported. if not running as salt state, then at least as salt module
12:01 psyl0n joined #salt
12:02 SkyRocknRoll joined #salt
12:02 SkyRocknRoll joined #salt
12:02 psyl0n joined #salt
12:02 leonardinius Psyke, thanx. It was more as sanity check whether I do it right. I've already submitted issue at https://github.com/saltstack/salt/issues/9849
12:02 sroegner joined #salt
12:05 Psyke No problem, I have got a separate server I use to test salt states on.
12:06 Psyke I got it to install with a this sls. But I don't know if debconf was applied or not.
12:06 Psyke gitolite:  pkg: - installed  - debconf: salt://gitolite.answers
12:07 Psyke Is there a way to check ?
12:07 londo joined #salt
12:09 xmj on https://github.com/saltstack/salt-contrib/blob/master/modules/vzctl.py, is anyone currently working on extending it?
12:09 Psyke leonardinius, it works.
12:10 Psyke I checked in the gitolite keydir, and found "ssh-dss aaaaaaa"
12:10 leonardinius Psyke, works? what salt version do you run?
12:11 Psyke salt 0.17.4
12:12 leonardinius Psyke, it doesn't show  `KeyError: 'debconf.set_file'`? I run last version from develop branch (due to latest salt-ssh ..)
12:13 Psyke Nope, I modified your gitolite SLS slighlty t make it work. But it applies the debconf properly, I will leave a comment on your gist, with my SLS file.
12:14 leonardinius Psyke, thanx a lot
12:14 Psyke No probs. :)
12:17 leonardinius Psyke, seems like regression to me. Are you able to run `salt '*' pkg.install gitolite 'debconf=salt://gitlite/gitolite.answers'` as well?
12:18 Psyke Let me try.
12:18 batulin-s joined #salt
12:21 Psyke Yip, runs without error.
12:26 leonardinius Psyke, thanx
12:26 Psyke No probs.
12:28 Psyke I am going to try run it on a fresh minion, just to double check.
12:29 ndrei joined #salt
12:34 Psyke With a brand new server and salt-minion. That command works.
12:35 leonardinius Psyke, thanx a lot. Updated my github issue with reference to irc chants log / regression bug
12:35 Psyke Sweet, glad I could help.
12:41 scott_w joined #salt
12:48 leonardinius Hi Anyone, does file.recurse work with salt 0.17.4?
12:49 leonardinius Where could I find particular versoin docs? not latest one
12:49 leonardinius Sorry, don;t bother - found it already at http://salt.readthedocs.org/en/v0.17.4/
13:02 th3reverend joined #salt
13:02 th3reverend left #salt
13:09 NotreDev joined #salt
13:09 elm- joined #salt
13:12 elm- joined #salt
13:37 brianhicks joined #salt
13:38 sroegner joined #salt
13:41 leonardinius Psyke, i installed locally v0.17.4 from git tag - still behaves the same. even worse - file.recurse broke. However should be supported as per documentation.
13:41 leonardinius confused
13:41 Psyke That is weird :/
13:42 elithrar joined #salt
13:42 oc how do I check if a salt state is already loaded? I need to loop through several artifacts, they all specify a version of rbenv, the problem is when more than one artifact depend on the same version of rbenv, then I get a "conflicting ID"
13:42 leonardinius Psyke, might the way I have it installed. How do you install it - is it via pip, apt-get ... ?
13:43 oc I *could* globalize each instance of rbenv versions, but I'd like to be able to specify it on each pillar entry (list) for clarity
13:43 backjlack joined #salt
13:43 Psyke I use the wget bootstrap. "wget -O - http://bootstrap.saltstack.org | sudo sh"
13:44 leonardinius Psyke, ok, thanks. will try that.
13:45 jpcw joined #salt
13:45 oc i.ie (pseudo): {% for entry in pillar.foo %} {% if <what to guard as?> %} {{ entry.rbenv }}: \nrbenv.installed\nmore opts\n {% endif %} {% endfor %}
13:46 fllr joined #salt
13:49 Furao joined #salt
13:58 rjc joined #salt
13:58 rjc joined #salt
14:02 Gifflen joined #salt
14:04 jslatts joined #salt
14:05 mgw joined #salt
14:08 ndrei joined #salt
14:16 timoguin joined #salt
14:18 yomilk joined #salt
14:22 porri left #salt
14:23 Iwirada joined #salt
14:23 jimallman joined #salt
14:23 juicer2 joined #salt
14:24 elm- joined #salt
14:28 elm-1 joined #salt
14:35 vejdmn joined #salt
14:37 marmoy joined #salt
14:37 glenbot joined #salt
14:38 marmoy should file_roots in the master config file be changed when using gitfs?
14:38 marmoy I get "No Top file or external nodes data matches found" in version 0.17.4
14:39 marmoy the files are hosted on an nfs server
14:41 marmoy system is SLES 11.2
14:43 marmoy gitfs_remotes is set to:   - file:///mount_point
14:44 RizKhan joined #salt
14:44 sroegner marmoy: why are you trying to use gitfs when the files are mounted?
14:45 sroegner branches/envs?
14:45 marmoy I understood that gitfs utilized some git functionality
14:46 marmoy no branches yet
14:46 marmoy sroegner: are you saying that if I have it mounted, gitfs is unnecessary?
14:47 sroegner i think it is worth a try pointing there, yes
14:47 sroegner add /mount_point below /srv/salt
14:48 marmoy on the gitfs walkthrough they reference a git repository on the local filesystem using file:/// (http://docs.saltstack.com/topics/tutorials/gitfs.html)
14:48 mpanetta joined #salt
14:48 marmoy ok, give me a sec
14:49 sroegner the one reason i can imagine for doing local git is to support staging and development branches on the master
14:50 sroegner without having to pull them into different file roots
14:50 NotreDev joined #salt
14:51 marmoy but it's not really local
14:51 sroegner have you checked your master log for GitPython exceptions?
14:51 sroegner if you mount it?
14:52 sroegner then its not really remote either :-)
14:53 marmoy no :) but my point is that our reason to use git is to have version control on shared code
14:53 marmoy and using nfs was just the simplest way to set it up
14:55 elm- joined #salt
14:56 sroegner i have my master pull from a git remote directly
14:56 marmoy there isn't anything wrong in the master log
14:57 sroegner i would consider adding nfs an additional risk
14:57 sroegner good
14:57 marmoy risk?
14:57 sroegner reliability wise
14:57 marmoy what do you mean git remote directly?
14:58 sroegner you point to github or whereever the code is hosted
14:58 marmoy this is internal code, github is not trusted
14:58 marmoy so are you suggesting setting up a git server?
14:59 marmoy i gues that wouldn't be more reliable than nfs
14:59 toastedpenguin joined #salt
15:00 sroegner if your nfs server gous down your salt code disappears and everything hangs
15:00 sroegner if git remote goes down you don't get updates
15:01 marmoy ok, now i get it
15:01 marmoy so i keep a repository directly on the master, syncing with the nfs repo
15:02 marmoy and reference the local repo using gitfs?
15:02 marmoy i have to run, thank you for your time
15:02 sroegner np
15:06 linjan_ joined #salt
15:15 AdamSewell joined #salt
15:15 AdamSewell joined #salt
15:18 Gordonz joined #salt
15:18 Gordonz joined #salt
15:21 JasonSwindle joined #salt
15:27 Furao_ joined #salt
15:27 ndrei joined #salt
15:29 clarete joined #salt
15:31 clarete ladies and gentleman, quick question. I'm trying to create a directory inside of my home folder with file.directory: - name: ~/local
15:31 clarete but I'm getting the message "Specified file ~/local is not an absolute path". Is there any way to do this without specifying the user name in the directory? :)
15:32 clarete Thanks!
15:32 delkins can't use {{username}} somehow?
15:33 clarete delkins: hehe, I'm quite new to salt, now I see the salt files are also templates!
15:33 clarete thanks :)
15:34 l0ritatz joined #salt
15:35 l0ritatz left #salt
15:35 l0ritatz joined #salt
15:36 ndrei joined #salt
15:44 whiskybar joined #salt
15:45 ndrei joined #salt
15:49 Whissi joined #salt
15:50 higgs001 joined #salt
15:52 jalbretsen joined #salt
15:52 mgw joined #salt
15:56 fllr joined #salt
15:56 MrTango joined #salt
15:58 bbinet hi
15:58 jankowiak joined #salt
15:58 bbinet here is a question about writing custom modules
15:59 bbinet my custom module needs some specific python dependencies that can be installed in a virtualenv on every minion
16:00 bbinet but how can I extend salt sys.path so that salt can find these module dependencies?
16:01 jeremyBass can you call a salt state of a server in a jinja if statement?
16:02 fllr joined #salt
16:03 abe_music joined #salt
16:03 madduck joined #salt
16:03 madduck joined #salt
16:07 jeremyBass I'm looking to do something like {% if grains['os'] == 'Debian' %}  but as {% if state['foo'] is True %}
16:08 fllr joined #salt
16:12 jeremyBass {% salt['service']('foo') is True %} maybe?
16:16 alunduil joined #salt
16:17 foxx joined #salt
16:17 quickdry21 joined #salt
16:19 ekristen joined #salt
16:20 batulin-s You should't use 'is True' - if the function returns True/False - use {% __salt__['some_func']('some_arg')
16:20 batulin-s You should't use 'is True' - if the function returns True/False - use {% if __salt__['some_func']('some_arg') %}
16:21 batulin-s You should't use 'is True' - if the function returns True/False - use {% if salt['some_func']('some_arg') %}
16:21 ekristen is there anyway to call a function upon the pillar git update against the pillar cache data?
16:21 Linz joined #salt
16:21 ekristen I’d like to store some sensitive info in a git repository, but I’d like to encrypt the file in the git repo
16:26 teskew joined #salt
16:27 DerekRBN joined #salt
16:27 kermit joined #salt
16:29 fllr joined #salt
16:32 DerekRBN Has minion ID changed recently in the way it looks up the hostname if ID is not given?
16:32 elm- left #salt
16:32 DerekRBN Used to be (so i thought) it would use hostname now it appears that it's doing a lookup and gettting something out of /etc/hosts
16:32 SpeeR joined #salt
16:34 patrek joined #salt
16:35 fllr joined #salt
16:37 ekristen dave_den: is there anyway from the salt command to specify environment? ie -env dev, I want to just run state.sls, but it defaults to base
16:38 UtahDave joined #salt
16:40 JasonSwindle UtahDave:  Welcome!  I will be in your class at SaltConf :)
16:40 JasonSwindle Just saw the PDF
16:40 UtahDave nice!!
16:41 UtahDave Be nice or I'll throw an eraser at you!
16:41 UtahDave :)
16:41 JasonSwindle Awesome!  That will make me think of growing up in Japan all over again.
16:41 UtahDave lol
16:42 JasonSwindle UtahDave:  once you are in and ready, I am having an odd RC1 issue I want to run past SaltStack before I file an issue.
16:43 UtahDave Sure.  Yeah give me about 10 mins or so.
16:44 JasonSwindle No rush, at all. :)
16:45 anuvrat joined #salt
16:55 AdamSewell can someone verify for me that this sshd state will actually watch the sshd_config file and restart the service when it's changed? http://pastie.org/private/wmcwbmtnp1o7brsqyjf2ow
16:56 vmdsch joined #salt
16:56 [diecast] joined #salt
17:02 fllr joined #salt
17:02 vlcn I'm having a difficult time wrapping my head around reactors
17:03 vlcn anyone know of some other examples I could look at?
17:06 fllr joined #salt
17:07 yaru22 joined #salt
17:10 KyleG joined #salt
17:10 KyleG joined #salt
17:10 mattmtl is there a module that display the list of disks?
17:10 Ryan_Lane joined #salt
17:11 rgbkrk joined #salt
17:11 MTecknology FRICK! This is killing me here! I have libnss-ldapd, libpam-ldapd, nscd, and nslcd installed. They resolve users/groups just fine and great until state.highstate tries to run. It seems that a lookup is being performed for every user in every group which takes ~12min, when salt starts it caches all users/groups which takes ~14min. Every change to a user or group makes it rebuild that cache taking
17:11 MTecknology yet another ~14min per change. This results in >3hr state.highstate executions.
17:11 MTecknology damnit...
17:13 steve1 left #salt
17:14 UtahDave AdamSewell: You might want to have the sshd_config file.managed require the openssh-server pkg.installed
17:15 UtahDave vlcn: have you looked through the reactor docs yet?
17:15 vlcn UtahDave: I have gone through them a few times, but I feel like I'm missing something
17:15 vlcn just hasn't clicked yet
17:15 UtahDave mattmtl: does the disk module do what you want?
17:16 MTecknology I don't suppose it's possible to disable the user/group caching that salt does?
17:16 Iwirada left #salt
17:16 mattmtl UtahDave: I would like something like the output of fdisk... mounted+unmounted disks
17:17 UtahDave MTecknology: I'm not sure.
17:17 MTecknology that unfortunately seems to be the only sane solution at the moment :(
17:18 salt_whitebelt joined #salt
17:18 UtahDave mattmtl: have you tried looking at the parted module?
17:18 mattmtl UtahDave: parted only returns info about partitions not disks
17:19 fllr joined #salt
17:19 UtahDave mattmtl: how about    disk.usage   ?
17:20 mattmtl wondering how guys how doing... I mean, sometimes before mounting a partition/disk... you need to pull info about unmounted devices first
17:20 salt_whitebelt anybody having problem connecting to curl -L http://bootstrap.saltstack.org to install their master? been having problem since friday. we're behind the firewall. did set export proxy it seems to connect but fail as soon as the install proceed
17:20 mattmtl UtahDave: usage -> Return usage information for volumes mounted on this minion.... so "mounted" only
17:21 JasonSwindle salt_whitebelt:  Not at all.   I have used it many times over the weekend.
17:21 JasonSwindle Got a traceroute?
17:22 salt_whitebelt tracertroute to http://bootstrap.saltstack.org ?
17:23 ndrei joined #salt
17:23 JasonSwindle sans http and / :)
17:23 UtahDave mattmtl: I'm thinking Salt doesn't quite have exactly what you want, yet.
17:24 JasonSwindle salt_whitebelt: I see my last hope is ae-10.bb-d.slr.lxa.us.oneandone.net (74.208.1.65)  40.374 ms  40.869 ms perfora.net (74.208.29.198)  41.088 ms
17:24 vlcn Maybe I'm just going about this completely the wrong way...  I basically need to get the hostname and ip address of a minion back to the master and then sent to a  different minion to be used as arguments in the execution of a shell script
17:24 JasonSwindle vlcn:  The peer system and publish.publish can do that.
17:25 JasonSwindle http://docs.saltstack.com/ref/peer.html
17:26 vlcn JasonSwindle, thanks.  I hadn't considered using peer to peer communication.
17:27 kalloc_ joined #salt
17:27 MedicalJaneParis joined #salt
17:27 JasonSwindle vlcn:  here is an example of how I use it
17:28 salt_whitebelt JasonSwindle: what is the last hop before hiting the site?
17:28 JasonSwindle https://gist.github.com/JasonSwindle/876c7beea4711b4a6c64
17:28 JasonSwindle salt_whitebelt:  12  te-1-4.bb-d.ga.mkc.us.oneandone.net (74.208.1.35)  40.412 ms vl-987.gw-ps1.slr.lxa.us.oneandone.net (74.208.1.133)  41.091 ms  41.389 ms
17:28 JasonSwindle vlcn:  there is the gist
17:28 oc hmm, since upgrading to .17.4 lots of my states fail. I have a pillar with several entries (nginx_sites). If multiple sites declare the same document root, I get conflicting IDs from salt. How can I guard i.e. {{ site.root }}: file.directory & more options here. (site.root) can be the same for different sites
17:28 vlcn JasonSwindle: thanks, taking a look.
17:29 JasonSwindle sure
17:29 oc this used to be an accepted pattern up until at least 0.17.2
17:29 UtahDave oc: can you pastebin an example of what you have?
17:29 ndrei joined #salt
17:30 oc UtahDave: https://gist.github.com/oc/8524664
17:30 oc updated now
17:33 Marion joined #salt
17:33 oc updated again
17:33 Marion left #salt
17:34 UtahDave oc: yeah, that's not going to work
17:34 fllr joined #salt
17:34 UtahDave ID declarations have to be unique system wide
17:35 UtahDave co: if all the options are the same for each root, then I would use the - names option.
17:35 UtahDave i'll add an example to your gist.
17:35 JasonSwindle UtahDave:  My issue is on 2014.1.0RC1.  If I highstate targeting all nodes, an SLS fails.  If I target the node directly, it works.  Here is the gist with the error and SLS in question.  https://gist.github.com/JasonSwindle/05b2e0c0fda9db9b87b3
17:36 matanya joined #salt
17:36 JasonSwindle vlcn:  Did that help?
17:37 vlcn JasonSwindle: a bit, working on testing a few things now.
17:37 JasonSwindle Ok.
17:37 oc UtahDave: i.e. {{ site.root }}-{{site.fqdn}}: \n file.directory: \n - names: {{ site.root }} ?
17:37 JasonSwindle Don't forget to edit your master to allow peer and restart the service. :)
17:37 UtahDave oc: actually, let me think that through again
17:38 UtahDave oc: so they all have the root   of   /var/www/default    ?
17:39 oc UtahDave: in this example, yes :)
17:39 oc UtahDave: in real life: nope
17:40 oc but *some* may have the same root
17:40 joehillen joined #salt
17:40 pdayton joined #salt
17:41 oc updated gist again
17:43 UtahDave oc: yeah, if you have multiple ID declarations like that the conflict, you'll get an error.
17:43 UtahDave In the past it probably just wasn't displaying an error.
17:44 fllr joined #salt
17:45 vlcn okay, so stupid question.  How do I actually go about getting the hostname and ip from the minions in a useable form?
17:45 linjan_ joined #salt
17:46 UtahDave vlcn: have you looked at the network.ip_addrs function?  There's probably a module already there for you.  Also, a lot of that type of information is found in the minion's grains.
17:46 mpanetta joined #salt
17:47 ekristen UtahDave: how do I do matching in a top.sls for minion:environment == “something”
17:47 timoguin joined #salt
17:47 JasonSwindle ekristen:  I may have an example
17:48 JasonSwindle not sure, but may help
17:48 UtahDave thanks, JasonSwindle
17:48 JasonSwindle ekristen:  does this help?
17:49 JasonSwindle https://gist.github.com/JasonSwindle/617c8e94ce387b601e44
17:49 fllr joined #salt
17:49 UtahDave JasonSwindle: can you pastebin the output when that fails?  I'm pretty sure that publish.publish is returning the data in an incorrect format
17:49 ekristen JasonSwindle: no, unfortunately not
17:49 ekristen you can set environment: something in a minion config
17:49 JasonSwindle UtahDave:  I can try….. let me see if I can find that...
17:52 _fllr_ joined #salt
17:52 ekristen UtahDave: btw, I opened a ticket up, the minion environment pinning is broken in 0.17.4
17:53 n8n joined #salt
17:53 UtahDave oh really?  Thanks for opening that issue.
17:53 UtahDave ekristen: is it broken in the RC?
17:53 mgw joined #salt
17:53 ekristen I haven’t updgraded to the RC
17:53 UtahDave ok, cool
17:54 ekristen UtahDave: this is what I am seeing — https://github.com/saltstack/salt/issues/9805
17:56 jpcw joined #salt
17:57 JasonSwindle UtahDave:  I updated the Gist ( https://gist.github.com/JasonSwindle/05b2e0c0fda9db9b87b3 ), debug did not give much more information.
17:58 n8n joined #salt
17:59 UtahDave JasonSwindle: OK, so the first thing that I'm seeing is that if the publish.publish works correctly, then you're going to a bunch of " - name: " entries, which won't work.
18:00 UtahDave JasonSwindle: you'd have to use the    " - names: " argument with a list of the fingerprints.
18:00 JasonSwindle But why would it work if I target the node directly and not in a "*" HS?
18:01 UtahDave because - name  can take only one item.  So that works with one node.
18:01 JasonSwindle I can test -names: , just perplexed why a single node HS vs everyone HS works.
18:01 JasonSwindle but there is only one node in that return
18:01 JasonSwindle :)
18:02 UtahDave has the fingerprint been completely removed from any data structure return?
18:02 vlcn hmm, I guess node groups can't be used with salt-call?
18:03 JasonSwindle UtahDave:  salt -C 'G@node_type:util and G@env:dev and G@datacenter:iad' test.ping
18:03 JasonSwindle dev-iad3-util-n001.example.com:
18:03 JasonSwindle True
18:03 n8n joined #salt
18:03 JasonSwindle UtahDave:  I don't follow, I am sorry.
18:05 UtahDave well, JasonSwindle, your gist has a for loop.    What does    {{ util.0 }} look like?
18:06 [diecast] joined #salt
18:08 Ryan_Lane2 joined #salt
18:10 JasonSwindle UtahDave:  It should just return the IP address of the UTIL server.  Oddly, it worked find in 0.16.4 and 0.17.4…..but I know much has changed in these versions.
18:10 UtahDave what is it returning now?
18:11 JasonSwindle on a "*" HS, the ID "barman_public_ssh_fingerprint"
18:11 JasonSwindle on a targeted HS, the IP address like I want
18:11 fllr joined #salt
18:12 JasonSwindle unless you know a better way to do the JINJA. :)
18:12 linjan__ joined #salt
18:12 UtahDave can you run that publish.publish from the cli on a minion and get the output?
18:12 JasonSwindle Let me see. :)
18:13 ekristen I just saw publish.publish on a jinja template for nginx, what does that one do?
18:15 amckinley joined #salt
18:16 ekristen ok I read the docs, why would use use publish.publish instead of just doing a mine.get?
18:16 elfixit joined #salt
18:18 JasonSwindle ekristen:  could not mine be filled with outdated (60 seconds) data?
18:18 JasonSwindle UtahDave:  salt-call publish.publish 'G@node_type:util and G@env:dev and G@datacenter:iad' network.ip_addrs eth0 expr_form='compound'
18:18 JasonSwindle local:
18:18 JasonSwindle ----------
18:18 JasonSwindle dev-iad3-util-n001.example.com:
18:18 JasonSwindle - 10.69.245.195
18:18 JasonSwindle Worked
18:19 ekristen JasonSwindle: ah, so that is a real-time thing
18:19 JasonSwindle yep
18:19 ekristen hrm, I like that, but now I have to figure out how to set that up ;)
18:19 UtahDave ekristen: yep
18:19 fllr joined #salt
18:19 JasonSwindle ekristen:  My stack is fully built on it
18:20 UtahDave JasonSwindle: how about this:  - name: {{ salt['publish.publish']( util_compound_string , 'network.ip_addrs', 'eth0', 'compound').pop() }}
18:20 JasonSwindle Let me try. :)
18:20 ekristen JasonSwindle: cool — looking for the docs on how to setup permissions
18:20 JasonSwindle UtahDave:  testing now.
18:21 JasonSwindle ekristen:  look up PEER
18:22 JasonSwindle in the docs
18:23 ekristen ll
18:24 ekristen kk*
18:24 ndrei joined #salt
18:25 JasonSwindle ekristen:  http://docs.saltstack.com/ref/peer.html
18:25 ekristen JasonSwindle: ah I think I configured something like that already once
18:25 kermit joined #salt
18:25 ekristen that looks familiar
18:28 JasonSwindle UtahDave:  "*" failed like before…..
18:29 JasonSwindle 2014-01-20 12:25:29,851 [salt.loaded.int.module.cmdmod][INFO    ] Executing command 'ssh-keyscan -t ssh-rsa -H barman_public_ssh_fingerprint' in directory '/root'
18:29 ajw0100 joined #salt
18:29 JasonSwindle UtahDave:  target the node and it now fails too
18:29 JasonSwindle Progress
18:31 UtahDave JasonSwindle: Yeah, this is just one of those difficult Jinja things.
18:32 UtahDave whiteinge: Hey, do you have a minute to look at JasonSwindle's jinja thingy?
18:33 JasonSwindle What leaves me confused is, why it broke in the RC
18:34 UtahDave JasonSwindle: I'm not sure.  I think it might be worth opening an issue on this.
18:35 JasonSwindle Yep, That is me end goal if I find out it is not me being silly
18:35 JasonSwindle I know things change from version to version because of greater scoping and control.
18:36 cachedout joined #salt
18:36 JasonSwindle cachedout:  Welcome.
18:37 cachedout Hi!
18:37 psyl0n joined #salt
18:38 Linz joined #salt
18:38 JasonSwindle I think it is more of a bug
18:38 JasonSwindle - name: [['10.69.245.195']]
18:38 ConceitedCode joined #salt
18:38 JasonSwindle way at the top of the log, I see it grabs the correct IP in the low state.
18:38 JasonSwindle UtahDave:  ^
18:38 zooz joined #salt
18:38 JasonSwindle but then it ops to use the ID vs -name
18:39 UtahDave JasonSwindle: yeah, it looks like the data structure changed slightly.  try adding another .pop() to the end of that command
18:40 JasonSwindle .pop failed, I used .values()
18:40 JasonSwindle .pop gives a nasty stack trace
18:40 JasonSwindle {{ salt['publish.publish']( util_compound_string , 'network.ip_addrs', 'eth0', 'compound').values() }} is how I have it ATM
18:40 UtahDave try .values().pop()
18:41 pt|Zool joined #salt
18:41 JasonSwindle lol :)
18:41 UtahDave you want to get that ip without the brackets.
18:41 JasonSwindle Yep
18:41 JasonSwindle I wonder why in other states, I don't have to .value().pop()
18:42 UtahDave the datastructure probably changed slightly.
18:42 JasonSwindle UtahDave:  That gave a nasty error
18:42 JasonSwindle File "<template>", line 80, in top-level template code
18:42 JasonSwindle IndexError: pop from empty list
18:42 JasonSwindle - name: {{ salt['publish.publish']( util_compound_string , 'network.ip_addrs', 'eth0', 'compound').values().pop() }} <===== Using that
18:43 gkze joined #salt
18:44 Gareth 'lo
18:44 gkze is there a way to only output a successful cmd.run? like only if the command's exit code is 0, then print to stdout or something
18:45 UtahDave JasonSwindle: Hm.
18:45 JasonSwindle Yea.....
18:45 gkze nevermind it's a shell thing, not a salt thing
18:46 gkze figured it out: [command] 2>/dev/null
18:46 fllr joined #salt
18:48 UtahDave JasonSwindle: Yeah, open an issue. There may have been a data structure change that I'm not aware of.
18:49 JasonSwindle Ok.  I will do that.  Which parts should I put in the issue?   The failure on "*" vs targeted or the .value returning [[IP]] ?
18:49 JasonSwindle lol
18:50 taion809 joined #salt
18:52 jeremyBass questions .. how can i do something like `salt-call -env foo state.highstate` ?
18:52 UtahDave both.  They may want to split them apart, but just start with one for now
18:53 UtahDave jeremyBass: yep
18:53 JasonSwindle jeremyBass:  is FOO a grain?
18:54 jeremyBass yes grains: env: - foo is what i have
18:54 jeremyBass http://pastebin.com/QZgwtr03
18:54 jeremyBass that is the file
18:54 JasonSwindle salt-call -G 'env:foo' state.highstate ?
18:54 jeremyBass super let me try that
18:55 JasonSwindle I am not sure if that will work
18:55 UtahDave salt-call state.highstate  env=foo
18:56 fllr joined #salt
18:56 skullone its kinda hard making the mental switch from puppet to salt
18:56 diegows joined #salt
18:56 skullone sucks getting old  :o
18:56 jeremyBass salt-call state.highstate  env=foo is the one.. but .. hmm .. ok so it can't say that a service that is in the base is there?
18:57 strgcloud joined #salt
18:58 forresta joined #salt
18:59 UtahDave jeremyBass: FYI, in the next release of salt and in the current RC that will be      saltenv=foo
18:59 jeremyBass so that it totally what i wanted.. but then, what i need to do is fix the ` - require: - service: mysqld ` ..
18:59 yomilk joined #salt
19:00 jeremyBass @UtahDave thank you for the fyi.. where is that doc'd at.. i couldn't find it anywhere
19:01 UtahDave Hm. It should be in the release notes for the RC.   What version are you on now?
19:01 felixhummel joined #salt
19:01 SpeeR joined #salt
19:02 jeremyBass I'm using the bootstrap.sh via Vagrant atm .. we are just setup up things over here
19:03 UtahDave ok, so you're probably install 0.17.4.   so for now   env=foo
19:03 jeremyBass yeah i just tried saltenv=foo and it just acted as if it was not there..
19:04 ekristen I’m doing “salt-call event.fire_master '{"testtest":"test"}' 'testtest’” but I am not seeing it on the master using the eventlisten.py script
19:04 SpeeR__ joined #salt
19:05 ekristen and I ran that from a minion
19:05 jeremyBass so since some of those states under that env need service states that are in the base '*' .. what would be the appropriate way to  ` - require: - service: mysqld `  where that service.running was in the base?
19:05 SpeeR__ joined #salt
19:08 UtahDave jeremyBass: you can't.  If you specify an environment for the minion in the cli or in the minion's config, then it can only pull sls files from that environment
19:09 mephx joined #salt
19:09 JasonSwindle UtahDave: May of found something
19:09 JasonSwindle unexpected char u'@'
19:09 UtahDave jeremyBass: your top file gives you a lot more flexibility on how you define which minions are in which environments and allow for pulling files from multiple environments
19:10 JasonSwindle but it never told me I had a [CRITICAL]
19:10 UtahDave oh, interesting
19:10 UtahDave ekristen: are you running that as root?
19:10 JasonSwindle UtahDave:  https://gist.github.com/JasonSwindle/7813df6344c7163393c6
19:10 ekristen UtahDave: yeah just figured that out like 2 seconds ago
19:10 ekristen thanks!
19:11 jeremyBass @UtahDave so .. hmm.. what should i do? .. restate the service.running again?  so when i run and it pick env when running the multiple env's? so when i run just the single env it will work too?
19:11 leonardinius joined #salt
19:12 robawt yo team!  Scale12x is still having salt training, right?
19:12 fllr joined #salt
19:12 UtahDave JasonSwindle: Hm. Looks like you need to put that match in quotes.
19:13 UtahDave jeremyBass: yeah, if it makes sense for the same function to work across all environments
19:13 JasonSwindle the  util_compound_string ?
19:13 JasonSwindle Let me play some more
19:13 _fllr_ joined #salt
19:14 UtahDave JasonSwindle: yeah. It looks like it's choking on the @ in your compound_string
19:16 _fllr_ joined #salt
19:16 jeremyBass hmmm .. well in this example i want to make sure that mysqld is running before i add a user .. that user is under the env. .. each env has there own users added.. but the mysqld is runing from the base '*' .. so the best way to do this is to do some state check on the service running on each env but so it's not named the same to avoid an ID conflict with the base?
19:18 UtahDave so have the user state do a require_in on the mysqld state
19:18 jeremyBass yes..  mysql_user.present: - require: - service: mysqld
19:19 jeremyBass or..
19:19 jeremyBass so.. read that as a question
19:19 jeremyBass lol
19:19 Gareth robawt: It's in the works.
19:19 JasonSwindle UtahDave:  It looks like the data did change
19:19 JasonSwindle all of my returns now have [['10.69.245.209']] around them
19:20 vlcn joined #salt
19:21 SpeeR joined #salt
19:22 Mua_ joined #salt
19:22 _fllr_ joined #salt
19:22 jeremyBass @UtahDave so a require_in .. that means that that every time i add an environment to the project, i would have to list it to that service state? .. I'm trying to avoid the base having reference to the environments as those are going to be added and deleted, and the goal is to not have to edit the base all the time
19:23 ekristen UtahDave: does reactor.conf have to point to a local file?
19:23 ekristen UtahDave: or can it point to a gitfs state?
19:23 ekristen UtahDave: nevermind
19:23 UtahDave jeremyBass: no, the require_in allows you to not have to have the mysqld state know anything about any of the other user states
19:24 _fllr_ joined #salt
19:24 Mua__ joined #salt
19:24 UtahDave ekristen: I think it has to be a local file
19:24 guest_bedroom joined #salt
19:24 ekristen UtahDave: yeah I realized that and then realized I didn’t want it to pull from my gitfs anyways
19:25 ekristen now I’m trying to figure out how ot get it to run a specific state, and not highstate
19:25 UtahDave cool. Might be cool to have the option to pull it from gitfs, though
19:25 vlcn JasonSwindle: still around?
19:25 UtahDave ekristen: cmd.state.sls
19:25 mephx joined #salt
19:25 ekristen k, looking that up, thanks
19:26 JasonSwindle vlcn:  I am
19:26 _fllr_ joined #salt
19:26 ekristen UtahDave: so cmd.state.sls: -name <state-name>
19:27 UtahDave yep
19:27 jeremyBass @UtahDave guess I'm not readding the docs right.. http://docs.saltstack.com/ref/states/requisites.html#require-in is it that i would need to get from the base to the single  salt-call state.highstate env=foo .. i need to do something like require_in: '*' so it's not so hardcoded?
19:27 KyleG left #salt
19:27 fllr joined #salt
19:28 ekristen UtahDave: how do I target certain minions? is that the - tgt: ‘*appnode*'
19:28 vlcn JasonSwindle, thanks again for the example.  Can you explain how I would go about removing the brackets from the values I get here?  https://gist.github.com/kelchm/af7ad6b98365a141ba40
19:28 UtahDave ekristen: yes, exactly
19:28 JasonSwindle vlcn:  Let me look
19:28 JasonSwindle I just fixed that
19:29 UtahDave jeremyBass: can you pastebin a sanitized copy of your top.sls, mysql sls and user sls?
19:29 ekristen UtahDave: I ask cause I don’t see docs, or am not using the right keywords, — I take it I can do - match: grain or compound indented underneath that to do some better matching?
19:29 JasonSwindle vlcn:  .values().pop().pop()
19:29 JasonSwindle vlcn:  Are you RC1?
19:29 robawt Gareth: awesome thanks
19:29 vlcn JasonSwindle: nope.   0.17.4
19:30 vlcn thanks :)
19:30 robawt also Gareth, great job on the FLOSS weekly episode for Scale.  I know you're regularly co-hosting but I liked that episode very much
19:30 UtahDave ekristen: yes, I think so
19:30 JasonSwindle Ok
19:30 JasonSwindle vlcn:  the .pop().pop() will do it :)
19:30 * robawt highfives UtahDave
19:31 * UtahDave actually responds in time to not leave robawt hanging!
19:31 UtahDave hey!
19:32 jeremyBass @UtahDave I don't think i can pastbin in something that is going to repersent what is going on .. it's two repos .. that https://github.com/jeremyBass/WSU-serverbase-centos/tree/master/provision/salt  is run but in the minions/vagrant.conf  you'd see that it's running the secound folder which is here https://github.com/jeremyBass/WSUMAGE-base/tree/master/provision/salt ..
19:32 JasonSwindle UtahDave:  I think I have to add .pop().pop() to all of my magic <_<
19:33 JasonSwindle UtahDave:  going from 0.16.x to RC1 has been……..fun.......
19:33 jeremyBass the short of it is that there are two top files so that i could load as many as needed for that instance with out hard coding one big repo
19:34 UtahDave lol, JasonSwindle. I'm sorry, I find that kind of sadly funny.  Have you opened an issue on that?  That kind of a change shouldn't have happened without a VERY good reason.
19:36 fllr joined #salt
19:37 forresta JasonSwindle, is a spammer on the issues list so I'm sure he has :P
19:38 JasonSwindle forresta:  :P
19:38 JasonSwindle UtahDave:  Now that I have nailed down the root issue, I will now.
19:38 bemehow joined #salt
19:39 robawt haha UtahDave
19:39 jeremyBass everything runs fine, well except the https://github.com/saltstack/salt/issues/9856 i ran into.. but it's when i try to call the env on it's own that i lose some of the requires.. that left me wounding how i could gain the service.running state with out need for redeclaring it
19:40 JasonSwindle UtahDave:  It also looks like that change happened in 0.17.x
19:40 _fllr_ joined #salt
19:40 JasonSwindle So, is it really an issue if it has been around that long?
19:40 leonardinius \clear
19:41 JasonSwindle Or is value().pop().pop() what SaltStack wantsi?
19:41 JasonSwindle vlcn:  Did that help? :)
19:41 vlcn JasonSwindle: indeed :)
19:41 JasonSwindle vlcn:  As you can see, I am not sure if it should be like that but it works like that.
19:42 JasonSwindle in 0.16.x you just needed .value()
19:42 JasonSwindle now pop op
19:42 JasonSwindle *pop
19:42 vlcn ah
19:42 leonardinius \clear
19:42 Gareth robawt: thanks :)  That was definitely one of the weirdest shows I've done.
19:44 hunter joined #salt
19:44 fllr joined #salt
19:45 hunter coworker just asked me - is there a mechanism in salt that records the history of applied changes? He's thinking of something like the "yum history" command.
19:45 UtahDave hunter: yeah, look in the job caceh
19:45 UtahDave er, cache
19:45 JasonSwindle UtahDave:  Would you say that is a Publish.publish data structure change?
19:46 pass_by_value joined #salt
19:46 JasonSwindle or should I just refactor? :)
19:46 UtahDave JasonSwindle: Yeah, I think so.  It's probably just someone changed which level a data structure was returned upstream.
19:46 hunter UtahDave: I'm very new to salt - how would I do that? Is there salt command to barf that out for a given client?
19:46 UtahDave It's probably a simple fix
19:47 UtahDave hunter: http://docs.saltstack.com/ref/runners/all/salt.runners.jobs.html#module-salt.runners.jobs
19:47 UtahDave those should do it for you
19:47 hunter Thank you - I'll ready that in a second
19:47 JasonSwindle UtahDave:  making issue now.
19:48 JasonSwindle forresta:  No sass from you. :)
19:48 UtahDave jeremyBass: Hey, so why are you matching on the environment grain in your top.sls?
19:51 n8n joined #salt
19:51 fllr joined #salt
19:51 JasonSwindle UtahDave and forresta https://github.com/saltstack/salt/issues/9857 Done
19:51 jeremyBass @UtahDave if i understand your Q, so that it doesn't skip over it, using base cause it not to be run .. i think i may have a work around here http://pastebin.com/qWBVUBuv .. not pretty.. and need to fine the doc ref for {%- set env = env_keyword %} .. but well it's a thought
19:51 SpeeR joined #salt
19:52 Ryan_Lane2 joined #salt
19:52 jankowiak joined #salt
19:52 jeremyBass @UtahDave . are you ref'in https://github.com/jeremyBass/WSUMAGE-base/blob/master/provision/salt/top.sls ?
19:53 SpeeR_ joined #salt
19:55 SpeeR joined #salt
19:55 yomilk joined #salt
19:57 SpeeR joined #salt
19:58 mephx joined #salt
19:58 UtahDave jeremyBass: yeah, and here: https://github.com/jeremyBass/WSU-serverbase-centos/blob/master/provision/salt/top.sls
19:59 SpeeR_ joined #salt
20:00 SpeeR__ joined #salt
20:02 SpeeR joined #salt
20:02 jeremyBass @UtahDave yes.. so that was done becuse the first top file was never run unless i used the store.wsu.edu: .. because there is two folders, keeping all the of the files for server from all of the web app apart (ie: two repos that don't get cloned in over each other).  In short it was how i was able to get them to run while keeping with the need to not hav everything in one folder..
20:02 fllr joined #salt
20:03 ekristen how can I debug a reactor and whether it is running or not?
20:03 jeremyBass when you start up the project.. the serverbase, it can run on it's own.. but if you want to bring in one or two apps, you put them in a folder that is off to the side.. and they get picked up ..
20:04 SpeeR_ joined #salt
20:04 jeremyBass this keeps the two from being mixed in one folder, maintaining the two repos.. and it runs fine in total.. but doing that salt-call state.highstate env=store.wsu.edu .. it does call up fine, just that there is none of the base service states ..
20:05 jeremyBass there is going to be like 5-15 web apps, and tons of sites, and I didn't want one massive repo that would be in flex all the time
20:06 SpeeR__ joined #salt
20:06 JasonSwindle left #salt
20:06 andrej I have 36 Ubuntu minions atm, and 7 centos ones.
20:06 JasonSwindle joined #salt
20:06 andrej when I run e.g. salt -G 'os:Ubuntu' state.sls nagios-nrpe I get 7 (!!) responses, not 36
20:07 andrej if I address ones that didn't do it individually it seems to work
20:07 andrej what am I doing wrong?
20:07 vlcn andrej: did you try changing the timeout?
20:08 SpeeR__ joined #salt
20:08 cnelsonsic joined #salt
20:08 kalloc_ joined #salt
20:08 andrej Nope - is that a minion or master thing?
20:09 vlcn master, you can just add something like -t 60 as an argument
20:09 vlcn you can also change the default in the master configuration
20:09 SpeeR joined #salt
20:10 andrej running a -t 60 now ...
20:10 Ryan_Lane21 joined #salt
20:11 rojem joined #salt
20:11 ekristen how do you do a multi-conditional if statement in jinja
20:11 SpeeR_ joined #salt
20:11 rojem joined #salt
20:12 delkins {% if .. and .. %}
20:12 hunter For managed files is it possible to use a set of default owner/group/mode?  (root:root:644)
20:13 hunter I hate specifing that in every file stanza
20:13 ekristen delkins: ok thanks, that is what I thought, trying to debug why my reactor state isn’t working
20:13 SpeeR joined #salt
20:13 andrej Hmmm ... that seems to have worked.
20:13 andrej thanks vlcn
20:13 yomilk joined #salt
20:13 jenyaam joined #salt
20:13 vlcn andrej, no problem, that tripped me up a few days ago.
20:14 nocturn joined #salt
20:14 delkins hunter: could put the default into a pillar and use that
20:15 SpeeR__ joined #salt
20:15 hunter delkins: wouldn't I still have to specifcy the default from the pillar in each stanza?
20:16 hunter mode: {pillar data} 300 times isn't any better than mode: 644 300 times.
20:16 delkins but easier to change if you are not afraid of perl -pie
20:16 SpeeR joined #salt
20:17 jeremyBass ok.. I'm so not finding how to get the environment in the jnija temp .. something like {%- set env = config.get('environment') %} .. well i know that doesn't work.. but.. something like thta
20:18 martoss joined #salt
20:18 hunter Its issue 6405. Dangit.
20:18 jeremyBass oh.. wait
20:18 jeremyBass {{ env }}
20:18 hunter delkins: I don't see how that helps at all.
20:19 jeremyBass that would just be there right?
20:19 jeremyBass http://salt.readthedocs.org/en/latest/ref/states/vars.html
20:19 jeremyBass yeps .. seems to
20:20 hunter Is there a .... not even sure what I need here. I guess a state for managing code built from git repos. So if the git repo changes salt knows to do a pull and rebuild?
20:20 hunter Why do I feel dirty even asking that question?
20:21 JasonSwindle You can do a watch
20:21 Tropolis left #salt
20:21 ekristen anyone have an example of how to use cmd.state.sls in a reactor state?
20:21 strgcloud joined #salt
20:21 kermit joined #salt
20:21 yawniek joined #salt
20:22 bemehow joined #salt
20:22 delkins can use git.latest and have your rebuild commands watch_in
20:24 pdayton1 joined #salt
20:24 jeremyBass ok .. that worked.. http://pastebin.com/FX5Bjp5j .. lets me salt-call state.highstate env=store.wsu.edu needed.. .. little hacky needing to redeclare the service.running .. but then when i run the whole thing it works, and when i run just the `salt-call state.highstate env=store.wsu.edu` it also works..
20:24 tucker joined #salt
20:30 felixhummel joined #salt
20:33 leonardinius Hi all, I need to do initial PostgeSQL database population (restore from backup) during instance provisioning. What are the recommended / idiomatic salt options to achieve this?
20:34 pdayton joined #salt
20:35 pdayton joined #salt
20:36 RazaR joined #salt
20:39 kalloc joined #salt
20:40 davet1 joined #salt
20:40 pdayton joined #salt
20:41 ndrei joined #salt
20:41 abe_music did something happen to the pkg.installed state?
20:41 abe_music i'm getting errors like: The following package(s) were not found, and no possible matches were found in the package db: unzip
20:44 religion joined #salt
20:45 fllr joined #salt
20:45 abe_music oh...hmm, salt-minion is now running the repoquery command prior to installing?
20:45 abe_music stderr: /bin/bash: repoquery: command not found
20:47 Ryan_Lane2 joined #salt
20:48 rawzone joined #salt
20:49 Ryan_Lane21 joined #salt
20:49 jeremyBass @UtahDave in case it would make what is going i did sort of update the web app example repo .. https://github.com/jeremyBass/WSUMAGE-base .. sure your busy, but thought I'd share that .. the goal is that there will be many of those repos.. but that server base, there is just the one.. you can mix and match the web apps as needed, but not have to dump things all in one repo.. just thought I'd share that info that may clear it up some
20:53 leonardinius Hi all, I need to do initial PostgeSQL database population (restore from backup) during instance provisioning. What are the recommended / idiomatic salt options to achieve this?
20:53 cewood joined #salt
20:54 funzo joined #salt
20:55 forresta leonardinius, can you use the template option specified here: http://docs.saltstack.com/ref/states/all/salt.states.postgres_database.html#salt.states.postgres_database.present ?
20:55 forresta with a database that has the appropriate rows/tables?
20:56 forresta I haven't used that before so I'm not super familiar with how it works
20:57 leonardinius forresta, I'm afraid I don't get what template option stands for? is it another db instance to copy data from?
20:57 vlcn is there a way to match node groups when using publish.publish?
20:57 leonardinius might it be on different box?
20:58 forresta leonardinius, I figured it has to do with the template stuff from postgresql: http://www.postgresql.org/docs/8.1/static/manage-ag-templatedbs.html
20:59 forresta vlcn, did you try using -N already and it didn't work?
21:01 vlcn forresta: I mean matching for tgt, not the system it's actually run from.
21:01 vlcn http://docs.saltstack.com/ref/modules/all/salt.modules.publish.html
21:01 forresta yea I'm looking at those docs
21:02 vlcn https://github.com/saltstack/salt/issues/3529
21:02 vlcn this seems to indicate that it was implemented
21:02 forresta right so did you try it already?
21:02 forresta and it didn't work?
21:02 vlcn yes
21:02 forresta was the output an error?
21:03 forresta or what did your command look like?
21:03 vlcn https://gist.github.com/kelchm/c5d401af0e82fe21410d
21:03 scott_w joined #salt
21:03 leonardinius forresta, thanx. It's something I might consider. Other than  that - no other options to popup up immediately?
21:04 forresta leonardinius, Not that I'm aware of, but I also haven't really messed with that state much, so I don't know.
21:04 forresta seems to me like you'd create the template, then import the database if it was needed.
21:05 leonardinius forresta, I see. Nevertheless thanx a lot, this is helpful.
21:05 forresta np
21:05 forresta vlcn, did you try salt -N srv.nagios.foo.net publish.publish solus.ovzhn.dvs test.ping?
21:06 vlcn that will just treat srv.nagios.foo.net as the node group name
21:07 vlcn IE: Node group serv.nagios.foo.net unavailable in /etc/salt/master
21:07 forresta what's the name of the nodegroup you want to target?
21:07 vlcn solus.ovzhn.dvs
21:10 yomilk joined #salt
21:11 forresta Did you try salt serv.nagios.foo.net publish.publish -N node_group test.ping ?
21:12 vlcn forresta: that doesn't work either.
21:12 forresta what does it return?
21:13 vlcn Node group serv.nagios.foo.net unavailable in /etc/salt/master
21:13 forresta huh
21:15 UtahDave cool. thanks jeremyBass
21:16 vlcn UtahDave: any idea on the issue I was just discussing?
21:27 bretep Has anyone run a salt-master in a docker container?
21:27 yomilk joined #salt
21:28 yomilk joined #salt
21:29 Ryan_Lane2 joined #salt
21:30 alunduil joined #salt
21:34 UtahDave vlcn:    salt -N <nodegroup name defined in Salt Master config> test.ping
21:35 UtahDave Oh, you're trying to do it over publish.publish.
21:35 jeremyBass @UtahDave yeps.. the whole thing is still in flux and we are trying to work out the best way to manage eveything that is and will be but that is one style I've been trying to get out.. if there is any feedback or refinements notes I'm totally open ..
21:35 vlcn UtahDave: yep :)
21:35 forresta UtahDave, yea we are trying to see how to use a node group for the target, not the initial item
21:35 forresta -N doesn't work though
21:35 vlcn I wouldn't have expected -N to work, but this seems to indicate that this was something that was fixed previously: https://github.com/saltstack/salt/issues/3529
21:36 UtahDave vlcn: Can you target with the nodegroup from the master?
21:36 vlcn UtahDave: yeah the node group works correctly from the master
21:36 UtahDave ok, good
21:36 abe_music UtahDave, forresta: when y'all get a chance can you look at this and tell me i'm dumb? https://gist.github.com/abemusic/8529485
21:36 UtahDave try putting the nodegroup in single quotes
21:37 vlcn UtahDave: tried it both ways already
21:37 UtahDave vlcn: what version of salt are you using?
21:37 vlcn 0.17.4
21:37 UtahDave abe_music: does it work if you don't change the package provider?
21:38 strgcloud joined #salt
21:38 abe_music UtahDave: hmm, didn't know you could control that in a state
21:38 jpcw joined #salt
21:39 abe_music UtahDave: this works: salt foo-nn yumpkg5.install wget
21:40 abe_music note that i am using a slightly out-of-date develop branch...i updated earlier and it was also not working, but was attempting to execute repoquery during the install and my machine didn't have that installed automatically
21:40 leonardinius bretep, no. but there seems to be some sort of support available in hte form of http://docs.saltstack.com/ref/states/all/salt.states.dockerio.html
21:40 kalloc joined #salt
21:41 bhosmer joined #salt
21:42 bretep leonardinius: Thanks.
21:44 jeremyBass so is there any way to get around https://github.com/saltstack/salt/issues/9856 .. ? i keep hitting it regardless of if i hard code the values or use the variables .. it always has the same error of that a 'bool' object is not iterable
21:47 ndrei joined #salt
21:48 zooz joined #salt
21:51 jeremyBass every try ends up with something like http://pastebin.com/Zq54mDCG .. i get `mysql_user.present - Result: True` and `mysql_database.present - Result: True` but mysql_grants is just not working..
21:51 ndrei joined #salt
21:52 ndrei joined #salt
21:52 Koma joined #salt
21:52 UtahDave abe_music: no, don't every call ympkg5 directly.
21:53 abe_music UtahDave: k :)
21:54 ndrei joined #salt
21:56 david_a joined #salt
21:57 Ryan_Lane2 joined #salt
21:58 KyleG joined #salt
21:58 bhosmer joined #salt
22:00 Gareth 16
22:00 Gareth damnit
22:00 Gareth :)
22:01 jeddi joined #salt
22:01 abe_music @UtahDave: updating to a newer version of develop branch, and running the same state i get https://gist.github.com/abemusic/8530085
22:01 ioni joined #salt
22:02 vlcn with ninja, how do I see what the names of the attributes are?
22:03 vlcn jinja**
22:03 abe_music @UtahDave - manually installing yumutils and rerunning the state works, but it does dump a ton of stuff into the minion log. probably because of the repoquery command
22:03 jeremyBass ok .. so i think i solve the issue i showed here http://pastebin.com/Zq54mDCG.. like this https://github.com/saltstack/salt/issues/9856#issuecomment-32801312 .. guess just fyi since i posted the question here..
22:06 UtahDave abe_music: what os are you on?
22:06 abe_music centos 6.4
22:06 UtahDave what do you get when you run    yum search wget   from the cli?
22:07 abe_music UtahDave: get the standard output for the wget package
22:07 abe_music wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols
22:09 mgw can the python render be used for file.managed files?
22:09 mgw *renderer
22:10 UtahDave mgw: yep, any renderer
22:10 forresta abe_music, what release of salt is that on?
22:11 abe_music forresta: develop branch :-D
22:11 mgw UtahDave: hmm, docs say just jinja, mako, and wempy
22:12 UtahDave mgw: I would be surprised if    - template: python   or -template: py   didn't work
22:12 mgw UtahDave: what is #!py file.managed supposed to look like? run() and return a string?
22:12 terminalmage abe_music: update your checkout
22:13 terminalmage that keyerror was fixed
22:13 terminalmage oh wait, I see you already updated, on sec
22:13 UtahDave mgw: no, it needs to return a python dictionary
22:13 terminalmage *one sec
22:13 UtahDave http://docs.saltstack.com/ref/renderers/index.html
22:13 terminalmage abe_music: you are missing repoquery, you need to install yum-utils
22:14 terminalmage it's a requirement for yum package management
22:14 abe_music terminalmage: right, yeah that works, but how do i get that on to the base centos AMI without salt? :)
22:14 abe_music i mean i can rebuild our base AMI, but repoquery just became a problem with the newer salt code
22:14 UtahDave mgw: http://docs.saltstack.com/ref/renderers/all/salt.renderers.py.html
22:15 terminalmage abe_music: define new... I think it's been required since at least 0.16.x
22:15 mgw UtahDave: yeah, but that is returning an sls type structure
22:15 mgw config['x']; return config
22:15 terminalmage abe_music: I'll look into working around this
22:15 mgw I'm doing some tests
22:15 UtahDave mgw: ah, gotcha.  And you're wanting template a config file or something
22:16 abe_music terminalmage: really? i haven't had any particular issue install packages on centos and i'm pretty sure we're using the same AMI
22:16 terminalmage abe_music: perhaps it was new in 0.17.0
22:17 mgw UtahDave: exactly
22:17 terminalmage abe_music: it has been a dependency of salt for a while... how are you installing salt?
22:17 terminalmage abe_music: via salt-cloud?
22:17 abe_music salt-cloud and bootstrap
22:17 abe_music yeah
22:17 mgw Maybe there's an easier way… I want to dump a whole pillar dict as yaml
22:17 abe_music terminalmage ^^
22:18 terminalmage abe_music: ok, I'll ping s0undt3ch
22:18 mgw so I was going to use py renderer to use yaml.dump
22:18 mgw to dump from __pillar__
22:18 terminalmage I'm pretty sure he added yum-utils to the bootstrap script
22:18 UtahDave mgw: salt 'minion_name' pillar.items --out yaml
22:18 terminalmage abe_music: how long has it been since you grabbed a copy of the bootstrap script?
22:18 ndrei joined #salt
22:18 kermit joined #salt
22:18 forresta terminalmage, yea yum-utils is part of the bootstrap
22:19 mgw hmm, so I could call that with {{ salt['pillar.items'](out='yaml') }}
22:19 abe_music terminalmage: it comes with salt, right? meaning if i clone from develop branch i should get the latest bootstrap? or do i need to manually grab the latest?
22:20 forresta the bootstrap is not part of the main salt repo last time I checked abe_music
22:20 Mua joined #salt
22:20 terminalmage hmmm, I'm not sure what salt-cloud does then...
22:20 forresta salt-cloud should be using the bootstrap :\
22:20 Ryan_Lane21 joined #salt
22:21 terminalmage forresta: yeah but does it grab the latest?
22:21 terminalmage I am not sure
22:22 forresta terminalmage, no I am pretty sure it uses stable, which doesn't have the yum-utils
22:22 terminalmage ahhhhh
22:22 terminalmage forresta: yeah you are correct
22:22 terminalmage I'll ping pedro
22:22 forresta woooooo
22:23 forresta I don't know when he plans to do the next merge from develop -> stable
22:23 forresta https://github.com/saltstack/salt-bootstrap/issues/69 is still open, I really need to look into why that isn't happening but I keep forgetting.
22:24 UtahDave salt-cloud does use salt-bootstrap
22:24 UtahDave salt-cloud -u will update you to the latest bootstrap
22:24 forresta UtahDave, from the develop branch though?
22:24 forresta ahh yea I see it on the man page
22:25 forresta latest unstable release, cool
22:25 terminalmage abe_music: I just sent a message to the guy that manages salt-bootstrap
22:25 abe_music UtahDave, forresta, terminalmage : yeah, looking at my bootstrap it doesn't install yum-utils....but for a long time i've been running fine without the repoquery issue. not a big deal, i'll grab the latest and drop it in my cloud.deploy.d
22:25 terminalmage we should be able to get a new stable release that contains the yum-utils stuff
22:25 abe_music terminalmage: cool, thanks
22:25 terminalmage might take a few hours though ;)
22:25 forresta abe_music, cool, you saw UtahDave's message regarding -u right?
22:25 * abe_music makes mental note to remove that manual copy of bootstrap :)
22:26 forresta mental notes? The worst kind of note!
22:26 abe_music forresta: yup, i'll try the -u out
22:26 forresta cool
22:26 terminalmage abe_music: in the meantime, try using salt minion-id cmd.run 'yum -y install yum-utils'
22:26 terminalmage but you'll still need to restart the minion
22:26 terminalmage and salt has issues restarting the salt-minion service, because the communication gets interrupted
22:27 terminalmage hrm
22:27 abe_music no worries...using throw away machines so i'll get them re-bootstrapped
22:27 abe_music if i have to i'll pre-install yum-utils, just thought i had a bug in my environment or something
22:28 ndrei joined #salt
22:29 abe_music forresta: salt-cloud -u pulled the latest stabile release of bootstrap, confirmed it does not install the yum-utils package
22:29 forresta it pulled the latest stable?? Hmm the man page says otherwise
22:29 forresta that's a bummer
22:30 abe_music no problem...i'll grab the latest develop bootstrap and pop it in my cloud.deploy.d. should work :)
22:30 forresta might need to open an issue on that as well on the main salt repo if one doesn't exist
22:32 forresta for -u not pulling the unstable
22:35 jfzhu_us joined #salt
22:36 JasonSwindle forresta:  Care to take a stab at https://github.com/saltstack/salt/issues/9857 ?
22:36 JasonSwindle Or UtahDave
22:36 JasonSwindle My issue get's odder
22:36 JasonSwindle data structure change, and highstate madness
22:38 JasonSwindle Maybe network.ip_addrs changed?  I am not sure if publish.publish is to blame
22:39 kalloc joined #salt
22:39 forresta JasonSwindle, I think you should start by querying those items to see if there is a difference in the data structure between 0.16 and RC1, then you can narrow it down to whether it's publish.publish or not. Seems to me like the fact that it's basically two lists deep seems odd.
22:39 forresta and I don't see how publish.publish would be generating content like that you know?
22:41 ndrei joined #salt
22:44 yomilk joined #salt
22:45 abe_music forresta: grabbing develop branch salt-bootstrap worked
22:46 forresta abe_music, cool
22:46 JasonSwindle forresta:  You and Thomas had the same idea
22:46 forresta was that comment there before I said something in the IRC? I didn't see it...
22:47 ajw0100 joined #salt
22:58 hunter joined #salt
22:58 yaru22_ joined #salt
22:58 ndrei joined #salt
23:00 mgw UtahDave: py renderer works for file.managed (run should return a string), but the magic dicts (pillar, salt, etc0 are without __
23:01 UtahDave ah, cool, mgw.  I was pretty sure it would work.  Thanks for reporting back on that!
23:01 UtahDave We should update the docs to reflect that.
23:05 scott_w joined #salt
23:05 scott_w_ joined #salt
23:11 ConceitedCode joined #salt
23:13 abe_music UtahDave, forresta: did the requisite syntax recently change? "Invalid requisite type 'service.running' in state 'hbase-master', in SLS 'cdh4.hbase.master'. Requisite types must not contain dots, did you mean 'service'?"
23:14 UtahDave abe_music:    - require:\n  - service: <id dec or name>
23:14 abe_music UtahDave: ok...but before 'service.running' worked. just curious if that was an intended change or maybe a bug
23:15 abe_music as well as 'pkg.installed'
23:15 UtahDave I don't think those ever worked. I think an update now notifies you if they're not correct.
23:16 forresta abe_music, I've never seen require: - service.running:
23:16 abe_music seriously? haha...i'm going crazy then. i know i've seen that before somewhere and not just my SLS :)
23:16 forresta abe_music, there were a couple occurrences previously where there wasn't error reporting for a few items, I wonder if that was one of them..
23:16 abe_music forresta: ok no worries...i'll fix my SLS
23:16 forresta cool
23:17 mgw UtahDave: yeah, I opened a ticket (#9861)
23:17 UtahDave cool, thanks, mgw!
23:17 leonardinius joined #salt
23:17 vlcn So I have one new minion that is not cooperating at all.  When running the high state I just get 'No Top file or external nodes data matches found'
23:18 vlcn any ideas what would cause that?  This is the first issue I've had after setting up several hundred
23:20 vlcn ohhhh, I know exactly why now.  disregard.
23:21 Gifflen joined #salt
23:33 JasonSwindle joined #salt
23:36 alunduil joined #salt
23:39 kalloc joined #salt
23:40 Gifflen joined #salt
23:41 ndrei joined #salt
23:51 DerekRBN joined #salt
23:51 Veticus joined #salt
23:53 elfixit joined #salt
23:56 helderco joined #salt

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