Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-09-28

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

All times shown according to UTC.

Time Nick Message
00:06 shadowsun joined #salt
00:23 Bryson joined #salt
00:24 joe_n joined #salt
00:40 lemur joined #salt
00:44 scoates joined #salt
00:45 kpoman joined #salt
00:52 seatan joined #salt
00:53 pravka joined #salt
01:02 catpigger joined #salt
01:03 aristedes joined #salt
01:03 aristedes left #salt
01:05 dendazen joined #salt
01:12 joe_n joined #salt
01:14 cube_box joined #salt
01:15 aqua^c joined #salt
01:20 otter768 joined #salt
01:31 thehaven_ joined #salt
01:31 illern joined #salt
01:33 ntropy_ joined #salt
01:35 shawnbutts_ joined #salt
01:36 canci_ joined #salt
01:36 iggy__ joined #salt
01:36 sixninetynine joined #salt
01:36 jfred_ joined #salt
01:36 viq_ joined #salt
01:36 eliasp_ joined #salt
01:36 Cerales_ joined #salt
01:36 [dee]_ joined #salt
01:36 asoc_ joined #salt
01:36 andreluiz joined #salt
01:36 Garo__ joined #salt
01:36 babilen_ joined #salt
01:36 charli joined #salt
01:36 joehh1 joined #salt
01:36 omenlabs_ joined #salt
01:37 lionel_ joined #salt
01:37 rhand_ joined #salt
01:37 mitsuhiko_ joined #salt
01:37 GothAck joined #salt
01:37 karlthane_ joined #salt
01:37 retr0h_ joined #salt
01:37 Kelsar_ joined #salt
01:37 Ouzo_12- joined #salt
01:37 Vye joined #salt
01:38 riftman1 joined #salt
01:38 EWDurbin_ joined #salt
01:38 ujjain joined #salt
01:38 ujjain joined #salt
01:38 Rebus joined #salt
01:38 sybix joined #salt
01:38 mschiff joined #salt
01:38 mschiff joined #salt
01:38 PuckD joined #salt
01:39 llua joined #salt
01:39 llua joined #salt
01:39 jor joined #salt
01:39 cliluw joined #salt
01:40 mnaser joined #salt
01:41 __number5__ joined #salt
01:41 iggy joined #salt
01:42 markizano joined #salt
01:45 ashmckenzie joined #salt
01:45 MK_FG joined #salt
01:45 danielcb joined #salt
01:45 sybix joined #salt
01:45 Ph-x joined #salt
01:45 Jarus joined #salt
01:45 rome_390 joined #salt
01:45 copelco joined #salt
01:45 JonGretar joined #salt
01:46 denys joined #salt
01:47 _ikke_ joined #salt
01:48 aRkadeFR joined #salt
01:48 Qwazerty joined #salt
01:48 beardo joined #salt
01:48 MaZ- joined #salt
01:48 peters-tx joined #salt
01:48 Nazca__ joined #salt
01:49 jeadre joined #salt
01:49 Ac-town joined #salt
01:53 iggy |_[O_O]_|: no, Salt's loader is different than the python loader, it doesn't support everything the python loader does
01:53 seatan joined #salt
01:55 marcinkuzminski joined #salt
01:59 catpiggest joined #salt
02:02 masterkorp joined #salt
02:04 joe_n joined #salt
02:06 solidsnack joined #salt
02:22 otter768 joined #salt
02:25 scoates joined #salt
02:33 aristedes joined #salt
02:35 Furao joined #salt
02:37 pratikmallya joined #salt
02:40 aristedes left #salt
02:41 sunkist joined #salt
02:44 scoates joined #salt
02:44 |_[O_O]_| iggy: thank you sir, is there a perceived convention for organizing largish modules or is it discretionary
02:48 ALLmightySPIFF joined #salt
02:54 seatan joined #salt
02:54 Furao joined #salt
02:56 cberndt joined #salt
03:00 mapu joined #salt
03:09 Furao joined #salt
03:10 Furao joined #salt
03:30 favadi joined #salt
03:42 opensource_ninja joined #salt
03:42 lemur joined #salt
03:45 hasues joined #salt
03:45 hasues left #salt
03:49 malinoff joined #salt
03:50 malinoff joined #salt
03:54 solidsnack joined #salt
03:55 seatan joined #salt
04:00 dthom91 joined #salt
04:09 brianfeister joined #salt
04:10 favadi joined #salt
04:24 iggy |_[O_O]_|: you could break some of it out into salt.util, then salt.modules and salt.states
04:26 favadi joined #salt
04:38 bhosmer joined #salt
04:45 Shirkdog joined #salt
04:47 cyborglone joined #salt
04:48 cberndt joined #salt
04:51 ramteid joined #salt
04:52 aqua^c joined #salt
04:56 seatan joined #salt
04:56 TyrfingMjolnir joined #salt
05:08 dopesong joined #salt
05:09 dopesong_ joined #salt
05:30 rdas joined #salt
05:33 larsfronius joined #salt
05:36 felskrone joined #salt
05:37 chequers joined #salt
05:38 chequers hi, I want to replace multiple lines within a single file, but in my sls I can't write mjultiple file.replace blocks. How am I meant to do this?
05:38 otter768 joined #salt
05:43 chequers https://gist.github.com/alexjurkiewicz/87e52ea7f7a4c1b56d92 this is what i'm trying to do
05:49 forrest joined #salt
06:01 CeBe joined #salt
06:01 evle1 joined #salt
06:04 micko joined #salt
06:10 lb joined #salt
06:15 sirex joined #salt
06:16 malinoff joined #salt
06:16 anmol joined #salt
06:19 stephanbuys joined #salt
06:20 jbrnds2 joined #salt
06:26 katyucha joined #salt
06:28 colttt joined #salt
06:31 jeffspeff joined #salt
06:32 dopesong joined #salt
06:34 dopesong joined #salt
06:36 AndreasLutro joined #salt
06:37 humalassa joined #salt
06:38 rubendv joined #salt
06:38 rubendv joined #salt
06:38 svinota joined #salt
06:39 seatan joined #salt
06:42 KermitTheFragger joined #salt
06:52 chequers figured it out: i need to create multiple resource ids and specify the same -name parameter for each
06:52 chequers eg /etc/ssh/sshd_config-1: file.managed: - name: /etc/ssh/sshd_config
06:53 elsmo joined #salt
07:06 dopesong_ joined #salt
07:11 edulix joined #salt
07:15 NightMonkey joined #salt
07:17 kawa2014 joined #salt
07:27 eseyman joined #salt
07:33 vvoody joined #salt
07:35 malinoff joined #salt
07:35 Bryson joined #salt
07:39 mattiasr joined #salt
07:39 otter768 joined #salt
07:40 Grokzen joined #salt
07:52 thalleralexander joined #salt
07:52 mr-op5 joined #salt
07:54 johnny__ joined #salt
08:02 s_kunk joined #salt
08:02 malinoff joined #salt
08:03 pprkut joined #salt
08:04 rim-k joined #salt
08:18 markm joined #salt
08:20 mike25de hi people - i have a reactor that runs a state when a minion is started.  Is it possible that i create a reactor that does something on the master (run a batch command) when a minion is started?
08:21 kawa2014 joined #salt
08:23 larsfronius joined #salt
08:24 Xevian joined #salt
08:28 Phil-Work joined #salt
08:29 Saltzig joined #salt
08:29 Saltzig Hello Everyone
08:30 gwmngilfen joined #salt
08:31 Saltzig I am running a bunch of package installs through saltstack highstate... but i call highstate from a python app using the LocalClient. However, sometimes the highstate takes so long i don't get a return value from the LocalClient with info about the return of the command. How can i make it wait all the way through?
08:31 elsmo joined #salt
08:31 Saltzig Is there a way to make it ignore that "timeout" in the master configs?
08:39 babilen_ mike25de: Sure, just install a minion on the master and target that ;)
08:39 bhosmer joined #salt
08:43 mike25de babilen:  :) nice tip :)
08:43 mike25de thank you !
08:44 kukacz joined #salt
08:44 seatan joined #salt
08:47 babilen mike25de: It was so great when I ran the first highstate on the master that salted the master itself. Saltception!
08:47 alfborge joined #salt
08:48 alfborge I'm having issues where I'm losing minions. Then they come back then they dissapear. I run manage.down three time following each other, first time gives 9 minions, then 7 minions, then 9 minions.
08:48 chequers left #salt
08:49 mike25de babilen:  :) CoolAwesome
08:57 seatan joined #salt
08:58 alfborge In the minion logs I get: SaltReqTimeoutError: after 60 seconds. (Try 1 of 3)
08:58 babilen We encountered that when our network was misconfigured
08:58 alfborge It is non-obvious why it should time out since it reused a connection that was working just a second ago.
08:58 alfborge babilen: How was it misconfigured? That might very well be the case with us as well.
08:59 babilen It turned out that the MTU on one link was different (didn't use jumbo frames) and the minion and master couldn't actually communicate correctly *all the time*
09:00 alfborge Interesting. The minion has timed out three times now and suggests that we increase the worker_threads.
09:00 alfborge But we're running with 36 threads so I would be very surprised if that was the problem.
09:00 alfborge In fact, I suspect that the master would perform etter with fewer threads.
09:01 alfborge babilen: Do you have any links or tips to what I should check wrt MTU settings?
09:02 babilen Yeah, we are running with nowhere that many threads. How many cores does your master have?
09:02 babilen I ran something like "ping -s 9000 -M $MASTER_IP"
09:02 eliasp_ \o/ - the 2015.8.0 packages for Ubuntu are available now on repo.saltstack.com!
09:03 alfborge babilen:8
09:03 babilen -M do
09:04 alfborge babilen: thanks for the pointers, hopefully this is it :)
09:04 teryx510 joined #salt
09:04 saltzig joined #salt
09:05 babilen alfborge: The actual command I used was: "ping -M do -s 8972 $MASTER_IP"
09:05 babilen eliasp_: Are they in contrib too?
09:05 babilen Ah, no.. they are in main *phew*
09:06 eliasp_ :)
09:06 malinoff joined #salt
09:07 alfborge Unfortunately the MTU is set to 1500 on both sides, so unless something between is messing with things then this isn't it.
09:08 babilen Well, just because it bit us, doesn't mean that it bit you
09:09 alfborge Nope, but it would have been convenient :)
09:13 alfborge babilen: Out of curiosity, what setting do you use for worker_threads and how many cpu cores do you have?
09:14 babilen alfborge: We have multiple setups. How many minions do you have?
09:15 alfborge 93
09:15 pratikmallya joined #salt
09:15 alfborge Which should be easy to handle with a few threads I believe.
09:16 babilen Okay, I use a master with 12 cores for that, but that is probably quite overpowered as we run a setup for ~1000 minions with a 16 core master. Haven't touched worker_threads at all.
09:17 alfborge That's what I would have thought reasonable as well. Glad to have it confirmed.
09:17 babilen Given that salt uses python-multiprocessing you really can't have too many cores ;)
09:17 jbrnds joined #salt
09:17 alfborge (When you get an error message suggesting you increase a value then it's easy to try just that.)
09:18 babilen Hmm, that wasn't quite clear: We actually do use a 12 core master for ~120 minions which works fine.
09:19 alfborge Wonder if we're experiencing packet loss...
09:20 alfborge We're running in azure and they don't allow icmp :/
09:20 alfborge icmp ping that is...
09:21 babilen *Every* time we had problems like that it turned out to be related to the network.
09:21 pratikma_ joined #salt
09:22 alfborge Yes, sounds like a network issue to me as well.
09:22 aqua^c joined #salt
09:24 ITChap joined #salt
09:24 ITChap Hi
09:26 ITChap When using multiple config files in a state
09:26 ITChap is there a way to do a file.managed for each one of them
09:26 ITChap like in a for loop
09:26 babilen no
09:27 ITChap :(
09:27 babilen Just create one state each
09:28 ITChap so there is no way to loop over a directory of the fileserver ?
09:28 ITChap (when using gitfs)
09:28 babilen I don't quite follow
09:29 ITChap i would like to place my file.managed in a loop
09:29 ITChap so I can just add new config file templates
09:29 ITChap to my fileserver
09:29 ITChap without having to change my states
09:31 ITChap for example my app/init.sls would loop through the files in app/files/ and add a file.managed for each one of them
09:33 ITChap It would allow my colleagues to add properties files to their project without having to learn the whole salt thing
09:33 babilen ITChap: A "state" is simply an entry in a dictionary that has to have a unique id .. you can easily generate those in a loop too
09:33 ITChap yeah I already do it
09:34 ITChap but I need to pass a list to iterate over
09:34 ITChap but I don't know how to get a list of the files in a subdir of my (gitfs) fileserver
09:34 ITChap that's the issue
09:34 ITChap or maybe with recurse
09:36 ITChap looks like file.recurse will do better than a jinja hack :)
09:36 babilen Yeah, file.recurse
09:36 blartftt joined #salt
09:37 blartftt does anyone else get strange output when running a highstate and using the firewalld state module?
09:38 babilen I don't know .. maybe?!
09:38 babilen do you?
09:39 ramteid joined #salt
09:39 blartftt :) yep i do, hang on ill post a gist
09:40 otter768 joined #salt
09:40 catpig joined #salt
09:42 blartftt https://gist.github.com/anonymous/b360183989d7b68576f0
09:43 blartftt notice how the output is much more verbose and the formatting is very different to a normal highstate run
09:43 blartftt as soon as i comment out the firewalld state stuff from my SLS, the formatting goes back to "normal"
09:45 babilen yes, it is hard to not notice that ;)
09:46 babilen Which version of salt is that?
09:52 blartftt salt-master 2015.8.0 (Beryllium)
09:52 blartftt and salt-minion 2015.8.0 (Beryllium)
09:53 rgardam joined #salt
09:54 rgardam Hello
09:54 rgardam Did the format of pillar change in the latest release?
09:55 rgardam I am using a custom pillar module and now I am getting duplicate entries from my pillar.
09:55 rgardam Which means things like the saltstack-formula for users breaks.
09:55 babilen blartftt: Looks as if firewalld returns a dictionary rather than a string in the ret['comment'] which probably causes the whole datastructure to be rendered as a dictionary ...
09:56 nebuchadnezzar joined #salt
09:57 blartftt babilen: ahh ok, should i log a bug report?
09:58 blartftt or is it something i am doing wrong?
09:59 seatan joined #salt
10:00 nebuchad` joined #salt
10:00 ze-_ joined #salt
10:00 aRkadeFR joined #salt
10:01 impi joined #salt
10:01 lionel_ joined #salt
10:05 rgardam It's possible it changed before 2015.8.0
10:05 babilen blartftt: I guess a bug report might not be a bad idea
10:06 babilen rgardam: Could be pillar merging
10:06 sgargan joined #salt
10:10 rgardam I know there is a setting to EXT_PILLAR_FIRST and this I believe is working the same way as before by default
10:10 rgardam has merge strategy changed?
10:11 rgardam because i'm extracting the existing pillars and merging on a specific top level key
10:11 rgardam and then returning the merged pillar and overwriting the existing pillar.
10:12 giantlock joined #salt
10:12 zerthimon joined #salt
10:13 felskrone anyone have an idea how i can version my modules? i want a "summarized" version of all my modules which i can compare between minions and masters without having to sync everytime and just seeing that module x.y was synced because it changed on the master
10:14 lionel_ joined #salt
10:21 blartftt babilen: thanks, have submitted new bug here: https://github.com/saltstack/salt/issues/27454
10:23 ksj hi, on the salt-ssh docs page, at the bottom it talks about defining cli options with a saltfile. unfortunately it doesn't say what to call the "saltfile". anyone know?
10:25 ramteid joined #salt
10:25 babilen blartftt: Just for fun: Could you copy the firewalld.py file to _states in file_roots and change the "'comment': { ..." to "'comment': 'Firewalld Test'" in there? (that should be line 72-75)
10:26 babilen Run "saltutil.sync_all" against your minion and then the firewalld states/highstate
10:26 babilen ksj: I think you call it "Saltfile"
10:28 kbaikov joined #salt
10:28 kbaikov joined #salt
10:28 PuckD can someone give me an example on how to pull files from the master? Where would I need to put the config defined in https://salt.readthedocs.org/en/v0.17.4/ref/states/all/salt.states.file.html ?
10:29 kawa2014 joined #salt
10:29 babilen blartftt: Do the same for 'changes': { too
10:30 babilen PuckD: You *really* shouldn't read documentation on readthedocs as it is horribly outdated. Use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html instead.
10:31 babilen PuckD: Are you trying to determine the proper path to a template file referenced in a file.managed state? (i.e. the "source: salt://...." argument)
10:32 PuckD babilen: yes, what I don'T understand is where do I put the .sls file I create for the file I want to be pulled
10:33 babilen Okay, I have the feeling as if you are mixing multiple things together here. Could you maybe start with your current situation and the steps you have taken so far?
10:33 PuckD babilen: I'm pretty sure I am (: Here it goes
10:33 felskrone joined #salt
10:33 BogdanR joined #salt
10:34 babilen (I think I know what you are after, but I don't want to make too many assumptions)
10:34 felskrone joined #salt
10:34 PuckD I'm currently using the zabbix-formula, whcih works flawlessly, now I'd like to push some custom scripts to some nodegroups, I have 'mysql', 'nginx', 'apache', I want to push a .sh script to all -N 'nginx' minions, the script is in salt://check-status.sh and it should go to /etc/zabbix/customscripts/ directory
10:35 svinota joined #salt
10:35 anmol joined #salt
10:36 PuckD While I do see on the doc page that I should define the file, I don't know where to use the definition, which file? /srv/salt/top.sls? /srv/pillar/top.sls?  Create a custom customescripts.sls?
10:36 PuckD *-e
10:36 babilen Okay, sure
10:36 blartftt joined #salt
10:37 felskrone joined #salt
10:37 PuckD so that's where I stand and waht I have
10:37 babilen So, there are two sides to this: 1. The SLS file that contains the file.managed state and 2. The file/template that is being managed (the source: salt://.... of the file.managed state in 1.)
10:38 babilen To solve 1. you would create a foo/bar/baz.sls somewhere in file_roots (e.g. /srv/salt/foo/bar/baz.sls) and target that to a minion in the top.sls (e.g. /srv/salt/top.sls)
10:39 PuckD okay, how would the targetting work?
10:40 babilen 2. Is, once you have 1. pretty easy: I would create foo/bar/files/yourscript.sh and then reference it in the file.managed state as source: salt://foo/bar/files/yourscript.sh
10:40 PuckD I'd have base: 'nginx': - match: nodegroup - baz.sls ?
10:41 babilen "'nginx': - match: nodegroup - foo.bar.baz" in my example
10:41 PuckD because . is translated to / ?
10:42 babilen "- foo.bar.baz" would match file_roots/foo/bar/baz.sls and file_roots/foo/bar/baz/init.sls
10:43 PuckD okay, and in baz.sls I'd have the first example form https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html, right?
10:43 babilen Something like that, yea
10:43 babilen h
10:43 PuckD a'ight, I'll give it a go
10:44 babilen Just paste your actual states/files to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … if you run into problems so that we can take a more detailed look, but that's the general idea
10:44 fredvd joined #salt
10:46 babilen What is quite confusing is that people tend to refer to both the "SLS" file and individual states therein as "state"
10:47 blartftt babilen: have done as instructed, but am now getting this error: https://gist.github.com/MrFishFinger/2e8378f9fd292dc3a0d8
10:47 PuckD babilen: it works great, thank you very much (:
10:47 pratikmallya joined #salt
10:47 babilen PuckD: \o/
10:48 babilen blartftt: /o\
10:48 babilen blartftt: Could you paste the firewalld.py you have in _states to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … ? Do you see something in the minion log if you start it manually with "salt-minion -l debug" ?
10:49 PuckD babilen: I just didn't know where to define them, now that you've shown me, Imma rock this m.f.a. \o/
10:49 pratikma_ joined #salt
10:49 babilen PuckD: Enjoy ;)
10:52 Antu joined #salt
10:52 denys joined #salt
10:53 blartftt babilen: https://gist.github.com/MrFishFinger/2323f6fa7f6fd088de97
10:54 babilen blartftt: And on further investigation: That change will never work as code later relies on that ret[] structure
10:55 babilen blartftt: And I meant "'comment': 'firewalld test'" rather than  'comment': {'firewalld test'} ..
10:55 PuckD babilen: can you by any chance guide me to a solution that restarts a service once the files have been pulled?
10:57 blartftt bablien: oh ok :) sorry for the mistake, have updated but get the same error.. likely because as you said it is referenced elsewhere
10:57 babilen Either way, please revert that change in _states/firewalld.py and change the last line "return ret" to https://www.refheap.com/110029
10:59 babilen PuckD: You do that by defining suitable requisites between state. You are, in particular, looking for listen/listen_in -- https://docs.saltstack.com/en/latest/ref/states/requisites.html#listen-listen-in which restarts a service *at the end of the highstate run* when a file it "listens to" had changes
11:00 PuckD thank you babilen, this way I can setup multiple listens for multiple files
11:00 babilen So you would either define a "listen: - file: the_file_state_id" in the service state (I don't like this) or a "listen_in: - service: the_service_state_id" (prefer this as it doesn't lumps all requisites together in the service state_
11:01 babilen watch/watch_in cause the service to be restarted immediately
11:02 stej joined #salt
11:05 joe_n joined #salt
11:06 felskrone joined #salt
11:12 jbrnds2 joined #salt
11:17 geekatcmu joined #salt
11:20 is_null left #salt
11:23 anmol joined #salt
11:24 PuckD how would you set mode +x through file.managed ?
11:26 breakingmatter joined #salt
11:27 ntropy PuckD: did you read the docs for file.managed function?  the answer is there ;)
11:28 AndreasLutro PuckD: you would have to use a cmd.run, you have to set the full mode explicitly in file.managed
11:28 PuckD ntropy: guess it's more of a linux noob question, mode: 744 would do? hmm
11:28 * PuckD tries
11:30 babilen 755 more likely
11:31 catpig joined #salt
11:31 blartftt babilen: ok did as instructed, response from highstate here: https://www.refheap.com/4ee6b8a304a2cbc05bf3e2abe
11:32 PuckD 744 worked fine
11:32 Norrland PuckD: that works for the owner of the file then.
11:33 PuckD Norrland: yupp, that's what I was looking for (:
11:33 zerthimon joined #salt
11:33 Norrland well, "chmod +x" sets execute permissions for all for example 755.
11:34 PuckD yes, but for the owner it's better, for now, at least it works, zabbix picks up the info it needs this way also
11:36 PuckD okay, quick question, why doesn't this nodegroup work : apache: 'backend* AND sample.full.hostname' ?
11:37 PuckD I tried even with 'backend*, sample.full.hostname' also 'L@backend* AND sample.full.hostname'
11:38 PuckD none of them work, for salt -N 'apache' test.ping I get No minions matched the target. No command was sent, no jid was assigned.
11:38 Norrland PuckD: is "backend*" an minion-id?
11:38 PuckD Norrland: backend* is the hostname of 3 machines, backend01 backend02 and backend03
11:38 Norrland PuckD: does 'salt "backend*" test.ping' work?
11:38 PuckD if I only have apache: 'backend*' then the 3 servers do ping, so the nodegroup works, but I need to add an extra host in there that doesn't have backend* in it's hostname
11:39 Norrland PuckD: and 'salt 's
11:39 PuckD salt "backend*" test.ping works
11:39 Norrland PuckD: and 'salt "sample.full.hostname" test.ping' work.
11:39 Norrland ok.
11:39 Norrland then you can't make it work with 'AND'
11:39 PuckD salt "sample.full.hostname" test.ping works as well
11:40 Norrland because 'AND' requires both statements to match.
11:40 PuckD then I need OR ?
11:40 Norrland yes.
11:40 babilen blartftt: So it is as I expected. Thank you! I'll comment on your bug
11:40 PuckD Norrland: changed it to OR, I get the same error, No minions matched the target
11:41 otter768 joined #salt
11:41 Norrland PuckD: does test.ping work with the 'OR' ?
11:41 PuckD Norrland: you mean salt 'backend* OR full.hostname' test.ping ?
11:42 Norrland yes.
11:42 PuckD no, it doesn't
11:42 Norrland strange.
11:42 PuckD indeed
11:44 PuckD this is my /etc/salt/master.d/synack.conf file https://paste.debian.net/hidden/f30c3516/
11:44 wenzel_ joined #salt
11:44 elsmo Morning all. Am getting 'Jinja variable 'salt' is undefined;' error on a state that i'm sure worked on Friday (!)
11:45 elsmo using it like so: {% if 'cache' in salt['grains.get']('roles', '') %}
11:45 babilen blartftt: To be honest: I have no idea what the initial author intended there :-/
11:45 elsmo Why would the salt variable no longer exist?
11:46 babilen PuckD: What is the entire command you use there?
11:46 PuckD babilen: salt -N 'apache' test.ping
11:46 * babilen sees neither "and" nor "or"
11:46 babilen elsmo: Where do you use it?
11:47 babilen (cue lecture on why grains are bad for roles)
11:47 PuckD babilen: there is OR here : https://paste.debian.net/hidden/f30c3516/
11:47 wenzel_ left #salt
11:48 babilen PuckD: First: I think it is "or" and not "OR" .. Does the following work: "salt -C 'backend* or iskaolja.thn1.portal.fo'
11:48 babilen test.ping
11:48 babilen gah, newline!
11:48 PuckD yes, that works
11:49 PuckD with or works lol
11:49 Norrland ah..
11:49 Norrland hm, will have to check my repo and see what I've been writing.
11:49 PuckD why the hell would I write it in capital letters.. hmm
11:49 PuckD thank you again babilen
11:49 babilen https://docs.saltstack.com/en/latest/topics/targeting/nodegroups.html has an example that shows how to use compound matchers .. I haven't used nodegroups (find them way too inflexible as I have to restart the master whenever I change them) much
11:49 Norrland right.. 'or' & 'and'
11:49 elsmo babilen: in an import currently
11:50 Norrland sorry PuckD
11:50 elsmo babilen: grains are a bad place to store roles? Isn't that a major use case for them!?
11:50 PuckD babilen: the funny part is that I've found that, that's what I was reading and writing based on ... got no clue why I wrote OR
11:50 PuckD Norrland: it's all good (:
11:51 babilen elsmo: They are being used for that, but why on earth would you safe them on the minions and not in a central place under the control of the master? (e.g. a database that you use as external pillar or whatnot). Using grains for that makes them both insecure (minions can tell you whatever they want to tell you) and hard to manage (i.e. you need the entire layer of "setting the grains" to begin with)
11:52 babilen elsmo: It is a bit of a personal dislike I should say ... The *only* reason why you would want to use grains is because they are the only data source that is literally available everywhere in salt (they are loaded first).
11:52 wunki joined #salt
11:53 babilen In my opinion they are, however, the wrong place for the "minion A gets B states" decision. That should be handled entirely on the master side and not depend on information under the control of minions or even distributed to them
11:53 babilen And then: How do you manage your grains?
11:54 elsmo babilen: Hmm, i see your point
11:54 blartftt babilen: beats me! thanks for your help locating the source of the issue, hopefully it can be fixed in the next release :]
11:54 babilen One use case that makes sense is if your cloud platform supports "tags" (or whatever it is called there) and these tags are being made available via a custom grain (like for EC2)
11:56 babilen elsmo: The problem is that as soon as you start using different approaches (e.g. pillars or nodegroups or ...) you are facing other problems. In the end it really depends on your needs, but always keep in mind that grains can be altered by the minion and that you shouldn't make any sensitive data available based on their alleged value
11:57 blartftt is there an equivalent of ansibles "notify" in Salt? I wish to execute a bash command only if a particular state changes (eg run a config command after a package is installed)
11:58 babilen blartftt: https://docs.saltstack.com/en/latest/ref/states/requisites.html
11:58 alfborge babilen: I seem to have fixed my issues by setting the tcp_keepalive_time to 75 for all the minions I have running in azure.
11:58 elsmo babilen: Yeah I try to bare that in mind
11:58 babilen blartftt: Look into prereq and onchanges
11:58 elsmo babilen: turns out my error was not including the included template with context - I thought the salt var was avaiable in all rendering contexts.
11:58 babilen alfborge: YES!!!!
11:59 wunki for some reason, my pillar data now contains every item in a list twice. Anyone know what could be causing this?
11:59 alfborge Thanks for throwing ball with me. Helped me focus my search.
11:59 babilen alfborge: Bad azure!
12:00 alfborge Yeah, azure is no fun.
12:00 alfborge But azure without salt is even less fun.
12:00 babilen sure, glad that I didn't had you wandering off on a tangent .. it's just that it was *always* a network problem and entirely unrelated to salt for us
12:01 alfborge I'm off to have some well deserved lunch. Have a good day everyone.
12:01 babilen So, whenever I see "SaltReqRequest ..." errors I think "what have the network guys been up to now?"
12:04 babilen wunki: Just one particular list or *every* list? What changed between now and the "before" state? Do you use environments and do you have overlapping pillar definitions in each?
12:04 wunki babilen: I just found the culprit. In my top.sls for pillars I include the pillar twice
12:04 aqua^c joined #salt
12:05 babilen wunki: Well .....
12:05 wunki babilen: which now results in lists being doubled in stead of replaced
12:05 babilen That might explain it ;)
12:05 babilen yeah, magic of merging!
12:05 wunki babilen: is this new? Never had this problem?
12:05 babilen How I wish for Python to include proper "merge-with" methods for all its collections
12:06 wunki babilen: the way I use my top file is by looking at roles. And a node can have multiple roles, all requiring certain pillars. Meaning that some pillars can be in there twice
12:07 babilen wunki: Do your pillars contain sensitive data?
12:07 bluenemo joined #salt
12:08 wunki babilen: the culprit doesn't, but some do
12:08 XenophonF joined #salt
12:09 rim-k can I use file.managed to cp/upload an entire folder to a minion?
12:10 favadi joined #salt
12:10 babilen I *really* wouldn't use grains then. A minion can claim to have any grains it wants to claim .. if you make data available based on that you could just forego the notion of using pillars for that data to begin with
12:10 rim-k i.e. recursively
12:10 babilen rim-k: file.recurse
12:10 rim-k sweet
12:10 rim-k thx
12:10 babilen (which works with directories)
12:10 rim-k with files too right?
12:10 babilen sure
12:10 * babilen chuckles
12:11 babilen "This state copies a directory (but not its content) recursively to a minion" wouldn't be very useful :D
12:11 wunki babilen: ah, good point. So you recommend looking at host/node names?
12:11 rim-k doh !
12:12 babilen wunki: The *only* datapoint salt guarantees to be correct is the minion id
12:14 alxbse joined #salt
12:14 wunki babilen: thanks, now refactoring a salt repository of 50+ roles ;)
12:14 froztbyte is there something like cmd.wait for the file side of things?
12:15 froztbyte I have some files I want to write once only
12:15 wunki babilen: but to circle back to first question, is it a bug or a feature that pillar data gets merged?
12:15 babilen feature!
12:16 babilen https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy
12:16 babilen froztbyte: Yeah, that would be nice
12:16 froztbyte babilen: I open ticket?
12:16 froztbyte s/ticket/issue/
12:17 froztbyte too many different trackers in my days.
12:17 babilen froztbyte: Yeah, another ticket in the sea of open ones won't change anything though ;) -- I guess you could use grains for this and set one "wrote initial files" grain and then exclude the respective file.managed ones in the future based on that grain
12:18 froztbyte yeah, something like that is what I would probably do
12:18 LM317 joined #salt
12:18 babilen froztbyte: I wonder what happened to the good old "bug". Still, by far, my preferred term. It does have a bit of "broken" connotation though
12:18 froztbyte babilen: so, I've seen some of the open issues. some I can possibly help with. however, I don't really know much about the coding standard or such. when I dug into that weird json/yaml thing, I found a lot of Meta
12:19 babilen Meta?
12:19 froztbyte babilen: so what would I be looking at if I were to try implement this? what would the requirements be?
12:19 froztbyte like, a hell of a lot of internal function trampolining and abstraction and capability-adding
12:19 babilen https://docs.saltstack.com/en/latest/topics/development/conventions/style.html
12:19 froztbyte (all for coping with various platforms and such)
12:20 froztbyte (specifically, I was digging down the template chain around https://github.com/saltstack/salt/issues/24132, if that helps)
12:21 babilen I'd say: Take a look at the way file states are implemented right now and take it from there ... The question is: How do you actually test this?
12:22 babilen I mean you are introducing state based on time into the system that is hard to test for. You can't just treat this as a "test if file exists, if it does, then don't do anything" state as that would mean that files might not even be written initially
12:23 froztbyte babilen: similar to cron.present, I'd say
12:24 babilen So you have to write something else that allows salt to check if that particular state ran *once* before (something like the aforementioned grain). In the end I think that users are better off just implementing this themselves rather than coming up with a horribly complicated state.
12:24 froztbyte off the top of my head: use serverid + timestamp, run it through hashutil.sha256, write the hash into the file as a token that says "salt was here"
12:25 froztbyte well, hash and timestamp
12:25 froztbyte minion can easily validate that as a decision point
12:25 froztbyte but some kind of on-minion state DB would probably work better, though I don't think anything like that exists outside of grains
12:25 froztbyte (grains would work, but there's no facility for "private" grains, aiui)
12:25 babilen It doesn't
12:26 froztbyte babilen: how does the approach above sound?
12:26 froztbyte babilen: I could add a counter relatively easily as well
12:26 sroegner joined #salt
12:26 babilen Exactly. Salt is essentially not providing any way to manage "time" ..
12:27 froztbyte copying a file from another minion would retrigger the loop, but I think that's fine
12:27 froztbyte (since you did end up changing the State Of The System - Bad User)
12:27 babilen I still think it is easier to leave it for the user to implement it in terms of grains
12:27 froztbyte but it'd be such a nice pattern to have out in the world :(
12:28 froztbyte okay, alternatively: how about private grains? ;P
12:28 babilen You can hardly foresee all use cases and just because you could express *your* specific use case as a state, doesn't mean that other users benefit from it.
12:28 alxbse left #salt
12:28 giantlock joined #salt
12:28 froztbyte sure, but that's how code grows features anyway
12:28 babilen Maybe somebody wants files to only be managed on a Monday? Or replaced/changed exactly five times?
12:29 froztbyte that's still /strictly/ doable, tbh, but I would wonder why a user would want that
12:30 babilen I think that salt doesn't need private grains (implying they are being saved on the master), but an easy ways to *securely* write and access data from the master. (e.g. ways to write to pillars and have access to them anywhere)
12:30 froztbyte yeah, I've wanted that
12:30 babilen Users want all sorts of weird things
12:30 rhodgin joined #salt
12:30 froztbyte kinda had to shim it into a mine before
12:30 babilen yeah
12:30 babilen Which sucks
12:31 babilen Another thing that drives me nuts is that salt is horribly bad at expression inter-minion relationships and actions
12:31 babilen (back to time again)
12:31 froztbyte when I say private grains, I mean grains that stay on-minion (like, let's say you set a "I have run $x SLS" grain as a run trigger), and won't show up under the default grain displays
12:31 dyasny joined #salt
12:32 froztbyte I suppose that they could sync to the master and still not be shown by default
12:32 blartftt babilen: thanks again! onchanges_in was what i needed. I take it that salt is smart enough to not try and run the referenced state if it "sees" that it is in an onchanges_in statement, but has not been triggered?
12:32 froztbyte think python __attr__ type of data
12:32 babilen In that you can't say: "Do things on minion A, save the result (which can be defined in many different ways) under key "foo:bar:baz" in the master datastore, then (once complete) do things on minion B and use data stored in "foo:bar:baz"
12:32 froztbyte babilen: yes, I agree. I have sorta wanted that too
12:32 babilen blartftt: It is. It will only be triggered if the other state has changes
12:33 froztbyte babilen: but not enough that I couldn't work past it
12:33 babilen So a "master datastore" (well, just a "private master pillar") would be a great first step for that
12:33 blartftt babilen: wunderschön! thanks
12:33 babilen blartftt: Absolut und in Gänze fantastisch!
12:34 * babilen wonders if #salt is populated by 60% Germans that are talking to each other in English at this time of the day ;)
12:34 froztbyte babilen: back to the other point: I'll follow up by reading the file state and go from there
12:34 babilen yeah, that's the way to go.
12:35 * froztbyte is non-english and non-german but can do both to varying degrees of competency
12:35 babilen What's your native language?
12:36 babilen ENOCOFFEE
12:36 froztbyte afrikaans, more or less
12:36 froztbyte although I've been fluent in english from around age 5
12:36 blartftt haha im native english but i work in a german speaking country
12:37 chiui joined #salt
12:37 ajw0100 joined #salt
12:38 babilen froztbyte: You therefore speak an extremely weird dialect of German ;)
12:38 froztbyte you jest, but between the bits of german I learned initially, afrikaans, and english, I pick up a hell of a lot of languages quite easily
12:38 froztbyte I've found that I can reasonably comfortably read swedish and danish
12:39 froztbyte enough, at least, to get the gist of a general news post
12:39 babilen Yeah, I have the same thing. I am a native German speaker, spent a couple of years in .uk and studied Chinese. It's amazing how "easy" it is to read Dutch, Swedish or, particular, Bokmal
12:41 bhosmer joined #salt
12:41 froztbyte yeah, dutch is easymode from afrikaans. the only difficulty I have is when they amp the speed up
12:41 froztbyte (and even that I've gotten better at)
12:42 felskrone babilen: you probably not too far from reality with germans talking english in here :-)
12:43 cpowell joined #salt
12:43 froztbyte haha
12:44 * froztbyte gets back to poking redis into some sensible shape
12:44 X67r joined #salt
12:45 racooper joined #salt
12:46 anmolb joined #salt
12:47 mpanetta joined #salt
12:49 ticosax joined #salt
12:55 totte joined #salt
12:57 Hydro-x1 joined #salt
12:57 subsignal joined #salt
12:58 rgardam babilen: any more information on this would be great
13:00 pviktori joined #salt
13:00 ferbla joined #salt
13:01 kawa2014 joined #salt
13:01 babilen rgardam: On what exactly?
13:01 babilen pillar merging?
13:02 favadi joined #salt
13:04 rgardam yeah
13:05 rgardam give me a few minutes. I can report between versions what I see.
13:05 JDiPierro joined #salt
13:06 babilen I don't quite know what more I could say about this than what has been written on https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy
13:06 babilen It has examples and everything
13:06 diegows joined #salt
13:07 babilen So: What else do you need?
13:07 numkem joined #salt
13:10 rgardam I was using v2015.5.1 with the merging strategy overwrite
13:10 rgardam in v2015.8.0 salt complains about duplicate ids
13:11 AndreasLutro rgardam: can you share the exact, full error message?
13:11 rgardam I'm just about to get this for you now.
13:14 dopesong joined #salt
13:14 rhodgin joined #salt
13:15 rgardam just building the boxes now
13:15 jdesilet joined #salt
13:15 AndreasLutro no hurry
13:18 dopesong_ joined #salt
13:18 shpoont joined #salt
13:18 cpowell joined #salt
13:18 dendazen joined #salt
13:18 dendazen left #salt
13:19 chiui joined #salt
13:21 bhosmer joined #salt
13:28 rgardam AndreasLutro: https://gist.github.com/rgardam/234565c1bf626f9d5822
13:29 AndreasLutro rgardam: well, that says a duplicate state id, not directly related to pillars, but is a possibility
13:30 AndreasLutro aha - rgardam: https://gist.github.com/rgardam/234565c1bf626f9d5822#file-pillar-item_2015-8-0-L632-L634
13:30 rgardam The problem is that the behaviour is different
13:30 AndreasLutro yes, in 2015.8 lists are combined instead of overwritten
13:30 AndreasLutro somewhere you're defining the wheel group twice
13:31 rgardam The pillar is the same between the versions
13:31 rgardam the only difference is the handling of merging.
13:31 AndreasLutro I think there's a config flag somewhere to change the list merge behaviour but can't find it
13:31 AndreasLutro that's what I wrote :)
13:32 rgardam this is exactly my point though. That the behaviour of overwrite merging has changed
13:32 mapu joined #salt
13:33 pravka joined #salt
13:33 Deevolution joined #salt
13:34 babilen It has
13:34 babilen https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy
13:34 babilen !!!
13:35 kawa2014 joined #salt
13:35 babilen Just set it to "overwrite" if you don't want that or adapt your setup to the new default (which is much more sensible IMHO)
13:35 scoates joined #salt
13:35 rgardam it is already in both examples given
13:36 babilen Which examples exactly?
13:36 mike25de hi again :) related to reactors : what are the default data[] values available for a reactor.  I know there is data['id'] ... anything else?
13:36 rgardam see my gist above
13:36 ticosax joined #salt
13:36 rgardam https://gist.github.com/rgardam/234565c1bf626f9d5822
13:37 babilen rgardam: What is "it" in your example and what is "example 1" and "example 2" in your gist?
13:37 babilen *in your sentence
13:37 babilen "it is already in both examples given"
13:38 rgardam the overwrite strategy is already used in both 2015.5.2 and 2015.8.0
13:38 rgardam 2015.5.2 works - 2015.8.0 does not.
13:38 rgardam it returns duplicates
13:38 jbrnds joined #salt
13:38 AndreasLutro https://github.com/saltstack/salt/issues/25954
13:39 protoz joined #salt
13:39 AndreasLutro tldr; expected behaviour
13:40 babilen Well, I wouldn't necessarily expect it if it is set to "overwrite"
13:40 AndreasLutro though I think adding a master config value to turn this on/off would make sense
13:40 babilen Which pillar data are was the offending one again?
13:41 rgardam yeah exactly
13:41 babilen But then, assigning the same pillar multiple times is just borken to begin with
13:41 rgardam i don't think overwrite is working
13:41 pdayton joined #salt
13:42 rgardam the group
13:42 otter768 joined #salt
13:42 babilen "the" ?
13:42 babilen What's the exact key?
13:42 rgardam https://gist.github.com/rgardam/234565c1bf626f9d5822#file-pillar-item_2015-8-0-L633
13:42 babilen How do you assign it? And why don't you just assign the correct value once?
13:43 rgardam I'm using the saltstack formula for users
13:43 babilen That doesn't assign any pillars
13:43 rgardam it is only ever assigned once
13:43 rgardam https://gist.github.com/rgardam/234565c1bf626f9d5822#file-pillar-txt-L1
13:43 rgardam this is the pillar file
13:43 rgardam it is only assigned once
13:44 babilen So ... why is it duplicated then?
13:45 sPollk joined #salt
13:45 rgardam we have a custom module for pillars.
13:45 babilen So your code is broken?
13:45 av_ joined #salt
13:45 rgardam It's extremely simple.
13:45 cpowell joined #salt
13:46 ticosax Hi, I have a question regarding masterless setup (Vagrant) and top file strategy.
13:46 babilen Sorry, but your gist is absolutely massive and the issue "things are duplicated if assigned twice" simply can't exist if you don't assign the same pillar twice to begin with
13:46 zmalone joined #salt
13:46 ticosax [WARNING ] Top file merge strategy set to 'merge' and multiple top files found. Top file merging order is undefined; for better results use 'same' option
13:46 sPollk left #salt
13:46 rgardam What i'm saying is that something changed, because it previously worked
13:46 av_ Guys, how do I a remove a symlink using salt? Nginx creates a symlink called `default` when installed in etc/nginx/sites-enabled. I want to remove that, how do I do it?
13:46 babilen ticosax: Merged top files are baaad! Use a single file_root or gitfs for top files only
13:47 erjohnso joined #salt
13:47 ticosax therefore I have a env_order: entry in my minion.conf but seems ignored
13:47 babilen rgardam: Yes, lots of things changed, but if you don't target the user pillar twice it shouldn't make a difference. I still don't understand where the second group comes from though.
13:48 av_ okay, trying with `absent`
13:48 ticosax balilen: all my top files are empty, only the one in base/top.sls contains something
13:48 ticosax Can I get rid of all the empty ones ?
13:48 babilen ticosax: Why do you have empty top files?
13:48 Amit__ joined #salt
13:49 rgardam we have a pillar that contains environment information
13:49 babilen av_: yeah, file.absent is what you are looking for
13:49 ticosax I think it is a relica of usage of salt in 2013, I sticked to that rule.
13:49 seatan joined #salt
13:49 av_ babilen thanks
13:49 Amit__ Hello i am very very new to Salt-- where will i get the best and eaasy documentation to learn saltstack
13:49 rgardam our module reads in the pillar data as if it's real pillar data and then merges based on the environment key and then returns the pillar object to salt
13:49 ticosax babilen: thx for your hint, I'll give a try by removing those files
13:49 av_ Amit__ start with Pycon 2014 video. Thats how I started
13:49 babilen Amit__: https://docs.saltstack.com/en/latest/
13:50 rgardam we use the overwrite function because both show up if you dont
13:50 rgardam the overwrite function seems to still smart merge
13:50 Amit__ Thanks a lot @av & @babilen
13:50 anmol joined #salt
13:51 babilen Amit__: There are also books and whatnot ... https://www.packtpub.com/networking-and-servers/learning-saltstack for example
13:51 babilen rgardam: So something in your setup is targeting the same pillar twice?
13:51 babilen (the "a pillar that contains environment information")
13:52 Amit__ i want to learn it very quick in about 15 days :)
13:52 babilen Amit__: Well, why aren't you reading the documentation then?
13:52 babilen go go go
13:52 numkem joined #salt
13:52 Amit__ i started with walkthrough but u know got stuck while doing that nginx.sls
13:52 Amit__ Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
13:53 Amit__ getting this error
13:53 aqua^c joined #salt
13:53 babilen On what kind of system?
13:53 Amit__ am using CentOS
13:53 babilen Okay, if you have to
13:54 Amit__ this made me worried and go on backfoot :(
13:54 rgardam our module copies the pillar data and passes it back to salt.
13:54 babilen What did?
13:54 babilen rgardam: So, don't do that!
13:55 rgardam This is where the duplication happens. Overwrite should overwrite old with new though.
13:55 babilen Amit__: Okay, and you installed salt on your system?
13:55 rgardam It worked in previous versions
13:55 Amit__ Yes i did
13:55 numkem joined #salt
13:55 babilen rgardam: Well, then don't copy the pillar data
13:55 Amit__ i was Okay till vim.sls
13:55 babilen Amit__: Okay, so you installed a salt-master and salt-minion on your local machine and adapted the salt-minion config to point to localhost?
13:56 rgardam I was hoping to have our module read the pillar object. Are you saying that I should have our module read in the pillar data itself?
13:56 babilen rgardam: I have no idea whatsoever what your module does nor why you would need it.
13:56 Amit__ i used 2 vms 1 for master & 1 for minion
13:57 rgardam It basically does this -> https://github.com/bbinet/pillarstack
13:57 babilen Amit__: Okay, and the salt-master is running on one and the salt-minion running on the other?
13:57 rgardam But only on the environment key
13:57 Amit__ yes exactly
13:57 babilen Amit__: So, *are* they both running?
13:58 Amit__ yes .. my vim.sls worked perfectly
13:58 numkem joined #salt
13:58 Amit__ i get True on test.ping and all
13:58 babilen Can you ping the master from the minion? How did you configure the minion? Can you run "salt '*' test.ping" on the master and report the result?
13:58 Amit__ i get True
13:59 babilen So, what is the command you run that times out?
13:59 Amit__ salt '*' state.sls init.sls
13:59 numkem joined #salt
14:00 babilen rgardam: Could you eliminate your module entirely from the problem description and boil it down to a simple example that shows the problem that "- wheel" is included twice?
14:00 babilen Does state.sls work for anybody?
14:01 babilen nvm
14:01 Amit__ salt '*' state.sls vim.sls -- This worked perfectly
14:01 babilen Amit__: Could you make that "salt '*' state.sls init" ? What is the content of state.sls ?
14:02 numkem joined #salt
14:02 pratikmallya joined #salt
14:02 babilen You mean "salt '*' state.sls vim" and not "salt '*' state.sls vim.sls" don't you?
14:03 Amit__ yes
14:03 Amit__ i mean vim
14:04 Amit__ salt '*' state.sls init ? client:     - No matching salt environment for environment '?' found     - No matching sls found for 'init' in env '?' ERROR: Minions returned with non-zero exit code
14:04 pratikma_ joined #salt
14:05 JDiPierro joined #salt
14:05 babilen '?' ← where did that come from?
14:05 numkem joined #salt
14:05 Amit__ hang on i will paste the content of init.sls
14:06 babilen Amit__: Can you paste your actual command and the content of init.sls to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … ?
14:06 teebes joined #salt
14:06 favadi joined #salt
14:06 rgardam ok. the agregate option works
14:06 bhosmer joined #salt
14:07 Amit__ paste.debian.net/313653
14:07 babilen rgardam: I still think that "our module is doing the wrong thing" is not a good bug report for salt. If you can showcase a problem without that we'd all be better off
14:07 babilen Amit__: And your exact command and output?
14:08 scoates *rant* unpythonic something something https://github.com/saltstack/salt/blob/develop/salt/modules/boto_vpc.py#L75 )-:
14:08 mpanetta Morning all.  What is the recommended way to get 2015.8 on an ubuntu system?
14:08 rgardam my problem was not that your module is doing the wrong thing. It's that something changed between versions
14:08 babilen Amit__: Is there actually an "nginx" package on CentOS and is that the name of the service?
14:08 numkem joined #salt
14:08 babilen mpanetta: Install it?
14:09 mpanetta babilen: Well duh :P  Where?
14:09 babilen mpanetta: http://repo.saltstack.com/apt/ubuntu/
14:09 Amit__ Yes i want to install nginx on CentOS
14:09 mpanetta I heard the PPA was replaced so...
14:09 mpanetta OOo
14:09 mpanetta Ok
14:09 mpanetta babilen: Thank you :)
14:10 Steven- joined #salt
14:11 babilen Amit__: Could you run "salt-call -ldebug state.sls init" on the minion and paste the output? -- I believe that nginx is a very badly chosen example there, but lets see what the issue is
14:11 andrew_v joined #salt
14:11 Amit__ yes Sure
14:13 babilen ah
14:13 Amit__ I will first try replacing nginx with httpd & try it once
14:13 babilen Make that "salt-call -ldebug state.sls nginx" and not "salt-call -ldebug state.sls init"
14:13 numkem joined #salt
14:14 babilen nginx/init.sls and nging.sls are both mapped to "nginx"
14:14 numkem joined #salt
14:14 kaptk2 joined #salt
14:14 babilen +speling naturally
14:15 SheetiS joined #salt
14:16 rhodgin joined #salt
14:18 rgardam https://github.com/saltstack/salt/blame/develop/salt/utils/dictupdate.py#L77
14:18 rgardam This uses yamlex
14:19 rgardam this is what has changed
14:19 rgardam https://github.com/saltstack/salt/commit/5c6e210c8bb68548b904ea08178e1332e7e54676
14:19 Cyis anyone developed a formula for dealing with IIS via salt?
14:19 Amit__ @babilen great thanks... replace nginx with https in init.sls
14:20 Amit__ and it worked
14:20 Amit__ paste.debian.net/313656
14:20 babilen Amit__: I think that is an ill chosen example as it is not very platform agnostic and likely to break ....
14:21 Amit__ THanks a lot.. so which step should i learn now.. :)
14:21 chiui joined #salt
14:21 babilen Amit__: You still don't want "init" but "httpd" or so if you use httpd/init.sls or httpd.sls ..
14:21 Amit__ i edited in init.sls
14:21 babilen Amit__: Just continue with the documentation? https://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html
14:22 Amit__ i should have used haapd.sls right?
14:22 babilen httpd/init.sls and httpd.sls both translate to "httpd" (much like Python packages)
14:22 Amit__ ahhh.. great
14:23 Amit__ Love Saltstack
14:23 Amit__ wish there wre some online tutorial on udemy or corsera
14:24 rgardam in https://github.com/saltstack/salt/blob/develop/salt/utils/aggregation.py you still do a copy here, but a deep copy inside of the pillar overwrite function
14:24 _JZ_ joined #salt
14:24 babilen So https://github.com/saltstack/salt/blob/develop/salt/utils/aggregation.py should use deepcopy too!
14:25 rgardam sure.
14:25 Amit__ Thanks a lot babilen
14:25 rgardam if that's how you want it to work.
14:25 rgardam but my point still stands that this has changed.
14:26 babilen yes, this changed
14:26 babilen Things are merged now. All things.
14:26 rgardam no, not aggregations.
14:26 babilen Which is a bug by the look of it, isn't it?
14:27 Fiber^ joined #salt
14:29 TheoSLC joined #salt
14:31 rgardam I think so.
14:31 rgardam Shouldn't overwrite not merge though?
14:31 rgardam I would have though overwrite to completely overwrite
14:33 fivefivefive joined #salt
14:34 babilen likewise
14:34 babilen Soemthing is off there
14:34 bsjones_ joined #salt
14:35 rgardam I don't mean to be short. I've just been spending some time trying to work out what has been going on.
14:35 rgardam It seems I can get around it by adjusting to the aggregate method in the mean time.
14:35 rgardam but this might change again.
14:36 tachikoma left #salt
14:38 Aleks3Y joined #salt
14:40 babilen rgardam: I would every leaf in the pillar tree to have the value that was assigned last, deepmerge is therefore probably wrong
14:40 babilen Why is this so badly done in Python?
14:43 rgardam yeah. I am most likely going to remove this problem by using the pillarstack module
14:43 rgardam which uses different files not in the pillar_root
14:44 rgardam but right now, I have to use what we had before.
14:45 babilen rgardam: Could you file an issue about this? Something that shows that things/lists/... are merged despite 'overwrite' being used?
14:45 rgardam Yes, I can. I probably shouldn't have deleted my gist....
14:46 babilen I still don't understand why there is *any* merging at all if you don't assign the same pillar twice, but fair enough
14:46 rgardam It is to do with the custom module we use
14:46 babilen So you feed it correct data and it duplicates it?
14:46 rgardam it essentially takes the pillar data, merges and then returns the pillar object back to salt
14:47 babilen But how does salt's merging behaviour factor into that at all?
14:47 rgardam and we relied on the the overwrite strategy to only have the merged data available to salt
14:47 babilen (if your module merges the data)
14:48 dkrae joined #salt
14:48 Pythux joined #salt
14:49 rgardam Salt would duplicate the data if we didn't use overwrite, because the original pillar data still existed
14:49 babilen Right!
14:49 babilen Finally ;)
14:49 rgardam as long as our module ran second and overwrite was used.
14:49 rgardam I'm sorry if I didn't make that clear
14:49 rgardam I thought I had.
14:50 babilen Okay, that sounds super broken .. why did you do that ?
14:50 rgardam why did we use this module?
14:50 Pythux Hi there. Does anybody know how I could access the list of available states from one of my states (yaml). The idea would be to include some state if it exists and ignore it otherwise. Is it possible?
14:50 babilen Well, why didn't you keep the data source for "your" pillar data that is being used by your module entirely separate from what salt uses?
14:51 rgardam We could use the salt pillar object
14:51 babilen Pythux: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.list_states + " if 'foo' in ...."
14:52 Brew joined #salt
14:52 rgardam The next step would have been to separate this pillar data out into it's own area and not use the pillar object passed out of salt
14:52 dthom91 joined #salt
14:52 jbrnds2 joined #salt
14:52 rgardam but I am more inclined to use the pillarstack module
14:52 babilen ack
14:52 bhosmer joined #salt
14:53 overyander joined #salt
14:53 rgardam Even this documentation uses the pillar object
14:53 rgardam https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#ext-pillar
14:54 Akhter joined #salt
14:54 rgardam because we were returning basiclally the same objects just merged we choose to use overwrite to completely overwrite what was already there.
14:54 Pythux babilen: Thank you for the answer. I just tried it and got a => Rendering SLS 'base:apis' failed: Jinja variable 'salt.loader.LazyLoader object' has no attribute 'modules'. With the following line => {% if "modulename" in salt.modules.cp.list_states() %}
14:55 rgardam This worked as expected.
14:55 rgardam the changes in 2015.8 break this now.
14:56 Akhter joined #salt
14:56 babilen Pythux: Make that "salt.cp.list_states()" -- https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions
14:58 Pythux babilen: Great, that does the trick. Thank you very much.
14:58 babilen yw
14:58 babilen Are you looping over that?
15:01 adelcast1 left #salt
15:01 Akhter joined #salt
15:05 tzero joined #salt
15:14 pprkut question about salt-cloud. Do you have to run it on the master, or does it also work if executed from another minion?
15:16 anotherZero joined #salt
15:19 fredvd joined #salt
15:19 AndreasLutro pprkut: salt-cloud can run anywhere
15:19 dthom91 joined #salt
15:21 pprkut AndreasLutro: thanks!
15:22 adelcast joined #salt
15:24 iggy pprkut: in fact, I run salt-cloud from my laptop (which is neither master or minion)
15:26 druonysus joined #salt
15:26 druonysus joined #salt
15:26 DammitJim joined #salt
15:26 zwi joined #salt
15:32 TheoSLC joined #salt
15:33 TheoSLC Good morning.  Could I get some help re-opening this issue https://github.com/saltstack/salt/issues/25954
15:35 seatan joined #salt
15:36 jbrnds joined #salt
15:38 rodr1c joined #salt
15:39 pdayton joined #salt
15:40 RedundancyD joined #salt
15:41 mike25de hey guys : related to reactors : what are the default data[] values available for a reactor.  I know there is data['id'] ... anything else?
15:41 KennethWilke joined #salt
15:42 bhosmer joined #salt
15:43 otter768 joined #salt
15:44 bduvall joined #salt
15:44 breakingmatter joined #salt
15:44 pdayton joined #salt
15:45 drawsmcgraw joined #salt
15:45 KennethWilke joined #salt
15:45 clintberry2 joined #salt
15:48 cberndt joined #salt
15:49 favadi joined #salt
15:50 iggy I'm not even sure if that is in every reactor
15:52 aparsons joined #salt
15:53 aparsons joined #salt
15:54 mike25de ok iggy
15:54 mike25de but for example  salt-call event.send 'event/tag'   should trigger the state that matches the reactor tag  on the master config, right?
15:58 dopesong joined #salt
16:00 davix joined #salt
16:03 twork i'm still poking my way through my quest to extend the vsftpd formula. just posted to the list, "Turning a template into one that iterates". My current (final?) hitch: my sls references my pillar to the point that it creates the files it should, but it doesn't seed their template.
16:04 twork gist is coming, moment, brower mishap
16:05 twork https://gist.github.com/mjinks/3762fb4e13a36bc009fe
16:05 fredvd joined #salt
16:09 alemeno22 joined #salt
16:09 pdayton joined #salt
16:10 writtenoff joined #salt
16:11 davix left #salt
16:14 pdayton In the salt minion config it is possible to change the master_port from 4506 to something else.  Is it possible to set a custom config for the port that defaults to 4505?
16:15 humalassa left #salt
16:21 katyucha joined #salt
16:28 nicmoski joined #salt
16:31 dthom91 joined #salt
16:31 colegatron joined #salt
16:32 dendazen joined #salt
16:34 timoguin joined #salt
16:35 JDiPierro joined #salt
16:35 dthom91 joined #salt
16:36 losh joined #salt
16:39 jalbretsen joined #salt
16:39 snarfy joined #salt
16:39 jodv joined #salt
16:40 faust joined #salt
16:41 dthom911 joined #salt
16:41 faust Hi everybody
16:41 iggy mike25de: any even that comes from a minion will have the data['id'] set... it's anything that doesn't come from the minion that I don't know about having 'id'
16:42 Guest81731 salt-minion populates /tmp/tmpAZERTY files with file.managed
16:42 Guest81731 someone already faced that problem (linux client/serverà
16:42 iggy pdayton: you can change ports at will, you just have to change them on the master as well
16:42 iggy pdayton: master listens, minions connect to master
16:46 TyrfingMjolnir joined #salt
16:46 Guest81731 problem occures only when running in test=true mode
16:51 markm joined #salt
16:51 TooLmaN joined #salt
16:54 mapu joined #salt
16:55 XenophonF left #salt
16:55 seatan joined #salt
16:59 zmalone joined #salt
17:00 scoates is there a way for me to get access to __utils__ from within a custom state module?
17:01 iggy from salt.utils import foo
17:01 scoates thanks
17:02 iggy no, the loader doesn't shove utils into the module context like modules (and now states)
17:02 Akhter joined #salt
17:02 sbogg joined #salt
17:02 iggy but show based pi a good use case and he can probably add it (he added __states__ pretty quickly)
17:04 * scoates chases his tail "NameError: global name '__opts__' is not defined"
17:04 mapu_ joined #salt
17:05 iggy there are other modules to use as an example of how to setup __opts__ (or put the import in a function that will already have that)
17:07 scoates will grep.
17:08 forrest joined #salt
17:09 forrest joined #salt
17:09 thalleralexander joined #salt
17:10 stephen144 joined #salt
17:10 stephen144 left #salt
17:13 Bryson joined #salt
17:15 David_B55 joined #salt
17:15 scoates hmm. I don't see anything useful in states/ ; its also looking for it in the global scope… which I don't think I can set from a custom state module?
17:18 malinoff joined #salt
17:24 cliluw joined #salt
17:24 breakingmatter joined #salt
17:24 scoates ok I think I'm going about this wrong. Managed to hack around __opts__ but now I need __context__… plus my hack isn't very good. (-:
17:25 iggy gist?
17:25 iggy import in the function
17:26 iggy __context__ will be there
17:27 scoates https://gist.github.com/scoates/8d45c759bbd0a4b07b7c
17:27 scoates ec2_conn.get_status calls __opts__ if all of the params aren't present… and then it uses __context__ as a connection cache
17:28 scoates erm, sorry. get_connection not get_status
17:28 scoates https://github.com/saltstack/salt/blob/5840c2e06bd6e149e04f786bf759603f573fb3c1/salt/utils/boto.py#L176
17:29 iggy yeah, try to move the import into the function itself (instead of at the module level)
17:29 scoates ah
17:29 aqua^c joined #salt
17:29 scoates trying
17:30 scoates this is not the first time Salt's dunder globals has hurt.
17:31 timoguin joined #salt
17:32 scoates yep. no __context__ still.
17:32 scoates that's with `from salt.utils import boto` inside the function
17:33 ALLmightySPIFF joined #salt
17:34 cliluw joined #salt
17:35 scoates actual state module: https://gist.github.com/scoates/8d229802dcfd7532c135
17:36 iggy no clue then
17:37 scoates bummer. )-:
17:37 scoates if I write a (_modules/) module, will it inherit __opts__ and __context__ properly?
17:38 iggy murrdoc has a module somewhere that uses stuff from utils, might check it out
17:38 ajw0100 joined #salt
17:39 druonysuse joined #salt
17:39 druonysuse joined #salt
17:39 scoates the regular boto_vpc module uses __utils__ (for assign_funcs)
17:39 iggy odd... apparently he actually cleans his gist (who does that?)
17:43 ticosax joined #salt
17:43 otter768 joined #salt
17:45 shiriru joined #salt
17:45 sk_0 is there a way to make the sls file name avaailbe inside the sls? like os.path.basename(__file__)
17:53 scoates iggy: moving into a module solved it
17:54 scoates removing: - text: "*** If it hasn't been done already, you'll need to go into the AWS console and flip the 'Auto Assign Public IP' switch for the opsvpc-subnetN subnets; the functionality is missing from boto (and thus also from salt cloud). Bummer. This has pushed me one step closer to becoming a farmer."
17:56 viq joined #salt
17:57 baweaver joined #salt
17:58 ferbla_ joined #salt
18:00 monkeybox Is there a way I can move my ec2 key out of /etc/salt/cloud and into a separate file? I've tried a simple 'include:' line, but no luck.
18:02 denys joined #salt
18:03 perfectsine joined #salt
18:07 stanchan joined #salt
18:07 monkeybox My salt-master isn't an aws instance, or I could use 'use-instance-role-credentials'.
18:07 scoates https://gist.github.com/scoates/35335e3fe1bf53dd1b2d if anyone's been following along. (-:
18:08 scoates monkeybox: we manage that by not putting those files into git/version control and we have the salt master's minion provision the file in highstate
18:08 scoates (I know that doesn't answer your question, but might give you an idea)
18:09 monkeybox I'd really like the rest of the provider config to be in git... Seems like a risk to leave it out. But the keys definitely cannot be in git.
18:09 GreatSnoopy joined #salt
18:09 Diaoul joined #salt
18:09 scoates monkeybox: ours is in git, as a template
18:10 scoates cloud.providers: http://paste.roguecoders.com/p/f01929fff0b3ed51c15ca454cdf48236.txt
18:10 dthom911 joined #salt
18:10 monkeybox Seems like that's asking for trouble, for smoebody to accidentally commit.
18:11 monkeybox Oh... that might work.
18:11 wordsToLiveBy joined #salt
18:11 scoates we don't actually manage that part of the tree, so it's not a risk for us, but .gitignore could help, too
18:11 scoates we just bootstrap our master with that, and we expect the salt-call to contain the environment
18:13 winsalt joined #salt
18:14 pravka joined #salt
18:15 monkeybox Thanks, scoates. At least something to pursue.
18:15 scoates cool. happy it helped.
18:17 baweaver joined #salt
18:19 stephen144 joined #salt
18:23 dthom91 joined #salt
18:25 winsalt salt is failing to "Import-Module ServerManager" as part of the win_servermanager module, does anyone have some insight for a fix?
18:26 KyleG joined #salt
18:26 KyleG joined #salt
18:26 Akhter joined #salt
18:27 clintberry2 joined #salt
18:28 debian112 joined #salt
18:29 PuckD guys, how would you change a minions hostname? I didn't accept the key yet, what would I need to do?
18:32 omkar_ joined #salt
18:32 omkar_ hello
18:33 katyucha joined #salt
18:33 omkar_ I have installed salt-master and minion on linux mint 17.1 (mate desktop) ,but there is some problem while executing salt commands for installing software
18:33 pcn What kind of problems?
18:34 druonysuse joined #salt
18:34 omkar_ http://paste.ubuntu.com/12604488/
18:34 omkar_ this is the output I am getting,and I have read that mate desktop had removed the ubuntu & debian packages
18:35 bhosmer joined #salt
18:35 omkar_ but I couldn't understand how to make a change in salt for the repository change and which repository
18:40 kukacz joined #salt
18:41 breakingmatter joined #salt
18:42 monkeybox scoates: Looks like the {{'s don't parse in my configs, whether /etc/salt/cloud or /etc/salt/cloud.providers.
18:42 monkeybox Seems like salt should really just be grabbing these from ~/.aws/config
18:43 Akhter joined #salt
18:51 winsalt joined #salt
18:52 ferbla joined #salt
18:58 shalkie joined #salt
19:00 iggy scoates: good to know
19:00 pratikmallya joined #salt
19:00 iggy sk_0: {{ sls_path }} or something
19:01 quasiben joined #salt
19:02 berserk joined #salt
19:09 jalbretsen joined #salt
19:10 jbrnds joined #salt
19:12 davisj joined #salt
19:14 apejens joined #salt
19:14 muep joined #salt
19:14 Laogeodritt joined #salt
19:15 ajw0100 joined #salt
19:17 scoates monkeybox: right. what I pasted is the template that the salt minion *renders* into the actual file.
19:24 cberndt joined #salt
19:26 BartS joined #salt
19:34 monkeybox scoates: Ah, I get it now. Thanks. Unfortunately, since it appears jinja doesn't process teh config files before loading, and since yaml doesn't have an include directive, I'm just sol.
19:35 ajw0100 joined #salt
19:35 scoates may be barking up the wrong tree, but: put the data in pillar and build out the file from there with a template
19:35 scoates data = non-secret data. you can use env variables for more-secret stuff. Or at least we do.
19:39 pratikma_ joined #salt
19:44 adelcast does anyone knows why there is no package for salt-proxy?
19:44 otter768 joined #salt
19:45 giantlock joined #salt
19:46 scbunn joined #salt
19:46 BartS Hi Guys
19:47 adelcast I creating the packages for OpenEmbedded...I am thinking that I am going to skip the proxy for now since it sounds to me like it should be it's own package
19:47 BartS Anyone getting bad grain "os_release" on 2015.8.9
19:47 BartS Anyone getting bad grain "os_release" on 2015.8.0*
19:48 scbunn so I thought that if you added environment: blah to your minion config your were "locked" into that environment.  i.e. no bleed through.. but it doesn't look like that is happening.
19:51 thalleralexander joined #salt
19:53 breakingmatter joined #salt
19:56 iggy adelcast: in older versions, it was part of the minion... only in 2015.8 is it separate
20:01 BartS Anybody got this bug ?
20:01 baweaver joined #salt
20:01 BartS Mine says "os_release: proxy"
20:01 BartS Since 2015.8.0
20:02 adelcast but I don't think the 2015.8 minion package contains the minion...
20:03 ageorgop joined #salt
20:03 bluenemo joined #salt
20:03 druonysuse joined #salt
20:03 druonysuse joined #salt
20:07 rvankleeck joined #salt
20:09 sjorge joined #salt
20:09 sjorge joined #salt
20:09 adelcast iggy: sorry, I meant to say, but I don't think the 2015.8 package contains the proxy
20:09 rvankleeck what's the best way to join two grains in jinja so I can use it to look up pillar data?
20:09 adelcast but that might be an oversight
20:10 rvankleeck e.g.: I have ports in a ports:lookup:<team>-<client> where <team> and <client> are grains set on a minion
20:10 rvankleeck and I want to set those ports in a conf file depending on how the grains are set
20:11 rim-k joined #salt
20:11 whytewolf BartS: there are only 2 places where osrelease is set to proxy. junos.py and core.py in core.py [which is most likely the one being used] is is set by seeing if salt.utils.is_proxy returns true. salt.utils.is_proxy returns true is salt-proxy is in main.__file__
20:15 DammitJim joined #salt
20:16 nicmoski rvankleeck: is the ports:lookup on grains as well?
20:17 markm joined #salt
20:18 rvankleeck nicmoski, the ports:lookup is in pillar
20:18 svinota joined #salt
20:19 whytewolf rvankleeck: {% set ports salt['pillar.get']('ports:lookup:' + salt['grains.get']('team',default) + '-' + salt['grains.get']('client',default), default) %} just off the cuff, not tested
20:19 poxin joined #salt
20:19 winsalt cd ..
20:20 whytewolf i think i forgot an = in there
20:20 nicmoski rvankleeck: or something like this: https://gist.github.com/anonymous/f1925de87897b07e254c
20:20 rvankleeck whytewolf, thanks. Was a little iffy on the string concatenation in jinja
20:20 rvankleeck nicmoski, awesome, that looks like it might work as well
20:21 poxin Hi folks. I have a quick question. When running something like "salt '*' virt.freecpu" is there a way to sort the results by hostname instead of when they happen to receive the data back?
20:21 rvankleeck whytewolf, nicmoski Thanks for the help
20:23 ntropy poxin: not out of the box afaik, you could probably write your own returner to sort the output how you like though
20:23 poxin thanks for the quick reply. I thought not. Will probably end up putting in into a txt file and using sed/awk to sort it :)
20:24 poxin trying to run 3 salt commands to get disk, cpu, and ram however it's all split up and a mess to look at
20:25 poxin can you do multiple queries somehow like: "salt '*' virt.freecpu | virt.freemem" etc?
20:25 nicmoski poxin: pepper is nice for this if you're a pyhon guy
20:26 poxin hm, let me look into that - thank you
20:27 s_kunk joined #salt
20:27 clintberry2 joined #salt
20:31 dthom91 joined #salt
20:32 opensource_ninja joined #salt
20:36 BartS whytewolf: I don't understand what you mean
20:36 BartS regarding the "os_release" grain
20:37 iggy whytewolf: I usually suggest people use ~ instead of +
20:38 iggy BartS: basically... is it a proxy-minion?
20:39 baweaver joined #salt
20:39 whytewolf iggy: good to know.
20:40 BartS iggy: No standard minion
20:40 BartS I had no issues with version 2015.5.5
20:40 BartS on OSX I must say
20:41 * iggy backs away slowly
20:42 iggy can you reproduce on a clean system?
20:42 * iggy runs
20:42 whytewolf most likely salt-proxy file is still around.
20:42 whytewolf from the old install
20:44 aparsons joined #salt
20:53 Grokzen joined #salt
20:57 BartS where would that file be
20:58 * whytewolf shrugs. I have no idea on a mac
20:58 BartS Iggy: Haha I know I know... Most of my stations are CentOS but I do have about 30 Macs in the studio, what can i say...
20:59 BartS When they make a Photoshop for Linux I'll be happy to get rid of my OSX
21:00 BartS Whytewolf: same place i presume, my config is in /etc/salt
21:01 BartS on the minions, my master is a linux box though
21:02 whytewolf BartS: maybe locate salt-proxy on one of the macs
21:03 joe_n joined #salt
21:03 BartS its in /usr/local/bin
21:05 BartS Here's the kind of ouput I get from grains...
21:05 BartS https://gist.github.com/anonymous/ee0780f2da267e7f3c19
21:05 BartS Try sorting between OSX and Linux when all it says is "proxy" :-(
21:08 BartS Whats salt-proxy anyway, I don't use it as far as I know
21:10 msx joined #salt
21:10 whytewolf BartS: https://docs.saltstack.com/en/latest/topics/topology/proxyminion/index.html
21:10 sunkist joined #salt
21:11 BartS Ok so I don't use it :-)
21:12 BartS My OSX machines are basic salt-minions, and updated from 2015.5.5 to 2015.8.0 I get bad grains output
21:12 whytewolf it is very doubtful you are using it. but if you installed over the the old copy of salt then most likely the cli file is their which is triggering that proxy output
21:13 whytewolf I'm trying to get my own copy of brew to a point that i can search to see if it seperates the salt packages up. if it doens't that is an issue witht he way brew installs
21:14 whytewolf humm, only option given is saltstack
21:15 whytewolf huh, the 2015.8.0 bottle was only put up 3 hours ago
21:17 elsmo joined #salt
21:18 stooj joined #salt
21:19 tkharju joined #salt
21:20 whytewolf oh joy, the brew installs everything.
21:21 whytewolf BartS: this looks like an issue with the way brew installs trying something now
21:22 cberndt joined #salt
21:22 BartS Actually installed via PIP
21:22 BartS not brew
21:23 Rumbles joined #salt
21:23 BartS If there's now a brew way, I'll try it
21:25 joe_n joined #salt
21:26 rim-k joined #salt
21:26 whytewolf man I hate debuging salt on mac. it is a pain
21:26 quasiben joined #salt
21:27 Rumbles hi, I'm pretty new to salt, I'm trying to figure out how I would set an address dynamically. My use case is I want to set up an rsyslog server in each AWC VPC we have, and I want to configure rsyslog on each client server using salt. I'm trying to figure out how I would assign the correct IP for each VPCs set of servers to send their logs to. I'm searching in the docs and google, but I'm maybe searching for the wrong or too
21:27 Rumbles broad a term, because dynamic addressing isn't getting me anywhere... can anyone point me in the right direction?
21:27 joehh1 joined #salt
21:28 ticosax joined #salt
21:29 iggy Rumbles: that sounds like a job for mine maybe?
21:29 kiper joined #salt
21:30 Rumbles okay, I'll have a search
21:39 dopesong joined #salt
21:42 baweaver joined #salt
21:43 mohae joined #salt
21:44 RandyT_ Rumbles: fwiw, I've recently started down a path to do something similar. I've been working to figure out route53 and some type of scripting mechanism to set internal IP addresses.
21:45 Rumbles okay, how did you get on?
21:45 RandyT_ Rumbles: interesting blog post here gives an example of some scripting that could be used to accomplish some of this.
21:45 RandyT_ http://nessy.info/?p=795
21:45 otter768 joined #salt
21:45 RandyT_ Rumbles: very early stages here. Just trying to get my head around salt at the same time.
21:46 RandyT_ Have run across a couple of bugs in 2015.8 that have slowed me down. Hoping to make some decent progress this week after getting those behind me last week.
21:46 Rumbles I was just reading up on grains, and thinking I could use the ec2_tags grain to decide which machine is in which VPC....
21:47 RandyT_ I'll also investigate iggy suggestion of 'mine'
21:47 hal58th_ joined #salt
21:48 whytewolf BartS: at this point i would sugest putting in an issue. cause it doesn't looke to behave properly at all on mac. I have deleted the salt-proxy files on my own system and STILL get osrelease as proxy
21:48 RandyT_ I'm usually hanging in here if you want to ping me with anything. Not representing myself as knowledgeable at all... just a friend with similar challenge.
21:48 SheetiS yeah salt-mine is great for obtaining the IP addresses of minions to do things with a route53 state or orchestration.
21:48 RandyT_ SheetiS: thanks, will investigate.
21:48 BartS Thanks guys !
21:49 RandyT_ SheetiS: btw, the bug I shared with you regarding hiccups in deployment to ec2 in 2015.8.0 has been fixed.
21:49 rim-k joined #salt
21:49 SheetiS nice
21:50 RandyT_ fwiw, the blog post I just shared educated me on the AWS API for getting things like IP, etc...
21:51 RandyT_ probably should have known about that long ago... was a bit like discovering fire...
21:52 ajw0100 joined #salt
21:56 SheetiS I typically use python+boto if I want to interact with AWS API.  It abstracts most of the heavy lifting and lets me get what I want.  stuff like this: https://gist.github.com/rfairburn/15553a7eeb980302b84a
21:59 aqua^c joined #salt
22:02 alemeno22 joined #salt
22:05 S_Walker joined #salt
22:21 teebes joined #salt
22:26 jonher joined #salt
22:28 baweaver joined #salt
22:31 pravka joined #salt
22:32 druonysuse joined #salt
22:39 bfoxwell joined #salt
22:41 aw110f joined #salt
22:44 RandyT_ SheetiS: thanks for sharing that. Very interesting.
22:52 khaije|mentat joined #salt
22:53 druonysuse joined #salt
22:53 druonysuse joined #salt
22:54 breakingmatter joined #salt
22:54 khaije|mentat so if a sls file is called a state, what are the individual named function calls within them called?
22:55 khaije|mentat ... or maybe I have that mixed up?
22:57 hal58th joined #salt
22:59 whytewolf the file is a "state file" which is a collection of states
23:02 Pixionus joined #salt
23:05 dendazen joined #salt
23:05 deplo joined #salt
23:06 iggy "stanzas"
23:08 godber left #salt
23:13 khaije|mentat iggy: the named functions are called "stanzas"?
23:16 iggy each id+state.func+opts are generally referred to as stanzas
23:24 subsignal joined #salt
23:26 aparsons joined #salt
23:28 zmalone joined #salt
23:28 baweaver joined #salt
23:31 ajw0100 joined #salt
23:34 JDiPierro joined #salt
23:34 tzero joined #salt
23:34 moogyver joined #salt
23:36 khaije|mentat is there anything like a 'comment' kwarg (or some other convention) that I could use as a stanza docstring?
23:46 sunkist joined #salt
23:46 otter768 joined #salt
23:55 breakingmatter joined #salt
23:56 tzero joined #salt
23:59 pratikmallya joined #salt
23:59 bfoxwell joined #salt

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