Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-11-23

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

All times shown according to UTC.

Time Nick Message
00:00 cmarzullo dpkg -L salt-minion
00:00 * whytewolf shrugs.... that would be in your python library.... and I forget where that is in ubuntu
00:00 whytewolf maybe in /usr/lib/python2.7/
00:00 whytewolf and either site-packages or dist-packages
00:07 dxiri_ joined #salt
00:13 raspado i can build multiple salt masters in a single environment and the minions wont do any auto discovery right?
00:21 jas02 joined #salt
00:23 msn2 joined #salt
00:24 Edgan raspado: minions, by default, assume the hostname is salt, otherwise you have to configure the name in /etc/salt/minion
00:25 Guest80563 whytewolf: got it working.
00:25 raspado if we name it salt.blah.domain.net
00:25 raspado will the minion still hit the box?
00:25 Edgan raspado: and the search domain is blah.domain.net, it should find it
00:26 raspado hmmm ok thx
00:26 whytewolf Guest80563: what was it?'
00:26 fannet joined #salt
00:27 Guest80563 __utils__['s3.query']( was dying so, I tried specifying a location
00:27 Guest80563 and now it works
00:27 Guest80563 I wish I had time to debug further
00:37 netcho_ joined #salt
00:44 MTecknology Why doesn't saltutil.sync_* also purge old stuff? It seems like it should be doing that...
00:49 iggy there's a different runner for that
00:51 whytewolf there is a minion config setting
00:51 whytewolf clean_dynamic_modules
00:52 whytewolf it is defaulted to true....
00:59 telx joined #salt
01:01 dxiri joined #salt
01:08 fannet joined #salt
01:12 area_ joined #salt
01:13 setkeh Hey guys, just a quick one when i accept a key and the do a state.apply the machine i accept the key on always returns this "web2.setkeh.com: Minion did not return. [No response]" this also happens to machines if i do a state.apply within a minute or two of a previous one is this normal behavior ??
01:18 woodtablet left #salt
01:22 jas02 joined #salt
01:25 hemebond setkeh: I think it's normal in some networks.
01:25 hemebond Depending on how long you waited to accept the key.
01:25 hemebond Basically it tries again to authenticate and then find that it's been accepted.
01:25 hemebond Then will read your job.
01:26 setkeh most of the time its within the minute :)
01:26 hemebond i.e., state.apply
01:26 setkeh that makes sense :D
01:26 hemebond You might be able to change the retry time for authenticating. Have a look through the minion config.
01:26 setkeh i will thanks :D
01:27 phooper joined #salt
01:33 ninjada_ joined #salt
01:33 area_ joined #salt
01:38 dxiri joined #salt
01:44 orionx joined #salt
01:46 MTecknology whytewolf: heh... if the default is true, I either broke something across the fleet or found a bug or... dunno; I'm gonna keep digging tomorrow.
01:46 MTecknology OHHH!!!!
01:46 MTecknology I betcha we have a bug in our process
01:48 gableroux joined #salt
02:05 catpiggest joined #salt
02:08 k_sze[work] joined #salt
02:13 aarontc joined #salt
02:18 ninjada joined #salt
02:19 ninjada joined #salt
02:23 dxiri joined #salt
02:23 jas02 joined #salt
02:24 dxiri joined #salt
02:26 dxiri_ joined #salt
02:29 dxiri_ joined #salt
02:31 akhter joined #salt
02:38 netcho_ joined #salt
02:38 evle joined #salt
02:46 sebastian-w joined #salt
02:47 ilbot3 joined #salt
02:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.4 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
02:52 akhter joined #salt
02:53 vodik joined #salt
02:56 fannet joined #salt
03:04 jjasinski_ joined #salt
03:04 jjasinski_ eiay
03:07 jjasinski_ left #salt
03:08 _aeris_ joined #salt
03:08 dxiri joined #salt
03:10 phooper joined #salt
03:15 demize When using the py renderer, is it possible to import a map/defaults file in jinja+yaml format?
03:17 demize I guess I could possibly do it manually using the jinja/yamlex renderers..
03:21 barajasfab joined #salt
03:24 orionx joined #salt
03:39 pipps joined #salt
03:40 PhilA joined #salt
03:48 Bryson joined #salt
03:52 cyborg-one joined #salt
03:52 zzuf joined #salt
03:53 bastiand1 joined #salt
03:59 mcspiff joined #salt
04:02 raspado when I run salt-cloud -m <map_file> I get a bunch of errors like "[ERROR   ] The 'prod-r38xlarge-servicenode' profile is trying to extend data from 'prod-servicenode' though 'prod-servicenode' is not defined in the salt profiles loaded data. Not extending and removing from listing!"
04:02 raspado any idea why?
04:03 hemebond raspado: You don't have a profile defined.
04:03 hemebond Or provider. Or something.
04:04 raspado hmm k, even though im loading a specific map_file that has no relationship with the other cloud.profiles?
04:05 hemebond map files do use the profiles.
04:05 raspado I just copied these files to the salt master, does the salt-master need a restart for these files to get loaded?
04:05 hemebond Might do.
04:06 rem5 joined #salt
04:06 raspado hmm nope stlil get a bunch of errors
04:07 raspado ooooo
04:07 hemebond Your profiles still need to be correct, even if you're not using them right now.
04:07 raspado hemebond: does this somehow look for the provider file?
04:07 hemebond It will use provider files, yes.
04:08 hemebond master > providers > profiles
04:08 hemebond https://docs.saltstack.com/en/latest/topics/cloud/#configuration-inheritance
04:12 raspado heres an example of what is complaining http://pastebin.com/3ciE7P73
04:12 raspado the references are in the cloud profiles
04:13 hemebond Not sure. I've never used extends in my cloud configuration.
04:14 hemebond Where is 'prod-servicenode'
04:14 hemebond ?
04:14 raspado where do you see that?
04:15 hemebond In the error you pasted.
04:15 raspado oh its defined in cloud profiles
04:16 raspado i wonder..... if
04:16 raspado salt needs to be configured for aws
04:16 hemebond Apparently it's not defined/
04:16 raspado is there a way to trace this?
04:16 hemebond Actually, it doesn't seem to really be an error.
04:17 hemebond Just a message saying it's being removed because the configuration is broken.
04:18 raspado hmmm http://pastebin.com/9hrvMa7m
04:18 raspado i just passed -l debug
04:18 raspado wonder if line 11 is the culprit
04:18 hemebond Yeah, so, as it says right there, you are missing some configurations.
04:19 hemebond And one provider that needs updating to use "driver" instead of "providers"
04:19 hemebond *provider
04:19 informant1 joined #salt
04:19 raspado should /etc/salt/cloud.providers even exist?
04:20 raspado we use /etc/salt/cloud.providers.d
04:20 hemebond Can do.
04:20 raspado should be a problem right?
04:20 raspado shouldnt...
04:20 hemebond You can also just put stuff in .d
04:20 raspado kk
04:21 demize bah, defaults.get can't load jinja files, hmm.
04:22 raspado is this the right template format? http://pastebin.com/1RKGtPzU
04:22 hemebond Nope.
04:23 hemebond There's no root "providers" element.
04:23 raspado was there back in version 2015~
04:23 raspado ?
04:23 hemebond No idea.
04:23 raspado it works with our old version of salt for some reason
04:23 hemebond Oooh.
04:24 hemebond There is one if you put the configuration inside /etc/salt/cloud
04:24 hemebond But not if you put them into the /etc/salt/cloud.providers.d/*.conf files
04:24 raspado yeah thats where this file used to live but i copied it to a new salt version which lives in cloud.providers.d
04:24 raspado hahah omg really?
04:24 irctc282 joined #salt
04:24 irctc282 I have 130 hosts connected to salt master
04:25 irctc282 when I trying to execute any commands on these hosts I am getting
04:25 hemebond irctc282: Nice.
04:25 irctc282 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.
04:25 irctc282 I have increased threads from 5 to 10
04:25 jas02 joined #salt
04:26 irctc282 what could be the ideal value ?
04:28 hemebond irctc282: Been through https://docs.saltstack.com/en/latest/topics/troubleshooting/master.html ?
04:29 raspado hemebond:  yep that was it
04:29 raspado thx again mang
04:30 hemebond ????
04:31 hemebond irctc282: https://www.reddit.com/r/saltstack/comments/42gfe5/salt_request_timed_out/
04:31 saltstackbot [REDDIT] salt request timed out (self.saltstack) | 1 points (100.0%) | 5 comments | Posted by randomguy3 | Created at 2016-01-24 - 16:16:20
04:31 hemebond irctc282: There is also new transport, TCP, that might work better.
04:34 kingpower joined #salt
04:39 netcho_ joined #salt
04:49 donmichelangelo joined #salt
04:50 kingpower_ joined #salt
04:57 kgoetz joined #salt
04:58 kgoetz Hi all, can the salt API be used to push events to other applications or only to receive them/trigger themf rom other apps? if the latter what would be the recommended way of making salt triger actions in remote applications?
04:58 kgoetz specifically hte moniotring system
05:01 dxiri joined #salt
05:02 onlyanegg joined #salt
05:04 fracklen joined #salt
05:09 kgoetz Think i've found the answer, https://docs.saltstack.com/en/latest/topics/reactor/ is how to initiate actions from salt so a bit of glue would be required
05:12 sybix joined #salt
05:14 kgoetz reading that brings me anotehr question: can I have custom fields in a salt file? (salt... state? still new to the jargon)
05:19 XenophonF joined #salt
05:20 wangofett joined #salt
05:20 demize Hm, trying to use slsutil.render to get a map file into a file using the python renderer, though I seem to need an absolute path, so I'm not sure how to get that from the file itself...
05:20 hemebond kgoetz: Yes, using a reactor to listen for events then calling an external script to send the data over to something else would work.
05:23 demize Is there any function for resolving a salt:// URI to the absolute path on a minion?
05:26 jas02 joined #salt
05:35 bocaneri joined #salt
05:39 fannet joined #salt
05:40 raspado so using this salt-ssh thingy
05:41 raspado theres a provision salt thing we have in prod/system_configs/init
05:41 raspado is there a way I can target a salt-ssh host to prod/system_configuration and run everything in it?
05:41 raspado i only want it to be a one time run, I dont really want to create an ansible script that does what we do for minions
05:42 zzuf joined #salt
05:52 XenophonF raspado: what is prod/system_configs/init?
05:53 raspado a state
05:53 XenophonF oh
05:53 raspado ehh im writing up an ansible script
05:53 raspado for now
05:53 raspado building a salt master so I dont want to build a salt master from a salt master :)
05:54 XenophonF well assuming your roster has the minions listed, just run something like `salt-ssh \* state.apply prod.system_configs`
05:55 XenophonF if you have a salt master and want to tell your minions to do the same thing, then you'd run something like `salt \* state.apply prod.system_configs`
05:56 XenophonF me, personally, would have everything targeted and ready to go in top.sls, so that i could just do `salt-ssh \* state.highstate`
06:00 ivanjaros joined #salt
06:07 ninjada_ joined #salt
06:13 nethershaw joined #salt
06:18 ninjada joined #salt
06:24 k_sze[work] joined #salt
06:27 jas02 joined #salt
06:33 felskrone joined #salt
06:34 fannet joined #salt
06:35 DEger joined #salt
06:42 infrmnt joined #salt
07:12 Guest2_ joined #salt
07:17 preludedrew joined #salt
07:20 sh123124213 joined #salt
07:20 sh123124213 joined #salt
07:22 intel joined #salt
07:22 intel left #salt
07:25 kgoetz hemebond: thanks for confirming
07:25 ivanjaros3916 joined #salt
07:28 jas02 joined #salt
07:34 ninjada joined #salt
07:37 ninjada joined #salt
07:40 Norrland left #salt
07:45 fracklen joined #salt
07:47 pezus joined #salt
07:48 pezus hello. i am thinking of a way to build a system inventory via salt grain information that gets refreshed at a certain interval
07:48 pezus what would be the best way to do that?
07:49 pezus i could of course make a call to every minion at the interval and try to get all the data from every minion but is there a better way?
07:49 hlub pezus: are you familiar with mine?
07:49 pezus no
07:50 pezus what is the mine and what does it do better than the actual calls?
07:50 hlub check that first
07:50 hlub mine is a way topublish data from minions to others.
07:51 hlub it is meant for data that is more dynamic than grains.
07:52 pezus i don't really want dynamic data - most data on our hosts are static
07:52 pezus but i want to do an automatic documentation for our platform
07:52 alexzel joined #salt
07:53 fracklen joined #salt
07:53 alexzel Hello 0/
07:53 alexzel I'm having a weird issue with file states
07:54 alexzel I have two state IDs (in one sls file) that are going to manage the same file using file.managed, for some reason this makes the salt-minion go into an infinite loop
07:55 alexzel here is the state file, https://gist.github.com/alex-zel/a6a54ea89bf623a83170fa48b00428f2, if i comment out the second file.managed it works fine
07:55 ninjada joined #salt
07:56 alexzel I need to first restore the file to it's default state, do some stuff, the finally before starting the service i need to update the file with the new configurations
07:58 toanju joined #salt
08:00 viderbit joined #salt
08:02 viderbit joined #salt
08:02 subohm joined #salt
08:03 keimlink joined #salt
08:03 viderbit joined #salt
08:04 hlub pezus: of course you can just manage grains with states and schedule execution of those states.
08:08 fracklen joined #salt
08:09 hlub alexzel: you can not use two file.managed states for the same file.
08:10 darioleidi joined #salt
08:11 hlub alexzel: this could be done with one file.managed if you can separate those two situations with jinja by using grains for example.
08:11 hlub or you could create the initial config with another state that is run only in case that the file does not yet exist.
08:15 fracklen joined #salt
08:22 fannet joined #salt
08:22 PhilA_ joined #salt
08:24 fracklen joined #salt
08:24 samodid joined #salt
08:25 ronnix joined #salt
08:28 netcho_ joined #salt
08:28 jas02 joined #salt
08:35 subohm joined #salt
08:48 toanju joined #salt
08:48 orionx joined #salt
08:51 PhilA__ joined #salt
08:54 viderbit joined #salt
09:01 ProT-0-TypE joined #salt
09:04 Rumbles joined #salt
09:06 phx joined #salt
09:16 fannet joined #salt
09:21 jhauser joined #salt
09:25 giany hi, is there a way I can run a script through salt-cloud? I know that boostrap sets the server..but i'd like to run something after the boostrap..
09:29 CeBe joined #salt
09:32 amontalban joined #salt
09:32 amontalban joined #salt
09:35 s_kunk joined #salt
09:36 Trauma joined #salt
09:36 kgoetz https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.upgrade makes me think adding modules.aptpkg.upgrade should run apt-get upgrade but I'm receiving an errror 'Reason: 'modules.aptpkg' is not available.'. Could someone point me in the right direction for doco or explain what I should be using? I also looked at the apt formula but that doesn't even look like the t
09:36 kgoetz utorials https://github.com/saltstack-formulas/apt-formula/blob/3af4a0e1897a22d0035dd07e71d1734b4b9f76dc/apt/dist_upgrade.sls
09:38 kgoetz to confuse me further the docs use the (working) pkg.installed, where aptpkg only appears to have an 'install' function
09:39 AndreasLutro you're looking at the execution module, not the state module
09:39 toanju joined #salt
09:40 remyd1 joined #salt
09:40 netcho_ joined #salt
09:42 yuhlw joined #salt
09:42 kgoetz ah thank you, i'll have a look at state
09:57 sh123124213 joined #salt
10:00 N-Mi joined #salt
10:00 N-Mi joined #salt
10:01 amcorreia joined #salt
10:03 netcho joined #salt
10:10 fannet joined #salt
10:22 CeBe joined #salt
10:31 o1e9 joined #salt
10:31 jas02 joined #salt
10:33 impi joined #salt
10:35 flebel joined #salt
10:36 DEger joined #salt
10:38 abednarik joined #salt
10:44 NickN joined #salt
10:48 NickN hey all! I'm new to salt and can't seem to figure out what went wrong. namely, I had everything working using local files in /srv, I applied highstate succesfully to minion. I then moved my pillar to git, and now my minion says it can't find states while /srv/salt/top.sls defined it properly (and not to mention it worked when everythign was "local")
11:01 fannet joined #salt
11:12 aarontc joined #salt
11:13 Mikk joined #salt
11:14 sh123124213 joined #salt
11:15 ReV013 joined #salt
11:18 fannet joined #salt
11:31 sh123124213 joined #salt
11:32 jas02 joined #salt
11:33 teclator joined #salt
11:33 sdelic joined #salt
11:40 cDR NickN: make sure you use the right branch
11:40 cDR and you can try clean all cache files in /var/cache/salt/master
11:44 akhter joined #salt
11:50 NickN yeah, turns out my changes to pillar didn't include proper structure for users forumla to reconise it so it couldn't actually compile template, and that resulted in no states available for minion!
11:50 NickN I was just mislead by the error thinking it was something else, oh well
12:29 ronnix joined #salt
12:33 jas02 joined #salt
12:39 tobiasvdk joined #salt
12:49 ProT-0-TypE joined #salt
13:05 DammitJim joined #salt
13:08 cyraxjoe joined #salt
13:15 yuhlw left #salt
13:15 JohnnyRun joined #salt
13:15 yuhlw joined #salt
13:17 numkem joined #salt
13:18 alvinstarr joined #salt
13:19 xenocode joined #salt
13:20 ninjada joined #salt
13:22 xenocode Hello
13:22 xenocode I would like to contribute some formula updates to https://github.com/saltstack-formulas
13:23 xenocode not sure if this is the right place to ask / start, but anyway
13:23 xenocode if someone has a starting point or is willing to do a codereview, please let me know
13:34 jas02 joined #salt
13:48 PhilA__ xenocode maybee on #openstack-salt
13:48 DEger joined #salt
13:56 Trauma joined #salt
13:59 xenocode thanks ;)
14:00 numkem joined #salt
14:00 xenocode well isn't it for openstack speciffics ?
14:00 akhter joined #salt
14:02 ernescz joined #salt
14:04 ALLmightySPIFF joined #salt
14:07 fracklen joined #salt
14:10 ernescz hi everyone! I was wondering how can I implement more specific minion targeting in Salt's event reactor "tgt:" section? It doesn't support Jinja context, only wildcards available like " tgt: 'haproxy-*' "
14:10 ernescz maybe some other ways to do that?
14:14 fracklen joined #salt
14:18 Tanta joined #salt
14:20 remyd1 xenocode, https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas
14:20 ssplatt joined #salt
14:24 pppingme joined #salt
14:25 fracklen joined #salt
14:26 remyd1 ernescz, for my part, I would use a pillar, or a grain and then, transfer it to the reactor (that is what I am actually doing)
14:27 remyd1 my reactor is activating an orchestrator, and then, it works in a similar way as a state
14:30 mamalos joined #salt
14:31 ernescz remyd1: yes, I successfully transfer a pillar data to a reactor and further down to the state it calls, problem lies on which minions that state (with transferred data from event) will be executed.
14:31 rylnd joined #salt
14:31 remyd1 e.g. - tgt: {{ the_target }}
14:32 remyd1 ernescz, you should also be able to transfer informations though the event for the minion you want as a target
14:32 xenocode @remtd1
14:32 remyd1 in the 'event_data'
14:32 xenocode thx :)
14:33 remyd1 xenocode, np
14:33 rylnd i have some trouble using slack_notify.post_message from a reactor. does someone have a working example for me? the one from https://docs.saltstack.com/en/getstarted/event/reactor.html doesnt work, it always tells me the "slack_notify.post_message' is not available."
14:33 ernescz remyd1: you mean this data should already be present beforehand in the event data itself ?
14:33 remyd1 ernescz, exactly, or manage it dynamically with pillar and/or grains
14:33 remyd1 or mine
14:34 remyd1 conditionnaly if that event, refresh data from that pillar to get the target ecc
14:34 jas02 joined #salt
14:36 xenocode @remyd1: I've already read it, and there it says to ask here or on the mailing list if I want to contribute
14:36 ernescz remyd1: then another question - does 'tgt: ' then takes other values like lists, etc.? because as far as I found it only takes target minion's hostname, e.g. "tgt: webhosts-0* " ?
14:37 ernescz if it does then I'd have no problem building (from pillar/mine) list to feed it to :)
14:39 remyd1 xenocode, haha. So sorry. I think you just have to fork, and add your formula (with a pull request ?) ??
14:40 nicksloan joined #salt
14:40 remyd1 ernescz, No, joker are not allowed here. You can use a for loop to get all your targets and modify your id rule to something like grains['id'] to avoid duplicate.
14:41 xenocode @remyd1: thx again, I will do so!
14:42 remyd1 xenocode, yes, that is what I did to add some code in the the salt modules official repository on github
14:42 remyd1 If your syntax is not perfect, your pull request will need some changes, that is all ;)
14:46 ernescz remyd1, thanks will try to put them in a loop to call the states
14:54 edrocks joined #salt
14:58 rem5 joined #salt
15:02 Trauma joined #salt
15:06 Trauma joined #salt
15:10 Trauma joined #salt
15:12 _JZ_ joined #salt
15:18 vankooch joined #salt
15:18 vankooch Hi, I’ve problem with pkg.latest, I always get the error “Package dotnet-dev-1.0.0-preview2.1-003177 failed to update.”, but the package just installs fine.
15:19 vankooch I’m running on ubuntu with latest saltstack master and minion
15:21 vankooch this is my sls: http://pastebin.com/gYwdbZMV
15:23 AndreasLutro are you sure that's the actual package name? `dpkg -l | grep dotnet`
15:23 AndreasLutro debian/ubuntu package names usually don't include the full version
15:25 vankooch yes I’m sure: this is the output ii  dotnet-dev-1.0.0-preview2-1-003177                 1.0.0-preview2-1-003177-1       amd64        Microsoft .NET Core 1.1.0 - SDK 1.0.0 Preview 2.1-003177
15:25 vankooch dotnet-dev-1.0.0-preview2-1-003177 is the correct name, if I try it with apt-get it works
15:26 AndreasLutro dotnet-dev-1.0.0-preview2-1-003177 is not what you have in your sls though
15:26 vankooch oh yes you are right
15:27 vankooch strange I’ve used the name from the dotnet docs
15:27 AndreasLutro can't trust anyone
15:27 AndreasLutro not even microsoft!
15:28 ernescz AndreasLutro: especially microsoft! :D
15:29 vankooch super it works… thanks
15:29 tobiasBora Hello,
15:29 Reverend world
15:29 ivanjaros joined #salt
15:30 ssplatt joined #salt
15:31 ronnix joined #salt
15:32 ALLmightySPIFF joined #salt
15:32 sh123124213 joined #salt
15:33 tobiasBora I would like to know, who is supposed to package salt for debian ? The version of unstable is not usable, and a pull request in github solved the problem, so I it would be great to have this version in debian...
15:34 vankooch you can type apt-get changelog salt-master to get the last mantainer name
15:35 Xopher joined #salt
15:36 gableroux joined #salt
15:36 orionx joined #salt
15:36 babilen tobiasBora: Unusable how?
15:37 jas02 joined #salt
15:37 tobiasBora babilen: Completely unusable : I cannot even use "salt-minion --version"
15:37 tobiasBora https://github.com/saltstack/salt/issues/37792#issuecomment-262060616
15:37 saltstackbot [#37792][OPEN] /!\ Cannot install salt anymore because of a bug when loading OpenSSL | Description of Issue/Question...
15:37 tobiasBora vankooch: Good idea, I'll do that
15:38 tobiasBora thank you
15:38 babilen tobiasBora: Ah, the openssl transition
15:39 babilen tobiasBora: Take a look at /usr/share/doc/salt-minion/changelog.Debian.gz
15:39 fracklen joined #salt
15:41 babilen tobiasBora: Packagers are me and bdrung -- I can look into this, but we'd probably package .11 or .4 anyway.
15:43 babilen But that bug has been addressed and fixed. Salt was buggy in that it relies on a specific version of SSL and things are now breaking due to the current SSL transition.
15:44 tobiasBora Ok. And do you know when you will package this version ?
15:45 babilen I'm moving house, so I won't get around to package it right away, but Benjamin is working on it.
15:46 babilen Have you checked if it made it into .11 ?
15:46 abednarik joined #salt
15:46 babilen Otherwise we'll backport it, but you might also want to wait for the SSL transition to be over before you upgrade to a new SSL version
15:46 babilen See https://release.debian.org/transitions/html/auto-openssl.html for details
15:47 babilen Many packages are broken and I'd personally just wait
15:49 tobiasBora So I should stop updating my system ???
15:50 JohnnyRun joined #salt
15:54 ssplatt joined #salt
15:58 ronnix joined #salt
16:00 babilen tobiasBora: Not necessarily .. but problems such as these are typical for transitions
16:00 babilen (it's still important to address this issue in salt)
16:08 huddy joined #salt
16:09 nethershaw joined #salt
16:13 pipps joined #salt
16:14 tobiasBora Yes of course, but the faster the correction are pulled, the best it is.
16:17 ALLmightySPIFF joined #salt
16:19 samodid joined #salt
16:29 tapoxi joined #salt
16:29 samodid joined #salt
16:31 nickabbey joined #salt
16:31 sagerdearia joined #salt
16:33 iggy understanding that you are running testing software and adjusting your expectations accordingly also helps
16:33 dxiri joined #salt
16:34 iggy that's one of the faster bugs I've seen fixed in salt, but it still takes a while for things to make it from bug report to completely fixed everywhere
16:34 mikecmpbll joined #salt
16:38 jas02 joined #salt
16:42 ronnix joined #salt
16:42 dxiri joined #salt
16:43 Reverend any idea why I can't use a variable from a for loop inside the nested for?
16:44 Reverend for X in Y{ for Z in X { X } } <-- X is not echoing :/
16:44 ssplatt you have to define it first
16:44 ssplatt maybe?
16:44 Reverend OH. need to do a set?
16:45 ssplatt well your example seems different than what i was thinking
16:45 ssplatt but yeah i’ve had issues with using new vars in for loops that aren’t defined previously outside the loop
16:46 Reverend I mean, I'd like to think that the for loop is creating the variable every time it iterates... but it doesn't seem to
16:47 keimlink joined #salt
16:48 pipps joined #salt
16:48 DEger joined #salt
16:49 raspado on the salt master, is there a command I can see all the minions connected ?
16:49 raspado I have 2 salt masters I want to make sure minions are not talking to the new host because they shouldnt
16:50 onlyanegg joined #salt
16:51 Reverend salt-key -L i think or something like that
16:51 djgerm salt '*' test.ping is my go to
16:51 Reverend or you can just do `salt '*' test.ping` to mkake sure they're talking to that master :)
16:52 Reverend salt key will tell you which boxes are currently listening on that master
16:54 sh123124213 joined #salt
16:56 anotherzero joined #salt
16:59 Reverend can someone tell me if there's a problem with this line? :/
16:59 Reverend http://pastebin.centos.org/58241/
16:59 Reverend i think that there might be a problem witht he pillar.get line, as it
16:59 Reverend isn't fetching the right calue...
17:00 Reverend fixed that line... turns out the true is a string -_- nevermind
17:04 ALLmightySPIFF joined #salt
17:11 Reverend I don't know what I've done... but it works now.
17:11 Reverend wtf
17:13 nicksloan joined #salt
17:16 ssplatt joined #salt
17:16 Reverend take it back
17:16 Reverend it's still fucked
17:18 JohnnyRun joined #salt
17:21 bltmiller joined #salt
17:30 sh123124213 joined #salt
17:38 raspado how messy can it get moving minions over to a new salt master?
17:38 jas02 joined #salt
17:38 DEger joined #salt
17:38 XenophonF you have to make sure the new master's public key is on all of the minions
17:39 XenophonF and you need to make sure the minions' public keys get onto the new master
17:39 XenophonF Reverend: looking at your paste...
17:40 Lionel_Debroux joined #salt
17:41 XenophonF Reverend: i'm very confused
17:41 XenophonF can you post an excerpt of the pillar data you're trying to use?
17:41 XenophonF also, you can simplify the jinja template by using something similar to the following:
17:42 pipps joined #salt
17:42 XenophonF rewrite (.*) {{ 'https' if salt['pillar.get'](['clusters', cluster, 'force_https']|join(':'), True) else 'http' }}
17:42 Reverend XenophonF - looks like i fixeded the thing... i have no idea how
17:42 Reverend but it works :P
17:43 XenophonF ah good
17:43 Reverend thank you anyway kind sir
17:43 XenophonF np
17:43 Reverend <3
17:43 XenophonF LOL
17:43 Reverend I think it may have been the fact that I was missing the +":aliases:"+ ....
17:43 Reverend >_<
17:43 Reverend but there were a bunch of problems anywhoo
17:44 Reverend just no errors when it can';t find something in the pillar data.
17:44 keimlink joined #salt
17:48 JohnnyRun joined #salt
17:52 tkharju joined #salt
17:55 giany left #salt
17:56 skullone joined #salt
17:57 skullone Are there any examples of templating salt-cloud user-data with Jinja (ie. passing fqdn, hostname, etc_hosts to cloud-init)
17:59 raspado XenophonF: where is the master's public key?
18:00 raspado is it an ssh key?
18:00 Edgan joined #salt
18:02 mpanetta joined #salt
18:02 iggy in /etc/salt/pki/master/
18:02 iggy I generally will copy that from the old master to the new one, and then move the minions over using normal salt commands
18:03 iggy otherwise, you have to go onto each minion and delete the old master pub key from /etc/salt/minion/ and restart the minion process
18:08 tercenya joined #salt
18:10 sarcasticadmin joined #salt
18:11 Rumbles joined #salt
18:11 jas02 joined #salt
18:13 raspado thx iggy
18:14 akhter joined #salt
18:15 ALLmightySPIFF joined #salt
18:16 pipps joined #salt
18:21 ssplatt joined #salt
18:22 bltmiller joined #salt
18:37 XenophonF skullone: there might be in salt-formula
18:38 XenophonF if you use file.managed or file.recurse on your salt-cloud config files, there's nothing stopping you from treating the source files like jinja templates
18:40 averell joined #salt
18:41 fracklen joined #salt
18:42 fracklen joined #salt
18:42 ernescz joined #salt
18:45 bltmiller Is there somewhere I can find some good docs on syntax/how to use things like salt['cmd.run'], salt['saltutil.runner']('things.here', etc)?
18:45 XenophonF yes
18:45 XenophonF http://docs.saltstack.com/
18:45 XenophonF specifically https://docs.saltstack.com/en/latest/ref/modules/all/
18:46 XenophonF well, for execution modules
18:47 whytewolf pretty much everything in salt['module.function'] is a execution module :P
18:47 bltmiller XenophonF: right yeah I was looking for more specifically on syntax for dictionary syntax for use in jinja bits
18:48 bltmiller current context, trying to run a command in an orch on a minion, a la: salt['saltutil.cmd'](tgt='minion1', fun='cmd.run' ...)
18:48 XenophonF well, for salt-specific info about jinja, refer to https://docs.saltstack.com/en/getstarted/config/jinja.html and https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html and https://docs.saltstack.com/en/latest/topics/jinja/index.html and maybe also https://docs.saltstack.com/en/latest/topics/best_practices.html and
18:48 XenophonF https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
18:49 XenophonF but you should also bookmark the Jinja Template Designer documentation at jinja.pocoo.org/docs/dev/templates/
18:49 XenophonF now, you mention dictionary syntax
18:49 XenophonF maybe you mean YAML?
18:49 XenophonF b/c Jinja is just the pre-processor
18:50 XenophonF and it just does text transformation, so it's (a) fairly generic and (b) relatively ignorant of the structure of the text you're transforming
18:50 bltmiller right, the part I'm missing is specifically the salt[] syntax and how that maps to various modules etc.
18:50 bltmiller let me give you an example
18:51 XenophonF so if you need to learn more about YAML, refer to https://docs.saltstack.com/en/latest/topics/yaml/index.html, https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html, and https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.yaml.html
18:51 XenophonF also the YAML spec which is at http://yaml.org
18:51 XenophonF ooohhh
18:51 bltmiller thanks XenophonF, I'm familiar with Jinja, YAML, and Salt things
18:51 XenophonF that's different
18:51 XenophonF OK, so that's called a dunder dictionary for some reason, docs are here: https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
18:52 bltmiller aha! getting closer
18:52 XenophonF give me a sec to look up the docs on the monkey patcher
18:52 bltmiller take a look here: https://gist.github.com/blaketmiller/21682a516323cc5297d4752716435a26#file-swarm-sls-L21
18:52 bltmiller line 21 is the troublemaker
18:53 XenophonF oh yeah, here, you'll want to read this too, maybe
18:53 XenophonF https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
18:53 Trauma joined #salt
18:53 * XenophonF looks at the URL
18:54 whytewolf soooo. question. how can you ask for a manager_token before you init the swarm?
18:55 whytewolf [jinja is rendered before the yaml is run]
18:55 bltmiller ooohhhh
18:55 bltmiller bam, that's it
18:55 bltmiller ha I didn't even question jinja rendering before execution
18:55 XenophonF bltmiller: so if i understand that correctly, the minion that's running that state file is also a salt master, and you're issuing a cmd.run targeting a minion with the ID of 'scheduler'
18:56 bltmiller XenophonF: yep
18:56 XenophonF ok
18:56 XenophonF you might want to check out the orchestration capabilities of salt
18:56 XenophonF that way you can control the execution of states across multiple minions at once
18:56 whytewolf XenophonF: thats what this is in
18:57 bltmiller what whytewolf said ;)
18:57 XenophonF oh and so it is
18:57 o1e9 joined #salt
18:57 * XenophonF needs a nap.
18:58 whytewolf one thing you might want to attempt. move the manager_token jinja and the states that call it into a stand alone state. then once the cluster is init call the state
18:59 whytewolf it will force the minion to render the state instead of the master
18:59 bltmiller hmm or I could probably store the output of that join-token command somewhere for use by other minons, perhaps a grain/mine?
18:59 bltmiller I hadn't considered creating a new state
19:00 Rumbles joined #salt
19:00 bltmiller I've got like 5 people calling for my attention, but I will pick this back up and report back on progress in a bit. thanks for the assists whytewolf and XenophonF :)
19:01 edrocks joined #salt
19:03 bltmiller also curious if and how this could also be solved maybe using reactors or beacons...
19:05 whytewolf beacon, not sure how that would fit in. but you could send an event with pretty much anything and that would trigger the reactor.
19:07 tkharju joined #salt
19:08 ekristen joined #salt
19:11 ALLmightySPIFF joined #salt
19:13 Renich joined #salt
19:14 toanju joined #salt
19:16 s_kunk joined #salt
19:16 nicksloan joined #salt
19:17 fracklen joined #salt
19:20 debian112 joined #salt
19:30 bltmiller yeah haven't played much with reactors or beacons for that matter. sounds like orch is the right approach in this situation at least
19:48 debian112 joined #salt
19:56 bltmiller joined #salt
20:02 cyborg-one joined #salt
20:04 wangofett joined #salt
20:06 dendazen joined #salt
20:06 nidr0x joined #salt
20:11 bltmiller joined #salt
20:11 tapoxi happy pre-turkey day everyone, anyone using the mysql formula? I'm trying to find out how to grant lock tables and select on all databases
20:12 jas02 joined #salt
20:12 tapoxi but in the pillar example it looks like the grants are on a per-db basis, not sure how to wildcard
20:19 jhauser joined #salt
20:20 derrick1982398 joined #salt
20:20 derrick1982398 I have a couple questions... https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.s3.html
20:21 derrick1982398 s3_cache_expire & s3_sync_on_update
20:21 derrick1982398 I am running on orch runner - updating my s3 pillar, and then calling high state so I don't want to wait the 30 seconds
20:22 derrick1982398 what would be the best settings for these two?
20:22 derrick1982398 It seems like salt '*' saltutil.refresh_pillar doesn't update the pillar, if the cache is older than 30 sec
20:23 derrick1982398 I mean younger
20:25 derrick1982398 Maybe I will leave the settings at default and try cache.clear_pillar
20:27 derrick1982398 yep :)
20:34 derrick1982398 anyone know how to call a salt runner from a runner?
20:37 alvinstarr joined #salt
20:41 KajiMaster joined #salt
20:50 dxiri joined #salt
20:52 djgerm1 joined #salt
20:53 nickabbey joined #salt
20:53 krymzon joined #salt
20:55 jschoolcraft joined #salt
21:00 DammitJim joined #salt
21:00 mikea joined #salt
21:00 jschoolcraft joined #salt
21:01 edrocks joined #salt
21:01 harkx joined #salt
21:05 Guest2 joined #salt
21:06 harkx joined #salt
21:09 xet7 joined #salt
21:16 mikea can you use compound targetting outside of the top.sls?
21:17 keimlink joined #salt
21:17 mikea instead of doing a bunch of jinja if/then/else can I use the matching yaml in pillar/ntp/init.sls?
21:18 jhauser joined #salt
21:20 ninjada joined #salt
21:21 djgerm1 so I have a stupid question. so there's the syntax in the documentation like salt.states.user.absent (name,purge=False,force=False) (e.g. https://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html). How do I execute that without writing an sls file? salt target states.user.absent name?
21:21 ernescz_ joined #salt
21:24 ernescz djgerm1: hi, you could use a module instead like so (https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.useradd.html)
21:26 djgerm1 thanks… yeah that'll do the trick… for some reason in my mind I was picture a way to craft states on command line… but that'll do what I need.
21:27 ernescz djgerm1: np! there's usually (always?) a state (to use in your state files) and a module (to run directly)
21:28 ernescz apologies for this crude explanation but the idea is there
21:29 jas02 joined #salt
21:31 djgerm1 yeah. I just wish I could craft states on the fly :) Modules don't have the informational returns that states do outside of True/False
21:32 ninjada joined #salt
21:33 XenophonF djgerm1: alternatively, you can use the state.apply function
21:33 XenophonF er, i mean state.single
21:33 XenophonF e.g., salt * state.single user.absent foobar
21:33 djgerm1 AH state.single….
21:33 XenophonF ja
21:33 djgerm1 that's exactly what i was looking for
21:33 djgerm1 I need to put that in my tool box!
21:34 XenophonF you can use state.apply (a/k/a state.sls) to apply a list of SLS IDs
21:34 djgerm1 so then I can translate any of the salt.states.whatever into commands
21:34 XenophonF and so forth
21:34 XenophonF correct
21:34 XenophonF conversely, there's the module.run state
21:34 XenophonF which lets you run an execution module's function as a state
21:35 amontalb1n joined #salt
21:35 XenophonF so in theory you could do something like salte * state.single module.run state.single user.absent foobar
21:35 djgerm1 i've used module.run a lot, but still has that limitation of return info.
21:35 djgerm1 as a hack job, works great
21:35 XenophonF i'm a little hazy on the calling conventions but you get the idea ;)
21:35 djgerm1 yeah thanks. you two have filled the gap I was having
21:35 XenophonF there's also nothing stopping you from writing your own execution or state module
21:36 XenophonF small matter of programming, as they call it ;0
21:36 ernescz also don't forget to add '-l debug' to module/state run to be more verbose if you're lacking info
21:36 djgerm1 the community builds wheels far rounder than I could do.
21:37 djgerm1 so I wont be writing my own modules… ever :)
21:39 XenophonF that's a terrible attitude, djgerm1
21:40 XenophonF besides, the community isn't always smarter
21:40 XenophonF witness win_servermanager
21:40 ninjada joined #salt
21:40 XenophonF doesn't work on non-server editions of Windows, so I wrote my own interface to DISM.EXE, like billg intended
21:41 djgerm1 you havent seen my wheels ^_^
21:41 djgerm1 more like Monuments to Pythagorus
21:45 debian112 left #salt
21:51 vegasq joined #salt
21:51 ninjada joined #salt
21:52 mpanetta joined #salt
21:58 jhauser joined #salt
22:07 DammitJim happy thanksgiving guys
22:08 keimlink joined #salt
22:09 ninjada joined #salt
22:14 Rumbles joined #salt
22:30 jas02 joined #salt
22:33 dendazen joined #salt
22:35 giany joined #salt
22:35 giany is there a way to run a command from salt-cloud after boostrap runs?
22:37 babilen Run a state?
22:39 giany i'd rather doing from the bootstrap script..
22:46 zzuf joined #salt
22:46 akhter joined #salt
22:57 DEger joined #salt
23:01 angvp hey guys, anyone of you have configured fail2ban for salt-master ? I looked over all internet but couldn't find anything
23:01 irctc587 joined #salt
23:01 irctc223 joined #salt
23:02 irctc223 Does PILLAR_SOURCE_MERGING_STRATEGY work for ext pillars?
23:02 edrocks joined #salt
23:02 irctc223 ie.. pillar_source_merging_strategy: none
23:04 whytewolf giany: use a custom bootstrap script then
23:05 irctc223 whytewolf: Have you heard of issues with ext pillars combining environments when environments are explicitly set?
23:06 irctc223 ie.. I'm in QA, but getting my dev pillar :(
23:06 whytewolf I have heard of pretty much every problem imaginable when enviroments are used. it is why i avoid them
23:06 irctc223 so you have one master per env?
23:07 whytewolf yes
23:08 nickabbey joined #salt
23:10 djgerm1 +1
23:10 sjorge joined #salt
23:10 sjorge joined #salt
23:13 sh123124213 joined #salt
23:14 sh123124213 joined #salt
23:15 bltmiller joined #salt
23:24 abednarik joined #salt
23:25 abednarik joined #salt
23:26 dxiri joined #salt
23:27 vegasq joined #salt
23:31 jas02 joined #salt
23:32 Kelsar joined #salt
23:34 giany whytewolf: from what path is the default bootstrap script being used ?
23:34 giany because if I modify the existing script in /etc/salt/cloud.deploy.d/boostrap-salt.sh its not being used.
23:35 whytewolf https://docs.saltstack.com/en/latest/topics/cloud/deploy.html
23:41 sarcasticadmin joined #salt
23:47 onlyanegg joined #salt
23:55 justanotheruser joined #salt

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