Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-09-08

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

All times shown according to UTC.

Time Nick Message
00:11 Zachary_DuBois joined #salt
00:41 schemanic joined #salt
00:43 woodtablet left #salt
00:47 johnj_ joined #salt
01:09 schemanic How do I go about specifying an empty dict in my template if no dict values are found?
01:09 dstensnes honestly: no, i wouldn't say so.... i'm not using it in a shell script (not my github issue), but the program that reads my .ini file doesn't like the extra spaces
01:09 schemanic https://gist.github.com/anonymous/51f62be9ea759c727c329e2f2fcce01d
01:10 dstensnes honestly: and it's also perfectly valid for config files for shell scripts actually
01:11 dstensnes some shell scripts use ". myscript.cfg" to load configuration settings
01:12 dstensnes which would work fine with this ini.options_present thingy if it wasn't for the extra hardcoded spaces, which breaks more than they fix
01:13 dstensnes but yeah... have implemented a workaround where i call file.replace to filter out the bothersome spaces after every call to ini.options_present
01:14 dstensnes only issue with that is that the file is changed by ini.options_present to have spaces, then file.replace changes it back
01:14 dstensnes so file is updated on every run
01:14 schemanic This is the best I understand how to do. If anyone could give me some more elegant pointers I'd appreciate it.
01:15 dstensnes empty dics are just {}
01:15 dstensnes aren't they?
01:15 dstensnes and empty lists are just []
01:15 dstensnes i think
01:15 schemanic https://gist.github.com/anonymous/254f29d5327f5f482fc80c8ab76dc0db
01:15 dstensnes but not sure what you are getting at
01:16 schemanic What I'm trying to do is make sure that my state doesn't fail if my pillar looks like this:
01:16 schemanic key:
01:16 schemanic (with no value specified)
01:16 dstensnes i see
01:17 dstensnes well, try it and see if it works :)
01:18 schemanic I did already. it fails if I don't give it something. I've added the second gist to set the empty setting to {} but I dont know if that's ugly or not
01:28 dstensnes okay, then i don't know
01:28 dstensnes try googing a "jinja" and see if someone have had the same problems
01:28 dstensnes could also be something with iter_items maybe, but i don't know
01:28 dstensnes i just know i had to use that at one point, but don't remember why
01:29 dstensnes anyway, i got to go to bed
01:29 dstensnes it 03:29 am here, and work tomorrow, so i better sleep fast :)
01:29 mechleg schemanic: it looks like that should work, but why not just do your for loop after checking the state of settings from your if loop?
01:29 dstensnes good luck
01:30 schemanic mechleg, I do
01:30 schemanic there are two for loops
01:33 tiwula joined #salt
01:33 mechleg if i understand correctly, you have a failure in https://gist.github.com/anonymous/51f62be9ea759c727c329e2f2fcce01d when settings == None, so i am saying you could do that for loop only if settings != None or only if settings.keys() exists
01:35 scc joined #salt
01:37 schemanic right, because I still want the template to use the key, but if the key's value is None, I want it to iterate through nothing and go on
01:38 schemanic so you're saying use literally {% if settings.keys() exists %}
01:42 schemanic I dont understand, it works in python the way I have it but not in jinja
01:55 ilbot3 joined #salt
01:55 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
01:56 mechleg schemanic:  in your second example, https://gist.github.com/anonymous/254f29d5327f5f482fc80c8ab76dc0db the issue appears to be that there is no value when settings == None, so in that case i would add a check that when settings == None then value is also None
01:57 schemanic mechleg
01:57 schemanic If settings == None then I set settings = {}
01:58 schemanic so the second iteration just doesn't find anything and should proceed
01:58 schemanic there's a settingS and a settinG variable
01:58 schemanic because there are two iterations
01:58 schemanic is that not clear?
02:01 mechleg right, but then you attempt too iterate over an empty dict, you will get an error in that for loop
02:02 zerocool_ joined #salt
02:03 zerocool_ joined #salt
02:07 schemanic that's wierd, because when I iterate over an empty dict in straight up python, I don't get a problem
02:07 schemanic Also I'm now thinkin my states arent making it to the server
02:07 schemanic I'm going with this now:
02:08 schemanic https://gist.github.com/anonymous/726ef0c0bfdfc15f27abe8061c2e23ac
02:08 schemanic So now I don't even try to iterate if it's none
02:08 schemanic and it still is complaining
02:10 mechleg what line is it complaing about?  i just did a quick test and it looks lt should behave as you are expecting it to, to just skip over the empty dict
02:12 schemanic it's giving me this: https://gist.github.com/anonymous/062c01aba1d755d5c4d644a41064b50c
02:12 schemanic It doesn't give a line number
02:13 schemanic What am I supposed to run on my salt master to disperse updates to the state tree?
02:13 schemanic I'm running salt-run fileserver.update
02:26 mechleg hmm, i do not know what would be needed, in my system updated sls files are immediately picked up by subsequent runs and i thought that was the default.  though i might have an answer for the empty dict issue
02:27 mechleg does the error change at all if you change None to a string in line 8?  {%- if settings != "None" -%}
02:39 csaurabh joined #salt
02:49 johnj_ joined #salt
02:49 evle joined #salt
03:05 cyteen joined #salt
03:26 Guest24_ joined #salt
03:28 Guest24_ joined #salt
03:40 michelangelo joined #salt
03:50 johnj_ joined #salt
04:15 Diaoul joined #salt
04:20 preludedrew joined #salt
04:27 ekkelett joined #salt
04:33 vexati0n finally my salt-api project doesn't suck https://imgur.com/XtbXNEs
04:36 miruoy joined #salt
04:48 golodhrim|work joined #salt
04:50 johnj_ joined #salt
04:52 msn joined #salt
04:57 ProT-0-TypE joined #salt
05:05 jas02 joined #salt
05:06 Guest24 joined #salt
05:06 jas02 joined #salt
05:11 abrcdbr joined #salt
05:11 DanyC joined #salt
05:11 seffyroff joined #salt
05:21 marcaurele joined #salt
05:29 Bock joined #salt
05:31 Aikar joined #salt
05:31 Aikar joined #salt
05:37 marcaurele joined #salt
05:48 sh123124213 joined #salt
05:50 rgrundstrom Morning everyone.
05:51 johnj_ joined #salt
05:57 pualj joined #salt
06:06 felskrone joined #salt
06:07 dxiri joined #salt
06:17 ibro joined #salt
06:26 chowmeined joined #salt
06:26 _KaszpiR_ joined #salt
06:39 usernkey joined #salt
06:39 impi joined #salt
06:52 bartuss7 joined #salt
06:52 johnj joined #salt
06:53 coredumb Morning
06:53 Ricardo1000 joined #salt
07:10 pualj joined #salt
07:11 zulutango joined #salt
07:18 Hybrid joined #salt
07:19 aldevar joined #salt
07:21 mikecmpb_ joined #salt
07:24 rgrundstrom Im having problems with the bug reported in https://github.com/saltstack/salt/issues/43133 my code is https://gist.github.com/anonymous/b11918b4ee10ad9450546f4fbc141f4c#file-gistfile1-txt anyone know I can work around it cause this is a major issue for us.
07:27 babilen rgrundstrom: Did you try the fix?
07:28 babilen Is this with yum?
07:30 rgrundstrom y
07:31 rgrundstrom babilen: Yes its yum. And no we have not tried the fix since this is our production line. I know that the issue is going to be resolved in 2017.7.2 but i dont even have a release date for that so
07:32 ReV013 joined #salt
07:32 ReV013 left #salt
07:33 vb29 joined #salt
07:33 vb29 left #salt
07:33 babilen Put the fixed module in _states, sync and be happy?
07:35 vb291 joined #salt
07:35 vb291 left #salt
07:36 rgrundstrom babilen: To be honest ive never used a custom state file... I could give it a try, how ever the dokumentation for using the custom states are bad and ive never got it to work before. Could you give me a hand and we will try it?
07:36 impi joined #salt
07:37 babilen You copy the file you want to sync to _states in file_roots and run saltutil.sync_all .. that's it
07:39 DanyC joined #salt
07:42 rgrundstrom babilen for my issue it would be this one i recon https://github.com/saltstack/salt/blob/2017.7.2/salt/states/pkgrepo.py ?
07:43 babilen You could either copy the entire file from 2017.7.2 or apply the referenced fix to the module in 2017.7.1 -- The former *might* not work if it relies in changes in other modules as well
07:46 rgrundstrom babilen: Are you refering to the full modules folder with "You could either copy the entire file from 2017.7.2"?
07:46 rgrundstrom Or actually everything in 2017.7.2?
07:46 babilen I am referring to the entire file, yes .. it completely replaces the "states.py" module that comes with the release
07:46 babilen Err, pkgrepo.py naturally
07:47 babilen You want to cherry pick 72320e35b900ca1fa88a7376d8512c24bd966768
07:49 babilen There haven't been other changes you have to concern yourself with though, so just copying https://github.com/saltstack/salt/blob/2017.7.2/salt/states/pkgrepo.py to _states and syncing should do the trick
07:49 babilen Obviously test this first :)
07:51 thethingy joined #salt
07:52 rgrundstrom babilen: Testing now :)
07:53 johnj joined #salt
07:53 * rgrundstrom is banging the head in the table... This is so slow. I relly need to fix this code....
07:54 DanyC joined #salt
07:55 _KaszpiR_ joined #salt
07:57 ikarpov joined #salt
07:57 jhauser joined #salt
07:57 rgrundstrom babilen: Hmmmm if im not mistaking the file from _states should be moved to the minion (I.e /var/cache/salt/minion/extmods) when the sync is done?
07:58 babilen It should have been synced to the minion, yes
07:58 rgrundstrom babilen: Well its not there
07:58 sjorge joined #salt
07:59 babilen Did you sync it?
07:59 rgrundstrom yes
07:59 babilen Then more information is needed :)
08:00 rgrundstrom Dont you need to configure the master to use the extmods?
08:00 babilen The file has to be in file_roots
08:00 babilen Where do you keep your states at the moment?
08:01 rgrundstrom babilen: Ahhh wrong place... resyncing now.
08:01 _KaszpiR_ joined #salt
08:04 pbandark joined #salt
08:06 rgrundstrom babilen: ok so i can see that the state file is present on the minion now. But it does not seem to be using it whn i run the state.
08:07 Rumbles joined #salt
08:07 babilen Did you restart the minion?
08:07 rgrundstrom Em no...
08:08 rgrundstrom Did not know i needed to do that :)
08:09 babilen I had hoped it wouldn't, but it won't hurt :)
08:09 rgrundstrom Ill know in a minute or 2
08:14 * rgrundstrom soooo slooooowww.... Zzz Zzz
08:15 mikecmpbll joined #salt
08:16 babilen What's taking all that time?
08:16 rgrundstrom babilen: Still having the same issue
08:17 mikecmpbll joined #salt
08:18 rgrundstrom babilen: The one that wrote most of this (not me) did some stuff that takes forever to run. I.e restarting services several times in for loops etc... I havent had the time to fix it yet. And its not prioritized.
08:19 babilen Aye
08:20 babilen Could you ensure that the module is loaded correctly (e.g. by introducing an obvious error or log message .. just to make sure that it is working with the referenced code
08:20 babilen If that doesn't solve it, something else is up and has to be done. For that we probably need a lot more information as to what is happening and might have to write code
08:22 rgrundstrom babilen: just noticed that there is an additional file in my /var/cache/salt/minion/extmods/states/pkgrepo.pyc is this normal behavior?
08:28 mrueg joined #salt
08:29 rgrundstrom babilen: I wrote "Im breaking this configuration." into the pkgrepo.py state file... Im not getting any errors when running. But then again could it just be ignoring it?
08:31 babilen You should see that in the minion debug logs during startup
08:31 babilen I'll be back later
08:32 sh123124213 joined #salt
08:34 _KaszpiR_ joined #salt
08:36 teratoma joined #salt
08:45 rgrundstrom babilen: https://gist.github.com/anonymous/569480a1267e82e69191d0708e51c52d#file-gistfile1-txt
08:54 johnj joined #salt
08:57 kedare joined #salt
09:03 babilen rgrundstrom: So, it is loaded .. guess your issue is not the one you thought it was
09:04 babilen (or that patch doesn't fix it)
09:04 rgrundstrom babilen: It seems to be part of the problem. im debuging atm
09:10 rgrundstrom babilen: it was a 2 fold problem... The bug was one of them, the second one was an incorrect pillar.
09:10 rgrundstrom tests are running fine now.
09:10 OliverUK left #salt
09:14 vb29 joined #salt
09:19 jas02 joined #salt
09:22 rgrundstrom babilen: It takes 1 minute to run state.apply on 1 server.
09:22 preludedrew joined #salt
09:23 rgrundstrom Even longer if i run multipable server due to the load on the salt-master
09:38 coredumb btw https://www.redhat.com/en/about/press-releases/red-hat-advances-enterprise-and-network-automation-new-ansible-offerings
09:38 coredumb RH has opensourced ansible tower
09:39 coredumb https://www.ansible.com/awx-project-faq this link makes more sense I guess
09:41 coredumb I'd be happy to discuss what are SaltStack plans for their pro oferrings after such announce if there's someone from SaltStack around :)
09:44 kedare_ joined #salt
09:44 oida_ joined #salt
09:53 babilen coredumb: That's fantastic news and quite the attack on SaltStack
09:53 debian112 joined #salt
09:55 johnj joined #salt
09:58 gnord joined #salt
10:01 debian1121 joined #salt
10:04 hexa- joined #salt
10:09 chowmein__ joined #salt
10:11 yidhra joined #salt
10:13 schasi joined #salt
10:17 mTeK joined #salt
10:26 smead joined #salt
10:40 zerocool_ joined #salt
10:50 abrcdbr joined #salt
10:52 usernkey1 joined #salt
10:55 johnj joined #salt
11:00 pbandark1 joined #salt
11:07 kedare_ joined #salt
11:12 XenophonF joined #salt
11:13 oida joined #salt
11:21 Church- joined #salt
11:25 onovy joined #salt
11:28 flebel joined #salt
11:35 sh123124213 joined #salt
11:38 jas02 joined #salt
11:53 pualj_ joined #salt
11:56 johnj joined #salt
11:58 wavded joined #salt
11:59 pualj joined #salt
12:10 zerocool_ joined #salt
12:10 Nahual joined #salt
12:12 zerocool_ joined #salt
12:20 evle1 joined #salt
12:22 johnkeates joined #salt
12:37 smead joined #salt
12:38 jas02 joined #salt
12:43 gh34 joined #salt
12:46 dxiri joined #salt
12:47 oida_ joined #salt
12:55 jas02_ joined #salt
12:57 johnj joined #salt
13:07 sjorge joined #salt
13:08 jas02 joined #salt
13:13 ssplatt joined #salt
13:21 cyteen joined #salt
13:32 pualj joined #salt
13:32 schemanic joined #salt
13:33 tapoxi joined #salt
13:35 mchlumsky joined #salt
13:37 speedlight joined #salt
13:42 cgiroua joined #salt
13:53 dxiri joined #salt
13:54 hatifnatt Hi. Am I right and most ext_pillar modules doesn't support multiple environments?
13:57 racooper joined #salt
13:58 johnj joined #salt
13:58 dstensnes hatifnatt: git thingy uses branches as far as i can remember at least
13:59 dstensnes hatifnatt: don't know about all the others
13:59 schemanic hello
13:59 dstensnes schemanic: hello :)
13:59 schemanic dstensnes, I'm going to try not having dictionary keys without values for that problem I had last night
14:00 schemanic thanks for the help dstensnes, mechleg, Edgan
14:00 dstensnes schemanic: :)
14:00 dstensnes np :)
14:00 hatifnatt dstensnes: yes git_pillar support environments, but file_tree, valut does not :(
14:00 dstensnes okay?
14:00 dstensnes sure?
14:01 schemanic Whats the best way to get pillar data into a template? I've seen it done by passing defaults or context items in via the state, and I've seen it done by having the template explicitly get a pillar dict by importing the map file.
14:01 jas02 joined #salt
14:03 dstensnes about this environment stuff
14:03 dstensnes why is there a top file for each environment?
14:04 dstensnes i mean, each top file specifies what environment to use?
14:05 hatifnatt top file contains data specific for that environment.
14:07 dstensnes true
14:08 dstensnes but so, why does the top file define the environment at all?
14:08 dstensnes or have i completely misunderstood the thingy
14:08 hatifnatt you mean why specify env "tag" in top file?
14:08 dstensnes yes
14:09 schemanic hey I'm trying to check if a key I'm iterating over is a specific key, and I'm doing it by if key == 'targetval', but my conditionals arent executing. what's going on
14:09 dstensnes i see the need for multiple environments
14:09 dstensnes however find it a bit confusing that each topfile also defined the environment
14:12 akoumjian joined #salt
14:12 dxiri joined #salt
14:15 Felgar joined #salt
14:15 dxiri_ joined #salt
14:18 hatifnatt dstensnes: usually it's same file in different branches. So when it is in dev branch 'dev:' subtree will be used, and than you push it to 'base' (prod, master whatever you call it) and now 'base:' subtree is used.
14:19 wavded joined #salt
14:19 Rumbles joined #salt
14:20 dstensnes hatifnatt: i sort of understood that, but why do they define it all in the top file is my question
14:21 dstensnes hatifnatt: if i read the documentation correctly, having top_file_merge_strategy set to merge_all is bound to create all sorts of problems
14:21 ztychr joined #salt
14:22 dstensnes this sentence is downright scary: "When set to merge_all, then all states in all environments in all top files will be applied. The order in which individual SLS files will be executed will depend on the order in which the top files were evaluated, and the environments will be evaluated in no specific order"
14:22 dstensnes from here: https://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-top_file_merging_strategy
14:28 abrcdbr joined #salt
14:29 ztychr joined #salt
14:29 ztychr joined #salt
14:32 hatifnatt dstensnes: I think merging is different question and I'm agree it is. Don't forget you can configure minion to only
14:33 hatifnatt *and I'm agree it isn't wery transparent and easy to understand. Don't forget you can configure minion to only use states from specific environments.
14:38 hatifnatt I'm still have a question how to loop over multiple hosts and apply individual pillar to each of them. I.e. I have 10 pillars with different passwords and I want to apply them to specific minions basing on some criterion, minion IP for example. How can I achieve this?
14:42 ooboyle joined #salt
14:44 ooboyle am I correct in thinking that salt.runners.manage.bootstrap_psexec can't be used to push to devices that do not already have a minion installed?
14:44 OliverUK1 joined #salt
14:53 tapoxi joined #salt
14:56 tiwula joined #salt
14:57 dendazen joined #salt
14:59 johnj joined #salt
14:59 marcaurele joined #salt
15:03 astronouth7303 ooboyle: i'm not familiar with it, but by the name i would think that would be the goal?
15:05 zerocool_ joined #salt
15:08 numkem joined #salt
15:10 omie888777 joined #salt
15:11 fatal_exception joined #salt
15:13 zerocool_ joined #salt
15:13 lordcirth_work I'm using archive.extracted with if_missing:   /var/www/nextcloud , a dir which definitely exists, but test mode says it will redownload the tarball to check if extraction is needed
15:14 lordcirth_work Is that just a bug in test reporting?
15:14 pbandark1 joined #salt
15:15 hashwagon joined #salt
15:21 KevinAn2757 joined #salt
15:23 ivanjaros joined #salt
15:28 DanyC joined #salt
15:31 zerocool_ joined #salt
15:38 csmule joined #salt
15:41 numkem joined #salt
15:41 dstensnes hatifnatt: i suppose you could use jinja variables as arguments to pillar.get?
15:41 dstensnes does that help?
15:42 dstensnes like a "for" loop, and concatenate the variable to pillar.get or something?
15:46 marcaurele joined #salt
15:52 pbandark joined #salt
15:53 whytewolf hatifnatt: https://gist.github.com/whytewolf/dac1c1938954a1431e5c7803886c015f
15:56 pbandark i am plaining to automate oracle 12c DB using salt. but i can see the installation procedure runs oracle GUI. i am wondering how I can automate it with saltstack. any pointers ?
15:57 pbandark automate oracle 12c DB *installation
15:57 NeoXiD joined #salt
16:00 johnj_ joined #salt
16:12 nixjdm joined #salt
16:18 NeoXiD joined #salt
16:20 oida joined #salt
16:20 ooboyle @astronouth7303 it would be my goal but when I run the example commands against a non-minion device it tells me "No minions matched the target. No command was sent, no jid was assigned. ERROR: No return received"
16:20 astronouth7303 oh, it's a runner
16:20 astronouth7303 not an execution module
16:20 ooboyle and i know the target is available
16:21 ooboyle yeah
16:21 tvinson pbandark: look into response files
16:21 astronouth7303 you run it as `salt-run manage.bootstrap_psexec`
16:21 ooboyle right now minions are mostly being manually installed. Looking to push them somehow a little more bulk-like
16:22 astronouth7303 you should also look at salt-cloud
16:22 ooboyle that's how i ran it
16:22 ooboyle salt manage.bootstrap_psexec hosts='192.168.144.163'
16:22 astronouth7303 nope
16:22 astronouth7303 salt-run
16:22 ooboyle AH!!
16:23 astronouth7303 `salt` is always for execution modules, which run on minions
16:23 astronouth7303 `salt-run` is for runner modules, which run on the master
16:23 pbandark tvinson: ahh. ok. i didnt know we can use response file for installation. i can see https://docs.oracle.com/cd/B19306_01/install.102/b15660/app_nonint.htm
16:23 astronouth7303 (there's also wheel modules, but they usually have their own individual commands, like `salt-cloud` and `salt-key`)
16:24 pbandark thanks for pointers. wll give a try
16:24 ooboyle got it. Still new to salt. So I ran it with salt-run but got a traceback...
16:27 dxiri joined #salt
16:27 deftjack joined #salt
16:28 marcaurele joined #salt
16:28 deftjack https://paste.fedoraproject.org/paste/cKWtBIyT21Gddu4YJlZ9Gw   Other namespaces (ie: the motd one work perfectly). Its as if anything deeper than the first level cant be found.  Any thoughts what I have wrong?
16:28 ooboyle traceback https://gist.github.com/ooboyle/994423f21abee4d23e02fb9a95d91ec0
16:29 numkem joined #salt
16:29 deftjack note: effectively new to salt so sorry if Im missing something fundamental or using incorrect terminology. learning...
16:30 hatifnatt dstensnes: yes I can use Jinja, but I cant reference another pillar in pillar https://github.com/saltstack/salt/issues/6955
16:30 wavded joined #salt
16:44 onlyanegg joined #salt
16:49 deftjack nm on that found the typo.
16:50 hatifnatt whytewolf: thanks for idea with grains['id']
16:50 hatifnatt Looks like something to work with.
16:51 whytewolf hatifnatt: yeah. i only sugest that now that grains['id'] has been locked to the minion_id in the master. before i really would have coutioned against it. as grains are an insecure method to target against in pillar
16:55 hatifnatt Ok, thats now minion_id is the same thing which I get while listing salt-key -L ? And "now" - since 2017+ vesion of salt?
16:57 NeoXiD joined #salt
16:57 whytewolf yes that same minion id. and I have only tested 2017.7 for the update. and I"m pretty sure at least 2016.11.5 still used the grains version of grains['id'] instead of coding it to minion_id
17:00 hatifnatt So now minion id is something special, not like other grains?
17:01 johnj_ joined #salt
17:01 phileus0 joined #salt
17:02 whytewolf well minion_id has always been special. but now the grains['id'] is locked to that id. the minion_id is what the master has it's pki keys set to.
17:06 vexati0n why does "win_wua.available" just say, "nothign to return" ?
17:06 vexati0n that's silly and it should stop happening
17:06 * whytewolf shrugs. i don't do windows so
17:07 vexati0n yeah i wish i was that lucky
17:07 hatifnatt Is it right that pillars renders on master? I think I read about it before, but can't find anything now. I.e. if I'm using some execution module like salt['network.ip_addrs']()[0] I get my master IP, not a minion IP.
17:08 whytewolf yes, pillars are rendered on the master
17:08 mikecmpbll joined #salt
17:10 deftjack left #salt
17:11 DanyC joined #salt
17:12 phileus0 joined #salt
17:12 hatifnatt But current minion grains are available...
17:13 phileus0 joined #salt
17:13 it_dude joined #salt
17:16 Rumbles joined #salt
17:17 phileus0 whytewolf: still having issues with PAM authentication.  https://github.com/saltstack/salt/blob/2015.5/salt/auth/pam.py#L159.  def authenticate() never seems to be called.
17:17 phileus0 Anyone have any ideas?
17:19 sarcasticadmin joined #salt
17:19 SaucyEl__ joined #salt
17:21 _JZ_ joined #salt
17:26 schemanic joined #salt
17:31 ztychr joined #salt
17:32 ztychr joined #salt
17:32 hatifnatt whytewolf: does that minion_id change documanted anywhere? Or you found it by reviewing code?
17:34 whytewolf I was told about it then tested it.
17:47 ivanjaros joined #salt
17:49 vexati0n shameless bragging -- cool stuff you can do w/ salt-api: https://imgur.com/XT5z8bF
17:55 hatifnatt whytewolf: ok, got it.
18:00 Rumbles joined #salt
18:01 johnj_ joined #salt
18:12 coredumb whytewolf: you mean the grain id can't be overriden now?
18:13 whytewolf coredumb: in pillar yes
18:14 whytewolf still can in states but. eh. that was never a secuerity risk anyway
18:15 oida_ joined #salt
18:15 coredumb ah that's good!
18:15 coredumb did it happen in 2017.x ?
18:15 whytewolf i don't know what version it happened in to be honest
18:16 whytewolf it happened when i wasn't looking
18:17 _KaszpiR_ joined #salt
18:21 coredumb damn whytewolf how could it happen?
18:23 _KaszpiR_ joined #salt
18:30 debian112 joined #salt
18:34 abrcdbr joined #salt
18:36 nixjdm joined #salt
18:37 abrcdbr_ joined #salt
18:38 _JZ_ joined #salt
18:59 schemanic can you use variables when setting variables?
18:59 schemanic like, is this valid: {% set openjdk_executable = /usr/lib/jvm/jre-1.{{ environment.version}}.0-openjdk/bin/java %}
19:02 dstensnes yes, but you don't {{}} them like that
19:02 dstensnes you have to "" the other bits of the string
19:02 dstensnes and glue them together
19:02 dstensnes general rule is never {{}} within {% %}
19:02 johnj_ joined #salt
19:03 dstensnes if i understand it correctly
19:04 schemanic {% set openjdk_executable = "/usr/lib/jvm/jre-1." +  environment.version + ".0-openjdk/bin/java" %}
19:04 dstensnes i think that is the way to do it
19:05 systemexit schemanic: also valid: {% set openjdk_executable = "/usr/lib/jvm/jre-1.%s.0-openjdk/bin/java" | format(environment.version) %}
19:05 dstensnes not sure that is equally readable though, but..
19:05 dstensnes :)
19:05 schemanic systemexit, thanks. I've been used to doing that from writing printfs in bash
19:05 whytewolf for reference {{}} is shortcut for {% print things in {{}} %}
19:09 perfectsine joined #salt
19:12 dstensnes apparently ~ it made for concatenating strings: http://jinja.pocoo.org/docs/2.9/templates/#other-operators
19:12 dstensnes according to this: http://jinja.pocoo.org/docs/2.9/templates/#math
19:13 dstensnes i didn't know
19:14 systemexit nice. sounds preferable to using + in most cases
19:15 whytewolf it is
19:17 schemanic hey, my alternatives state failed, and I dont' know what to look at to debug
19:17 schemanic would that be in /var/log/salt/master?
19:18 fullstop joined #salt
19:18 fullstop is repo.saltstack.com down?
19:18 whytewolf schemanic: salt-call on the minion with -l debug
19:18 schemanic k
19:18 fullstop 198.199.77.106 doesn't seem to be responding
19:19 dstensnes http://downforeveryoneorjustme.com/repo.saltstack.com
19:19 fullstop those down detectors aren't always reliable.
19:20 dstensnes well, it's down for me too, so even without that downtime detector i would say we are 2 for 2 now :)
19:20 fullstop especially if they are dual stack and ipv6 works
19:20 fullstop well, that's sad.
19:20 fullstop 130 seconds left on the dns ttl
19:22 schemanic yeah I don't get it. It just says that there's an error and that the state doesn't pass
19:22 preludedrew joined #salt
19:22 schemanic https://gist.github.com/anonymous/9785f312686fcc95a37bb43deb7b45a2
19:22 five04tluv joined #salt
19:23 whytewolf whats the state look like?
19:23 fullstop no love
19:24 whytewolf and does the command 'alternatives --install /use/bin/java java /usr/lib/jvm/jre-1.8.0-openjdk/bin/java 9000' work on that minion?
19:25 schemanic yes it does
19:25 schemanic that alternative is already there
19:25 fullstop why do we need to register to get the salt repo now?  :-(
19:25 whytewolf register?
19:25 fullstop https://saltstack.com/saltstack-downloads/
19:26 schemanic whytewolf: https://gist.github.com/anonymous/604874cd700401822d4d81d348900855
19:27 whytewolf humm, salt can't find alternatives according to that error.
19:28 schemanic wait what?
19:28 schemanic like, it cant find the binary to run it?
19:28 whytewolf [ERROR   ] Alternative for java not installed:
19:28 whytewolf yeah
19:29 fullstop I'm guessing that the service which sends the email with the repo information is also hosted on repo.saltstack.com.  :-D
19:29 whytewolf fullstop: i don't think registration is needed to access the repo. just for if your going through that page they want registeration
19:30 whytewolf i think there is just an outage
19:30 fullstop I understand
19:30 fullstop but if you go to saltstack.com looking to install, the first thing they ask for is your information.
19:30 fullstop that's new to me.  I was just adding a new server and couldn't install the minion.
19:31 whytewolf thats always been like that.
19:31 fullstop hmm
19:31 tapoxi joined #salt
19:31 fullstop maybe I just went through the docs page before.
19:31 schemanic whytewolf, that error HAS to mean "I failed to do the thing you told me to" not "Salt cannot find the program named 'alternatives' on your system"
19:31 whytewolf schemanic: no. it doens't HAVE to
19:32 schemanic well how would I check what it means, because running the command on the line works perfectly
19:32 fullstop ipv6 doesn't work, either.  The funny thing is the server _just_ went down.
19:32 schemanic the command that it put together worked perfectly
19:34 whytewolf humm, alternatives had to be detected or the alternatives module wouldn't have even loaded. checking the code now
19:34 schemanic It's a bug
19:34 schemanic https://github.com/saltstack/salt/issues/38802
19:34 fullstop is there a repo.saltstack.com mirror list?
19:35 schemanic the alternative IS created
19:35 schemanic but the state fails
19:35 whytewolf schemanic: if it is working but reporting error put in a github issue
19:35 whytewolf fullstop: no
19:36 whytewolf no mirrors currently exist. except for the one most people create themselves
19:36 mavhq joined #salt
19:36 fullstop so sad
19:36 whytewolf gtmanfred: poke, whats up with repo.saltstack.com
19:36 schemanic whytewolf, it looks like there's already an issue for it
19:37 gtmanfred we are aware of the problem and are working on it
19:37 whytewolf :P
19:37 fullstop thanks, gtmanfred
19:39 jas02 joined #salt
19:40 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See
19:40 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers <+> We are aware of a problem with the repos and it is being worked on. Thanks for your patience.
19:43 fullstop it's back up!
19:44 fullstop thanks, gtmanfred
19:46 gtmanfred :+1:
19:46 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
19:48 gtmanfred it might go down in a little bit, we are going to move this to a load balancer, right now it is using one node with haproxy
19:51 marcaurele joined #salt
19:52 nixjdm joined #salt
20:03 johnj_ joined #salt
20:06 fullstop +1 for haproxy
20:06 fullstop one of my favorite projects
20:06 fullstop willy is such an amazing (and modest!) programmer.
20:10 lordcirth_work HAProxy is great.  Add keepalived for full HA.
20:13 perfectsine_ joined #salt
20:15 lordcirth_work I've set up a 3-building HA Nextcloud with keepalived, HAProxy, and Apache.  Ceph for the storage.
20:24 divisiond joined #salt
20:29 Guest50 joined #salt
20:30 Guest50 left #salt
20:31 blathijs left #salt
20:35 skatz joined #salt
20:35 vexati0n hilarity: find an issue with shared minion data cache, github support guy says "i don't think you're supposed to share the minion cache"
20:37 whytewolf which ticket?
20:37 vexati0n 43381
20:42 xet7 joined #salt
20:50 abrcdbr joined #salt
20:53 nixjdm joined #salt
20:57 cyborg-one joined #salt
21:03 Guest73 joined #salt
21:04 johnj_ joined #salt
21:06 preludedrew joined #salt
21:07 skatz What's the recommended way to use salt to upgrade salt-minion on windows? Is the esky method best? Or would a cmd.run that downloads and executes the installer be preferable? Something else entirely? I'd like to do this with states rather than execution modules if possible...
21:09 whytewolf iirc https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.update
21:10 skatz Yep that's the esky method. Looks like I'd have to build and host a zip file of the salt install myself? https://docs.saltstack.com/en/latest/topics/tutorials/esky.html
21:11 whytewolf well the docs says it defaults to https://repo.saltstack.com/windows/
21:12 whytewolf so you shouldn't need to host your own
21:13 sjorge joined #salt
21:13 skatz ah i see
21:13 skatz i think i have to be on an esky build already to upgrade via esky/saltutil.upgrade
21:13 skatz let me see if I can do that
21:13 whytewolf that might be true
21:13 skatz thanks for the sanity check :)
21:18 whytewolf that moment when google notices you search for salt things so often that it starts auto adding salt or minion you every search
21:20 zerocool_ joined #salt
21:50 pualj joined #salt
21:52 nixjdm joined #salt
22:01 sarcasticadmin joined #salt
22:05 iggy vexati0n: I don't think you are
22:05 johnj_ joined #salt
22:06 abrcdbr_ joined #salt
22:07 gtmanfred vexati0n: just because it can be used for failover multimaster, does not mean it can be used with Active-Active master
22:08 gtmanfred which is why i asked the rest of the team to weigh in
22:08 gtmanfred as for syndic, i don't know yet, which is why i asked the rest of the core team for someone who may have contributed to this part of the project
22:09 abrcdbr_ joined #salt
22:15 xet7 joined #salt
22:22 socket- Can the top file be used to target minion based on their subnet? Like can I do base: \n 'S@X.X.X.X/X': \n - application.removefluff or does it have to be based on minion name?
22:23 whytewolf socket-: - match: compound
22:23 whytewolf or - match ipcidr with 'x.x.x.x/x'
22:24 feliks joined #salt
22:26 rewbycraft joined #salt
22:27 Vaelatern So if I want to change my file and pillar contents on the salt master, can I assume the changes will eventually be propegated, or is it best practice to call state.highstate?
22:27 gtmanfred salt will never manually propogate the files
22:27 gtmanfred you have to call highstate too apply them
22:27 gtmanfred unless you set a schedule or cronjob on the minion to periodically apply files
22:27 Vaelatern Now I know! Thank you!
22:27 gtmanfred https://docs.saltstack.com/en/latest/topics/jobs/
22:29 gtmanfred we are all about pushing and controling updates
22:29 gtmanfred not eventual consistency like puppet and chef
22:31 dendazen joined #salt
22:31 socket- whytewolf: thanks, sorry but im not sure i still understand. Can you help me fill in the blanks for whatgoeshere
22:31 socket- https://apaste.info/puWI
22:31 gtmanfred socket-: the ip range goes in WHATGOESHERE
22:31 gtmanfred match is just `ipcidr`
22:32 socket- ohh, thanks i think i get it now
22:32 gtmanfred socket-: see the example here https://docs.saltstack.com/en/latest/topics/targeting/ipcidr.html
22:34 socket- great thanks, so kinda like this: https://apaste.info/8izu
22:34 gtmanfred yup
22:35 coredumb Vaelatern: or you use the event bus and reactor to automatically call highstate or state upon state/pillar change
22:36 rpb joined #salt
22:36 gtmanfred alright, I am out for the next 9 days, vacation!
22:36 whytewolf nice, have fun!
22:38 gtmanfred yup, going to san antonio to get married :D
22:39 whytewolf even nicer congratz!
22:42 Yamakaja joined #salt
22:51 nixjdm joined #salt
23:03 omie888777 joined #salt
23:06 johnj_ joined #salt
23:09 icebal joined #salt
23:32 pppingme joined #salt
23:42 onlyanegg joined #salt

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