Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-06-01

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

All times shown according to UTC.

Time Nick Message
00:00 iggy prior to that version, there was no way to do what you want
00:00 irctc662 using latest
00:00 irctc662 so in my top file I have a jenkins/init.sls with multiple states
00:01 irctc662 I have a jenkins-repo state_id in that jenkins/init.sls file
00:01 irctc662 I'm running 'sudo salt '*' state.jenkins jenkins-repo -l debug'
00:01 iggy did you check the docs for the function? It takes multiple args
00:01 irctc662 'state.jenkins' is not available.' is returned - what am I missing?
00:02 repl1cant teatime: I was hoping to do a glob match kinda thing. So say I have a Docker forumla that has some default pillar data, I wanted to specifically include that file via the ext_pillar so all that info wouldn't be presented to a host *not* running Docker
00:02 repl1cant but I may just being a bit too ocd
00:03 irctc662 iggy:  am I missing something?
00:04 iggy the docs have an example, I'd suggest start there (the link above takes straight to it)
00:05 racooper joined #salt
00:05 irctc662 yes, I looked there
00:06 irctc662 ah ok, I see it now
00:07 irctc662 "state.sls_id"  + <state_id> + <sls_id>
00:07 Ryan_Lane when salt goes to install a package on ubuntu, it's supposed to call apt-get update before it does the install, right?
00:07 Ryan_Lane but only once per run?
00:07 Ryan_Lane I'm having an issue where it's never calling apt-get update
00:11 rylnd ok, all my workarounds do not really work. reboot_required: True does not work at all and cmd.run also does not 'detach' and always tells me "minion did not return [no response]". shit.
00:12 rylnd so if anyone has a working workaround, i am listening :)
00:13 lvf joined #salt
00:19 tmmt joined #salt
00:21 devtea joined #salt
00:23 DEger joined #salt
00:27 bastiandg joined #salt
00:28 marcoamorales joined #salt
00:32 DanSlimmon joined #salt
00:47 rem5_ joined #salt
00:52 lvf joined #salt
00:53 iggy rylnd: so the problem is that you need to restart after some changes?
00:54 iggy could something like this work? https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
00:56 rylnd iggy correct. i need to apply some network configuration changes that require a reboot, then i want to continue and for example install additional packages and create some users
00:57 rylnd iggy i tried running a script that reboots after a certain timeout with nohup, but cmd.run never detached from the script
00:58 rylnd iggy i was looking into the orchestrator and see if i can just wait for the event of the restart and then continue with applying my states
01:04 edrocks joined #salt
01:08 rylnd iggy thanks for the link. i will look into it and come back tomorrow. its 3 am and i need to get some shuteye
01:08 rylnd l8er guys
01:08 iggy nn
01:13 catpigger joined #salt
01:15 west575 joined #salt
01:18 ageorgop joined #salt
01:21 mapu joined #salt
01:32 tracphil joined #salt
01:36 jenastar joined #salt
01:46 teryx510 joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.0 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:52 ageorgop joined #salt
01:58 lvf joined #salt
01:59 murrdoc joined #salt
02:00 devops joined #salt
02:07 ageorgop joined #salt
02:09 hasues joined #salt
02:09 hasues left #salt
02:10 west575 joined #salt
02:22 DanSlimmon Does anyone know for sure that custom grains in /srv/salt/_grains as described at https://docs.saltstack.com/en/latest/topics/grains/ work in any release of Salt?
02:23 DanSlimmon I'm investigating https://github.com/saltstack/salt/issues/33629 and I can't get grains.ls to show a custom grain from /srv/salt/_grains in 2016.3 or 2015.5
02:23 saltstackbot [#33629]title: salt-ssh sync_grains not working | ### Description of Issue/Question...
02:23 DanSlimmon I'm not sure if I'm doing it wrong, or if it's really just never worked
02:25 lvf joined #salt
02:26 ajw0100 joined #salt
02:28 DanSlimmon That issue mentions salt-ssh specifically but I can't make the custom grains show up with the salt CLI either
02:40 west575 joined #salt
02:59 flowstate joined #salt
03:01 ashmckenzie joined #salt
03:06 edrocks joined #salt
03:14 nZac joined #salt
03:22 Ayo joined #salt
03:25 DEger joined #salt
03:31 brotatochip joined #salt
03:37 mpanetta joined #salt
03:37 west575 joined #salt
03:49 lvf joined #salt
03:56 armyriad joined #salt
04:00 flowstate joined #salt
04:01 nZac joined #salt
04:07 ajw0100 joined #salt
04:13 armyriad joined #salt
04:34 nZac joined #salt
04:36 DanSlimmon joined #salt
04:47 twopoint71 joined #salt
04:50 macheck joined #salt
04:52 mohae joined #salt
04:52 twopoint71 Hi all, quick question.  I’m managing a file line and I want the “content” parameter to accept a carriage return.  I’ve tried Google, stack overflow, the saltstack docs, maybe I’m searching wrong, but information on this is sparse.  I just sort of expected a \n or \r\n to work in Linux.  Anyone know how to properly add a carriage return on the file.line content parameter?
04:56 xMopxShell joined #salt
04:59 onlyanegg joined #salt
05:01 flowstate joined #salt
05:02 macheck left #salt
05:03 macheck joined #salt
05:06 tristianc joined #salt
05:07 nlb joined #salt
05:08 edrocks joined #salt
05:10 Zhen joined #salt
05:10 onlyanegg joined #salt
05:13 linjan_ joined #salt
05:21 dean joined #salt
05:22 rdas joined #salt
05:24 onlyanegg joined #salt
05:32 hemebond joined #salt
05:32 hemebond Anyone tried to install git v2016.3.0 with bootstrap-salt.sh?
05:33 hemebond ... and succeeded?
05:36 ssplatt joined #salt
05:38 guardianJ joined #salt
05:38 impi joined #salt
05:45 onlyanegg joined #salt
05:51 babilen hemebond: Did you?
05:52 hemebond No, it failed.
05:52 babilen Oh, how?
05:52 hemebond Seems to be some issue with Tornado. Minion failed with "ImportError: cannot import name parse_response_start_line"
05:52 hemebond However, it does install fine if you use the repo.
05:53 hemebond I just finished testing that; no parameters and it installed 2016.3.0 without issue.
05:54 sauvin joined #salt
05:57 babilen Which tornado version do you have installed?
05:57 hemebond Unfortunately I just blew away the instance. Lemme bring another up.
05:58 nidr0x joined #salt
05:59 hemebond It's a brand new AWS instance, btw.
05:59 hemebond Debian Jessie.
05:59 hemebond v2016.3.0rc2 worked fine.
06:00 flowstate joined #salt
06:01 ivanjaros joined #salt
06:03 hrumph hi i have a question about cross calling salt modules
06:03 hrumph the docs say to use the __salt__ dictionary
06:04 hrumph but in win_system.py whoever wrote the code decided to just import another salt module
06:04 hrumph why would he do that?
06:06 yuhlw joined #salt
06:09 babilen hrumph: Could you be more specific?
06:09 babilen Which module are you referring to?
06:09 hrumph babilen, yes, in reg.py
06:10 hrumph sorry
06:10 hrumph i meant
06:10 hrumph hold on
06:10 hrumph in meant in win_system.py
06:11 hrumph we see  from salt.modules.reg import read_value
06:11 hrumph and then he uses read_value in the code
06:11 hrumph but if he doesn't this might we be unable to replace reg.py with a custom module?
06:12 babilen Okay, I guess that should have been __salt__['reg.read_value'](...)
06:12 hrumph babilen, i think this calls for a pr
06:12 hemebond babilen: "git v2016.3.0" installed python-tornado 3.2.2-1.1. Bootstrap without params installed python-tornado 4.2.1-1.
06:12 deniszh joined #salt
06:12 babilen Feel free .. I can't tell if there is an underlying reason for this
06:12 hrumph babilen, if there was a reason it should have been documented
06:13 babilen hemebond: I guess that's the issue, let me check when parse_response_start_line was added
06:13 hrumph babilen, i will assume not and do a pr after my next pr is dealt with
06:13 babilen hrumph: I totally agree .. I had hoped that it is something a little more clear cut :)
06:14 hrumph actually i'll just add it to my existing PR
06:14 hrumph since i've been working on that file
06:14 babilen hrumph: https://www.refheap.com/119816
06:15 babilen It's not common, but not the only occasion something like this is done.
06:15 hrumph babilen what's that telling me? i am still almost totally new with pything
06:15 hrumph babilen, does it apply to this case?
06:15 Miouge joined #salt
06:16 babilen hrumph: Essentially: You can do it and it shouldn't really break things. One reason for the __salt__ convention is that it allows salt to deal with the fact that there are multiple modules for the same module name (e.g. pkg is aptpkg, yumpkg, ... based on the platform)
06:16 yuhlw joined #salt
06:17 hrumph babilen, right and also doesn't __salt__ allow people to sneak in custom modules?
06:17 hrumph otherwise the import will just refer to the the stuff that's already there
06:17 babilen hrumph: All genuine cases in my paste could, presumably, be changed to __salt__['foo.bar'](...) calls unless there is a geniune need for it to work that way. I'd argue that it it probably simply a mistake
06:19 babilen hrumph: Yeah, absolutely. The downside of salt's approach is that the monkey patching it necessitates everywhere makes it *very* unclear how things are loaded and where they are from. Furthermore it prevents you from referring to things in there before they have been monkey patched which applies to lookups in module scope
06:19 babilen So you can easily do foo = __salt__['foo.foo'] in module scope (i.e. "not in a function")
06:19 babilen *can't
06:20 babilen hemebond: Let's see when that parse_response_start_line reference was added
06:23 west575 joined #salt
06:23 babilen hemebond: You need at least tornado v4.0.0b3 for parse_response_start_line -- Question now is: How come earlier salt versions pull in a newer tornado, while 2016.3 does not?
06:23 MeltedLux joined #salt
06:24 hemebond I wonder if it's an issue in bootstrap-salt.sh or in the requirements file for the v2016.3.0 tag/
06:24 babilen hemebond: The code in salt is present in all tags since v2015.8.8
06:24 hemebond Oh well, it works if I don't use git to install it, so that's good.
06:24 babilen Sure, but something is wrong
06:24 hemebond Yeah.
06:25 hemebond Requirements file looks fine.
06:26 babilen Just to clarify: If you use the bootstrap script to install salt tag v2015.8.10 it pulls in tornado >= 4.0, while it pulls in tornado 3.2.2-1.1 with v2016.3.0 ?
06:26 hemebond No, I installed 2016.3.0 in two different ways.
06:27 hemebond The first, which fails, is by passing "git v2016.3.0" to the bootstrap-salt.sh script.
06:27 babilen Right, but earlier tags work with the git tags?
06:27 hemebond "git v2016.3.0rc2" worked fine.
06:27 dmaiocchi joined #salt
06:27 hemebond from memory
06:27 babilen Okay
06:28 hemebond But calling the bootstrap-salt.sh script without any parameters, which seems to just pull it from a repo, works fine and installed 2016.3.0 for me automatically.
06:28 west575 joined #salt
06:28 babilen If you install 2016.3.0 from the repository the python-tornado version is probably installed from the repo.saltstack.com repository?
06:29 babilen I wonder if the difference is that the bootstrap script for v2016.3.0 just pulls in python-tornado from the standard repositories and doesn't configure the saltstack repos needed for a newer tornado version
06:29 hemebond Yes, python-tornado was installed from repo.saltstack.com
06:29 TyrfingMjolnir joined #salt
06:29 hemebond For "git v2016.3.0" that sounds likely.
06:30 felskrone joined #salt
06:30 hemebond Yes, it has just used the default Debian repo.
06:30 babilen Could you check two things please: 1. Where is python-tornado from when you install git v2016.3.0 using the bootstrap script 2. Same for git v2016.3.0rc2
06:31 hemebond "git v2016.3.0" installs from "http://httpredir.debian.org/debian/ jessie/main amd64 Packages"
06:31 babilen ack
06:31 hemebond brining up another VM now.
06:32 babilen Now we have to find a tag that pulls in the backport from repo.saltstack.com so that we can compare the setup ... If we can't find that tag there is a more generic problem that affects git installs in general in that either python-tornado is installed before the saltstack repositories are configured or the repos are not configured at all
06:32 DEger joined #salt
06:33 west575 joined #salt
06:34 freelock joined #salt
06:35 kawa2014 joined #salt
06:35 hemebond http://paste.debian.net/713108/
06:36 josuebrunel joined #salt
06:38 babilen hemebond: Okay .. so it configured jessie-backports, but didn't ensure that tornado was installed from there or is that repo installed by default?
06:38 hemebond Looks like it. Looks like the default repo has higher priority.
06:39 babilen hemebond: I'll be afk for a while, I'd investigate along those lines, but right now I'd say that it is a bug in the bootstrap script. It is a bit surprising that it behaves differently for v2016.3.0rc2 and v2016.3.0 (if it actually does!) though
06:39 babilen Sure, packages are never installed from backports by default
06:40 west575 joined #salt
06:40 nZac joined #salt
06:40 hemebond Yes, I suspect the script too. "git v2016.3.0rc2" worked on an older version; still testing the v2016.3.0rc2 with this newer version.
06:40 KermitTheFragger joined #salt
06:40 Knuta Is there any reason why "salt foo.example.com state.highstate" should take an order of magnitude longer than running "salt-call state.highstate" locally on the minion?
06:41 atmosx How can I tell salt to execute a command if a condition is valid? Like https://gist.github.com/atmosx/08a0d456de6359556939907ac0fb14fd
06:42 babilen hemebond: Right .. maybe the script broke for all versions that require that tornado version now :)
06:42 hemebond "git v2016.3.0rc2" failed too. So it's the latest version of the script causing the issue.
06:42 Knuta atmosx: see the documentation for cmd.run
06:42 babilen hemebond: Well, I sort of prefer that outcome
06:42 hemebond Just checked, same error with "git v2016.3.0rc2"
06:42 hemebond Yes, much preferred over a Salt issue.
06:44 babilen I suspect 661ea86335c90346220683f1aa9e7ab57ced7efd -- https://github.com/saltstack/salt-bootstrap/commit/661ea86335c90346220683f1aa9e7ab57ced7efd
06:44 babilen (committed yesterday)
06:44 atmosx Knuta my problem is embedding a cmd.run using jinja
06:45 west575 joined #salt
06:45 Knuta atmosx: you would literally just put the while thing between your {% if %} and the {% endif %}
06:45 babilen hemebond: Ah, might not be that one actually .. lets continue later
06:45 hemebond babilen: I pulled the script several days ago. 2016.05.11 version.
06:46 atmosx Knuta I thought I needed something like: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions, e.g. {{ salt.cmd.run('...') }} anyway ty
06:46 Knuta atmosx: all jinja does is render the file. the resulting text is interpreted by salt. So you're just telling it whether your whole cmd.run block should be in the file or not.
06:46 babilen hemebond: 29cad9c168131dab529c9b8a5dcb67dac3aad568 -- https://github.com/saltstack/salt-bootstrap/commit/29cad9c168131dab529c9b8a5dcb67dac3aad568 -- that would be the one
06:46 dmaiocchi joined #salt
06:46 babilen hemebond: It does contain .../jessie-backports though
06:47 babilen *shrug*
06:47 atmosx hm, I'll run a few tests
06:49 fracklen joined #salt
06:50 west575 joined #salt
06:54 fracklen joined #salt
06:55 Elsmorian joined #salt
06:58 atmosx Knuta awesome it runs!
07:02 flowstate joined #salt
07:03 toanju joined #salt
07:04 Sylvain31 joined #salt
07:06 west575 joined #salt
07:07 deniszh1 joined #salt
07:09 ivanjaros3916 joined #salt
07:11 deniszh joined #salt
07:12 west575 joined #salt
07:17 west575 joined #salt
07:22 west575 joined #salt
07:27 west575 joined #salt
07:30 jhauser joined #salt
07:32 west575 joined #salt
07:34 dgutu joined #salt
07:37 west575 joined #salt
07:43 auzty joined #salt
07:43 zoski joined #salt
07:46 manji joined #salt
07:50 nZac joined #salt
07:52 linjan_ joined #salt
07:56 manji joined #salt
07:57 manji joined #salt
08:00 impi joined #salt
08:02 flowstate joined #salt
08:03 Qlawy is there any hmm proxy module or sth which can proxy requests from "outside" master to minions "behind NAT"?
08:04 hemebond Qlawy: Minions connect to masters
08:04 hemebond Not the other way around.
08:04 Qlawy yeah, I know
08:04 madpenguin joined #salt
08:04 Qlawy but If I would for example do test.ping it responds: Minion did not return. [Not connected]
08:04 hemebond Then I don't understand the question :-D
08:05 Qlawy as above ;)
08:05 hemebond Hmm.
08:05 hemebond Are the minions actually connected?
08:05 Qlawy yes, it was newly created minion
08:05 Qlawy key poped up in salt-key
08:05 Qlawy I added it and tried test.ping
08:06 slav0nic joined #salt
08:06 Qlawy but I can retry :) give me a sec
08:06 hemebond If you do a netstat do you see the connection?
08:06 hemebond "netstat -anp | grep 4505"
08:08 Qlawy on minion I guess?
08:08 hemebond Yeah
08:08 kawa2014 joined #salt
08:13 Qlawy hmm...
08:14 s_kunk joined #salt
08:14 hemebond Qlawy: Can you telnet from the minion to the master on ports 4505 and 4506?
08:14 Qlawy hemebond: it seems to work now
08:14 hemebond Nice.
08:14 Qlawy perhaps some temporary issue
08:16 keimlink joined #salt
08:20 nZac joined #salt
08:24 Sylvain31 hi, any nice way to generate passwords with salt for users?
08:27 Hybrid joined #salt
08:27 Hybrid joined #salt
08:29 babilen Qlawy: It takes a little while between accepting the key and the master and minion authenticating with each other
08:33 Mate joined #salt
08:34 haaj joined #salt
08:40 hemebond Why is deleting a key so slow? Seem quite strange.
08:43 zoski hi, I'm playing with saltvirt on top of kvm and I'am in trouble with the network part. I would like salt to create a NATed bridge (just like the "default" virt network see there : http://bit.ly/1TWVii8 ). I tried stuffs using a virt.nic conf file on the host, but I lack exemples. in the doc there is only one type of bridge define through virt.nic. I have many questions about this network profile
08:47 jbrnds joined #salt
08:51 jad_jay joined #salt
08:51 jad_jay Hi
08:51 punkoivan joined #salt
08:51 jad_jay on centos6 pkg.installed take too much times
08:52 jad_jay is there anything to do to shorter time of this check
08:52 jad_jay ?
08:52 punkoivan left #salt
08:56 lero joined #salt
08:58 babilen jad_jay: https://github.com/saltstack/salt/issues/26129
08:58 saltstackbot [#26129]title: salt yumpkg implementation painfully slow in some circumstances | In certain configurations, salt's yumpkg implementation is painfully slow when having to deal with multiple package installs despite using the pkgs list instead of names....
08:59 jad_jay babilen, have to apply a patch ????
09:00 babilen Depending on the status of that bug you might even have to write it! ;)
09:00 flowstate joined #salt
09:00 jad_jay babilen, prod stuff can't
09:00 jad_jay any work around ?
09:00 babilen Did you read the bug report?
09:01 babilen One workaround would be to migrate to Debian ;)
09:01 jad_jay erf
09:02 jad_jay babilen, my english not so fluent need time to understand all the terms
09:02 toanju joined #salt
09:02 babilen And I would recommend to read the bug report as it discusses a number of approaches. https://github.com/saltstack/salt/issues/28526 is also worth looking at
09:02 saltstackbot [#28526]title: yumpkg.installed broken in salt v2015.8.1 on CentOS 6 minions | Hi,...
09:03 babilen jad_jay: Which version of salt are you using?
09:04 jad_jay 2016.3.0
09:04 GreatSnoopy joined #salt
09:05 skrobul what are the benefits of using full blown salt master/minion vs salt-ssh? (aside from speed and not having to create roster file)
09:06 babilen Being able to use everything that makes salt great such as the reactor, salt-mine, beacons, ...
09:11 alexlist joined #salt
09:12 skrobul babilen: salt-mine is available through salt-ssh. I still didn't find use of reactor in my setup, and I'll read about beacons now - thank you!
09:12 edrocks joined #salt
09:13 fredvd joined #salt
09:14 skrobul I have a collague who insists of getting rid of minions/masters and switching to pure salt-ssh and I personally don't think it's such a good idea
09:15 babilen skrobul: Ah, is it now? Great!
09:16 babilen skrobul: I'm sure there are plenty of other things, but those were the problematic aspects in the past. sdb modules might or might not work with salt-ssh too ..
09:17 skrobul babilen: yeah, I was surprised as well - it's been supported since 2015.5.0 but it's 'inefficient'
09:18 babilen I primarily use salt-ssh for working with systems where customers themselves use salt or for bootstrapping new salt masters/minions ..
09:18 babilen (but not exclusively .. a number of ceph boxes are maintained through salt-ssh)
09:19 jad_jay babilen, so in fact it's worth no using pkg for centos, use it once then comment it out
09:19 atmosx "salt-call pillar.get dataservices" returns a dictionary. I need to get a specific entry, one that has { 'host':'myhost'} Any idea if pillar.get supports this?
09:22 babilen jad_jay: No, you should be able to, but there is obviously a bug. I do not use CentOS or any other RedHat family box anywhere so I have little personal interest in spending hours to learn about the details of this issue. I thought that it would help you if I were to point out the relevant bug reports. By the sound of it there are some patches or the workaround of simply using an older yumpkg.py module in _mo
09:22 babilen dules.
09:23 jad_jay Yurk...
09:23 babilen jad_jay: The latter doesn't necessarily strike me as a wonderful solution, so my recommendation would be to read through the issue I mentioned and the issues/PRs mentioned therein .. maybe they have a solution to this malarkey already :)
09:23 * jad_jay blow his lunch through windows with mouth
09:23 babilen atmosx: Filter the list of dictionaries?
09:24 atmosx babilen hm, https://github.com/saltstack/salt/issues/7645
09:24 saltstackbot [#7645]title: pillar.get('top:sub') won't work | Hi saltstack,...
09:24 jad_jay babilen, ok thanks
09:24 atmosx babilen but I need this in jinja, I just wanted to make sure it work via CLI, so I'll just the jinja
09:24 atmosx babilen ty
09:24 babilen jad_jay: All the best!
09:26 babilen atmosx: Ah, http://jinja.pocoo.org/docs/dev/templates/#select might help
09:26 babilen (or selectattr)
09:26 babilen atmosx: But then .. jinja is horrible as this would be trivial in pure Python with a simple list comprehension :(
09:29 babilen You could, naturally, iterate over entries in the list and test each element. Unfortunately jinja decided that list comprehensions should not be supported as "keeps the template engine easier to maintain and templates more readable" (cf. http://jinja.pocoo.org/docs/dev/faq/)
09:30 babilen The problem is that Saltstack state/pillar templates are *not* the same as webpage templates that typically have a powerful backend
09:30 DEger joined #salt
09:31 nZac joined #salt
09:31 babilen Users need and want logic in their "templates" (or rather in their states .. which are *not* templates in the "render a list with five <li> tags" sense, but a language to express certain actions that have to be taken
09:32 babilen Jinja isn't powerful enough for this and adopting it was one of the major mistakes Saltstack made .. you might want to consider using a different renderer for your SLS files: https://docs.saltstack.com/en/latest/ref/renderers/all/
09:33 babilen At this point we are way too deeply in jinja land though to switch
09:38 kawa2014 joined #salt
09:39 babilen http://jinja.pocoo.org/docs/dev/faq/#isn-t-it-a-terrible-idea-to-put-logic-into-templates -- this is the underlying difference in scope between "jinja templates" and "saltstack states/pillars"
09:40 atmosx babilen thanks for the explanation
09:41 babilen atmosx: My approach to this (until the time that I find a weekend to implement support for custom jinja filters in saltstack) is to collect the "heavy lifting" bits I need in my jinja templates in custom execution modules
09:43 babilen Some of the functions in those modules are beyond trivial (a simple "return [foo for foo in some_list if predicate(foo)]" for example or, quite freqently, simple string "parsing" with regular expressions (e.g. splitting a minion id)
09:43 babilen It shouldn't be this way, but jinja and the way Saltstack uses it forces us to it
09:49 brotatochip joined #salt
09:52 mackripeum joined #salt
09:54 Sylvain31 in a file.managed: template: jinja, will jinja inside the template file be able to read some variable set it the state file which is calling the template?
10:01 flowstate joined #salt
10:06 remyd1 joined #salt
10:06 remyd1 Hi, is there a way to set a timout on a state or orchestrate ?
10:07 remyd1 I am doing a state which is reboot my minion and I get a timeout, so my orchestrate does not work (I am reinstalling the minion, through PXE/tftp so it is quite long)
10:08 babilen Sylvain31: Only if you pass it in as context
10:10 babilen remyd1: I don't think so. You could, however, work with events to kick of the "next stage" .. think of events as edges in a finite automaton that modles your orchestration. You would, essentially, set a grain on the minion that encodes the "current state" and it fires of an event when something happened (e.g. minion has started again)
10:11 babilen remyd1: Or you just listen to "minion started" events and kick of a suitable state that "does the right thing". The latter approach works well with grains also (if grains is "step_5": do_step_6() ...)
10:11 haaj joined #salt
10:12 Sylvain31 babilen: what is the context field format? How do I name my variable? could also "defaults" help?
10:12 babilen hemebond: Did you find a version of the bootstrap script that works? It would be great to have a bug report about this as I'm sure that other people will run into this also rather sooner than later
10:13 babilen Sylvain31: That's documented in file.managed state documentation
10:13 Sylvain31 I'm on it… https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
10:13 hemebond babilen: I haven't looked I'm afraid. I believe the 2016.04.18 version worked.
10:13 babilen ack
10:14 hemebond I only started playing with salt-cloud very recently.
10:14 hemebond And I wanted to test out 2016.3.0rc2 so I used the script to do that manually too.
10:14 remyd1 babilen: that sounds quite tough.  Perhaps the second way is a bit easier... Here is my actual orchestrate http://paste.debian.net/713150/
10:15 fracklen joined #salt
10:16 Miouge_ joined #salt
10:16 kawa2014 joined #salt
10:16 deniszh joined #salt
10:17 Sylvain31 babilen: It is not well documented here. Only the top yaml example show the format, I suppose. I was looking inside state method def… Thanks I will try to do some weird stuff with that… ;)
10:17 babilen Please don't
10:19 babilen remyd1: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event plays with that idea in a specific way (I conceptualised it in a more generic one)
10:20 babilen The approach is essentially the same .. you fire something of, ensure that it raises a specific event once "it happened", listen to that event and then continue with the next step
10:20 babilen A finite state automaton with events as edges and, well, states as states
10:21 babilen Ah, you use wait_for_event already
10:23 babilen remyd1: Let's start from the beginning .. "Hi, I am using http://paste.debian.net/713150/ as orchestration and when I run it with $COMMAND it seems to run into a timeout. Specifically I get the error in $OTHER_PASTE. " ;)
10:24 babilen Alternatively use the approach I outlined earlier that splits single "state runs" explicitly and wouldn't be prone to running into timeouts
10:25 babilen You might also want to file a bug as I'd argue that you've done nothing wrong
10:25 inad922 joined #salt
10:35 Nothos927 joined #salt
10:50 haaj joined #salt
10:54 zer0def joined #salt
10:56 flowstate joined #salt
10:57 mage_ any idea how could I allow one user to execute $> salt sandbox.lan state.apply webapps.ckan_bbpf ?
10:58 mage_ I tried https://gist.github.com/silenius/f8a03ceb2ec004c62ba9de8f7104624e but it doesn"t work
11:00 av_ joined #salt
11:00 babilen mage_: You can allow them to use "state.apply", but not restrict that to "state.apply webapps.ckan_bbpf"
11:00 mage_ ah :(
11:01 mage_ how would you do it ?
11:01 babilen (you restrict access to execution modules and individual functions therein .. not their arguments)
11:01 mage_ I see ..
11:01 mage_ so I should write a custom module ?
11:01 babilen That would be *one* approach, yes
11:02 mage_ :)
11:02 mage_ are there better approaches ?
11:02 babilen Probably ..
11:02 babilen It's not something I have to worry about
11:03 mage_ the idea is to let developers redeploy the code on the sandbox machine (vm)
11:04 babilen I know
11:04 babilen The source of all your problems .. be it pillar merging, user authorization, ... ;)
11:04 punkoivan joined #salt
11:05 babilen I *still* think that they shouldn't get their dirty paws on your infrastructure, but that you should simply deploy whatever is in different git branches to the respective boxes
11:06 babilen So that their interface to this is "push into foo-branch", rather than "push into foo-branch, log into salt-master, run foo.deploy, ... break things"
11:06 mage_ to be honnest everything is in my pillar data
11:06 mage_ babilen: yep that's another approach :)
11:07 mage_ I understand what you mean, but I still think that to "discharge
11:08 mage_ "
11:08 mage_ oops
11:08 mage_ so I thint that to "discharge" a little bit the sysadmin work it could be interresting to write "recipes" and let people execute those recipes (that you trust)
11:09 fracklen joined #salt
11:11 mage_ and in the end have something like "X and Y are allowed to execute recipe A on machine FOO", while in the meantime having all those recipes form a "state"
11:12 nZac joined #salt
11:14 yomilk joined #salt
11:15 edrocks joined #salt
11:16 N-Mi joined #salt
11:17 evle1 joined #salt
11:18 honestly dear yaml, why don't you have a text block style that preserves indentation
11:19 aboe joined #salt
11:19 jad_jay joined #salt
11:22 vilitux joined #salt
11:27 teatime I thought | allowed indentation of individual lines
11:27 teatime and just stripped off the common indentation
11:27 amcorreia joined #salt
11:28 abednarik joined #salt
11:29 numkem joined #salt
11:29 zer0def joined #salt
11:29 honestly what if I want common indentation
11:52 remyd1 thx babelin. That was exactly what I needed :))
11:52 remyd1 s/babelin/babilen sry
11:53 babilen remyd1: ! :)
11:54 babilen But what did you end up doing now?
11:54 remyd1 I am actually testing it
11:56 babilen hemebond: I ran into https://github.com/saltstack/salt/issues/33665 this morning
11:56 saltstackbot [#33665]title: [2016.3.0] salt-master does not start when bootstrapped | ### Description of Issue/Question...
11:56 babilen Looks as if they really broke the bootstrap script in the last couple of days
11:58 bluenemo joined #salt
12:00 haaj joined #salt
12:04 zoski joined #salt
12:07 _JZ_ joined #salt
12:09 yomilk joined #salt
12:11 kus joined #salt
12:12 _JZ_ joined #salt
12:13 west575 joined #salt
12:22 nZac joined #salt
12:23 tracphil joined #salt
12:26 babilen remyd1: fwiw, most IRC clients provide tab completion for nicknames. Try "bab<TAB>" or even "b<TAB>"
12:26 babilen (hitting <TAB> multiple times should cycle through possible completions)
12:26 remyd1 hehe I did ot know, thx :)
12:28 babilen yw
12:29 zoski Hi, I was wondering if saltvirt is capable of creating virtual network the libvirt way (virsh edit newNetwork.xml) and then using it with saltcloud ?
12:29 monkeybox joined #salt
12:35 ssplatt joined #salt
12:38 edrocks joined #salt
12:44 rgrinberg joined #salt
12:44 gh34 joined #salt
12:47 nZac joined #salt
12:54 west575_ joined #salt
13:02 rbjorklin What's a good way to solve having multiple instances of the same software on the same host and reusing the state but not targeting all instances at once?
13:02 rbjorklin I'm thinking saltenv=instance1, saltenv=instance2 etc. Is there a better way?
13:02 flowstat_ joined #salt
13:05 west575 joined #salt
13:09 babilen rbjorklin: Why don't you want to target all at once? If they have no changes, they shouldn't change ;)
13:09 flowstate joined #salt
13:10 Lee- joined #salt
13:10 mapu joined #salt
13:11 mariusv joined #salt
13:11 mariusv joined #salt
13:11 babilen rbjorklin: But one approach would be: Use one SLS in which you render/generate suitable state definitions from pillar data (with configuration for each instance). You can then run a single instance with "salt 'yourminion' state.sls_id ..." in which you use the generated id (e.g. application_foo1). sls_id respects requisites so those shouldn't be an issue either
13:11 babilen My feeling is that "salt environments" will not help in this case.
13:15 stooj joined #salt
13:16 DanyC joined #salt
13:19 rbjorklin babilen: Heh, didn't even consider your first option but you're right that should be safe :)
13:21 yomilk joined #salt
13:23 subsignal joined #salt
13:23 rgrinberg joined #salt
13:24 subsigna_ joined #salt
13:26 jenastar joined #salt
13:27 aagbds joined #salt
13:27 subsignal joined #salt
13:29 stooj joined #salt
13:30 haaj_ joined #salt
13:31 komputes joined #salt
13:35 ageorgop joined #salt
13:37 tmclaugh[work] joined #salt
13:37 manji joined #salt
13:38 garphy joined #salt
13:39 flowstate joined #salt
13:44 [Kernel_Panic] joined #salt
13:44 [Kernel_Panic] Hello
13:44 [Kernel_Panic] If possible manage AWS Group Tags ?
13:44 DanyC hi, anyone has any hints on the issue i'm describing https://gist.github.com/DanyC97/cf14b4fd7e5567880e46a138be23a9e3 where the pillar data is not shown to the minion which has the right grain match
13:45 [Kernel_Panic] Thanks i find the docuimetnation
13:46 AndreasLutro DanyC: try saltutil.refresh_pillar
13:47 DanyC AndreasLutro: done before asking here, no luck. I'm running 2015.8.10 however that shouldn't make any difference
13:47 AndreasLutro hmm, checked your master log for pillar render errors?
13:50 DanyC AndreasLutro: only "Pillar render error: Rendering SLS 'mos-dns' failed, render error: Jinja variable 'domain' is undefined" which doesn't make any sense to me
13:51 AndreasLutro okay, could be related. look for {{ domain }} in mos-dns.sls I guess
13:51 flowstate joined #salt
13:51 DanyC AndreasLutro: sorry mos-dns.sls should have been m-dns.sls (typo, fat fingers)
13:52 AndreasLutro right, are you sure you're showing the actual /srv/pillar/m-dns.sls in your gist?
13:52 DanyC AndreasLutro: yes
13:52 AndreasLutro I'd do a find/locate m-dns.sls to see if there's an old cached version somewhere
13:53 AndreasLutro or maybe you have multiple pillar_roots defined, who knows
13:54 DanyC AndreasLutro: pillar_roots value is the default one, haven't changed and i only have in /srv/pillar data
13:56 quix joined #salt
14:00 jerredbell joined #salt
14:00 racooper joined #salt
14:01 babilen DanyC: Okay, show us the exact output of "cat /srv/pillar/top.sls", "cat /srv/pillar/m-dns.sls". Please also stop the master, run "salt-master -ldebug" and then paste the logs when you call "salt 'yourminion' saltutil.refresh_pillar". The output of "grep -re "{{ domain }}" /srv/pillar" would also be interesting
14:01 babilen (+ anything else you deem important or helpful)
14:03 flowstate joined #salt
14:04 DanyC AndreasLutro: babilen now this is interesting - look at the bottom of the gist https://gist.github.com/DanyC97/cf14b4fd7e5567880e46a138be23a9e3 as i've updated it
14:05 DanyC AndreasLutro: babilen i added the  {%- set domain = 'dani.com' -%} and now is returned, what on earth am i missing here ? hmm
14:06 babilen I guess that you had "domain: {{ domain }}" in there all along, but "sanitised" it on line 11
14:06 AndreasLutro <AndreasLutro> okay, could be related. look for {{ domain }} in mos-dns.sls I guess
14:06 AndreasLutro called it
14:06 * AndreasLutro goes home
14:06 babilen o/
14:06 hasues joined #salt
14:06 hasues left #salt
14:07 * babilen advises users against checking dani.com
14:08 DanyC AndreasLutro: babilen i'm going home too, with my head down, need an eye check ...sorry for wasting your time guys
14:08 DanyC AndreasLutro: babilen and thank you as usual for hanging around here
14:09 babilen No worries
14:14 Tanta joined #salt
14:17 DanSlimmon joined #salt
14:19 Heartsbane joined #salt
14:19 Heartsbane joined #salt
14:19 Heartsbane joined #salt
14:21 abednarik joined #salt
14:22 dmaiocchi joined #salt
14:22 autofsckk joined #salt
14:24 tkharju joined #salt
14:27 menglish joined #salt
14:29 edrocks joined #salt
14:32 dmaiocchi joined #salt
14:32 sroegner joined #salt
14:32 jerematic joined #salt
14:35 drawsmcgraw joined #salt
14:36 jbrnds2 joined #salt
14:36 drawsmcgraw I'm going to be building a new Salt master and will eventually move my minions over to it. For this to work seamlessly, I just need to put the pub/priv keys from the old Salt master on the new Salt master, correct?
14:41 dendazen joined #salt
14:42 ivanjaros joined #salt
14:48 mikecmpbll joined #salt
14:48 disbound joined #salt
14:48 brew joined #salt
14:50 dendazen joined #salt
14:51 radhac joined #salt
14:53 ageorgop joined #salt
14:53 west575_ joined #salt
14:54 rakan joined #salt
14:54 rakan Hello everyone
14:54 onlyanegg joined #salt
14:54 rakan Is there a way to register/add a pillar to salt-master through the python client?
14:54 rakan LocalClient that is
14:55 nZac joined #salt
14:56 berserk joined #salt
14:56 babilen drawsmcgraw: https://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html might provide some hints
14:56 drawsmcgraw rakan: I believe 'pillar' is a kwarg to the various methods in LocalClient. Define it as a dict.
14:56 drawsmcgraw thanks babilen
14:59 rakan drawsmcgraw: i am looking at the documentation here: https://docs.saltstack.com/en/latest/ref/clients/#salt.client.LocalClient.cmd but no mention of this is available
14:59 bluenemo joined #salt
15:00 jenastar joined #salt
15:00 drawsmcgraw rakan: There.... are a lot of undocumented things in the api...
15:00 west575 joined #salt
15:01 drawsmcgraw Go ahead and give it a shot -> local.cmd('*', 'test.ping', pillar="{'foo': 'bar'}")
15:02 jenastar joined #salt
15:03 flowstate hey guys, is there any kind of built-in salt-runner that could do something along the lines of a rolling restart?
15:03 flowstate essentially, hit a target list of minions and run the same state on each, but in serial, not parallel?
15:03 babilen flowstate: Batched system.reboot?
15:03 babilen https://docs.saltstack.com/en/latest/topics/targeting/batch.html
15:03 flowstate essentially, except for service restart
15:03 babilen Sure
15:04 rakan drawsmcgraw: interesting... thanks!
15:04 adelcast hi...I was wondering if someone knows why there is a set_system_time function on the windows system execution module (win_system), but none on the system module for POSIX?
15:04 babilen flowstate: One thing to keep in mind with this is that it will essentially run "test.ping" and only consider those minions that answer. You might therefore miss out on those that do not (in time)
15:04 drawsmcgraw rakan: yep! Good luck!
15:05 adelcast I know it's pretty easy to set the time on a POSIX system, but sounds like an incomplete API to me....
15:06 flowstate awesome! thanks, babilen!
15:12 dendazen joined #salt
15:12 dendazen joined #salt
15:13 josuebrunel joined #salt
15:15 disbound hey guys, the check_cmd function for file.managed seems to leave a lot of tmp files in /tmp for each highstate run. Is that normal?
15:15 iggy another to watch out for is it doesn't wait for the service to fully "up", it just throws the command at systemctl/service/etc and returns
15:16 DEger joined #salt
15:18 jbrnds joined #salt
15:20 krymzon joined #salt
15:20 west575 joined #salt
15:25 edrocks joined #salt
15:27 DEger joined #salt
15:28 DanSlimmon dishbound: It may be normal, but it doesn't sound… great
15:28 cyborg-one joined #salt
15:28 DanSlimmon dishbound: Maybe file a bug?
15:29 dfinn joined #salt
15:29 brotatochip joined #salt
15:29 nmadhok joined #salt
15:29 DanSlimmon Whoops I mean disbound
15:30 disbound it's fine. thanks
15:31 dendazen_ joined #salt
15:31 dmaiocchi joined #salt
15:32 permalac joined #salt
15:33 minot joined #salt
15:38 perfectsine joined #salt
15:39 dmaiocchi joined #salt
15:43 Trauma joined #salt
15:43 evle joined #salt
15:45 tristianc_ joined #salt
15:52 manji joined #salt
15:55 manji joined #salt
15:55 cableninja__ joined #salt
16:06 felskrone1 joined #salt
16:09 pmcg joined #salt
16:21 edrocks does salt work with ubuntu 16.04?
16:25 iggy define work
16:25 iggy it installs
16:25 edrocks iggy: function well with other nodes running ubuntu 14.04?
16:25 edrocks am I going to run into issues?
16:25 edrocks or more so then with 14.04
16:25 abednarik joined #salt
16:25 iggy seems okay in my testing, can run a highstate with some email/db/etc servers
16:25 nmadhok Salt has been tested much more on Ubuntu 14.04 than Ubuntu16.04
16:26 nmadhok If you run into any issues, you can always create an Issue on GitHub
16:26 edrocks I'm wondering if I should install 14.04 and upgrade everything to 16.04 later or just install 16.04 and upgrade my other nodes to 16.04 later
16:26 jfindlay edrocks: what version of salt are you going with?
16:26 edrocks the latest
16:27 edrocks jfindlay: ^
16:27 iggy there aren't packages for it yet
16:27 iggy but 16.04 rolled with 2015.8
16:27 edrocks I think I'm gonna go 14.04 then. I don't need any issues
16:27 jfindlay edrocks: the only salt version that has 16.04 support so far is 2016.3.0, http://repo.saltstack.com/apt/ubuntu/16.04/amd64/archive/
16:28 edrocks jfindlay: I'm on salt --version salt 2015.8.3 (Beryllium)
16:29 iggy phew, added within the last week, so I'm not that out of touch
16:30 babilen iggy: "Had that for ages .." ;)
16:31 aw110f joined #salt
16:32 adelcast joined #salt
16:34 aw110f_ joined #salt
16:38 writtenoff joined #salt
16:43 tapoxi joined #salt
16:45 kingscott joined #salt
16:46 kingscott Does anyone know how to only append to a file instead of managing the file with salt? I'm trying to make sure that my sudoers file has a group added, but I don't want to mess with what is already in the file.
16:48 Miouge joined #salt
16:48 jfindlay kingscott: patching a file can be tricky so it's easier to manage the whole file, but there are functions in the file state module that will do this: `file.line`, `file.blockreplace`, for example
16:48 jab416171 is there any way to find states that are never referenced from top.sls?
16:48 jab416171 orphaned states
16:48 kingscott @jfindlay I would prefer to manage the file with salt, but I think my devs would not appreciate it. :/ #intern
16:49 jfindlay :-)
16:50 disbound you have to lay down the law
16:50 FreeSpencer Random question, andybody know of any good WISP in downtown chicago area?
16:50 jubalh any security settings i should be aware of when running a salt master on the internet? and having minions behind nat/router-modem-thing ?
16:51 jab416171 nat/router-modem-thing
16:51 jfindlay jab416171: the best thing I can suggest is to run a highstate in mock mode, `state.apply mock=True` and then vim/regex magic that against your known list of states
16:51 jab416171 jfindlay, the problem is the top.sls is 263 lines long, and the highstate will only apply states that match the machine it's run on
16:52 jubalh jab416171: well jsut behind usual stuff. and i wonder if its save to manager all my families computer via salt ;)
16:52 jfindlay jab416171: would that not be part of the question?  Are you asking about states that don't run on any minion?
16:52 jab416171 yes
16:53 jfindlay jab416171: you could ask whatever returner you have setup which states ran on the last highstate run
16:53 jab416171 returner?
16:54 jab416171 unless that's default I'm pretty sure we didn't set anything like that up.
16:54 jfindlay https://docs.saltstack.com/en/latest/ref/returners/index.html
16:54 spuder joined #salt
16:54 jab416171 so do they just end up in a log file?
16:55 jab416171 or do they go to /dev/null
16:55 jfindlay jab416171: they go into the master job cache by default: https://docs.saltstack.com/en/latest/topics/jobs/job_cache.html#default-job-cache
16:58 jfindlay jubalh: only port 4505 and 4506 need to be open on the master
16:59 jubalh jfindlay: and the minions are save anyway, right? so the only thing that could happen is that someone floods my master with requests?
16:59 jfindlay https://docs.saltstack.com/en/latest/topics/tutorials/firewall.html
17:00 jfindlay jubalh: I'm unsure what your question means
17:00 jubalh jfindlay: unsure about what exactly?
17:00 jfindlay "the minions are save anyway, right?"
17:01 jubalh they only connect to the master specified in their config and one cant hijack this. even when dns is changed it needs the right public key, correct?
17:02 thehaven_ joined #salt
17:03 jfindlay if the DNS changed, the minion would try to subscribe to a master at the new location
17:03 cro joined #salt
17:04 mikecmpbll joined #salt
17:04 jubalh jfindlay: but still we added the public fingerprint of the master so it wouldnt really try it right?
17:04 jfindlay I'm not entirely clear on the details, but yes, the minion stores a copy of it's master's public key
17:06 brotatochip joined #salt
17:06 punkoivan joined #salt
17:07 jfindlay jubalh: this is the message I get when the minion's copy of the master pub key doesn't match what the master has: `[CRITICAL] The Salt Master server's public key did not authenticate!`
17:08 jubalh and does it just print that or then abort the process?
17:08 jubalh hopefully the latter
17:09 Roman__ joined #salt
17:11 bltmiller joined #salt
17:12 kingscott joined #salt
17:12 aboe joined #salt
17:14 Roman__ Hi all! I'm having trouble with "unless". when I specify multiple conditions, it seems that it takes only 1st condition into account.
17:14 Roman__ anybody experienced this?
17:19 Tanta example code?
17:20 Tanta "unless" is going to use shell for evaluation so you have to use proper bash semantics for multiple conditions
17:20 gmoro joined #salt
17:21 Tanta ie: [ -f "{{ file1 }}" ] && [ -f "{{ file2 }}" ]
17:23 Edgan basepi: ping
17:23 riftman joined #salt
17:26 perfectsine joined #salt
17:26 kingscott I'm trying to use file.line in a state to make sure a line is in a file, and i get the output "State file.line is unavailable" Any ideas why?
17:27 flowstate joined #salt
17:27 manji joined #salt
17:31 Roman__ - unless:
17:31 Roman__ - ls /usr/bin/vi
17:31 Roman__ - pip list | grep packagethatdoesnotexist
17:32 Roman__ I get "unless execution succeeded"
17:32 abednarik joined #salt
17:32 teryx510 joined #salt
17:34 ldelossa joined #salt
17:34 ldelossa Hey guys, I want to set a vairable to a random number in jinja to avoid sls ID conflicts
17:34 ldelossa I tried doing this
17:34 tapoxi joined #salt
17:34 ldelossa {%- set RAND = 1000|random %}
17:34 ldelossa no beuno
17:34 ldelossa Error is within python random.py
17:34 ldelossa Rendering SLS 'base:core.mount_ebs' failed: Jinja error: object of type 'int' has no len() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 366, in render_jinja_tmpl     output = template.render(**decoded_context)   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render     return self.environment.handle_exception(exc_info, True)   File "/usr/l
17:35 rgrinberg joined #salt
17:38 SheetiS joined #salt
17:40 kingscott how do i upgrade salt-master to 2015.8.10?
17:42 spuder joined #salt
17:42 ssplatt salt salt-master\* pkg.latest salt-master
17:43 flowstate is doing a rolling upgrade to your minions that simple as well?
17:43 flowstate I mean, obviously check for backwards-incompatible changes
17:43 flowstate but ... it can't be that easy
17:46 spuder joined #salt
17:46 ajw0100 joined #salt
17:49 jnials So, I need to include two different paths in a git_pillar.  This is what I have come up with, but it only includes base: https://gist.github.com/jnials/3557a508d38e2d6a30f6ff57372793de#file-foo-conf
17:49 jnials Can anyone point out what I have done wrong?
17:49 iggy ldelossa: did you check the docs for jinja's random filter?
17:50 iggy ldelossa: it takes a random item from a sequence, not pick a random number between 1 and N
17:50 ldelossa Yup I figured it out
17:50 ldelossa {%- set RAND = range(1, 1000) | random %}
17:50 ldelossa I get so confused about what functions are avaiable to me
17:50 ldelossa are all python functions available via jinja?
17:50 ldelossa or just a select few
17:51 s_kunk joined #salt
17:51 iggy select few
17:51 ldelossa Is THAT documented anywhere?
17:51 ldelossa I guess jinja2's documentation?
17:51 iggy if anywhere, there
17:51 ldelossa And then does SALT have to support Jinja's stuff also
17:51 ldelossa so is even smaller subset avilable to use within salt?
17:51 iggy no
17:51 ldelossa Okay so what ever I see in jinja2 I can use
17:51 ldelossa in the jinja2 docs
17:51 iggy everything jinja does, salt can do (and salt has a few custom extras)
17:52 ldelossa PLUS the salt stuff, like salt['pillar.get']
17:52 ldelossa There's no real place to see all salt specific functinoality plced into jinja is there?
17:52 iggy https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
17:53 ldelossa Nice!
17:53 ldelossa thank you.
17:54 iggy there's another page somewhere that talks about variables available, but I can never find it
17:54 iggy just know it's out there somewhere
17:55 komputes joined #salt
17:57 komputes joined #salt
17:57 Fiber^ joined #salt
17:59 gcorey joined #salt
18:02 wendall911 joined #salt
18:03 kossy_ joined #salt
18:03 menglish joined #salt
18:06 ldelossa haha, thank you tho that's a help already
18:06 ldelossa Dude, I had a job where I was the lead and I picked salt stack, then left that place, jumped around a few other places, and now I'm back at a position where they use saltstakc exclusively
18:06 ldelossa love my life right now
18:07 mikecmpbll joined #salt
18:09 nZac joined #salt
18:11 nmadhok joined #salt
18:15 flowstate joined #salt
18:18 izaki joined #salt
18:24 menglish joined #salt
18:32 perfectsine joined #salt
18:35 nZac joined #salt
18:38 nmadhok joined #salt
18:38 mikecmpbll joined #salt
18:43 fracklen joined #salt
18:44 ajw0100 joined #salt
18:45 brotatochip joined #salt
18:45 edrocks joined #salt
18:46 stanchan joined #salt
18:47 west575_ joined #salt
18:47 ajw0100 joined #salt
18:52 ZiLi0n joined #salt
18:53 ZiLi0n Hello everyone. I am trying to use provider yumpkg5 with minon 2015.8 because I am running into error "coudl not retrieve metalink from repo", and it seems the workaround is to use yumpkg5
18:54 ZiLi0n I enabled yumpkg5 as provider, but the minion does not even boot up now :). There are exceptions with zfs and itfff functions. Have someone ever run into this?
18:56 beardedeagle joined #salt
18:57 beardedeagle I see there is a retry_dns minion configuration setting, but is there a way to set max tries for retry_dns? Ie, try 3 times then die rather than trying forever every 30 seconds?
18:57 rgrinberg joined #salt
18:59 DEger joined #salt
18:59 garphy joined #salt
19:01 linjan_ joined #salt
19:02 Tyrm joined #salt
19:03 komputes joined #salt
19:04 ivanjaros joined #salt
19:05 tapoxi joined #salt
19:06 perfectsine_ joined #salt
19:10 beardedeagle joined #salt
19:14 amcorreia joined #salt
19:15 ajw0100 joined #salt
19:16 Tyrm joined #salt
19:19 abednarik joined #salt
19:20 deniszh joined #salt
19:25 Lee_ joined #salt
19:26 brotatochip joined #salt
19:27 punkoivan left #salt
19:29 lero joined #salt
19:29 ZiLi0n having yumpkg5 as provider in minion config makes the minion crash during boot
19:30 mikecmpbll joined #salt
19:30 babilen They really broke yum in 2016.3.0, didn't they?
19:37 Tyrm joined #salt
19:40 irctc106 joined #salt
19:42 brotatochip joined #salt
19:44 nmadhok joined #salt
19:46 rgrinberg joined #salt
19:46 beardedeagle can you script_args the windows installer with salt-cloud?
19:48 sdemura joined #salt
19:50 ZiLi0n babilen thanks. I am using 2015.8, I am seeing many could not retrieve metalink errors
19:50 ZiLi0n with pkg.installed
19:50 sdemura Do requisites work with docker states? I want to bring up 2 containers. Container A and container B, but B must come after A. I've tried require: with docker and dockerng and it doesn't work.
19:50 ZiLi0n babilen should is 2016.3 even worse in regards to yum?
19:50 komputes joined #salt
19:52 abednarik joined #salt
19:53 babilen ZiLi0n: Just an impression due to https://github.com/saltstack/salt/issues/26129
19:53 saltstackbot [#26129]title: salt yumpkg implementation painfully slow in some circumstances | In certain configurations, salt's yumpkg implementation is painfully slow when having to deal with multiple package installs despite using the pkgs list instead of names....
19:53 babilen sdemura: Requisites should work between all states
19:54 babilen (they are simply used for ordering states which are then run atomically)
19:55 ZiLi0n babilen tahank you!
19:56 jfindlay babilen: that fix is included in 2016.3.0
19:57 nZac joined #salt
20:02 ZiLi0n jfindlay thank you!
20:03 rem5 joined #salt
20:07 babilen jfindlay: Ah, great!
20:09 brotatochip joined #salt
20:09 babilen jfindlay: I haven't noticed that it was closed and made it into 2016.3 (as the issue itself is still open)
20:11 haaj joined #salt
20:12 toanju joined #salt
20:14 rem5 joined #salt
20:15 jalaziz joined #salt
20:16 ZiLi0n is it possible to pass a dictionary whose keys are regular expression to salt['grains.filter_by']? The idea is to filter by OS, but instead of doing Fedora-23, be able to say Fedora-.* so that it can be reused with Fedora-22 for example
20:18 jhauser joined #salt
20:19 quix joined #salt
20:20 beardedeagle I see there is a retry_dns minion configuration setting, but is there a way to set max tries for retry_dns? Ie, try 3 times then die rather than trying forever every 30 seconds?
20:22 jfindlay beardedeagle: I don't think there is
20:22 beardedeagle Didn't think so
20:22 jfindlay according to my searching
20:23 beardedeagle https://github.com/saltstack/salt/issues/33678
20:23 saltstackbot [#33678]title: dns_max_tries minion setting | ### Description of Issue/Question...
20:23 beardedeagle coworker of mine ^
20:23 babilen I haven't found anything earlier either
20:24 beardedeagle Thanks guys/gals
20:28 brotatochip joined #salt
20:38 subsignal joined #salt
20:39 perfectsine joined #salt
20:41 fracklen joined #salt
20:42 komputes joined #salt
20:45 mavhq joined #salt
20:50 coval3nce joined #salt
20:52 flowstate joined #salt
20:55 ThomasJ joined #salt
21:00 spuder_ joined #salt
21:03 ageorgop joined #salt
21:04 perfectsine joined #salt
21:04 tracphil joined #salt
21:05 abednarik joined #salt
21:10 deniszh joined #salt
21:17 perfectsine joined #salt
21:26 nZac joined #salt
21:27 berserk_ joined #salt
21:28 devster31 to use the php-formula I need to add every state corresponding to the extensions I want?
21:29 berserk joined #salt
21:29 mrud joined #salt
21:29 mrud joined #salt
21:30 flowstate joined #salt
21:30 abednarik joined #salt
21:32 babilen indeed
21:39 Andrew joined #salt
21:41 Aleks3Y joined #salt
21:44 mpanetta joined #salt
21:47 dfinn joined #salt
21:48 devster31 thanks, simple enough
21:49 rem5 joined #salt
21:49 brotatochip joined #salt
21:50 ssplatt joined #salt
21:53 Tyrm_ joined #salt
21:56 mavhq joined #salt
21:57 edrocks joined #salt
21:58 defconx joined #salt
21:59 Muchoz joined #salt
21:59 ssplatt joined #salt
22:02 nZac joined #salt
22:04 eriko_ joined #salt
22:05 hrumph sup y'all?
22:05 jhauser joined #salt
22:07 ajw0100 joined #salt
22:15 manji joined #salt
22:16 DEger joined #salt
22:25 morissette joined #salt
22:34 west575 joined #salt
22:39 ahammond I have a .py reactor. Seems to be correct, but I'd like to log some behavior. What's the correct way to do this?
22:39 ahammond import the standard python logging library or... ?
22:42 kigster joined #salt
22:44 intr1nsic joined #salt
22:49 subsignal joined #salt
22:54 hemebond left #salt
22:54 subsignal joined #salt
22:55 abednarik joined #salt
23:00 flowstate joined #salt
23:00 ssplatt joined #salt
23:08 DEger joined #salt
23:12 perfectsine joined #salt
23:14 Tyrm joined #salt
23:17 dendazen joined #salt
23:21 rem5 joined #salt
23:22 rgrinberg joined #salt
23:25 ajw0100 joined #salt
23:25 Deliants joined #salt
23:30 aagbds joined #salt
23:30 snc joined #salt
23:32 devster31 can I patch salt itself with a state?
23:32 tracphil joined #salt
23:36 fxhp joined #salt
23:37 brotatochip joined #salt
23:38 iggy devster31: sure
23:38 iggy I mean the changes won't take effect until you restart the minion, but I've done it before
23:39 mosen joined #salt
23:39 west575 joined #salt
23:45 devster31 alright, I'll try, I installed from package but now there's a fix I'd like to use, #32440
23:46 devster31 no, #33690
23:50 autofsckk joined #salt
23:57 _JZ_ joined #salt
23:57 aagbds joined #salt
23:57 abednarik joined #salt
23:59 flowstate joined #salt
23:59 edrocks joined #salt

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