Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-10-15

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

All times shown according to UTC.

Time Nick Message
00:00 horus_plex joined #salt
00:01 Jimlad joined #salt
00:01 wryfi joined #salt
00:01 dean|away joined #salt
00:01 wryfi we just updated to 2015.8.0 with its new git_pillar, and we updated our master config accordingly
00:02 wryfi everything seems to be working, but the master doesn't seem to be pulling changes from the pillar repo
00:02 wryfi even with  salt-run fileserver.update && salt-call saltutil.refresh_pillar
00:02 wryfi and i can confirm this by inspecting files in /var/cache/salt
00:02 wryfi does anyone have any ideas about how to fix it?
00:04 iggy salt-run -l debug fileserver.update
00:05 zwi joined #salt
00:06 wryfi iggy: nothing in that output about my pillar
00:06 iggy didn't think so... pillars aren't exactly part of the fileserver
00:07 breakingmatter joined #salt
00:18 gmoro joined #salt
00:18 cberndt joined #salt
00:19 zer0def joined #salt
00:23 zmalone joined #salt
00:31 wryfi hmm, yeah, i see no output from salt in either my minion or master log indicating that it's even trying to hit my git pillar
00:32 * wryfi is very frustrated by this
00:37 iggy it would be in the master log file
00:37 iggy minions have no contact with the ext_pillars
00:37 wryfi i finally found the problem, though i don't understand why it was a problem
00:37 falenn joined #salt
00:37 wryfi i have two external pillars, a git repo and a python pillar
00:38 wryfi i had the python pillar first, followed by the git pillar
00:38 trph joined #salt
00:38 trph joined #salt
00:38 geekatcmu Should I re-open it?
00:38 wryfi reversing the order, for some reason, fixed it
00:38 geekatcmu oops
00:38 wryfi iggy: ^
00:40 wryfi iggy: not sure where external pillar events get logged, there's basically nothing in my master log about it, at all. the update doesn't seem to occur during fileserver.update (or at least it isn't logged in that output)
00:46 msciciel_ joined #salt
00:47 iggy wryfi: as I said, pillars aren't really part of the fileserver, so not surprised
00:47 wryfi iggy: totally get it
00:48 wryfi just think that there should be *something* logged *somewhere* when salt does a git pull on one of these animals
00:49 pm90_ joined #salt
00:51 ageorgop joined #salt
01:06 breakingmatter joined #salt
01:08 boredatwork joined #salt
01:14 falenn joined #salt
01:21 armyriad joined #salt
01:24 pshetty joined #salt
01:26 sunkist joined #salt
01:26 hasues joined #salt
01:26 stanchan joined #salt
01:27 pshetty anyone know what the memory footprint of a minion is on a windows server?
01:28 hasues left #salt
01:36 favadi joined #salt
01:40 catpiggest joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.8.0 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:52 falenn joined #salt
01:58 writtenoff joined #salt
02:00 malinoff joined #salt
02:07 breakingmatter joined #salt
02:11 packeteer joined #salt
02:12 aqua^c joined #salt
02:18 Bryson joined #salt
02:20 sunkist joined #salt
02:25 larsfronius joined #salt
02:26 iggy wryfi: the problem with that is it happens fairly frequently (every 60s before, don't know about now... probably the same)... up the master log level temporarily and you should see more
02:27 amcorreia joined #salt
02:34 favadi joined #salt
02:36 falenn joined #salt
02:49 kinetic joined #salt
02:49 aparsons joined #salt
02:50 MTecknology iggy: howdy!
02:50 aparsons joined #salt
02:55 aparsons joined #salt
03:05 Bryson joined #salt
03:09 Bryson joined #salt
03:13 jaybocc2 joined #salt
03:13 falenn joined #salt
03:18 zmalone joined #salt
03:21 Bryson joined #salt
03:28 moogyver ugh, brain hurting.
03:28 moogyver getting to the point of the salt codebase that my eyes just start to glaze over
03:31 MTecknology moogyver: what are you trying to dive into?
03:32 evle joined #salt
03:32 moogyver MTecknology: the ACL stuff.  wanted to see where it was dealing with how it figures out if a target glob matches what a user is allowed access to.
03:41 MTecknology AH
03:41 MTecknology frick... I miss salt. :(
03:41 MTecknology I retain less water now, but chef is very much not any fun :(
03:44 evle left #salt
03:45 moogyver MTecknology: lol
03:45 moogyver I have to deal with both, so..
03:46 geomyidae_ joined #salt
03:49 jaybocc2 joined #salt
03:51 dankrs left #salt
03:57 Bryson joined #salt
04:04 jaybocc2 joined #salt
04:06 pm90_ joined #salt
04:08 breakingmatter joined #salt
04:11 MTecknology moogyver: previous job, I stuck salt into >90% of the linux infrastructure; current job, I'm dealing with chef, ansible, and puppet :(
04:11 moogyver MTecknology: just makes you more marketable :)
04:12 malinoff moogyver: tbh, both ansible and salt have really _bad_ codebase. Haven't looked at chef and puppet, though they're written in ruby which is enough for me
04:13 moogyver malinoff: i've noticed, but i'd rather deal with a bad python codebase than ruby.
04:13 malinoff moogyver: exactly
04:13 Mohan_ joined #salt
04:13 moogyver i'll never get over the fact that functions aren't first class in ruby.  drives me up the wall.
04:14 moogyver that, combined with optional () on functions makes for some unreadable code.
04:14 moogyver ( to me, anyways, i know everyone has their likes/dislikes )
04:15 malinoff it's going to be off-topic :) but I really have their concept of open classes. At first glance, ability to mixin everything into any class is good, easy to write, but it is very difficult to read and to debug
04:15 MTecknology I don't know much about salt core, but the rest of it I've enjoyed
04:16 malinoff I almost always have no idea from where ruby methods are coming
04:16 MTecknology ruby makes me cry almost worse than vb.net
04:16 malinoff s/really have/really hate/
04:18 ^C cant use mine.get inside pillars?
04:18 ^C seems to work from templates, but not pillars? and cant use pillar.get from inside pillars either
04:18 ^C how exactly do you do dynamic host data in pillars?
04:19 MTecknology grains?
04:19 tyler-baker joined #salt
04:20 malinoff ^C: mine.get inside pillars is pretty useless request
04:20 ^C am i getting things the wrong way around?
04:21 malinoff ^C: you need those variables to use in templates, not just _be_ around
04:21 malinoff ^C: so what's the purpose of putting mine.get into a pillar if you can just do mine.get from templates directly?
04:21 ^C so i'm trying to use mine.get in the wrong level?
04:21 malinoff ^C: pretty much
04:22 ^C its for the nfs formula
04:22 ^C i'm trying to add exports, and the template grabs data from the pillar
04:22 * malinoff runs away
04:23 ^C it seemed to sense just to do a: for blah in salt['mine.get']
04:23 moogyver malinoff: yes, re:ruby  a = b.  is b a variable? a method? MY GOD MAN WHAT IS IT?
04:23 moogyver and where did it come from!?
04:24 malinoff moogyver: nah, it's more like a = foo.b, foo is instance of Foo class. I open foo.rb and realize that Foo class has no b method, and the fun begins
04:25 malinoff moogyver: you actually don't have variables in ruby. Once you get it, things become much easier
04:25 malinoff there are only methods
04:26 Mohan_ can anyone tell how to deploy an application in IIS??
04:26 malinoff (I haven't read ruby source code, but it looks like top-level functions are implemented as methods of some specific singleton class)
04:27 malinoff moogyver: otoh, in python there are no methods, only functions :)
04:27 MTecknology I've just accepted that you have no logic or sanity in ruby. Once I got that, me screams and tears quieted down.
04:27 malinoff in python even classes is just a shorthand to write a module (namespace) with functions
04:31 MTecknology The thing I've struggled with most in python and never bothered to read up on is decorators
04:32 malinoff MTecknology: decorators are just functions that return functions with special sugar syntax
04:32 moogyver MTecknology: there's a good stackoverflow post, lemme find it
04:33 MTecknology the only language that I'm really good with is bash... if you wanna call it a language
04:33 moogyver http://stackoverflow.com/a/1594484/677373
04:34 MTecknology holy shit that's long
04:34 moogyver yes, but it's a really good explanation of them
04:35 MTecknology looks like it'll teach me way more than decorators
04:35 MTecknology thanks!!
04:38 opensource_ninja joined #salt
04:49 kant joined #salt
04:50 viq joined #salt
04:54 armguy joined #salt
04:58 kinetic joined #salt
04:59 kinetic joined #salt
05:05 anmol joined #salt
05:10 mehakkahlon joined #salt
05:11 moogyver hrm, so looks like you can't use compound matchers in eauth declarations
05:12 edulix joined #salt
05:13 ramteid joined #salt
05:17 pm90_ joined #salt
05:24 ^C omg
05:24 ^C malinoff: thanks for the heads up in mine.get in templates only
05:25 ^C it works... formula probably needs someway of achieving this without me hand-hacking templates...
05:29 malinoff joined #salt
05:31 MeltedLux joined #salt
05:33 sirex joined #salt
05:42 ashirogl1 joined #salt
05:49 Bryson joined #salt
05:55 felskrone joined #salt
06:06 gwmngilfen joined #salt
06:08 dkrae joined #salt
06:09 breakingmatter joined #salt
06:16 jaybocc2 joined #salt
06:22 ashirogl joined #salt
06:27 larsfronius joined #salt
06:31 jaybocc2 joined #salt
06:32 katyucha joined #salt
06:38 egil joined #salt
06:39 vandemar joined #salt
06:42 aqua^c joined #salt
06:45 Mohan_ can anyone tell how to edit the iis.py to create an app pool?
07:00 keimlink joined #salt
07:00 rdas joined #salt
07:01 lb joined #salt
07:13 elsmo joined #salt
07:14 eseyman joined #salt
07:26 favadi joined #salt
07:30 rim-k joined #salt
07:33 briner joined #salt
07:46 impi joined #salt
07:46 jhauser joined #salt
07:52 thalleralexander joined #salt
08:01 linjan joined #salt
08:10 breakingmatter joined #salt
08:12 s_kunk joined #salt
08:12 impi joined #salt
08:14 mgbowman joined #salt
08:16 CeBe joined #salt
08:16 s_kunk joined #salt
08:16 s_kunk joined #salt
08:19 chiui joined #salt
08:23 mgbowman left #salt
08:24 favadi joined #salt
08:27 overyander joined #salt
08:30 morsik It's possible to include .sls file which is _not_ state file?
08:30 morsik force don't parsing it as state… or something…
08:32 Grokzen joined #salt
08:34 cberndt joined #salt
08:36 auzty joined #salt
08:36 TOoSmOotH joined #salt
08:37 nledez joined #salt
08:37 nledez joined #salt
08:38 nledez joined #salt
08:39 ziro` joined #salt
08:43 jaybocc2 joined #salt
08:45 GreatSnoopy joined #salt
08:46 av___ joined #salt
08:48 larsfronius joined #salt
08:53 larsfronius joined #salt
08:55 rodio_ua joined #salt
08:55 rodio_ua left #salt
08:58 jaybocc2 joined #salt
09:00 lionel joined #salt
09:11 yuntree joined #salt
09:13 zer0def joined #salt
09:14 yuntree how to use a normal account(can sudo) execute state(the state some command need root)?
09:23 N-Mi joined #salt
09:24 aqua^c joined #salt
09:33 OliverUK joined #salt
09:33 OliverUK Hiya :-)
09:35 jcristau joined #salt
09:45 ksj joined #salt
09:48 keimlink joined #salt
10:02 losh joined #salt
10:12 breakingmatter joined #salt
10:13 asdhsdfhsdgdfg joined #salt
10:13 asdhsdfhsdgdfg left #salt
10:15 linjan joined #salt
10:24 chiui joined #salt
10:33 giantlock joined #salt
10:51 ubikite joined #salt
11:07 ernetas Hey guys.
11:08 ernetas I'm trying to loop: {% for instance, args in salt['pillar.get']('kvm:instances', {}).iteritems() %}. args gets filled with: [{'port': 9001}, {'instance_id': 'executor-1'}, {'roles': 'executor'}], which is alright. However, how do I retrieve args.port? Doing args['port]' or args.port just throws "Jinja variable 'list object' has no attribute 'port'"
11:09 ernetas Nevermind, figured it out.
11:10 jaybocc2 joined #salt
11:15 aqua^c joined #salt
11:16 stephanbuys joined #salt
11:23 sgargan joined #salt
11:25 jaybocc2 joined #salt
11:28 MadHatter42 joined #salt
11:28 hoonetorg babilen: ping
11:28 falenn joined #salt
11:29 chiui joined #salt
11:32 kbaikov joined #salt
11:38 favadi joined #salt
11:42 evle1 joined #salt
11:43 amcorreia joined #salt
11:49 markm joined #salt
11:50 slav0nic joined #salt
11:50 GabLeRoux joined #salt
11:53 Qwazerty joined #salt
12:01 lloesche joined #salt
12:05 markm joined #salt
12:06 breakingmatter joined #salt
12:07 aqua^c joined #salt
12:11 anmol joined #salt
12:14 jaybocc2 joined #salt
12:17 zwi joined #salt
12:20 jhauser_ joined #salt
12:24 kbaikov joined #salt
12:25 tmclaugh[work] joined #salt
12:26 GabLeRoux joined #salt
12:27 impi joined #salt
12:33 losh joined #salt
12:34 favadi joined #salt
12:34 douardda joined #salt
12:42 kant_ joined #salt
12:42 Akhter joined #salt
12:45 DammitJim joined #salt
12:45 cpattonj joined #salt
12:47 cpattonj having some major issues with salt 2015.8.x on windows.. I can't find how to run salt-call or anything from windows powershell or command line, I found the salt-call.bat file but executing it like ".\salt-call pkg.latest_version salt-minion" to check my installed salt-minion version results in a "IndexError: pop from empty list" error.
12:51 cpattonj salt-call --versions-report works however
12:51 cpattonj maybe pkg state is just broken?
12:51 mnaser joined #salt
12:52 hansi joined #salt
12:53 TranquilityBase joined #salt
12:53 TranquilityBase good morning.
12:54 cpattonj morning
12:54 subsignal joined #salt
12:55 TranquilityBase I'd like to try RAET out with 2015.8 on Centos-7.1, but when I add "transport: raet" to my /etc/salt/master file and restart the master, I get: https://www.refheap.com/110649
12:55 TranquilityBase oops, might have answered my own question, no enum module even though I installed python-raet by hand
12:55 TranquilityBase RPMs seem to be missing some deps
12:56 TranquilityBase now unique is missing.  I think I'm going to abort the RAET experiment.  Are the deps not included by default?
12:57 hansi hi guys
12:58 hansi I have question. I've set new grain "munin" with multiple values which represent server roles, e.g. "nginx" and "apache", the problem is if I use "{% if grains['munin'] == 'nginx' %}" in my sls file salt don't run "nginx" specific stuff, did this not work with multiple values or my syntax is incorrect?
12:59 averell joined #salt
13:03 ferbla joined #salt
13:03 cberndt joined #salt
13:05 sunkist joined #salt
13:05 TranquilityBase I'd really like to see a pluggable backend messaging bus.  Would be cool to be able to run salt over Kafka for example.
13:06 Akhter joined #salt
13:07 JDiPierro joined #salt
13:07 ferbla joined #salt
13:07 ferbla joined #salt
13:09 mapu joined #salt
13:12 thefish joined #salt
13:13 Aidin joined #salt
13:13 oherrala hansi: why do you use grains for that and not pillar?
13:15 jdesilet joined #salt
13:15 cpowell joined #salt
13:19 hansi oherrala: that a good question, I'm in process of  learning salt, thanks for the hint!
13:23 racooper joined #salt
13:23 bhosmer joined #salt
13:23 debian112 joined #salt
13:24 stephanbuys joined #salt
13:24 _JZ_ joined #salt
13:28 braqoon joined #salt
13:29 DammitJim man, salt can be such a pain in the butt!
13:29 DammitJim ... when you have configured 2 machines with the same IP address .... LOL
13:31 bhosmer joined #salt
13:32 braqoon Hi, can you pass variables from .sls to template which will render a file as context var ? eg: https://gist.github.com/anonymous/420c375377ca90c024c1
13:34 pm90_ joined #salt
13:34 saltman joined #salt
13:36 bhosmer joined #salt
13:39 thefish braqoon: yes you can, are you having problems with it?
13:41 saltman Hi, I try to upgrade my salt-minion to salt-minion 2015.5.2 (Lithium). I do it with state.sls by calling to pkg.latest as mention here: https://docs.saltstack.com/en/latest/faq.html#linux-unix
13:42 saltman The problem is that when I run the state from the salt-master, the state is stuck and no continue to the next level
13:42 saltman probably because the salt-minion service is restarted
13:42 saltman What can I do?
13:43 thefish saltman: you probably want 2015.8.0 - you could try from the minion: salt-call state.apply {your_minion_upgrade_state} to see a bit more of whats happening
13:43 thefish we have similar, upgrading the minion via salt requires a restart of the service
13:44 saltman I don't want to upgrade to 2015.8.0 yet.
13:44 saltman And it works fine?
13:44 saltman The state is not getting stuck?
13:44 thefish not really
13:44 babilen thefish: The service is, however, restarted (with atd)
13:44 thefish it doesnt get stuck, but the service doesnt start again
13:45 thefish we have a service.running state which watches the pkg.latest state
13:45 thefish the state completes, but after that the minion is not running
13:45 babilen And you include the at command?
13:45 saltman I copy the same as in the example
13:46 saltman and it stuck
13:46 saltman but restart the service.. the service is running
13:46 thefish babilen: i dont know what you mean by at command
13:46 babilen thefish: "echo service salt-minion restart | at now + 1 minute"
13:46 agend joined #salt
13:47 thefish babilen: nice! ill try that
13:47 babilen https://docs.saltstack.com/en/latest/faq.html#linux-unix
13:47 JDiPierro joined #salt
13:47 babilen (which was linked by saltman, but (s)he still has problems apparently)
13:47 thefish i am ashamed
13:47 saltman Yes, it doesn't help
13:48 babilen I simply run "salt pkg.install salt-minion refresh=True" to upgrade my minions and haven't had a single problem with it in the last two years. But then I'm using high-quality™ Debian packages ;)
13:49 babilen salt '*' .... that is
13:49 chrismckinnel is there an existing grain that will give me the major ubuntu version number?
13:49 braqoon thefish, ha! just fixed. I was passing a STR instead of INT and this was the problem. Thanks anyway
13:49 thefish braqoon: no prob :)
13:49 chrismckinnel like 12, 14, etc
13:50 pm90_ joined #salt
13:50 babilen chrismckinnel: osrelease_info
13:50 saltman @babilen: I will try it
13:51 chrismckinnel babilen: thanks, is that just 12 / 14 or is it the full 12.04
13:51 chrismckinnel babilen: or is it more
13:51 babilen chrismckinnel: But then you can be more explicit by using lsb_distrib_codename or oscodename
13:51 chrismckinnel babilen: nice, thanks
13:51 babilen chrismckinnel: It should give you a list [14, 4]
13:51 babilen I typically use oscodename
13:52 chrismckinnel i need to spit out ubuntu{12,14} for a package url so a list will be great
13:52 babilen chrismckinnel: salt 'foo' grains.item osrelease_info ?
13:53 babilen Does that look fine? I don't have Ubuntu boxes around
13:53 chrismckinnel one sec
13:54 chrismckinnel babilen: oh boo, it actually comes back as empty fo rme
13:55 babilen Take a look at "grains.items"
13:55 nickermire joined #salt
13:55 babilen Curious that that's broken on Ubuntu, but then ... it is Ubuntu
13:55 babilen ;)
13:55 * babilen runs
13:55 chrismckinnel ha
13:55 chrismckinnel where would i find grains.items
13:55 chrismckinnel oh, salt 'foo' grains.items
13:55 chrismckinnel ?
13:56 babilen It is an execution module function. You should be able to run it right away ... "salt 'foo' grains.items"
13:56 babilen It shows you the value of all grains
13:56 timoguin joined #salt
13:56 chrismckinnel yeah gotcha, that's cool
13:56 chrismckinnel ah man, it shows as a list there - 14, 4
13:56 zmalone joined #salt
13:56 chrismckinnel but when i hit it individually i don't get the list
13:57 mfournier joined #salt
13:57 chrismckinnel no, cancel that, i'm talking garbage
13:57 chrismckinnel thanks babilen , perfect
13:58 babilen Could you paste the output and your exact commands to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … ? Please also include "salt 'foo' grains.item osmajorrelease"
13:58 chrismckinnel osrelease_info works fine, i must have made a typo which was causing it to return empty
13:59 babilen okay
13:59 hasues joined #salt
13:59 babilen (osmajorrelease is 14, but if you need 14 and 4 then ... )
14:00 hasues left #salt
14:03 rideh joined #salt
14:04 hansi hi guys, how can I match grain with multiple values in jinja? e.g. cpu_flags
14:04 chrismckinnel babilen: nice
14:04 babilen hansi: regex?
14:04 hansi {% if grains['cpu_flags'] == ''hypervisor" %} doesnt work
14:05 babilen if "hypervisor" in grains['cpu_flags']
14:05 chrismckinnel did you mean to say ''hypervisor"? or typo
14:05 hansi "hypervisor" yes
14:05 babilen And I'd make that in salt['grains.get']('cpu_flags', [])
14:06 teebes joined #salt
14:07 hansi babilen: it's works, thanks!
14:07 babilen yw
14:09 spogliani joined #salt
14:12 evenflow joined #salt
14:12 evenflow hi, trying to run pillar.get for a specific property, however the name may change for example a -> b-> random_text - > c , i would like to get c without knowing random_text, can anyone advise?
14:13 evenflow meaning, i would like to drop down one level in the yaml if i could do something like pillar.get '*' a:b:*:c something of this sort
14:14 babilen Get 'a:b' and work your magic?
14:14 sgargan joined #salt
14:15 evenflow is this the only way?
14:15 zwi joined #salt
14:17 pm90__ joined #salt
14:17 Aidin1 joined #salt
14:20 cwyse joined #salt
14:22 hansi_ joined #salt
14:26 numkem joined #salt
14:26 Tritlo joined #salt
14:26 lkannan joined #salt
14:26 dendazen joined #salt
14:27 babilen evenflow: I don't see another .. if you don't know the third key, you have to look at the datastructure you get for 'a:b', don't you?
14:27 babilen I mean how else would you find out which keys there are?
14:29 thefish is there a way to get the output of a disconnected state run on a minion? like with the minion upgrade, we'll get some minions that get "Minion did not return", but saltutil.running shows a job running
14:30 zmalone Increase your timeout or log into the minion and look at the salt-minion log.
14:30 favadi joined #salt
14:31 mapu joined #salt
14:33 thefish zmalone: the minion log is just WARN, it doesnt show that level (and i'd prefer not to have them all filling their disks with debug logs)
14:33 spogliani Hello everyone, I'm new to the channel. I'm having trouble using the Salt Mine from a pillar file and could not find anything on Google. Is there a chance someone could help me out? I'm using SaltStack 2015.5 on CentOS 6.7
14:34 malinoff joined #salt
14:34 zmalone thefish: https://docs.saltstack.com/en/latest/ref/cli/salt.html#options you can just crank the timeout up really high if you think it's an issue with a minion taking longer then planned.
14:35 zmalone I'd suspect that if you use raet or tornado, you'll have more insight, as you drop the message queue structure, but both of those have their own issues.
14:35 evenflow babilen, i would expect a feature like pillar.get '*' a:b::c which will bring me all the matchings in that level
14:35 zmalone (I've never touched either)
14:35 sjorge joined #salt
14:35 sjorge joined #salt
14:40 sgargan joined #salt
14:42 Joe__ joined #salt
14:42 Brew joined #salt
14:43 Micromus joined #salt
14:44 Joe__ Hi, if I need to persist some state in a proxy module (concrete example: a call like salt 'proxy' mymodule.increment should actually increment a counter), how do a do this best? I've seen code that relies on module-level variables, but those are probably not reliably persistent because of lazye loading/unloading?
14:44 Joe__ Is the "data" module the way to go?
14:46 sjorge joined #salt
14:46 sjorge joined #salt
14:46 codehotter hi, I don't really understand onchanges. Is it true that I can use wait_script or cmd.wait with watch, and that this is synonymous with using cmd.script or cmd.run with onchanges?
14:46 codehotter Or is there a difference?
14:47 Joe__ I don't need to have offline persistence, just persistence within one demo session, from starting the proxy procces to shutting it down.
14:48 codehotter I was rewriting my cmd.wait states into onchanges, because I like onchanges better
14:49 codehotter but they're not working: they were firing before, but the onchanges version doesn't fire. Says "req state didn't change"
14:50 pogotech joined #salt
14:53 tmclaugh[work] joined #salt
14:54 Akhter joined #salt
14:54 fe92 joined #salt
14:55 Akhter joined #salt
14:56 dkrae joined #salt
14:58 Joe__ @codehotter: I'm new here as well, but an example would help. The docs say that an onchanges waits for the state to return "True". Is that the case?
14:59 codehotter Joe__: actually what tripped me up was I was reading the 2015.8 docs and I'm on 2015.5
14:59 Joe__ Yeah, that's new stuff.
14:59 codehotter recently the behavior was changed if you have multiple onchanges reqs: they used to be ANDed, and now they are ORed. I was expecting OR
15:00 bhosmer joined #salt
15:02 StolenToast joined #salt
15:05 BogdanR I am trying to use the Azure cloud with salt-cloud 2015.5.3 and unfortunatelly it tells me that it's can't load the driver
15:05 BogdanR How can I do a bit more debugging to figure out why it can't load azure
15:06 BogdanR I already did a "pip install azure" so that shouldn't be the problem
15:09 pm90_ joined #salt
15:09 spogliani @BogdanR: have you tried running salt-cloud with --log-level=debug?
15:09 spogliani I found it useful to figure out why cloud modules were not loaded
15:09 BogdanR spogliani: Yes I did
15:10 BogdanR It doesn't output any different message
15:10 pm90_ joined #salt
15:14 pm90__ joined #salt
15:15 spogliani BogdanR: have you configured a provider with subscription_id and certificate_path options?
15:16 spogliani PS: I have no experience with the azure plugin but the cloud module refuses to load if those options are missing (https://github.com/saltstack/salt/blob/v2015.5.3/salt/cloud/clouds/msazure.py#L78)
15:17 BogdanR spogliani: Yes I did.
15:17 spogliani Mmm
15:18 spogliani can you import the modules salt needs in a regular python shell?
15:19 braqoon Can I use  salt.modules.debian_service.available(name) in .sls file in if statement ? manual only shows examples in CLI
15:19 dfinn joined #salt
15:21 BogdanR spogliani: How would I do that?
15:23 spogliani BogdanR: In a shell on the server start python (make sure you use the same python version as salt, what OS is your server running?)
15:23 spogliani Then import the same modules as salt (https://github.com/saltstack/salt/blob/v2015.5.3/salt/cloud/clouds/msazure.py#L54) lines from 54 to 58
15:24 spogliani See if any throw an exception
15:24 andrew_v joined #salt
15:26 Joe__ Any takers on the persistence question? ;-)
15:27 sgargan joined #salt
15:28 Ahlee Is there a flag to enable auto minion log rotation on windows hosts?
15:33 sgargan joined #salt
15:34 LyndsySimon left #salt
15:34 jalbretsen joined #salt
15:34 kinetic joined #salt
15:35 BogdanR spogliani: It can't import WindowsAzureConflictError
15:35 BogdanR I think the name of that function changed
15:35 spogliani Ok, that would be why it does not load the module
15:35 pratikmallya joined #salt
15:35 spogliani not sure where you can get it from
15:36 spogliani maybe wrong version of the azure lib?
15:36 wryfi left #salt
15:36 BogdanR I will try to downgrade the lib because I have 1.0.2 and I think it was written with 0.9
15:36 polishdub joined #salt
15:37 Aidin joined #salt
15:39 sjorge joined #salt
15:39 sjorge joined #salt
15:41 spogliani It seems it was renamed in version 1.0.0 (https://github.com/Azure/azure-sdk-for-python/blob/bc1e1e767465ae365a59470058cd2913e3e6cb8f/ChangeLog.txt#L64)
15:41 spogliani Good luck
15:41 spogliani :-)
15:41 spogliani Anyone here can help me with salt mine?
15:49 Akhter_ joined #salt
15:55 btorch is anyone aware of some bug with latest salt on ubuntu trusty when running apt-get commands ?
15:55 btorch 2015.5.3+ds-1trusty1
15:56 tanta_g joined #salt
15:57 mohae joined #salt
15:58 bhosmer_ joined #salt
15:59 zmalone That's not the latest Salt, https://repo.saltstack.com/ replaced the PPA
15:59 zmalone (but it only has 2015.8, not 2015.5.5 or 2015.5.3)
16:00 zmalone I've had bugs with the pkg suite of commands though.
16:00 ageorgop joined #salt
16:00 zmalone ex. https://github.com/saltstack/salt/issues/9984
16:00 saltstackbot [#9984]title: pkg.remove fails when package is removed (debian) | I just tried to write a simple state:...
16:03 sgargan joined #salt
16:04 scoates joined #salt
16:05 btorch zmalone: oh so no longer deb http://ppa.launchpad.net/saltstack/salt/ubuntu trusty main
16:06 jmreicha joined #salt
16:06 moogyver joined #salt
16:06 zmalone Yeah.
16:07 btorch zmalone: I'm not even using the pkg module... I'm just doing a simple cmd.run "apt-get update" and all these boxes with trusty and 2015.5.3 are giving me back "Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)"
16:07 btorch but works fine when not done via salt
16:07 mpanetta joined #salt
16:08 btorch hmm only precise and trusty support ?
16:08 btorch I do have lucid :) I know I know :)
16:09 Rkp btorch: are you running it as root?
16:09 aparsons joined #salt
16:10 btorch Rkp: yeah salt master/minion runs as root
16:10 stephanbuys joined #salt
16:11 zmalone That's odd, I've got 14.04 hosts with 2015.5.3, and I have not run into that when running apt-get commands via cmd.run.
16:11 favadi joined #salt
16:12 btorch yeah it's weird
16:12 Rkp maybe some apt command is still running on your minion and using that lock file? do you see it open in lsof or something on the local server?
16:13 btorch nope there is nothing , I've checked that too
16:13 btorch I thought maybe it would have been something to do with sudo , since I do run "sudo salt ...." but even as root it gives back the same issue
16:14 btorch works fine with running within the target box though
16:14 jeffpatton1971 joined #salt
16:14 Rkp some race condition with two apt related commands being run in parallel through salt? it sounds indeed weird
16:14 btorch idk .. I'm gonna rollback to 2015.5.0 and see
16:15 Rkp https://github.com/saltstack/salt/issues/19317
16:15 saltstackbot [#19317]title: salt 2014.7.0 ubuntu 14.04 trusty APT locks | i just applied my states to install some programs to a new ubuntu 14.04 machine and they failed horribly with lots of locks inside the package manager....
16:15 Rkp apparently this guy had two minions running or something
16:15 btorch any apt-get command fail with that error
16:15 btorch oh
16:16 zmalone I wish salt used lock files for minions.
16:16 btorch that's it :(
16:16 Rkp :D
16:16 Rkp well, glad this is solved then
16:17 btorch I think the salt upgrade on the minion didn't kill the old one
16:17 btorch hehe thanks
16:18 pfallenop joined #salt
16:18 zmalone I'm not sure if that's a design decision, or just an oversight
16:18 pfallenop joined #salt
16:20 btorch yeah seems only trusty boxes had the issue though
16:20 btorch all the precise and lucid were fine
16:21 btorch well lucid ones didn't get any update since none available for those
16:22 nate_c joined #salt
16:25 zwi joined #salt
16:28 Akhter joined #salt
16:38 pcdummy joined #salt
16:39 perfectsine joined #salt
16:40 pratikmallya joined #salt
16:41 linjan joined #salt
16:41 papertigers should there be more info here? https://docs.saltstack.com/en/latest/ref/states/overstate.html
16:41 papertigers (new to salt)
16:42 writtenoff joined #salt
16:45 iggy MTecknology: yo, what's cracking?
16:46 pratikma_ joined #salt
16:47 cpowell joined #salt
16:48 debian112 is there are way in salt to search for a pattern or string then insert on the line before.
16:48 debian112 like in sed:
16:49 iggy there's prepend, but no
16:49 iggy there is cmd.run + sed though
16:50 wendall911 joined #salt
16:50 debian112 yeah thought about that, but I think it will run everytime the servers checks in for highstate
16:50 btorch is it possible for pkgrepo.managed not to append to the named file and instead just replace all the contents of that file ?
16:51 debian112 I might could get creative with that though
16:51 zmalone btorch: I found pkgrepo.managed to be buggy on Ubuntu, and moved to straight file.appends instead.
16:51 btorch seems like it just appended the new "deb http://repo.saltstack.com/apt/ubuntu/ubuntu12 precise main" after the PPA one
16:52 iggy debian112: that's what unless/creates/etc are for
16:52 iggy btorch: that would be bad default behavior
16:52 debian112 yup, that's were I was headed
16:52 debian112 thanks, iggy
16:52 Lionel_Debroux joined #salt
16:53 iggy debian112: what are you actually trying to achieve? config file editing?
16:54 btorch iggy: hmm I don't think so, I can see that being ok if you are appending a new repo to the global sources.list (which I don't even think that should be done)
16:54 btorch iggy: but if you are trying to change/update an existing /etc/apt/sources.list.d/ file then it shouldn't append
16:55 iggy clean_file
16:55 iggy If set to true, empty file before config repo, dangerous if use multiple sources in one file.
16:55 btorch unless one really mean to have some new deb url there
16:55 iggy BAM docs ftw
16:56 btorch oh that's only for 2015.8.X though :)
16:56 btorch good to know though
16:57 iggy upgrade?
16:57 iggy (and wtf doesn't that have versionadded annotations)
16:57 zmalone that's what btorch is trying to do
16:58 zmalone upgrading requires the repo change
16:58 btorch yeah that's what I'm trying to do now
17:00 zmalone https://github.com/saltstack/salt/issues/27067 was the issue that made me fully abandon repo.foo.  I believe that if you have multiple repos that provide salt though, Debian/Ubuntu will grab the most recent package
17:00 saltstackbot [#27067]title: pkgrepo.managed does not uncomment repos in sources.list | If an entry doesn't exist at all, it is added fine:...
17:00 zmalone So I just added the new repo and orphaned the old one for now.
17:00 zmalone (by which I mean that it's still included, but new packages won't be pulled from it)
17:00 iggy I still don't think that's good default behavior
17:02 amcorreia joined #salt
17:03 aparsons joined #salt
17:05 andrew_v_ joined #salt
17:07 RedundancyD joined #salt
17:13 ziro` joined #salt
17:14 jmreicha_ joined #salt
17:16 zer0def joined #salt
17:16 pratikmallya joined #salt
17:19 mehakkahlon joined #salt
17:23 favadi joined #salt
17:23 martoss joined #salt
17:24 jaybocc2 joined #salt
17:26 KyleG joined #salt
17:26 KyleG joined #salt
17:27 RedundancyD joined #salt
17:32 sgargan joined #salt
17:35 shiriru joined #salt
17:38 markm_ joined #salt
17:42 scoates joined #salt
17:43 tanta_g joined #salt
17:45 jimklo joined #salt
17:45 Fiber^ joined #salt
17:46 breakingmatter joined #salt
17:52 jemejones joined #salt
17:56 Akhter_ joined #salt
17:59 katyucha joined #salt
17:59 ashirogl joined #salt
17:59 baweaver joined #salt
17:59 ingwaem joined #salt
17:59 ingwaem left #salt
18:00 stephanbuys joined #salt
18:00 knite joined #salt
18:02 knite what's the best way to check if a file pillar is present (to use with contents_pillar)? is wrapping file.managed with {% if salt['pillar.get']('files:nginx.conf', '') %} the best option?
18:03 scoates_ joined #salt
18:04 stephanbuys joined #salt
18:05 babilen "is defined" is probably the check you are looking for, but why don't you make sure that either: 1. The pillar is present or 2. You only generate states for files that are present ?
18:05 babilen knite: But your check would work and is, IMHO, fine
18:08 cpowell joined #salt
18:08 edulix joined #salt
18:08 Cidan joined #salt
18:09 knite babilen: I'm not sure I follow what you mean. Regarding one, isn't that what my if actually does? Regarding 2, the goal is "use a custom nginx.conf for this host if present (provided in pillar), do nothing and use default nginx.conf otherwise", so I believe I should have this state regardless of whether the file is present?
18:09 babilen knite: No, you would ensure it by defining the pillar
18:09 babilen Ah
18:10 baweaver joined #salt
18:11 babilen I was thinking of some "for file in salt['pillar.get']('files', []) .... {{ file }}_manage_foo: file.managed: ... - content_pillar: {{ 'files:%s'|format(file) }} magic
18:12 knite ah, you mean if I had multiple config files.
18:13 knite I might crib from https://github.com/saltstack-formulas/nginx-formula/blob/master/nginx/ng/vhosts.sls for my per-site setup, this is for nginx.conf only, which there is max one of.
18:13 babilen Well, the difference is: Do you write a state that assumes specific data to be present or do you write a state that does the right thing depending on the data that is present. The former needs "guards" if the data is absent (as it would fail), the second wouldn't even exist if the data is absent
18:13 EWDurbin left #salt
18:14 babilen Don't you always have a nginx.conf ? (it might be the default one though)
18:14 knite Hm...so I'm doing option #1. How on earth would I do #2?
18:14 babilen I just showed you
18:15 babilen But then I would simply *always* manage nginx.conf, provide sensible defaults and then override them on selected hosts
18:15 knite oh, so you did! I suppose there's no reason that wouldn't work for a single file as well.
18:15 babilen (override the defaults that is)
18:15 babilen But there are so many ways ...
18:16 babilen https://github.com/saltstack-formulas/nginx-formula/blob/master/nginx/templates/config.jinja is one example of a (hopefully) suitable template
18:16 aparsons_ joined #salt
18:18 babilen Wouldn't necessarily consider that best practices in terms of default value handling (check out the salt formular for that), but it exemplifies the idea
18:19 knite oof, that's coming from a good place, but it's rough on the eyes.
18:20 babilen That particular template?
18:21 aboe joined #salt
18:26 ajw0100 joined #salt
18:30 ziro` joined #salt
18:32 ronny joined #salt
18:39 Akhter joined #salt
18:40 GreatSnoopy joined #salt
18:43 RedundancyD joined #salt
18:43 bhosmer joined #salt
18:44 giantlock joined #salt
18:44 bhosmer joined #salt
18:45 av___ joined #salt
18:51 clintberry joined #salt
18:52 mrwboilers joined #salt
18:53 papertigers How can i get debug output from a salt state that does a simple pkg.installed
18:54 mrwboilers I just upgraded my masters to 2015-8.0 and now any minion on a previous version won't respond to anything when targeted using node groups. Is this a known bug?
18:54 papertigers salt says failed to install/update but the package is installed
18:54 andrew_v joined #salt
18:54 armguy is the package a group package or virtual package?
18:55 papertigers should be just a single package "py27-sqlite3"
18:55 iggy mrwboilers: a few people have mentioned oddness targeting with mixed versions... check issue tracker (and irc logs
18:55 mrwboilers The master correctly targets the minions (test.ping tries but fails) But if targeted another way (not with a node group) they all work fine
18:56 w1gz joined #salt
18:57 cpowell joined #salt
18:58 andrew_v joined #salt
19:00 cpowell_ joined #salt
19:00 mike_ joined #salt
19:00 geomyidae_ joined #salt
19:01 Guest98105 Hello I am new to salt and have a grains question I havent been able to figure out.
19:01 bhosmer joined #salt
19:01 cpowell joined #salt
19:04 Guest98105 So I added role:webserver to /etc/salt/grains on my minion.  grains.items shows it on the master.  in my haproxy folder init.sls this works:
19:04 Guest98105 {% elif grains['host'] == 'web3' %}
19:04 Bryson joined #salt
19:04 Guest98105 but this does not
19:04 kinetic joined #salt
19:04 Guest98105 {% if grains['role'] == 'webserver' %}
19:04 mrwboilers iggy: thanks. Found it reported already in the issue tracker.
19:05 papertigers Anyone have advice on how I would debug a pkg.installed issue
19:05 cpowell joined #salt
19:06 Antiarc joined #salt
19:09 ajw0100 joined #salt
19:10 armguy joined #salt
19:11 oeuftete joined #salt
19:11 Guest98105 im new to salt, but I might be able to help with your pkg.installed issue
19:12 |_[O_O]_| joined #salt
19:13 kinetic joined #salt
19:13 Cliph joined #salt
19:15 ashirogl joined #salt
19:15 ajw0100 joined #salt
19:18 oeuftete joined #salt
19:19 baweaver joined #salt
19:22 minaguib joined #salt
19:25 bhosmer joined #salt
19:25 faliarin joined #salt
19:25 lionel joined #salt
19:25 ziro` So, how do people store their pillars?
19:26 ziro` this bothers me, I can store my states in a repository, but pillar is this <doesnt live anywhere> entity
19:27 slav0nic joined #salt
19:27 kinetic joined #salt
19:27 scoates joined #salt
19:28 thatguymike joined #salt
19:28 jeffpatton1971 pillar is just a directory structure...
19:28 mpanetta joined #salt
19:29 jeffpatton1971 I keep mine in /srv/pillar
19:29 jeffpatton1971 and have a git for it
19:30 thatguymike Anyone wanna help me with a custom grains issue I cant figure out?
19:31 JDiPierro ziro`: You can store pillar data in a git repo too.
19:32 baweaver joined #salt
19:32 JDiPierro ziro`: https://docs.saltstack.com/en/latest/ref/configuration/master.html#git-external-pillar-git-pillar-configuration-options
19:32 ziro` JDiPierro: I guess I could… but should I
19:32 JDiPierro ziro`: That's up to you :P We've got a repo for states and a repo for pillar. I want to play around with pulling pillar from a database.
19:33 mrwboilers Anyone have a good process for upgrading minions? Is there a formula for that?
19:33 mehakkahlon joined #salt
19:33 kinetic joined #salt
19:34 JDiPierro ziro`: These are all different external pillar handlers: https://github.com/saltstack/salt/tree/develop/salt/pillar
19:35 ziro` My pillar contains stuff like ssh keys and I don’t know how to manage them
19:35 ziro` I guess I need to get over this
19:35 papertigers So pkg.install is different than pkg.installed, can anyone explain to me how that works
19:36 jimklo joined #salt
19:36 shanemhansen joined #salt
19:36 JDiPierro Yeah unfrotunately we've got a few private keys in our git repo... it's definitely not a great idea... I believe I've seen people using https://vaultproject.io/ for secret data. I think there's an open issue for having pillar data provided by vault.
19:37 whytewolf papertigers: pkg.install is an exacution module function. which is the same as telling salt to install it. pkg.installed is a state module function that says the state of the package should be installed.
19:37 JDiPierro ziro`: https://github.com/saltstack/salt/issues/27020
19:37 saltstackbot [#27020]title: Add Vault Pillar/SDB Module | > Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault handles leasing, key revocation, key rolling, and auditing. Vault presents a unified API to access multiple backends: HSMs, AWS IAM, SQL databases, raw key/value, and more....
19:37 papertigers whytewolf: okay, got that much.  Does the state module function use the package manager module to do so?
19:38 whytewolf the state module calls the exacution module
19:38 papertigers whytewolf: my issue is as follows: https://gist.github.com/papertigers/f6c19e7a7d04bebf1a61
19:38 nzero joined #salt
19:39 kinetic joined #salt
19:39 bhosmer_ joined #salt
19:39 papertigers whytewolf: they install but salt doesnt think so
19:39 whytewolf um, that doesn't look right. new: and old: should onlt have version numbers. not that extra text
19:39 ziro` JDiPierro: Great thanks
19:40 JDiPierro No problem :)
19:41 papertigers whytewolf: yeah theres a bug in the execution module I am trying to track down
19:42 whytewolf papertigers: debug time, -l trace to your salt. as well as your state. and the output of salt '<minionid>' test.versions
19:42 thatguymike Can anyone help me with a custom grains issue I cant figure out?
19:42 whytewolf thatguymike: just ask
19:43 thatguymike so I put role:webserver in /etc/salt/grains.  when I run grains.items on master, it is there.
19:43 thatguymike in my init.sls this works.
19:43 thatguymike if grains['host'] == 'web3'
19:43 thatguymike but this does not
19:43 writteno2 joined #salt
19:43 thatguymike if grains['role'] == 'webserver'
19:45 whytewolf what does grains.get role show
19:45 thatguymike it gets the correct value
19:45 thatguymike the master does.
19:46 whytewolf thatguymike: is it a list? a dict? or a value?
19:46 iggy paste output to gist
19:46 iggy easiest way to show people what's going on
19:46 whytewolf what iggy said
19:47 kinetic joined #salt
19:47 thatguymike https://gist.github.com/cmichaelmcclain/a40867c46e90eff6c74a
19:48 papertigers whytewolf: nothing useful in there
19:48 thatguymike its the same type of value as grains['host'] as far as I know
19:48 papertigers whytewolf: I think its in this commit https://github.com/saltstack/salt/commit/c37d70af348ee7a0e5f1b18c76fa335d14be18eb
19:48 thatguymike grains.get host
19:50 whytewolf pkgin? oh boy, SmartOS
19:50 Shirkdog_ joined #salt
19:50 papertigers the best OS :)
19:51 kinetic joined #salt
19:51 mrwboilers Sorry if I've asked this before, but any idea if there will ever be a package repo for Ubuntu 15? Or only for LTS releases?
19:51 whytewolf no OS == "the best os" they are all crap.
19:52 papertigers also pkgin is used by other OS's
19:52 whytewolf papertigers: used in, yes. but defaults to?
19:53 whytewolf anyway OS wars not important. I would say file a bug. this defaintly looks like that fix broke it
19:54 papertigers I can try and fix it myself, changing that file require a rebuild of salt?
19:54 whytewolf thatguymike: try if( 'webserver' in grains['role'])
19:54 cberndt joined #salt
19:55 whytewolf papertigers: not really. but please if you do fix it work the salt chain of issues. [submit an issue, then submit a fix that links to that issue]
19:56 papertigers whytewolf: thats the goal. So how can I make local changes to that execution module?
19:56 thatguymike Awesome thanks whytewolf.  Not sure why that DID work and my prior use didnt.
19:56 whytewolf thatguymike: cause your grain is a list
19:57 thatguymike ok.  I'll research the difference between value and list and dict.
19:57 mpanetta joined #salt
19:57 whytewolf papertigers: easiest way is to download the module to your own _modules directory then make the changes there and use sync_all to push it out and see if they work
19:58 whytewolf however I am not 100% sure if that will cause the state to call yours
19:59 mpanetta joined #salt
19:59 whytewolf thatguymike: simplest terms. a list is an array, a dict is an associative array and a value is just a value. there is other things about them. but that is the 3million mile view
20:02 mrwboilers Will the bootstrap script be updated to install from salt's new repos?
20:02 papertigers whytewolf: new to salt, but willing to do the work to improve things
20:03 mapu joined #salt
20:04 Akhter_ joined #salt
20:05 writteno1 joined #salt
20:06 nahamu papertigers: you can install salt from git rather than the esky build if you want to test your fix.
20:06 earthrocker joined #salt
20:07 ajw0100_ joined #salt
20:08 zmalone joined #salt
20:08 UtahDave joined #salt
20:09 aphor joined #salt
20:12 papertigers whytewolf: is there a way to call mine directly
20:13 aphor Opinion poll (for all who care to answer): Should I bother trying to expose stuff in the salt-cloud DigitalOcean module to the "salt-cloud -f" style interface, or do people hate that?
20:13 kinetic joined #salt
20:14 aphor papertigers: you mean like this https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.mine.html ?
20:15 whytewolf papertigers: since all pkd.installed should do is call pkg.install i would say call pkg.install directly. such as salt 'minionid' pkg.install <packages>
20:16 martoss joined #salt
20:16 papertigers whytewolf: and the output for that shouldnt be just a "------" right?
20:18 whytewolf papertigers: sample output https://gist.github.com/whytewolf/9c6744dbf7d402be6154d
20:18 whytewolf ack! https://gist.github.com/whytewolf/9c6744dbf7d402be6154
20:23 tr_h joined #salt
20:27 canci joined #salt
20:29 teryx510 joined #salt
20:30 knite how can I install different package versions based on distro version? eg, salt-minion 2015.5.0+ds1utopic1 vs salt-minion 2015.5.0+ds1trusty1. is there a best practices syntax for having version pinning, but with salt determining the necessary distro suffix?
20:36 David_B55__ joined #salt
20:37 baweaver joined #salt
20:38 papertigers whytewolf: do I need to do anything special to use log.debug(...)
20:38 aphor knite: there are multiple ways. You can target states by grains that indicate distro, or you can do the switch logic in a map.jinja to specify a pkg version.
20:39 knite aphor: any good examples online? seems like a pretty standard ask...
20:39 aphor knite: the best way is to put your packages in an apt repo and let apt choose the correct package.
20:40 whytewolf papertigers: see https://docs.saltstack.com/en/latest/topics/development/index.html for development info. but you should be able to just import logging
20:40 mehakkahlon joined #salt
20:40 papertigers whytewolf: got it working
20:41 aphor knite: then you have a state which adds the correct repo(s) for your custom add-on packages.
20:42 aphor knite: if possible, keep the mess of version dependencies out of your salt configs. You don't want the technical debt of duplicating package metadata in salt.
20:42 knite aphor: this isn't for custom packages. take my salt-minion example above. if I want to pin salt-minion, I have to include the distro in the version. I'm already using a repo, but that doesn't solve the problem.
20:42 knite I can't do version: 2015.5.0+ds, I have to do version: 2015.5.0+ds1<distro>1
20:44 aphor knite: in that case, put some jinja logic in your state file to add package versions to the package state for degenerate distros.
20:45 mehakkahlon joined #salt
20:45 bhosmer joined #salt
20:46 baweaver joined #salt
20:46 knite is there a distro grain I can use? so I can a make of trusty: 1.2.3.4_trusty, utopic: 1.2.3.4_utopic, etc and do a key lookup?
20:46 knite make a map of*
20:48 aphor knite: see what your target minions provide.. salt '*' grains.items
20:48 Sketch pay particular attention to the os* items
20:49 larsfronius joined #salt
20:50 knite yep, there's an oscodename grain!
20:50 aphor knite: another way might be to implement a custom grain that exposes best available minion package.
20:50 mehakkahlon joined #salt
20:50 knite aphor: that sounds like a bit of work...surely this is a common problem?
20:51 knite (there's also lsb_distrib_codename)
20:51 aphor knite: custom grains are easy. Just cook up the key/value data and spit it out in the proper JSON format.
20:52 knite fair, I guess I'm just hung up here because I feel like this feels so common that it must be a solved problem?
20:52 aphor knite: I think everyone else running Ubuntu has a set of apt repos for each distro, and each minion only sees its favorite packages.
20:53 knite aphor: what about common OSS packages? I'd expect that most people are installing salt, nginx, etc from PPAs, which have this problem.
20:54 aphor knite: not all OSS packagers are created equal. Good ones will supply PPAs for each distro version.
20:55 mehakkahlon joined #salt
20:55 Akhter joined #salt
20:55 aphor knite: the fetish for old software (distros, or apps that require them) can be painful.
20:56 knite AFAIK every Ubuntu PPA (or certainly most?) I use follows the 1.2.3.4<distro> convention.
20:56 tkharju joined #salt
20:56 aphor knite: in that case, instead of worrying about which package version to install, you want to worry about which repo to add for each distro.
20:57 aphor knite: example here https://docs.saltstack.com/en/develop/ref/states/all/salt.states.pkg.html
20:59 jimklo joined #salt
21:00 mehakkahlon joined #salt
21:00 aphor knite: so if your packages are in a repo in a PPA, you want to put the repo in a pkgrepo.managed state, like the 'base' or 'dot.repo' examples.
21:02 ashirogl joined #salt
21:02 hrumph joined #salt
21:02 hrumph yo
21:02 hrumph i'm using the installer in silient mode in windows. i notice that it wants to start the service. is there a way to get it to not start the service so i can modify config options without having to restart?
21:03 hrumph imo the default for silent mode should be to not start.........
21:05 David_B55__ left #salt
21:05 mehakkahlon joined #salt
21:06 martoss joined #salt
21:06 teebes joined #salt
21:10 mehakkahlon joined #salt
21:10 mkramer joined #salt
21:13 UtahDave hrumph: I don't think there's an option to not have it start the service automatically in silent mode.  Would you mind opening a feature request for that on Github?  I like the idea
21:13 ziro` joined #salt
21:15 mehakkahlon joined #salt
21:16 scoates joined #salt
21:16 papertigers whytewolf: does pkg.install return anything when the pkg is already installed
21:17 papertigers looks like no
21:18 whytewolf just a line
21:19 ashirogl joined #salt
21:20 mehakkahlon joined #salt
21:20 polishdub left #salt
21:20 papertigers great found the simple issue
21:22 knite joined #salt
21:23 jimklo joined #salt
21:23 kinetic_ joined #salt
21:25 mehakkahlon joined #salt
21:29 darkhuy joined #salt
21:30 mehakkahlon joined #salt
21:35 mehakkahlon joined #salt
21:35 sgargan joined #salt
21:37 hrumph UtahDave, ok i'll do that
21:39 hrumph UtahDave, which of the repos shoud this request go to?
21:40 UtahDave github.com/saltstack/salt
21:40 mehakkahlon joined #salt
21:40 hrumph ok not salt-windows-msi then
21:42 UtahDave no, we're not using that code in production yet
21:44 ashirogl joined #salt
21:45 mehakkahlon joined #salt
21:45 papertigers whytewolf: its lame tty behavior :/ not sure of a fix yet
21:47 hrumph https://github.com/saltstack/salt/issues/28000
21:47 saltstackbot [#28000]title: No option to stop windows minion installer from starting service in silent mode. | I've been writing a powershell script which calls the windows minion installer in silent mode (which installs the minion and then starts it). The script then sets some config options and then restarts the minion. I would like it if, in silent mode, there was a way to get the installer to not start the minion so i could set the config optiion and
21:50 mehakkahlon joined #salt
21:50 cberndt joined #salt
21:52 jcristau joined #salt
21:55 mehakkah_ joined #salt
21:58 nzero joined #salt
22:00 mehakkahlon joined #salt
22:05 mehakkahlon joined #salt
22:06 nidr0x joined #salt
22:06 scoates joined #salt
22:08 Ahlee solid idea
22:09 Ahlee bah, no murrdoc
22:09 baweaver joined #salt
22:10 mehakkahlon joined #salt
22:14 papertigers whytewolf: https://github.com/saltstack/salt/pull/28001
22:14 saltstackbot [#28001]title: #27998 Cleanup pkgin isatty mess | This is a fix for issue #27998
22:14 yomilk joined #salt
22:15 mehakkahlon joined #salt
22:17 aidalgol` joined #salt
22:17 aidalgol` joined #salt
22:18 zma joined #salt
22:18 loque joined #salt
22:18 loque can anyone help
22:18 zma how do I tell in top.sls that one state file has to be executed before the other?
22:19 loque I am trying to run a state that use to work in 2014
22:19 loque now fails
22:19 Ahlee zma: I don't think you can in top.sls, you'll need to specify require in the state
22:19 loque when using the publish.publish module
22:19 loque the same command works when run from the command line
22:20 Ahlee I have no experience with publish.publish, sorry loque
22:20 loque but when called in a state in 2014 it works and in the latest release of salt it fails stating that the returned dict is empty
22:20 mehakkahlon joined #salt
22:20 ahammond root
22:21 zma Ahlee: that's pity, if I'd do that I'd need to - require: sls: {{ complicated path propagaging from top.sls }}/something/something
22:21 zma would be much more easy if I can require in top.sls
22:22 msciciel_ joined #salt
22:24 subsignal joined #salt
22:25 mehakkahlon joined #salt
22:27 cberndt joined #salt
22:30 jmreicha joined #salt
22:30 mehakkahlon joined #salt
22:35 mehakkahlon joined #salt
22:36 Akhter joined #salt
22:37 OliverUK joined #salt
22:40 mehakkahlon joined #salt
22:44 iggy zma: put them in top-down order and if you don't have anything that explicitly reorders things it'll go in order
22:45 mehakkahlon joined #salt
22:45 zma iggy: I have them in top down order :(
22:46 iggy job done
22:48 baweaver joined #salt
22:50 mehakkahlon joined #salt
22:50 zma Is it possible to require / prereq that specific id is executed?
22:50 kinetic joined #salt
22:54 otter768 joined #salt
22:55 mehakkahlon joined #salt
23:00 mehakkahlon joined #salt
23:01 David_B55__ joined #salt
23:03 mage_ joined #salt
23:03 nzero joined #salt
23:04 moloney joined #salt
23:04 kinetic_ joined #salt
23:05 moloney If I have three minions filling some role, and I need one of those three (doesn't matter which) to generate some files which are then distrubuted to the remaining ones.  How would I go about that.  Should I be using the orchestrate runner?
23:05 mehakkahlon joined #salt
23:05 pratikmallya joined #salt
23:10 mehakkahlon joined #salt
23:12 zma How can I require a file without requiring all directories leading to eat separately?
23:13 otter768 joined #salt
23:13 breakingmatter joined #salt
23:15 mehakkahlon joined #salt
23:20 mehakkah_ joined #salt
23:20 moloney zma: use "makedirs: True" in file.managed etc
23:20 zma moloney: I do, but I mean when I need to require elsewhere that the file exist
23:21 _JZ_ joined #salt
23:22 zma moloney: If I create file /a/b/c/d/e/file with makedir: True, then if I require that as prereq elsewhere, it says folder a doesn't exist. I can check that, but then I need to check folder b, then c.. when all I wanted is to check if file already exist
23:23 viq joined #salt
23:23 bfoxwell joined #salt
23:30 Guest25336 joined #salt
23:30 flyx joined #salt
23:30 |_[O_O]_| joined #salt
23:30 jemejones_ joined #salt
23:30 mehakkahlon joined #salt
23:30 notnotpeter joined #salt
23:30 kinetic joined #salt
23:30 illern__ joined #salt
23:30 jimklo joined #salt
23:30 neilf_ joined #salt
23:30 mehakkahlon joined #salt
23:30 NachoDuck_ joined #salt
23:30 moderation_ joined #salt
23:30 ashirogl joined #salt
23:30 munhitsu_ joined #salt
23:30 yetAnotherZero joined #salt
23:30 sirtaj_ joined #salt
23:30 Tritlo_ joined #salt
23:30 kwork_ joined #salt
23:30 pfalleno1 joined #salt
23:30 moapa_ joined #salt
23:30 monkeybo1 joined #salt
23:30 elektrix_ joined #salt
23:30 dayid_ joined #salt
23:30 Number6_ joined #salt
23:30 Cerales joined #salt
23:30 msciciel1 joined #salt
23:30 babilen_ joined #salt
23:30 moloney zma: can't you require the state itself?
23:31 MeltedLux joined #salt
23:31 ajw0100 joined #salt
23:31 keimlink_ joined #salt
23:31 scoates_ joined #salt
23:32 zma moloney: no, because the filename gets recursively associated regardless being on first line or on the file field
23:32 \ask joined #salt
23:32 pppingme joined #salt
23:32 esharpmajor joined #salt
23:33 NVX joined #salt
23:33 zma moloney: so using file.managed twice for the same file, even if different IDs, will associate recursively, as the name is considered ID too for this purpose (reference: https://github.com/saltstack/salt/issues/5667)
23:33 saltstackbot [#5667]title: Recursive requisite found, using - name is treated as equivalent to ID | My requirements are simple: Create a file if it does not already exist, and append a line (if the line does not already exist)....
23:34 kwork joined #salt
23:34 papertigers whytewolf: just to cover my bases, what does "- require: - pkg: foo" use to check for an installed package?
23:35 rawzone joined #salt
23:35 muep joined #salt
23:35 whytewolf papertigers: I have no idea. check the code.
23:35 ablemann joined #salt
23:35 dayid joined #salt
23:35 phx joined #salt
23:35 Reinhart joined #salt
23:35 sybix joined #salt
23:36 Ryan_Lane joined #salt
23:36 Ryan_Lane joined #salt
23:36 shnguyen joined #salt
23:36 kinetic joined #salt
23:36 flebel joined #salt
23:37 iggy papertigers: it doesn't check to see if a package is installed
23:37 papertigers iggy: sorry new to salt, whats it checking.
23:38 iggy it make sure a state with id 'foo' calling module 'pkg' has run
23:38 papertigers oh its checking the name
23:39 stupidnic joined #salt
23:39 papertigers thanks a ton
23:39 Zachary_DuBois joined #salt
23:39 papertigers iggy: can that be any state in any sls?
23:39 iggy that could technically be a pkg.absent
23:39 eightyeight joined #salt
23:39 garthk joined #salt
23:40 terinjokes joined #salt
23:40 iggy the containing sls has to be include'd
23:40 iggy (which I thought was weird when I first started, but meh)
23:41 papertigers iggy: as in - sls: foo
23:41 papertigers or does that mean all of the foo state
23:42 jacksontj joined #salt
23:43 baffle joined #salt
23:43 papertigers iggy: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt2.html#require-other-states
23:43 baweaver joined #salt
23:43 iggy include
23:43 papertigers so line 5 is for line 2?
23:44 papertigers and line 12 is the state defined on line 1?

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