Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-04

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

All times shown according to UTC.

Time Nick Message
00:01 ninjada joined #salt
00:05 catpig joined #salt
00:08 akhter joined #salt
00:13 joe_n joined #salt
00:14 Muchoz joined #salt
00:17 flowstate joined #salt
00:26 kliquori joined #salt
00:31 hightekvagabond joined #salt
00:34 hoonetorg An Example for salt.runner: https://gist.github.com/hoonetorg/eef4fd843f0a3e3217630bf8fb0c9740
00:36 hoonetorg for sad: saltenv is ignored
00:37 hoonetorg otherwise this would work
00:37 hoonetorg copied the orchestration state over to the base env and it worked
00:58 hoonetorg https://github.com/saltstack/salt/issues/32318
00:58 saltstackbot [#32318]title: salt.runner in an orchestration state ignores saltenv  | ### Description of Issue/Question...
01:22 mavhq joined #salt
01:25 catpigger joined #salt
01:28 mcsquinty joined #salt
01:29 quasiben joined #salt
01:31 Muchoz_ joined #salt
01:33 mcsquinty left #salt
01:37 beardedeagle joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.8 | SaltConf16: http://saltconf.com/register/ | Paid support available: 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:49 iceyao joined #salt
02:05 quasiben joined #salt
02:12 armyriad joined #salt
02:12 kliquori joined #salt
02:23 RandyT_ joined #salt
02:44 evle joined #salt
02:54 minesskyline joined #salt
02:56 euidzero_ joined #salt
02:59 flowstate joined #salt
03:03 ninjada joined #salt
03:07 ninjada_ joined #salt
03:23 favadi joined #salt
03:25 flowstat_ joined #salt
03:28 pjs joined #salt
03:31 beardedeagle hrm...winrepo installs on windows masterless seem to be broken
03:37 ramteid joined #salt
03:42 armguy joined #salt
03:44 lemur joined #salt
03:44 baweaver_ joined #salt
03:58 joe_n joined #salt
04:00 euidzero_ joined #salt
04:05 euidzero_ joined #salt
04:14 kliquori joined #salt
04:15 ninjada joined #salt
04:21 josuebrunel joined #salt
04:30 josuebrunel joined #salt
04:37 euidzero_ joined #salt
04:37 joe_n joined #salt
04:42 mowntan joined #salt
04:51 flowstate joined #salt
04:54 msn joined #salt
04:54 josuebrunel joined #salt
04:54 msn does salt minion do auto refresh from salt-master and apply the result to host?
04:55 hemebond msn: You mean does the minion automatically run highstate?
04:55 hemebond No.
04:55 msn hmmm
04:55 msn so how do i make it run
04:56 msn except ofcourse adding it to cron
04:56 hemebond e.g.: salt 'minion_name' state.highstate
04:56 hemebond Or you can use the built-in job schedule.
04:57 msn okay that's something i would have preferred part of the minion. Puppet client does that. I was hoping it was same for salt too
04:58 kliquori joined #salt
05:01 beardedeagle nope, as hemebond said, salt scheduler
05:01 beardedeagle which is about as close as what you are getting from puppet is for salt
05:01 hemebond I hate that part of Puppet.
05:01 beardedeagle personally, we run masterless puppet though so meh
05:04 josuebrunel joined #salt
05:07 mavhq joined #salt
05:11 rdas joined #salt
05:20 kawa2014 joined #salt
05:25 Glasswalker joined #salt
05:27 favadi joined #salt
05:32 hightekvagabond joined #salt
05:33 xmj when i include a state within another, is there a way of getting the name of the including state in the included one?
05:34 xmj suppose included does some jails setup and should get the name of the jail to set up from the including state
05:37 thinair joined #salt
05:38 thinair what's the purpose of develop branch?
05:40 felskrone joined #salt
05:42 mavhq joined #salt
05:43 sjmh joined #salt
05:53 flowstate joined #salt
05:53 msn how can i specify a different service.running name ex. i want to instlal mysql-server/mysql-client seperately so that's the ID of the state but I want to watch for mysql as service.running how do i tell that to the state
05:57 iceyao_ joined #salt
06:00 colttt joined #salt
06:00 anmol joined #salt
06:02 brianfeister joined #salt
06:04 iggy msn: `- name:`
06:05 beardedeagle thinair: are you talking about the saltstack repo?
06:07 iggy xmj: macros?
06:07 xmj noice
06:07 xmj iggy: let me look into that
06:07 iggy msn: how do you deploy your code to the master?
06:08 cberndt joined #salt
06:10 bastiandg joined #salt
06:13 anmol joined #salt
06:14 dmaiocchi joined #salt
06:16 Rumbles joined #salt
06:16 thinair beardedeagle: yes. develop branch in salt tree. after it's installed, salt --version shows 'salt 2015.8.8 (Beryllium)'
06:16 xmj what's the current state of the art of bootstrapping salt masters?
06:17 xmj salt-call --local state.highstate   then hope&pray?
06:17 xmj (and have salt-master states defined and hooked into top.sls)
06:17 AndreasLutro I use salt-ssh for bootstrapping masters
06:17 AndreasLutro but same thing I guess
06:17 beardedeagle if you have salt-minion installed on the master, very easy
06:18 xmj cool
06:18 beardedeagle @thinair: not sure they have bumped the version yet, or if they do that on the develop branch even.
06:18 xmj AndreasLutro: i'm going to use a custom extension to freebsd's bsdinstall script, then my own DVD images
06:18 msn iggy: gitfs
06:18 xmj installing salt-minion is the easiest way to do it :)
06:19 beardedeagle pretty much
06:19 iggy msn: so setup a git webhook to poke your master when there's a commit
06:20 iggy msn: the reason salt doesn't automatically apply states is because there are so many use cases where you don't want things automatically applying and/or running needlessly on a schedule
06:21 iggy thinair: I'd imagine you have salt installed from both git and packages, and the packaged version is where you are seeing that version
06:22 thinair iggy: yes.
06:22 iggy develop shows something like this `2016.3.0-233-gf267b7b`
06:25 thinair no way to install to versions side by side?
06:25 beardedeagle virtual env?
06:25 iggy virtualenv is probably your best bet
06:25 beardedeagle lol
06:32 AndreasLutro xmj: installing a salt minion is indeed easy... unless you have no salt master!
06:32 xmj pkg install py27-salt
06:32 xmj done :p
06:37 thinair left #salt
06:44 KermitTheFragger joined #salt
06:46 Rumbles joined #salt
06:46 atmosx joined #salt
06:49 xmj iggy: thanks for the pointer to macros, this looks brilliant
06:52 flowstate joined #salt
06:55 freeaks joined #salt
06:59 kliquori joined #salt
07:00 cyborg-one joined #salt
07:09 yuhlw joined #salt
07:09 ninjada_ joined #salt
07:10 lero joined #salt
07:11 elsmo joined #salt
07:18 dgutu joined #salt
07:31 kbaikov joined #salt
07:34 atmosx_alt joined #salt
07:36 lpl joined #salt
07:36 josuebrunel joined #salt
07:37 ajolo joined #salt
07:37 lorengordon joined #salt
07:38 armyriad joined #salt
07:38 rome_390 joined #salt
07:38 dayid joined #salt
07:40 jfred joined #salt
07:40 titilambert joined #salt
07:41 Shirkdog joined #salt
07:41 tedski joined #salt
07:41 ivanjaros joined #salt
07:42 etw joined #salt
07:42 justanotheruser joined #salt
07:42 freeaks joined #salt
07:42 JohnnyRun joined #salt
07:43 JPT joined #salt
07:43 renoirb joined #salt
07:43 kliquori joined #salt
07:43 Muchoz joined #salt
07:43 KermitTheFragger joined #salt
07:44 Nazca joined #salt
07:44 anmol joined #salt
07:44 colegatron joined #salt
07:47 iggy macros are a bit like a loaded weapon... watch your toes
07:48 ivanjaros Hi, I am installing some packages and I am getting this error "There are problems and -y was used without --force-yes" what does it mean?
07:48 ivanjaros from Function: pkg.latest
07:49 iggy what version of salt?
07:49 iggy on the minion
07:49 guerby joined #salt
07:49 bdrung_work joined #salt
07:49 KermitTheFragger joined #salt
07:49 slav0nic joined #salt
07:49 ivanjaros the latest from git
07:49 ivanjaros on master it is latest from repo
07:50 iggy seems risky, but okay
07:50 s_kunk joined #salt
07:50 iggy run via `salt-call -l debug ....` and see what the actual apt command is that's being run
07:52 flowstate joined #salt
07:53 ronnix joined #salt
07:54 Muchoz joined #salt
07:56 brianfeister joined #salt
07:56 ivanjaros http://pastebin.com/ZpWcqAmc
07:57 ivanjaros i guess "WARNING: The following packages cannot be authenticated!" is the issue
07:57 ivanjaros line 340
07:57 ivanjaros is line 50-75 a correct state format?
07:57 cyborglone joined #salt
07:59 Rumbles joined #salt
07:59 cyborg-one joined #salt
08:00 iggy pkgrepo.managed supports ppa's
08:00 cyborgIone joined #salt
08:01 dyasny joined #salt
08:01 iggy oh, I see it there, commented for some reason
08:01 ivanjaros looks like https://github.com/saltstack/salt-bootstrap/issues/114
08:01 saltstackbot [#114]title: -y was used without --force-yes | ```...
08:02 iggy use pkgrepo.managed with a require_in on the pkg
08:02 iggy then you don't need the refresh: True
08:03 ivanjaros ok
08:05 iggy either way, the key should be getting added
08:06 ivanjaros hm, not even --force-yes helped
08:07 iggy skip_verify if you can't get that fixed
08:09 antpa joined #salt
08:12 ivanjaros strange that adding newer php packages is suc ha hassle :D
08:15 iggy *shrug* haven't had to deal with php in years... shouldn't be more complicated than adding a repo, gpg key, and installing
08:15 jhauser joined #salt
08:20 armyriad joined #salt
08:23 ivanjaros looks like unrelated to salt. just running apt-get install php5 -y will throw WARNING: The following packages cannot be authenticated!
08:35 JohnnyRun joined #salt
08:35 ivanjaros if anyone is interested in php - https://github.com/EasyEngine/easyengine/issues/507#issuecomment-95860569 this looks liek the cause of this issue
08:35 saltstackbot [#507]title: Unable to run apt-get install Error on fresh install | I followed these steps to install easyengine on a fresh Ubuntu 14.04 Linode server....
08:39 ninjada joined #salt
08:40 elsmo joined #salt
08:41 s_kunk joined #salt
08:49 N-Mi joined #salt
08:49 kshlm joined #salt
08:50 flowstate joined #salt
08:57 josue joined #salt
09:00 ronnix joined #salt
09:13 babilen apt-add-repository m(
09:15 west575_ joined #salt
09:17 ninjada joined #salt
09:19 Azid joined #salt
09:21 ronnix joined #salt
09:22 rdas joined #salt
09:26 xmj is it good practice to put config files in pillars?
09:27 xmj guess i'll have to abstract my environment more to make it a good idea :)
09:29 joe_n joined #salt
09:29 oida joined #salt
09:31 auzty joined #salt
09:39 west575 joined #salt
09:39 Andre-B joined #salt
09:44 lero joined #salt
09:45 kliquori joined #salt
09:45 brianfeister joined #salt
09:47 Azid joined #salt
09:48 antpa joined #salt
09:51 stooj joined #salt
09:51 flowstate joined #salt
09:53 dayid joined #salt
09:58 MadHatter42 joined #salt
09:59 antpa joined #salt
10:02 josuebrunel joined #salt
10:04 josuebrunel joined #salt
10:05 AndreasLutro xmj: not the full config file, I'd say.. just the bits that will vary from server to server or that you want to easily change in the future
10:06 xmj going to be one server with many jails, and i want to abstract the jail setup away as much as possible
10:06 joe_n joined #salt
10:06 xmj the goal is to have a "cell decanter"  . . . that spits out jails fully installed, configured, and ready to go.
10:08 brianfeister joined #salt
10:23 kawa2014 joined #salt
10:24 Rumbles joined #salt
10:27 mavhq joined #salt
10:28 kliquori joined #salt
10:38 mavhq joined #salt
10:51 flowstate joined #salt
11:00 mavhq joined #salt
11:01 cyberviking joined #salt
11:16 amcorreia joined #salt
11:17 cyberviking_ joined #salt
11:25 bluenemo joined #salt
11:25 mavhq joined #salt
11:40 bluenemo joined #salt
11:41 josuebrunel joined #salt
11:42 joe_n joined #salt
11:43 msn i am trying to use the salt.module.mysql. even though I have configuration to use localhost when i run state.highstate from master on the host it uses the external network address
11:43 iceyao joined #salt
11:45 evle joined #salt
11:48 FransUrbo joined #salt
11:50 ninjada joined #salt
11:55 FransUrbo is there a way to set the order of execution in a top.sls file? Roughly, this (https://gist.github.com/FransUrbo/38b3093c0517f38c67cc0e258ca45792) is my setup.
11:56 FransUrbo Problem is that the 'roles' part is executed (?) before the '*' part, which means that the script isn't availible... :(
11:57 AndreasLutro FransUrbo: the order of execution is just fine - but the YAML (.sls) templates are *rendered* before they are executed, which is why your thing fails
11:57 FransUrbo First running "salt-call state.apply common" will install the script for me, so I know that part works. Then running "salt-call state.highstate" does the rest...
11:57 AndreasLutro change my_role.init to use a cmd.run state that has a requirement for the "Install parse script" state
11:59 FransUrbo How do I do that, when I'm using "{% set variable=... %}" (which is then used later)?
11:59 AndreasLutro you can't do that then
11:59 AndreasLutro maybe replace my_script with a custom salt module? what are you actually doing with my_script?
11:59 FransUrbo Extracting some information from the system, ABOUT the system.
12:00 AndreasLutro custom grain or custom salt module then
12:00 AndreasLutro execution module, not salt module, sorry
12:01 FransUrbo How do i get that module installed BEFORE it's needed, if the '*' isn't run first?
12:01 akhter joined #salt
12:01 AndreasLutro state.highstate takes care of that
12:01 FransUrbo It isn't now...
12:01 AndreasLutro if you want to be extra sure, saltutil.sync_all
12:01 AndreasLutro you haven't even written the custom grain/module yet?
12:01 AndreasLutro how can you say it isn't now?
12:01 teatime if one state/file should run before another, you need requisites/dependencies enforcing that
12:02 teatime otherwise the order is undefined
12:02 FransUrbo I think I'm starting to understand what you mean now. The _modules (or whatever it was) is part of salt, not the "things to do"...
12:02 AndreasLutro correct
12:02 FransUrbo Ok, I'll try that. Thanx!
12:02 AndreasLutro salt['cmd.run'] is in fact a call to the salt module "cmd", function "run"
12:03 FransUrbo Yeah, I got that :)
12:03 FransUrbo "I'll be back" (if this doesn't work :). Thanx again!
12:05 LostSoul Hi
12:05 LostSoul Is is possible to copy recurisively but in the same time use Jinja template?
12:05 AndreasLutro yes, just specify - template: jinja as you would with file.managed
12:06 sk_0 joined #salt
12:06 LostSoul So I can copy folder recursively and use jinja only up to 2-3 files from 10 I'm copying? :)
12:06 AndreasLutro the jinja templating engine will be invoked for every file
12:07 AndreasLutro but unless your config files use {{ {% etc that's usually not a problem
12:12 M-MadsRC joined #salt
12:20 sxar_ joined #salt
12:21 averell joined #salt
12:21 morissette joined #salt
12:21 mapu joined #salt
12:22 felskrone can i execute a state file directly on a minion without having to sync modules etc..?
12:24 AndreasLutro felskrone: salt-call state.apply name_of_sls
12:24 anmol joined #salt
12:25 felskrone AndreasLutro: will take look, thx
12:30 M-liberdiko joined #salt
12:30 remyd1 joined #salt
12:30 kliquori joined #salt
12:31 remyd1 Hi. Did anyone manage files/templates in states with a mix of file.accumulated file.blockreplace and file.managed/context ?
12:33 remyd1 I am trying to generate a dhcpd.conf file with a pillar
12:33 remyd1 and I need to loop and use blockreplace
12:33 josuebrunel joined #salt
12:33 remyd1 with file.accumulated
12:33 remyd1 documentation is not so useful
12:35 remyd1 here is my dhcpd.conf template : http://paste.debian.net/423800/
12:41 remyd1 and my draft state: http://paste.debian.net/423805/
12:42 remyd1 but I do not know how to do
12:42 FransUrbo joined #salt
12:42 akhter joined #salt
12:42 drawsmcgraw joined #salt
12:43 edrocks joined #salt
12:43 FransUrbo AndreasLutro: Ok, I have a module, but how do I call it? I thought this would work:
12:43 FransUrbo {% set variable=salt['my_script']('script_option') %}
12:43 FransUrbo But I just get
12:44 FransUrbo Rendering SLS 'base:flannel' failed: Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'my_script'
12:44 ronnix joined #salt
12:46 overyander joined #salt
12:46 remyd1 FransUrbo: did you synchronize your modules ?
12:46 FransUrbo Yes.
12:48 remyd1 You can check by launching a python interpreter as python or ipython
12:48 remyd1 import salt.client
12:48 remyd1 caller = salt.client.Caller()
12:49 remyd1 foo = caller.function('module.bar', 'myarg')
12:49 remyd1 print foo
12:50 remyd1 Otherwise, it is the right way to call module.
12:51 FransUrbo Gives me KeyError.
12:51 numkem joined #salt
12:51 JohnnyRun joined #salt
12:52 mavhq joined #salt
12:52 remyd1 So, there is no value with the key you want
12:52 akhter_1 joined #salt
12:53 remyd1 try to call it without the arg
12:53 remyd1 and print(repr(foo))
12:54 FransUrbo Same thing.
12:54 quasiben joined #salt
12:54 ivanjaros im new to salt and it looks to me like if i don't list all packages i want to install with all their dependencies the state wil fail. is there a switch that will take care of dependencies? i haven't seen any in docs
12:56 Salty joined #salt
12:58 ivanjaros hm, ignore. seems like it is an issue with apt and not salt
13:00 remyd1 FransUrbo: check carefully what you should have in the return value
13:00 remyd1 of your module
13:00 Salty Hey guys, can someone check this out and advice? http://paste.ubuntu.com/15612124/
13:00 AndreasLutro FransUrbo: what is the full path to your module?
13:01 AndreasLutro and what is the name of the function in your module you want to call?
13:02 subsignal joined #salt
13:02 LostSoul Thanks AndreasLutro :)
13:02 colttt joined #salt
13:07 Salty Hey guys, trying to install java from an rpm on a minion using state- im getting this error. Can someone please advice? http://paste.ubuntu.com/15612124/
13:08 nZac joined #salt
13:09 Muchoz joined #salt
13:10 gh34 joined #salt
13:11 nZac joined #salt
13:12 kliquori joined #salt
13:13 Poulp joined #salt
13:14 AndreasLutro Salty: you're missing - match: grain on the second matcher
13:14 _Cyclone_ joined #salt
13:16 akhter joined #salt
13:17 Salty thanks, ill check it out
13:17 mavhq joined #salt
13:19 JohnnyRun joined #salt
13:22 anmol joined #salt
13:25 colttt joined #salt
13:26 mavhq joined #salt
13:27 kawa2014 joined #salt
13:28 mavhq joined #salt
13:30 akhter_1 joined #salt
13:30 tkharju joined #salt
13:34 ronnix joined #salt
13:35 impi joined #salt
13:37 mapu joined #salt
13:37 antpa joined #salt
13:39 akhter joined #salt
13:39 DammitJim joined #salt
13:42 akhter joined #salt
13:44 Tanta joined #salt
13:44 akhter joined #salt
13:45 flowstate joined #salt
13:47 mapu joined #salt
13:47 flowstate joined #salt
13:50 hasues joined #salt
13:52 colttt joined #salt
13:53 hasues left #salt
13:53 johnkeates joined #salt
13:54 johnkeates I have: https://gist.github.com/johnkeates/c26a9b381bf61672b07302034fcfc638 in a pillar. I want to put filebeat.config subtree into a text file exactly as-is, file.serialize doesn't do it as it messes up the formatting
13:55 johnkeates I added the state and output for demonstration to the gist
13:57 teatime johnkeates: pillar data doesn't exist as text
13:58 johnkeates i know
13:58 teatime the text is parsed and turned into a data structure
13:58 johnkeates yes, but the YAML data represented should be serialisable into the same format as the source, no?
13:58 teatime the input and the output are equivalent yaml
13:59 johnkeates but when I have the app parse it, it fails
13:59 teatime I don't see anything invalid about the YAML in output.txt
13:59 johnkeates check line 11 https://gist.github.com/johnkeates/c26a9b381bf61672b07302034fcfc638#file-gistfile1-txt-L11
13:59 jerredbell joined #salt
13:59 johnkeates this is a filebeat 'prospector'
13:59 johnkeates it has paths and an input_type
14:00 johnkeates the output file doesn't have the same data for that prospector
14:00 johnkeates it seems to add input_type as a property of prospectors
14:00 johnkeates instead of the prospector it was defined for
14:01 teatime oh you're right teh structure is different
14:01 teatime but I've ever seen that use of '-' on a line by itself you're doing in the input
14:01 teatime is that valid yaml?
14:01 johnkeates it is
14:01 johnkeates i ran it trough validators just to be sure
14:01 johnkeates the log stash software does the same as a format
14:01 johnkeates not sure why elastic makes software that wants yaml data that way :p
14:02 teatime - dataset: {{ filebeat.config }}
14:02 johnkeates yes
14:02 teatime this is probably going to do weirdness
14:02 johnkeates and inside filebeat.config there is filebeat again
14:02 johnkeates so the output matches what filebeat expects
14:03 teatime since jinja is going to replace that variable before the .sls is parsed
14:03 teatime I'm just talking about indenting and stuff
14:03 johnkeates yeah
14:03 johnkeates what option is there to assign a dataset to be serialised without using dataset?
14:04 akhter_1 joined #salt
14:04 andrew_v joined #salt
14:04 racooper joined #salt
14:04 teatime dataset_pillar
14:04 teatime but even if that didn't exist you should've used something like a multi-line string there
14:05 johnkeates where? in the source pillar? or the state
14:05 teatime in the state
14:06 johnkeates as the source data? or as the state setup
14:07 teatime in the last file, the .sls file, in your gist
14:07 teatime where the line I pasted came from
14:07 teatime is dataset_pillar not in your version or something?
14:08 johnkeates it is, but multiline data inside the state file makes no sense, it won't be able to pull data from the pillar right?
14:08 teatime ok, we're disconnected from each other somewhere
14:08 johnkeates yeah
14:08 johnkeates it seems so :p
14:08 johnkeates "<teatime> but even if that didn't exist you should've used something like a multi-line string there"
14:08 _JZ_ joined #salt
14:08 akhter joined #salt
14:09 johnkeates the idea is: pillar data -> map.jinja -> defaults.yml, then into the state, and out comes a yml file
14:09 teatime "multiline data inside the state file makes no sense"  <--  this is exactly my point, when you do "    - dataset: {{ filebeat.config }}", this is dumb text replacement, and presumably multi-line, so it's going to make a mess of the file
14:09 johnkeates oh
14:09 johnkeates ah
14:09 johnkeates yes
14:09 johnkeates sorry! I see
14:09 teatime and yes, contents_pillar/states can access pillar data
14:09 johnkeates i used jinja substitution
14:09 teatime yup
14:09 johnkeates that is completely wrong
14:09 johnkeates guess its time for more coffee
14:09 johnkeates ... or less
14:10 teatime hehe
14:10 akhter_ joined #salt
14:11 teatime there's a module that displays as-rendered sls, I think, for debugging
14:11 johnkeates yeah, i have been looking for that
14:11 johnkeates currently i just use a vagrant box as a formula tester
14:11 kawa2014 joined #salt
14:11 johnkeates it's reasonably fast as I only load the formula i work on
14:13 cswang joined #salt
14:13 FransUrbo AndreasLutro: Sorry, lunch :). Function!?
14:14 colttt joined #salt
14:14 catpig joined #salt
14:15 teatime salt 'minion.example.com' slsutil.renderer /path/to/file.jinja 'jinja'
14:15 teatime ^^ might be what I'[m thinking of
14:16 teatime https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.slsutil.html#module-salt.modules.slsutil
14:17 ninjada joined #salt
14:19 DammitJim joined #salt
14:19 tpaul joined #salt
14:19 Brew joined #salt
14:22 favadi joined #salt
14:22 antpa joined #salt
14:23 remyd1 Grrrrrr
14:23 remyd1 I have that kind of pillar: http://paste.debian.net/423833/
14:23 remyd1 and when I try to parse it
14:23 remyd1 I get
14:23 remyd1 - ID dns in SLS hosts.install.files is not a dictionary
14:24 remyd1 same for dhcprange
14:24 teatime and relatedly:  https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_sls  and show_top
14:25 teatime how are you using it to get that error?
14:25 remyd1 in my state i have http://paste.debian.net/423836/
14:25 teatime pillar data looks valid, but it's true those aren't dictionaries they're lists
14:26 remyd1 I know, I just want to retrieve the value directly without a loop
14:28 remyd1 - Rendering SLS 'base:hosts.install.files' failed: Jinja variable 'str object' has no attribute 'dns'
14:28 remyd1 ?
14:29 teatime now that error makes more sense
14:30 ronnix joined #salt
14:30 teatime what you've got is a loop, that will get called with net="subnet" conf="10.1.10.0", then net="netmask" conf="255.255.255.0", etc.
14:30 teatime for/iteritems doesn't work like your example seems to expect.
14:31 StolenToast can someone see why this state "is not formed as a list"? http://hastebin.com/cafihukeji.rb
14:33 johnkeates it's because it's not a list
14:33 teatime StolenToast: http://hastebin.com/evuhacareg.rb
14:33 remyd1 teatime: so how would you do this ? Without "iteritem()" ?
14:33 StolenToast teatime: lemme give it a go
14:33 digitalhero joined #salt
14:34 remyd1 e.g. : {% set conf =  salt['pillar.get']('network', {}) %}
14:34 remyd1 ?
14:34 teatime yup, that should work
14:34 remyd1 ok; thx
14:34 teatime but, I dunno why you'd ever want to have that many set things
14:35 teatime just do that ^^ and then use conf['dns'][0] later instead of dns1
14:35 Tanta_G joined #salt
14:35 teatime or whatever
14:35 lero joined #salt
14:36 StolenToast teatime: thanks
14:36 teatime yay I'm 3 for 3
14:37 remyd1 it is just because it is easier to understand the overall state file
14:38 babilen Do you guys have opinions on https://github.com/saltstack-formulas/sysctl-formula/blob/master/pillar.example
14:38 babilen I'd like to drop the "lookup" in valid pillar settings (trivial), but would also like to get rid of the unsightly interface that is params
14:39 johnkeates yeah, that's ugly indeed
14:39 teatime params2 is a terrible name.
14:39 babilen Unfortunately they didn't decide to check the collection type and use "params" for both (list or dictionary), so we sort of have to keep "params2", but I find that rather unfortunate
14:39 johnkeates i'm working with some software that expects the same dict-in-anonymous-list voodoo as well
14:39 johnkeates it's annoying as hell
14:40 babilen Yeah, I will not deploy that and would rather maintain a local fork.
14:40 babilen It is annoying ..
14:40 debian112 joined #salt
14:40 teatime if it were me I'd have params: just be a dict mapping string sysctl values to their values, and have them all end up in one file.
14:41 teatime the flexibility of being able to put them into arbitrary files in sysctl.d is nice since it's a general-purpose module
14:41 babilen I think that params2 is actually an acceptable format as it allows users to specify the file themselves.
14:41 babilen If I were to deploy that locally I'd drop that functionality too and just use some default
14:41 teatime but it could default to /etc/sysctl.conf.d/salt-sysctls.conf or something and I'd totally use that default
14:41 babilen Just don't want to remove too much
14:42 teatime or even /etc/sysctl.conf heh
14:42 teatime babilen: you might misunderstand me about 'params2' or perhaps I understand what params2 does?
14:42 teatime *misunderstand
14:43 teatime oh, it's just a different format?
14:43 teatime yeah that's better...
14:45 babilen They realised that "params" is horrible and introduced "params2" which is, well, a bad name.
14:45 babilen It would have been easier to simply make a distinction based on the collection type, but now that people started using "params2" we sort of have to support that still
14:46 babilen Just wanted to make sure that the format is okay with others if I change that to: https://www.refheap.com/116878
14:47 babilen Just have to see if I can do that in some backwards compatible way.
14:48 teatime babilen: this is what I would do, seems simple enough to test 'is string' in jinja:
14:48 teatime https://gist.github.com/pprince/a4329a1dd35722c882e20a32ebc2c4f1
14:48 teatime it doesn't try to be backwards compatible, but easily could be
14:48 Fiber^ joined #salt
14:49 teatime babilen: it appears we see eye-to-eye.
14:49 StolenToast why do I have to define file.line.after/before if I've already specified file.line.location: end?
14:49 StolenToast I'd think "end" is specific enough...
14:51 babilen teatime: I like that - I'll play with it this evening or tomorrow. Shouldn't be too hard to write some logic.
14:51 babilen Thanks
14:52 babilen Exactly why I asked for other opinions :)
14:53 kaptk2 joined #salt
14:56 StolenToast I can't really find an unambiguous line I want to place this line after always
14:56 StolenToast https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.line
14:57 spuder joined #salt
14:57 hosttor joined #salt
14:58 teatime StolenToast: 99% of the time, the right thing to do is manage the whole file, not specific lines.
14:58 StolenToast I think this is a 1% case
14:58 StolenToast I can just add a line for it to look for
14:59 beardedeagle joined #salt
14:59 teatime also perhaps file.append instead
14:59 beardedeagle https://rpm.newrelic.com/accounts/801234/applications
14:59 beardedeagle oops
14:59 beardedeagle ignore me
14:59 johnkeates okay
15:00 * johnkeates ignores beardedeagle as requested
15:00 johnkeates lalalal I CANT HEAR YOU lalalalal
15:00 johnkeates ;-)
15:01 akhter joined #salt
15:01 StolenToast teatime: the problem with that is it will add the line every time the state is run
15:01 StolenToast I worked around it by adding a "salt-managed" line for the state to look for
15:01 teatime but it says "The text will not be appended if it already exists in the file."
15:01 StolenToast makes it cleaner too
15:01 StolenToast oh neat
15:02 heaje joined #salt
15:02 StolenToast well then yeah that will work too
15:02 teatime I wish file.line before/after were better documented
15:02 teatime I dunno exactly what they do.
15:02 teatime but I have yet to want to use file.line, so I guess it's OK
15:03 teatime just that it comes up here often.
15:03 StolenToast It's a line the executor looks for and then adds your line in before/after
15:03 StolenToast but as I mentioned earlier it seems moot if I specify "end" to place it after everything
15:03 StolenToast oh well, it works now
15:03 digitalhero joined #salt
15:04 akhter_1 joined #salt
15:06 akhter_1 joined #salt
15:06 StolenToast I switched it to append because file.before adds in another inherent dependency which may not be met
15:07 StolenToast and I hate that
15:08 akhter joined #salt
15:08 teatime also it says it be a regex or the exact string to match
15:08 teatime but how to specify which it is
15:09 snicers-work2 I have a memoryleak in my minion.
15:09 teatime if I do before: 'Files .*'  that means very different things as a regex or a string
15:09 snicers-work2 I had 111MB ram used Friday and today it is up to 248MB
15:09 teatime just more reasons not to use file.line, I guess.
15:09 snicers-work2 Any suggestions to track down why?
15:09 teatime snicers-work2: how are you determining ram used?
15:10 snicers-work2 htop and looking at RES
15:10 akhter_1 joined #salt
15:11 nZac joined #salt
15:17 mavhq joined #salt
15:19 ivanjaros joined #salt
15:30 quix joined #salt
15:32 antpa joined #salt
15:34 catpig joined #salt
15:34 digitalhero joined #salt
15:37 flowstate joined #salt
15:49 mapu_ joined #salt
15:49 johnkeates teatime: fixed the bloody anonymous list bs from that formula i was working on; seems it was parsed by a Go library for YML files, it works with random dict-in-lists with fake names instead of empty names too, problem solved! :D
15:50 akhter joined #salt
15:51 teatime which bs?
15:53 johnkeates this: https://gist.github.com/johnkeates/c26a9b381bf61672b07302034fcfc638#file-gistfile1-txt-L11
15:53 johnkeates the one with the empty list node with a dict in it
15:53 johnkeates it wouldn't YAML->pillar->YAML map correctly
15:53 johnkeates no matter what formatting or parser
15:54 johnkeates so figured the YAML parser for the app the formula is for must have multiple methods of reading the config file that state manages
15:54 johnkeates and it does
15:54 johnkeates so yay
15:54 teatime it seems like you still didn't get what I was saying about "- dataset: {{ filebeat.config }}" ?
15:55 teatime did you ever try dataset_pillar instead ?
15:55 johnkeates yes i did
15:55 johnkeates but the data represented doesn't come out the same way
15:55 johnkeates the YAML syntax is correct
15:55 johnkeates but when the parsed pillar data is put back in to YAML format the syntax is different/newer
15:55 johnkeates it's fed in like this: - dataset_pillar: filebeat:config
15:55 johnkeates which works fine, data is data
15:56 teatime oh also... now that I look at it again, it's *not* different structure in the 2 yamls
15:56 johnkeates exactly
15:56 johnkeates but filebeat thinks it is anyway
15:56 teatime I see.
15:56 johnkeates probably because of the Go library used
15:56 antpa joined #salt
15:56 teatime YAML spec is annoying... but non-compliant parsers are moreso :)
15:56 johnkeates so I figured I could force a certain parsing path by making the list a bit more normal and less 'here have a whitespace, a newline and then a dict'
15:56 johnkeates yeah
15:58 ferbla joined #salt
16:00 phila_ joined #salt
16:00 akhter_1 joined #salt
16:00 digitalhero joined #salt
16:01 ferbla What should I do if I found an error in the docs.saltstack.com?
16:01 akhter_ joined #salt
16:01 teatime fork the repo, fix it, and submit a PR :)
16:01 teatime or if can't manage that, file an issue on github.
16:02 ferbla Sounds good. Thanks teatime!
16:03 teryx510 joined #salt
16:03 Eugene The salt-cloud documentation for proxmox(https://docs.saltstack.com/en/latest/topics/cloud/proxmox.html) states that "installing Salt on it will only be done when the VM is an OpenVZ container rather than a KVM virtual machine." Is there any more info I can read on this / an open ticket?
16:04 spuder_ joined #salt
16:04 Eugene https://github.com/saltstack/salt/issues/32066 just calls the docs out-of-date
16:04 saltstackbot [#32066]title: Proxmox docs outdated | ...
16:05 paydro joined #salt
16:05 Andre-B joined #salt
16:08 rm_jorge joined #salt
16:08 berserk joined #salt
16:13 sjorge joined #salt
16:13 sjorge joined #salt
16:16 akhter joined #salt
16:17 antpa joined #salt
16:18 CeBe joined #salt
16:19 ninjada joined #salt
16:21 UtahDave joined #salt
16:21 neil joined #salt
16:23 djgerm how would one use grains from one minion in a state targeted to another?
16:23 djgerm specifically based on the event of creation of the new minion
16:24 AndreasLutro you'd have to find a way to put it into the mine data
16:24 djgerm so basically the reactor is firing off upon creation, and I want to use grain data from the new minion to apply state to another minion.
16:25 djgerm ok mine data. I've not really gone into the mine at all yet
16:25 AndreasLutro orchestration might fit your bill as well
16:25 AndreasLutro depends on how static/dynamic you need whatever you're doing to be
16:26 mapu joined #salt
16:26 djgerm in my book, it's pretty static. when new minions appear, take their name, domain, ip4 and update the DNS servers…
16:26 akhter_1 joined #salt
16:26 akhter_ joined #salt
16:26 AndreasLutro right, mine data would be a good fit for that
16:26 murrdoc joined #salt
16:27 Guest47158 I'm seeing service.running failures with 2015.8.8.2 on CentOS/RHEL 7.2 for services which install both sysv and systemd services.  Anyone find a workaround?
16:27 TyrfingM1olnir joined #salt
16:28 brotatochip joined #salt
16:31 wendall911 joined #salt
16:33 TyrfingMjolnir joined #salt
16:34 garphy joined #salt
16:35 ekristen joined #salt
16:36 impi joined #salt
16:36 Edgan Guest47158: delete one, or make your own packages
16:37 Edgan Guest47158: If you are using Salt, you should be able to do a file.absent to make sure it stays away
16:39 flowstate joined #salt
16:40 akhter joined #salt
16:45 antpa joined #salt
16:46 writtenoff joined #salt
16:48 grumm_servire joined #salt
16:48 antpa joined #salt
16:49 cyberviking joined #salt
16:50 paydro joined #salt
16:52 brotatochip hey guys, i’m just getting started building out satstack for cm. Is it possilbe to write a grains file that has a case statement that assigns variables per hostname?
16:52 AndreasLutro brotatochip: write a custom grain, which can be written in python
16:53 brotatochip right, just wondering what the syntax would look like, i’m not seeing any examples of this in the docs
16:53 AndreasLutro https://docs.saltstack.com/en/latest/topics/targeting/grains.html#writing-grains
16:54 brotatochip yeah, i read through that
16:54 AndreasLutro then I'm confused by your complaint because that shows a working example
16:55 UtahDave brotatochip: It's just straight python, so you can pretty much do anything you want as long as you return a dictionary
16:55 brotatochip the question is how would i set up a case statement that uses the hostname (or the localhost grain) to define custom grains?
16:55 UtahDave I would suggest not making it too resource intensive so that your minion daemon doesn't take forever to start up
16:56 brotatochip i guess the question would be what is the best practice here when setting up my per node variables?
16:56 AndreasLutro brotatochip: you could look up "how to get hostname in python" I guess
16:56 brotatochip i’m also going to set up per environment variables
16:56 invalidexception joined #salt
16:56 brotatochip i would imagine grains is the way to do this
16:56 UtahDave import socket
16:56 StolenToast python is super easy about all that system information stuff
16:56 UtahDave hostname = socket.gethostname()
16:56 StolenToast ^
16:57 AndreasLutro per environment variables are probably more suited for pillars
16:57 beardedeagle if you dont want to go custom python
16:57 beardedeagle just cmd.run
16:57 mapu joined #salt
16:57 beardedeagle https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions
16:58 brotatochip ah, ok, what I didn’t also see in the docs was how to pill in a pillar variable into a jnija template
16:58 brotatochip jinja*
16:58 zifnab brotatochip: which cm?
16:59 zifnab just out of curiousity
16:59 brotatochip saltstack
16:59 zifnab "I'm getting started setting up saltstack for cm"
16:59 brotatochip config management
16:59 zifnab ah
16:59 johnkeates cmmi?
16:59 zifnab nevermind
16:59 johnkeates six sigma?
16:59 johnkeates iso20k?
16:59 johnkeates itil3?
16:59 beardedeagle oh jesus
16:59 Eugene Acronym confusion abounds
16:59 johnkeates haha
16:59 zifnab i work for a CM, why i was curious
16:59 zifnab wanted to know if i needed to go bitchslap someone
16:59 johnkeates a cM? condom manufacturer?
16:59 zifnab sure
16:59 zifnab that sounds fun
17:00 Eugene Not like you'd ever use them, badum-tish
17:00 johnkeates haha
17:00 StolenToast ISO 9000 is a license to kill!?
17:00 johnkeates yes
17:00 Eugene (zifnab is my neighbor)
17:00 foundatron_ Cowboy machine, yeeeehah
17:00 johnkeates iso9001 is license to kill with quality
17:00 zifnab Eugene: <3
17:00 brotatochip cheese melter
17:00 johnkeates cock melter
17:00 zifnab Eugene: more like roommate at this point. speaking of which, my car still smells like dog farts.
17:00 brotatochip oh snap
17:00 johnkeates car melter?
17:00 Eugene Roll the windows down
17:00 zifnab i did
17:01 johnkeates crap maker?
17:01 johnkeates roll the linuxes down too
17:01 johnkeates and the bid's
17:01 johnkeates roll them all down
17:01 johnkeates even react OS
17:01 johnkeates which is like rolling down windows
17:01 johnkeates but free
17:01 xmj did i join #defocus?
17:01 foundatron_ #salt you're drunk. go home
17:02 johnkeates you joined #snails and since this is salt, death is the result
17:02 johnkeates death of #defocus
17:02 Eugene That's slugs
17:02 johnkeates death of #focus, i mean
17:02 johnkeates slugs?
17:02 johnkeates aren't those from guns?
17:02 cberndt joined #salt
17:02 StolenToast you're thinking of corks
17:03 flowstate joined #salt
17:03 johnkeates industrial salt stacking: http://www.acornwater.ie/content/images/static/_editor_industrial_salt3.jpg
17:04 brotatochip so guys, would my grains file look like this? (my python fu is weak, please forgive)
17:04 brotatochip http://pastebin.com/UCyE1keT
17:05 akhter_1 joined #salt
17:05 johnkeates no, more like this: https://woodgears.ca/macro/salt_grains.jpg
17:05 brotatochip lmao
17:05 UtahDave brotatochip: Yeah, that should work
17:05 brotatochip A+, would get trolled again
17:05 johnkeates haha
17:06 johnkeates i'm so unhelpful right now i should just shut up and get some coffee :p
17:06 brotatochip sweet thanks UtahDave
17:06 UtahDave brotatochip: oh, don't forget to add    import socket
17:06 brotatochip k, thanks
17:06 johnkeates you can test it from the python cli to be sure
17:06 UtahDave brotatochip: at the top below your pythen env statement
17:07 brotatochip right
17:07 flowstate joined #salt
17:08 hackel joined #salt
17:09 ekristen joined #salt
17:10 aharvey joined #salt
17:12 akhter joined #salt
17:13 flowstat_ joined #salt
17:15 onlyanegg joined #salt
17:19 onlyanegg joined #salt
17:21 cedwards joined #salt
17:22 onlyanegg joined #salt
17:26 mavhq joined #salt
17:26 onlyaneg1 joined #salt
17:26 flowstate joined #salt
17:31 antpa joined #salt
17:31 akhter joined #salt
17:34 SpX joined #salt
17:35 flowstate joined #salt
17:38 flowstate joined #salt
17:39 brotatochip joined #salt
17:42 beardedeagle will salt-cloud accept a comma delimited string of profiles? I know novaclient would allow this, just checking that salt-cloud wont shit itself
17:42 onlyanegg joined #salt
17:44 mavhq joined #salt
17:44 UtahDave beardedeagle: I think you can only provide one profile on the cli, but a cloud map will allow you to use as many profiles as you want
17:45 onlyanegg joined #salt
17:46 beardedeagle so usecase for this is I have 3 zones, one is full. I want to feed salt-cloud a list of profiles (re: zones) so that openstack will assign the vm to whatever zone has capacity
17:46 onlyanegg joined #salt
17:47 onlyanegg joined #salt
17:48 RandyT_ joined #salt
17:51 beardedeagle woot
17:51 beardedeagle got it to work
17:52 beardedeagle just specify the zones in your profile rather than to salt-cloud
17:52 UtahDave beardedeagle: nice
17:52 mavhq joined #salt
17:55 akhter joined #salt
17:56 antpa joined #salt
17:56 beardedeagle availability_zone: phx-private-gen-zone-1,phx-private-gen-zone-2,phx-private-gen-zone-3
17:57 beardedeagle got placed on 3
17:57 beardedeagle since 2 is full
17:57 dude joined #salt
17:57 beardedeagle should probably add that to the docs...
17:58 fer_bla joined #salt
17:58 hightekvagabond joined #salt
17:58 baweaver joined #salt
18:00 akhter_1 joined #salt
18:00 ferbla_ joined #salt
18:00 Tyrm joined #salt
18:01 dude hello - I'm working to get windows updates installed on my minions - windows 7 reports that there are important and optional updates ready for installation, but when I run "
18:02 dude "salt 'win*' win_update.list_updates categories="['Updates', 'Critical Updates', 'Security Updates', 'Windows7', 'Important']" verbose=True"  this is returned...
18:02 dude win_starfox:     There are 0 updates. They are as follows:
18:02 dude what am I missing?
18:04 XenophonF joined #salt
18:04 winsalt have you tried it without specifying categories, dude
18:05 dude yes - nearly same result - "There are 0 updates, by category there are:"
18:05 dude BTW this is a windows 7 minion
18:06 akhter joined #salt
18:06 brotatochip joined #salt
18:08 CeBe joined #salt
18:08 DammitJim joined #salt
18:08 akhter joined #salt
18:09 UtahDave dude: what version of Salt are you running?    Have you looked at the wua module instead? That was rewritten from the ground up not too long ago in 2015.8.0   https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_wua.html#module-salt.modules.win_wua
18:10 hightekvagabond joined #salt
18:10 mavhq joined #salt
18:12 ageorgop joined #salt
18:13 baweaver joined #salt
18:14 akhter joined #salt
18:14 dude Salt-Minion-2015.8.8-2-AMD64-Setup.exe
18:15 dude and wua returns " 'wua.list_updates' is not available."
18:15 akhter joined #salt
18:17 UtahDave odd.
18:17 djgerm left #salt
18:17 UtahDave what's the output of     salt '<windows minion id>' sys.list_functions wua
18:19 dude ERROR: Minions returned with non-zero exit code
18:19 bluenemo joined #salt
18:20 dude from logs - ServerModule  was not loaded because no valid module file was found
18:20 dude I installed RSAT on this WIN7 minion...
18:20 s_kunk joined #salt
18:20 s_kunk joined #salt
18:20 dude ServerManager not ServerModule
18:21 baweaver joined #salt
18:22 mavhq joined #salt
18:23 StolenToast does anyone know a quick reliable way to kill off any extra minions that hosts may be running?
18:24 teatime do you mean jobs?
18:24 teatime it shouldn't be very easy to accidentally be running multiple minions on a host.
18:24 StolenToast no the minions, multiple minion processes
18:24 StolenToast they'll respond multiple times
18:25 teatime how did you get that to happen?  starting minion manually for debugging?
18:25 StolenToast I'm not sure, I think they are leftover from a long time ago when I was first setting salt up and didn't know it very well
18:26 teatime does it start multiple minions at boot?
18:26 hightekvagabond joined #salt
18:26 StolenToast but I've got 1000 minions and a handful of stragglers
18:26 StolenToast no only one minion at boot but these nodes frun long-term compute jobs so I can't simply rebutt them
18:27 teatime if not, I'd 1) stop minion service using system init system; 2) killall salt-minion; 3) start minion service
18:28 StolenToast yeah that's my normal method but it requires another tool (namely pdsh)
18:28 StolenToast I'd like to consolidate all of these management tasks to salt if possible
18:28 StolenToast pdsh is old and makes me nervous
18:29 Tanta_G salt cmd.run 'test "$(ps uax | grep [s]alt-minion | wc -l)" = "1" || echo "$(hostname) has extra salt-minions running"'
18:29 quix joined #salt
18:29 teatime you can do what you want via salt but it's probably not worth the effort for a one-off fix that you will not have to repeat.
18:29 ajw0100 joined #salt
18:29 StolenToast I once tried "cmd.run pkill salt-minion;service salt-minion start"
18:29 teatime Tanta_G: good idea, although the normal case seems to be 2x 'salt-minion' processes running :)
18:29 teatime a parent and a child
18:29 Tanta_G then replace "1" with "2"
18:30 Tanta_G I run masterless so no processes to check :P
18:30 teatime StolenToast: that has an obvious problem :)
18:30 StolenToast Tanta_G: nice string, thanks
18:30 StolenToast well salt will obviously fail to respond on that particular job
18:30 StolenToast but it would work in the end
18:31 teatime StolenToast: you might can get by with something like this though:  cmd.run 'echo "service salt-minion stop; pkill salt-minion; service salt-minion start" | at now'
18:31 Tanta_G salt cmd.run 'pkill --signal SIGTERM "[s]alt-minion" && systemctl start salt-minion'
18:31 Tanta_G something similar to that ought to give you fresh minions
18:31 teatime StolenToast: I don't know if it will reliably work in the end, though.
18:31 StolenToast I think it won't reliably kill ALL minion processes
18:32 StolenToast just the one that systemd started
18:32 teatime '--signal SIGTERM' is redundant
18:32 teatime StolenToast: why do you feel that?
18:33 StolenToast because systemctl killing a process will look for the PID in the lock file and kill it, right?
18:33 StolenToast like using "service"
18:33 UtahDave also, salt-ssh can be used for these kinds of tasks as well
18:33 teatime Tanta_G: I feel like that is even more likely to fail to start the minion.
18:33 teatime StolenToast: hence the killall/pkill step
18:34 Tanta_G salt cmd.run 'ps tax | grep [s]alt-minion | awk \'{ print "kill -9 " $2 }\' | sh -x && <cmd to start minion>'
18:34 Tanta_G irc client replaced uax with tax there, it's ps uax
18:34 teatime Tanta_G: you're not improving on previously-posted commands
18:34 teatime that's what killall/pkill does
18:35 StolenToast so far it seems that "pkill salt-minion" will kill any minion processes
18:35 teatime btw, -9 is SIGKILL, not SIGTERM, if you were thinking earlier that '--signal SIGTERM' == -9
18:35 polyidus joined #salt
18:35 StolenToast the only problem is that the minion then goes dark and I just have to wait for timeout
18:35 Tanta_G I know, kill -9 will definitely stop any process
18:35 StolenToast UtahDave has a point
18:35 teatime StolenToast: once again:
18:35 teatime you might can get by with something like this though:  cmd.run 'echo "service salt-minion stop; pkill salt-minion; service salt-minion start" | at now'
18:35 StolenToast salt-ssh can be run without a minion
18:36 amcorreia joined #salt
18:36 StolenToast what does at do again?
18:36 StolenToast scheduler?
18:36 Tanta_G I use a very similar construct to re-initiate high state by terminating an active salt-call process, and calling another high state
18:36 teatime runs a command at a specific time
18:36 AndreasLutro might as well just use ssh then
18:37 teatime it's a workaround in this case for the command executing getting interrupted when the salt-minion executing it dies
18:37 teatime you can also use 'now + 1 minutes'
18:37 StolenToast cmd.run "a; b; c" will finish the thread even if the minion dies
18:38 StolenToast or maybe a & b & cm I forget which I used
18:38 teatime I don't really beleive that
18:38 Tanta_G don't do a & b & c & if you want them chained in order
18:38 Tanta_G that will just background all 3 as soon as fork() is called
18:38 kawa2014 joined #salt
18:38 teatime you may be thinking of && but you wouldn't want that here.
18:38 StolenToast no
18:39 aharvey joined #salt
18:42 teatime 'cmd.run "a; b; c" will finish the thread even if the minion dies' this may have worked for you in practice thus far, but beleiving it's a universal truth relies on assumptions that I don't beleive you can rely on.
18:43 StolenToast I think the shiniest and best solution is a cron job
18:43 StolenToast perhaps even managed by salt
18:43 StolenToast written in python
18:43 teatime this issue really shouldn't require a general, constant-on solution
18:44 StolenToast I'm thinking like once a day
18:44 teatime the answer to avoiding extraneous minions is: don't start extraneous minions.
18:44 DammitJim is there a salt autofs ?
18:44 * StolenToast writes that down
18:45 StolenToast I just have too many minions to solve everything piecemeal, so I have to determine whether problems that occur are likely to keep occurring
18:45 brotatochip joined #salt
18:45 StolenToast in the end this isn't even a big deal
18:45 StolenToast highstate twice is identical to highstate once, so whatever
18:46 teatime ehh... I don't know how true that is either
18:46 StolenToast if it's not then something is wrong with my states...
18:46 teatime not the state part
18:47 teatime I do not know if the minion is designed to allow multiple minion processes to operate on the same cache etc. data simultaneously without corrupting it
18:47 teatime so in the absence of knowing that is true, I am forced to assume it's not.
18:47 teatime (as far as in, what things I can consider to be safe to do)
18:48 StolenToast as I am here I realize I haven't gotten any dual responses since 5 hours ago
18:48 StolenToast it seems to only happen once per day per host that has it
18:49 StolenToast there was a bug a while ago having to do with minions on a 24 hour cycle
18:50 StolenToast and once that cycle flips over then the minions would fail the first salt-call of the day, but only the first
18:50 Guest47158 @Edgan wrt systemd services -- thanks!  Embarrassed to say that just appending ".service" to the service name solves the problem.
18:50 StolenToast iirc it was solved by some line involving rotation
18:53 akhter joined #salt
18:53 Tanta_G high state twice is different when you're substituting the /etc/salt/grains file with new stuff and you want to reload the fresh values
18:53 Edgan Guest47158: makes sense, systemd uses .service, because you can have other types of items, but it will also generally let you get away with dropping it. But if there is both /etc/init.d and /usr/lib/systemd/system, I guess it tries doing both.
18:54 polyidus joined #salt
18:55 Guest47158 @Edgan hard to say since it takes a python exception
18:56 StolenToast Tanta_G: yes true
18:56 StolenToast I used to have that problem
18:57 Tanta_G I have that problem a lot since I'm using S3 as a back-end for grains
18:57 Agustin joined #salt
18:57 dayid joined #salt
18:58 Agustin howdy folks
18:59 Tanta_G though, it's pretty nice in the end, I store the S3 URL and the SHA1 hash of the grains file in pillar, enforce access with IAM instance profiles, and tie it all together with Salt
19:00 heaje joined #salt
19:02 akhter_1 joined #salt
19:02 tvinson the windows scripts for salt should specify their own PYTHONPATH. there's too much stuff out there that will overwrite the system env var to point at some python 2.5 modules and break everything.
19:02 sjk2 joined #salt
19:05 kawa2014 joined #salt
19:08 akhter joined #salt
19:11 brotatochip joined #salt
19:15 cberndt joined #salt
19:16 Agustin Hi peeps! I have a question regarding gitfs
19:16 Agustin Anyone with knowledge about that?
19:18 baweaver joined #salt
19:19 grumm_servire joined #salt
19:20 ekristen_ joined #salt
19:21 akhter joined #salt
19:25 nZac joined #salt
19:25 akhter joined #salt
19:27 ecdhe Agustin, go ahead and ask the question. =)
19:27 Agustin nice
19:28 Agustin i know that with the file_roots you can define multiple directories to serve content. But  can you do the same with the per-remote setting gitfs_roots?
19:28 Agustin cause I haven't been able to do it
19:28 Agustin so far
19:30 akhter_1 joined #salt
19:31 polyidus joined #salt
19:31 iggy you can have multiple gitfs', but not multiple dir's ina single gitfs
19:32 Agustin so this: https://gist.github.com/Northwood128/740cfc6296aac78208a53f9e01bf28e6
19:32 Agustin cannot be?
19:32 iggy not unless something changed drastically
19:32 Agustin gotcha
19:33 iggy no, there is no roots, only root
19:33 iggy and it can't be a list
19:33 Agustin so just a key: value thing
19:33 Agustin thanks for the clarification!
19:37 akhter joined #salt
19:40 rem5 joined #salt
19:44 akhter joined #salt
19:45 teatime if considering DO, Vultr is worth looking at
19:45 teatime mis-chan
19:46 flowstate joined #salt
19:46 emosher joined #salt
19:46 tkharju joined #salt
19:46 spuder joined #salt
19:47 hightekvagabond joined #salt
19:49 ageorgop joined #salt
19:53 beardedeagle Vultr does look interesting @teatime, I host through my company though because...free
19:53 spuder_ joined #salt
19:53 ajw0100 joined #salt
19:53 johnkeates it's bloody expensive compared to a physical box
19:54 teatime they feel kindof... young?  but yeah in the $5/mo-ish price-class I've enjoyed them.
19:54 iggy I like vultr's large disk instances
19:54 teatime johnkeates: depends on what you need.
19:54 johnkeates teatime: very true
19:54 iggy have about half my stuff on DO and half in vultr
19:58 brianfeister joined #salt
20:02 iggy anybody know if importing with context is more expensive than a regular import?
20:05 ageorgop joined #salt
20:08 UtahDave iggy: let me ask
20:08 heaje joined #salt
20:08 murrdoc joined #salt
20:12 onlyanegg joined #salt
20:13 polyidus joined #salt
20:17 akhter joined #salt
20:19 akhter_1 joined #salt
20:20 ninjada joined #salt
20:22 Lee- joined #salt
20:24 CeBe left #salt
20:25 akhter joined #salt
20:26 Eugene Is there a Vultr driver to salt-cloud that I missed?
20:27 ahammond Where can I find excellent quality example code for salt formulae? I was looking under https://github.com/saltstack-formulas but there's a heck of a lot of stuff there that's kinda junky.
20:27 Tanta_G write your own  better ones
20:28 Tanta_G then submit a pull request on github
20:28 xmj "patches accepted"
20:29 akhter joined #salt
20:31 subsigna_ joined #salt
20:32 Eugene ahammond - I look to see how it's done in formulas, then shamelessly copy-paste or rip-off and make it fit my needs. https://madeitwor.se/salt/ if you'd like to peek
20:33 ahammond Eugene yeah, that's what I did with the syncthing formula, and I should probably make a PR against it since I fixed a heck of a lot of that code.
20:33 Eugene It's far from complete, but I like to think I'm doing it right, not fast
20:34 teatime There's a vultr driver in develop branch
20:35 UtahDave iggy: so there's not enough of a performance hit to importing with context to make you care about it.
20:35 teatime possibly dropping it into ext modules for the release version would work; I haven't tried ti yet.
20:39 hemphill joined #salt
20:41 Eugene I've made a note to try that, nifty.
20:41 Eugene Their local datacenter is <1ms from me, vs Linode's 20ms
20:43 vilitux joined #salt
20:44 iggy UtahDave: what if you have hundreds of them?
20:45 johnkeates then you are better off buying something else
20:45 ageorgop joined #salt
20:46 iggy use case: we have a lot of states (I mean a lot) all kind of written by not-really-salt-people who mostly C&P'ed from something else and I'm finding tons of stuff that nobody really put thought into
20:47 iggy jeez, 94000 lines
20:47 Eugene Throw it out and start over
20:47 johnkeates i don't let people touch the salt-ops repo because i don't want that to happen :D
20:48 aharvey joined #salt
20:48 UtahDave iggy: Hm...  I'm not sure.
20:48 Eugene Insanity wolf: require commits to have more deletions than additions, wait for the problem to fix itself
20:49 akhter_1 joined #salt
20:50 teatime 94k lines of your own org's .sls's and such?
20:50 teatime that's impressive.
20:50 StolenToast wow
20:50 nyx_ joined #salt
20:50 StolenToast how much is templated?
20:51 teatime dunno if small performance savings would be my concern there :)
20:51 Eugene Small savings in things done thoousands of times become huge ones
20:52 mavhq joined #salt
20:54 jhauser joined #salt
20:56 xmj ^how you scale
20:56 teatime heh.
20:56 edrocks joined #salt
20:57 teatime yeah, I never thought of that before, my eyes are opened.  *eyeroll*
20:58 xmj don't roll your eyes, captain obvious performs an important civilizationary service
20:59 dmaiocchi joined #salt
21:02 kevinquinnyo joined #salt
21:02 hightekvagabond joined #salt
21:03 kevinquinnyo Afternoon!  So if I build an ext_pillar that say, communicates to a remote REST Api, then i need to figure out how to replace the logic in a <pillar_roots>/top.sls file on my own right?
21:03 teatime yes.
21:04 kevinquinnyo teatime: thanks
21:04 DammitJim joined #salt
21:06 paydro_ joined #salt
21:09 paydro joined #salt
21:14 paydro joined #salt
21:19 digitalhero joined #salt
21:21 paydro joined #salt
21:23 murrdoc is anyone using transport:tornado
21:23 murrdoc instead of 0mq
21:23 StolenToast are there advantages?
21:27 aharvey joined #salt
21:28 akhter joined #salt
21:30 akhter_1 joined #salt
21:32 bshelton229 joined #salt
21:34 akhter joined #salt
21:35 hightekvagabond joined #salt
21:36 nickfrez left #salt
21:39 paydro joined #salt
21:41 onlyanegg joined #salt
21:45 thejrose1984 joined #salt
21:47 akhter joined #salt
21:48 flowstate joined #salt
21:50 flowstate joined #salt
21:51 mavhq joined #salt
21:51 onlyanegg joined #salt
21:56 nyx_ joined #salt
21:57 ageorgop joined #salt
22:02 heaje joined #salt
22:02 brotatochip joined #salt
22:04 fxhp joined #salt
22:05 GreatSnoopy joined #salt
22:05 murrdoc no clue
22:06 baweaver joined #salt
22:06 UtahDave Gareth: hey, man. you around?
22:06 Gareth I am.
22:07 * Gareth grabs a bat
22:07 Gareth You got my money?!
22:07 UtahDave lol
22:07 UtahDave hey, I see you did a lot of work on the gpg renderer.  I'm having trouble following the docs to get it to work.
22:08 Gareth the renderer? I did work on the module and state module.  Not sure if I touched the renderer.
22:08 * Gareth checks
22:09 ninjada joined #salt
22:09 UtahDave ah, dang. I was shown the git blame for the module.
22:10 ujjain joined #salt
22:10 ujjain joined #salt
22:10 Gareth no worries :)
22:10 Gareth UtahDave: looks like mostly Erik.
22:11 UtahDave yeah.  OK.  sorry for the noise.
22:13 Gareth Good distraction from what I was attempting to work on :)
22:14 onlyanegg joined #salt
22:15 murrdoc UtahDave:  when is tornado going to be ready
22:15 murrdoc we are dropping events and are thinking off writing our own event handler
22:15 murrdoc cos reactors are not firing
22:15 murrdoc :|
22:15 murrdoc o/ Gareth , hows new gig
22:17 kevinquinnyo joined #salt
22:18 Gareth murrdoc: good good.  much better than previous $dayjob :)
22:19 linjan__ joined #salt
22:20 west575 joined #salt
22:21 tvinson need a quick refresher. how can i grab the output of a salt module into a jinja variable for later use in a state?
22:22 tvinson something close to {% set disk_capacity=salt['module.run']('disk.usage')[server_built.disk]['1K-blocks'] %}
22:24 brotatochip joined #salt
22:25 onlyanegg joined #salt
22:25 murrdoc UtahDave: Halp
22:27 UtahDave tvinson: {% set disk_capacity=salt['disk.usage'][server_built.disk]['1K-blocks'] %}
22:28 UtahDave murrdoc: that's odd.  are you seeing the events come through the event bus?   like if you watch with   salt-run state.event pretty=True   ?
22:28 tvinson UtahDave: oh. i see what i did there. tyvm.
22:29 UtahDave tvinson: you're welcome.
22:29 murrdoc UtahDave: events are there
22:29 ageorgop joined #salt
22:29 murrdoc reactor's are not triggering
22:29 UtahDave murrdoc: what version of Salt?
22:29 murrdoc 2015.8.7
22:30 UtahDave because if you're seeing the events come through, but the reactors aren't triggering, that's not really a problem with the transport.
22:30 murrdoc right
22:30 murrdoc so how do we fix that
22:31 UtahDave Have you opened an issue on github yet?  This will be a high priority bug.
22:31 UtahDave Is there any trick to reproducing it?
22:34 paydro joined #salt
22:36 hightekvagabond newbie question: I know I can run all the given states against a machine with: salt 'machineid' state.highstate
22:36 hightekvagabond but what if I just want to apply a specific sls?
22:36 Gareth hightekvagabond: state.sls filename where filename is filename.sls
22:37 iggy lot's of events
22:39 zenlot joined #salt
22:40 murrdoc UtahDave:  ok let me ask the people to open a bug
22:41 UtahDave murrdoc: cool.  Let me know and I'll make sure it gets seen
22:45 murrdoc thanks man
22:48 kliquori joined #salt
22:49 baweaver joined #salt
22:51 jfindlay 2016.3.0rc2 is live: https://github.com/saltstack/salt/releases/tag/v2016.3.0rc2, https://pypi.python.org/packages/source/s/salt/salt-2016.3.0rc2.tar.gz
22:52 amcorreia joined #salt
22:53 beardedeagle @jfindlay: woot
22:54 ninjada joined #salt
22:54 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.8, RC Version: 2016.3.0rc2 | SaltConf16: http://saltconf.com/register/ | Paid support available: 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
22:58 ageorgop joined #salt
23:11 ageorgop joined #salt
23:18 mavhq joined #salt
23:19 hightekvagabond1 joined #salt
23:22 kliquori joined #salt
23:26 barajasfab joined #salt
23:42 murrdoc joined #salt
23:50 flowstate joined #salt
23:58 drawsmcgraw joined #salt

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