Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-06-08

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

All times shown according to UTC.

Time Nick Message
00:01 rhand joined #salt
00:02 iggy he's not idling in here now :/
00:02 iggy idler status revoked
00:02 flowstate joined #salt
00:10 edrocks joined #salt
00:11 dendazen joined #salt
00:18 dyasny joined #salt
00:26 flowstate joined #salt
00:28 Muchoz joined #salt
00:29 aharvey joined #salt
00:31 subsignal joined #salt
00:32 woodtablet bltmiller: i think its because the salt guys are in Utah, and I think is CST, so it might be quitting for them
00:33 woodtablet bltmiller: i might message you for the answer he gives you tomorrow, i have to go home and disconnect my laptop from the irc channel =(
00:35 woodtablet left #salt
00:36 iggy utah is mountain time
00:39 ninkotech joined #salt
00:47 shoemonkey joined #salt
00:48 snc joined #salt
00:56 stooj Hi - I have a custom service that I'd like to manage, but I'm not sure if I can require a file.
00:56 stooj Would this work? https://gist.github.com/stooj/51fbb457756fc1d592af2c0494c04838
00:58 flowstate joined #salt
01:01 rgrinberg joined #salt
01:02 flowstate joined #salt
01:03 nha joined #salt
01:05 subsignal joined #salt
01:05 catpiggest joined #salt
01:10 xiucai joined #salt
01:12 flowstate joined #salt
01:13 ahammond I'm using salt-cloud to spin up Ubuntu 14.04 images and getting salt 2015.8.10 on them. I need 2016.3. What am I doing wrong?
01:17 shadowbeast joined #salt
01:18 sarlalian joined #salt
01:26 djgerm joined #salt
01:27 djgerm hi hello! I have a pretty straight forward question: are there best practices for using the /etc/salt/master vs /etc/salt/master.d/ for config?
01:27 djgerm and are they documented?
01:34 ahammond I needed to update salt-bootstrap with salt-cloud -u. Sigh.
01:34 djgerm that bit me recently too!
01:35 ahammond djgerm it's like any other config file / conf.d approach.
01:35 ahammond djgerm My approach is to put related stuff into a single file and keep /etc/salt/master to an absolute minimum.
01:36 djgerm right. that's what I've been doing so far, especially after being taken to task by the salt contractors who were checking out my configs many moons ago
01:36 djgerm but someone in my organization has been really critical of the practice
01:36 djgerm and… I cant really tell why
01:37 cyborg-one joined #salt
01:39 toddnni_ joined #salt
01:39 ahammond djgerm they haven't dealt with managing configs much? The classic case where conf.d approach saves my bacon is when I have something like sudoers and have to grant very specific sudo privs for daemons. You sure don't want to be editing a file, you want to simply be dropping one more file into a directory.
01:41 shoemonkey joined #salt
01:46 fannet joined #salt
01:46 tomasfejfar joined #salt
01:46 djgerm heh, yeah that's probably it ahammond
01:46 djgerm i certainly can't think of any value of having a monolithic master config vs. discreet related files…
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.0 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:52 rgrinberg left #salt
01:52 ldelossa joined #salt
01:53 ldelossa Hey guys quick question, I have a custom grain that I use in a Master\client model. I'm wondering if I can use this the same way in a masterless setup
01:53 ldelossa placing it in the same place it would be on the salt server
01:56 ahammond ldelossa probably? depends what your custom grain does. if it's just yaml, then of course it should work the same. if it's a #py grain, well... that's a lot more context sensitive.
01:59 flowstate joined #salt
02:01 ahammond is there a way to add a custom command to the salt-bootstrap called by salt-cloud? Specifically, I need to apt-get install python-futures
02:03 tawm04 joined #salt
02:04 ldelossa The grain is a custom grain written in python
02:04 ldelossa it returns a dictionary
02:04 ldelossa it's in /srv/salt/_grains
02:04 ldelossa can I apply that on the host machine without a master?
02:04 iceyao joined #salt
02:06 nebuchadnezzar joined #salt
02:06 k_sze[work] joined #salt
02:07 nyx joined #salt
02:13 shoemonkey joined #salt
02:14 ahammond ldelossa yeah, that should work
02:15 ldelossa Hmm
02:15 ldelossa not working for me
02:19 Score_Under joined #salt
02:19 ldelossa @shammond got it!
02:19 ldelossa placed it in the dist-packages
02:19 ldelossa works for me man
02:22 writtenoff joined #salt
02:29 iceyao joined #salt
02:31 iceyao_ joined #salt
02:36 justanot1eruser joined #salt
02:43 mapu joined #salt
02:49 nmadhok joined #salt
02:53 subsignal joined #salt
02:54 Ayo joined #salt
02:58 anotherZero joined #salt
03:00 evle joined #salt
03:03 flowstate joined #salt
03:05 noraatepernos http://pastie.org/10868693 It seems like this file isn’t even being parsed.  I see no errors at all.  It’s my deployment.sls that just reads from pillars and adds deployment keys for github and bitbucket.
03:05 noraatepernos In my minion’s debug output there’s no reference to it.  I wonder if it’s being treated like an empty file?
03:07 noraatepernos Oh… Results of YAML rendering: {}
03:07 noraatepernos oops
03:13 om joined #salt
03:13 om2 joined #salt
03:15 guardianJ_ joined #salt
03:31 shoemonkey joined #salt
03:31 racooper joined #salt
03:32 fannet joined #salt
03:38 protoz joined #salt
03:39 edrocks joined #salt
03:54 nmadhok joined #salt
04:01 adelcast joined #salt
04:03 flowstate joined #salt
04:14 stooj Can you require a directory in an sls file?
04:15 josuebrunel joined #salt
04:24 armyriad joined #salt
04:44 Shirkdog joined #salt
04:54 adelcast joined #salt
04:56 nmadhok joined #salt
04:57 honestly Sure, but it'll actually require the init.sls in that directory
04:59 babilen Or (different interpretation): Use "require: file: name-of-file.directory-state"
05:01 lompik joined #salt
05:02 flowstate joined #salt
05:14 tomasfejfar joined #salt
05:19 zer0def uh, can someone explain to me why in the hell is `ini_manage` so horridly broken in 2016.3.0? i thought the pythonic ConfigParser was enough to handle it.
05:20 fannet joined #salt
05:20 zer0def it does some arbitrary checks on whether the ini file exists, which it doesn't have to; not to mention it's typical copy-paste code
05:21 manji joined #salt
05:22 sauvin joined #salt
05:23 adelcast joined #salt
05:23 anmol joined #salt
05:31 rdas joined #salt
05:32 zer0def actually, i'll take it back, it's broken from before 2016.3.0, but i only just noticed it
05:36 adelcast joined #salt
05:38 honestly Vast swathes of salt have clueless-consultant-tol-to-just-make-it-work levels of code quality
05:38 honestly That might be the reason :)
05:47 johje349 joined #salt
05:48 ajw0100 joined #salt
05:51 kshlm joined #salt
05:56 zer0def ok, i'll just go back on my taking it back and it is broken as of 2016.3.0 compared to 2015.8.10, but i haven't looked into why yet, since i just want to get my stuff together first ;)
05:57 krymzon joined #salt
05:57 nmadhok1 joined #salt
06:01 manji joined #salt
06:05 yuhlw joined #salt
06:14 nmadhok joined #salt
06:14 pfallenop joined #salt
06:21 om joined #salt
06:21 om2 joined #salt
06:24 kshlm joined #salt
06:27 Ayo joined #salt
06:27 stx``` joined #salt
06:38 Deliant joined #salt
06:40 kawa2014 joined #salt
06:44 om2 joined #salt
06:45 om3 joined #salt
06:46 om3 left #salt
06:48 nmadhok1 joined #salt
06:49 dmaiocchi joined #salt
06:50 fredvd joined #salt
06:51 nmadhok joined #salt
06:57 dmaiocchi joined #salt
07:01 flowstate joined #salt
07:05 duncanmv joined #salt
07:05 felskrone joined #salt
07:07 nmadhok1 joined #salt
07:08 fracklen joined #salt
07:08 fannet joined #salt
07:10 josuebrunel joined #salt
07:11 deniszh joined #salt
07:18 favadi joined #salt
07:19 linjan joined #salt
07:21 sjorge joined #salt
07:26 sjorge joined #salt
07:26 nmadhok joined #salt
07:31 fracklen joined #salt
07:31 colttt joined #salt
07:33 toanju joined #salt
07:39 slav0nic joined #salt
07:40 sjorge joined #salt
07:40 JohnnyRun joined #salt
07:41 rothsa left #salt
07:42 edrocks joined #salt
07:43 xor216 joined #salt
07:43 lero joined #salt
07:45 manji joined #salt
07:54 flavio joined #salt
07:55 flavio hello, I'm having a hard time understanding how I can run salt orchestrate using salt-ssh. According to the doc it should work (https://docs.saltstack.com/en/develop/topics/orchestrate/orchestrate_runner.html)
07:55 flavio do you have any idea?
07:59 tomasfejfar joined #salt
07:59 duncanmv joined #salt
07:59 dmaiocchi joined #salt
08:01 flowstate joined #salt
08:03 Sylvain31 joined #salt
08:05 rim-k joined #salt
08:06 t0m0 joined #salt
08:06 Sylvain31 /
08:06 manji joined #salt
08:07 om joined #salt
08:08 mikecmpbll joined #salt
08:08 om2 joined #salt
08:08 om3 joined #salt
08:10 om3 left #salt
08:11 dmaiocchi joined #salt
08:14 VSpike There's nothing in the Salt formula for salting a master that does a winrepo.update_git_repos ... I just got caught out by that, wondering why the heck none of my Windows systems would work
08:16 GreatSnoopy joined #salt
08:21 colttt joined #salt
08:23 s_kunk joined #salt
08:26 toanju joined #salt
08:28 rim-k joined #salt
08:28 dmaiocchi joined #salt
08:29 johnsonp joined #salt
08:31 johnsonp Hi - I'm trying to get salt running on FreeBSD 10.3 in a 2012R2 Hyper-V VM - I've installed from FreeBSD packages, but everytime I start salt-master the VM crashes and reboots - has anyone any experience running salt on this architecture?
08:32 johnsonp Should have said FreeBSD VM running on Hyper-V!
08:35 guardianJ joined #salt
08:36 babilen johnsonp: https://github.com/saltstack/salt/issues/33807
08:36 saltstackbot [#33807]title: salt 2016.3.0 will not start on FreeBSD | ### Description of Issue/Question...
08:37 babilen johnsonp: Oh, VM crashes and reboots is a tad more severe
08:37 babilen Quite the feat .. /me congratulates salt-master
08:38 guardianJ left #salt
08:41 johnsonp The packagae isn't the latest version, though, so maybe I should try using the saltstack package repo
08:42 johnsonp I think FreeBSD has 2015.8
08:46 josuebrunel joined #salt
08:55 ajw0100 joined #salt
08:55 jab416171 joined #salt
08:56 punkoivan joined #salt
08:56 west575 joined #salt
08:57 fannet joined #salt
08:58 kshlm joined #salt
08:59 rsanting joined #salt
09:01 impi joined #salt
09:07 totte joined #salt
09:07 tomasfejfar clear
09:09 wendall911 joined #salt
09:09 tomasfejfar joined #salt
09:10 om2 joined #salt
09:10 tomasfejfar Anyone know of workaround for gitfs bug from https://github.com/saltstack/salt/issues/30100 pls?
09:10 saltstackbot [#30100]title: Masterless gitfs performance | When using masterless salt with the gitfs fileserver I observed that performance was scaling with the number of sls files * number of git repos configured in my minion config. With 12 state files and 13 pillar files and 9 git repos a noop highstate run was taking ~3 minutes to complete....
09:11 Guest53386 joined #salt
09:11 duncanmv joined #salt
09:12 av_ joined #salt
09:14 om3 joined #salt
09:15 babilen tomasfejfar: The workaround seems to be "clone repos locally" AFAICT
09:15 johnsonp Using the latest package 2016.3 seems to work OK
09:18 babilen johnsonp: So you can't reproduce the bug I mentioned above? I also find it quite disconcerting that salt-master managed to crash your VM
09:22 anmol joined #salt
09:23 fannet joined #salt
09:24 fannet_ joined #salt
09:25 johnsonp It is pretty bad it crashed the VM - I tried recreating the VM about 3 times on that version and it crashed for me every time.  Now it's starting OK, but I am getting a critical error in the master log - Failed to load grains defined in disks.disks in function disks - I'll see if I can research a bit more
09:26 florianb joined #salt
09:27 tomasfejfar babilen: hmmm :( But I can't "just clone" them, can I? They would need to be checked out in the same directory. I practically need to clone + copy them, right?
09:28 florianb hi all o/ - is it possible to include one sls-file over another (excludively) based on success or failure of a preceding state?
09:29 florianb I know i can use onfail for acting exclusively on failure, but i can't find anything acting "onsuccess"..
09:29 florianb I'd appreciate any hint. :)
09:31 babilen tomasfejfar: You could clone them locally and add then to the master config. Essentially using something like https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example#L211
09:31 haarp joined #salt
09:31 babilen tomasfejfar: I don't like that approach and personally much prefer to use GitFS, but I don't run masterless.
09:31 babilen Maybe AndreasLutro could elaborate on their approach in light of this problem
09:32 tomasfejfar babilen: thx I'll try
09:33 haarp hello. i have a pillar that looks like this: http://pastebin.com/raw/m2JmCUrc, now i want to iterate over the keys in a state. {% for key in pillar['ssh_keys'][user] %} does not work. what's the correct syntax to make this work?
09:35 totte joined #salt
09:35 babilen haarp: Why doesn't that work? And are you aware of https://github.com/saltstack-formulas/users-formula and it's ability to manage SSH keys for users (cf. https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example#L44 )
09:35 totte joined #salt
09:41 haarp babilen: hmm, seems the error i am getting stems from the pillar itself. http://pastebin.com/raw/ZyzwNN5S
09:41 haarp the error doesnt make much sense to me
09:42 haarp there is only one pilalr top file
09:44 kshlm joined #salt
09:46 roock joined #salt
09:51 haarp ok, somethings really more broken than it was before. i'll investigate
09:53 iceyao joined #salt
09:55 punkoivan joined #salt
09:58 VSpike Hrm. https://bpaste.net/show/e067dd400a2b ... strange error from a pkg.latest on a Windows system. The state there contains nothing else apart from a pkg.latest state
09:59 VSpike Anyone seen this? I can't even work out where the call to get the $PSVersionTable is coming from, or why it's doing it
10:01 flowstate joined #salt
10:03 xiucai left #salt
10:15 duncanmv joined #salt
10:17 ajw0100 joined #salt
10:18 toanju joined #salt
10:25 manji joined #salt
10:26 VSpike I get a lot of flak from people here about the fact that whenever I upgrade salt stack we seem to get a load of new problems, but sometimes I feel it's pretty hard to defend
10:27 AndreasLutro you get flak for running into bugs?
10:27 VSpike Wonder if there are commercial repos that are stabilised and more thoroughly tested
10:28 AndreasLutro I just never upgrade until I've tested thoroughly in VMs and/or testing environment
10:28 VSpike AndreasLutro: yeah ... because the people in question seem to think that Salt (or possibly configuration management) is more trouble than it's worth and that you should never upgrade unless you absolutely have to
10:30 VSpike AndreasLutro: the problem I found was was that I had ubuntu minions where the version was very out of date. My master was still on 2015.8.10, but I couldn't get that version from apt so the minion had to jump to 2016.3.0. Since that minion is a spare master itself, that meant I had to update the primary master and any minions I wanted to use with them .. and so on
10:31 VSpike The pressure from packaging systems is always forwards, unless you run your own repos AFAICT
10:31 AndreasLutro just use the "archive" repos instead of "latest"
10:31 AndreasLutro http://repo.saltstack.com/apt/ubuntu/ubuntu14/archive/
10:31 kaushal_ joined #salt
10:31 babilen Well, there are repositories for each stable branch (2015.8 / 2016.3 ...)
10:31 AndreasLutro or host your own mirrors
10:32 VSpike Ah, OK. I did wonder about that. Maybe worth backtracking everything to 2015.8
10:32 AndreasLutro no one should berate you for running into bugs but if you upgrade in production without proper testing you're not going to find much sympathy :p
10:32 babilen That way you don't have to jump from 2015.5 to 2016.3 if you don't want to. Admittedly some of the point releases broke things too, but that got a little better
10:33 VSpike AndreasLutro: it's not production, luckily :) I'm not that insane
10:33 babilen VSpike: http://repo.saltstack.com/#ubuntu → Pin to ....
10:34 babilen Not sure when I'll upgrade to 2016.3, but I definitely need more testing. And .0 was pretty bad again.
10:35 AndreasLutro I had very few problems with it but one performance issue will keep me from upgrading yety
10:35 AndreasLutro yet*
10:36 VSpike I have more problems with formulas than salt itself nowadays, but I pull changes to dev/test systems first. But I get comments like "Why do we have to spend time debugging/fixing it?" ... I always say that's part of using open source
10:37 AndreasLutro formulas I deliberately avoid, all our states are written from scratch
10:37 babilen AndreasLutro: It was mostly https://github.com/saltstack/salt/issues/33544 that kept me from upgrading
10:37 saltstackbot [#33544]title: Salt 2016.3.0 (Boron) clean_old_jobs fails  | ### Description of Issue/Question...
10:37 VSpike I've been replacing states I wrote from scratch with formulas since that seemed like the right way, but I do wonder sometimes
10:38 VSpike It would arguably be better for me to put the effort into improving the formulas instead of re-inventing them
10:38 VSpike But some of them are pretty gnarly
10:39 favadi joined #salt
10:41 anmol joined #salt
10:49 kshlm joined #salt
10:49 Guest22305 joined #salt
11:01 VSpike Would be nice if the salt formula's salt.pkgrepo supported the different channels
11:01 VSpike I should really fix that
11:02 flowstate joined #salt
11:02 amcorreia joined #salt
11:04 subsignal joined #salt
11:13 favadi joined #salt
11:14 impi joined #salt
11:19 CeBe1 joined #salt
11:22 subsignal joined #salt
11:22 VSpike Which is the correct URL? http://repo.saltstack.com/apt/ubuntu/ubuntu14/latest or http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest ?
11:22 VSpike I keep seeing both in my files. Suspecting one comes from the bootstrap script maybe
11:27 subsignal joined #salt
11:27 abednarik joined #salt
11:32 om joined #salt
11:39 eseyman joined #salt
11:39 babilen VSpike: http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest would be my preferred entry
11:40 punkoivan joined #salt
11:41 punkoivan left #salt
11:45 edrocks joined #salt
11:46 subsignal joined #salt
11:49 diggles joined #salt
11:53 XenophonF users-formula doesn't support windows :(
11:58 racooper joined #salt
12:00 subsignal joined #salt
12:03 MOnte0 joined #salt
12:04 subsignal joined #salt
12:05 MOnte0 in need of advice... have 200 (moving in vehicles) minions connecting over 3g, /srv/salt is 7 MgB, how come i have 400 MiB daily traffic on them ??
12:06 flowstate joined #salt
12:07 abednarik joined #salt
12:08 MOnte0 that would be each od 200 minions have minimal 400 Mib and some are around 800
12:08 numkem joined #salt
12:09 Trauma joined #salt
12:13 FreeSpencer joined #salt
12:13 FreeSpencer joined #salt
12:13 tracphil joined #salt
12:14 subsignal joined #salt
12:15 mapu joined #salt
12:15 subsigna_ joined #salt
12:17 west575 joined #salt
12:19 evidence joined #salt
12:23 subsignal joined #salt
12:28 babilen MOnte0: I'd ask that on the mailing list as "minions in a mobile" setting isn't too common. It might also help if you were to monitor their traffic or run them masterless with occasional syncs
12:30 gh34 joined #salt
12:33 haarp_ joined #salt
12:35 mage_ what's the easiest way to copy a file from one minion to another ?
12:35 TooLmaN joined #salt
12:35 mage_ in other word I have Solr which run on machine X and I need to copy a schema.xml from machine A on it
12:37 Zhen joined #salt
12:38 silver joined #salt
12:38 silver hi
12:38 silver Does anyone know if you can do dynamic calculations in a salt state
12:39 rsanting does anyone know if you can let the salt iptables module remove all rules that are not included in the state?
12:39 karlthane joined #salt
12:39 Guest30905 Does anyone know if you can do dynamic calculations in a salt state. Example - I need to set a kernel setting that is half of the amount of the ram on a server
12:41 mage_ Guest30905: you can do that in a {% set foo = ... %}
12:42 subsignal joined #salt
12:42 mage_ {% set var = salt.grains.get('mem_total') / 2 %} should work
12:42 mage_ the use {{ var }}
12:43 mage_ (altough I always prefer to write a module to keep my templates clean)
12:45 dendazen joined #salt
12:46 rsanting joined #salt
12:52 subsignal joined #salt
12:53 amcorreia joined #salt
12:54 subsignal joined #salt
12:58 VSpike XenophonF: indeed it doesn't :/
13:00 rbjorklin What's the recommended way of diffing dicts in python?
13:01 flowstate super odd question for you guys: is there any way for a minion to request the master run a salt-runner?
13:02 AndreasLutro flowstate: fire an event, set up a reactor that calls a runner
13:02 rbjorklin flowstate: You should be able to use the reactor
13:02 flowstate okay cool, that was the plan. Didn't know if there was another way
13:02 flowstate thanks much!
13:02 babilen rbjorklin: There's salt.utils.dictdiffer
13:03 rbjorklin babilen: Thanks, I'll have a look!
13:03 flowstate wait, how do I call the runner in the reactor? literal cmd.run? or do I use something like the saltmod.function stuff?
13:03 AndreasLutro the reactor examples in the docs should have runner examples
13:04 babilen rbjorklin: https://github.com/saltstack/salt/blob/develop/salt/utils/dictdiffer.py -- It won't perform recursive comparisons though.
13:04 mage_ what's the easiest way to copy a file from one minion to another ?
13:04 AndreasLutro if not, the syntax is my_reactor_id: { runner.state.orchestrate: [ args go here ] }
13:06 ssplatt joined #salt
13:08 flowstate awesome, ty! I thought I had to have the reactor call a state which kicked off the runner
13:10 krymzon joined #salt
13:16 anmol joined #salt
13:19 Guest96239 joined #salt
13:22 MOnte0 @babilen txs i'll try mailing list
13:23 komputes joined #salt
13:23 nyx joined #salt
13:26 VSpike I've just rolled back to 2015.8.10 and the breaking changes are in there it seems
13:26 babilen MOnte0: You might also be able to configure the minions in such a way that they don't "phone home" so often, but for that you would have to have some idea as to what causes that traffic.
13:26 babilen VSpike: Now, isn't that lovely?
13:28 protoz joined #salt
13:28 MOnte0 @babilen, this is my /etc/salt/minion.d/_schedule.conf..........schedule:   __master_alive:     function: status.master     jid_include: true     kwargs: {connected: true, master: xxx.xxx.xxx.xxx}     maxrunning: 1     hours: 4   __mine_interval: {function: mine.update, jid_include: true, maxrunning: 1, minutes: 180}   highstate: {function: state.highstate, hours: 10}
13:29 VSpike babilen: 2015.8.9 to be precise
13:29 VSpike Well, I can probably roll back the Windows minions (it's a Windows bug) to 2015.8.8.2 while keeping everythign else at 2015.8.10
13:29 dfinn joined #salt
13:34 XenophonF i really, really wish Windows was a bigger priority for both SaltStack-actual and the community
13:37 Sylvain31 hi, how can I read minion id from itself with salt-call or something?
13:38 XenophonF salt-call grains.get minion_id i think, or maybe just id
13:38 XenophonF it's id
13:38 XenophonF so salt-call grains.get id
13:39 Sylvain31 XenophonF: a bit early "Minion failed to authenticate with the master, has the minion key been accepted?"
13:40 Sylvain31 XenophonF: it works when the minion is accepted by the master, thanks. for just after bootstraping is it possible to verify that the minion_id is correct?
13:40 VSpike Sylvain31: usually it will be in /etc/salt/minion_id too
13:41 subsigna_ joined #salt
13:41 Sylvain31 VSpike: on debian jessie yes…
13:41 goal joined #salt
13:41 LinkRage joined #salt
13:42 LinkRage left #salt
13:43 flowstate joined #salt
13:43 goal Anyone know why a state using a pillar value in jinja as salt['pillar.get']('mypillaritem') shows a different (old) value to that reported by pillar.item, which shows correct
13:43 whitenoise joined #salt
13:43 whitenoise hello.
13:44 whitenoise I am setting an RSA private key to a variable in an sls, with the | syntax. so, key: | <newline> <tabbed in appropriately> XXXXxxx..... etc.
13:45 whitenoise but then when i reference this variable in another config to pull it in, it loads funky like this: http://pastebin.com/kSny3rp8
13:45 whitenoise is that because of the ----- on the keys?
13:49 pmcnabb joined #salt
13:49 whitenoise i tried wrapping it in quotes, still didn't keep it from indenting
13:49 whitenoise er, dedenting,  rather
13:50 TyrfingMjolnir joined #salt
13:53 rhodgin joined #salt
13:53 hlub any ideas how to backup a bunch of Linux machines in these days? Bacula is rather complex system and mainly for tapes. Duplicity seems easy but it pushes the data to the backup server. I'd prefer pull-style backups, because the salt machine, for instance, already has access to the other machines.
13:53 flowstate joined #salt
13:54 XenophonF whitenoise: ObPleaseDontUsePastebinTheyreEvil
13:55 XenophonF whitenoise: you need to indent to the same level all of the lines that contain the key data
13:55 tapoxi joined #salt
13:55 cDR joined #salt
13:55 hlub not quite exactly a question about salt but it is strongly related though
13:55 whitenoise XenophonF: in the variable definition, they are all indented the same
13:55 XenophonF whitenoise: for example https://github.com/irtnog/salt-pillar-example/blob/master/www/example/com/init.sls#L26
13:55 whitenoise XenophonF: when they render, everything below the BEGIN dedents
13:55 whitenoise yes, that's how it looks
13:55 LtLefse hlub: have you looked at BackupPC?
13:57 whitenoise XenophonF: so I set it like you have in that file that you linked there, then I link to that file in the file that renders (what I'm doing is consolidating secrets out of the regular configs)
13:58 whitenoise and then I render it like private: | <newline> <tabbed in> {{ blah['private'] }}
13:58 whitenoise and then it breaks
13:59 babilen Sylvain31: How would you verify that the minion id a minion reports is correct? What makes it correct?
14:00 anotherZero joined #salt
14:02 jerematic joined #salt
14:03 XenophonF whitenoise: you can't do it like that
14:04 XenophonF because the contents of blah['private'] get pasted into the text at that point verbatim
14:04 XenophonF jinja isn't an artificial intelligence
14:05 whitenoise XenophonF: i see. is there no way to tell it to keep the pulled in variable as a block, then?
14:05 XenophonF it doesn't know, if it's inserting a multi-line string, that it needs to indent the whole thing
14:05 whitenoise XenophonF: oh, look at this: https://github.com/saltstack/salt/issues/5480
14:05 saltstackbot [#5480]title: Multiline strings tricky when used with ``file.managed`` ``contents`` param | This one is best articulated with an example. In short, if the ``contents`` param of ``file.managed`` is a function call that returns a multi-line string the template indentation is wrong....
14:06 andrew_v joined #salt
14:06 XenophonF use the |yaml_encode filter
14:06 XenophonF sadly this isn't emphasized enough in the salt docs
14:06 XenophonF b/c you need to seralize that string from its internal Python representation into a suitable YAML representation
14:07 XenophonF also skip the "|" multiline char
14:07 Sylvain31 babilen: yes, I would like to test via bash after bootstraping that the minion_id is aligned with its hostname
14:07 XenophonF so just private: {{ blah['private']|yaml_encode }}
14:07 menglish joined #salt
14:07 whitenoise XenophonF: excellent. let me try this, one second
14:08 XenophonF honestly, everyone should be using |yaml_encode or |yaml any time they're using the {{ }} operator (or the Mako/etc. equivalent)
14:08 Sylvain31 I coded this bootstrap over salt-bootstrap to have a command line tools for my minions: https://github.com/opensource-expert/salt-manage-hosts
14:08 XenophonF otherwise you run into situations where jinja/mako/etc. generate text that isn't valid yaml
14:08 whitenoise XenophonF: woo. that worked!
14:08 mpanetta joined #salt
14:08 mage_ when I fire an event with event.wait is it asynchronous?
14:08 abednarik joined #salt
14:09 whitenoise XenophonF: that's a good point. I just assumed that yaml had a way of "retaining" the block, but I see why that is a faulty assumption.
14:09 whitenoise well, I suppose it does through the filter, but I was not aware of the filter.
14:10 mage_ how can I be sure that if I have a dependency X -> Y -> Z where I fire the event in X which runs Y, Z should be execute only if Z succeeded
14:11 mage_ and let's say Y is a runner
14:12 hasues joined #salt
14:12 hasues left #salt
14:13 tharkun joined #salt
14:13 west575_ joined #salt
14:13 pppingme joined #salt
14:16 dmaiocchi joined #salt
14:18 Heartsbane joined #salt
14:18 Heartsbane joined #salt
14:19 nyx joined #salt
14:22 Ayo joined #salt
14:23 AndreasLutro mage_: orchestration is the best way I've found to do cross-minion dependencies
14:25 anmol joined #salt
14:26 zmalone joined #salt
14:31 yuhlw joined #salt
14:35 nmadhok joined #salt
14:36 tongpu joined #salt
14:38 DanSlimmon joined #salt
14:39 _JZ_ joined #salt
14:46 mage_ AndreasLutro: can you lauch an "orchestration" script in a state file?
14:47 spuder joined #salt
14:50 Trauma_ joined #salt
14:50 flowstate joined #salt
14:52 haarp joined #salt
14:56 toastedpenguin joined #salt
14:58 brew joined #salt
15:00 yuhlw joined #salt
15:00 toastedpenguin joined #salt
15:01 ZiLi0n joined #salt
15:02 pzipoy joined #salt
15:03 flowstate joined #salt
15:07 edrocks joined #salt
15:08 ZiLi0n Hello I am trying to use the grains.filter_by and provide a base= dictionary as common data source. The way I would like to provide the base lookup dict is directly in the jinja file, I am doing "base={ 'ket1': 'value1'}" but I am getting the erro TypeError: unhasbale type: 'dict'
15:09 ZiLi0n what is the type then?
15:12 dmaiocchi joined #salt
15:14 dyasny joined #salt
15:14 Tyrm joined #salt
15:15 Tyrm_ joined #salt
15:15 shoemonkey joined #salt
15:22 menglish Has anyone here ever run into issues trying to use filter arguments in jinja with salt?
15:23 Guest96239 joined #salt
15:23 menglish I have a map.jinja that contains a string that's just a comma-separated list of ips that get inserted into a template
15:24 menglish it's all on one line and I want to break it into separate lines using load_yaml and jinja's "join" filter argument
15:24 menglish but I'm getting some... unexpected results
15:25 noraatepernos joined #salt
15:26 noraatepernos http://pastie.org/10868693 is there anything standing out as wrong in this iterating through pillar items?  This renders as blank {} in my debug.
15:27 menglish Before I try to minimize a test case, I thought I'd check to see if anyone else has run into issues with filter arguments like tht
15:27 menglish *that
15:28 noraatepernos joined #salt
15:30 Deevolution joined #salt
15:39 irctc248 joined #salt
15:40 tharkun joined #salt
15:40 toastedpenguin joined #salt
15:40 yoni_ joined #salt
15:41 west575 joined #salt
15:42 punkoivan joined #salt
15:42 toastedpenguin joined #salt
15:43 yoni_ Hi, I'm new to salt and I'm trying to set custom grains from api calls; what I've gathered from the docs is to 1) create a .py file in /src/salt/_grains or in whatever the file_roots in the master config is and I'll be able to access them; not sure of any other steps; anyway here's the .py file I've created https://gist.github.com/jonathan-kosgei/6d654f0b02d287e507f84915136b9143 and put in /saltstack/salt/_grains which is my files_root according to the mas
15:43 yoni_ ter config
15:43 whitenoise left #salt
15:44 Deevolution left #salt
15:45 Shirkdog joined #salt
15:53 eseyman_ joined #salt
15:54 flowstate joined #salt
15:59 babilen yoni_: Generally speaking you would now run https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_grains ( or sync_grains)
16:00 abednarik joined #salt
16:00 babilen yoni_: Are you aware of https://github.com/saltstack/salt-contrib/blob/master/grains/ec2_info.py and the other ec2_* grains in https://github.com/saltstack/salt-contrib/tree/master/grains ?
16:02 babilen yoni_: Oh, and remove the "customgrains()" at the end
16:02 yoni_ babilen : I wasn't let me have a look
16:02 yoni_ okay, thanks let me try that
16:03 babilen In Python I'd also rather use subprocess.check_output(...)
16:04 corichar joined #salt
16:04 edrocks_ joined #salt
16:04 brotatochip joined #salt
16:04 zmalone joined #salt
16:06 bltmiller joined #salt
16:12 flowstate joined #salt
16:15 ThomasJ joined #salt
16:19 flowstate joined #salt
16:25 shoemonkey joined #salt
16:25 morissette joined #salt
16:28 Guest96239 joined #salt
16:31 rem5 joined #salt
16:37 writtenoff joined #salt
16:37 SheetiS joined #salt
16:38 flowstate joined #salt
16:43 nmadhok joined #salt
16:49 noraatepernos joined #salt
16:49 evle1 joined #salt
16:50 flowstate joined #salt
16:50 noraatepernos https://nodeca.github.io/js-yaml/ this seems to be good at checking yaml.
16:50 tomasfejfar1 joined #salt
16:52 dgk joined #salt
16:52 aharvey joined #salt
16:54 impi joined #salt
16:59 lero joined #salt
17:00 brotatochip joined #salt
17:01 abednarik joined #salt
17:02 iggy requests is already a salt requirement, so you know you have it on everything with a salt-minion... use requests
17:03 abednarik joined #salt
17:03 menglish joined #salt
17:04 nmadhok joined #salt
17:04 west575_ joined #salt
17:06 nmadhok joined #salt
17:06 ageorgop joined #salt
17:11 felskrone joined #salt
17:15 mikecmpbll joined #salt
17:15 bltmiller joined #salt
17:19 tvinson joined #salt
17:19 paydro joined #salt
17:19 irctc703 joined #salt
17:19 fracklen joined #salt
17:20 irctc703 hello?
17:20 paydro joined #salt
17:21 irctc703 I have a question about custom execution modules
17:23 nmadhok joined #salt
17:24 noraatepernos Anyone have any suggestions on ensuring node.js processes are running?
17:24 noraatepernos I’d prefer to use pm2 but don’t mind something more salt friendly if it helps.
17:24 rem5 joined #salt
17:27 tvinson_ joined #salt
17:28 dfinn joined #salt
17:28 iggy there are modules for supervisord, but I wouldn't say it's salt friendly
17:28 iggy you could pretty easily write a module/state to control pm2 (I might do so in the near future)
17:29 menglish1 joined #salt
17:29 KyleG joined #salt
17:29 KyleG joined #salt
17:30 noraatepernos iggy: Thanks.  Supervisord is my go-to for almost everything other than node.  pm2 will spread processes among CPUs for you which is nice.
17:30 noraatepernos If you have workers, etc.
17:31 KyleG I actually just tried to get Pm2 working for our node apps
17:31 hasues joined #salt
17:31 KyleG But it's a PITA on read-only servers
17:31 KyleG PM2 definitely seems to be geared to servers that have r/w and are persistent
17:31 hasues left #salt
17:31 KyleG so I had to go back to supervisorD for my node apps
17:34 noraatepernos KyleG: Do you do anything with the num_cpus grain or leave node processes on a single CPU?
17:35 noraatepernos I have processes behind a load balancer that can run one process per CPU.  Same wiht any type of job queue worker.
17:35 anotherZero joined #salt
17:36 flowstate joined #salt
17:36 iggy by read-only servers, you mean containers? or what?
17:38 KyleG noraatepernos: I'm really careful about pre-mature optimization, my environment consists of 24x 8 core servers so I generally find the single process fine with the load balancing.
17:38 KyleG But if I needed to I'd probably have supervisorD start up the procs with increasing port #s and then update my nginx upstream
17:39 KyleG As a contingency if I do need to scale up at the node level
17:39 KyleG I'm going to have like, 8-10 node APIs running in the next month or so so it will probably even out to roughly 1 process per core, hopefully, not sure if I have to manually determine CPU affinity
17:40 noraatepernos KyleG: The processes behind the load balancer do this.  I’m wondering if putting them under a single node-cluster entry point is better.  Then running node super.js, etc.  I’ve never tried this.  Once my node processes start up they report to the load balancer their ip/port.
17:41 KyleG What load balancer are you using for auto service discovery?
17:41 KyleG I've been thinking of checking out Consul
17:41 noraatepernos It’s written in node.  It’s pretty simple.
17:41 KyleG oh so custom?
17:42 noraatepernos Yes.  I use node-proxy.
17:42 noraatepernos node-http-proxy
17:42 KyleG Checking it out now..I'm fairly new to the node stuff, we've been mostly PHP/Python but the past few months re-wrote all our APIs in node so I'm getting a handle on this
17:43 KyleG I'm just using NGINX right now to proxy_pass location endpoints to the node.js processes
17:43 ahammond our MWorkers are consuming 2.5GB of memory each... This seems... unreasonable.
17:43 komputes joined #salt
17:44 teryx510 joined #salt
17:45 noraatepernos This one does ssl SNI and keeps upwards of 250 ssl certs in memory.
17:45 KyleG Ah, I do all my SSL termination/SNI with NGINX
17:46 KyleG my load balancers are layer 3 load balancers using FreeBSD+PF+relayD (relayD does the health checks and updates the pf rules to route requests)
17:46 noraatepernos We needed a way to make new ssl certs instantly available without a restart.
17:46 KyleG So all the nodes behind the LB currently handle the SSL termination
17:46 woodtablet joined #salt
17:46 noraatepernos So they’re published on an ActiveMq channel across about 30 observers.
17:47 KyleG oh wow, that's a clever solution
17:47 noraatepernos That’s what I’d like to add next is auto-scaling.
17:47 noraatepernos I’m an event/pubsub junkie.
17:48 noraatepernos salt has been a total game-changer for this infrastructure, too.  So awesome.
17:49 KyleG salt is dope for infrastructure yea
17:49 flowstate joined #salt
17:49 cliluw joined #salt
17:54 edrocks joined #salt
17:56 nmadhok joined #salt
17:59 flowstate joined #salt
18:02 edrocks joined #salt
18:03 flowstate joined #salt
18:06 mikecmpbll joined #salt
18:06 zmalone joined #salt
18:09 rem5_ joined #salt
18:09 wnkz joined #salt
18:10 flowstate joined #salt
18:12 nmadhok joined #salt
18:13 lompik joined #salt
18:16 dyasny joined #salt
18:17 komputes joined #salt
18:21 komputes joined #salt
18:22 nmadhok joined #salt
18:25 yoni_ @babilen
18:25 yoni_ Hi
18:25 rhodgin joined #salt
18:27 abednarik joined #salt
18:28 komputes joined #salt
18:28 yoni_ babilen, Hi, did that but on running salt-call -g I get https://gist.github.com/jonathan-kosgei/f29ad3bdc54dc92fe096571f7927736b
18:29 menglish joined #salt
18:30 yoni_ babilen,  my custom grains py file looks like https://gist.github.com/jonathan-kosgei/9953632e5ec87992e2dc85fab71ff01f
18:31 iggy you know you can put multiple files in a single gist
18:32 iggy oh my... os.system
18:32 * iggy backs away slowly
18:32 racooper joined #salt
18:32 numkem joined #salt
18:33 flowstate joined #salt
18:33 iggy you've got backticks around something that you are running via os.system
18:33 iggy remove all those backticks
18:34 noraatepernos Any idea on debugging a failed archive.extracted?  I see no errors in the debug log on master/minion.  The sls is being recognized and parsed correctly.  I’ve also checked the checksum.  As far as I can see, simply no extraction is taking place.
18:34 ajw0100 joined #salt
18:35 RandyT Ryan_Lane: my attempt at migrating boto_rds to boto3... https://github.com/saltstack/salt/pull/33867
18:35 saltstackbot [#33867]title: Migrate boto_rds to boto3 | ### What does this PR do?...
18:35 RandyT that was quite the learning experience... :-)
18:37 winsalt joined #salt
18:38 jfindlay RandyT ftw!
18:40 GreatSnoopy joined #salt
18:40 RandyT I am sure there are some warts in there but boto_lambda was a great example
18:42 winsalt does anyone know how to make module.run in a state file act stateful
18:43 impi joined #salt
18:44 RandyT winsalt: I've taken to either creating hidden files kept in safe place on minion or creating grains and check for their existence.
18:44 noraatepernos “TypeError encountered executing state.highstate: object of type 'bool' has no len(). See debug log for more info.” <— debug log shows nothing.  What gives?
18:44 RandyT no idea if that is considered a good practice. ;-)
18:46 winsalt im not sure what that means RandyT
18:47 aharvey joined #salt
18:47 iggy noraatepernos: which debug log?
18:48 noraatepernos On ubuntu I’m looking in /var/log/salt/master and minion
18:49 iggy try running on the minion via `salt-call -l debug state.highstate` but it sounds like you're getting unexpected data somewhere
18:49 tkharju joined #salt
18:56 RandyT winsalt: here is example of something similar: https://gist.github.com/rterbush/6fc82d7ddc0228d8fa7a3e274290cf42
18:57 RandyT since the execution of these ops don't seem to have state associated, I have done this to maintain that state in grains.
18:58 RandyT I've done similar things by creating hidden files on the minions and check for their existence before rerunning the state.
18:58 winsalt I tried something like that, but if the condition isnt met nothing gets run.  Im trying to get a service to restart with a watch when the module.run changes something.  The problem is it always fires, because it always returns with changes
19:00 RandyT perhaps a custom grain used to set mine_function?
19:00 noraatepernos iggy: I had that running on my salt minion already and was watching for errors during high state.  Not sure how to debug this.  It’s a python error trace.
19:00 noraatepernos Passed invalid arguments: object of type 'bool' has no len() with the traceback.  Does yaml require “true” to be “True” or something?
19:01 bltmiller joined #salt
19:02 babilen yoni_: I'd strongly recommend to adapt ec2_info.py to your needs and to *not* use os.system(), but, if you have to, subprocess.check_output() or the methods employed already in ec2_info.py. You also seem to have backticks in some of those commands.
19:02 babilen Please remove those
19:08 cyborg-one joined #salt
19:10 menglish joined #salt
19:11 lero joined #salt
19:13 brotatochip joined #salt
19:16 fracklen joined #salt
19:17 vodik joined #salt
19:18 fracklen joined #salt
19:24 yoni_ babilen, Done, I get ('Connection aborted.', gaierror(-2, 'Name or service not known'))
19:24 yoni_ this error consistently
19:27 edrocks joined #salt
19:27 amcorreia joined #salt
19:28 babilen yoni_: Are you sure the host is correct and resolves?
19:28 noraatepernos I’m still stuck on this mysql_user.present keyerror.  This just does not want to work.  Aye.
19:28 noraatepernos I’ve tried every possible combination of - require it seems like.
19:29 yoni_ babilen, just confirmed everything works perfectly with subprocess.check_output, thank you so much
19:29 yoni_ :)
19:29 noraatepernos Including the documented pkg: python-mysqldb
19:30 xlotlu joined #salt
19:32 xlotlu is it possible to dump to stderr a jinja variable in a state file?
19:32 flowstate joined #salt
19:33 babilen yoni_: yay
19:34 babilen noraatepernos: Did you restart the minion after installing the module (or did you set "- reload_modules: True" in the pkg.installed state) ?
19:35 noraatepernos babilen: I believe I’ve discovered the problem.  I need to remember going back and reading through *all* errors in the debug output.
19:38 gngsk joined #salt
19:40 gngsk I seem to have run in to an issue where my top file isn't being compiled correctly. I have a bunch of packages I want installed on all Linux boxes so I'm using kernel:Linux: - match: grain
19:41 gngsk However, none of the packages list listed after those lines are being showin in the output of salt 'minion' state.show_top or being applied when I run a highstate.
19:42 yoni_ babilen,  I get subprocess.CalledProcessError: Command 'aws ec2 describe-tags --filters "Name=resource-id,Values=i-0cc898f87f32cf886" "Name=key,Values=VPC" --region eu-west-1a --query 'Tags[*].Value' --output text' returned non-zero exit status 255
19:42 yoni_ That's a one-liner, hope that's ok
19:42 gngsk This worked previously when I bootstrapped the minions, but it's broken now. I'm using GitFS and I tried clearing the cache and running a fileserver.update but it didn't change anything.
19:45 gngsk salt-call -l all state.show_top doesn't give me any relevant information about how the states to run are being compiled. I'm running 2014.7.1 anything else I can do to debug?
19:46 ahammond I have a #!py reactor. In it I'm calling __salt__['pillar.get'](pillar_key) When I do salt-call pillar.get $pillar_key, it works. But in the reactor I'm getting an empty string. Any suggestion what I'm doing wrong?
19:46 babilen yoni_: I'm more or less off now, but without the entire grain it is hard to say. I also don't quite understand why you don't adapt ec2_info to your needs. It should give you most of the information you need already.
19:47 babilen ahammond: You can't lookup pillar values in a reactor. You have access to the event data.
19:47 babilen bbl
19:49 iggy gngsk: try making a gist with the relevant bits of info (top file, command being run, output of command, etc)
19:50 gngsk iggy, k will try
19:51 tommyfun joined #salt
19:52 aharvey joined #salt
19:53 josuebrunel joined #salt
19:56 yoni_ babilen, fixed it
19:59 edrocks joined #salt
20:00 rhodgin joined #salt
20:07 xlotlu to answer my own question, the best i could do do debug a variable is dump it on the minion side with a file.managed: contents: | {{ var|yaml(False)|indent(8) }}
20:07 xlotlu *to debug
20:09 ahammond babilen ok, that makes sense.
20:09 flowstate joined #salt
20:09 Ayo joined #salt
20:09 dps joined #salt
20:09 noraatepernos How does one use “unless” to only attempt a symlink if one doesn’t already exist with file.symlink?  This is my *only* remaining error in 62 items :)
20:10 jeblair joined #salt
20:10 noraatepernos Wrapping it in salt['file.directory_exists'] didn’t seem like the best way but perhaps it is.
20:11 abednarik joined #salt
20:12 noraatepernos http://stackoverflow.com/a/30454953
20:12 babilen noraatepernos: It wouldn't try to create a symlink twice
20:12 dps hi.  i have a dumb question.  if I have a server that does not and cannot have the git binary installed on it, what strategy should i use to deploy code from a git repo to it?  should i use the git state to copy it locally to the master and then just copy the directory tree from there?  like a two step process?
20:12 eagen joined #salt
20:12 noraatepernos babilen: I’m getting “Directory exists where the symlink /etc/activemq/instances-available/main should be”
20:13 babilen noraatepernos: Yeah, I thought "one" in your question referred to "symlink" and not "something else" :)
20:14 noraatepernos babilen: Heh.  No I was just proud of myself for working through 30 errors and only harrassing you guys 5 times.
20:14 babilen dps: You could reference it as GitFS on the master and use file.recurse
20:14 babilen noraatepernos: Sounds like you earned a hooray!
20:14 dps babilen: cool thank you for replying I will look into this.
20:14 * noraatepernos bows
20:16 babilen dps: That should essentially place whatever is in that repository in "file_roots" which might not be completely appropriate. GitFS lets you configure some bits, maybe a little reorganisation + configuration allows you to use this without problems
20:17 babilen dps: Or run a minion on the master, use git.latest to check it out somewhere in file_roots and then use file.recurse to get it to other minion. More or less the same approach, but allows you to manually pull in changes.
20:17 dps bablien the second approach what you describe was what i was thinking
20:18 dps but i am not familiar with using salt to execute states in order
20:18 babilen dps: In the end it depends on what you want, but I'd place it somewhere in file_roots (either via GitFS or simply by adding a local directory on the master to file_roots)
20:18 dps ok thats kind of what i was thinking
20:18 dps i appreciate your help
20:18 dps the gitfs is an interesting idea
20:18 babilen dps: You'd have to orchestrate that (first run state on the master minion then the other minion). If you always want to deploy git HEAD it is probably easier to just use GitFS
20:19 dps babilen is that orchestration capability built into salt?
20:19 babilen It is
20:19 dps sorry ive only been using it for a couple of dayus
20:19 ahammond dps, sounds like a job for a build system.
20:19 dps ahammond, im not actually building anything
20:19 ahammond dps I know. That's gonna be your problem. :0
20:19 dps im just deploying a script
20:19 babilen dps: https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#orchestrate-runner
20:19 dps the script is version controlled
20:20 babilen dps: Ah, it is a single file?
20:20 ahammond dps it's version controlled until you deploy it.
20:20 dps ahammond true
20:20 dps its more than one file
20:20 dps but not many
20:20 dps its multiple repos tho
20:21 dps basically i have some automation code that i am deploying to our isilon system
20:21 dps its a mod bsd kernel, no pkgs no ports tree
20:21 dps salt-ssh works fine on this system to configure cron, for example/
20:21 dps but yeah, no git binary.
20:22 cro joined #salt
20:23 babilen That's okay .. the problem with GitFS will be that it places the root of the repo directly into file_roots where you reference 'foo.py' in there as salt://foo.py -- It might be better to prefix it with something so it becomes salt://foo_scripts/foo.py
20:23 babilen Look into https://docs.saltstack.com/en/latest/ref/configuration/master.html#gitfs-mountpoint
20:23 babilen (and other options)
20:23 ahammond So, what we're doing for something similar (in this case web-sites). Our approach is to have a build system generate RPMs (using fpm, which makes packaging a whole lot easier, especially when you don't have to build anything). These RPMs are uploaded to our repository and then the build system calls event.send. The event triggers a pkg.install on the minions that need the stuff.
20:24 babilen dps: That way you could use a file.recurse state on salt://foo_scripts
20:24 briansteffens joined #salt
20:25 dps bobilen: you have been really helpful these links are great.  i am looking at the orchestration runner and i think it will do what i want.  also i am going to investigate the gitfs option.  ahammond for what I am doing I'm not ready to get that advanced, seems pretty slick though.
20:25 brotatochip joined #salt
20:25 babilen Orchestration strikes me as too complex for this, but test both
20:25 ahammond the major benefit here is that you can throw the git refspec into the RPM and know what software you're running. :)
20:25 ahammond dps orch is pretty awesome. good luck! :)
20:26 babilen But sure .. there are many many other ways to deploy software
20:26 dps thank you both of you have been very helpful thakn you
20:26 dps yeah i want something easy, but hot too hacky
20:26 babilen And some might be more appropriate for you
20:26 flowstate joined #salt
20:31 tercenya joined #salt
20:31 noraatepernos joined #salt
20:32 flowstate joined #salt
20:43 jweede joined #salt
20:45 jweede Hello there. Do I need to write `{% set pillar_get = salt['pillar.get'] %}` in all my jinja templates or is there a way to add them to my jinja context across all my states?
20:46 aharvey joined #salt
20:50 punkoivan joined #salt
20:50 flowstate joined #salt
20:51 punkoivan joined #salt
20:53 punkoivan left #salt
20:54 ajw0100 joined #salt
20:56 iceyao joined #salt
20:58 ahammond jweede I don't know of such a thing, but I sure could find some use for it. :)
20:59 jweede ahammond: thanks just wondering. :)
21:00 paydro_ joined #salt
21:02 _JZ_ joined #salt
21:04 saltinquirer joined #salt
21:06 DEger joined #salt
21:07 SpX joined #salt
21:07 saltinquirer I've scoured the docs and google for some sort of list on the jinja variables that are available but haven't been able to find anything. What I'm specifically trying to find is the syntax for retrieving the job id. A somewhat comprehensive list of jinja options would be nice too, if its available. Any ideas?
21:11 iggy I'm pretty sure you can't access that in jinja
21:12 saltinquirer Any idea how I could access it? I have a state that sends a message and I need it to include the job id.
21:12 s_kunk joined #salt
21:13 iggy saltutil.running maybe?
21:14 ahammond saltinquirer maybe if you tell us what you're trying to do at a higher level we can point you in the right direction?
21:16 gngsk iggy: https://gist.github.com/vschum/85995d6dd94e0cf23d69df24c9ca80e8
21:16 gngsk I would expect to see all the states under kernel:Linux: in the output of show_top but only sensu.client and munin.node are present.
21:16 iggy gngsk: it's the : after kernel:Linux
21:17 iggy wait a minute
21:17 Tyrm joined #salt
21:17 iggy oh, put quotes around the actual matcher maybe?
21:17 iggy those lines look weird for some reason
21:18 iggy 'kernel:Linux':
21:18 iggy like that
21:18 gngsk ok, i will try that
21:18 saltinquirer What I'm trying to do is run updates on a server, but I want it to send a slack message first. What I have so far is a state that gets applied by a scheduled job. It first sends a message to slack, then runs updates, then sends a message to slack again letting us know the updates are complete. I want it to include the job id, though, in the slack message so, if needed, we can check up on the job easily.
21:24 iggy saltinquirer: https://github.com/saltstack/salt/blob/develop/salt/renderers/jinja.py#L323
21:24 iggy that's about the only list of everything that's in the jinja context
21:24 rim-k joined #salt
21:28 manji joined #salt
21:31 gngsk iggy, no love with quotes. I ran into this issue previously and clearing the gitfs cache and restarting the salt-master helped but that's not the case today.
21:31 sjorge joined #salt
21:31 gngsk I have to head out now but will be back on later to look. Thanks for the hint though iggy!
21:31 paydro joined #salt
21:32 MajObviousman wow, ok
21:32 MajObviousman so going through AD integration in vCenter ... this is absolutely delightful
21:32 MajObviousman I have the choice of using the machine account and it's auto-created SPN or the _illusion_ of choice of SPN if I opt not to use the machine account
21:33 MajObviousman there's a field there, but the validation limits it to one possible answer
21:33 stanchan joined #salt
21:33 SaltyCharles joined #salt
21:34 rem5 joined #salt
21:36 sjorge joined #salt
21:36 nmadhok joined #salt
21:39 legnej joined #salt
21:40 brotatochip joined #salt
21:46 manji joined #salt
21:47 Ahlee I really need to write a better way of logging out pillar values at state time
21:48 subsignal joined #salt
21:51 zmalone joined #salt
21:54 rem5 joined #salt
21:56 abednarik joined #salt
21:59 flowstate joined #salt
22:01 RandyT anyone around that has some experience with win_certutil module?
22:02 west575 joined #salt
22:03 amcorreia joined #salt
22:06 cro joined #salt
22:07 zmalone joined #salt
22:08 ahammond is it possible to have a __salt__['mine.get']() in a reactor?
22:08 ahammond I'm guessing maybe not
22:09 Joe630 joined #salt
22:09 flowstate joined #salt
22:09 Joe630 hi all
22:10 Joe630 What's the preferred mehod for using internal repos for bootstrap-salt?
22:10 Joe630 *method
22:15 pzipoy joined #salt
22:18 bltmiller joined #salt
22:20 adelcast left #salt
22:21 brotatochip joined #salt
22:22 perfectsine joined #salt
22:25 ahammond Joe630 you know, I don't think salt-bootstrap actually supports that. Yet. :)
22:25 ahammond however... are you running 2016.3?
22:32 brew left #salt
22:32 lempa joined #salt
22:39 paydro_ joined #salt
22:39 jfindlay if mirroring repo.saltstack.com works in your situation, that should be a trivial update to bootstrap
22:40 belak joined #salt
22:40 belak I'm not sure if it's an issue with the docker upgrade that happened, the python-docker upgrade, or something different... I don't think it's docker though because I can start the containers manually
22:40 belak Whoops
22:40 belak Only got half of that message
22:40 belak I've been running python-docker from the backports repo on debian... and it looks like whatever salt was doing can no longer link containers? I've been getting issues like Failed to start new container 'drone': Error 500: Cannot link to a non running container: /postgres AS /drone/postgres
22:41 belak For reference, python-docker was upgraded from 1.5.0 to 1.7.2
22:46 komputes joined #salt
22:46 Joe630 ahammond: no, we aren't.
22:58 akio joined #salt
23:01 flowstate joined #salt
23:05 dimeshake is it expected that file.managed will always pull an http:// source file, even if present, and the file present matches the source_hash?
23:05 dimeshake https://gist.github.com/mshade/c056f372f1c2a694a0c735cb3be68653
23:07 bltmiller joined #salt
23:10 aharvey joined #salt
23:11 jfindlay dimeshake: probably not
23:15 dimeshake I'll see if there's an issue
23:15 dimeshake thx
23:15 dimeshake https://github.com/saltstack/salt/issues/33831  :)
23:15 saltstackbot [#33831]title: file.managed state should not download a file if the checksum did not change | When using the `file.managed` state with a HTTP URL and a provided `source_hash` I would expect Salt to check the hash of an existing local file before downloading the file from the server....
23:19 rem5 joined #salt
23:21 rem5 joined #salt
23:22 paydro joined #salt
23:27 shoemonkey joined #salt
23:30 fracklen joined #salt
23:31 paydro joined #salt
23:35 woodtablet silly question about jinja and salt. i am evaluating a jinja variable, but it does seem to be working in the formula. how do i just print what the jinja template is giving me ? i am trying to do this print {{ ntp_conf_srv }} in a salt state file
23:35 woodtablet re: does not
23:35 dendazen joined #salt
23:43 aharvey Is there a way to make this work : {{ pillar['splunk-config'][grains['pod_role']] }}; with the grain value as a pillar value instead?  Trying to refactor and get away from having to set custom grains
23:44 aharvey the value pod_role will be a K/V pair such as ecache: redis of which I would like redis to show up in the config file.  So I suppose it is a bit of substitution?
23:45 woodtablet never mind, figured it out via lots of ways, the issue was the ntp_conf_srv was not being set, so all my print statements were failing. no lets see if i can fix saltstack's ntp formula..
23:45 shoemonkey joined #salt
23:47 brotatochip joined #salt
23:47 anotherZero joined #salt
23:51 Ryan_Lane RandyT: <3
23:51 Ryan_Lane you even did the dict returns!
23:54 RandyT in most places... still some work to do I suspect, but step in the right direction and was great learning experience
23:55 djgerm left #salt
23:57 shoemonkey joined #salt

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