Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-09-24

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

All times shown according to UTC.

Time Nick Message
00:00 hemebond joined #salt
00:02 hemebond Question for people installing and managing LDAP with Salt: are you configuring everything with Salt or do you use Salt only for installation and then manually build your LDAP structure?
00:03 mohae joined #salt
00:06 iggy I've done it both ways
00:06 hemebond iggy: What OS do you use?
00:06 iggy the automatic loading of ldap scripts was... tricky
00:07 iggy Debian then
00:09 hemebond Okay thanks.
00:10 hemebond Did you use debconf-set-selections at all or just do the configuration afterwards?
00:10 edrocks joined #salt
00:11 hemebond Actually I shouldn't assume you were using OpenLDAP.
00:12 snarfy__ i dont really understand 'what config' gets loaded? isn't there only one? :)
00:12 iggy we were, and we used salt.states.debconfmod
00:13 iggy https://docs.saltstack.com/en/latest/ref/states/all/salt.states.debconfmod.html#module-salt.states.debconfmod
00:13 hemebond iggy: *thumbsup* Thank you :-)
00:13 hemebond I had started doing it by hand in my own state.
00:14 iggy snarfy__: there are overrides for some tools, but salt-run doesn't appear to be one... basically nobody knows, so check/file an issue
00:14 rhodgin joined #salt
00:14 iggy hemebond: if you wait a few hours, I can probably show you a watered down example
00:15 hemebond iggy: Thanks. How well did it work out for you when you had Salt configure the directory itself? Was it easier than doing some one-off manual config?
00:16 iggy for a simple/static config it wasn't too bad
00:17 iggy wasn't too bad to do it with salt that is
00:17 iggy for another setup I had where the ldap database actually held a lot of application data it was a nightmare trying to get salt to do it
00:17 iggy the application should have been taking care of it's own directory setup imo
00:17 hemebond So you were using Salt to setup OUs and stuff for the application?
00:18 iggy tried to... it mostly worked, but it was fragile as hell
00:18 hemebond Right. Was that importing LDIFs or something else?
00:19 iggy yes
00:20 hemebond Can LDIFs be applied in an idempotent way?
00:20 hemebond I've mostly only used them for large imports.
00:20 iggy not really, which was the problem
00:20 hemebond Gotcha
00:21 ironpillow left #salt
00:23 fersur3 joined #salt
00:23 fersur3 Hello #salt, am looking at https://docs.saltstack.com/en/develop/ref/netapi/all/salt.netapi.rest_cherrypy.html    I basically want to run "salt 'app01.staging' state.highstate" whenever a hook is called from GitHub, is there an example somewhere on how to do just that?
00:26 Hydrosine joined #salt
00:30 bhosmer joined #salt
00:30 iggy http://bencane.com/2014/07/17/integrating-saltstack-with-other-services-via-salt-api/
00:30 breakingmatter joined #salt
00:30 iggy or similar (found via google, ymmv)
00:31 MindDrive joined #salt
00:31 fersur3 I see "/salt/reactor/restart.sls" and the contents of restart.sls, but am unsure how to have that be an equivalent to "salt 'application01*' state.highstate"
00:33 stickmack joined #salt
00:34 hax404 joined #salt
00:34 hemebond fersur3: https://docs.saltstack.com/en/latest/topics/cloud/reactor.html#example-reactor-based-highstate
00:35 iggy in the reactor file, change cmd.service.restart to something like cmd.state.highstate ?
00:51 dh_ joined #salt
00:52 quasiben joined #salt
00:52 seb` joined #salt
00:54 moapa joined #salt
01:12 orion203 joined #salt
01:28 scoates joined #salt
01:30 otter768 joined #salt
01:30 clintberry joined #salt
01:31 phw joined #salt
01:31 bhosmer joined #salt
01:32 catpiggest joined #salt
01:35 dthom91 joined #salt
01:40 moop-moop joined #salt
01:40 dendazen joined #salt
01:47 otter768 joined #salt
01:51 opensource_ninja joined #salt
01:52 zmalone joined #salt
01:58 kusams joined #salt
02:00 PeterO_ joined #salt
02:02 quasiben joined #salt
02:02 bhosmer joined #salt
02:05 dthom91 joined #salt
02:07 Jimlad joined #salt
02:07 neogenix joined #salt
02:11 neogenix joined #salt
02:13 zmalone joined #salt
02:14 zmalone left #salt
02:17 less joined #salt
02:17 avuong13 joined #salt
02:18 pjs joined #salt
02:32 berserk joined #salt
02:32 bhosmer joined #salt
02:43 rhodgin joined #salt
02:52 larsfronius joined #salt
03:02 bhosmer joined #salt
03:07 writtenoff joined #salt
03:11 neogenix joined #salt
03:11 favadi joined #salt
03:21 kusams joined #salt
03:22 evle joined #salt
03:24 Blankenship joined #salt
03:32 armyriad2 joined #salt
03:34 neogenix joined #salt
03:34 bhosmer joined #salt
03:39 kiwidave joined #salt
03:40 subsignal joined #salt
03:42 kiwidave left #salt
03:46 alexlist_ joined #salt
03:47 neogenix joined #salt
03:49 sunkist joined #salt
03:55 Bryson joined #salt
04:03 ajw0100 joined #salt
04:04 bhosmer joined #salt
04:13 pentabular joined #salt
04:15 less joined #salt
04:15 pcn joined #salt
04:17 hasues joined #salt
04:17 hasues left #salt
04:28 neogenix joined #salt
04:33 breakingmatter joined #salt
04:33 aparsons joined #salt
04:35 bhosmer joined #salt
04:38 edulix joined #salt
04:40 aparsons joined #salt
04:42 PeterO_ joined #salt
04:43 golodhrim|work joined #salt
04:45 ramteid joined #salt
04:52 anmol joined #salt
04:59 pentabular joined #salt
05:09 golodhrim|work left #salt
05:13 rdas joined #salt
05:15 otter768 joined #salt
05:19 malinoff_ joined #salt
05:28 SunPowered joined #salt
05:35 bhosmer joined #salt
05:45 svinota joined #salt
05:46 kukacz joined #salt
06:03 fullung joined #salt
06:03 teebes joined #salt
06:04 colttt joined #salt
06:05 bhosmer joined #salt
06:06 linjan joined #salt
06:06 fullung we have a big team of people working together on a salt repo that controls a couple of thousand servers. we want to (for example) be able to test a branch that adds new state(s) and pillar data on machines in one or two datacenters before merging the change to master from which it will then be applied to all machines. how are people handling this workflow at scale? we've tried some git hooks for making different environments for git branches, which works for s
06:06 fullung but salt's merging of all pillar environments turns this into a nightmare
06:15 hemebond fullung: That sounds painful. You haven't got a separate test environment?
06:16 hemebond If you create a new environment is it not possible to exclude servers from the default environment?
06:16 thefish joined #salt
06:18 fullung hemebond: we take servers out of production before we start doing the scary stuff
06:18 fullung the problem is that we sometimes want to test branches that might not even be valid
06:19 fullung e.g. to make sure that a new state or module works on various generations of hardware
06:19 hemebond What I've done (I'm only playing mind you) is create a new environment for each deployment or environment.
06:19 fullung so you have this problem that everyone on the team is fighting over control the main environment on the master
06:19 hemebond The plan will be to checkout a branch of the state repo into each.
06:20 dh joined #salt
06:20 fullung that works fine for states, but it doesn't work for pillars
06:20 fullung sometimes you need to do new pillar things on your branch too
06:21 hemebond Why wouldn't that work for pillars?
06:22 fullung because pillar environments are merged
06:23 hemebond Oh really? Even in different environments?
06:23 fullung https://github.com/saltstack/salt/issues/4389 https://github.com/saltstack/salt/issues/23907
06:25 hemebond That first one, he was applying each environment to every server.
06:26 hemebond Ah
06:26 hemebond Hmm
06:26 hemebond I don't think mine gets merged like that, but then I have top.sls target based on fqdn
06:26 hemebond For some stuff.
06:26 hemebond Though I suppose that would be annoying if you wanted to match on grains or something.
06:28 katyucha joined #salt
06:29 kusams joined #salt
06:29 hemebond I suppose I always just assumed the matching was global. I also don't specify the environment on the minion.
06:30 iggy fullung: multiple masters?
06:31 KermitTheFragger joined #salt
06:34 breakingmatter joined #salt
06:36 bhosmer joined #salt
06:49 rubendv joined #salt
06:51 elsmo joined #salt
06:56 GreatSnoopy joined #salt
07:07 fredvd joined #salt
07:07 felskrone joined #salt
07:07 bhosmer joined #salt
07:07 catpigger joined #salt
07:10 Ztyx joined #salt
07:13 lb1a joined #salt
07:16 otter768 joined #salt
07:16 eseyman joined #salt
07:20 cberndt joined #salt
07:22 |Trend| joined #salt
07:30 markm joined #salt
07:32 Grokzen joined #salt
07:36 kawa2014 joined #salt
07:37 bhosmer joined #salt
07:41 cppking joined #salt
07:43 cppking hello guys, how can salt do something like 'before after notify subscribe' of  puppet resource ? where can I find the docs
07:43 avuong joined #salt
07:48 trph joined #salt
07:48 trph joined #salt
07:50 avuong Hello, I have a quick question regarding requisites. I'm trying to find the option to set a requisite to run another ID declaration. Can anyone help?
07:50 babilen What does that mean exactly?
07:51 babilen cppking: What does "before after notify subscribe" do?
07:51 babilen (That almost raises an EPARSE in my head)
07:52 babilen cppking: Documentation can be found at https://docs.saltstack.com/en/latest/
07:53 colorfuzzy joined #salt
07:54 colorfuzzy Hi, I have a top.sls, and how can I run this top.sls
07:55 colorfuzzy to make it the final state of my machine
07:55 mosen poor babilen
07:55 hemebond colorfuzzy: state.highstate
07:56 avuong a
07:56 babilen Or https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.apply but for some reason that never really worked for me
07:57 babilen I think it is meant to be the bastard child of state.highstate and state.sls
07:57 colorfuzzy @hemebond thanks, worked
07:58 hemebond yw
07:59 babilen mosen: I mean one way to parse that would be "before [after notify subscribe]" in which you have a "[after notify subscribe]" action and you want something to happen before that. Another hypothesis would be that they are, in fact, atomic actions (i.e. "before, after, notify, subscribe") and that cppking is merely looking for https://docs.saltstack.com/en/latest/ref/states/requisites.html
08:00 mosen he's just looking for requisites
08:00 mosen since those are metaparameters in puppet
08:08 bhosmer joined #salt
08:10 larsfronius joined #salt
08:13 s_kunk joined #salt
08:14 rodr1c joined #salt
08:15 esharpmajor joined #salt
08:16 chutzpah joined #salt
08:16 [vaelen] joined #salt
08:16 packeteer joined #salt
08:17 jhauser joined #salt
08:17 chiui joined #salt
08:23 s_kunk joined #salt
08:24 sfxandy joined #salt
08:28 AndreasLutro joined #salt
08:31 thalleralexander joined #salt
08:35 breakingmatter joined #salt
08:36 mike25de hi all, can we run a mysql query from a state? - so the minion should send some data into a remote mysql server?
08:36 Phil-Work mike25de, yes
08:36 Phil-Work mike25de, see the mysql formula
08:37 mike25de ah ok thanks Phil-Work
08:39 babilen mike25de: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_query.html
08:39 babilen mike25de: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html#salt.modules.mysql.query is an execution function that allows you to run random queries manually
08:40 mike25de babilen: great man!!!!
08:40 mike25de owe you so many beers :D
08:40 thalleralexander joined #salt
08:40 babilen :D
08:40 mike25de babilen:  one Q regarding the state... where do i add the credentials?
08:40 bhosmer joined #salt
08:41 piter_ joined #salt
08:42 mike25de ah got it .. in the minion file
08:42 babilen IIRC you have multiple options with the mysql execution module (and many others). The modules itself uses config.get (cf. https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.config.html#salt.modules.config.get) which queries the minion config, pillar, grains and master config (in that order) for credentials.
08:42 rdas joined #salt
08:42 babilen I typically set it in a pillar as I deem that most secure.
08:42 babilen (and easy to change)
08:42 mike25de ah .. so we can do it in a pillar as well?
08:42 mohae joined #salt
08:42 piter_ hello
08:43 babilen This is discussed at the beginning of https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html
08:43 rim-k hello
08:43 piter_ how should I install salt-minion 2015.* in debian6 (squeeze)? is it possible?
08:43 babilen mike25de: Yeah, the nice thing about execution modules that use config.get is that you can set the data in the minion config, pillar, grains and master config alike (note that they take precedence over each other)
08:46 babilen piter_: I don't think that there are packages for squeeze
08:47 babilen You might be able to install with the bootstrap script, but you *really* should update that box. It is oldoldstable now and, despite the fact that it gets limited LTS support, not necessarily something you should run in production anymore.
08:47 babilen It could very well be that backporting all the dependencies (tornado, requests, ....) would be quite some work
08:49 piter_ I see. Kind of difficult tu update so many boxes, we plan to do it, but it's not a small project. Thank you.
08:51 voileux joined #salt
08:51 babilen I know (we also have some squeeze boxes around), but it is not something that gets easier with time. One of the biggest obstacles for us are needed changes for Apache 2.4 on some of them
08:52 babilen (for squeeze → wheezy → jessie)
08:52 babilen If only the Apache formula wouldn't be so bad
08:54 piter_ Actually I need to update the minion only because of bug in svn module
08:55 piter_ in 2014* it gives  AttributeError: 'tuple' object has no attribute 'extend'
08:55 mike25de thank you babilen again for bringing the light into darkness :)
09:00 yomilk joined #salt
09:05 losh joined #salt
09:07 thalleralexander joined #salt
09:09 Zethrok joined #salt
09:09 sgargan joined #salt
09:11 bhosmer joined #salt
09:13 elsmo joined #salt
09:14 Zethrok Is it possible to do wildcard match with grains data inside a sls file? Ie instead of {% if grains['host'] == 'hostname' %} I would like to match {% if grains['host'] ~= '<part_of_hostname>' %} ?
09:16 kavakava joined #salt
09:16 kavakava joined #salt
09:17 otter768 joined #salt
09:17 babilen Zethrok: What are you trying to match exactly?
09:17 chiui joined #salt
09:21 N-Mi joined #salt
09:21 mike25de babilen:  ... maybe you can help ... http://pastebin.com/6be7LeEF    i want that the minion inserts the mysql query into salt-db not locally...  am i wrong?
09:21 sgargan joined #salt
09:21 mohae joined #salt
09:21 babilen Only if you use a different pastebin such as http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, …
09:22 Ztyx left #salt
09:22 babilen But then I haven't used that particular state ...
09:23 mike25de https://dpaste.de/PRwS
09:23 mike25de ah ok..
09:23 babilen But that would, I guess, require a different approach as that state runs locally on the minion
09:24 mike25de but babilen the mysql credentials.. can be stored on the master? ... or on the minion  or pillar?
09:24 babilen yes
09:25 mike25de then since i have the credentials stored on the master.. should it still work?
09:25 babilen The problem you are facing is rather: "How do I run an execution module on one minion with data from another?"
09:25 mike25de data meaning credentials?
09:26 babilen I solved that with reactors and by encapsulating the data in the data[...] dictionary it sends around
09:26 babilen What are you really trying to do?
09:26 mike25de when the state runs... it should add some data to mysql .. like the minion fqdn and ip
09:26 babilen No, I don't mean credentials (I keep those in pillars and just make the pillar available to whatever minion it is appropriate for)
09:27 babilen Is that still your "do some things when a new minion is accepted" project?
09:27 svinota joined #salt
09:27 mike25de yeah :)
09:28 babilen Then just trigger https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html#salt.modules.mysql.query with appropriate data from within the reactor
09:28 mike25de i was thinking about the reactor thing, but i want to figure out the mysql part.
09:28 mike25de hmm interesting
09:29 babilen The mysql part is trivial. The minion *you want to execute the query on* simply needs the credentials in its configuration. This can be provided in the minion config, grains or pillars. I tend to use pillars as they are secure and less of a hassle to change than the minion config.
09:29 mike25de babilen: pillars is perfect
09:29 mike25de ok.. so i should move the credentials to the pillar.. not the master file.
09:30 scoates_ joined #salt
09:30 mike25de let me see if that might work
09:30 babilen Where are you running the query?
09:30 mike25de in the pillar i should keep the same structure?... mysql.port: 3306 ?
09:30 babilen yeah
09:31 mike25de the query is in a state .. which runs on a minion.. so the minion should connect back to the master (or other mysql).. and insert some data there
09:31 babilen Hmm, there might be a bug hidden in there, as this should be "mysql:port" (i.e. nested), but you might need the literal mysql.port
09:32 babilen Which brings us back to ""How do I run an execution module on one minion with data from another?" doesn't it?
09:32 mike25de indeed babilen i see your point
09:33 babilen I send those data around with https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.event.html#salt.modules.event.fire_master
09:33 babilen (so, trigger module on minion, send data back to master, trigger reactor there, do stuff on another minion)
09:33 Zethrok babilen: I need to match on a partial hostname and supply different context data based on that
09:34 babilen Zethrok: Which part? Can you be more specific?
09:35 Zethrok babilen: Sure, in our setup we have something like server42.staging.com - I would like to match on the *staging* part and act on that.
09:35 babilen But not the .com ?
09:35 Zethrok no, that could be different countries
09:35 twork something i think should be easy enough, but is escaping me: https://gist.github.com/mjinks/31267d8e2945b3764011
09:35 babilen I ask because jinja is shit and doesn't allow you to express that easily
09:35 Zethrok yea, was afraid of that
09:36 trapha joined #salt
09:37 babilen Zethrok: Okay, without an actual example: You have three options: 1. Use "|endswith('staging.com')" (which doesn't work as you'd have .com in there) 2. Use "'staging' in grains['host']" which might be working, but is a bit too "fuzzy" for my taste and then ....
09:39 babilen Zethrok: Due to the endless suckiness of jinja you can't easily include literal Python blocks in your templates which brings us to 3. Write that state in a template language that sucks less (either directly in Python or in mako)
09:39 bhosmer joined #salt
09:40 babilen The fourth approach and one I tend to use quite frequently would be to implement a custom execution module that allows you to parse minion ids or hostnames. It would then return a suitable dictionary or tuples and you can reference that in your SLS file.
09:40 babilen (you might have guessed but I think that jinja was a bad default choice for salt)
09:42 scoates joined #salt
09:43 babilen This would have been trivial in mako in which you could just import the re module and use a short regular expression to do this.
09:44 twork babalen: is mako available as an option? i'm still in the foothills of my salting but a lot of my troubles (seem to be) jinja-related
09:44 babilen But then I don't like having SLS files in multiple template languages (a bunch of people already struggle with one + Python, so I don't necessarily want to throw mako, cheetah, stateconf, … into the mix
09:45 babilen yeah, salt does support other renderers just fine: https://docs.saltstack.com/en/2015.5/ref/renderers/all/index.html
09:45 monkey661 left #salt
09:45 babilen You'd simply state your file with "#!$RENDERER" and you are done (so "#!mako" for mako)
09:46 twork babilen: ok, thanks. i knew it did, but didn't know if mako was one of them
09:46 babilen mako would have made so much more sense for salt
09:46 babilen jinja is for dirty rendering of web pages not for anything that requires logic
09:46 babilen s/dirty//
09:46 babilen (it is quite good for that)
09:47 twork that's been my sense too
09:47 twork but i'm so not qualified to have an opinion about these things, at least not yet
09:48 WildPikachu joined #salt
09:49 babilen The problem is that saltstack chose jinja and, despite the fact that other renderers are available, you are swimming against the current if you use them. Hell, not a single state/SLS file I've seen even uses an appropriate shebang line (just relies on #!jinja|yaml" being the default)
09:50 twork nice.
09:50 twork see, n00b here didn't even know that the shebang construction was an option in this context
09:51 twork if that were considered part of the standard, it would have shortened my learning curve some
09:51 twork "what am i reading here...?"
09:51 babilen *Every* SLS file has an *implicit* shebang of #!yaml_jinja (which just means "#!jinja|yaml") so that the SLS file is first rendered with jinja and the result interpreted as yaml and parsed into a Python dictionary.
09:52 babilen You are really quite free to use whatever renderer you deem appropriate .. hell, you could even chain "#!mako|jinja|yaml" (first render it with mako, then jinja then parse resulting yaml) if you are twisted enough
09:53 twork come to think of it, pushing all my own files through jinja (or whatever) might help me untangle some of my puzzles
09:54 twork at any given line, i often have grouble grokking "what are we talking here"
09:54 babilen The same thing gives you quite some power to write managed files as well (in which you can also set the renderer!). I use that quite frequently to write configuration files for which a generator/parser is available in Python. ConfigParser is a great example for that as I can just pass a Python dictionary from pillars and use that to feed the generator directly
09:54 babilen No need to serialise everything into YAML in the interim and for horrible jinja templates ;)
09:55 twork so glad we're having this little talk...
09:55 babilen Keep in mind that in salt *everything* ends up as Python dictionaries eventually and that all the SLS files or file templates, pillars or whatnot are just written in some markup language to make it "easier"
09:56 twork yeah, the oldsters keep telling me "it's all python dicts" but that rarely helps me understand a chunk i'm not understanding
09:57 pentabular joined #salt
09:57 babilen The Python renderer just calls the run() function and uses whatever it returns. You'd return a dictionary for pillars or a string for files. What happens inside is entirely up to you and you can use the *entire* power of Python.
09:57 twork ...partly because, it isn't all python dicts, to begin with
09:58 babilen If I were to start over with my code I'd probably write all in-house stuff in mako and Python and begrudgingly accept the fact that most formulas are written in jinja
09:59 sgargan joined #salt
09:59 babilen There simply aren't any many examples in mako/stateconf/cheetah/... for salt around which makes it incredibly hard to learn salt using one of those template languages
10:00 kirzon joined #salt
10:00 babilen I would at least hope that salt will make shebangs mandatory at one point
10:00 twork +1
10:00 babilen (it'll be a pain, but it should have been done a long time ago)
10:01 babilen I mean this will be a "oh, this breaks everything" moment ;)
10:01 twork nowhere near as much of a pain as rewriting thousands of templates into a new language
10:01 babilen indeed
10:01 twork ...how much would it break?
10:01 mohae joined #salt
10:01 babilen 99% of SLS files in circulation?
10:01 twork if "everything" is already implicitly parsing those templates that way anyhow?
10:02 babilen (conservative guess)
10:02 twork doofus that i am, i could write a shell line that would march through them all and fix that
10:03 babilen sure
10:03 babilen it's not hard, it just has to be done
10:03 twork our song...
10:06 twork incidentally, not to be a pest but i posted this a while ago and sort of saw it scroll by, so: https://gist.github.com/mjinks/31267d8e2945b3764011
10:07 twork i won't repeat again i promise
10:11 bhosmer joined #salt
10:21 thalleralexander joined #salt
10:28 seatan joined #salt
10:28 seatan hello
10:30 aristedes joined #salt
10:31 aristedes left #salt
10:31 aristedes joined #salt
10:31 aristedes left #salt
10:33 seatan i'm trying to create a minion using salt-cloud and i'm asked for the ssh key passphrase, after which the process hangs: https://www.dropbox.com/s/wm2wwr12xte70g8/Screenshot%202015-09-24%2013.32.32.png?dl=0
10:33 seatan any ideas why?
10:36 breakingmatter joined #salt
10:38 mohae joined #salt
10:39 shiriru joined #salt
10:40 bhosmer joined #salt
11:06 thalleralexander joined #salt
11:08 kusams joined #salt
11:10 bhosmer joined #salt
11:12 ashcroft joined #salt
11:18 otter768 joined #salt
11:18 breakingmatter joined #salt
11:20 teebes joined #salt
11:20 ctolsen joined #salt
11:31 zerthimon joined #salt
11:31 quasiben joined #salt
11:31 rhodgin joined #salt
11:34 fredvd_ joined #salt
11:37 eliasp seatan: Dropbox seems to have trouble providing the screenshot… why not simply paste the output to a pastebin?
11:39 seatan eliasp: http://pastebin.com/index/8nHTDvv2
11:40 eliasp seatan: did you try (just to see whether that's the culprit) to use a keypair without a passphrase?
11:41 seatan i did not, but i want to have a passphrase on my key, and it should be working with one imo
11:42 eliasp seatan: sure, but by doing this you could rule out whether it hangs because of something related to the passphrase or it hangs in the step _after_ handling the passphrase
11:44 TyrfingMjolnir joined #salt
11:44 fredvd joined #salt
11:45 wenzel_ joined #salt
11:53 bluenemo joined #salt
11:54 seatan i suspect salt doesn't like the format of the key (rsa)
11:57 sjorge joined #salt
11:57 sjorge joined #salt
11:59 ferbla joined #salt
12:02 GabLeRoux joined #salt
12:03 krymzon joined #salt
12:04 babilen seatan: You might also want to try adding the passphrase to the agent (I guess that salt is hanging somewhere waiting for you to enter it, without you being able to do so)
12:11 SunPowered joined #salt
12:11 SunPowered joined #salt
12:12 bhosmer joined #salt
12:12 sjorge joined #salt
12:12 sjorge joined #salt
12:13 _JZ_ joined #salt
12:18 breakingmatter Does anyone have any recommendations on "cleaning up" an aging salt-stack instance? i.e., cleaning out old caches, killing stuck jobs, etc.
12:20 XenophonF joined #salt
12:26 seatan eliasp: it asked for the passphrase because the the key wasn't added to the agent as babilen mentioned, and it hung because it couldn't ssh to the minion with the provider user i had set up
12:29 babilen So, adding it to the agent solved this issue?
12:32 babilen breakingmatter: You could do that, but I rarely found it to be necessary to do so explicitly
12:33 babilen In fact I only ever had to do it once when a horrible init script did not double-fork nor release file descriptors on daemonisation which left salt waiting forevermore
12:36 breakingmatter babilen: Our salt instance just seems to be... "unstable" recently. I just wanted to dump the caches and see where that gets us. We've had the same installation since v2014.1.0, and it's managing a few hundred minions
12:37 breakingmatter i.e., states take a long time to execute, the salt-master PIDs are all cranking out 100% CPU usage, etc
12:37 breakingmatter (18 worker threads)
12:37 jhauser_ joined #salt
12:37 babilen Aye
12:38 babilen Are you looking for suitable runners/execution modules to achieve that?
12:38 babilen How many cores do you have on your master?
12:38 breakingmatter That, or manual cleanups in /var/cache
12:38 babilen https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.cache
12:39 breakingmatter Salt master has 12 cores
12:39 babilen https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.jobs.html → find active jobs and then, if appropriate, kill them
12:39 breakingmatter babilen: Your first link 404'd
12:40 breakingmatter Yesterday i killed all the stuck jobs. One box had 20 stuck jobs (lol)
12:40 babilen https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.cache.html
12:43 bhosmer joined #salt
12:43 dendazen joined #salt
12:44 DammitJim joined #salt
12:47 dthom91 joined #salt
12:50 keimlink joined #salt
12:50 subsignal joined #salt
12:51 milanpetric joined #salt
12:54 mnaser joined #salt
12:56 is_null hi all, so the reactor is single threaded, is there anything I can do about it ?
12:56 Akhter joined #salt
12:59 mike25de me again :) in a reactor.. how can i get the grains of the data['id'] of the minion that matched the reactor?  what about from that reactor running a state.. that is applied to the minion that triggered?
12:59 appletini joined #salt
12:59 appletini Morning!
13:01 * appletini looks around
13:01 mike25de hey appletini :)
13:01 appletini How are things mike25de ?
13:01 ctolsen joined #salt
13:03 appletini Wells, gotta head out. Have a great day!
13:03 mike25de appletini:  :) not great :)
13:03 mike25de reactors killing my neurons
13:03 tmclaugh[work] joined #salt
13:04 subsigna_ joined #salt
13:08 mike25de hey anyone around that had used runners?
13:09 mike25de i am just trying to figure out :) how they work.
13:09 JDiPierro joined #salt
13:10 numkem joined #salt
13:12 fredvd joined #salt
13:12 bhosmer joined #salt
13:14 rhodgin joined #salt
13:16 favadi joined #salt
13:17 racooper joined #salt
13:18 larsfronius joined #salt
13:19 otter768 joined #salt
13:21 darix just curious: is it possible for a salt module to fetch a file from a minion. do something with it on the master and send the output of that back to the minion as file?
13:22 mapu joined #salt
13:22 Tecnico1931 joined #salt
13:22 darix background is: https://blog.habets.se/2011/07/OpenSSH-certificates - I want to grab the existing ssh keys and sign them
13:23 Aron joined #salt
13:23 dthom91 joined #salt
13:26 pdayton joined #salt
13:27 Deevolution mike25de:  Do you have specific questions about runners?
13:27 Deevolution darix:  It would likely have to be a runner to do what you're trying to do.
13:29 linjan_ joined #salt
13:29 XenophonF i guess from within a custom grain, i can't access __grains__
13:29 codehotter can pillar variable names contain a dot?
13:30 breakingmatter joined #salt
13:30 pratikmallya joined #salt
13:30 XenophonF codehotter: why not?
13:31 eofs joined #salt
13:31 sgargan joined #salt
13:32 eseyman joined #salt
13:33 babilen codehotter: yes, but that makes certain things weird
13:34 babilen (in the end keys are simply strings)
13:35 babilen In particular will "pillar.foo.bar" not behave the way you expect it to behave
13:35 sgargan joined #salt
13:36 sPollk joined #salt
13:36 protoz joined #salt
13:37 darix Deevolution: well the signing needs to happen not on the minion but the master.
13:38 Deevolution darix: I suppose you could have an execution module designed to be run on the master that would copy a file from a selected minion to the master, sign it and then copy it back?
13:39 darix that's the idea yes
13:41 sPollk anybody know the license of community edition of Salt. On github I found Apache License 2.0 but I need an official confirmation about it.
13:43 Ahlee https://github.com/saltstack/salt/blob/develop/LICENSE
13:43 bhosmer joined #salt
13:47 sPollk Ahlee ok thks
13:48 JDiPierro joined #salt
13:48 eofs the docs states that grains will be synced when highstate runs
13:48 eofs but it doesn't, at least in my multi-env setup
13:49 eofs https://gist.github.com/eofs/268dd513e4fb7bb98548
13:49 sunkist joined #salt
13:49 XenophonF oh yeah, osinstalltype grain works on windows server now!!!
13:50 Ahlee eofs: there's an open issue for that, hold for URL
13:51 clintberry joined #salt
13:52 Aleks3Y joined #salt
13:53 Ahlee eofs: https://github.com/saltstack/salt/issues/24050
13:53 Ahlee well, that's referencing pillar
13:53 DammitJim http://pastebin.com/kTu4X74R
13:53 Ahlee but the underlying transport is same
13:53 DammitJim is there a simple way to parse through this data in a state?
13:53 DammitJim I know how to get 1 and 2
13:53 DammitJim but how do I differentiate between ports and apps?
13:54 elfixit joined #salt
13:54 Ahlee make it a dict?
13:54 DammitJim was that for me, Ahlee ?
13:54 cpowell joined #salt
13:54 eofs Ahlee: thanks!
13:56 mortis_ any idea why i get : "No Top file or external nodes data matches found" when i use gitfs and branches? it matches and runs base-stuff, but when i specify saltenv to a branch, it fails with that error-message.
13:57 Ahlee DammitJim: rather than templating all this in the pillar, i'd probably drop it into a dict yaml structure, and have the state that's writing out hte file do the lookups to the pillar value
13:57 DammitJim Ahlee, thanks... I am definitely going to move towards that, but my main issue right now is how do I do the lookups?
13:58 murrdoc joined #salt
13:58 seatan guys, any idea why the minion is offline (when pinged, returns "Minion did not return. [No response]") after creating it with salt-cloud?
13:59 kaptk2 joined #salt
13:59 Ahlee oh, salt['pillar.get']('tomcat_sections:1') should do it
13:59 DammitJim what? just like that????
13:59 Ahlee try it from the cli, salt MINION pillar.iget tomcat_secions:1
14:00 DammitJim thank you sir! and thank you for the suggestion! I know I have a long way to improve how I do things... every time I look at what I have done, I see stuff I should be improving on, but it's a hard balance trying to get things done, ya know?
14:00 Ahlee DammitJim: yeah. I try to just keep the boyscout idea when i revisit my states, always leaving things in a better state than when I found them
14:00 DammitJim was that pillar.get?
14:01 Ahlee {{ salt['pillar.get']('tomcat_sections:1', 'default_value') }}
14:01 DammitJim Ahlee, I like that... I'm not a boyscout, but a Den leader... doing your best is not always easy
14:02 DammitJim I can use that in my code?
14:02 DammitJim doing it on the CLI didn't return anything...
14:02 Ahlee in your state files, you can use the pillar lookup
14:02 Ahlee on the CLI it should be pillar.get (or walk it all with pillar.items)
14:02 Ahlee I always get pillar.item vs pillar.get confused
14:02 Ahlee they both work slightly different, and i never remember which is which
14:02 TheoSLC joined #salt
14:03 DammitJim LOL
14:03 DammitJim weird... I'm not getting anything back
14:03 DammitJim tomcat_sections:1 ? what does that do? just get me what's inside the list under 1:?
14:03 Ahlee ok, if you target the minion that resolves to myserver.dmz.com
14:03 Ahlee if you run pillar.items you don't see a tomcat_sections:
14:03 Ahlee ?
14:03 Ahlee salt myserver.dmz.com pillar.items
14:04 DammitJim I did: salt myserver.dmz.com pillar.items tomcat_sections and that returned stuff
14:04 eofs Ahlee: that "refresh" state did the trick, but're back in the "chicken-egg" problem. Highstate syncs the grains, but now highstate should re-run for grains to take effect
14:04 babilen Which grains?
14:05 babilen ah, nvm
14:05 seatan quick question, does salt-cloud not start the salt-minion process?
14:05 av_ joined #salt
14:06 babilen eofs: https://docs.saltstack.com/en/latest/topics/reactor/index.html#syncing-custom-types-on-minion-start
14:06 babilen And why would you have to re-run your highstate?
14:06 eofs babilen: I've that in place. The problem is, highstate doesn't sync grains in multi-env setup (least for me)
14:07 zmalone joined #salt
14:07 av_ Hi guys, I have a question regarding `require`. I have a state which requires certain user. So I need to have a block with `user.present` for that particular user? The user already present in the minion
14:07 DammitJim Ahlee I think that since I Don't have a dict, that's why it doesn't return anything when I run tomcat_sections:1
14:07 eofs babilen: use ec2_tags grain (from contrib) in my top file. No grains, no ec2_tags
14:08 babilen eofs: Hmm, I don't use that, but we do use custom grains and they are being synced on minion start with the setup I linked earlier. What does that do and why do you think that these grains aren't synced?
14:09 eofs babilen: https://gist.github.com/eofs/268dd513e4fb7bb98548
14:10 babilen eofs: I see no reference to local.saltutil.sync_grains in there at all
14:10 kusams joined #salt
14:11 hasues joined #salt
14:11 eofs babilen: reactor state?
14:11 hasues left #salt
14:11 babilen eofs: https://docs.saltstack.com/en/latest/topics/reactor/index.html#syncing-custom-types-on-minion-start ← that
14:12 bougie How can I get full log when I execute a state run ? Actually, I only get summary of each state called in the state run but I want to have output of each state / command launch from states
14:13 DammitJim Can I do a dictionary that has dictionaries within it?
14:13 evle1 joined #salt
14:14 drawsmcgraw DammitJim: It's all Python so, yes :)
14:14 eofs babilen: updated: https://gist.github.com/eofs/268dd513e4fb7bb98548
14:14 dthom91 joined #salt
14:15 DammitJim so, in my case: http://pastebin.com/kTu4X74R
14:15 eofs babilen: highstate.sls and sync_grains.sls runs before sync_grains...
14:15 DammitJim All I have to do is put {}'s around my lists?
14:15 eofs babilen: I mean, highstate.sls runs before sync_grains.sls
14:17 babilen eofs: I'd like to see the master debug output for that minion start (where it selects and runs reactors)
14:19 [M7] joined #salt
14:22 bhosmer joined #salt
14:24 DammitJim can I do stuff like {{ pillar['foo']['bar']['baz'] }} on the salt cli?
14:24 babilen You could, but it might result in an error ;)
14:25 DammitJim like how do I test my code on the cli?
14:25 DammitJim I'm trying to learn how to pull data out of a pillar dictionary (what I posted above in a link_)
14:25 babilen You mean when you run execution modules?
14:25 babilen I don't look at pastebin.com
14:25 eofs babilen: not sure if managed to gather all the relevant logs but: http://pastebin.com/XfFUxPCv
14:25 babilen *sigh*
14:25 DammitJim like doing some kind of salt myserver.dmz.com pillar.get
14:26 teryx510 joined #salt
14:26 eofs babilen: gist version: https://gist.github.com/eofs/2edd368b1cc259948f74
14:26 babilen Please, join the blue ribbon compaign for better pastebins and stop using pastebin.com which feeds on the blood of the great unwashed. Use one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … !
14:26 babilen eofs: much appreciated :)
14:27 pratikmallya joined #salt
14:28 pratikma_ joined #salt
14:28 TheoSLC joined #salt
14:28 babilen eofs: It doesn't seem to actually send it :-/
14:28 babilen What happens if you run it manually?
14:29 murrdoc joined #salt
14:29 babilen (and which version of salt is this on master and minion?)
14:29 eofs babilen: both are 2015.8.0 (Beryllium)
14:30 babilen Okay, we still run 2015.5.3, but that shouldn't™ have stopped behaving
14:30 jdesilet joined #salt
14:31 babilen I can't use 2015.8.0 as there are no packages that I could use yet (jessie packages are in contrib and there are no wheezy packages either)
14:32 babilen Well, Joe will finally get around to package them I hope
14:32 An_T_oine joined #salt
14:32 eofs babilen: minion logs says that both reactors are run, but in parallel. Sync action didn't manage to finish in time :/
14:33 babilen Right
14:33 sgargan joined #salt
14:33 eofs If I manually run salt '*' state.highstate, minions will actually run highstate correctly, as everything is synced
14:33 babilen aye
14:33 zwi joined #salt
14:34 elsmo Can I add another voice for saltstack packages in the wheezy repo for 2015.8.0!!
14:34 babilen (and *please* do not put them in contrib as I'd like to be able to use them!)
14:34 av_ I have applied `salt '*' salt.highstate -l debug -v` and I am getting this: http://dpaste.com/1DFMH4T But it doesn't show which state it is currently applying. how do I make it show the current state being applied?
14:35 babilen eofs: Does the syncing raise a suitable event on which you could trigger the highstate?
14:35 eofs babilen: hmm, not sure. Nice idea
14:36 SheetiS joined #salt
14:37 babilen eofs: It's a bit of a hack, but I can't quite think of a different approach .. I take it that defining startup_states results in the same behaviour (i.e. highstate running too early), doesn't it?
14:38 murrdoc joined #salt
14:38 babilen av_: It does so in the minion log (debug). On the master you'll only get information when the job is done
14:38 drawsmcgraw Are there ways of one SLS file including another, but getting to choose *when* the included SLS file runs?
14:38 eofs babilen: salt-run state.event pretty=True doesnt return anything interesting :/
14:39 babilen av_: You might like to use "salt-call state.highstate" on the minion if you want to watch it "scrolling by". In larger setups you really wouldn't want to see real-time information such as that during a highstate run (just imagine this for 900 minions)
14:39 eofs babilen: yeah, defining startup_states doesn't help. Runs too early
14:40 murrdoc joined #salt
14:40 dendazen_ joined #salt
14:40 babilen eofs: Yeah, expected that, but it *could* have been different. The underlying problem is that you can't express dependencies between reactors (an event results in a reaction and all of them are triggered simultaneously).
14:41 eofs babilen: I think I've two options left: 1) Pre-build salt-minion instance and make AMI out of it, 2) Stop using ec2_tags and use minion ids to select states
14:41 babilen eofs: Maybe, just maybe, you could trigger an orchestrate run? That way you could do things in a more well-defined order: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#orchestrate-runner -- which could orchestrate your "initial installation" phase that comprises the grain syncing, highstate and other things you might want to do
14:42 seatan what kind of connection does the minion use to talk to the master?
14:42 babilen Hmm, but how would you dynamically get the orchestrate tgt right?
14:43 babilen seatan: 0mq (unless you changed it)
14:43 eofs babilen: feels bit too complex :(
14:43 babilen eofs: I know
14:44 larsfronius joined #salt
14:44 teryx5101 joined #salt
14:44 babilen eofs: You really want to react to a "I has grains!" event that is only being raised once you have all the grains
14:46 seatan babilen: ty
14:46 eofs babilen: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.event.html
14:46 av_ babilen thanks it makes sense now... next question, now I have some of the states failed. is it possible to show me the failed states at the end separately? I have to scroll lot of stuff
14:46 dthom91 left #salt
14:46 eofs babilen: this one looks promising
14:46 breakingmatter joined #salt
14:47 babilen eofs: yeah, that would allow you to raise an event, but I haven't thought of a way to tie that to the "sync grains" reactors (I mean otherwise you'll have a race condition again)
14:47 babilen av_: Yes, I wanted to implement that ...
14:48 DammitJim where can I read about how to parse a dictionary? I don't know why I am confused about salt and python and yaml
14:48 av_ babilen: oh okay
14:49 babilen av_: I'm not aware of a way. Setting https://docs.saltstack.com/en/latest/ref/configuration/master.html#state-output to mixed might help
14:49 babilen (we typically run with that set to 'changes', but 'mixed' is probably more apropriate for your usecase)
14:50 babilen DammitJim: Could you paste a more complete example of what you are trying to achieve/do ?
14:51 kusams_ joined #salt
14:52 tmclaugh[work] joined #salt
14:52 av_ Thanks babilen
14:54 murrdoc joined #salt
14:54 domel joined #salt
14:55 DammitJim https://gist.github.com/anonymous/aa22339dbe88f7557441
14:55 DammitJim babilen, something like this
14:55 DammitJim the pillar has a list of instances I need to create on the server.. in the example, it's just instance 1 and instance 2
14:56 DammitJim in each instance, I specify the ports to be configured in the server.xml file
14:56 DammitJim but I also specify the connection pools that need to be iterated in the server.xml file
14:56 DammitJim I don't know how to pass this information in the state file
14:56 DammitJim does that make sense? I'm sure there is an easier way to do this
14:56 domel morning
14:56 clintberry joined #salt
14:57 domel was wondering if anyone can help out with the syntax
14:57 domel https://gist.github.com/anonymous/b36c68b54997f6fd6b6e
14:58 babilen DammitJim: Line 3 doesn't work like that as you can't have a stray "elif"
14:59 DammitJim yes, sorry about that... I have other servers defined before that
14:59 DammitJim please ignore
14:59 babilen okay
14:59 DammitJim that's the hard part about giving examples when getting help, but I do appreciate you seeing that!
15:00 teebes joined #salt
15:03 babilen DammitJim: I'm not quite sure what you mean by "I don't know how to pass this information in the state file"
15:03 DammitJim oh, so, I don't know how to grab the instance name in the state file for example: /var/lib/{{ grains['host'] }}{{ instance }}/conf/server.xml:
15:03 DammitJim right now I get a rendering error
15:04 babilen DammitJim: In your server.xml you would have something like {% set pool = salt['pillar.get']('tomcat:pool', {}) %} that gives you access to the pool. I don't quite see what you want to do in the state about that.
15:04 DammitJim how do I say... instance.<name> so that it prints 1 for the first instance, and 2 for the second instance
15:04 babilen Do you want to render that file multiple times with different contexts? Is *that* the issue?
15:05 babilen Ah, you do that already
15:05 babilen sorry
15:05 babilen Looks alright
15:05 DammitJim yes, I render the file multiple times to different locations and different configurations according to the pillar data
15:06 DammitJim so, the state file basically creates the server.xml for instance 1 at 1 location, then another server.xml for instance 2 at another location
15:06 babilen yeah
15:06 DammitJim then I'm trying to pass the ports to the server.xml template
15:06 DammitJim as well as the multiple apps
15:07 murrdoc joined #salt
15:07 babilen Which you do via - context:
15:07 DammitJim ok, but before we get that far, how do I get just the instance name (in this case, 1 and 2)
15:07 DammitJim yes, sir
15:07 babilen Where do you want to get it?
15:07 DammitJim {% for instance in tomcat_sections.iteritems() %}
15:07 DammitJim I grab each instance with that piece of code, right?
15:08 DammitJim if I do this: /var/lib/{{ grains['host'] }}{{ instance }}/conf/server.xml:
15:08 babilen Ah! You'd want that to be for instance_name, instance_settings in ....
15:08 DammitJim I get a compile error or rendering error: /var/lib/upapps901p(1, {'apps':  ...
15:08 DammitJim I bet you this is super simple
15:09 DammitJim do I do something like instance[0] ?
15:09 DammitJim let me try
15:09 babilen Okay, you get a dictionary with one key {1: { foo: ..., bar: ...., ...}} there. You can do the aforementioned "for instance_name, instance_settings" which gives you "1" in instance_name and "{ foo: ..., bar: ...., ...}" in instance_settings
15:10 babilen err, you get (1, { .... })
15:11 babilen Either way you want to unpack that tuple there to name, settings
15:11 DammitJim got it
15:11 DammitJim I think that's working
15:12 babilen It should, we are paying it more than 10€ an hour
15:12 DammitJim now,
15:12 Akhter joined #salt
15:12 DammitJim LOL
15:12 DammitJim gosh, I was asking about the cli because the errors are hard to read when running the actual state...oh, I should enable debug
15:12 av_ Guys I have another question. Is it possible to check failures (or all debug) in the last run highstate? I ran high state and some of the states failed. Then I scrolled down, fixed up and now i can't go up (my terminal doesn't save full session). Now I don't want to run high state again. I checked `jobs.lookup_jid`, but it doesn't display anything useful.
15:12 DammitJim anyways... now I have SaltRenderError: Jinja variable 'unicode object' has no attribute 'iteritems'
15:13 trph joined #salt
15:13 DammitJim I might need to use items?
15:13 PeterO_ joined #salt
15:14 DammitJim ohok, I might need to update my template now
15:15 babilen Good luck, DammitJim.
15:15 DammitJim am I accessing the apps properly when I do: pool: salt[pillar.get']('instance_settings:apps','applications')
15:15 DammitJim I'm getting: SaltRenderError: Jinja variable 'unicode object' has no attribute 'iteritems'
15:19 bhosmer joined #salt
15:20 otter768 joined #salt
15:21 markm joined #salt
15:21 DammitJim ugh, how do I print data when I run a state so I know what I am doing? it's driving me crazy not knowing what is being passed around
15:21 tomspur joined #salt
15:23 zmalone joined #salt
15:27 stupidnic Can somebody help clarify something for me? I think I read something that said that Jinja is rendered before it is executed on the minion, is that correct?
15:27 domel anyone got any suggestions how to fix this? https://gist.github.com/anonymous/b36c68b54997f6fd6b6e
15:28 kirzon joined #salt
15:28 timoguin joined #salt
15:30 DammitJim where can I read about all this stuff... getting dictionaries in states and passing dictionaries to a template...
15:37 trebortech joined #salt
15:39 Akhter joined #salt
15:46 aparsons joined #salt
15:47 pmcnabb joined #salt
15:48 irctc590 joined #salt
15:48 GabLeRoux joined #salt
15:49 bhosmer joined #salt
15:50 irctc590 hi
15:54 discypher joined #salt
15:56 k00l joined #salt
15:56 k00l good morning everyone
15:57 k00l wondering how do i access pillar data when i send it down the line with a API call.
15:57 k00l kwarg={"pillar": {"fold_name":"TEST"}}
15:58 DammitJim why isn't this working? shut: {{ salt['pillar.get']('instance_settings:ports:shut','no port found') }}
15:58 DammitJim instance_settings is a variable that came from {% for instance_name, instance_settings in tomcat_sections.iteritems() %}
15:58 DammitJim when I say it isn't working, it's printing "no port found"
15:59 DammitJim k00l, you mean how do you access the dictionary info?
15:59 k00l DammitJim: that api call kicks off a state, i want to access those Dict args from my state when its running .
15:59 DammitJim not sure what you mean by API call
16:00 DammitJim where do you have this data stored?
16:00 k00l Rest CherryAPI
16:00 k00l DammitJim:  kwarg={"pillar": {"fold_name":"TEST"}}
16:02 tanta_g joined #salt
16:05 k00l DammitJim: wheres what i get back : "Rendering SLS 'base:stacks' failed: Jinja variable 'fold_name' is undefined"
16:05 RedundancyD joined #salt
16:05 DammitJim what are you using to call that?
16:05 neogenix joined #salt
16:06 k00l DammitJim:  PHP Curl with "Content-Type: application/x-www-form-urlencoded"
16:07 k00l DammitJim: i just dont knwo how it to use the pillar im passing.
16:07 lz-dylan Morning, folks.
16:08 lz-dylan Anyone know how stuff from ext_pillar gets namespaced?
16:09 breakingmatter joined #salt
16:09 DammitJim how do I parse this in a template: {'apps': {'loadDL_INFO': {'url': 'UPDLINFO', 'username': 'udbload', 'password': 'doload', 'name': 'loadDL_INFO', 'server': 'updbm1p'}, 'loadAPPMAN': {'url': '
16:09 DammitJim UPAPPMAN', 'username': 'udbload', 'password': 'doload', 'name': 'loadAPPMAN', 'server': 'updbm1p'}, 'loadAPMBOS': {'url': 'UPAPMBOS', 'username': 'udbload', 'password': 'doload', 'name': 'loa
16:09 DammitJim dAPMBOS', 'server': 'updbm1p'}, 'portal': {'url': 'UPPORTAL', 'username': 'udreport', 'password': 'doreport', 'name': 'portal', 'server': 'updbm1p'}}, 'ports': {'shut': 8011, 'http': 8091, 'h
16:09 DammitJim ttps': 8451}}
16:09 DammitJim oh man, sorry
16:09 DammitJim I need to put this in gist
16:09 DammitJim hold on
16:10 DammitJim https://gist.github.com/anonymous/7fc48df3de31744e606d
16:10 DammitJim how do I parse something like that in a template?
16:12 Ztyx1 joined #salt
16:12 Ztyx1 joined #salt
16:13 SheetiS DammitJim: use json (https://docs.python.org/2/library/json.html) and json.loads() will give you a dictionary to use.
16:13 lz-dylan I'm running `salt (target) saltutil.refresh' with an ext_pillar enabled and with the pillar name specified in topfile matching (target). salt-master clearly gets the file from the ext_pillar; it just doesn't seem to match properly.
16:13 lz-dylan https://gist.github.com/arubis/7b1532490c2b5adfa10d
16:14 bhosmer joined #salt
16:14 DammitJim is this the part where I need to write python code, SheetiS ?
16:14 DammitJim I'm OK with python, but never have had to write it together with salt
16:14 SheetiS Oh no I thought i was in the python channel.
16:14 SheetiS you can still use json with salt though
16:14 SheetiS let me get you a better example.
16:15 DammitJim thanks... just know that I am passing this dict from a state to the template
16:16 SheetiS look at import_json here: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#salt.utils.jinja.SerializerExtension
16:16 DammitJim wow... I was just reading that
16:16 DammitJim you mean the json_src?
16:17 sevalind joined #salt
16:17 SheetiS well you can read a whole file like this: {% import_json "defaults.json" as defaults %} and then use 'defaults' as a dict going forward.
16:18 SheetiS can even pass the dict on to a template with context.  use a context of something like {{ defaults|json }} or some such.
16:18 snarfy__ joined #salt
16:18 DammitJim {%- set json_src = {{ pool }}|load_json %}
16:18 DammitJim gives me  Jinja syntax error: expected token ':', got '}';
16:18 DammitJim though
16:19 Lionel_Debroux joined #salt
16:19 tongpu joined #salt
16:19 trapha joined #salt
16:19 SheetiS can you give a gist of what you are actually trying to do before and after that?  I am certain that line is not what you want, but better context would help me direct you to what would work better.
16:20 DammitJim again, I am importing the dictionary via context on a state file
16:20 DammitJim yes, certainly!
16:20 nofxroky joined #salt
16:20 SheetiS ok so "pool" is a dict and you want rendered json in the template?
16:21 bmcorser_ joined #salt
16:21 SheetiS (I'll wait for the gist as it is probably easier than having you explain)
16:21 DammitJim yes
16:22 leev_ joined #salt
16:22 DammitJim https://gist.github.com/anonymous/fb93b6e2c4cfaf57fa03
16:22 SheetiS I have a meeting in 10 minutes in case I get cut short, I'll be back roughly an hour after that, but hopefully we can have you squared away in short order :D
16:22 DammitJim SheetiS, that's what I have, but I know my template is messed up
16:22 illern__ joined #salt
16:22 DammitJim I bet this is very simple
16:22 DammitJim I'm passing instance_settings as the variable pool via context
16:23 SneakyPh1l joined #salt
16:23 pratikmallya joined #salt
16:23 stickmac1 joined #salt
16:23 k00l wondering how do i access pillar data when i send it down the line with a API call.
16:23 FreeSpencer_ joined #salt
16:24 oeuftete_ joined #salt
16:24 k00l kwarg={"pillar": {"fold_name":"TEST"}}
16:24 RandyT_ joined #salt
16:24 mohae_ joined #salt
16:24 stephen144 joined #salt
16:24 garthk_ joined #salt
16:24 rackermanfred joined #salt
16:24 alexlist joined #salt
16:24 nlb_ joined #salt
16:24 nocturn joined #salt
16:24 slicer joined #salt
16:24 eichiro_ joined #salt
16:24 flebel joined #salt
16:24 kbyrne joined #salt
16:24 FreeSpencer joined #salt
16:25 k00l do i need the "pillar" namespace when i send it ?
16:25 SheetiS DammitJim: try using "pool: {{ instance_settings|json }}" on line 53.  That should let the dict go across easily enough without a render error (from what I am seeing).  Otherwise you might get newlines and things that will not behave as you would like.
16:26 stooj joined #salt
16:26 quasiben joined #salt
16:26 DammitJim and then still load it as json in my template?
16:26 neogenix left #salt
16:26 SheetiS it will pass it as a dict that isn't broken in any way
16:26 DammitJim Unable to load json from OrderedDict
16:27 SheetiS if you need it as json inside of the template
16:27 DammitJim when I try using: {%- set json_src = pool|load_json %}
16:27 DammitJim I don't care if it is jason or what, I just need to grab the data from it like shut, http, https, then the list of apps
16:27 DammitJim not sure what this OrderedDict is
16:27 Ztyx joined #salt
16:28 SheetiS you don't need that line at all "pool: {{ instance_settings }}"
16:28 SheetiS err wrong thing
16:28 SheetiS "{%- set json_src = pool|load_json %}" is not needed
16:28 DammitJim oh ok...
16:28 DammitJim oh ok
16:28 SheetiS try the gist just as you gave it to me (the for loops should work)
16:28 SheetiS with the 1 change I suggested.
16:29 DammitJim with the instance_settings|json change?
16:29 SheetiS yeah
16:29 SheetiS The only time you will run into a problem otherwise is if a value does not exist
16:29 aparsons joined #salt
16:29 DammitJim but in my template, I don't know how to get the value that would be apps -> portal -> name for example
16:30 DammitJim pool.iteritems doesn't work
16:31 DammitJim besides, I don't want to iterate through the pool, first I need to grab the ports and the apps
16:31 DammitJim then I need to iterate through the apps
16:31 mrwboilers joined #salt
16:32 DammitJim oh, I can do {{ pool['ports'] }}?
16:32 Bryson joined #salt
16:32 SheetiS absolutely
16:32 DammitJim how do I go a level deeper?
16:32 DammitJim ack!
16:32 SheetiS pool['ports']['https']
16:32 DammitJim {{ pool['ports']['shut'] }}
16:32 DammitJim got it
16:33 SheetiS just like you would in python with a dict.
16:33 DammitJim and then how do I iterate through it?
16:33 SheetiS what part do you want to iterate through?  apps?
16:33 tru_tru joined #salt
16:33 DammitJim yes
16:33 bhosmer joined #salt
16:34 DammitJim I'd have to do: {% for option, value in {{ pool['apps'].iteritems() %} ?
16:34 SheetiS {% for key, value in pool['apps'].iteritems() %} should work
16:34 pdayton joined #salt
16:34 SheetiS yeah
16:34 DammitJim {%- for option, value in {{ pool['apps'] }}.iteritems() %}
16:34 SheetiS no
16:35 DammitJim doesn't like it
16:35 sseekamp joined #salt
16:35 SheetiS look at how I did it without the {{ }}
16:35 DammitJim oh wow
16:35 DammitJim why is that?
16:35 SheetiS because you don't want to render the dictionary
16:35 SheetiS you want to parse it.
16:35 SheetiS {{ }} means render what is inside into the template.
16:36 DammitJim oh wow
16:36 SheetiS by being inside a {% %} block we already know we are working in jinja 'code', so a variable is ok
16:36 jbub joined #salt
16:37 DammitJim got it
16:37 DammitJim lessons learned
16:37 DammitJim I wonder where I missed that while doing the tutorials
16:37 JDiPierro joined #salt
16:38 k00l wondering how do i access pillar data when i send it down the line with a API call.
16:38 DammitJim thank you sir
16:38 k00l kwarg={"pillar": {"fold_name":"TEST"}}
16:39 hal58th_ joined #salt
16:40 quasiben1 joined #salt
16:42 tongpu joined #salt
16:43 writtenoff joined #salt
16:44 dharper_ii joined #salt
16:47 dharper_ii Good Morning All. Has anyone tried to updgrade a windows minion on windows to 2015.8.0? And if so, have you ran into the libeay32.dll "Not designed to run on Windows or contains an error" problem?
16:48 chiui joined #salt
16:48 Brew joined #salt
16:53 knite_ joined #salt
16:57 Fiber^ joined #salt
16:57 bougie joined #salt
16:59 SheetiS k00l: any pillar data sent via a kwarg from cli/api should be able to be accessed in states the same way as any other pillar data.  You should be able to salt['pillar.get']('key', 'some_default') or the like inside of the state.
17:00 szhem joined #salt
17:00 druonysus joined #salt
17:00 druonysus joined #salt
17:01 k00l SheetiS: so in a template that would look like :   {{ salt['pillar get']('key', 'fall_back') }}  ??
17:01 traph joined #salt
17:03 overyander joined #salt
17:03 k00l SheetiS: Here is how im sending it, is it correct ?kwarg={"pillar": {"fold_name":"TEST"}}
17:06 ajw0100 joined #salt
17:07 k00l SheetiS: oh looks like i found the awnser to the template question LOL.
17:07 SheetiS it looks right to me as a stand alone to me.
17:07 SheetiS Have everything you need then?
17:08 k00l SheetiS: its still running, but i am further than i was LOL
17:08 SheetiS dharper_ii: I currently only have Linux minions, so I wouldn't be much help on that.  I've not tried the windows 2015.8 in any environment.
17:09 jodv joined #salt
17:09 forrest joined #salt
17:10 k00l SheetiS: that didnt seem to work, but i think its more about how im sending it
17:11 SheetiS have a gist of your API lines and then also the state to see how the pillar is being used?
17:13 Rebus joined #salt
17:14 k00l SheetiS: https://gist.github.com/anonymous/c0cb22391da1aeaa0a83
17:14 saltnoob joined #salt
17:14 dthom91 joined #salt
17:15 bhosmer joined #salt
17:16 nofxrok joined #salt
17:17 aparsons joined #salt
17:18 breakingmatter joined #salt
17:21 otter768 joined #salt
17:23 oeuftete joined #salt
17:24 SheetiS k00l: That looks right ot me for the x-www-form-urlencoded method, but it might be more sane with kwargs like that to use json.  Is the state running but just entry is not in the pillar?
17:25 oeuftete I have a non-templated file that I want to create via salt, except with one line commented.  Is there a way to do that in one state, so that every time I re-run the state the comment doesn't get toggled off then back on?
17:29 Brew joined #salt
17:29 clintberry joined #salt
17:29 Ahlee file.comment, with an unless?
17:31 k00l SheetiS: yes i just cant see the pillar data
17:32 quasiben joined #salt
17:32 oeuftete Ahlee: you might need to spell out the "unless what?" part for me.
17:33 Ahlee oeuftete: States have a flag unless which will be tested, and only run if the unless fails
17:33 quasiben joined #salt
17:33 Ahlee hold for examle
17:33 oeuftete Ahlee: right, but I don't understand what clause would meet my need
17:34 Ahlee oeuftete: unless grep ^# <line>
17:34 Ahlee probably better ways, but that's how we do it
17:34 rvankleeck joined #salt
17:35 oeuftete Ahlee: if the file doesn't already exist, I would need to trigger another state to get it
17:35 rvankleeck I keep getting TypeError: get_colors() takes at most 1 argument (2 given), even with --no-color
17:35 Ahlee watch: on that state
17:36 bfoxwell joined #salt
17:37 bhosmer joined #salt
17:39 oeuftete hmmmm, I can't see how that's going to cut it either.  I'll think about it more.  Thanks.
17:39 rvankleeck that happens when i do 'salt-call state.highstate'
17:44 Bryson joined #salt
17:45 k00l SheetiS: did i loose ya ?
17:45 mapu joined #salt
17:46 SheetiS I'm still here.  Have you tried posting the same data via json just to ensure that url encoding isn't messing with anything?
17:46 SheetiS You'd need to switch the Content-Type header as well.
17:47 svinota joined #salt
17:48 k00l SheetiS: i have it all setup in www encoded so id have to switch allot of stuff over.
17:48 k00l SheetiS: im not sure if thats the proper format for the pillar
17:49 k00l SheetiS: kwarg={"pillar": {"fold_name":"TEST"}}
17:49 sevalind Has anyone ever automated running salt commands in a python script? I'm having an issue with subprocess.call and salt. It seems to not recognize the minion name (throws error "No minions matched the target. No command was sent, no jid was assigned.")
17:49 larsfronius joined #salt
17:50 pratikmallya joined #salt
17:51 pratikma_ joined #salt
17:52 joshuah joined #salt
17:53 joshuah hello
17:53 SheetiS k00l: that part looks exactly as i'd expect.
17:53 k00l weird
17:54 SheetiS sevalind: if you want to do salt calls in a python script, why not use the salt api?
17:54 SheetiS https://docs.saltstack.com/en/latest/ref/clients/index.html#client-apis
17:54 sevalind SheetiS: didn't know that was a thing. That might be a better solution!
17:55 larsfronius joined #salt
17:55 joshuah have a question guys, i started using salt on our freebsd infrastructure and i noticed that some functions in modules are missing support for freebsd, i.e. the function for changing the group id. how can i help so we can get support for freebsd too...
17:56 joshuah andim pretty new to python, but by the looking of the code i can get and understand what its doing to some degree
17:57 baweaver joined #salt
17:57 sevalind SheetiS: so salt.client.LocalClient() is the most analgous to the salt command line running modules on minions
17:57 tanta_g joined #salt
17:58 joshuah changing the id of an existing group, unless im looking at the wrong function....
17:58 SheetiS sevalind: correct.
17:59 sirex joined #salt
17:59 sevalind SheetiS: Well, shoot, now I feel like a dingus. I should have checked! ;-)
18:00 iggy oeuftete: file.prepend?
18:00 katyucha joined #salt
18:00 twork in a template... what's the difference between foo.get('bar') and foo.get('bar', 'default')? is the first just shorthand for when you don't need a default?
18:00 k00l SheetiS: do yathink that i need to escape the quotes ?
18:00 TooLmaN joined #salt
18:00 SheetiS joshuah: I was under the impression that uid and gid worked for salt.states.user on FreeBSD, but I could be wrong.
18:00 twork correction:
18:01 iggy twork: the first returns a default of NoneType
18:01 GreatSnoopy joined #salt
18:01 twork the first case i want to ask about is just: foo.bar
18:01 twork iggy: ok, thanks
18:02 iggy foo.get(bar) won't fail, foo.bar will fail if there is no bar in foo
18:02 SheetiS k00l: you could try.  I've not tried to pass kwarg data that is url encoded.  (I've always used json because it was easier for me to visualize)
18:02 twork got it
18:02 twork thanks
18:02 joshuah sheetis: i was trying to chane it via salt.modules.useradd.chgid if i recall corectly..
18:02 joshuah chnage*
18:03 joshuah maybe i was looking at the wrong function?
18:03 SheetiS so a one-off from the CLI instead of a managed user in a state?
18:04 joshuah yes, because  the group was already there, and i wanted to rearange the ids
18:04 wt joined #salt
18:04 joshuah of a specific group on multiple minions
18:04 wt hi, are wheel modules still supported?
18:05 joshuah there is support for openbsd, netbsd, but not for freebsd
18:05 wt I have a backtrace from a very simple script that used to work.
18:05 rvankleeck joined #salt
18:05 rvankleeck joined #salt
18:05 quasiben joined #salt
18:05 joshuah linux/openbsd/netbsd have the same cmd for changing the gid, but freebsd has a different command for that
18:09 joshuah i know the cmd, just wanted to help in someway to implement the freebsd support... i assume there are more missing functions like that, and if i can help to get suppoort for those it will be very nice
18:10 lz-dylan Is there a way to expand the _errors item in pillar when something goes wrong?
18:10 rm_jorge joined #salt
18:11 lz-dylan Ie. I'm trying to use ext_pillar and having some namespace issues
18:11 lz-dylan when I do a salt target pillar.ls, one of the items returned is `- _errors`
18:11 lz-dylan and okay so it turns out that I need to escape that and so `salt target pillar.get '_errors'` works. Thanks, rubber duck IRC :)
18:12 lz-dylan doesn't give me enough info to do anything I wasn't already but at least that immediate question is answered..
18:12 baweaver joined #salt
18:13 krymzon joined #salt
18:16 k00l SheetiS: can you give me a quick example hoe i can send these via JSON ?
18:16 joshuah1 joined #salt
18:17 joshuah left #salt
18:17 tanta_g joined #salt
18:18 SheetiS k00l: https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_tornado.html#usage I think the first example under that anchor gives a json example running 2 commands.
18:20 bhosmer joined #salt
18:21 tmclaugh[work] joined #salt
18:22 k00l SheetiS: yeah, im not sure how that works. thanks anyways.
18:23 wendall911 joined #salt
18:24 SheetiS k00l: what are you using to post data right now to the api?
18:24 k00l SheetiS: PHP curl
18:26 lz-dylan Rrgh. Okay! So, I put a pillar SLS file alongside my others and specified its name in pillar topfile. saltutil.refresh_pillar and a pillar.ls on a valid target, and there it is. Move it to the S3 bucket...and salt complains that the state isn't available. Consistently.
18:27 teryx510 joined #salt
18:27 SheetiS k00l: You could do something like http://www.lornajane.net/posts/2011/posting-json-data-with-php-curl or manually make a json encoded string.  I don't use php much these days, but that should be a place to start.
18:29 k00l SheetiS:  LOL, that stil dosnt explain how the pillar is suspoed to be passed in
18:30 saltnoob_ joined #salt
18:30 SheetiS ok.  I'll add a pillar kwarg to the example json from the netapi link above.  One moment.
18:30 lz-dylan Every pillar refresh gives `[CRITICAL] Pillar render error: Specified SLS 'logentries_agent' in environment 'base' is not available on the salt master` on master. Frustrating.
18:33 GabLeRoux joined #salt
18:39 nafg_ joined #salt
18:40 SheetiS k00l: This is how I'd do it with curl from the CLI, but it should have a python example -> https://bpaste.net/show/3df25b49279b.
18:41 k00l SheetiS: k, thanks anyway.
18:41 SheetiS s/python/json/
18:43 alemeno22 joined #salt
18:44 k00l Does anyone else know how to pass pillar data through a API call ?
18:45 k00l using for encoded vars
18:45 gadams999 joined #salt
18:45 k00l form*
18:45 alemeno22 Hey everyone! Has anyone run into the issue where when you stop the salt-master process, all the minions eventually crash when timing out trying to connect to it? I was Googling around and saw that this may have been fixed in the 2015.5 build, but we’re on that version and it seems to still be an issue. Any ideas?
18:45 Akhter joined #salt
18:46 lz-dylan OMFG okay so for anytong who ends up searching IRC for all this mess later, you need to put a pillar topfile _on the external pillar_ in addition to the one on your 'non-external' pillar
18:46 stupidnic Is there any premade forumlas for interacting with the /proc filesystem?
18:47 wt stupidnic, sysctl?
18:47 stupidnic yeah I guess that is right... brain fade.
18:47 PeterO_ joined #salt
18:48 joshuah is there noone here from the dev team?
18:48 gadams999 So I'm trying to get my first reactor to execute (example highstate one). I can see the event trigger, but then it shows "gathering" "compiling", but nothing is triggering.  salt 'id' state.highstate is working.
18:49 robawt joshuah: they come and go like anyone else. this is the community channel
18:49 gadams999 assume a cmd.state.highstate executes in the same manner (e.g., /srv/salt/top.sls)?
18:49 k00l Does anyone know how to pass pillar data through a API call (Content-Type: application/x-www-form-urlencoded)?
18:50 joshuah @robawt is there other way to contact them? i didn't find any forums or something like that
18:50 knite_ joined #salt
18:53 nofxrok joined #salt
18:53 whytewolf joshuah: https://groups.google.com/forum/#!forum/salt-users they sometimes respond in there
18:54 whytewolf joshuah: but if you have a bug you want fix. file a issue through github
18:54 pravka joined #salt
18:55 joshuah it's not a bug, it's that i found some modules missing function implementations for FreeBSD, and I wanted to help so it gets a better support
18:55 whytewolf that would be a bug actually. and github is the way forward
18:56 k00l SheetiS: it was being passed wrong... well wrong for what i wanted ..
18:56 joshuah getting support for the groupadd.chgid is like 3 line of code, just tested it and it works ok
18:56 joshuah and i know nothing about python
18:57 joshuah if __grains__['kernel'] == 'FreeBSD':
18:57 joshuah cmd = 'pw group mod {1} -g {0}'.format(gid,name)
18:57 joshuah else:
18:57 k00l SheetiS:  here is what i did : kwarg={foo":"bar"}& ... and on teh template i used : /var/www/html/{{ 'foo' }}
18:57 joshuah ah sorry
18:57 dijit joined #salt
18:57 k00l SheetiS: referenced this to learn it.  https://github.com/saltstack/salt/issues/5224
18:58 whytewolf joshuah: read this, should give you some insite into howto contrib https://docs.saltstack.com/en/latest/topics/development/contributing.html
18:58 bhosmer joined #salt
18:59 joshuah ah the docs, i'm such a muppet
18:59 wt muppet...like kermit the frog?
18:59 joshuah :D
19:00 whytewolf when all else fails. TO THE DOCS!
19:01 joshuah yeah, just thought there would be some kind of forum where ppl can write and etc, and maybe devs are watching and etc
19:02 whytewolf this isn't a small project. the devs can't always be around. they have a lot of patches to whip into shape. which is why there is protocal for submitting bug, and feature requests. as well as submitting PR's
19:03 linjan_ joined #salt
19:04 whytewolf but yeah, they show up in here sometimes. as well as in that email list i posted earlyer. [the google groups]
19:04 sevalind Using the salt python api, is there any way to run with test=True?
19:05 sevalind I'm looking at the docs for salt.client.LocalClient() and don't see it, but I might just be blind
19:05 whytewolf I think it is just as simple as test: True in your json
19:05 whytewolf don't quote me on that though
19:06 wt sevalind, kwarg
19:06 sevalind wt: ah, ok. so: kwarg={'test': 'False'}
19:06 wt I think that will work.
19:07 sevalind Time to test it in production! :P
19:07 sevalind (kidding)
19:07 jY joined #salt
19:08 nate_c joined #salt
19:08 hal58th_ wt: Wouldn't it be kwarg={'test': False}
19:09 wt hal58th_, maybe
19:10 wt hal58th_, I don't really know. There is so much magic and inconsistency in the salt libs that I just don't know off the top of my head.
19:10 wt sevalind, might want to look at hal58th_'s last comment
19:11 sevalind wt: true, I'll try both
19:12 clintberry joined #salt
19:13 Akhter_ joined #salt
19:13 hal58th_ yeah, I just know test is expecting a Boolean and not a string. I'm curious which one it likes
19:14 baweaver joined #salt
19:16 racooper Howdy all. I'm looking for an example of a module that simply runs a local command with arguments and returns the result.  specifically, rkhunter.  Anyone have a recommendation of a module with similar functionality?
19:21 saltnoob joined #salt
19:21 cberndt joined #salt
19:21 protoz joined #salt
19:21 elsmo joined #salt
19:21 otter768 joined #salt
19:23 sevalind racooper: you're likely looking for cmd.run
19:24 racooper not really...I use cmd.run right now, I'd like to build an rkhunter module to use instead
19:26 twork just noticed that the 'users' formula has a module, 'bash-package', which prompts me to wonder: if two formulass have formulas with the same name, what happens?
19:28 twork should that one be named more like 'users-bash-package' or some such?
19:29 twork or, is the fact that it occurs inside the uses module enough?
19:30 sPollk joined #salt
19:35 sevalind racooper: ah, i see, I misunderstood
19:37 hasues joined #salt
19:38 whytewolf twork: users-formula has what? a module? a state file? you kind of switched up what your question is about. but generally last in wins
19:39 keimlink joined #salt
19:40 protoz joined #salt
19:40 GreatSnoopy joined #salt
19:42 Ahlee am i reading this correctly, manage.status runner doesn't honor passed timeout, and instead will only use config file timeout? https://github.com/saltstack/salt/blob/develop/salt/runners/manage.py#L46
19:43 DanyC joined #salt
19:43 CeBe joined #salt
19:45 mrwboilers Anyone use Vagrant for testing purposes? If so, are there any good, trustworthy boxes available with salt already installed?
19:45 nicmoski joined #salt
19:47 lz-dylan mrwboilers: the 'saltstack' formula has a Vagrantfile attached to it, and I believe there's additional references in the docs
19:47 k00l joined #salt
19:47 cwyse_ joined #salt
19:47 k00l Does anyone know how to pass kwargs with a API call using Content-Type: application/x-www-form-urlencoded
19:48 lemur joined #salt
19:49 Ahlee k00l: have you tried arg=['foo', 'bar']
19:49 k00l Ahlee: sending the state name through arg already
19:50 snarfy__ joined #salt
19:52 mrwboilers iz-dylan: thanks!
19:53 Ahlee k00l: looks like it should just be another passed dict that expands to key:value
19:54 Ahlee k00l: i'd try kwargs={'foo':'bar'} and go from there
19:54 k00l tryed that already
19:54 k00l Ahlee:  ya i tryed that already
19:54 Ahlee dusting off an environment now
19:56 Ahlee k00l: this is through the netapi module? either the cherrypy or saltnado imlementation?
19:56 k00l Ahlee: yes its cherry
19:57 k00l Ahlee: im watching the salt event bus and i dont see the kwargs being reperesented in there.
19:57 bhosmer joined #salt
19:58 kukacz joined #salt
19:59 clintberry2 joined #salt
20:03 pdayton1 joined #salt
20:03 teebes joined #salt
20:11 andrew_v joined #salt
20:12 hasues left #salt
20:17 breakingmatter joined #salt
20:18 giantlock joined #salt
20:18 pdayton joined #salt
20:18 hasues joined #salt
20:20 s_kunk joined #salt
20:24 colonD joined #salt
20:24 hasues left #salt
20:25 hasue1 joined #salt
20:25 baweaver joined #salt
20:26 afics joined #salt
20:27 PeterO_ So if I pass reload: True to a service.running and the service already running it will restart the service?
20:30 mapu joined #salt
20:31 traph joined #salt
20:32 nicmoski PeterO_: I don't think so. I checked redhat services specifically and it calls a /sbin/service {} reload, not restart https://github.com/saltstack/salt/blob/develop/salt/modules/rh_service.py#L400
20:32 murrdoc joined #salt
20:32 PeterO_ but that looks like it reloads it if reload is True
20:33 khaije1 joined #salt
20:33 khaije1 are quotes in a state identifier OK?
20:34 khaije1 In other words, are the \" characters considered part of the name?
20:36 saltnoob joined #salt
20:37 murrdoc nope
20:37 cberndt joined #salt
20:37 murrdoc 'lol"right'
20:37 murrdoc or name: 'lol"right'
20:37 pgoetz_ joined #salt
20:41 nicmoski PeterO_: From the documentation the reload will only be honored if you are using the parameter `watch`. Then if the service allows for reload and the state you are watching runs/changes it will reload the service. If reload is not available it will restart, but again, only if the watched state returns with "changes"
20:41 pgoetz joined #salt
20:42 hasue1 left #salt
20:42 PeterO_ ahhh nicmoski thank you.
20:42 pgoetz joined #salt
20:45 pravka joined #salt
20:46 druonysuse joined #salt
20:49 pgoetz_ joined #salt
20:51 mcil joined #salt
20:54 khaije1 thanks murrdoc
20:54 * murrdoc nods
20:56 sunkist joined #salt
20:57 hal58th joined #salt
20:57 hasue1 joined #salt
20:58 murrdoc joined #salt
20:59 DanyC_ joined #salt
20:59 deus_ex joined #salt
20:59 ajw0100 joined #salt
21:00 hal58th For those who need it, like murrdoc the ubuntu packages are up on repo.saltstack.com http://repo.saltstack.com/apt/ubuntu/ubuntu14/
21:00 murrdoc hal58th:  thank u for caring
21:00 hal58th welcome buddy
21:00 * murrdoc hugs hal58th uncomfortably long
21:01 murrdoc damn it , still no 2015.5
21:01 bVector_ joined #salt
21:01 murrdoc still this is nice
21:02 teryx510 joined #salt
21:02 cruatta joined #salt
21:02 baweaver joined #salt
21:02 k00l joined #salt
21:02 k00l Ahlee: ?
21:03 * hal58th Stands there awkwardly with his hands to the side
21:03 saltnoob joined #salt
21:03 k00l Does anyone know how to pass pillar data through a API call with "Content-Type: application/x-www-form-urlencoded"
21:08 teebes joined #salt
21:10 baweaver joined #salt
21:13 hasues joined #salt
21:13 hasues left #salt
21:15 k00l anyone ?
21:16 hod0r joined #salt
21:18 k00l is anyone here or did i loose my connection
21:20 saltnoob still here, mine reset
21:22 druonysuse joined #salt
21:22 druonysuse joined #salt
21:22 godber1 left #salt
21:22 otter768 joined #salt
21:24 forrest k00l: Usually if no on responds it means no one knows.
21:24 k00l oh thats kool , i just wanted to make sure i didnt drop connection
21:37 GreatSnoopy joined #salt
21:37 colonD joined #salt
21:39 traph joined #salt
21:39 traph joined #salt
21:40 teryx5101 joined #salt
21:40 jfred joined #salt
21:41 twork dear jinja: which can i use, a dash or an uderscore? make up your mind.
21:42 opensource_ninja joined #salt
21:42 geekatcmu "no"
21:43 twork yeah, just about
21:43 * twork checks for an r in the month
21:43 jodv don't like YAML syntax? use JSON
21:44 twork i'll surely find something to moan about there, fret not. (is it actually better? i know it not a tad.)
21:44 whytewolf don't like anything. use the py render
21:45 jhauser joined #salt
21:46 twork earlier in this channel there was advocacy for mako, both might as well be sanskrit to me
21:47 twork s,both,all,
21:47 breakingmatter joined #salt
21:48 twork ...but at this very early stage of my relationship with salt, i wonder if the time to switch t $new_loathing is now rather than later
21:49 twork might as well make the uphill climb that much more fun... start thinking in a language nobody else uses
21:49 whytewolf BF
21:50 johnkeates joined #salt
21:53 hasue1 left #salt
21:54 saltnoob joined #salt
22:01 BlackFX joined #salt
22:01 protoz joined #salt
22:01 BlackFX Hi
22:02 BlackFX anyone seen this in 2015.8 :
22:02 BlackFX Result: False
22:02 BlackFX Comment: Unable to manage file: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
22:02 BlackFX using source: https:// for file.managed
22:03 whytewolf that sounds like the source https server is using a snake oil cert. or a cert with out a proper ca bundle attached.
22:03 whytewolf or basicly any issue witht the ssl connection
22:05 armyriad joined #salt
22:07 BlackFX the source sadly is s3 :)
22:08 BlackFX curling the url seems happy enough : https://gist.github.com/geraint-jones-nz/326f1f8b14954c4424c1
22:10 whytewolf okay, that is strange than
22:10 whytewolf cause the error is defiantly an issue with the client not able to verify the ssl cert
22:11 cruatta_ joined #salt
22:12 druonysuse joined #salt
22:12 whytewolf "CAfile: none" this tells me that the ssl server is not shipping shiping a bundle. which means it is expecting the bundle to already be provided on the client side [VeriSign normally is] i would check your client side ssl [with file.managed that would be the minion]
22:14 whytewolf ssl errors can be a huge pain
22:14 bhosmer_ joined #salt
22:16 baweaver joined #salt
22:16 druonysuse joined #salt
22:16 cheus joined #salt
22:17 murrdoc in the butt
22:18 jmreicha_ joined #salt
22:21 knite_ I have some pillar data configured for a minion. I can reach the minion normally with salt 'name' test.ping, but salt -I 'key:val' test.ping fails every time. specifically, it finds the minion, but the output is always "Minion did not return. [No response]".
22:22 aristedes joined #salt
22:22 aristedes joined #salt
22:23 BlackFX how would you suggest i check ? I have curled from the minion and its fine..
22:28 whytewolf BlackFX: well could try salt-call -l debug on the minion see if it gives more info about the error
22:29 whytewolf it is possable that the url request lib has outdated bundles
22:29 whytewolf [in python]
22:30 BlackFX just a stack trace - guess I can monkeypatch it out of the way for now...
22:31 armyriad joined #salt
22:33 vouvrard1 joined #salt
22:33 vouvrard1 Hi !
22:34 vouvrard1 Who use salt for manage virtualization on Linux ?
22:36 dendazen joined #salt
22:38 johnkeates I do
22:38 opensource_ninja joined #salt
22:41 wt Is there a way to include a whole yaml file under a certain key in an included pillar file....Like include the particular file under a key called "network_config" for example?
22:41 wt I'd just like to not have to worry about having the top level key in the included file if possible.
22:46 pviktori joined #salt
22:46 baweaver joined #salt
22:51 khaije1 can I store files on a windows file share and access them for use in states?
22:52 fersur3 joined #salt
22:53 fersur3 When running the bootstrap script, what version should be pulled from git for 2015.8 ?   "v2015.8" or "v2015.8.0" ?
22:54 danlsgiga joined #salt
22:55 RandyT_ greetings
22:55 danlsgiga hey guys... I'm facing an issue when using the reactor where if I send an event, the reactor catches it and then submit another event to another minion...
22:55 danlsgiga the problem is if my target minion is running another job, my event fails
22:56 RandyT_ curious if someone would share some examples of how to create Route 53 A records based on an assigned internal ip address for an ec2 image
22:56 danlsgiga is there any way to keep trying until the job finishes in the target minion and the event succeed?
22:56 RandyT_ I see how to use boto_route53 to create an A record. Not clear to me how to get the assigned IP address as a value for that A record.
23:00 Aidin joined #salt
23:05 evidence anyone else notice that when using schedule.present, every highstate results in a modification of each schedule with '-enabled:True' ?
23:06 evidence no matter what you set enabled to in the state opts, and it seems to get overwritten or ignored, as schedules still persist on disk w enabled, and run fine
23:07 evidence it seems like maybe a dissension on whether enabled should be there by different pieces that touch the schedule (default is enabled, so neither is wrong..)
23:07 sgargan joined #salt
23:10 TheoSLC joined #salt
23:10 dthom91 joined #salt
23:19 mpanetta_ joined #salt
23:19 cruatta joined #salt
23:20 k00l joined #salt
23:20 mosen joined #salt
23:20 breakingmatter joined #salt
23:23 otter768 joined #salt
23:26 cyborg-one joined #salt
23:28 iggy evidence: I'd file a bug, that persistence code is pretty new... it's probably that
23:28 quasiben joined #salt
23:29 MindDrive *sigh* I wrote this down somewhere, but now I can't find it and the commands I've tried haven't been working; I have a gitfs setup for my masters and I'm trying to sync a change to the minions - I *thought* the command "salt '*' sync_modules", but I actually don't have a direct checkout of the git repo (just a copy in /var/cache/salt/master/gitfs), so that fails with '__virtual__ returned False'.  What am I forgetting?
23:30 iggy saltutil.sync_all
23:31 evidence iggy: will do.. just wanted to see if anything else was up before i do.  i'll see if i can't root out the pieces that touch it
23:31 iggy evidence: there have been other issues with the persistence "feature", so I'd start there
23:31 MindDrive Thank you, Iggy.
23:31 evidence heh yeah we've been working through those.. bugs about the schedules persisting to disk, and being lost on restart etc
23:32 evidence 2015.8.0 seems solid on that front though
23:32 alemeno22_ joined #salt
23:34 danlsgiga just found the queue kwarg for state module... beautiful
23:34 danlsgiga thanks guys
23:34 vouvrard joined #salt
23:35 vouvrard Who use Salt for manage virtualisation cluster ?
23:39 aristedes joined #salt
23:39 aristedes left #salt
23:39 cruatta joined #salt
23:44 pratikmallya joined #salt
23:44 pdayton joined #salt
23:46 roninhack joined #salt
23:46 mpanetta_ Hey all, anyone around that could possibly help with a jinja rendering issue in my pillar?
23:47 hal58th pretty much anyone here mpanetta, paste your question into gist.github.com
23:47 pdayton1 joined #salt
23:47 mpanetta_ https://gist.github.com/bentwire/0a763ed4ec524b7a56b5 <-- Thanks :)
23:48 breakingmatter joined #salt
23:48 cruatta_ joined #salt
23:48 pdayton2 joined #salt
23:48 hal58th wow complicated. What's your actual issue?
23:49 mpanetta_ I don't get a render error, I just get None under cluster: in my pillar.items output
23:49 seatan joined #salt
23:49 pentabular joined #salt
23:50 mpanetta_ It is like the top for loop is never run.
23:50 hal58th Then I would start the debugging by setting a variable one loop at a time and see where it breaks.
23:51 mpanetta_ You mean adding various thing: {{ var }} around?
23:51 mpanetta_ So I can see the output in my pillar.items
23:52 hal58th Yeah just setting a pillar value like see what product is being set to
23:52 baweaver joined #salt
23:53 mpanetta_ Ok cool, thanks!
23:53 bourbon left #salt
23:54 jayne_ joined #salt
23:56 joshuah joined #salt
23:57 evidence iggy: ah got it.. build_schedule_item which schedule.present uses to build the dict to compare against the active rule doesn't honor if passed in or append enabled if it's not present
23:57 evidence added a few lines there and it resolves it, and fixes the bug of enabled: false not working on schedule.present also
23:58 k00l joined #salt
23:58 esharpmajor joined #salt
23:58 culexor joined #salt
23:58 Rebus joined #salt
23:58 pentabular joined #salt
23:58 k00l hey all, im still unclear on orchestrate and the orchestrate runner. when would i want to engage them ?
23:58 gchao joined #salt
23:58 kossy joined #salt
23:58 robot9 joined #salt
23:58 mpanetta_ hal58th: Looks like my grains.get is silently failing...  Now that I think of it, I guess that is a known bug
23:58 [vaelen] joined #salt
23:59 NachoDuck joined #salt
23:59 adendrag joined #salt
23:59 OliverMT joined #salt
23:59 mpanetta_ er mine.get sorry
23:59 hal58th really? that's actually surprising.
23:59 Aidin left #salt
23:59 hal58th Ah ok, that makes more sense. I don't think Mine gets a lotta love.

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