Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-07-28

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

All times shown according to UTC.

Time Nick Message
00:04 ninjada joined #salt
00:05 amcorreia joined #salt
00:07 orion So, I did the following instead: {%- set log_files = filebeat_settings.files -%} {%- set log_files = log_files + filebeat_settings.files_extend if 'files_extend' in filebeat_settings -%} -- and that seems to work.
00:07 hemebond ????
00:07 orion My suspicion is that the variables I was manipulating were being passed to me by reference.
00:10 keldwud joined #salt
00:10 mapu joined #salt
00:20 flowstate joined #salt
00:20 edrocks joined #salt
00:22 tonybaloney joined #salt
00:23 tonybaloney howzit
00:23 tonybaloney cd doc; make html
00:23 tonybaloney Exception occurred:
00:23 tonybaloney File "/Users/anthonyshaw/repo/salt/salt/config/__init__.py", line 88, in _gather_buffer_space
00:23 tonybaloney return max([total_mem * 0.05, 10 << 20])
00:23 tonybaloney TypeError: unsupported operand type(s) for *: 'Mock' and 'float'
00:23 tonybaloney help!
00:26 Brijesh1 joined #salt
00:26 antpa joined #salt
00:26 Brijesh1 joined #salt
00:47 iceyao joined #salt
00:48 brotatochip joined #salt
00:50 tonybaloney I've patched it, but its really ugly
00:54 joshin joined #salt
00:54 joshin joined #salt
00:54 brotatochip joined #salt
01:05 ALLmightySPIFF joined #salt
01:17 ZachLanich joined #salt
01:18 flowstate joined #salt
01:18 ZachLanich hemebond: The symlink plan didn't work. Apache didn't like it at all. Now I'm trying to do all of it statefully and it's giving me Requisites Not Found across the board. Can you help plz? :) - SLS: https://gist.github.com/zlanich/4e46af01c46e6c8ce18a6c275527523f
01:18 Sokel Anyone (unfortunately) using salt to manage solaris? Most pages I see suggest using OpenCSW (which is fine). But the opencsw pages claim it's version 0.14.0.
01:18 antpa joined #salt
01:19 ZachLanich Or anyone for that matter if hemebond isn't around ^
01:20 hemebond ZachLanich: Why didn't it like the symlink?
01:20 hemebond Did you create symlinks for both the load and conf files?
01:21 ZachLanich hemebond: Are there 2 symlinks being created when a2enmod runs? I only knew about the mods_enabled one.
01:21 hemebond ZachLanich: Your "requisites" errors are because you're still referring to file paths instead of state IDs.
01:21 hemebond ZachLanich: I believe it links both the conf and the load file for each module. I'll have to check though.
01:22 ZachLanich hemebond: Let me know and I'll revert some things and try this again.
01:22 hemebond Just checked and yes, there is a symlink for both the conf file and load file.
01:22 edrocks joined #salt
01:22 hemebond If there is a conf file for that module.
01:23 antpa joined #salt
01:23 ZachLanich Can you find me the paths to the conf files for those 2 modules while I'm rewiring this SLS? :)
01:24 hemebond All conf and load files are in /etc/apache2/mods-available/
01:24 mohae_ joined #salt
01:25 catpigger joined #salt
01:26 ZachLanich Oh ok
01:27 ZachLanich hemebond: Doesn't look like there are .conf files for either mod...
01:27 ZachLanich And the restart failure is bitching about something in the mods dirs
01:27 hemebond This is why using a formula helps; requires less understanding of the application and you can generally just write up the pillar data and the formula will configure it all for you.
01:28 ZachLanich I know, but when things start going wrong, it's a very bad feeling to now understand what someone else's code is doing, so I like to kind of wire the simple stuff together myself when I'm first learning.
01:29 keldwud joined #salt
01:29 ZachLanich not understand*
01:34 Nahual joined #salt
01:39 hemebond How are you getting on?
01:46 hemebond btw, "pkg: proxy_fcgi_exists" is also wrong since that state only has a "file" module in it.
01:53 ZachLanich hemebond: Idk, Salt's docs on how all this works are poor imo. It would make sense that if you created a file.exists state, that if the file no longer existed, that that state would have changed, and you should be able to watch it with watch.
01:54 PerilousApricot joined #salt
01:54 hasues joined #salt
01:54 hemebond file.exists just checks if a file exists.
01:55 hemebond So you can use it as a prerequisite for another state.
01:55 ZachLanich So this SLS works fine in every respect EXCEPT for on a freshly provisioned highstate. If I manually enable shit and fix all of it after it breaks on first highstate, then my state works from there on: https://gist.github.com/zlanich/4e46af01c46e6c8ce18a6c275527523f
01:55 hemebond Let me know which part of the docs you're finding unclear. I've heard the tutorial is difficult for some new to Salt.
01:56 hemebond What errors do you get?
01:56 ZachLanich The tutorial seemed stragiht forward, but doesn't clarify any of this stuff. It's too thin, and the docs don't provide examples for more than half of Salt's abilities.
01:56 ZachLanich This is the output: https://gist.github.com/zlanich/1ddb65d3812c014c5a103457e3732f17
01:58 hemebond So immediately after that, what happens if you manually start or restart Apache?
01:58 hemebond Because that's where the error is.
01:58 hemebond It can't stop or start the service.
01:59 hemebond It might be that Salt is trying to use the wrong service manager, e.g., upstart, systemctl.
01:59 ajw0100 joined #salt
02:01 ZachLanich It bitches about this line in the config (and the config file is default in this respect, so it's not the file itself): 140 - https://gist.github.com/zlanich/f7b639dea83ee975da968dc3848669e2
02:01 ZachLanich I can't see the rest of the line, but I'm strongly assuming it's the symlinks, cuz everything worked before that I believe. I can destroy the box and try a fresh provision without the mods to see if it fails.
02:02 ZachLanich I tried manually restarting it. It throws the same error until I get rid of the symlinks and use a2enmod to put them there.
02:02 ZachLanich I wonder if it's a permissions issue.
02:02 ZachLanich Nope, same permissions as the others.
02:05 hemebond Can you link to where you saw this "requires" parameter?
02:06 ZachLanich God idk. It's all over the place in Salt docs. It's apparently to make sure one state runs before the other.
02:06 antpa joined #salt
02:06 ZachLanich Can't manage this file until this pkg is installed, etc
02:06 hemebond Well that's what "- require:" will do.
02:06 ZachLanich I believe it was in the tutorial too
02:06 hemebond I don't know about "- requires:"
02:07 ZachLanich Ooops.
02:07 ZachLanich Salt executes in order unless otherwise told to though as far as I read in the tutoria.
02:07 ZachLanich So wouldn't it have worked either way?
02:07 tonybaloney joined #salt
02:07 hemebond Yes, I can see that Salt is creating the symlinks before restarting the services.
02:08 hemebond Was just wondering where that parameter was documented.
02:08 ZachLanich Yea, my mistake
02:08 ZachLanich Might have copied it out of SO or something by accident
02:09 hemebond FYI, the formula for Apache uses a2enmod
02:09 ZachLanich I really wish salt had a more clear explanation of which requisities can be used where. It's confusing as hell imo, and I'm a well versed LAMP stack programmer lol, so I'm not exactly clueless.
02:09 hemebond The requires are global.
02:09 hemebond https://docs.saltstack.com/en/latest/ref/states/requisites.html
02:10 ZachLanich Well lol, I guess we could look at the apache formula for clues...
02:10 Brijesh1 joined #salt
02:11 hemebond I thought symlinks were enough to activate modules and sites and confs.
02:12 ap123 joined #salt
02:12 hemebond I mean, if your Apache can't load a module, have you checked what is in the .load file?
02:12 pipps joined #salt
02:12 hemebond Double-checked its target?
02:13 ZachLanich I checked the target, and like I said, after the provision is done, I can literally go in and a2dismod, restart apache, then run my state and it re-enables it fine. It's only on the first highstate.
02:13 dyasny joined #salt
02:13 dyasny joined #salt
02:14 hemebond Have you tried it after fixing that "- requires:" thing?
02:15 hemebond I mean, I don't see any errors from Salt creating those symlinks.
02:15 bastiandg joined #salt
02:15 ZachLanich Not yet. I'll run it again in a min. It takes like 10min to provision 1 web server. Kinda slower than I expected honestly.
02:15 hemebond You are restarting Apache system systemctl, yeah?
02:15 ZachLanich No the symlinks seem to go in fine, but apache yells about something in the mods_enabled dir
02:16 ZachLanich I'm letting salt do it, and yes, it's smart enough to use systemctl in Ubuntu 15.04+
02:16 hemebond Well, it was more about confirming that Salt was using the correct system to do it.
02:16 ZachLanich Just checked the .load files, identical output regardless of how it's symlinked.
02:17 ZachLanich Yes, you can see it in that debug output. Salt uses systemctl
02:17 hemebond Yeah, that's why I was checking what you were using on the actual box.
02:17 ZachLanich Yup
02:18 ZachLanich Funny though, apache tells me to use service apache2 restart. I think their mod enabled msg is out of date lol
02:18 antpa joined #salt
02:18 hemebond It looks like Salt is restarting Apache after each symlink or config change.
02:18 flowstate joined #salt
02:19 hemebond Maybe move your apache2 state to the bottom of the file.
02:19 ZachLanich Yea, that was my one thought is that it might be too many simultaneous restarts, but it doesn't yell about it unless it's on the first fresh highstate.
02:19 antpa joined #salt
02:19 hemebond Since Salt will try and start it immediately after installation, and then restart it for each change.
02:20 ZachLanich What's weird though, is the DO MySQL SLS tutorial I went through has them just like mine, with file.managed below the service.running state, and like his, mine works just fine like that. It seems it's only the symlink thing that's tripping it up.
02:21 hemebond Can you not get the full error message about the mod?
02:21 ageorgop joined #salt
02:21 ZachLanich As long as it will take, I'm going to try to provision one more box as is with the require requisite fixed, then I'll do another with moving the apache state to the bottom to see if anything changes.
02:22 ZachLanich No I can't see it cuz you have to run systemctl status apache2 when it's failing to get that message, and it's working now lol. I'd have to run it again after I re-provision to get the error msg back, which I'm about to do.
02:23 hemebond You can run the configtest yourself.
02:23 hemebond Which should give you all the output.
02:23 ZachLanich Right, but it's not failing anymore lol
02:23 ZachLanich Cuz I used a2enmod
02:23 hemebond If you do a2dismod and then highstate, does it break again?
02:24 ZachLanich Nope!!
02:24 ZachLanich That's why I'm going nuts right now lol
02:24 ZachLanich Literally ONLY on the first fresh highstate.
02:25 ZachLanich Once I manually remove the symlinks or use a2dismod, then a2enmod and restart apache, apache is fixed for good it seems.
02:25 ZachLanich I'm wondering if the multiple restarts trips it up.
02:25 ZachLanich It's re-provisioning right now.
02:28 pipps joined #salt
02:29 pipps joined #salt
02:29 ageorgop joined #salt
02:29 jenastar joined #salt
02:29 antpa joined #salt
02:30 ninjada_ joined #salt
02:31 hemebond You could use "onchanges" instead of "watch" so that if any of those files changes the service will restart.
02:32 hemebond Actually no, that's not correct for this.
02:33 ZachLanich It would still trigger restarts anyway even if it did work, cuz most of them do change.
02:34 nonades joined #salt
02:35 hemebond But it wouldn't start the service, if it is stopped, unless one of those other states changes.
02:36 ZachLanich Full error!: https://gist.github.com/zlanich/f7b639dea83ee975da968dc3848669e2
02:36 sp0097 joined #salt
02:37 ZachLanich Even though apache's docs imply that it's doing nothing other than symlinking, there's clearly something else going on here
02:37 ZachLanich Thoughts?
02:38 hemebond http://serverfault.com/questions/120601/cant-start-apache-in-linux-because-of-proxy-module ?
02:39 hemebond I can't see you enabling mod_proxy and I can't tell if it's enabled by default.
02:39 tonybaloney joined #salt
02:40 hemebond So a2enmod enables dependencies too.
02:40 ZachLanich proxy and proxy_fcgi are 2 different modules
02:41 ZachLanich proxy is enabled by default, I'm enabling proxy_fcgi for php-fpm
02:41 hemebond https://httpd.apache.org/docs/trunk/mod/mod_proxy_fcgi.html
02:41 hemebond "This module requires the service of mod_proxy. It provides support for the     FastCGI protocol."
02:41 hemebond mod_proxy is not enabled on my Apache2 install.
02:42 hemebond a2enmod will be enabling it for you.
02:42 hemebond Seems the .load file lists the dependencies.
02:43 ZachLanich Ok, well, I read the formula, and it's simple, but there are requisites in there I've never seen. Thoughts?: https://gist.github.com/zlanich/cb495854f2bbab3c98f4f7b9f04f0540
02:44 ZachLanich Yea, so you might be right on that. I never looked to see if mod_proxy was enabled before the state ran
02:45 ZachLanich YUP, that's the issue!
02:45 ZachLanich Ok, so using a2enmod would be the smartest way lol
02:46 ZachLanich Idk what those order, watch_in: - module requisites are though.
02:46 hemebond Order is for explicitly defining an order for your states to run in.
02:46 hemebond e.g., 1. foo, 2. bar, 3. poo
02:47 hemebond watch_in is the reciprocate of watch.
02:47 hemebond Instead of "I will watching foo" it's "foo should watch me"
02:47 ZachLanich I just read that haha
02:48 ZachLanich I never saw that "Requisites" page. I only saw examples here and there. God, that makes my life a lot clearer.
02:56 justanotheruser joined #salt
03:00 hemebond If you have any idea on how to make the intro docs better please let me know. I only remember struggling with simple stuff like "how do I YAML?".
03:00 ZachLanich hemebond: I mimiced the formula pretty closely and looks like it might have fixed it. I'm doing a fresh provision to test
03:01 hemebond ????
03:01 ZachLanich hemebond: The tutorial was very helpful, but it must be missing only a few crucial "HEY, you'll be wondering this, so look here" callouts. Once I get more well-versed with Salt, I might go back through the tutorial and see if I have suggestions.
03:02 iceyao joined #salt
03:02 hemebond gotcha
03:05 ninjada_ joined #salt
03:07 antpa joined #salt
03:07 ZachLanich hemebond: You know what would be awesome (assuming it doesn't already exist), an interactive Salt directory of all it's requisites, modules, etc and examples of how to use them, or like a giant cheat sheet lol
03:08 ZachLanich As I google Saltstack Cheat Sheet and get like an entire page of results lol
03:11 hemebond lol
03:12 hemebond https://docs.saltstack.com/en/latest/ref/states/all/index.html
03:12 hemebond That's what I head for.
03:13 brd I need to setup the vim template for Salt
03:14 hemebond ZachLanich: What I normally do is write and apply my states one state at a time.
03:14 hemebond Add a state, highstate machine, fix problems until it works, then move onto the next item.
03:14 hemebond Never log into the machine itself or do anything manually.
03:15 hemebond Helps me to walk through the process for whatever I'm configuring.
03:15 writtenoff joined #salt
03:15 hemebond And reduces the number of moving parts I have to deal with or debug at a time.
03:15 ZachLanich hemebond: Makes sense. Some things require you to provision a blank test VM though to get all the default config files, etc, but that's no biggy.
03:16 ZachLanich That's what I've been doing all along. I just got stuck on apache lol
03:16 brd hemebond: I watched a intro to Salt on youtube yesterday that started off pretty good but then started diving right into Jinja2 templates with no real explanation of how they work
03:16 hemebond brd: Oh did they? Was it a third-party tutorial or Saltstack itself?
03:16 brd hemebond: 3rd party
03:17 hemebond I guess they would kind of skip over stuff that isn't actually Salt, like YAML and Jinja2.
03:17 ZachLanich brd: This page has good tutorials: https://docs.saltstack.com/en/getstarted/ - Look at Configuration Management and there's a decent explanation on Jinja in there somewhere. It's just a simple templating language or w/e
03:17 brd this one: https://www.youtube.com/watch?v=5tkyEfIb-44
03:17 flowstate joined #salt
03:18 ZachLanich brd: https://docs.saltstack.com/en/getstarted/config/jinja.html
03:18 brd which is the first result for me when I search for 'saltstack' on youtube :/
03:18 brd ZachLanich: thanks!
03:18 ZachLanich brd: I'm a Saltstack n00b too and hemebond's been helping me, but I thoroughly read through that entire Getting Started section before starting to touch things and it really helped.
03:19 jenastar joined #salt
03:19 brd sometimes the videos are good to show what is possible, then you just have to figure out how you can make it work for you :)
03:19 hemebond 15 minutes in and they've got a heck of a template going already.
03:19 brd ZachLanich: yeah, I am a n00b too.. I am just getting back into it after a few months of being distracted by other things
03:19 ZachLanich brd: Then take a closer look at state modules (https://docs.saltstack.com/en/latest/ref/states/all/index.html) and Requisites (https://docs.saltstack.com/en/latest/ref/states/all/index.html)
03:19 brd hemebond: yeah
03:20 brd :(
03:20 ZachLanich brd: And here's an official "Saltstack in 10 Minutes" runthrough: https://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html
03:20 brd ZachLanich: those are the same link?
03:20 ZachLanich Oops, h/o
03:20 ZachLanich Requisites: https://docs.saltstack.com/en/latest/ref/states/requisites.html
03:20 brd ZachLanich: yeah, the 10 min part I got down solid, it is just going past that
03:20 brd :)
03:21 brd ZachLanich: ty
03:21 ZachLanich Np
03:21 ZachLanich Giving back lol
03:21 brd ZachLanich: excellent!
03:22 brd ZachLanich: I think the Requisites doc will help me a lot, because I found a few situations where the deps didn't work like I expected to
03:23 ZachLanich Join the club lol
03:23 brd I have to say, I like Salt a lot better than puppet!
03:23 tonybaloney +1
03:23 hemebond +1
03:23 brd It all just seems to flow better together
03:24 brd plus not needing to setup a bunch of separate tools to get what salt does out of the box
03:25 ninjada joined #salt
03:25 edrocks joined #salt
03:25 ninjada joined #salt
03:30 ZachLanich +1
03:31 ZachLanich PLUS, it doesn't cost a minimum of like $80/month to have a beefy enough cloud VM to run the master :P
03:31 ZachLanich Chef & Puppet are so freaking heavy, it's insane
03:31 brd ZachLanich: haha, I was grumbling that sometimes the OOM killer comes along and kills salt on my 256M of RAM VM
03:31 brd the minon that is
03:32 hemebond Minion using 256Mb?
03:32 ZachLanich 256 is pretty small, but it would work with only like 10 simple minions and swap on
03:32 ZachLanich Yea, 256mb master or minion?
03:32 brd ZachLanich: minon
03:32 hemebond Hmm, I wonder why it's using so much.
03:32 brd it runs a dns server, nginx, and a minion :)
03:32 brd oh and postfix
03:33 ZachLanich Ah, well, again, swap helps, along with some other tuning, but there's always Salt's Proxy Minion setup, where Salt doesn't actually run on the minion cuz it's too weak.
03:33 hemebond Oh, how much is salt-minion actually using during a highstate?
03:33 rdas joined #salt
03:33 brd no swap on this machine
03:33 brd Mem: 13M Active, 115M Inact, 83M Wired, 2080K Cache, 33M Buf, 12M Free
03:33 brd Swap:
03:33 brd PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
03:33 brd 712 root          5  20    0   198M 39640K kqread  65:17   0.00% python2.7
03:33 brd 718 root          1  52    0   186M 31656K piperd   0:00   0.00% python2.7
03:34 brd :D
03:34 ZachLanich Looks pretty free to me
03:35 brd yeah, it is doing pretty nicely
03:35 ZachLanich I only turn swap on to prevent complete failure when an expensive operation takes place that I didn't expect. I try not to swap, especially since I'm usually using SSDs.
03:35 brd but like once every 3 months something chews ram and salt gets killed :)
03:35 brd this is a $1/month VM though, so I don't worry about it too mcuh :D
03:36 ZachLanich hemebond: What do you think? Enable swap to let it bleed over in the rare occasions, and debug over time to see if the issue can be solved?
03:37 hemebond Well, I suppose that's where you monitoring and metrics collection helps. Swap would hopefully let the culprit finish whatever it's doing.
03:37 evle joined #salt
03:37 ZachLanich I find that most memory cannot be allocated errors and otherwise are weird one-off issues that can be solved (eventually lol)
03:38 hemebond Is Salt being killed before it's using the memory or because it can't use more memory since it's all being used by something else?
03:38 ZachLanich Good question
03:38 hemebond s/before/because/
03:40 brd yeah, if happened more often I would look into it.. but it just isn't worth it right now
03:40 aharvey joined #salt
03:40 brd I gotta run, thanks for the help and have a good night
03:52 iggy definitely something wrong if your minion is using 256M of ram
03:52 hemebond I think the box had 256 and Salt was being killed/died. I don't really understand that ps output.
03:52 hemebond I can't tell which field is the memory.
03:53 hemebond nginx will be using ~90MB.
03:53 ninjada joined #salt
03:53 hemebond No wait... that was Debian Jessie total ram usage.
03:54 hemebond Sounds like something else is using all the RAM and poor salt-minion is being stomped.
03:55 ponyofdeath joined #salt
03:55 hemebond Although, I have a minion with three salt-minion processes adding up to about 100MB.
03:56 hemebond At least when I use Salt to ps aux
03:57 antpa joined #salt
03:58 antpa joined #salt
04:13 bluethundr joined #salt
04:13 bluethundr hey guys.. newcomer to salt stack here
04:13 bluethundr just wondering how do I get the keys of my minions noticed by the salt master
04:14 bluethundr I've verified that all the hosts in my domain have salt-keys
04:14 bluethundr but when I go do a salt-key -L on the master it only knows it's own key
04:15 g3cko_ joined #salt
04:19 flowstate joined #salt
04:27 ZachLanich hemebond: What's the most succinct way to only run all this if it's not already installed?: http://dp.wecreate.com/1iTDR
04:28 bluethundr anyone? anyone? beuller?
04:33 POJO joined #salt
04:35 hemebond bluethundr: Are your minions running and able to connect to the master?
04:36 tonybaloney joined #salt
04:36 hemebond ZachLanich: Does it need to run if the .phar file changes?
04:37 bluethundr hemebond: pretty sure.. lemme check
04:40 bluethundr hemebond: that was it my friend... a port issue
04:40 bluethundr super new to salt
04:40 bluethundr excuse the error :)
04:40 hemebond ????
04:40 hemebond No worries at all :-)
04:40 ZachLanich hemebond: That's a good question. My first instinct is to say yes, but what if I'd like to determine when it updates, like we do with apt?
04:40 bluethundr yup! thanks bud
04:41 hemebond ZachLanich: Creating a deb file to install it for you is one option :-D
04:41 ZachLanich hemebond: Idk how to do that lol, but also, I can update it using this once it's installed: wp cli update
04:42 hemebond But otherwise it's easy to prevent states running by just using dependencies and requisites, e.g., unless and onlyif
04:42 ZachLanich I'd kind of like to do it statefully so I have the same version of WP CLI on all my servers and can upgrade when I feel like it. Thoughts?
04:43 hemebond Personally I'd probably use a script that did it all.
04:43 hemebond And the script would also be used to check for updates too.
04:43 bluethundr hey one more question ....
04:43 hemebond Eventually you could write a custom salt module to do it, but a script would be an easy start.
04:44 bluethundr I notice when I do a salt-key -A what I see is a bunch of my hosts
04:44 bluethundr however some appear as the correct fqdn in the list
04:44 bluethundr but the rest appear as the EC2 internal IP
04:44 bluethundr which is a bit confusing for a bunch of hosts
04:44 bluethundr is there anyplace where the minion 'name' is set in the config?
04:45 hemebond bluethundr: By default salt-minion will use the fqdn (hostname -f) as the minion ID the first time it starts. It will save that ID.
04:45 hemebond /etc/salt/minion_id
04:45 bluethundr got it!
04:45 bluethundr thanks for the info
04:45 hemebond If you change it you will likely need to delete the minion key from the master and minion.
04:45 iggy not likely, absolutely
04:46 iggy (or edit the files in /etc/salt/pki/... but don't)
04:46 bluethundr interesting to note... I'm using a puppet module to setup the salt minions
04:47 west575_ joined #salt
04:47 bluethundr we're migrating away from puppet if all goes well here
04:48 bluethundr ok got it
04:54 ZachLanich hemebond: I can't figure out how to get the Digital Ocean assigned public IP in grains. I can list the IPv4s, and it's likely one of those, but idk how to select the correct one
04:55 hemebond Select it how? For what?
04:56 ZachLanich I'm runnging wp cli's install and I need to provide a "URL" parameter to install it, but since there's no hostname yet, I want to configure the wp install for the IP of the box for now, so I need the public IP in the form of a variable (grain or other wise)
04:57 hemebond Well, it will be available in grains.
04:57 nonades left #salt
04:58 iggy `salt-call -g` will show all grains on a box... extrapolate from there
04:58 iggy there are also some digital ocean specifc things in salt-contrib
04:59 iggy https://github.com/saltstack/salt-contrib/blob/master/grains/digitalocean_metadata.py
05:00 ZachLanich hemebond: I can see it, but idk how to target the right IP lol. There's 4 with salt 'web1' grains.ls ipv4
05:01 ZachLanich http://dp.wecreate.com/OyGp
05:02 hemebond ZachLanich: There are other grains that list the interfaces by name.
05:02 hemebond I have no idea which one will be the public IP; I've never used DO.
05:03 iggy salt-call network.ip_addrs type=public
05:05 hemebond ooh, how does it know which are public?
05:06 iggy excludes rfc1918 addrs
05:06 iggy and 127.0.00/8
05:07 jimmyjam5000 joined #salt
05:07 hemebond Ah I see.
05:09 jimmyjam5000 hey, I'm not able to install a package after successfully getting the repo. Here's my sls: http://pastebin.com/QssqTb9h
05:09 jimmyjam5000 anyone know if I'm doing this right?
05:09 jimmyjam5000 It's giving me The following packages failed to install/update: influxdb=0.13.0-1
05:10 jimmyjam5000 I'm able to install influxdb manually though on the minion
05:10 iggy keyserver is wrong
05:10 jimmyjam5000 wow am I that dumb?
05:10 jimmyjam5000 thanks
05:10 jimmyjam5000 guess it needed a second pair of eyes
05:13 bluethundr exit
05:13 bluethundr exit
05:14 bluethundr whoops
05:14 bluethundr later y'all
05:14 iggy you probably just want key_url and just the url (no curl...)
05:15 ZachLanich hemebond: How the heck do I do this in a string?: http://dp.wecreate.com/7Dzn
05:16 ZachLanich Minus my quote issue there lol. Better. Will this work?: http://dp.wecreate.com/1cYcQ
05:17 babilen jimmyjam5000: https://github.com/saltstack-formulas/influxdb-formula might come in handy
05:19 hemebond ZachLanich: Is that a grain?
05:19 babilen yay, gh down
05:19 ZachLanich It came from a mine function, w/e that is lol: /etc/salt/cloud: http://dp.wecreate.com/15ogP
05:20 iggy "22:16 PDTMajor service outage.
05:20 ZachLanich It worked!
05:20 hemebond I recommend staying away from salt mine for now.
05:20 flowstate joined #salt
05:20 babilen hemebond: why?
05:21 iggy have you seen the questions asked so far?
05:21 ZachLanich hemebond: It's literally the only way to do that lol
05:21 hemebond babilen: Because ZachLanich is very new to Salt and salt mine is not really what is needed here.
05:21 ZachLanich It was in a legit tutorial on DO
05:21 ZachLanich I set it up way before, but never used it until now
05:21 hemebond You just want the IP for the current box, no?
05:21 ZachLanich public ip, yes
05:22 iggy in any case, that's not how you'd look up data from the mine
05:22 babilen hemebond: Ah, okay. :)
05:22 ZachLanich Well, start suggesting lol.
05:22 iggy and mine isn't what you need for getting info about the local minion
05:22 ZachLanich I need the public IP assigned to my digital ocean droplet
05:23 iggy {{ salt['grains.get']('ip4_interfaces:eth0:0') }}
05:23 watersoul joined #salt
05:23 ZachLanich Ahh. I figured there was a way to do it, but the Salt docs we're very clear
05:23 babilen salt['network.ip_addrs'](cidr='10.0.0.0/8') ?
05:24 Brijesh1 joined #salt
05:24 babilen (with the correct CIDR for the network in question, or just pass the interface)
05:25 iggy I tried to suggest that earlier
05:25 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs
05:25 iggy but I guess it didn't work
05:25 iggy 01:03 < iggy> salt-call network.ip_addrs type=public
05:25 hvn joined #salt
05:25 ZachLanich Thanks!
05:25 babilen Oh, type=public is nice
05:25 iggy ikr
05:26 hvn joined #salt
05:27 antpa joined #salt
05:28 watersoul joined #salt
05:28 edrocks joined #salt
05:34 watersoul joined #salt
05:36 raspy_ joined #salt
05:39 watersoul joined #salt
05:40 SpX joined #salt
05:41 antpa joined #salt
05:41 antpa joined #salt
05:44 Brijesh1 joined #salt
05:44 kawa2014 joined #salt
05:44 watersoul joined #salt
05:45 hasues left #salt
05:46 west575 joined #salt
05:48 ajw0100 joined #salt
05:48 impi joined #salt
05:49 watersoul joined #salt
05:56 elias_ joined #salt
05:56 west575_ joined #salt
06:02 felskrone joined #salt
06:03 xist joined #salt
06:05 pipps joined #salt
06:06 elias_ joined #salt
06:06 kshlm joined #salt
06:17 flowstate joined #salt
06:23 Miouge joined #salt
06:24 antpa joined #salt
06:24 antpa joined #salt
06:25 toanju joined #salt
06:26 Pulp joined #salt
06:31 antpa joined #salt
06:33 jtang joined #salt
06:34 west575 joined #salt
06:34 antpa joined #salt
06:48 jhauser joined #salt
06:57 fracklen joined #salt
07:04 ivanjaros joined #salt
07:06 pipps joined #salt
07:06 nicola_pav joined #salt
07:07 nicola_pav Hi. I am trying to use salt-cloud with openstack - I am able to create the instance but salt-cloud cannot login to the instance with the error permission denied
07:07 nicola_pav it seems salt-cloud is not getting the password from the profile. any hints please?
07:08 hemebond nicola_pav: Can you login manually from the same box and account you're executing salt-cloud from?
07:08 iggy use keys instead of password?
07:09 nicola_pav hemebond: yes - manually, I can
07:09 tho joined #salt
07:10 nicola_pav hemebond: I have used debug - [DEBUG   ] Using password authentication
07:10 nicola_pav [DEBUG   ] Permission denied, please try again.
07:10 sagerdearia joined #salt
07:12 hemebond So you have user and password set in the provider?
07:13 permalac joined #salt
07:15 nicola_pav hemebond: I have the openstack credentials in the provider and in the profile I have the ssh username and password of the image so salt-cloud can login and setup the minion
07:16 hemebond Does it show your ssh username in the debug output?
07:17 nicola_pav yes - I can see the whole command in the debug; I can run it manually - there is an issue with the password - I think the password is null
07:18 flowstate joined #salt
07:19 nicola_pav hemebond: I have came across data.extra --  maybe I am missing the right config - in the debug, there is part of "extra:" json document
07:19 nicola_pav it always says password: "NONE"
07:22 hemebond I've not used OpenStack so I'm not familiar with some of the terms in its config. I do see "user" and "password" parameters and I would have assumed those were used. I have used AWS but there I used an SSH key.
07:23 hemebond "The user and password is the same user as is used to log into the OpenStack Dashboard."
07:23 hemebond That true? That what you've got in the config?
07:24 ninjada_ joined #salt
07:25 kpostrup joined #salt
07:26 nicola_pav hemebond: no the user of the openstack is different
07:28 hemebond Hmm, I'm lost then. I see in a couple of my profiles "ssh_username" and "password" parameters.
07:29 hemebond But it varies depending on the provider.
07:29 nicola_pav hemebond: thank you - that is what I have used ssh_username and password
07:32 edrocks joined #salt
07:36 mpanetta joined #salt
07:37 TyrfingMjolnir joined #salt
07:40 babilen nicola_pav: Maybe it would be an option to use SSH keys? I was under the impression that that is the "normal" way in most cases
07:41 nicola_pav babilen: yes - It is not worth it anymore - I am moving towards using a key now
07:41 nicola_pav thanks
07:48 ronnix joined #salt
07:50 raspy_ joined #salt
07:53 mikecmpbll joined #salt
07:54 ekkelett ah shit.
07:54 ekkelett Somehow, somehow... I have get an KeyError on testing for whether the state is run as a test when I'm running the tests on this state post-editing it. :|
07:56 jhauser joined #salt
07:56 krymzon joined #salt
07:57 manji joined #salt
08:00 jhauser_ joined #salt
08:05 ivanjaros joined #salt
08:07 krymzon joined #salt
08:08 pipps joined #salt
08:22 impi joined #salt
08:24 fracklen joined #salt
08:25 ribx joined #salt
08:26 permalac joined #salt
08:37 N-Mi joined #salt
08:37 N-Mi joined #salt
08:41 lungaro joined #salt
08:42 lero joined #salt
08:46 s_kunk joined #salt
08:48 Brijesh1 joined #salt
08:48 syndikate joined #salt
08:52 PoRNo-MoRoZ i updated managed file on salt-master
08:52 PoRNo-MoRoZ how do i update it on minions ?
08:53 hemebond PoRNo-MoRoZ: How did you do it before?
08:53 PoRNo-MoRoZ first time updating
08:53 hemebond How did you first push the file out?
08:53 PoRNo-MoRoZ ah\
08:53 PoRNo-MoRoZ sec
08:54 PoRNo-MoRoZ file.managed:
08:54 PoRNo-MoRoZ - source: salt://zabbix/temp-sensors/temp-sensors-get-value.sh
08:54 PoRNo-MoRoZ - mode: 755
08:54 PoRNo-MoRoZ - user: zabbix
08:54 PoRNo-MoRoZ - group: zabbix
08:54 PoRNo-MoRoZ i got top.sls
08:54 PoRNo-MoRoZ and nodegroups
08:54 PoRNo-MoRoZ ceph:
08:54 PoRNo-MoRoZ - match: ceph
08:54 PoRNo-MoRoZ - zabbix.iostat
08:54 PoRNo-MoRoZ - zabbix.temp-sensors
08:54 PoRNo-MoRoZ nodegroup works ok
08:54 babilen match: ceph?
08:55 PoRNo-MoRoZ ceph is disk cluster software
08:55 babilen I know what ceph is :)
08:55 PoRNo-MoRoZ trying to manage it with salt :D
08:55 PoRNo-MoRoZ yes i'm using ceph
08:56 PoRNo-MoRoZ should i spec 'replate: True' ?
08:56 PoRNo-MoRoZ *replace
08:56 babilen Either way .. you would have to run the SLS that contains that file.managed state. If it is part of the highstate then running state.highstate/state.apply would work, if not you'd have to run the SLS directly
08:57 babilen It would also be great if you could paste your actual configuration (master, nodegroups, SLS, top.sls, ...) to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
08:57 AndreasLutro replace: true is the default behaviour
08:57 AndreasLutro so no you don't need that
09:00 PoRNo-MoRoZ hm, sec
09:00 pipps joined #salt
09:09 JPT joined #salt
09:11 Xevian joined #salt
09:17 flowstate joined #salt
09:17 mpanetta joined #salt
09:19 impi joined #salt
09:20 jtang joined #salt
09:22 toanju joined #salt
09:26 PoRNo-MoRoZ looks like targeting nodegroup in top.sls not working for me
09:26 PoRNo-MoRoZ or i'm doing something wrong
09:26 PoRNo-MoRoZ sec i'll paste somewhere
09:28 nicola_pav hi. using salt-cloud to run instance against openstack - the machine goes up and salt-minion is installed on it - It does not change the "master:" in the /etc/salt/minion though
09:29 nicola_pav as a result, after salt-cloud command returns, I cannot run salt 'my-machine' test.ping
09:29 PoRNo-MoRoZ http://paste.debian.net/785731/ - top.sls
09:30 PoRNo-MoRoZ http://paste.debian.net/785732/ - temp-sensors.sls
09:30 nicola_pav if I access the machine manually and change the master config in the /etc/salt/minion or an entry in the /etc/hosts - it works then
09:30 PoRNo-MoRoZ http://paste.debian.net/785733/ - nodegroups
09:30 nicola_pav any hints please?
09:30 fredvd joined #salt
09:30 ronnix joined #salt
09:31 hemebond nicola_pav: The "minion" parameter in the profile, I think, allows you to set some of the minion config.
09:32 nicola_pav hemebond: I have moved to wkr with key now and it is much better - I still have this - I have specified it in provider
09:32 nicola_pav should it be in profile?
09:33 PoRNo-MoRoZ babilen i pasted
09:34 PoRNo-MoRoZ and my master config is stock, except 'file_roots', which points to default /srv/salt
09:34 hemebond nicola_pav: In the provider (not profile, I was incorrect there) I have a "minion" parameter, with a master parameter pointing to my master.
09:34 babilen PoRNo-MoRoZ: You want "match: nodegroup" rather than "match: ceph"
09:34 PoRNo-MoRoZ ah
09:34 PoRNo-MoRoZ :D
09:35 babilen PoRNo-MoRoZ: That's what confused me earlier and the reason why I said "match: ceph?"
09:35 PoRNo-MoRoZ misunderstand docs
09:35 edrocks joined #salt
09:35 PoRNo-MoRoZ now i got it
09:35 PoRNo-MoRoZ thanks
09:35 nicola_pav hemebond: yes - I have it in provider but it seems that salt-cloud is not grabbing it :(
09:35 vilitux joined #salt
09:35 hemebond nicola_pav: Are you able to paste your provider config?
09:35 PoRNo-MoRoZ babilen THANKS !
09:36 nicola_pav first password and then this :( the openstack driver is full of bugs - I will yes, one minute please
09:37 hemebond The providers mostly hand this stuff off to salt-cloud itself.
09:39 nicola_pav hemebond: http://pastebin.com/YQ72AwXX
09:40 hemebond And it's not putting in that IP as the master ID?
09:41 nicola_pav no :( just the default  -> #master: salt
09:41 hemebond There's nothing in /etc/salt/master.d/ ?
09:41 hemebond er
09:41 hemebond /etc/salt/minion.d/
09:41 nicola_pav on the salt server?
09:42 hemebond On the minion.
09:43 nicola_pav creating an instance again now - there is a file /etc/salt/minion on the "minion" when I view it, I see that master is commented out with the value salt
09:43 hemebond Check in /etc/salt/minion.d/
09:43 hemebond And also check that it hasn't been appended to the end of /etc/salt/minion
09:44 akashB joined #salt
09:45 akashB Can someone please take a look at this question, I have posted it on stackoverflow: http://stackoverflow.com/questions/38631859/saltstack-highstate-top-sls-files-execution-when-merging-strategy-is-same
09:46 babilen Ah .. the pleasures of environments
09:47 hemebond akashB: Just as aside while I read that link, probably best to _not_ nest one environment directory inside another.
09:47 babilen Yeah, you would want /srv/salt/base and /srv/salt/dev
09:47 akashB Okay, separate path for base, and dev, got it. But is this the reason why this is not working?
09:47 hemebond Also, you have "- files" but you said the file is called "file.sls"
09:48 akashB Oh, that was a typo.
09:48 akashB files.sls is what I have.
09:48 sfxandy joined #salt
09:48 sfxandy hi everyone
09:49 akashB When using merge(the default) option, everything is working... even state.show_tops is listing both dev as well as base env.
09:49 akashB And hi :)
09:50 sfxandy need a sanity check here.  ignore lines 1-4 but am I allowed to use 'require' as I have done here.... https://gist.github.com/anonymous/1c5c3d5cb9e9f5968f66ef9992ebc5f7
09:50 nicola_pav hemebond: the dir /etc/salt.minion.d is empty
09:50 sfxandy as i suspect its not working as I want it to
09:51 syndikate_ joined #salt
09:52 Rumbles joined #salt
09:52 Rumbles hello, if I run "salt '*' cmd.run 'whois'" the command runs as root, is there a flag I cn add to make that command run as a different user?
09:53 hemebond Rumbles: That depends on the platform. cmd.run is the same as logging into the box as root and running stuff in the shell.
09:53 hemebond In fact you can change the shell.
09:54 sfxandy Rumbles - there is a 'runas' flag
09:54 sfxandy to run as a different user
09:54 hemebond nicola_pav: Not appended to /etc/salt/minion either? Your minions are trying to connect to "salt"?
09:54 Rumbles oh right
09:54 Rumbles os "salt '*' cmd.run 'whois' runas=username" ?
09:55 Rumbles nice one thanks :)
09:55 nicola_pav hemebond: the salt-minion service is in status running, I see an error regarding the hash_type
09:55 nicola_pav in the /var/log/salt/minion
09:55 hemebond What's the error?
09:56 nicola_pav hemebond: http://pastebin.com/yZgn26fj
09:57 hemebond Oh, not a big deal here. Something to add to the profile if you want to.
09:57 akashB Guys, I moved the top.sls for base into a separate directory, /srv/salt/base, but state.show_top is still returning only base env...
09:57 nicola_pav hemebond: regardless that the salt-minion is in running status
09:57 hemebond But trying to connect to a "salt" host?
09:58 nicola_pav hemebond: I have pasted the whole log
09:58 nicola_pav even if I restart the salt-minion, it shows that error
09:59 hemebond About the hash? Yeah, I don't think we need to worry about it.
09:59 hemebond I don't recall setting the hash_type on my minions and they're running fine.
10:00 hemebond If you run salt-cloud in debug mode, does it show you the contents of the provider and profile that it's going to use?
10:00 lero joined #salt
10:00 yuhlw_ joined #salt
10:01 nicola_pav hemebond: no it does not
10:02 nicola_pav hemebond: it shows me uuid and some extra info
10:02 pipps joined #salt
10:02 impi joined #salt
10:04 PoRNo-MoRoZ I have state that checks configs for changes and restart service if neccessary, but if target folder is empty - it returns error
10:04 PoRNo-MoRoZ sec i'll paste
10:04 PoRNo-MoRoZ http://pastebin.com/ZgKMKJYW
10:04 PoRNo-MoRoZ last 2 lines, on some nodes this folder can countain folder, on some it's empty
10:05 PoRNo-MoRoZ should i place dummy file there to avoid that errors ?
10:05 hemebond nicola_pav: Looking at the code for the openstack provider it appears to call the builtin bootstrap function like other providers.
10:05 PoRNo-MoRoZ *can contain files
10:05 hemebond You've got the latest bootstrap script, yeah?
10:06 nicola_pav hemebond: how do I check that please?
10:06 hemebond I think "salt-cloud -u" pulls down the latest version.
10:07 nicola_pav hemebond: ran the update
10:07 nicola_pav I will try again - one question before that please
10:08 nicola_pav I have noticed that the salt-cloud copies the minion and minion_id files from the master into the minion that is being created
10:08 nicola_pav am I wrong?
10:08 hemebond That is not my understanding.
10:09 hemebond minion and minion_id are created on install or start.
10:10 nicola_pav ok, thanks
10:12 POJO joined #salt
10:17 hemebond That environment merging strategy thing is confusing.
10:18 flowstate joined #salt
10:19 hemebond I'd really like to see how people are really using these strange merging strategies and environment configurations.
10:20 GreatSnoopy joined #salt
10:21 jtang joined #salt
10:21 hemebond That "same" merging makes no sense to me at all.
10:21 stooj joined #salt
10:25 babilen The idea is that you can have multiple top.sls in your environments, but that other environments than the one the top.sls is found in are ignored
10:25 nicola_pav hemebond: could the problem be that the image I am using has already salt installed? it has minion_id and minion files?
10:25 hemebond Yeah, it's for when the top.sls has multiple environments listed.
10:26 babilen So a top.sls in the "base" environment is only responsible for the "base" settings and all other environments in there don't matter
10:26 babilen nicola_pav: Could be, yeah
10:26 raspy_ joined #salt
10:26 hemebond I should probably enable "same" since that's how I write my top.sls anyway.
10:26 nicola_pav babilen: thanks I will try to use a fresh image
10:27 hemebond Oh, I hadn't thought of that. Is that because you installed it or because OpenStack has images with Salt on it already?
10:30 nicola_pav hemebond: maybe - that is why I asked about minion_id - it has a weird name - I created an instance of the image manually and it has salt installed there
10:30 nicola_pav will try fresh clear image and see
10:37 hemebond Bootstrapping and configuring the minion will only happen if the box is not running salt-minion already; it doesn't update the config.
10:44 teryx510 joined #salt
10:45 antpa joined #salt
11:01 ninjada joined #salt
11:02 pipps joined #salt
11:14 amcorreia joined #salt
11:19 flowstate joined #salt
11:19 ninjada joined #salt
11:21 alinuxninja joined #salt
11:23 jtang joined #salt
11:28 ekkelett To any actual devs here: any of you use pycharm to develop saltstack?
11:28 ekkelett ... if so, any write-ups on how to best integrate testing with it?
11:30 ingslovak joined #salt
11:36 armin hi, i'm getting the following error when trying to run "yum update" with both epel and saltstack repositories enabled: https://paste.fedoraproject.org/396782/05704146/ - anything i could do about this?
11:38 edrocks joined #salt
11:38 ninjada joined #salt
11:43 badon joined #salt
11:45 POJO joined #salt
11:47 XenophonF joined #salt
11:55 sagerdearia joined #salt
11:57 toanju joined #salt
11:59 Deliant joined #salt
12:03 pipps joined #salt
12:08 kawa2014 joined #salt
12:11 amcorreia joined #salt
12:12 jtang joined #salt
12:16 toanju joined #salt
12:16 edrocks joined #salt
12:20 datamann joined #salt
12:20 averell joined #salt
12:21 _JZ_ joined #salt
12:26 hoonetorg joined #salt
12:27 stooj joined #salt
12:30 edrocks joined #salt
12:32 Tanta joined #salt
12:41 ivanjaros joined #salt
12:41 lero__ joined #salt
12:48 antpa joined #salt
12:51 mpanetta joined #salt
12:57 mpanetta_ joined #salt
13:01 datamann joined #salt
13:03 gh34 joined #salt
13:03 ninjada joined #salt
13:04 pipps joined #salt
13:04 ronnix joined #salt
13:09 schemanic_ joined #salt
13:09 edrocks joined #salt
13:10 racooper joined #salt
13:13 flowstate joined #salt
13:13 ninjada joined #salt
13:13 flowstate joined #salt
13:16 ssplatt joined #salt
13:17 teryx510 joined #salt
13:19 tracphil joined #salt
13:20 TooLmaN joined #salt
13:22 lnx joined #salt
13:31 perfectsine joined #salt
13:32 west575 joined #salt
13:35 ronnix joined #salt
13:36 catpig joined #salt
13:37 hasues joined #salt
13:37 hasues left #salt
13:39 protoz joined #salt
13:43 dyasny_ joined #salt
13:43 JPT joined #salt
13:47 cmarzullo do you have the salt repo enabled?
13:50 edrocks joined #salt
13:55 numkem joined #salt
13:56 west575 joined #salt
13:56 ALLmightySPIFF joined #salt
13:57 syndikate joined #salt
14:00 edrocks joined #salt
14:04 PerilousApricot joined #salt
14:05 POJO joined #salt
14:05 pipps joined #salt
14:05 flowstate joined #salt
14:07 jenastar joined #salt
14:08 iceyao joined #salt
14:08 aw110f_ joined #salt
14:09 nonades joined #salt
14:10 flowstate joined #salt
14:12 aw110f__ joined #salt
14:14 mapu joined #salt
14:23 jhauser_ joined #salt
14:24 lero joined #salt
14:25 Andrew joined #salt
14:28 bowhunter joined #salt
14:30 pipps joined #salt
14:31 pipps99 joined #salt
14:32 fracklen joined #salt
14:32 bastiand1 joined #salt
14:34 raspy_ joined #salt
14:35 fracklen_ joined #salt
14:36 ajw0100 joined #salt
14:37 mpanetta joined #salt
14:39 suwerrat joined #salt
14:47 fred joined #salt
14:48 Guest4860 Hi I am trying to use reactors but storing them in a git repo - salt://reactor/bootstrap/startup_highstate.sls
14:48 Guest4860 is that correct?
14:51 suwerrat left #salt
14:52 Andrew joined #salt
14:54 MajObviousman what would be the best way to do this: Query all minions for the presence of a specific user. For those minions which respond affirmatively, issue a second call to useradd to create another user
14:54 flowstate joined #salt
14:56 sp0097 joined #salt
14:57 mpanetta_ joined #salt
14:57 LessSneaky joined #salt
14:58 mpanetta_ joined #salt
15:02 numkem joined #salt
15:04 Brew joined #salt
15:04 aw110f_ joined #salt
15:04 Guest4860 user.present onlyif: user.present?
15:05 Guest4860 worth a try
15:07 PredatorVI joined #salt
15:07 flowstate joined #salt
15:08 aw110f__ joined #salt
15:08 Guest4860 MajObviousman http://pastebin.com/LWLX3G4M
15:08 mohae joined #salt
15:08 Guest4860 Tested it and it seems to work for me.
15:08 MajObviousman hmm
15:08 MajObviousman that'll do nicely
15:08 coval3nce joined #salt
15:08 * MajObviousman forgot about onlyif
15:08 [1]PredatorVI joined #salt
15:09 anotherZero joined #salt
15:09 coval3nce Anyone know wher to go look in Salt code to figure out what variables are availabile during compliation of top?
15:10 coval3nce Looking to see if somehow environent of a minion can be gleaned.
15:10 antpa joined #salt
15:10 c4t3l hello! Does anyone know where I can find more info on the salt master config option `log_granular_levels`?  I dont know where the list of "modules" comes from
15:10 coval3nce This wold be for the Pillar facility
15:11 PredatorVI joined #salt
15:11 PredatorVI left #salt
15:12 MajObviousman aha, that feature only showed up in mid-2014
15:12 PredatorVI joined #salt
15:12 MajObviousman onlyif, I mean
15:13 corichar joined #salt
15:15 jenaty joined #salt
15:16 flowstate joined #salt
15:17 PredatorVI I broke gitfs I think.  Has anyone seen this error and know what it means? " Exception Require 20 byte binary sha, got '\xe6\x90', len = 2 occurred in file server update"
15:17 datamann joined #salt
15:17 datamann joined #salt
15:19 CTaylor_ joined #salt
15:19 cyborg-one joined #salt
15:20 datamann joined #salt
15:20 zer0def joined #salt
15:20 morissette joined #salt
15:21 datamann joined #salt
15:25 quasiben joined #salt
15:25 quasiben Hi all — i'm having some trouble using the exit_success function:
15:25 quasiben salt-run jobs.exit_success 20160520145827701627
15:25 quasiben 'jobs.exit_success' is not available.
15:25 quasiben any ideas what I'm doing wrong here ?
15:26 quasiben I have the following setup in external_auth
15:26 quasiben - .*
15:26 quasiben - '@jobs'
15:26 quasiben - '@runner'
15:26 quasiben - '@wheels'
15:26 ageorgop joined #salt
15:26 quasiben other runner commands return with no issue
15:28 Fredrick joined #salt
15:28 quasiben [root@ip-172-31-61-135 ~]# salt-run --version
15:28 quasiben salt-run 2016.3.0 (Boron
15:35 PredatorVI @quaiben...I don't typically use this, but I'm seeing the same issue.  I can call jobs.list_job on a valid job id and it dumps info on that job but all calls to exit_status returns the message"'jobs.exit_status' is not available."
15:35 edrocks joined #salt
15:36 perfectsine_ joined #salt
15:37 PredatorVI oops...I typed it wrong...I was trying "exit_status"...when I tried 'exit_success' on a now complete job, I get an exception
15:38 PredatorVI File "/usr/lib/python2.7/dist-packages/salt/runners/jobs.py", line 516, in exit_success
15:39 PredatorVI TypeError: argument of type 'bool' is not iterable
15:39 johnkeates joined #salt
15:39 PredatorVI I'm using latest  2016.3.1+ds-1 on Ubuntu 14.04
15:41 quasiben i'm upgrade to 2016.3.1
15:44 Sketch does it matter if hash_type matches between master and minions?
15:44 coval3nce Damn there has to be a bu with top-file-merging-strategy or i’m grossly misunderstanding something lol
15:46 PredatorVI @Sketch I wondered the same thing.  Do you use gitfs and if so are you trying to change hash_type to sha256 (or something other than md5)?
15:47 PredatorVI When I changed my master to hash_type: sha256, it seems gitfs breaks
15:47 Sketch well, i just updated some minions to 2016.3 and i see warnings in the log about changing the hash_type from md5 to sha256...but i haven't tried it yet
15:47 Sketch we do use gitfs on the server
15:47 autofsckk joined #salt
15:48 Sketch (it's possible the warnings were there before and i just didn't notice, until i was debugging one specific client which failed)
15:48 c4t3l the hash_type really just protects you from hash collisions when you have many thousands of minions
15:48 PredatorVI I'd be interested in what you see when you change it on the master.  I think the gitfs module doesn't like sha256
15:48 PredatorVI I switched back to default and gitfs is working again
15:48 quasiben @PredatorVI what do you typically use to check on job status asynchronous ?
15:49 c4t3l if you have a very large environment I would worry about it, otherwise not
15:49 PredatorVI I don't do things asynchronously
15:49 PredatorVI yet
15:49 Sketch maybe i only need to change it on the client and mot the master
15:49 Sketch in that case ;)
15:49 Fredrick What do I need to keep to ensure I can rebuild a master server?  just the /etc/salt/pki/master/ master.pem and master.pub??
15:50 Sketch now i only have one error at startup: salt-minion[13493]: [ERROR   ] Function grains.get in mine_functions failed to execute
15:53 PredatorVI @Fredrick Not sure you need those.  I think it regenerates the keys when you install fresh but I'm still running in a loosely secure enviroment where I just accept all keys so there may be a reason to keep the original keys.  For sure you might want the configs so you don't have to reconfigure your file/pillar roots.
15:53 Fredrick I am building a dr plan.  how would the minions be able to communicate if not a share secret
15:53 Sketch guessing i need to set something up on the minion to allow mine_functions to execute stuff
15:56 ivanjaros joined #salt
15:56 PredatorVI @Frederick I think there is a negotiation process when minion connects.  The minion doesn't care what the master certificate/key is.  The master is the one that manages the minion keys so if you want all salt-keys for all minions to be 'accepted' when the server is recovered, you might just want to keep all minion keys.  In that case maybe just keep everything from the /etc/salt folder.
15:58 PredatorVI That would ensure your master configuration, along with all accepted/rejected/pending keys are also maintained.
15:58 Fredrick That would be a nightmare.. We auto build/delete servers as needed all the time.  Swore I just needed to keep the master keys
15:59 JPT joined #salt
15:59 PredatorVI Do you auto-accept minion keys?
16:00 mikecmpbll joined #salt
16:01 Fredrick I do based on the network.
16:01 Fredrick vi autosign.conf
16:02 Fredrick via autosign.conf that is.
16:09 Sketch hmm, actually the new minion file says that hash_type defaults to 256, but it's commented out and i get a warning that it is using md5...so it seems the description in the minion file is wrong
16:10 Sketch at least as delivered in salt-minion-2016.3.1-1.el7.noarch
16:11 Miouge joined #salt
16:11 deus_ex joined #salt
16:12 afics joined #salt
16:12 afics joined #salt
16:17 brotatochip joined #salt
16:17 whitenoise joined #salt
16:18 Miouge joined #salt
16:18 PredatorVI @Fredrick you shouldn't need to keep the keys.  See https://docs.saltstack.com/en/getstarted/system/communication.html, specifically when it says:  "A new key is generated and used each time the Salt master restarts and each time a Salt minion key is deleted using the salt-key command."
16:18 PredatorVI Unless I;m reading it wrong
16:22 west575 joined #salt
16:22 PredatorVI okay, maybe not.  I tried changing my master key and the minions won't connect.
16:22 aw110f_ joined #salt
16:25 edrocks joined #salt
16:25 aw110f__ joined #salt
16:26 Miouge joined #salt
16:28 PredatorVI minions definitely caching the master public key.
16:28 lero joined #salt
16:31 UtahDave joined #salt
16:32 racooper Can jinja templating be used in files managed within a file.recurse state?
16:33 UtahDave racooper: yes.  add  - template: jinja    to your file.recurse
16:33 racooper thanks. that simplifies things.
16:35 racooper I found out that I can't manage a single file separately that is inside a file.recurse path.  gives an unclear error " Too many functions declared in state 'file' in SLS 'idp-dev.files'"
16:37 MajObviousman but you can exclude that file and set up a separate file.managed for it
16:37 MajObviousman actually I believe it's exclude_pat
16:38 brotatochip_ joined #salt
16:39 racooper I didn't even have that file in the recursed filetree, it was separate, and defined separately, in the sls.
16:39 Miouge joined #salt
16:42 Miouge joined #salt
16:43 Fredrick @PredatorVI that is what I saw as well.  That is why I was asking what the minimum I can backup to recover a master from disaster
16:44 PredatorVI Good thing I'm not a betting man or I'd have lost that one :)
16:44 writtenoff joined #salt
16:47 MajObviousman racooper: iiinteresting
16:47 west575_ joined #salt
16:48 MajObviousman racooper: so the file exists in say /path/to/tree/thefile, and you're separately doing a file.recurse on /path/to/tree
16:48 MajObviousman I'm still thinking an explicit exclude_pat in the file.recurse would be a good place to start troubleshooting
16:49 MajObviousman certainly this behavior is unexpected
17:02 racooper eh, since I can use jinja templates in file.recurse managed files, it's not a big deal. just moved the file in to the recursed tree.
17:03 johnkeates joined #salt
17:04 Miouge joined #salt
17:06 amcorreia joined #salt
17:08 majuscule I have a conditional that relies on a deeply nested attribute that may or may not exist. Is there a better pattern than walking down the whole thing? i.e. {% if foo.a and foo.a.b and foo.a.b.c and foo.a.b.c.d == 'bar' %}
17:09 cmarzullo ha dealing with the same sadness right now too.
17:11 fracklen joined #salt
17:12 Fredrick @PredatorVI I thought the same thing until i tested.
17:13 impi joined #salt
17:14 Fredrick So is there a way to hid pillar data?  I have keys in pillars but you can see them by running a pillar.items against the servers?
17:14 babilen majuscule: Better to use salt['pillar.get']('a:b:c:d:f', None) and test for None
17:14 babilen (or something else that's falsey)
17:16 Miouge joined #salt
17:16 edrocks joined #salt
17:20 majuscule thanks babilen, that's a million times better
17:20 brotatochip joined #salt
17:21 DammitJim joined #salt
17:22 fxhp joined #salt
17:22 pipps joined #salt
17:22 Miouge joined #salt
17:23 DammitJim so, I had to move a minion from 1 domain to another (linux machine)
17:23 DammitJim and I had to change networks
17:23 DammitJim should I delete the salt-key and re-accept it?
17:25 nmadhok joined #salt
17:25 flowstate joined #salt
17:26 DammitJim what all do I need to remove?
17:26 DammitJim or I don't have to do anything like that?
17:26 babilen DammitJim: Guess that removing the old key and accepting the new one is easiest .. but did the minion id change at all?
17:27 DammitJim I don't think so
17:27 DammitJim I've deleted the minion.pem and minion.pub in the past
17:27 babilen Well, then you shouldn't have to do anything
17:27 DammitJim oh ok
17:27 babilen Is it not replying?
17:27 DammitJim I jsut need to rename the minion in the master
17:27 DammitJim and the minion_id on the minion
17:28 DammitJim the server name changed from upqueue101test.railrug.com to upqueue101test.lstdmz.com
17:29 babilen So you *do* want to rename the minion
17:29 PerilousApricot joined #salt
17:30 DammitJim got it... yes
17:30 babilen Then it would be easiest to remove the key for upqueue101test.railrug.com and accept the one from upqueue101test.lstdmz.com :D
17:30 elias__ joined #salt
17:30 DammitJim but I still don't have to change the key, right?
17:30 DammitJim when I changed the minion_id, did the key change once I started the salt-minion service?
17:32 flowstate joined #salt
17:36 antpa joined #salt
17:42 fracklen joined #salt
17:42 Linuturk joined #salt
17:43 Miouge joined #salt
17:46 west575 joined #salt
17:47 brotatochip joined #salt
17:47 quasiben I'm in the process of upgrade to 2016.3.1 I'm getting an error when launching salt-api
17:47 quasiben [ERROR   ] Did not find any netapi configurations, nothing to start
17:47 quasiben Is there a config changer in `master` ?
17:56 ktosiek joined #salt
17:57 mpanetta_ joined #salt
18:08 bowhunter joined #salt
18:09 antpa joined #salt
18:11 ingslovak joined #salt
18:12 antpa joined #salt
18:12 flowstate joined #salt
18:13 west575 joined #salt
18:14 quasiben any thoughts on [ERROR   ] Did not find any netapi configurations, nothing to start ?
18:14 hasues joined #salt
18:14 hasues left #salt
18:16 UtahDave quasiben: how are you launching salt-api?
18:17 MajObviousman does salt always use the presence of minion pubkeys as its "store" of connected minions, or is there an in-RAM table somewhere?
18:18 MajObviousman e.g. if I move a minion's host such that the domain name changes, can I just equivalently rename the pubkey in pki_dir/master/minions/ ?
18:18 antpa joined #salt
18:18 MajObviousman (without restarting salt-master)
18:19 UtahDave you can rename the pubkey as long as you rename the minion id to match.  The minion id is cached on the minion, so you may have to modify that cached file or delete it.
18:19 MajObviousman ooh I forgot about the minion cache
18:20 UtahDave that master does cache some minion info, like grains and stuff, so the master might be missing some of that info until those caches are created
18:23 west575 joined #salt
18:24 tapoxi joined #salt
18:25 tapoxi anyone using the slack engine? fairly certain I have it configured properly, it's just not doing much
18:29 Brew1 joined #salt
18:33 amcorreia joined #salt
18:35 Tanta joined #salt
18:40 ALLmightySPIFF joined #salt
18:42 drawsmcgraw joined #salt
18:49 toanju joined #salt
18:49 Miouge joined #salt
18:50 GreatSnoopy joined #salt
18:55 antpa joined #salt
18:57 mpanetta joined #salt
18:59 brotatochip joined #salt
19:00 POJO joined #salt
19:00 flowstate joined #salt
19:00 mpanetta joined #salt
19:06 ribx joined #salt
19:09 Sammichmaker joined #salt
19:10 Brew joined #salt
19:15 numkem joined #salt
19:17 wryfi is it possible to create custom jinja filters to use with salt?
19:18 Brew joined #salt
19:21 Sokel left #salt
19:23 ssplatt pretty sure ansible does. so i’m sure there’s a way
19:25 iggy jinja supports it, salt doesn't
19:25 iggy I think there's a ticket about it
19:29 MajObviousman I keep looking at the initial minion -> master link up and thinking of ssl certificates
19:32 anotherZero joined #salt
19:33 brotatochip joined #salt
19:34 MajObviousman what I keep stumbling over is how to securely add minions to a master automatically without using auto_accept and without needing to log in to the salt master to pre-issue a new temporal keypair (a la autosign)
19:36 deus_ex joined #salt
19:38 evidence is it known that the pillar disk/memory cache cannot be used with the gitfs backend?
19:39 xist joined #salt
19:41 Fredrick @babilen that is great but if I do a pillar.items does that hide the pillar info?
19:44 mapu joined #salt
19:45 cmarzullo wryfi: I've done macros but haven't done filters yet.
19:46 wryfi yeah, i just found a mailing list thread. i wrote a module instead, hopefully that will work.
19:46 wryfi https://groups.google.com/forum/#!topic/salt-users/BQpzBO5RopQ
19:46 kingscott joined #salt
19:47 kingscott As of right now I do not have salt-minions on my windows boxes. what advantage to I gain for a windows salt-minion?
19:49 cmarzullo config mgmt and orchestration
19:53 ekkelett kind of like the purpose of salt in general, really.
19:54 raspy_ hi all, why do i get this error "- No matching sls found for '/srv/salt/salt/dev/ssh-proxy/google-authenticator/init.sls' in env 'dev'"
19:55 aphor joined #salt
19:55 Raiden joined #salt
19:55 UtahDave raspy_: can you pastebin the command you're running and the result?
19:57 Guest33663 Hi...I just started using salt
19:57 Guest33663 the problem I am facing is that I am invoking state.orchestrate from a reactor sls...and it requires saltenv variable
19:58 aphor did anyone notice that zeromq revved on EPEL and now installs libzmq.so.5 instead of the libzmq.so.4 that python-zmq-14.7.0-1 from the SaltStack yum repo wants?
19:58 Guest33663 is there any way to apply it for all environments...
19:58 s_kunk joined #salt
19:58 Guest33663 if I skip the saltenv variable it searches in base env
19:59 Sketch aphor: i noticed that too. luckily prod systems are using a local mirror of epel which hasn't been updated...
19:59 aphor Guest33663: Are you deploying multiple versions of your salt states to different places at the same time?
19:59 Sketch s/luckily/luckily our/
19:59 Sketch then again, maybe our salt repo is out of date too ;)
19:59 Guest33663 yes I have multiple deployment environments...
19:59 aphor Sketch: +1
19:59 MajObviousman the so.4 and so.5 should happily co-exist
20:00 aphor Guest33663: that answer was not entirely specific to my question due to the qualifications you added to the "yes"
20:02 Guest33663 sorry for the confusion... I am not deploying to different places at the same time. I deploy first for a environment. Then I deploy for another environment. hope that clears it
20:02 aphor MajObviousman: the yum update step in the salt-bootstrap.sh script hates the pegged version in the python-zmq package crossing with the "so.5 upgrades the so.5 package" configuration in the zeromq RPM spec file.
20:03 raspy_ UtahDave: http://pastebin.com/gLv4addM
20:03 MajObviousman aphor: that is good to know. I will keep a weather eye out
20:03 pipps joined #salt
20:03 MajObviousman might be time to bail on EPEL's packages and just use pip
20:03 aphor Guest33663: do your different environments need different versions of the same states, like a test and prod environment?
20:03 MajObviousman though I'd have to roll up a static cache for my disconnected nodes
20:05 Guest33663 No they don't need different versions
20:05 aphor I think the salt-boostrap.sh should do a --skip-broken on the yum update step, just in case we need to peg versions for any reason, and also to let things work while the salt yum repo is out of date.
20:06 aphor Guest33663: if the different environments don't need different versions of the same salt states, then you should not be using salt environments.
20:07 aphor saltenv is a reference to a branch or tag in a git repo, for example.
20:07 UtahDave raspy_:    Try this:     sudo salt sshproxy* state.apply ssh-proxy.google-authenticator
20:08 UtahDave raspy_: also, please pastebin your file_roots config option in your master config?  That might change the above example a little
20:08 aphor Guest33663: set a "project" grain and target your deployments using compound matchers in top.sls out of the base env.
20:09 pipps joined #salt
20:09 Guest33663 thanks aphor...
20:09 aphor Guest33663: if you need to roll out a deployment from a feature branch on your salt states, then use a new salt environment to make sure those minions get stuff from the correct branch.
20:10 raspy_ UtahDave: that works too to give you a little bit of background, eventually I will create a state file but I will not add it to the top.sls as it will be an adhoc sls file that will only be ran but an individual to create the google-authenticator for their account
20:10 pipps99 joined #salt
20:10 raspy_ not sure whats the best way to do it but I dont want it to load automatically from the top.sls
20:11 Guest33663 okay sure thanks
20:11 UtahDave raspy_: that's fine, it doesn't have to be in the top.sls
20:12 raspy_ UtahDave: your right, i just realized that :D haha
20:12 raspy_ this works, thx for the solution UtahDave
20:13 UtahDave raspy_: you're welcome!
20:13 MajObviousman so I'm looking for some decent docs on autosign
20:13 MajObviousman I see a mention of it in the sample master config
20:14 MajObviousman I see some blurbs in the master configuration help file, but nothing that really explains enough
20:14 PerilousApricot joined #salt
20:18 cmarzullo not much to it when I used it MajObviousman the minion id in the file. it will always sign.
20:20 MajObviousman so you used autosign_file then
20:20 bltmiller joined #salt
20:20 MajObviousman which means any system which has set its id field to something that matches a line in that file would get auto-accepted
20:21 MajObviousman ?
20:21 flowstate joined #salt
20:22 raspy_ is there a way where I can require an sls but another entire sls
20:22 raspy_ not specific states within the sls file such as passing a require: -sls: foo
20:22 raspy_ basically i need one sls to run after the first one finishes
20:23 bltmiller raspy_: hm, well for one thing, your top file should execute in-order top-to-bottom, no?
20:23 bltmiller define order there
20:23 raspy_ bltmiller: ahhh ok didnt know that
20:24 MajObviousman argh, salt docs are maddeningly inconsistent
20:24 bltmiller raspy_: at least I believe that's the default behavior. your mileage may vary
20:24 MajObviousman "incoming public key with a matching name found in pki_dir/minion_autosign/keyid"  WTF YOU'RE NOT USING THE TERM keyid ANYWHERE ELSE
20:24 ajw0100 joined #salt
20:25 bltmiller raspy_: also assuming you've already seen this: https://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file
20:25 raspy_ bltmiller: i see thx! ill try that
20:25 bltmiller ^_^
20:25 raspy_ bltmiller: oh yeah i was just reading that
20:25 raspy_ but you see in bar:
20:25 Sketch raspy_: you could use include
20:25 raspy_ the require: -sls:foo
20:26 Sketch (maybe)
20:26 raspy_ i basically want the require to be at the very top so i dont have to define that for every state in the .sls file
20:27 raspy_ include? okay ill check thx Sketch bltmiller
20:29 RandyT joined #salt
20:30 UtahDave MajObviousman: keyid is just the name of the minion
20:30 MajObviousman which is called "id" every other place in the docs
20:31 MajObviousman unless there's some hidden docs not accessible to Google on docs.saltstack.org, because I literally searched the entire site for any instance of "keyid" or "key id" and came up with unrelated dross
20:31 MajObviousman but thank you for the affirmation
20:33 UtahDave sorry for the confusion. Things like that slip in sometimes when there's thousands of pages of docs and hundreds of people contributing to and adding to the docs.
20:33 MajObviousman I'd be happy to make updates to the docs to fix these kinds of things
20:33 teryx510 joined #salt
20:33 * MajObviousman goes to look up how to submit changes
20:33 dyasny joined #salt
20:34 UtahDave That would be incredibly helpful.  Docs for states and modules come from the docstrings of the python modules themselves, other types of docs are found  in the docs directory in the salt git repo
20:34 teryx510 joined #salt
20:36 UtahDave MajObviousman: So I think what you were looking at would be found here:  https://github.com/saltstack/salt/blob/develop/doc/ref/configuration/master.rst
20:37 MajObviousman perfect, it's even in rst
20:37 MajObviousman ok cool
20:37 UtahDave MajObviousman: doc fixes are submitted just like any other github pull request.
20:37 MajObviousman thanks for the tips. Depending on availability, you'll likely get some PRs coming your way
20:38 UtahDave thanks!  We really appreciate people submitting doc fixes as they find problems.
20:39 MajObviousman also, well done on deflecting my irritation into useful work
20:39 PerilousApricot joined #salt
20:43 mdpolaris joined #salt
20:45 UtahDave :)  thanks for being here and being willing to let us know where we need improvement!
20:47 mdpolaris joined #salt
20:48 ajw0100 joined #salt
20:50 NightMonkey joined #salt
20:53 elias__ I'm struggling with checking for an available execution mod/fun from within Jinja… I assumed `jinja` would be just a (dunder) dict of all available execution mods/funs, but "{% if 'systemd.sd_booted' not in salt %}" just ends up in https://gist.github.com/eliasp/5d2ab1cfd5a2d0a5aa3e111d2e4f7066
20:57 eliasp using "{% if not salt['systemd.sd_booted']() %}" instead results in "Rendering SLS 'base:linux.systemd.timedate' failed: Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'systemd.sd_booted'"
20:58 eliasp other ideas? I basically want to check from within Jinja, whether the systemd was booted using systemd or not…
20:59 iggy eliasp: systemd is not the virtual name
20:59 cmarzullo sd_booted doesn't look like a module or am I missing something:
20:59 cmarzullo 5102
20:59 flowstate joined #salt
20:59 eliasp iggy: aaaaah… thanks for opening my eyes… ;)
20:59 eliasp service.sd_booted is what I most likely want ;)
21:00 brotatochip joined #salt
21:00 iggy but I don't see sd_booted in there (as was mentioned)
21:00 eliasp hmm, let's see where this should be located…
21:01 mdpolaris I was working with the ddns state and it appears the keyfile does not support the using salt fileserver, ex: - keyfile: salt://files/key_file.key  The state works fine when the keyfile is local to the minion.
21:02 anotherZero joined #salt
21:02 iggy probably {% if 'service.systemctl_reload' in salt %} would do what you want
21:02 iggy I can't see any of the other service modules having a function systemctl_reload
21:02 eliasp iggy: yeah, although not intended for that, but looks like the most reasonable approach to solve this
21:02 eliasp thx
21:02 nZac joined #salt
21:03 eliasp iggy: systemd.sd_booted is a __context__ key… that's why I had this in my mind
21:03 iggy context isn't available in jinja
21:03 debian112 joined #salt
21:03 eliasp yes, sure… so I'll go with `service.systemctl_reload` :)
21:06 eliasp iggy: the result is still weird - using "{% if 'service.systemctl_reload' not in salt %}" - result: https://paste.kde.org/ps11ruwix
21:07 cmarzullo there's a systemd grain. is that useful?
21:07 eliasp cmarzullo: good idea, let's check
21:09 eliasp cmarzullo: unfortunately, no ;( it's content doesn't differ depending on the systemd being sd_booted or not…
21:10 eliasp cmarzullo: but the direction wasn't bad… there's a "init" grain which I will now just check whether it's "systemd" or not :)
21:10 eliasp cmarzullo: although not fully correct in case another service manager was used, this is sufficient for my use-case
21:10 eliasp cmarzullo: thanks a lot
21:12 cmarzullo woot!
21:12 votz joined #salt
21:13 votz How do I pass the -i flag of salt-ssh (to auto-accept host keys) via the Python API? That is, what does salt-ssh -i map to in the kwargs of salt.client.ssh.client.SSHClient().cmd(..., kwargs)?
21:18 iggy eliasp: salt.get('service.systemctl_reload') ?
21:18 eliasp iggy: strangely not, it just claimed a bool object wouldn't have a `.get` method or so… let me reproduce
21:18 eliasp don't know what weird magic is behind those dunder dicts ;)
21:20 eliasp iggy: and it magically works now… eeeh :?
21:25 om joined #salt
21:32 UtahDave left #salt
21:35 anotherZero joined #salt
21:35 Raiden joined #salt
21:50 alexhayes joined #salt
21:50 alexhayes left #salt
21:55 ajw0100 joined #salt
22:03 Vaelatern joined #salt
22:11 cyborg-one joined #salt
22:18 jtang joined #salt
22:25 PredatorVI joined #salt
22:30 tonybaloney joined #salt
22:43 sp0097 joined #salt
22:43 bltmiller joined #salt
22:43 flowstate joined #salt
22:53 MTecknology What's the correct way to pass extra arguments to pass extra arguments to a state run from salt cli?
22:54 MTecknology salt 'foo' state.sls some.state foo=bar bar=foo ?
22:54 iggy pillar data
22:54 eliasp MTecknology: salt 'foo' state.sls some.statae pillar='{"foo": "bar"}'
22:55 lempa joined #salt
22:55 eliasp MTecknology: or properly through regular Pillar SLS + top assignments
22:55 MTecknology sweet!
22:57 MTecknology err... wait
22:58 MTecknology extra argument... meaning things that are already options
22:58 eliasp ah, then just as foo=bar kwargs
22:58 MTecknology hmm...
22:58 eliasp MTecknology: could you give an example?
22:59 MTecknology salt 'some_system' lxc.init rt2 profile=myprofile network_proflile=int-main template=centos
23:00 MTecknology ERROR executing 'lxc.create': At least one of 'template', 'image', and 'profile' is required
23:01 tpaul joined #salt
23:01 hexa- docs are 404ing? https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
23:01 MTecknology err... that error is from a different command, but profile= is passed that same way w/ lxc.create
23:01 eliasp hexa-: uh, yeah… looks like ;(
23:02 hemebond MTecknology: Are you sure it's not because you're providing profile AND template?
23:02 hemebond Or maybe that's just overrides...
23:02 MTecknology should be overrides..
23:03 MTecknology alt 'some_system' lxc.create name=newsys1 profile=myprofile  -- ERROR executing 'lxc.create': At least one of 'template', 'image', and 'profile' is required
23:03 hemebond There really needs to be an example or two for each function.
23:03 hemebond Oh AND
23:03 hemebond What if you provide "image" parameter?
23:03 hemebond Oh, nevermind.
23:03 hemebond "A tar archive to use as the rootfs for the container. Conflicts with the template argument."
23:04 tonybaloney joined #salt
23:05 hemebond elif not any((template, image, profile)):
23:05 hemebond That test seems okay.
23:07 hemebond What happens if you put the value in quotes?
23:08 MajObviousman I've been struggling with the salt call doc today as well
23:08 MajObviousman I'm not convinced it actually A) supports arguments B) doesn't try to treat the first argument after a state file as the environment instead
23:10 MajObviousman well, by that I mean it's murky which parts belong to the module you're invoking and which belongs to the salt invocation itself
23:12 MTecknology hemebond: looks like this has something to do with get_container_profile
23:12 MTecknology yay!
23:13 eliasp hexa-: docs are back … looks like the doc builds aren't really CoW-ish ;)
23:15 tonybaloney joined #salt
23:17 ronrib joined #salt
23:18 hexa- hehe
23:19 ninjada joined #salt
23:22 nmadhok joined #salt
23:31 west575 joined #salt
23:35 MTecknology hemebond: bossman figured it out ... https://github.com/saltstack/salt/issues/34678
23:35 saltstackbot [#34678][MERGED] config.get module is broken due to bug in dictupdate.py | Description of Issue...
23:36 hemebond Oooh, nice.
23:42 teryx510 joined #salt
23:44 iceyao joined #salt
23:47 elias_ joined #salt
23:48 tonybaloney joined #salt
23:51 MTecknology hemebond: so, what's the /right/ way to adopt this update without having to build/deploy new salt? Can I just drop it into repo:salt/_modules/ and tell systems to sync modules?
23:52 irctc246 joined #salt
23:52 hemebond Uh. I have a feeling iggy has done that kind of thing before.
23:52 irctc246 How do I pass saltenv in local.state.sls ...complete state file as
23:52 irctc246 copy_files:   local.state.sls:     - arg:       - kubeminion.copy_certs     - tgt: '*'
23:52 irctc246 copy_files:local.state.sls:     - arg:       - kubeminion.copy_certs     - tgt: '*'
23:52 irctc246 sorry for the typo
23:52 irctc246 it searches for the state file in env base
23:56 anotherZero joined #salt
23:56 irctc246 never mind...it worked...giving kwarg in wrong format
23:56 votz How does the salt-ssh -i flag (that auto-accepts host keys) map to the Python API? That is, what kwarg should be provided to salt.client.ssh.client.SSHClient().cmd(..., kwargs) to accomplish the same thing as -i of the CLI?

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