Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-07-07

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

All times shown according to UTC.

Time Nick Message
00:05 woodtablet left #salt
00:06 smcquay I'm finally back to struggling with pillarenv and trying to perform dev work on our salt configuration. I'm failing to get it to use pillar from my pillarenv, and when I try to state.apply pillar='{"cheese": "spam"}' and then pillar.items the change doesn't take. Am I suffering from a gross conceptual misunderstanding of the system?
00:06 west575 joined #salt
00:07 Edgan joined #salt
00:07 aurynn passing commandline pillar data like that is an ephemeral overlay on the pillar tree, not an update
00:08 smcquay aurynn: hmm. the documentation seems to not be clear on that point.
00:08 aurynn smcquay, what are you looking at?
00:08 smcquay https://docs.saltstack.com/en/latest/topics/pillar/#set-pillar-data-at-the-command-line
00:08 aurynn yeah, "set" is misleading
00:09 smcquay I'm trying to work around my alternate pillar_root not being used in my state calls by just "hard-coding" the values like that.
00:09 aurynn try `salt "machine" pillar.items pillar='{"cheese": "spam"}'` and you should see it show up
00:13 smcquay hmm. pillar="" will work till the guy who set most the rest of this is back from vacation.
00:13 smcquay thanks aurynn
00:13 aurynn yw
00:22 linovia is it possible for a state module to access the pillar data ?
00:22 linovia I mean, a Python state module
00:22 aurynn I would've expected so, if the topfile targets that machine with that pillar data
00:22 aurynn but I haven't tested it, cannot confirm
00:28 netjak joined #salt
00:29 Sammichmaker joined #salt
00:36 dyasny joined #salt
00:45 infrmnt joined #salt
00:53 arif-ali joined #salt
00:53 edrocks joined #salt
00:54 flowstate joined #salt
00:56 iceyao joined #salt
01:04 iceyao joined #salt
01:08 iggy linovia: __pillar__ doesn't work?
01:08 linovia dunno, can't find a word about it in the docs
01:09 iggy https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
01:10 iggy which is under the "Developing Salt" section of themenu
01:13 _JZ_ joined #salt
01:20 linovia iggy: thanks, I couldn't find that section through google :(
01:21 iggy yeah, guess it helps if you know what you're looking for is called a dunder dict
01:24 * linovia nods
01:24 linovia iggy: thanks a lot !
01:25 iggy np, good luck
01:26 edrocks_ joined #salt
01:29 netjak joined #salt
01:31 A||SySt3msG0 joined #salt
01:32 Nahual joined #salt
01:46 rem5 joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.1 | 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 subsignal joined #salt
01:57 DammitJim joined #salt
01:58 rem5 joined #salt
02:16 flowstate joined #salt
02:22 racooper joined #salt
02:30 netjak joined #salt
02:38 smcquay So I thought that if I authored a python function in file_roots/_modules/foo.py I'd be able to salt.foo.bar() in a jinja template. Such things are not possible for me: Unable to manage file: Jinja variable 'collections.OrderedDict object' has no attribute 'namenode_threads'. any thoughts?
02:39 smcquay I've tried explicitly calling the execution module: salt '*' salt.foo.bar, but it claims "not available"
02:43 evle joined #salt
03:06 DEger joined #salt
03:09 hasues joined #salt
03:09 hasues left #salt
03:15 subsignal joined #salt
03:15 subsignal joined #salt
03:15 flowstate joined #salt
03:18 angvp joined #salt
03:24 dh__ joined #salt
03:31 netjak joined #salt
03:37 iggy smcquay: can you paste the code (for the module and the sls files)?
03:37 iggy and the command(s) you're running to test
03:52 toastedpenguin joined #salt
04:09 DEger joined #salt
04:14 flowstate joined #salt
04:32 netjak joined #salt
04:47 netjak joined #salt
05:03 netjak joined #salt
05:16 flowstate joined #salt
05:20 noraatepernos joined #salt
05:27 sjmh joined #salt
05:30 Sylvain31 joined #salt
05:32 felskrone joined #salt
05:34 noraatepernos joined #salt
05:35 Sylvain31 hi, I've a pillar dependancy setting up postfix + mysql + dovecot using formulas. I need to have mysql password in dovecot pillar, and also mysql password in some custom state for postfix. I've duplicate code for fetching postfix user in both place. I don't know yet how to organize, to have: single code place for reading mysql for postfix, distinct password for different minion, having access to both pillar and
05:35 Sylvain31 state to the jinja code to load mysql parameters…
05:40 rem5 joined #salt
05:42 rdas joined #salt
05:51 smcquay iggy: I can't, but I can try to approximate it.
05:52 smcquay but I'll try to piece something together.
05:52 watersoul joined #salt
05:52 brent_ joined #salt
05:58 iggy smcquay: `salt '*' foo.bar` (no salt on the command line)
05:59 wangofett joined #salt
05:59 iggy and in the sls file, you should probably use {{ salt['foo.bar']() }}
06:00 impi joined #salt
06:01 smcquay iggy: https://gist.github.com/smcquay/2eb5c7d33a3bd921463b21d0e8628ac6
06:01 smcquay oh no salt!
06:01 kshlm joined #salt
06:02 smcquay ha, I can see it now, I just need to figure out how to pass it an array. but it recognizes its existence. thanks.
06:03 iggy array?
06:03 iggy list? dictionary?
06:06 smcquay list, my good friend
06:06 smcquay but it's fine. it's working now. thanks for the help :D
06:08 smcquay ha, as a string. classic.
06:08 noraatepernos joined #salt
06:08 smcquay thanks iggy
06:13 lungaro joined #salt
06:15 toanju joined #salt
06:16 flowstate joined #salt
06:21 dmaiocchi joined #salt
06:22 noraatepernos joined #salt
06:23 DEger joined #salt
06:24 Sylvain31 does an include: in a pillar sls file at the top, ensure that the related pillar is loaded and will be available with salt['pillar.get']('key') %} ?
06:28 POJO joined #salt
06:29 dmaiocchi joined #salt
06:33 colegatron joined #salt
06:39 KermitTheFragger joined #salt
06:57 manji joined #salt
07:03 wm-bot4 joined #salt
07:10 noraatepernos joined #salt
07:11 manji joined #salt
07:15 rsys joined #salt
07:15 flowstate joined #salt
07:18 POJO joined #salt
07:19 dmaiocchi joined #salt
07:24 noraatepernos joined #salt
07:32 Sylvain31 nope, it doesn't seem to work. {% import_yaml "mta/mysql_config_" ~  minion ~ ".sls" as inc %} can to the trick but it becomes confusing…
07:33 hemebond Sylvain31: No, you can't reference Pillar data in pillars.
07:33 hemebond Some caveats, but generally no.
07:33 hemebond The caveat being external Pillars which seem, sometimes, to be available.
07:35 cyborg-one joined #salt
07:35 Sylvain31 hemebond: "somtimes"… ;) just for a single password, it becomes a major change for me… ext_pillar, seems hard to debug as I tryed until now…
07:36 hemebond I just use Jinja variables for shared properties.
07:36 hemebond *shared data.
07:36 kawa2014 joined #salt
07:36 hemebond {% import_yaml "globals.yml" as g %}
07:38 noraatepernos joined #salt
07:39 Sylvain31 tooks me 4 hours to end to that too… :\
07:41 Sylvain31 hemebond: so do you also minion select, via jinja conditionnal, into globals.yml?
07:42 hemebond minion select?
07:42 Sylvain31 {% set minion =  salt['grains.get']('host') %}
07:42 hemebond There's no logic in my globals.yml.
07:42 Sylvain31 {% import_yaml "mta/mysql_config_" ~  minion ~ ".sls" as inc %}
07:43 hemebond I use the top.sls to apply Pillars.
07:44 Sylvain31 me too, but in this case the minion specific value is not available yet as I understand (mysql minion specific password)
07:45 hemebond In that case I'd just use the minion ID in a dict and reference it.
07:46 hemebond Your import_yaml should work though.
07:47 kaushal_ joined #salt
07:48 Sylvain31 oh, OK. it works, in fact, it just becomes confusing I feel…
07:49 hemebond It seems a tad fragile.
07:49 hemebond Why not just include the file in the top.sls?
07:50 hemebond You might be able to just apply it via top.sls and have it merge the values for you.
07:50 hemebond Depends, of course, on how complex the data is.
07:50 Sylvain31 as said, it is. but the value seems not available in jinja, for generating pillar side config with a common mysql user for dovecot formula, here…
07:52 hemebond Sorry, I'm confused why it wouldn't be available.
07:52 Sylvain31 such pillar side tricks becomes really strange…
07:52 hemebond When I say apply I just mean apply, not include or import.
08:02 rdas joined #salt
08:03 Sylvain31 http://paste.debian.net/778661/
08:04 tuxick i need 2 bits concatenated with contents_pillar, what's the syntax for that?
08:06 Sylvain31 tuxick: in jinja?
08:06 noraatepernos joined #salt
08:07 tuxick no, preferably not
08:07 tuxick i thought maybe - contents_pillar: |
08:07 tuxick but that doesn't work
08:07 tuxick which makes sense :)
08:08 babilen tuxick: You would have to concatenate it in the pillar, or simply provide a template in the file.managed state source that does the right thing to begin with
08:08 tuxick that's a bit of a pain then
08:09 tuxick since i already hav to paste ssl certs into pillar file
08:09 tuxick don't want to have to do that twice
08:09 babilen content_pillar is essentially using a template like "{{ salt['pillar.get'](VALUE_OF_CONTENT_PILLAR) }}"
08:09 tuxick yes, so i don't see why not do that twice
08:09 babilen Shouldn't be too much pain to provide a template with "{{ salt['pillar.get'](VALUE_OF_CONTENT_PILLAR) }}{{ salt['pillar.get'](VALUE_OF_CONTENT_PILLAR2) }}"
08:10 tuxick well i'm rather new to salt but if that's the way i'll figure it out
08:10 tuxick was hoping for a simple way
08:11 babilen What's not simple about that template? The whole fact that you do need a pillar?
08:11 babilen err
08:11 babilen template
08:12 tuxick actually, what i really wanted was having the ssl certs/keys stored as files in pillar
08:12 babilen I mean you could use contents if you don't want a template
08:12 tuxick but that turned out too much to ask
08:12 babilen There's the file_tree pillar module, but it unfortunately conflates targeting and data
08:12 tuxick yes, i tried that but failed
08:13 babilen contents?
08:13 babilen How did it fail?
08:13 tuxick no file_tree
08:13 tuxick anyway, how'd i use contents?
08:13 babilen It's in the documentation
08:13 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed → contents
08:14 tuxick uhm but then i'ts not in /srv/pillar?
08:14 babilen What isn't?
08:14 tuxick the certs
08:14 babilen How so?
08:14 babilen You can easily perform pillar lookups in states
08:14 tuxick meh this whole terminology giving me headache
08:15 keimlink joined #salt
08:15 tuxick well file_tree was failing on me
08:15 babilen "You can frobnicate the pillar bajiggle in the state wajig"
08:15 flowstate joined #salt
08:15 tuxick exactly!
08:15 tuxick i knew it!
08:16 noraatepernos joined #salt
08:17 babilen But what I meant is that you can perform pillar lookups to fill the contents argument
08:17 tuxick anyway, last week spent a lot of time figuring out how to keep certs in files and ended up pasting into an sls in /srv/pillar
08:17 tuxick seems everybody does that
08:17 impi joined #salt
08:17 babilen (where "pillar lookup" == "salt['pillar.get'](K, DEFAULT)"
08:18 tuxick yes, that's what contents_pillar does, no?
08:18 babilen You could write a very simply in Python that reads certs from a given directory on your master and returns a dictionary populated with it
08:18 tuxick hmm ye maybe next week :)
08:19 tuxick anyway long story short: i can't simply concatenate using contents_pillar
08:19 DEger joined #salt
08:19 babilen It would, essentially be "return {{'ssl': {FILENAME_FROM_OS_WALK: file.read()}}"
08:19 ronnix joined #salt
08:19 babilen (with open(FILENAME_FROM_OS_WALK) and os.walk around it)
08:20 tuxick i'm also new to python :)
08:20 babilen I mean look at file_tree and essentially remove the horrible targeting bit
08:20 tuxick that's a plan!
08:20 tuxick ok that might be proper starting point
08:20 babilen That way you can target your "special" pillar to the minions you want.
08:21 tuxick yes good idea
08:21 tuxick i've found *lots* of posts/threads from people having exactly same problem
08:21 s_kunk joined #salt
08:21 tuxick pasting certs into sls with something to fix indendation is just annoyingly silly
08:22 babilen Yeah, I complained about it some time ago and am very very annoyed that file_tree appeared as it conflates targeting and pillar storage. You would still want a pillar top.sls and an arbitrary filesystem structure in which directories are levels in the namespace
08:23 tuxick ok, i'll see if i can spend little enough time on it to keep boss from complaining :)
08:23 babilen But then .. you might even prefer to keep them in hashicorp vault and access that directly
08:23 tuxick i'm supposed to pick up python anyway
08:23 tuxick never heard of hashicorp
08:23 AndreasLutro tuxick: contents_pillar: {{ (pillar.value1 ~ pillar.value2) | json }}
08:23 tuxick ooh
08:24 tuxick that'd be nice
08:24 babilen AndreasLutro: Wouldn't that just use pillar.value1 ~ pillar.value2 as lookup key into the pillar?
08:24 AndreasLutro erm sorry
08:24 AndreasLutro I meant just contents:
08:25 babilen (which is why I suggested contents earlier)
08:25 AndreasLutro still waking up
08:25 * babilen coffees AndreasLutro
08:28 tuxick hmm, writing custom pillar module is not same as for example _state/ ?
08:30 AndreasLutro not quite
08:30 AndreasLutro just look up external pillars in the docs
08:31 tuxick ye ran into that
08:31 tuxick so ext_pillar is indeed the way?
08:32 tuxick ooh those of course won't have to be distributed to minions, like with the state and execution modules :)
08:34 KingJ joined #salt
08:43 jcalero joined #salt
08:45 av_ joined #salt
08:54 noraatepernos joined #salt
08:55 fredvd joined #salt
08:57 hemebond Sylvain31: I would move the passwords and stuff to something like a globals.yml and then use the variables.
08:58 Elsmorian joined #salt
08:59 fannet joined #salt
08:59 hemebond Sylvain31: Actually, there are a few ways you could do this that would make it tidier I think.
09:02 lero joined #salt
09:04 noraatepernos joined #salt
09:05 Sylvain31 hemebond: having a password into yaml file is what I've done somewhat until now, but on that precise example I had to rediscorver it, as we fall agree (I dont know if it make sens to say that) on the same solution too. ;)
09:06 hemebond Sylvain31: Is that paste you linked to what you have now or what you had before?
09:09 Sylvain31 hemebond: it is the current config, I will do a thrid one, will will the same for all 3 place I need the information: mysql (pillar), postfix (state), dovecot (pillar) with a common yaml file which will also select minion's id for distinct password by minion…
09:09 N-Mi joined #salt
09:13 Hydrosine joined #salt
09:13 noraatepernos joined #salt
09:13 losh joined #salt
09:14 linjan joined #salt
09:14 flowstate joined #salt
09:35 Sylvain31 hemebond: http://paste.debian.net/778823/ some minor changes, the minion id selection is made in the yaml file for pillar side fetching data in jinja, not too bad but somewhat confusing in the yaml, for usage else where quite simple. I extended postfix pillar with some copy of the mysql user, to be able the use the same pillar for the mysql formula and to name the database user, here it is 'postfix' fixed in
09:35 Sylvain31 the yaml.
09:36 remyd1 joined #salt
09:37 Hybrid1 joined #salt
09:39 remyd1 Hi; Is there a way to check/syncrhonize gitfs content to salt storage ? I made a subfolder in my salt rootfs named "gitrepos" which should be populated by my gitfs as described by salt documentation: https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#gitfs-per-remote-config
09:39 remyd1 However this subfolder is still empty, but there is nothing in my salt logs and I know that my salt user is allowed to pull from git (manual checked)
09:42 hemebond Sylvain31: Looks pretty good to me :-)
09:47 Sylvain31 tooks me so long to achieve this so simple common password trick, pillar side stuff are the rude part, on state side it becomes easy… ;)
09:48 yidhra joined #salt
10:00 CeBe1 joined #salt
10:01 noraatepernos joined #salt
10:02 pppingme joined #salt
10:04 jcalero joined #salt
10:12 west575_ joined #salt
10:14 flowstate joined #salt
10:19 bluenemo joined #salt
10:27 pppingme joined #salt
10:34 sfxandy joined #salt
10:37 bluenemo joined #salt
10:40 noraatepernos joined #salt
11:03 manji joined #salt
11:04 amcorreia joined #salt
11:09 _JZ_ joined #salt
11:13 noraatepernos joined #salt
11:13 flowstate joined #salt
11:26 Ztyx joined #salt
11:39 cmek joined #salt
11:42 sfxandy hi everyone.  quick question, is there a builtin dictionary (seem to remember 'config' or 'opts' maybe?) that let you access salts configuration settings from within state file?
11:45 flowstate joined #salt
11:46 babilen sfxandy: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.config.html#salt.modules.config.get typically comes in handy
11:48 tperale 0Hi, I've also a question when I try to install nfs-kernel-server (ubuntu server) I get a "failed to install/update" error. Do you have any idea where it come from, thank you !
11:53 pcn tperale try to run 'apt update' on the system, and see what the underlying error message is.
11:54 ixeous joined #salt
11:58 tperale pcn: Yes I tried it change nothing, here is the error message https://gist.github.com/anonymous/6ad312cb5918dbc07b255c13f95f1c9b
12:00 DammitJim joined #salt
12:01 AndreasLutro tuxick: check your minion logs
12:02 tuxick ?
12:04 Sylvain31 any salt regexp replace function callable in jinja?
12:05 TyrfingMjolnir joined #salt
12:05 AndreasLutro sorry tuxick, wrong highlight
12:05 tuxick ah ok :)
12:05 AndreasLutro tperale: check your minion logs
12:10 sfxandy cheers babilen, thats exactly what i was after.  couldnt for the life of me remember what the dictionary name was
12:12 babilen sfxandy: yw :)
12:12 bluenemo joined #salt
12:19 tperale AndreasLutr: Here are the logs https://gist.github.com/anonymous/436aa5a3a02d8be6307acd8546ae71fa
12:20 flowstate joined #salt
12:22 DammitJim joined #salt
12:22 west575 joined #salt
12:27 manji I have a question, on a salt-master I have ~13 minions
12:28 manji and I have on the salt-master ~17k open fds
12:28 manji is that normal ?
12:29 manji (that includes minion service on salt-master)
12:29 Sylvain31 tperale: a package problem, try to purge and reinstall
12:30 manji hmm 10k of them belong to salt-api
12:30 manji weird
12:30 tperale Sylvain31: Thank you I'll try that
12:36 jhauser joined #salt
12:37 zer0def uh, anyone has ideas on how to pass additional parameters to service states?
12:38 zer0def aside from the obvious `cmd.run` with `unless`
12:38 flowstate joined #salt
12:39 zer0def my goal is to achieve an invocation equivalent to `service <service-name> <op> [<key1>=<val1>]`
12:46 gh34 joined #salt
12:52 subsignal joined #salt
12:54 subsigna_ joined #salt
12:56 deniszh joined #salt
12:58 tuxick "failed: could not found expected ':'"
12:58 kawa2014 joined #salt
12:58 tuxick it's broken english and i've seen it enough today :)
12:59 monkeybox zer0def: maybe use a custom module?
13:00 rdas joined #salt
13:09 edrocks joined #salt
13:10 blarghmatey joined #salt
13:13 jcalero joined #salt
13:27 ronnix joined #salt
13:30 zer0def monkeybox: if anything, this is such a specific case, i'd probably expand the existing one
13:33 tristianc_ joined #salt
13:35 rem5 joined #salt
13:35 gngsk joined #salt
13:36 POJO joined #salt
13:40 turnagwf joined #salt
13:41 shanesveller joined #salt
13:41 turnagwf Anyone ever seen this error?: Failed to checkout master from git_pillar remote 'file:///app001/git/salt': Invalid data in index - insufficient buffer space
13:43 turnagwf Just logged in this morning with that filling up the logs, and highstates not working. =/
13:43 AndreasLutro I'd stop the salt-master, rm -rf /var/cache/salt, and restart
13:43 barmaley joined #salt
13:44 impi joined #salt
13:45 turnagwf I did run a salt-run cache.clear_all, I'll give that a try
13:47 turnagwf sweet that worked! thanks
13:48 AndreasLutro the shotgun method, alwasy successful
13:51 west575_ joined #salt
13:52 vadimck joined #salt
13:57 racooper joined #salt
13:58 kshlm joined #salt
13:59 bluenemo joined #salt
14:01 iceyao_ joined #salt
14:11 Slimmons joined #salt
14:11 bowhunter joined #salt
14:15 rem5_ joined #salt
14:17 pid1 joined #salt
14:17 drawsmcgraw joined #salt
14:18 ajv joined #salt
14:21 barmaley joined #salt
14:22 blue0ctober joined #salt
14:28 mackripe_ joined #salt
14:29 vilitux joined #salt
14:32 hasues joined #salt
14:33 hasues left #salt
14:33 tawm04 joined #salt
14:35 deniszh joined #salt
14:35 mackripeum joined #salt
14:37 ajv joined #salt
14:41 flowstate joined #salt
14:41 Brew joined #salt
14:42 inad922 joined #salt
14:43 rdas joined #salt
14:45 treaki joined #salt
14:48 Hydrosine joined #salt
14:48 deniszh1 joined #salt
14:54 manji joined #salt
14:54 impi joined #salt
14:55 manji joined #salt
14:59 mohae_ joined #salt
14:59 corichar joined #salt
15:05 sjmh joined #salt
15:06 rem5 joined #salt
15:09 jrklein joined #salt
15:10 cb joined #salt
15:18 stanchan joined #salt
15:20 beardedeagle joined #salt
15:27 debian112 joined #salt
15:36 dmaiocchi joined #salt
15:38 rem5 joined #salt
15:38 rem5_ joined #salt
15:40 kbaikov joined #salt
15:51 tapoxi joined #salt
15:54 flowstate joined #salt
15:54 ajw0100 joined #salt
15:56 spuder joined #salt
16:12 bltmiller joined #salt
16:14 rem5 joined #salt
16:14 klaas joined #salt
16:16 sjmh joined #salt
16:37 totte joined #salt
16:38 nZac joined #salt
16:39 shanesveller is anyone using salt-cloud's joyent driver with self-hosted SDC (aka Triton)? If so, any gotchas to be aware of?
16:39 woodtablet joined #salt
16:49 bltmiller joined #salt
16:51 woodtablet Looking to bounce some ideas off for a Salt Pillar Organization question.. So right now I have at least three pillar dictionaries for groups of machines, machine roles, and user groups. In stead of writing formulas to look into each of these pillars, I was thinking of writing a state that combines these pillars into a pillar that applicable to the minion running. Similar to the Lookup dictionary, and run this state file at the top of the top.
16:52 deniszh joined #salt
16:54 Lionel_Debroux joined #salt
16:58 eichiro joined #salt
16:58 s_kunk joined #salt
17:02 ajv joined #salt
17:02 kunersdorf joined #salt
17:08 stomith joined #salt
17:10 onlyanegg joined #salt
17:11 west575 joined #salt
17:12 MTecknology salt-vim makes crap way too easy to edit. I keep pressing keys that it already pressed for me.
17:14 zzzirk joined #salt
17:16 Trauma joined #salt
17:16 lero joined #salt
17:16 bltmiller joined #salt
17:21 tuxick ye very nice
17:24 rem5 joined #salt
17:35 ageorgop joined #salt
17:36 nate_c joined #salt
17:41 ajv joined #salt
17:44 snarfy^ joined #salt
17:45 jenastar joined #salt
17:46 snarfy^ anyone with a lot of git.latest experience? I can't seem to get it to work more than once. all I want is the latest revision of a specific branch
17:46 snarfy^ seems like this ought to be rather simple. deploying the latest code from a branch seems like an obvious use case
17:47 snarfy^ "Cannot setup tracking information; starting point 'origin/branch' is not a branch."
17:49 TooLmaN joined #salt
17:53 nZac joined #salt
17:55 felskrone joined #salt
17:56 rem5 joined #salt
17:59 flowstate joined #salt
18:01 renaissancedev joined #salt
18:02 amcorreia joined #salt
18:05 ronnix joined #salt
18:05 dyasny joined #salt
18:06 flowstate joined #salt
18:07 dmaiocchi joined #salt
18:07 sjorge joined #salt
18:10 Elsmorian joined #salt
18:13 monkeybox Is there a returner that will just output the json to a file?
18:14 monokrome joined #salt
18:14 patrek joined #salt
18:18 bltmiller monkeybox: you could just pipe the output to a file if that's what you're asking
18:19 bltmiller or what about the --out-file option?
18:20 bltmiller this works: salt --out=json '*' test.ping --out-file=ping.txt
18:20 monkeybox That relies on the user to do it. If I was able to do it in a returner, I know I have a log.
18:20 KyleG joined #salt
18:20 KyleG joined #salt
18:21 Edgan joined #salt
18:21 bltmiller ahh ok I see. seems I'm unfamiliar with returners. reading up now :)
18:23 bltmiller even then though, using --return relies on a user to add that flag, no?
18:24 gngsk_ joined #salt
18:24 monkeybox If I'm understanding correctly (and I'm new to them too), I can specify that in the master config.
18:24 monkeybox Though my test with '--return local' doesn't seem to be doing what I expected.
18:25 monkeybox oh, I think I know why...
18:25 bltmiller hmm. looks like local returner is the default action
18:25 bltmiller as in, just returns output to console
18:26 ageorgop joined #salt
18:26 bltmiller and the Slack returner, for instances, does have a config on the master that contains values for the API key, channel, user and such (https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.slack_returner.html)
18:26 bltmiller s/instances/instance/
18:28 bltmiller maybe this is what you need? https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.syslog_return.html
18:28 blueelvis joined #salt
18:29 flowstate joined #salt
18:29 liskl joined #salt
18:30 amcorreia joined #salt
18:30 monkeybox yeah... Looked at that one, but it appends all sorts of syslog stuff. Looks like writing my own may be trivial... though, probably mroe complex if I want it to be threadsafe.
18:31 TooLmaN joined #salt
18:33 felskrone joined #salt
18:33 bltmiller I guess it's worth asking my personal favorite question of what are you actually trying to accomplish
18:33 bltmiller because maybe tweaking logging settings will get you what you actually need: https://docs.saltstack.com/en/latest/ref/configuration/logging/
18:35 monkeybox I do like that question. I'm trying to find a way to import the job results into splunk without using a heavy forwarder. We want a log of what's been run against each minion and what the results were.
18:36 monkeybox Easiest way to get data into splunk is to give it a raw file... There's a custom returner for splunk in teh dev branch, but it seems like overkill.
18:36 iggy you'd have to set it on the minion too
18:36 iggy the master config wouldn't impact the output on the minions
18:36 bltmiller https://docs.saltstack.com/en/develop/ref/returners/all/salt.returners.splunk.html
18:37 monkeybox bltmiller: that forwarder requires an http event collector. I'd like to forego that.
18:37 bltmiller gotcha
18:38 monkeybox iggy: won't event_return() get called on the master with the data returned from the minion?
18:38 colegatron joined #salt
18:39 toanju joined #salt
18:40 iggy you'd have to use a different master job cache
18:40 iggy which means you likely wouldn't be able to use the normal job functions
18:46 Llmiseyhaa urrrrrgh this git+branches+top bug is really starting to kill me.  I really wish I could get them to buy support, but I need a working solution first... on the verge of just giving up on gitfs all together, seems almost as broken as when my previous job insisted I try svnfs
18:47 POJO joined #salt
18:48 iggy we dropped it at a $last_job
18:48 iggy mostly because we couldn't decouple the refresh timer from the 1 minute salt scheduler loop
18:49 iggy we had already solved the problem of shitty environment merging by moving to multiple masters
18:49 Llmiseyhaa They push it as such a big, awesome feature but... argh it's just, well, frustrating.  I could probably make that timer problem go away with a push from the git side on commit, firing an event with a reactor hanging on that... but yeah the env stuff is just annoying.
18:50 racooper joined #salt
18:52 gngsk Llmiseyhaa: Is there a github issue for the bug you're running in to? I think we're experiencing it too and I'd like to have something to look at and or reference.
18:52 Llmiseyhaa and for me it's not even a problem merging, it's just plain acting like the files _don't_exist_. )=
18:52 Llmiseyhaa and... yeah, give me a moment
18:53 Llmiseyhaa Here's the closest to my problem: https://github.com/saltstack/salt/issues/30434
18:53 saltstackbot [#30434][OPEN] highstate doesn't work with multiple environment | my top.sls contains 'base' and 'live'. The base section is the first one. When I run the 'salt-call state.highstate' only 'base' section will be set. The 'salt-call  state.highstate saltenv=live' returns with:...
18:53 iggy there are numerous bugs about gitfs and environments (and some with both)
18:53 subsigna_ joined #salt
18:53 sjorge joined #salt
18:55 Llmiseyhaa so disappointing... kind of wish I hadn't suggested salt at this point.  >..<  It's beautiful and wonderful but it sure seems like lots of their major features just don't really quite work
18:55 iggy I wouldn't say lots
18:56 iggy I guess it depends on what features you are interested in
18:56 iggy I mean I've used puppet and chef professionally before... I wouldn't trade salt for either one of those
18:56 iggy but yeah, knowing what you can and can't rely on is helpful info
18:58 Llmiseyhaa Alright... in that vein, basically anything at all having to do with environments and with anything other than roots for the salt:// storage is busted?
19:00 babilen Llmiseyhaa: Environments are broken. Didn't I suggest about a week ago to just not use them, but use a distinct master per branch/env ?
19:00 Llmiseyhaa You did, I'm just confirming.
19:00 Llmiseyhaa Because I've been fighting it and active accepted bugs gave me some hope.
19:01 babilen We've been using GitFS quite happily though (no environments, they just are painful)
19:01 Llmiseyhaa well, with us using branches in our git, that means gitfs is off the table since it automagically creates environments based on the different branches... so, yeah.  Bailing on gitfs too
19:01 sjorge joined #salt
19:01 iggy I wouldn't use environments at all (not even with file_roots)
19:02 Llmiseyhaa ok
19:02 babilen Yeah, the branch == environment thing is a huge pain in the arse
19:06 monkeybox iggy: fwiw, I was able to do what i wanted by using "event_return = file" in my master config, and writing a custom returner, with no effect on the master_job_cache.
19:06 |_[O_O]_| is there a reason the documentation doesn't reference the broken nature of this functionality? It bit me a couple weeks ago, and it would of been nice to know it was a futile effort before banging my head against a wall for a few days ;)
19:06 TooLmaN joined #salt
19:06 bltmiller joined #salt
19:09 * |_[O_O]_| ponders writing documentation for all the things I wish my application did correctly ;D
19:09 west575_ joined #salt
19:16 sjorge joined #salt
19:16 netjak joined #salt
19:16 monkeybox |_[O_O]_|: I think that's just a side effect of a relatively new and rapidly evolving project.
19:17 |_[O_O]_| you know my flask app does time travel - just drop "time_travel: true" into the config :D
19:18 netcho joined #salt
19:18 netcho joined #salt
19:18 netcho joined #salt
19:21 sjorge joined #salt
19:24 Llmiseyhaa hrm, with gitfs_env_whitelist: - master and - base: master under the gitfs_remotes setting, would that strip out the environments/etc effectively?  Trying that one last time to be sure, but still getting empty top files
19:31 marie1972 joined #salt
19:37 subsignal joined #salt
19:39 * Llmiseyhaa just... fricking... wants to cry
19:40 Llmiseyhaa I've stopped/deleted cache/restarted every fricking minion, with the master stopped the whole time, cleaned out its cache, reconfigured it for single gitfs branch... aaaaaaaaand still nothing at all in state.show_top or pillar.items
19:40 Elsmorian joined #salt
19:41 yomateo joined #salt
19:42 tmkerr joined #salt
19:42 renoirb joined #salt
19:43 linjan joined #salt
19:47 pranav joined #salt
19:51 iggy Llmiseyhaa: what about cp.list_master?
19:52 Llmiseyhaa trying now
19:53 Llmiseyhaa empty
19:53 iggy that could be a problem
19:53 Llmiseyhaa yeah
19:53 Llmiseyhaa and there are no errors with it hitting gitfs in at least debug.  I guess I should turn on trace but ugh...
19:54 rem5 joined #salt
19:54 monkeybox syntax error in top.sls?
19:54 Llmiseyhaa not that I see?
19:54 Llmiseyhaa base:\n  '*':\n    - ars.service
19:55 monkeybox Seems pretty straightforward.
19:56 iggy even with syntax errors, cp.list_master would show files
19:56 Llmiseyhaa yeah and the logs don't give me anything useful... gitfs seems to be working fine, I've tried stopping salt-master, deleting all the gitfs cache stuff, and starting it back up.
19:56 Llmiseyhaa and I can access git from the box... the pillar side's working, for example, finally.
19:57 rem5 joined #salt
19:58 manji joined #salt
19:59 monkeybox Super cool thing about using event_return now that it's finished is I can get results from minions that timed out during the call.
19:59 iggy you can get that from the normal job commands too
19:59 impi joined #salt
20:02 monkeybox Right you are.
20:04 Llmiseyhaa hrrrm... pygit2 0.20.3, and I don't see a pygit in the saltstack yum repo so I think that's the right one, or at least, should work
20:07 Llmiseyhaa short of nuking and reinstalling the boxes (which, after I've already done the stop everything, delete all appropriate cache files, start everything dance... seems like it's pointless)... yeah, gitfs seems entirely busted.
20:23 nidr0x joined #salt
20:23 impi joined #salt
20:25 Llmiseyhaa got it.
20:26 Llmiseyhaa the env whitelist variable?  Uses the mapped name not the original name, in the case where you are mapping something else to base
20:26 Llmiseyhaa ... that's... incredibly non obvious
20:26 nidr0x joined #salt
20:39 netcho joined #salt
20:39 netcho joined #salt
20:39 netcho joined #salt
20:39 shanesveller is there any significant (dis)advantage to nesting multiple related states under the same top-level YAML key as seen here? https://docs.saltstack.com/en/latest/topics/tutorials/cloud_controller.html
20:39 shanesveller stylistically I think I like it better, but I see almost as many samples with one top level key (containing a more humanized name) per state instead
20:40 shanesveller I guess you'd just have to take extra care that you declare them in the proper order or with the correct `require`s, etc.
20:46 stanchan joined #salt
20:49 iggy Llmiseyhaa: PR a doc improvement (or at the very least open a ticket)
20:56 debian112 joined #salt
20:57 saltymcsalterson joined #salt
20:58 snarfy^ joined #salt
20:58 saltymcsalterson Hey, what's a good option for getting detailed logging on changes that will occur on the minion as they are detected?
20:59 hemebond saltymcsalterson: You mean like test=True?
21:00 saltymcsalterson hemebond: Nah.  I think that waits until the end to report?  I would like to see the output as it occurs.
21:01 hemebond Oh, you want to see progress when applying updates?
21:01 hemebond *applying changes?
21:01 saltymcsalterson As they apply, yes.
21:02 hemebond Nothing that I know of except maybe tailing the minion log :-)
21:02 TyrfingMjolnir joined #salt
21:03 saltymcsalterson hrmm.  Any effective way of getting access to the minion log from the master?
21:03 hemebond Not that I can think of.
21:03 saltymcsalterson drats.  :-)
21:10 rem5 joined #salt
21:13 Tyrm joined #salt
21:14 babilen saltymcsalterson: Log into the minion and run "salt-call -ldebug state.highstate"
21:16 saltymcsalterson babilen: yea, I'm guessing I might just have to scrape the world w/ rundeck or something.  Not having active feedback from the minion is making me sad.
21:18 hemebond saltymcsalterson: Why do you need real-time feedback?
21:21 KajiMaster joined #salt
21:21 saltymcsalterson long running highstates while doing deployments are causing some of the ops team to get a bit twitchy, so they want to see what's occurring as it happens.
21:22 catpig joined #salt
21:23 iggy that's not how salt is designed
21:24 hemebond What are they going to do if they see something in the progress they don't like? Kill the server?
21:24 hemebond Sounds like they'd be okay doing that salt-call thing if they really want to watch things as they happen.
21:28 perfectsine joined #salt
21:31 babilen saltymcsalterson: You really shouldn't sit there an watch your highstate anxiously. It's best to just run them and check if they succeeded. You just can't watch it if you run it against hundreds/thousands of minions
21:32 babilen Just test enough before you deploy .. and then check it in for all minions. They'll be fine.
21:32 saltymcsalterson babilen: yea, true.  Then perhaps this should be about emitting an error message in the case of an error on the minion.
21:32 babilen You'll get that at the end
21:33 iggy use failhard: True and you get it sooner
21:33 babilen (but then states won't run even though they might have succeeded)
21:33 saltymcsalterson iggy: what kind of state will the box be in if you failhard?
21:33 iggy depends
21:33 babilen "half applied highstate"
21:33 saltymcsalterson right.
21:34 hemebond saltymcsalterson: Are you running scripts or something?
21:34 iggy I don't know your requirements or setup, I'm just throwing out ideas
21:35 saltymcsalterson hemebond: yea, I'm running a myriad of things.  App deploys, pkg installs, etc. etc.  Depending on the state of the machine and the pkgs getting pushed, it could be quite a while before the error gets back.
21:35 hemebond saltymcsalterson: Well, even if it stops, it should be able to continue where it left off once you fix the error.
21:35 babilen Well, run a highstate once, sort out errors and you'll have a defined state against which you can test
21:36 babilen Or just start with a newly provisioned instance to begin with and just test your states on a test VM until it works
21:37 saltymcsalterson Yea, I mean, these are all the things that I do when I'm testing and dev'ing my states, but once it's in the hands of my ops team, they're the ones that are clamoring for more intel.
21:38 hemebond I like the salt-call idea until they become more comfortable with the default Salt method.
21:39 saltymcsalterson ahh, yea, that's an idea.  I guess really it's a matter of getting them to be comfortable.
21:41 artemz joined #salt
21:41 yomateo communicating  with adjusted verbosity based on a "prod support" arm of ops vs. "tier 1 engineers" is a skilled task -x
21:42 yomateo well, communicating without wasting your own time on documentation over configuration options and/or code itself
21:44 babilen saltymcsalterson: From my experience this is primarily a social problem and one where some of your colleagues have to adjust to deployment that is done before the first command is executed on a box. I'm sure that once they see that a "highstate" is not evil and they grow accustomed to testing their changes beforehand you'll won't have to deal with the "have to have real time report" requests
21:45 babilen saltymcsalterson: And if they really want it show them salt-call, but that might establish bad habits. You really want to be in a position where you can run "salt '*' state.highstate" whenever you like without breaking *anything*
21:46 babilen We had an ops guy who wasn't really comfortable with the whole "everything at once" concept and who took a while to switch from applying single states/SLS with state.sls/state.apply to state.highstate
21:47 babilen The whole "If a minion is is in state FOO I have to do BAR, while I would do QUUX if ...."
21:48 hemebond idempotency
21:48 hemebond Wonderful thing.
21:50 rem5 joined #salt
21:51 lws joined #salt
21:56 Elsmorian joined #salt
21:56 Llmiseyhaa Hrm, anyone mind taking a look at my defaults.yaml/map.jinja and then the pillar I defined?  I'm seeing behavior that seems to indicate something other than what I understood from the docs
21:56 Llmiseyhaa https://gist.github.com/iacapps-arutledge/fde0322cf056618e0723ea0bddc76e60
21:57 Llmiseyhaa behavior I'm seeing is that the ars.sls file is setting jar as appropriate, but then it's like none of the others get set at all despite using that pillar.get merge function
21:57 hemebond Llmiseyhaa: Your ars in ars.sls is a list, but in defaults is a dict.
21:58 hemebond That's what it looks like to me anyway.
21:58 hemebond I'm not that familiar with merging.
21:58 Llmiseyhaa Hrrrm.  Well, that's a thought... thanks (=
22:01 Elsmorian joined #salt
22:04 subsignal joined #salt
22:04 Elsmorian joined #salt
22:05 manji joined #salt
22:05 brent_ joined #salt
22:06 Elsmorian joined #salt
22:08 Llmiseyhaa Yup you were right, hemebond (=
22:10 hemebond :thumbsup:
22:13 Tyrm_ joined #salt
22:14 flowstate joined #salt
22:20 Llmiseyhaa hrm, anyone know whether I have to quote a percentage when using say - batch: 10% in an orchestration sls?
22:20 Llmiseyhaa I'm guessing I should shove quotes around it but I dunno
22:20 hemebond Llmiseyhaa: I use http://yaml-online-parser.appspot.com/ to test how YAML might parse things.
22:21 Llmiseyhaa ooooh thjanks!
22:21 hemebond The % should make it all a string, but you never know.
22:21 hemebond I know if a leaf (the value) is a pure number it can be parsed as a number; at least in Salt.
22:22 Llmiseyhaa ok looks like I don't actually have to put "s around it but it doesn't hurt
22:22 toastedpenguin joined #salt
22:27 Joe630 left #salt
22:33 zenlot joined #salt
22:47 Bryson joined #salt
22:54 ahammond anyone here successfully running salt-master on Ubuntu 16.04?
23:00 iggy I don't know why it wouldn't
23:01 woodtablet anyone know how to copy and run 2 scripts with salt-cloud deploy ? instead of one ? ( currently trying to register to satellite then run the salt install bootstrap)
23:01 iggy woodtablet: pretty sure that's not possible
23:01 iggy you can write your own bootstrap script (or concat the 2 you have maybe)
23:01 woodtablet iggy: ya, i thought so, it didnt look like a multi-value field
23:02 woodtablet iggy: thats what i am about to try next, the 2 bootstrap scripts are big, but going to give it a shot
23:03 woodtablet iggy: can i bother you for a comment on my organizaional question earlier from around 9:50am ?
23:03 iggy I read it, I had no input
23:04 woodtablet iggy: Thanks! Then I ll think its not an overly bad idea, and proceed with it lol
23:10 woodtablet hemebond: nice yaml parser, thanks!
23:10 hemebond woodtablet: I didn't make it or anything but I've found it darn useful for learning and understanding YAML.
23:11 hemebond Used it to double-check Salt patch for YAML anchors.
23:13 justanot1eruser joined #salt
23:14 linjan_ joined #salt
23:15 TOoSmOotH_ joined #salt
23:16 flowstate joined #salt
23:28 brent_ joined #salt
23:31 notnotpeter joined #salt
23:31 kevinquinnyo joined #salt
23:32 kevinquinnyo Inside a custom runner, what's the simplest way for me to return a list of minions by target glob
23:32 kevinquinnyo i know a dumb way to do it is to do something like minions = local.cmd(tgt, 'test.ping').keys()
23:32 kevinquinnyo but I'm assuming there's a better way
23:33 kevinquinnyo in the above, local is     local = salt.client.LocalClient()
23:33 netcho joined #salt
23:35 MikaT joined #salt
23:35 kevinquinnyo hm i just noticed salt.utils.minions <- looks like i might be able to get it using that pretty cleanly at first glance
23:49 kevinquinnyo hey how come salt-run myrunner.test outputter='json_out' is not printing json
23:51 rem5 joined #salt
23:51 KyleG Hey #salt
23:52 KyleG I'm trying to grab a specific interface name using the salt mine, I have some servers with different interface names but the same purpose and I'd like to be able to grab them.
23:52 KyleG I'm trying something like this:
23:52 KyleG mine_functions:
23:52 KyleG network.ip_addrs: ['em2','vmx2']
23:52 KyleG em2 seems to be picked up but not vmx2, am I doing this wrong?
23:59 fannet joined #salt
23:59 tristianc_ joined #salt

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