Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-12-06

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

All times shown according to UTC.

Time Nick Message
00:03 nickabbey joined #salt
00:05 tkojames ok thanks whytewolf typo on my part i did put the reactor at reactor/restart not services thank you for the help!
00:05 whytewolf no problem :)
00:08 tkojames ok so it looks like it is coming through this is what I get when I run salt-run state.event pretty=True  http://pastebin.com/B2HNZvsJ and nginx did not restart on the minion any ideas? Seems to be posting?
00:09 whytewolf okay, that is a good sign.
00:10 whytewolf what does the salt master log look like?
00:10 whytewolf is there anything about the reactor firing in there?
00:11 whytewolf also for testing you can rasie the minions log level by putting log_level_logfile: debug in your minion config and restarting it
00:12 whytewolf then when you look at the log you should see the call from the reactor
00:12 whytewolf [if it is hitting the minion that is]
00:12 whytewolf you can do the same to the salt-master
00:13 whytewolf at this point though it looks like something in the reactor.
00:15 J0hnSteel joined #salt
00:26 amontalban joined #salt
00:26 amontalban joined #salt
00:32 akhter joined #salt
00:37 jas02 joined #salt
00:41 tkojames Thanks super helpful I am getting the following error " Can not render SLS /salt/reactor/restart.sls for tag salt/netapi/hook/restart. File missing or not found"  here is the reactor.conf and sls file http://pastebin.com/S2CZYvJe it does not seem to be in the wrong place. So seems like the reactor is bad then?
00:41 akhter joined #salt
00:43 akhter_1 joined #salt
00:49 whytewolf tkojames: /salt/reactor/restart.sls != /etc/salt/reactor/restart.sls
00:52 whytewolf it is looking for the file in /salt/reactor/restart.sls
00:55 tkojames wow iam dumb did not even think about!! it works thank you for helping such noob mistake. Thank you so much sorry to bother
00:56 whytewolf no problem :) have a good day.
01:01 aidin joined #salt
01:07 woodtablet left #salt
01:18 DEger joined #salt
01:27 cliluw joined #salt
01:45 zzuf joined #salt
01:47 jas02 joined #salt
01:49 k_sze[work] joined #salt
02:11 cyborg-one joined #salt
02:14 catpiggest joined #salt
02:14 swills joined #salt
02:15 GabLeRoux joined #salt
02:19 netcho joined #salt
02:20 nZac joined #salt
02:35 amontalban joined #salt
02:35 amontalban joined #salt
02:35 akhter joined #salt
02:37 evle joined #salt
02:38 madboxs joined #salt
02:40 netcho joined #salt
02:40 sh123124213 joined #salt
02:40 sebastian-w joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.0 <+> 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:49 stooj joined #salt
02:55 jas02 joined #salt
02:59 GabLeRoux joined #salt
03:19 onlyanegg joined #salt
03:28 voxpop joined #salt
03:32 akhter joined #salt
03:37 amontalban joined #salt
03:40 bastiandg joined #salt
03:45 zzzirk joined #salt
03:49 jas02 joined #salt
03:51 Tech01x joined #salt
03:51 Tech01x hello?
03:52 julwong joined #salt
03:53 justanotheruser joined #salt
03:53 Tech01x I am having problems with source_hash and getting the checksum verification to happen correctly in archive.py
03:59 hemebond Tech01x: Have you pasted the state/command and error somewhere?
04:00 onlyanegg joined #salt
04:03 Tech01x No... what should I paste?
04:04 Tech01x I am using salt-ssh
04:04 Tech01x and updating a md5 hash
04:04 Tech01x if I clean out the minion cache
04:04 Tech01x and wipe out the files on the minion
04:04 Tech01x the install does work the first time
04:05 Tech01x but subsequent changes... updated tar.gz file, updated md5, it does not see it
04:05 Tech01x I see the updated hash file in the minion
04:05 Tech01x looking at archive.py
04:06 Tech01x I'm not sure which archive.py is executed on the minion... there are 3 in the code base
04:07 edrocks joined #salt
04:07 jas02 joined #salt
04:09 akhter joined #salt
04:10 Tech01x source_hash_update is only referenced in the archive.py in states
04:19 MightyJoe joined #salt
04:19 Tech01x I can't find a decent log on the minion to see what the minion is doing
04:19 Tech01x any suggestions?
04:20 JPT joined #salt
04:26 onlyanegg joined #salt
04:26 aidin joined #salt
04:28 DEger joined #salt
04:29 hemebond Are you using a state to do this?
04:30 hemebond If so, paste your state somewhere, e.g., paste.debian.net
04:33 Tech01x yeah, using a state
04:34 Tech01x the state itself is easy:
04:34 Tech01x woSSAPI:   archive.extracted:    - name: /Library/Applications/    - source: salt://woapp/woapp_archive/woSSAPI-Application.tar.gz    - source_hash: md5=b5bf7a1edd6c114e0f5f646423372470    - source_hash_update: True    - source_hash_name: woSSAPI-Application.tar.gz    - archive_format: tar    - options: z    - if_missing: /Library/Applications/woSSAPI.woa
04:34 hemebond Not here
04:34 hemebond paste.debian.net
04:35 Tech01x http://paste.debian.net/900806
04:35 Tech01x I've tried specifying the source_hash_name
04:35 Tech01x and not
04:35 Tech01x using md5= and not
04:36 hemebond Which version of Salt?
04:36 Tech01x On Ubuntu, using the package  2016.11.0+ds-1
04:37 Tech01x on one of the minions
04:37 hemebond Your "source_hash_name" seems wrong.
04:37 Tech01x I just recently added that
04:37 Tech01x to see if it would work
04:38 Tech01x on the minion, /var/tmp/.root_fb67cd_salt/running_data/var/cache/salt/minion/files/base
04:38 hemebond Please paste what you're actually trying.
04:38 Tech01x the hash in _woapp_archive_woSSAPI-Application.tar.gz.hash
04:38 Tech01x is the new one
04:38 hemebond Do you need that if you're already providing the hash?
04:39 Tech01x however
04:39 Tech01x the _woapp_archive_woSSAPI-Application.tar.gz file... which is actually a tar file, not a gzip'ed file
04:39 Tech01x is the old one
04:41 netcho joined #salt
04:41 Tech01x somewhere, it decides the hash matches and doesn't bother to install the new archive
04:41 onlyanegg joined #salt
04:41 Tech01x I run it with: salt-ssh 'woapp*' -l debug state.highstate
04:42 Tech01x is there a better way to get debug output?
04:43 hemebond Nope, that should give you debug output.
04:43 hemebond Have you pasted your new state?
04:49 jas02 joined #salt
04:55 onlyanegg joined #salt
05:00 Tech01x making new test run
05:03 raspado joined #salt
05:03 raspado anyone familiar with salt-cloud
05:04 Tech01x still didn't work
05:05 Tech01x http://paste.debian.net/900807
05:06 hemebond Tech01x: remove all the hash stuff
05:06 sh123124213 joined #salt
05:06 hemebond and the archive_format too
05:06 Tech01x on minion, /var/tmp/.root_fb67cd_salt/running_data/var/cache/salt/minion/files/base
05:06 Tech01x the _woapp_archive_woSSAPI-Application.tar.gz.hash has the new hash
05:06 hemebond And if the archive doesn't contain a top-level directory you will also need enforce_toplevel: False
05:07 Tech01x archive starts with woSSAPI.woa/*
05:08 Tech01x basically, if I nuke everything on the minion... it does install correctly the first time
05:08 hemebond Tried what I suggested?
05:08 raspado is there a way to lock down the salt-minion the salt master deploys via bootstrap?
05:08 Tech01x yup... working on it
05:08 hemebond :thumsbup:
05:08 hemebond doh
05:08 hemebond raspado: Lock down?
05:09 jas02 joined #salt
05:09 hemebond What does that mean?
05:09 raspado hemebond: so i just noticed our salt masters are deploying the lastest version of salt minion
05:09 hemebond uhuh
05:09 raspado i need to somehow lock the version so salt-cloud always deploys a specific version
05:09 hemebond You mean specify a version?
05:10 raspado mmm yeah that would do
05:10 hemebond (lock-down has very different meaning)
05:10 hemebond Yes, you can. You can provide arguments to the bootstrap script.
05:10 hemebond Are you using the default salt-bootstrap.sh script?
05:10 hemebond *bootstrap-salt.sh
05:10 raspado yeah, I see it lives in /usr/lib/python2.7/site-packages/salt/cloud/deploy/bootstrap-salt.sh
05:12 hemebond https://docs.saltstack.com/en/latest/topics/cloud/misc.html#deploy-script-arguments
05:12 Tech01x I nuked everything on the minions on /var/tmp/.root*
05:12 hemebond See https://github.com/saltstack/salt-bootstrap for valid arguments.
05:12 Tech01x and the apps
05:12 Tech01x so very clean
05:12 Tech01x and ran it once and it deployed
05:13 Tech01x now running update
05:13 raspado hemebond: so in the script section, it would basically be calling bootstrap + arguments?
05:13 hemebond script_args
05:13 hemebond Yes
05:13 raspado oh i see i see
05:14 raspado if a version is specific, how likely would it be if the version we call gets dropped off the salt repo bootstrap calls?
05:14 raspado we use salt-cloud for both aws/openstack
05:15 Tech01x 2nd run, didn't deploy changed .tar.gz
05:15 raspado wondering if its possible we can mirror the salt-minion
05:15 raspado in our own repo and bootstrap calls our mirror
05:16 hemebond Tech01x: So you're trying to extract over the top of the existing directory?
05:16 Tech01x http://paste.debian.net/900810
05:16 hemebond Did you remove that .woa file?
05:16 Tech01x yeah
05:17 hemebond But you've told it not to overwrite.
05:17 hemebond if_missing: /Library/WebObjects/Applications/woSSAPI.woa
05:17 Tech01x well, I want it to overwrite if hash is changed
05:17 Tech01x but otherwise, not
05:17 hemebond It will possibly do that.
05:17 hemebond automatically.
05:17 hemebond Did you test without if_missing?
05:17 Tech01x using source_hash_update
05:18 hemebond I believe the hash stuff is for non-salt:// paths.
05:18 jas02 joined #salt
05:18 Tech01x if I don't do if_missing
05:19 Tech01x the name... is the parent dir
05:19 Tech01x otherwise, I don't get the desired extracted result
05:19 hemebond What do you mean?
05:19 smkelly joined #salt
05:20 renoirb joined #salt
05:20 Tech01x hmmm
05:20 seanz joined #salt
05:20 akhter joined #salt
05:21 seanz Howdy. I've asked about good ways to automate the bootstrapping of a salt master. What best practices are there around managing the salt master files in a source control repository?
05:21 seanz Everything I see in the documentation shows manually setting everything up.
05:21 Tech01x right... so if I use name with woSSAPI.woa at the end
05:21 Tech01x when I extract, it gets me woSSAPI.woa/woSSAPI.woa
05:21 hemebond Tech01x: Does the archive itself have the top-level directory?
05:21 Tech01x yeah
05:21 Tech01x it is the path to check
05:22 SWA joined #salt
05:22 hemebond Then specify the parent
05:22 hemebond Where you want to extract to.
05:22 seanz The folders exist by virtue of installing salt. Am I supposed to consolidate all the files into a repo and then symlink the files out into the filesystem?
05:22 Tech01x right, in name I use the parent
05:22 Tech01x and then use if_missing to get the right name underneath to discover if it is missing
05:22 hemebond Tech01x: Do you need to?
05:22 hemebond Have you tried just extracting?
05:23 buu joined #salt
05:23 buu Hrm
05:23 Tech01x yeah, because otherwise if it isn't there... the parent is, no deployment
05:23 buu Will anything hilarious happen if I specify root: - /foo/bar  - /foo
05:24 baikal joined #salt
05:24 rdas joined #salt
05:26 renoirb joined #salt
05:29 alvinstarr joined #salt
05:31 seanz joined #salt
05:31 MelloFello joined #salt
05:31 MelloFello left #salt
05:33 Tech01x I used --strip-components 1 for tar so that I can skip if_missing
05:33 madboxs_ joined #salt
05:34 mohae_ joined #salt
05:35 Tech01x ok, so now it extracts every time... even if the tarball hasn't changed
05:35 madboxs joined #salt
05:38 hemebond Have you tried overwrite?
05:38 hemebond I can't test it because I'm on a previous version.
05:38 hemebond I was trying with just name, source, and overwrite.
05:38 hemebond overwrite: True
05:39 Tech01x overwrite forces it to deploy regardless
05:39 gnord joined #salt
05:39 amontalban joined #salt
05:40 hemebond Looks like a bug to me.
05:40 hemebond I don't know how the archive.extracted is supposed to work, but I would assume that if the archive changes it would get extracted again.
05:41 hemebond And when using salt:// you shouldn't need all the hash parameters.
05:41 Tech01x I'm using salt-ssh
05:41 hemebond yip
05:41 Tech01x could there be a diff from the normal way as a result?
05:42 Tech01x if I don't use the source_hash stuff, it always deploys
05:43 Tech01x I think it just worked!
05:43 Tech01x yeah!
05:44 Tech01x I saw this in the source code... it uses name
05:44 Tech01x so if one uses the parent dir as name
05:44 Tech01x it doesn't work
05:48 scsinutz joined #salt
05:48 buu uh
05:48 buu How do I get the error "    'state.apply' is not available."
05:49 buu oh
05:49 Tech01x thanks hemebond, I worked through it
05:49 buu well, that's silly
05:49 hemebond Oh, well done.
05:49 hemebond ????
05:50 jas02 joined #salt
05:50 raspado hmmm i dont see anyway to have bootstrap install a specific version of salt-minion :\
05:51 iggy from packages? no because the software they use to setup the mirror only supports one version (at least for the deb packages)
05:51 iggy from git, yes
05:52 raspado how do I translate "install_<distro>_<major_version>_<install_type>_deps" to an actual package version?
05:52 raspado or rather "install_<distro>_<major_version>_<minor_version>_<install_type>"
05:55 Tech01x now to try it using a file instead of the single hash line
05:57 akhter joined #salt
05:58 buu Hrm
05:58 buu My config file broke salt
05:58 buu That seems suboptimal
06:01 jas02 joined #salt
06:01 buu Maybe I shouldn't use versions 2016 and 2014 at the same time
06:04 ivanjaros joined #salt
06:08 buu Ok
06:08 buu I typoed 'file.managed' as 'file.manage' but at no point did applying this state file throw an error
06:08 buu This seems like an issue
06:09 edrocks joined #salt
06:09 buu Like, wtf is it actually doing?
06:10 honestly buu, it should have given you a rendering error and nothing more
06:10 honestly please run again with -l debug
06:10 buu on the minion?
06:11 buu Can I run that on the master?
06:11 buu Cuz my minion is just repeating "[DEBUG   ] SaltReqTimeoutError, retrying. (2/3)"
06:11 buu Eventually I get: 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.
06:11 flebel joined #salt
06:13 honestly that doesn't sound like it's caused by a typo in a statefile
06:13 buu Master in debug gives me this: http://paste.debian.net/900818/
06:14 honestly use salt-call on the minion
06:14 honestly with -l debug
06:15 buu And pass what?
06:15 scsinutz joined #salt
06:16 buu If I pass it the same typoed name it just says [DEBUG   ] Could not LazyLoad file.manage
06:16 buu 'file.manage' is not available.
06:17 buu After like 120 second timeout I get "    Data failed to compile:"
06:21 buu Output: http://paste.debian.net/hidden/6f9bae73/
06:22 buu oh
06:22 buu I know what happened
06:23 netcho joined #salt
06:23 buu Amusing
06:24 buu I caused it to follow a symlink an infinite numbe of times
06:24 buu What fun
06:27 netcho_ joined #salt
06:27 jas02 joined #salt
06:28 jas02_ joined #salt
06:32 buu UnicodeEncodeError: 'ascii' codec can't encode characters in position 111-112: ordinal not in range(128)
06:32 buu ROFL
06:37 jas02 joined #salt
06:39 netcho joined #salt
06:40 amontalban joined #salt
06:40 amontalban joined #salt
06:43 buu Wait, if I use file.recurse with exclude_pat does the *minion* do the excluding?!
06:44 honestly the minion does everything
06:45 sh123124213 joined #salt
06:46 buu augh
06:47 buu I have a directory 'foobar' that contains a directory 'baz', the baz directory is several hundred megs and I would like to not send it over the wire
06:47 buu How do I say: copy the foobar directory but don't spend time on baz?
06:50 tristianc_ joined #salt
06:52 honestly Not sure
06:53 honestly I think the answer is "file a bug report"
06:54 honestly But "everything is done on the minion, except for things that have to be done on the master" is a strong design principle of salt
06:54 iggy yeah, they aren't going to fix that
06:55 iggy ENOTABUG and all that
06:55 honestly Maybe it would make sense to extend the files / caching api, that actually transfers files from master to minion, be made aware of exclusion patterns
06:55 iggy nothing stops the minion from caching the entire salt:// hierarchy
06:56 honestly Sure
06:56 netcho joined #salt
06:57 honestly But I think we can agree that it's certainly not optimal to do that in all cases and if there's a clean way to improve it that can also be reasoned to be unlikely to cause problems downstream it's worth trying
06:58 Tgrv joined #salt
07:00 buu It does seem unintuitive that exclude_pat copies the file then excludes it, and while the minion might be allowed to cache whatever it wants, I assume you aren't allowed to rely on that
07:03 madboxs joined #salt
07:04 iggy so... the minion has to copy everything to be able to tell if there's a change or not... yes, it's technically possible to offload that exclusion to the master, it would probably take a fair amount of work
07:04 preludedrew joined #salt
07:04 honestly The caching mechanism is almost entirely internal, with a "public" api that isn't explicitly bound to it (like some functions of the cp module)
07:05 honestly At least that's my impression from faffing about with the cp module
07:06 iggy I guess what I'm getting at is, it seems like there are bigger problems to solve
07:06 honestly There always are
07:07 honestly But everytime I suggest "let's focus on bugs and code quality first" in a project people look at me like I came from outer space, and then they say "but nobody will enjoy doing that"
07:07 honestly :P
07:08 iggy you and your fancy new ideas
07:08 buu On a related note, how would I specify a command I wanted to execute as part of a state file? I mean, assume my state requires copying over a folder and then I need to run 'make' inside that folder..
07:09 akhter joined #salt
07:10 buu HM
07:11 darioleidi joined #salt
07:13 netcho_ joined #salt
07:14 ivanjaros joined #salt
07:17 aidin joined #salt
07:20 netcho joined #salt
07:22 AndreasLutro !salt states.cmd.run
07:22 saltstackbot https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
07:23 renoirb joined #salt
07:24 netcho joined #salt
07:24 netcho joined #salt
07:25 Karunamon|2 joined #salt
07:25 dtsar joined #salt
07:26 buu ha
07:27 netcho moin all
07:30 jas02_ joined #salt
07:31 netcho need to dynamically set real_ip_header in nginx conf to be my VPC CIDR block, since i don't habe it in grains whats the best way to do it? set it in pillar or map.jinja?
07:31 AndreasLutro I'd do pillar
07:32 AndreasLutro you could also write a custom grain to get it on the minion I guess
07:32 alvinstarr joined #salt
07:32 ivanjaros joined #salt
07:33 darioleidi joined #salt
07:33 dyasny joined #salt
07:34 xmj how many different real_ip_header values do you expect to have?
07:34 netcho yeah i could, but seems prettyer to have it in pillar
07:34 netcho 1 per vpc
07:34 netcho vpc=env
07:34 netcho trying to avoid 6 ifs :)
07:34 zzuf joined #salt
07:35 xmj indeed
07:35 renoirb joined #salt
07:36 netcho i have env in minion id
07:39 ivanjaros joined #salt
07:41 amontalban joined #salt
07:41 iggy yeah, I'd probably write a custom grain, but that's just me
07:41 buu Should I ask what the hell "Manage Chocolatey package installs .. versionadded:: 2016.3.0
07:41 buu is?
07:42 AndreasLutro looks like a string
07:42 xmj "no"
07:42 buu seems reasonable
07:43 AndreasLutro can you be more specific? what exactly is confusing you?
07:43 buu the word chocolate
07:43 buu y
07:43 AndreasLutro well that's just a google away I guess
07:46 akhter joined #salt
07:46 fracklen joined #salt
07:47 smcquay joined #salt
07:48 xmj ah
07:48 xmj yum for windows
07:48 netcho choco is pkg manager for win
07:49 netcho i used to use it way before i found out about salt
07:56 madboxs_ joined #salt
07:57 buu At the risk of being silly, why does pkg.installed: take a pkgs: arg instead of a names: arg for multiple packages?
07:57 netcho u answered urself
07:57 netcho multiple pkgs
07:58 netcho plural
07:58 buu The tutorial uses 'names' for that
07:58 madboxs_ joined #salt
07:58 buu Notice how 'names' has an 's' on the end
07:58 buu making it a plural
07:59 madboxs joined #salt
08:00 felskrone joined #salt
08:01 netcho buu: i think they both work but when using names u cannot specify version
08:02 netcho should be in docs
08:03 AndreasLutro buu: they work differently. "names" is a pseudo-arg that in reality splits the state into multiple states which may or may not be what you want
08:03 AndreasLutro in the case of pkg.installed, pkgs should perform better than names
08:04 netcho yeah it makes separate call to pkg manager for every pkg when using names, pkgs do only 1 call
08:04 jas02 Hello, how can I access file.managed source without master, using salt-call --local?
08:06 rai_ joined #salt
08:09 buu Yeah, I found the names arg later on
08:09 jas02 OK, I got it, forget about my question
08:10 buu Next question: how do I detect debian version?
08:10 iggy grains.get oscodename is my jam
08:11 edrocks joined #salt
08:13 buu How do I execute that from the salt cli?
08:13 buu I assume there's a 'call state' function someplace?
08:15 fracklen joined #salt
08:16 iggy salt '*' grains.get oscodename
08:18 buu 'grains.get_oscodename' is not available.
08:18 buu er
08:18 buu ok
08:19 fracklen joined #salt
08:21 buu So I can use any function define as 'salt.module.function' in the docs?
08:22 eseyman buu: yup
08:23 fracklen joined #salt
08:24 buu But not salt.core or something
08:28 buu yay I wrote stuff
08:32 jas02_ joined #salt
08:34 J0hnSteel joined #salt
08:35 fracklen joined #salt
08:36 NV joined #salt
08:36 fracklen joined #salt
08:37 o1e9 joined #salt
08:37 dariusjs joined #salt
08:42 amontalban joined #salt
08:42 amontalban joined #salt
08:47 buu Today I learned I hate debian
08:48 Dr_Jazz_ i am thinking having to deal with enough boxes and os's one ends up hating them all
08:49 Dr_Jazz_ since they are all annoying and broken in some corners
08:49 aidin joined #salt
08:49 iggy ^
08:50 buu hm
08:52 buu So is there a way to get salt to deliver symlinks as part of the file.recurse?
08:55 buu Also can a single state have multiple instances of the same function call?
08:57 akhter joined #salt
08:59 babilen honestly: No, not quite. They don't ignore them, but you need additional software to enable their use. You can't, for example, define nameservers in there if you don't have the resolvconv package installed. (cf. https://wiki.debian.org/NetworkConfiguration )
09:02 honestly babilen: sounds... complicated
09:02 babilen Why?
09:03 babilen You have the "normal" bits (gateway, address, ...) and then additional things for which you need more software
09:03 babilen Not everybody has the need to define bridges
09:03 honestly well, does that means the networking service will fail to start if resolvconf is not installed but there is a dns-nameservers option in /e/n/i?
09:03 babilen I think they are silently ignored
09:04 honestly ah good
09:04 honestly that's what I'd expect :)
09:04 babilen Think of it as a plugin system :)
09:05 Jane__ joined #salt
09:06 Reverend with reactor, is it perfectly acceptable to just include another SLS?
09:07 Reverend or just run the actual sls itself...
09:09 babilen I'd do the latter
09:09 londo joined #salt
09:10 aidin joined #salt
09:12 buu Is it just me or is file.recurse hideously inefficient
09:13 babilen Maybe use one of the rsync states?
09:14 rdas joined #salt
09:14 buu oh
09:14 Reverend babilen - you're a wizard, you'll know: can beacons run on master to watch a bunch of files?
09:15 Reverend oh wait - no this could work
09:16 Reverend instead of cp-pushing to the master every few minutes, I can beacon it to execute a cp-push when it creates new files.
09:16 Reverend reactive then instead of just passive.
09:16 Reverend <3
09:17 buu I bet rsync properly handles excluding files lol
09:18 samodid joined #salt
09:18 babilen Reverend: There's an inotify beacon if you mean that
09:18 babilen Yer a wizard, babilen
09:19 netcho joined #salt
09:20 Reverend babilen - yeah, and a thumpin guddun at that i bet
09:21 Reverend babilen - yeah I'll just do it all on the minion if I can't inotify from master
09:21 Reverend at the minute it's cp-pushing to master every minute, but that's backawrds if I start using reactor right?
09:22 keimlink joined #salt
09:22 sarlalian joined #salt
09:24 Jesuspiece what are you guys doing
09:25 babilen Reverend: That sounds about right
09:26 Reverend Jesuspiece: I'm talking to my crush. we're talking beacons/reactor/inotify before I start :)
09:26 Reverend babilen: thanks darling.
09:28 babilen ...
09:28 Reverend :D haha
09:28 babilen I don't think that's appropriate
09:28 Reverend darn it.
09:28 s_kunk joined #salt
09:28 Bico_Fino joined #salt
09:30 Hybrid1 joined #salt
09:31 ronnix joined #salt
09:33 lubyou_ joined #salt
09:33 lubyou_ for slack.post_message, which keys/tokens should one use?
09:33 jas02_ joined #salt
09:34 JohnnyRun joined #salt
09:41 fir3 joined #salt
09:41 fir3 moin
09:45 \ask joined #salt
09:45 ronnix joined #salt
09:47 inad922 joined #salt
09:52 NeoXiD joined #salt
09:56 k_sze[work] joined #salt
09:57 ronnix joined #salt
09:58 afxentios joined #salt
09:58 alexlist joined #salt
09:58 afxentios hi foljs
09:58 afxentios folks*
09:59 afxentios I got a question if anyone can assist me.
10:00 afxentios Basically I have installed salt-minion in my debian system from the slatstack github repo using the commnad: python setup.py install --force
10:00 dRiN joined #salt
10:00 afxentios Does anyone know how can I unistall it from my system?
10:01 AndreasLutro you have to manually remove the files yourself
10:01 AndreasLutro in general, you never really want to use setup.py yourself
10:02 afxentios Actually I wanted to install a specific version of salt-stack. I guess I picked the wrong way :)
10:03 afxentios Thanks for your respond. Apart from the /etc/salt folder. what other files do I need to remove?
10:03 aarontc joined #salt
10:03 AndreasLutro probably a bunch of stuff in /usr/lib/python*
10:03 AndreasLutro not entirely sure
10:04 AndreasLutro personally I would just nuke and re-create the server
10:04 \ask joined #salt
10:04 afxentios ok thanks. I will try to remove them manually if it is possible, else re-create the server
10:05 AndreasLutro if you really need to install a python package from source, a virtualenv + pip install -e is usually the way to go
10:07 Reverend it's a real shame cp.push_dir can't be ran from an SLS
10:07 Reverend sadface
10:07 felskrone joined #salt
10:08 afxentios yeah I agree. much cleaner and easier to maintain
10:08 amontalban joined #salt
10:08 amontalban joined #salt
10:15 aidin joined #salt
10:20 netcho joined #salt
10:22 ronnix joined #salt
10:27 netcho joined #salt
10:28 Reverend y u no work beacon
10:31 iggy !salt states.module.run
10:31 saltstackbot https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#salt.states.module.run
10:31 Reverend is that in relation to my cp.push_dir ?
10:32 Reverend if so: <3
10:32 iggy si
10:32 Reverend you;re a hero.
10:32 Reverend http://pastebin.centos.org/59126/ <-- i have this in /etc/salt/minion.d/beacons.conf
10:33 Reverend it doesn't report events for file creations... any clues?
10:34 jas02_ joined #salt
10:34 Reverend http://pastebin.centos.org/59136/
10:36 Reverend ass. the default_include is commented out.
10:46 pipps joined #salt
10:53 pipps joined #salt
10:55 impi joined #salt
11:00 gwen joined #salt
11:00 gwen Hello
11:03 Reverend hi gwen
11:03 gwen I'm trying to create a custom template renderer to use with file.managed but I'm facing "Specified template format myrenderer is not supported", it looks like the list of renderers is hardcoded in https://github.com/saltstack/salt/blob/develop/salt/utils/templates.py#L557. Do I miss something in https://docs.saltstack.com/en/latest/ref/renderers/index.html#writing-renderers?
11:03 Reverend you're making a renderer?
11:03 Reverend interesting
11:04 iggy gwen: there are 2 kinds of renderers... one renders sls files, the other renders template files
11:04 mavhq joined #salt
11:04 nebuchadnezzar Reverend: I'm the pair programmer with gwen, yes, we are trying to do that
11:05 Reverend nebuchadnezzar: noice. well, good luck :) can I ask, what's the use case for writing your own rederer?
11:05 Reverend im just wondering... not poking holes.
11:06 nebuchadnezzar iggy: So salt.renderers.* is for SLS and salt.utils.templates is for template files, is that right?
11:07 iggy effectively
11:07 iggy I think there is some overlap in certain parts, but that's the important part
11:08 iggy so yeah, a custom template renderer isn't quite as easy as an sls renderer
11:08 nebuchadnezzar iggy: yes, several salt.renderers call corresonding function in salt.utils.templates
11:08 iggy might make for a good feature request
11:08 nebuchadnezzar and it looks like only salt.renderers can be extened with base/_renderers/
11:09 N-Mi_ joined #salt
11:13 edrocks joined #salt
11:17 netcho_ joined #salt
11:21 toanju joined #salt
11:24 dariusjs joined #salt
11:26 pipps joined #salt
11:26 IgorK__ joined #salt
11:32 ronnix joined #salt
11:33 Reverend can you target minions within an sls by any chance? :P
11:34 IgorK__ Hi all, have a such question, do anybody know the comfortable way for installing apps locally. I know that salt can do deploy, but he doing this on remote servers. In my case. I have app. Which will be difficultly install for new teammates. And I need for some auto deploy, but locally.
11:35 faizy joined #salt
11:35 IgorK__ *do anybody know the comfortable way for installing apps locally.?*
11:36 jas02_ joined #salt
11:38 ronnix joined #salt
11:41 LostSoul joined #salt
11:43 zzuf joined #salt
11:49 ronnix joined #salt
11:55 Cadmus joined #salt
11:56 mlesyk joined #salt
11:59 aidin joined #salt
12:01 ronnix joined #salt
12:04 XenophonF joined #salt
12:09 darioleidi_ joined #salt
12:09 amontalban joined #salt
12:09 amontalban joined #salt
12:17 jas02 Hello, I am trying to run ( on CentOS 7) service that is not systemd compatible, so I want to use /etc/init.d/<service_name> start. How can I do it? service.running: - name: /etc/init.d/<service_name> is not working
12:17 keimlink joined #salt
12:25 Reverend iggy - that module.run worked PERFECTLY. thank you!
12:26 ronnix joined #salt
12:27 nebuchadnezzar iggy: Thanks, I opened the issue https://github.com/saltstack/salt/issues/38099, I'll try to modivate our product owner to work on a pull request ;-)
12:27 saltstackbot [#38099][OPEN] Load user defined template engines | Description of Issue/Question...
12:31 Reverend jas02 how on earth do you have a service that's NOT compatible with systemd? it's one of the most generic service managers going :P what service is it?
12:36 daks joined #salt
12:36 AndreasLutro generally, linux distros have some sort of systemd-sysvinit bridge
12:36 Reverend yarp
12:37 ronnix joined #salt
12:37 AndreasLutro I'd be surprised if that was not available on centos
12:37 jas02_ joined #salt
12:40 ronnix joined #salt
12:40 Reverend AndreasLutro - if you use service, it'll forward it to systemctl
12:40 Reverend unsure about the other way round tho
12:41 Reverend but still, what service is he using that -isn't- systemd compatible... everything in the world uses systemd now. it's so easy to write, you could litterally add it yourself
12:42 AndreasLutro systemctl works with /etc/init.d services - at least on debian 8
12:42 keimlink joined #salt
12:44 Reverend AndreasLutro - nice!
12:46 _Cyclone_ joined #salt
12:47 jas02 Reverend: Sorry, incorrect sentence, I meant that the service doesn't have systemd config file, just System V init file. I created the the .service file for systemd. But systemd is not service manager, it's operating system, isn't it? :-)
12:47 AndreasLutro wrong
12:47 Reverend service should use systemd afaik...
12:53 numkem joined #salt
12:55 Reverend any way to get cp.push_dir to delete files on master that don't exist on minion?
12:55 Reverend :/
12:57 amcorreia joined #salt
12:59 dariusjs joined #salt
13:00 Reverend or, at least, a module that -will- do that.
13:00 Reverend at the minute, we're gonna have expired SSL's sat there on master doing naffing
13:00 Reverend potensh breaking shit
13:11 mdpolaris joined #salt
13:17 mlesyk joined #salt
13:20 mdpolaris Hi all. I am testing 2016.11 and noticed my scheduled highstates no longer return to the master. I have my system hooked in to Foreman Salt and on 2016.3 I was receiving the status from the executions, that no longer occurs.
13:20 DEger joined #salt
13:25 IgorK__ joined #salt
13:27 ozux joined #salt
13:28 edrocks joined #salt
13:32 Bico_Fino joined #salt
13:38 jas02_ joined #salt
13:43 pipps joined #salt
13:43 _JZ_ joined #salt
13:44 faizy joined #salt
13:45 jhauser joined #salt
13:51 LondonAppDev joined #salt
14:01 Rumbles joined #salt
14:02 pipps joined #salt
14:07 stooj joined #salt
14:07 austin_ joined #salt
14:08 Tanta joined #salt
14:11 debian112 joined #salt
14:11 faizy_ joined #salt
14:18 Reverend so, the question is, if there's a way to sync files, instead of just copying them to master.. or should I use a .py to gather them all up into a yaml and parse it on master.
14:19 racooper joined #salt
14:21 dariusjs joined #salt
14:30 ronnie joined #salt
14:33 ronnie I have 2 servers: app01 [salt-master and application server], db01 [salt-minion and db server]. I want to install an application on app01 which need DB access. app01 has no rights to create db_users and databases. Is there a common method of running the app01-states (install application) only on app01 and db01-states (create user/database) only on db01?
14:36 nickabbey joined #salt
14:36 chron0 how can I append the value of a certain grain to a file?
14:36 mdpolaris joined #salt
14:37 chron0 - text: Host : {% grains['fqdn'] %} doesn't seem to work
14:38 chron0 failed: Jinja syntax error: Encountered unknown tag 'grains'.;
14:38 mdpolaris Has the scheduled jobs returner changed behavior from 2016.3 to 2016.11? I am using foreman salt and i used to see the results of the scheduled jobs, however those are no longer showing up on the master job cache
14:38 mdpolaris i coudln’t find anything about it, in fact i found an old issue that makes it look like this never should have worked. so i am pretty confused about that.
14:39 jas02_ joined #salt
14:47 DammitJim joined #salt
14:52 onovy joined #salt
14:53 samodid joined #salt
14:54 lompik joined #salt
15:01 cyteen joined #salt
15:03 haam3r ronnie: I suggest reading this: https://docs.saltstack.com/en/latest/topics/targeting/
15:04 haam3r chron0: use this instead: "Host: {{ grains.get['fqdn'] }}"
15:04 haam3r chron0: and make sure you specify template: jinja in your file.managed state
15:05 haam3r chron0: oops sorry, it's "Host: {{ salt['grains.get']('fqdn') }}"
15:05 nicksloan joined #salt
15:07 N-Mi_ joined #salt
15:08 haam3r chron0: or well file.append state in that case
15:10 mpanetta joined #salt
15:11 ronnie haam3r: I already splitted the database and app stuff now in top.sls. How to apply it first on db01 and then on app01 because the cmd.run command from app01 depends on the database on db01: http://pastebin.com/3HShj3Zx
15:12 chron0 haam3r: thanks, yeah, after searching a little more I learned that {% != {{
15:12 chron0 https://www.pythian.com/blog/managing-files-with-saltstack/
15:13 ronnix joined #salt
15:17 mpanetta joined #salt
15:26 sagerdearia joined #salt
15:27 pipps joined #salt
15:27 keltim joined #salt
15:28 nidr0x joined #salt
15:29 anotherzero joined #salt
15:29 TyrfingMjolnir joined #salt
15:29 sarcasticadmin joined #salt
15:31 sarcasticadmin joined #salt
15:36 anotherzero joined #salt
15:41 faizy_ joined #salt
15:41 hillna joined #salt
15:41 ronnix joined #salt
15:43 faizy__ joined #salt
15:46 nickabbey joined #salt
15:52 dendazen joined #salt
15:54 czchen joined #salt
15:56 bfrog Can I somehow describe wholesale my VPS configuration somehow
15:56 bfrog salt-cloud seems to let me describe profiles, but not really describe the whole set of VMs I want to build out
15:56 cmarzullo look at the salt-cloud state modules
15:57 bfrog I'll take a look at those
15:58 bfrog https://docs.saltstack.com/en/latest/topics/cloud/salt.html#state-module looks like hwat your talking about
15:58 bfrog nifty
15:58 Rumbles joined #salt
15:58 bfrog salt is awesome, but sometimes the docs are... I dunno, I feel like I get lost a lot
15:58 bfrog like its all there, somewhere, but somehow finding things can be troublesome sometimes unless I already know what I'm looking for it feels like
15:59 bfrog I wish I had some ideas on improvements there
15:59 bfrog cmarzullo: thanks for pointing me the right way
15:59 nickabbey joined #salt
15:59 lkannan joined #salt
16:01 Cadmus bfrog: I sometimes feel the same way, the lexicon can feel like a bit of a cliff
16:08 yidhra joined #salt
16:10 aidin joined #salt
16:10 Kruge_ On a related note, I'm trying to use reactor to cause a newly-deployed minion to apply high state, but the reactor seems to refuse to run the state file
16:11 Kruge From that wonderfully vague description, does anyone have any idea what obvious things I might be doing wrong?
16:12 Kruge I'm not really sure how to target the new minion
16:14 DammitJim joined #salt
16:15 faizy joined #salt
16:19 onlyanegg joined #salt
16:19 DEger joined #salt
16:20 lubyou__ joined #salt
16:23 lubyou___ joined #salt
16:27 austin_ do i need to restart a salt-master if i want to add a new reactor
16:27 _Cyclone_ joined #salt
16:27 tiwula joined #salt
16:27 fracklen joined #salt
16:29 pintonium joined #salt
16:30 DammitJim joined #salt
16:31 pintonium Hi, got a quick question. I have a pillar item, stored in Mongo; the Key is UAID and the value is a 6 digit number that has leading 0's (e.g 003321). When I reference the pillar data in a state, it always displays without the 0's
16:31 pintonium is there a way to force display of the zeros?
16:32 Cadmus pintonium: I guess you need to either store it as a string or left-pad it with zeros.
16:33 pintonium can you left pad with filters?
16:33 Brew joined #salt
16:34 rylnd joined #salt
16:35 fracklen Hi! Got a problem with salt-cloud. How can I make it bootstrap with a specific version? Can't find it in the config docs...
16:36 Cadmus pintonium: I'm just googling, but apparent you can use python string formatting stuff, so {{ '%04d' % 42 }} would give 0042 I think
16:36 Cadmus I'm very much a novice, but I've hacked a bit of python so Jinja sort-of makes sense
16:37 pintonium same; I think I get what you are saying. I'm also seeing if just filtering it as a string works
16:37 pintonium I don't think mongo is storing it specifically as an integer
16:38 wavded joined #salt
16:38 lubyou_ joined #salt
16:39 wavded Is it possible to run salt commands on a machine other than the salt-master?
16:40 jas02 joined #salt
16:41 pintonium wavded: do you have the salt-minion installed? You should be able to run salt-call --local commands to emulate commands from the master
16:41 wavded pintonium: i wanted to run commands on my mac, I believe I do have the salt-minion installed (used brew), Do I have to add that to the salt-master?
16:43 whytewolf fracklen:  the documents you need  https://docs.saltstack.com/en/latest/topics/cloud/deploy.html & https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html
16:43 pintonium no, it should be standalone. Adding the minion to the master just allows it to accept commands from that master
16:43 bfrog hmmm seems like gpg --homedir --gen-key doesn't work on CentOS 7 correctly
16:43 bfrog without --homedir it works fine, with it gpg complains about not being able to connect to an agent...
16:44 ronnix joined #salt
16:44 wavded pintonium: sorry (probably noob questions) but how do I tell my salt-minion about my salt-master so it can run commands?
16:44 pintonium Cadmus: Using that format worked perfectly - I went with {{ "%06d"|format(UAID) }}
16:44 pintonium thanks
16:44 wavded if it should be standalone
16:44 whytewolf you can run salt-call on any minion attached to the master or not. --local only makes it masterless but it is fine if the minion is attached to a master to run commands on it.
16:44 armin joined #salt
16:45 lubyou_ I dont know why, but I cant get pkg.refresh_db to work on windows. It just doesnt sync any of the sls files.
16:45 lubyou_ http://dpaste.com/23VTPWF
16:45 pintonium wavded: are you trying to have a minion tell another minion to run commands?
16:45 wavded ahh ok, looks like there is a --master param
16:46 pintonium set up the master in the minion config file and then accept the key on the master - that should allow you to run commands on the minion from the master
16:46 wavded i want to do something like this from my mac against my salt cluster -> "salt '*' test.ping"
16:46 wavded without having to log into the salt-master to do it
16:46 scsinutz joined #salt
16:47 whytewolf wavded: that is not possable
16:47 wavded ah, that may explain why i couldn't find anyway to do it ;)
16:47 whytewolf wavded: well kind of. you can use saltapi to run pretty much everything that master does. remotly
16:47 phtes joined #salt
16:47 pintonium i mean, you could make a bash script or something to do it, but it'd defeat the purpose of the master
16:48 pintonium or salt-api, yeah
16:48 whytewolf wavded: but it defintly is not as easy as salt '*' test.ping
16:49 wavded gotcha, so its common practice to log into the salt-master and run commands?
16:50 whytewolf pretty common. although some do setup saltapi and use custom scripts.
16:51 armin joined #salt
16:51 wavded ok thx
16:51 whytewolf some setup the master to just respond to git checkings [using saltapi again] and never do a thing
16:52 jas02 joined #salt
16:55 wavded is there a recommended or best practice repository structure?  or any examples, I was having trouble finding that
16:56 Aikar joined #salt
16:56 Aikar joined #salt
16:56 Trauma joined #salt
16:57 DEger joined #salt
16:59 fracklen joined #salt
16:59 onlyanegg joined #salt
16:59 Salander27 joined #salt
17:02 onlyaneg1 joined #salt
17:02 DammitJim joined #salt
17:03 wavded joined #salt
17:06 DammitJim Is there a way I can check for the existance of a package on all minions?
17:06 tkojames joined #salt
17:06 DammitJim and just get a list of the servers that have it?
17:07 bfrog if I do gpg --gen-key and then copy over the .gnupg dir would that not work with saltstack?
17:07 bfrog seems like homedir is just broken entirely, the gpg-agent doesn't get run with its socket in the designated --homedir it appears with centos 7
17:08 lws joined #salt
17:18 ronnix joined #salt
17:19 bfrog salt '*' pkg.version 'pkgname here'
17:19 bfrog DammitJim: ^
17:20 scsinutz joined #salt
17:25 iggy wavded: one of the biggest hurdles I had when I started working with salt was that isn't particularly opinionated... so you generally don't find things like common usage patterns (or common repo layouts, etc)... it's a blessing and a curse
17:25 iggy wavded: generally speaking... do whatever works for you
17:26 wavded iggy: thx, i previously worked with ansible which had a much more opinionated structure :).  so far i'm starting with this: https://github.com/akoumjian/salt-django-example
17:26 pcn This is with 2016.3.4... anyone seen this with collect_stats enabled in cherrypy?  https://gist.github.com/pcn/2c394bafefe3b52e75bc43ee595cbe9b
17:26 keldwud joined #salt
17:30 jhauser joined #salt
17:31 iggy wavded: aside from the 12.04 bit, it looks sane
17:31 edrocks joined #salt
17:33 bfrog wavded: seems sensible enough
17:33 bfrog as long as the passwords are gpg encrypted, which is the pita process I'm going through now
17:33 bfrog I had pillar just in a dir on the master, periodically backing it up
17:33 bfrog but thats lame, git is nicer
17:34 bfrog I'm looking to move some of the /etc/salt stuff into the repo as well...
17:35 scsinutz joined #salt
17:35 keimlink joined #salt
17:36 keldwud is there a way to use salt to give me a diff of files across multiple hosts? I'd like to compare configuration files directly. say, some changes are made on a conf in dev environment and I want to compare that file with the test and stage environments to confirm if the changes are there or not
17:36 beowuff joined #salt
17:37 sh123124213 joined #salt
17:37 woodtablet joined #salt
17:39 bfrog keldwud: maybe, but you'd need to do some pipe-magic-sauce I think
17:39 bfrog salt '*' cmd.run 'cat /your/config' | pipemagichere | diff
17:42 bfrog gtmanfred: are the cloud config files run through renderers at all? can I gpg encrypt my api keys?
17:42 gtmanfred bfrog: they are not
17:42 gtmanfred you would need to use the keyring sdb
17:43 gtmanfred bfrog: https://docs.saltstack.com/en/latest/ref/sdb/all/salt.sdb.keyring_db.html
17:44 bfrog interesting, I can use sdb:// everywhere then rather than gpg for storing passphrases/tokens etc? seems easier than gpg :-)
17:44 beowuff left #salt
17:45 gtmanfred you can only use sdb:// anywhere that config.get is used to get the information
17:47 bfrog sdb is for what, secure database?
17:47 whytewolf salt database
17:47 gtmanfred simple database
17:48 gtmanfred I hate memory leaks
17:50 bfrog gtmanfred: heh, I hate memory fragmentation even more
17:50 gtmanfred https://github.com/saltstack/salt/issues/37938
17:50 saltstackbot [#37938][OPEN] Memory leak in Reactor | Description of Issue/Question...
17:50 whytewolf I just hate memory ..
17:50 gtmanfred trying to replicate this by spinning up and down docker containers in docker-compose ...
17:55 nickabbey joined #salt
17:57 keldwud bfrog: thanks. I was wondering if there was a built-in tool already. Looksl ike there's not if I'm going to be piping to diff
17:58 bfrog keldwud: not that I'm aware of, there's tons of modules though
17:58 whytewolf since there is no direct link between the two servers there is no built in tool
17:59 gtmanfred keldwud: use the survey runner
17:59 gtmanfred keldwud: https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.survey.html#salt.runners.survey.diff
17:59 bfrog ah cool
18:00 whytewolf humm.. thats one i didn't know about
18:00 keldwud gtmanfred: oh interesting. I'll check that out
18:00 gtmanfred it is pretty good :P
18:02 whytewolf add a couple of more items and it might lead to making something like mine.get_file possable :P
18:02 Kruge For the love all that is holy, could someone please tell me how, using Reactor, to tell a minion to apply highstate and then reboot after it is created?
18:02 keltim_ joined #salt
18:02 stooj joined #salt
18:03 brantfitzsimmons joined #salt
18:05 gtmanfred Kruge: http://ix.io/1Kyj something like this, you will need to look at the event data in the event stream to make sure that {{ data['data']['name']}} is the correct structure of the payload
18:06 brantfitzsimmons I'm currently getting the following error from dockerng.dangling: Module function dockerng.dangling threw an exception. Exception: argument of type 'NoneType' is not iterable
18:06 brantfitzsimmons Here's the code: http://pastebin.com/ZzzNFm8x
18:06 brantfitzsimmons Any thoughts on what I'm doing wrong when calling it?
18:06 keldwud nice. that's a powerful tool there, gtmanfred. Thank you for pointing it out. That's exactly what I was looking for.
18:07 gtmanfred :)
18:07 keldwud I tried it out and got exactly what I expected :)
18:07 gtmanfred brantfitzsimmons: that looks right, can you run salt \* docker.dangling prune=True force=True on the cli?
18:07 brantfitzsimmons @gtmanfred: I'll give it a shot.
18:08 gtmanfred also, that should be docker.dangling, and not dockerng.dangling like in your paste
18:08 keldwud I was trying to hold the maxim "avoid shelling out' and I felt that cat and pipes kind of defeated the purpose of using salt in the first place.
18:08 Kruge gtmanfred: I've managed to use data['name'] to write out a file on the new minion's host OS, but when I try to call local.state.apply and local.system.reboot, nothing happens
18:09 jas02 joined #salt
18:10 brantfitzsimmons gtmanfred: I'm trying to run this command: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html#salt.modules.dockerng.dangling
18:11 MTecknology gtmanfred: I'm not sure what's right/wrong here.  The states I'm testing with (https://github.com/saltstack/salt/pull/38043#issuecomment-264749890) get *close* to building what I expect. However, the file produced (http://dpaste.com/3HQD7GV) does not have an "iface bond0 inet6 static" line as I expect it should, but... I'm not sure it my expectations are correct.
18:11 saltstackbot [#38043][OPEN] Debian networking fix | Resolves #38042; regression introduced in 2016.11.0.
18:11 whytewolf gtmanfred: the virtual for dockerng says it's name is dockerng not docker
18:11 gtmanfred oh... hrm, brantfitzsimmons nevermind, you are right, that should be dockerng
18:11 gtmanfred yeah, just saw
18:11 brantfitzsimmons Okay.  Cool.
18:11 stooj joined #salt
18:12 brantfitzsimmons I tried running it from the cli and got the following: http://pastebin.com/GfDUaLSe
18:13 brantfitzsimmons The command I ran was: salt '*' dockerng.dangling prune=True force=True
18:14 Trauma joined #salt
18:14 brantfitzsimmons Every server returned that error.
18:14 gtmanfred can you run it on a minion with salt-call, and pastebin the stacktrace?
18:15 MTecknology whytewolf: ^ Dunno if you'd maybe have any interest in that... maybe? :)   I'm trying to make sure this is actually correct and not just kinda-seems-closeish
18:15 gtmanfred salt-call dockerng.dangling prune=True force=True -l debug
18:15 brantfitzsimmons Sure.
18:16 whytewolf MTecknology: sorry i stay away from network.managed. since it doesn't do what i want with openvswitch networking.
18:16 brantfitzsimmons gtmanfred: Here is the result: http://pastebin.com/bKN1GSv7
18:16 whytewolf although there are times i wish it did
18:16 MTecknology whytewolf: ah, bummer.. any idea you know more than I do about the correct syntax of /etc/net/if, though? :)
18:17 bltmiller joined #salt
18:17 whytewolf if i did i forgot it. I havn't touched ubuntu based distros in a while. and centos has compleatly different syntax for it's networking
18:17 amontalban joined #salt
18:17 brantfitzsimmons Perhaps I should run it as root.
18:17 gtmanfred brantfitzsimmons: can you run that as root
18:18 gtmanfred centos4lyfe
18:18 gtmanfred i need to get around to working on the states for systemd-networkd for network.managed
18:18 debian112 just checking here: Is anyone using salt api?
18:18 gtmanfred debian112: yes
18:18 gtmanfred lots of people
18:19 debian112 ah, nice
18:19 brantfitzsimmons gtmanfred: Run as root: http://pastebin.com/7Gmm82x7
18:19 debian112 https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#salt.netapi.rest_cherrypy.app.Login
18:19 debian112 gtmanfred: I was checking it out
18:20 gtmanfred brantfitzsimmons: when you run `docker images` on that host, do you have any images at all?
18:20 debian112 and just wondering on the usage
18:20 brantfitzsimmons gtmanfred: I do.
18:20 brantfitzsimmons gtmanfred: I have 3 tagged with <none>.
18:20 raspado joined #salt
18:21 bltmiller joined #salt
18:21 brantfitzsimmons Those are the ones I'm trying to remove.
18:21 gtmanfred brantfitzsimmons: can you open a bug about this? i am not sure why it would be a NoneType then
18:21 brantfitzsimmons Is <none>:<none> what it should be looking for?
18:22 gtmanfred yes
18:22 gtmanfred the problem isn't that, it is that the image list is empty for some reason
18:22 gtmanfred can you open a bug on https://github.com/saltstack/salt/issues with the information about this?
18:22 brantfitzsimmons Okay. I'm assuming that <none>:<none> is not image:tag.
18:22 brantfitzsimmons Sure.
18:23 gtmanfred thanks
18:25 jas02 joined #salt
18:25 gimpy2938 left #salt
18:25 Edgan joined #salt
18:25 faizy joined #salt
18:29 Praematura joined #salt
18:31 faizy_ joined #salt
18:33 faizy_ joined #salt
18:35 pfallenop joined #salt
18:51 edrocks joined #salt
18:51 lubyou_ joined #salt
18:58 Praematura joined #salt
19:01 jas02 joined #salt
19:02 pfalleno1 joined #salt
19:04 pintonium joined #salt
19:06 __monty__ joined #salt
19:06 wavded any recommended tools for validing sls files or linting?
19:08 gtmanfred salt \* state.show_low_sls to see if it renders the low data the way you want
19:09 gtmanfred and cp.get_template to render the jinja in files
19:09 gtmanfred is how I do it now
19:10 jas02 joined #salt
19:10 amontalban joined #salt
19:10 anotherzero joined #salt
19:10 amontalban joined #salt
19:10 anotherzero joined #salt
19:10 gtmanfred not aware of any actual linters
19:13 wavded ok thx
19:14 gtmanfred wavded: https://github.com/saltstack/salt/issues/802
19:14 saltstackbot [#802][OPEN] Syntax checking | When a salt state contains YAML syntax errors, it is quite hard to find these errors at the moment. It would be great to have a basic syntax check (validation agains a schema) and/or references check (e.g. do the references given in require-statements really exist)....
19:15 jas02 joined #salt
19:17 samodid joined #salt
19:25 s_kunk joined #salt
19:28 buu gtmanfred: how about an error message if salt goes into an infinite loop due to symlinks? =]
19:28 gtmanfred user error
19:28 gtmanfred :P
19:29 buu I just want a message!
19:29 gtmanfred SaltSystemExit: pebkac detected
19:29 buu I could live with that
19:29 buu better than waiting 3 minutes and getting "timeout master not responding" !
19:30 buu And while I'm complaining why is file.recurse so slow
19:30 irctc358 joined #salt
19:30 gtmanfred because it has to do a sha sum on every file
19:31 gtmanfred ¯\(°_o)/¯
19:31 gtmanfred it might befaster to use rsync
19:31 whytewolf s/might/will
19:31 buu I'm about to try it
19:31 whytewolf :P
19:31 buu As soon as I figure out all the options
19:31 buu doesn't rsync sha every file also?
19:31 gtmanfred rsync is magic
19:31 gtmanfred i don't know how it works
19:32 __monty__ Is RAET still happening?
19:32 whytewolf rsync actually does deltas
19:32 gtmanfred __monty__: no
19:32 gtmanfred __monty__: the tcp transport layer is faster
19:32 gtmanfred __monty__: https://docs.saltstack.com/en/latest/topics/transports/tcp.html
19:33 irctc358 i'm running salt 2016.11 and have refresh: True and cache_valid_time: 300 set vor a pkg. But salt does not do an apt-get update. What am i missing? So it can't find the desired version
19:34 buu you have a point
19:34 buu rsync is magic
19:34 Edgan irctc358: is that setting new in 2016.11?
19:35 rylnd joined #salt
19:35 irctc358 Edgan: yes
19:36 McNinja joined #salt
19:36 woodtablet hm.. the #docker channel requires special access..
19:36 Edgan irctc358: sure 300 is low enough? I would set it 60
19:36 woodtablet anyone have an alternative channel one may go to for advice ?
19:36 gtmanfred woodtablet: you just have to register with nickserv
19:36 gtmanfred they have +q $~a
19:37 gtmanfred so only registered users can talk
19:37 woodtablet oh
19:37 woodtablet ok
19:37 gtmanfred probably to cut down on spam bots
19:37 colttt joined #salt
19:37 woodtablet gtmanfred: thanks!
19:37 gtmanfred so you need to ident with nickserv and then rejoin their channel
19:37 gtmanfred no probelm
19:37 tobiasvdk joined #salt
19:38 londo joined #salt
19:38 onlyanegg joined #salt
19:38 irctc358 edgan: 300s seems low to my. It was the ifrst salt run since days
19:42 irctc358 what are the conditions when salt triggers an apt-get update?
19:42 gtmanfred it should be on a refresh: True
19:42 gtmanfred i know that there appears to be a bug in the yumpkg module
19:43 gtmanfred irctc358: https://github.com/saltstack/salt/issues/38064
19:43 saltstackbot [#38064][OPEN] Not refreshing yum repo before install new package | Setup...
19:43 gtmanfred but i haven't seen one about apt yet
19:43 woodtablet joined #salt
19:44 gtmanfred irctc358: https://github.com/saltstack/salt/issues/38090
19:44 saltstackbot [#38090][OPEN] pkg.installed does not seem to refresh the repo database, no matter what | Description of Issue/Question...
19:44 gtmanfred there is the one about apt
19:46 Xenophon1 joined #salt
19:46 buu Ok, how come salt says: "Total run time: 301.710 ms" but `time` says "real    0m57.786s"
19:47 buu And how come rsync.synchronized doesn't take the same source argument as file.recurse
19:48 irctc358 gtmanfred: not using yum here but using apt
19:48 gtmanfred irctc358: read the next link
19:48 gtmanfred it appears to be the same bug
19:49 irctc358 gtmanfred: ah ok 38090 is about apt
19:49 gtmanfred probaby in the pkg state instead of modules, so it wouldnt matter which package manager module you used
19:49 buu Comment: Source directory salt://.vim/ was not found.
19:49 buu What do I need to change to make rsync find files?
19:50 gtmanfred so the rsync.syncornized doesn't work with the salt fileserver iirc, which is why file.recurse exists, you would need to setup an rsync:// endpoint to point to that directory to sync down outside of salt to speed it up
19:50 buu oh
19:52 buu Where is that even documented?
19:52 gtmanfred where is it documented that the rsync state could use the fileserver
19:53 buu I meant where is the rsync backend documented
19:53 buu or do you mean I need to configure rsync outside of salt?
19:54 gtmanfred you need to configure rsync outside of salt
19:54 gtmanfred https://www.atlantic.net/community/howto/setup-rsync-daemon/
19:55 buu oh
19:55 buu meh
19:55 gtmanfred it will be significantly faster than file.recurse
19:55 buu Life is hard.
19:56 gtmanfred that is just the nature of how file.recurse and the fileserver work
19:57 irctc358 gtmanfred: thanks any workaround or only the downgrade to 2016.3 ?
19:57 wavded anyone know why salt-call would be significantly slower on my mac versus running it on a server?  do i need to bump a ulimit, not doing anything crazy atm
19:57 snc joined #salt
19:58 gtmanfred irctc358: no work around now, terminalmage is going to look at fixing it later today for 2016.11.1
19:58 upb joined #salt
19:59 lws joined #salt
20:02 Praematura joined #salt
20:06 buu gtmanfred: how does the 'passwordfile
20:06 buu option to rsync.sync work?
20:06 whatevsz joined #salt
20:06 nickabbey joined #salt
20:06 gtmanfred no idea
20:07 buu =[
20:08 whatevsz are custom modules broken on 2016.3.4 with salt-ssh? i have a custom renderer that gets applied fine in "normal" mode (without ssh), but are not found with salt-ssh (the default jinja|yaml renderer is used)
20:08 whatevsz i found this: https://github.com/saltstack/salt/issues/38095
20:08 saltstackbot The API says this is an invalid issue. Please report this if you know it's a correct link!
20:08 gtmanfred yay, github is down
20:08 whatevsz wow :D
20:09 gtmanfred not that uncommon
20:09 whatevsz back now
20:11 lws joined #salt
20:11 gtmanfred maybe, maybe not https://twitter.com/githubstatus/status/806228936208289792
20:11 whatevsz i looked, and my custom modules are not included in /var/cache/salt/master/thin/thin.tgz
20:11 whatevsz are they supposed to be in there?
20:12 gtmanfred they should be
20:12 gtmanfred actually
20:12 gtmanfred i am not sure
20:12 gtmanfred they might not be, and might be shipped with the states.tgz
20:12 buu Ok I see
20:12 whatevsz there is no states.tgz in /var/cache
20:12 buu This is awkward
20:13 gtmanfred there won't be, it will be on the minion side only i believe, because it is recreated on each run
20:13 whatevsz ok wait, I'll look
20:14 gtmanfred also worth checking if it works in 2016.11, there were some changes in salt-ssh for that irrc
20:14 gtmanfred iirc*
20:14 whatevsz no states.tgz on the minion, either
20:14 tapoxi anyone using salt.states.selinux?
20:14 whatevsz grrrrrr i didn't want to update salt
20:15 whatevsz will look into that tomorrow
20:15 tapoxi it seems unable to set 'disabled' on centos7, only 'permissive' and 'enforcing'
20:15 whatevsz unconstructive comment: why would you disable selinux? ;)
20:16 tapoxi I know :(
20:17 tapoxi in-house app doesnt play nicely with it, fixing selinux is a goal for another day...
20:18 tapoxi anywho error is http://pastebin.com/raw/kEz9CpGU
20:18 tapoxi version is 2016.11.0
20:19 gtmanfred to fully set it to disabled, you have to do a system restart...
20:19 J0hnSteel joined #salt
20:19 gtmanfred did it work in previous releases?
20:20 tapoxi right but shouldn't it at least change /etc/selinux/config?
20:20 tapoxi not sure let me test on the last release.
20:20 gtmanfred so it might still update the file
20:20 whytewolf looks like disabled doesn't set a mode then tests if there is a mode in the next bit.
20:20 gtmanfred but return that it isn't disabled
20:21 gtmanfred because get_enforce won't return disabled until after a restart
20:21 tapoxi gtmanfred: nope, it just bails
20:21 wavded joined #salt
20:22 gtmanfred hrm... interesting
20:22 ronnie joined #salt
20:22 lws joined #salt
20:22 whytewolf nevermind, I"m just tired... different elif
20:23 whatevsz @gtmanfred: same issue with 2016.11.0
20:24 tapoxi gtmanfred: http://pastebin.com/N72eFY4d seems to return a different error on 2016.3.4 but still has the same issue
20:25 sh123124213 joined #salt
20:25 tapoxi tried mix case to be sure and "Disabled" doesn't work either
20:26 gtmanfred tapoxi: 2016.3.4 doesn't accept disabled
20:26 gtmanfred tapoxi: https://github.com/saltstack/salt/blob/2016.3/salt/modules/selinux.py#L98
20:26 irctc358 gtmanfed: is this ok to workariund the issue? http://pastebin.com/raw/KKiHHai6
20:26 irctc358 arg @gtmanfred: is this ok to workariund the issue? http://pastebin.com/raw/KKiHHai6
20:27 gtmanfred irctc358: you could just do a module.run of pkg.db_update or whatever the pkg module is for refreshing, before the pkg.installed
20:27 stooj joined #salt
20:28 whytewolf tapoxi: does either /sys/fs/selinux or /selinux exist?
20:28 gtmanfred whytewolf: the if statement in 2016.3.4 doesn't even have disabled
20:28 whytewolf gtmanfred: didn't he try 2016.11.0 at first?
20:29 gtmanfred uhh oh yeah
20:32 buu Oh that's neat
20:33 watersoul joined #salt
20:33 feld joined #salt
20:33 sh123124213 joined #salt
20:34 [SYN\ACK] joined #salt
20:34 bltmiller joined #salt
20:36 lws joined #salt
20:38 gtmanfred tapoxi: i see the bug
20:38 gtmanfred i will get a pr in in a second
20:39 irctc358 whats the easiest way to order two cmd cmd.run states?
20:39 irctc358 just use require?
20:39 theologian joined #salt
20:40 J0hnSteel joined #salt
20:40 theologian hello, i'm playing with ec2_tags.py from salt-contrib. i got it to return my tags, but i'm not having any luck filtering. can some show me an example on the syntax?
20:41 gtmanfred irctc358:they are run top down, but you can also use require
20:41 mdpolaris joined #salt
20:47 theologian found it, looks like i need to use ec2_tag_roles.py.
20:47 mTeK joined #salt
20:48 gtmanfred tapoxi: https://github.com/saltstack/salt/pull/38109
20:48 saltstackbot [#38109][OPEN] mode needs to be an integer | What does this PR do?...
20:48 gtmanfred that will fix it
20:48 lws joined #salt
20:49 onlyanegg joined #salt
20:50 tapoxi gtmanfred: thanks!
20:53 preludedrew joined #salt
20:54 J0hnSteel joined #salt
20:56 nickabbey joined #salt
20:57 wavded joined #salt
20:59 edrocks joined #salt
20:59 lws joined #salt
21:02 mdpolaris Has the scheduled jobs returner changed behavior from 2016.3 to 2016.11? I am using foreman salt and i used to see the results of the scheduled jobs, however those are no longer showing up on the master job cache
21:03 jas02 joined #salt
21:03 jas02_ joined #salt
21:03 irctc358 why does this one also install the pkg? I thought it should only upgrade it? https://gist.github.com/disaster123/f634a45f9b36a8f3dbf1294196e1107e
21:04 __monty__ left #salt
21:04 iggy aside from the terribad indentation?
21:08 iggy that will fail if the package isn't installed
21:08 Sketch Only upgrade the packages, if they are already installed. Default is False. Currently only works with APT-based systems.
21:09 sebastian-w joined #salt
21:09 raspado anyone familiar with this error? Im getting this on all my salt masters "Received function _file_find which is unavailable on the master, returning Fals" setting debug logging doesnt make the error more clear either
21:09 iggy I mean... salt is designed to describe your systems... not maybe sometimes upgrade a package
21:09 iggy if you don't want the package installed, don't assign that state to the minion
21:10 irctc358 @sketch: yes i'm on debian and no the pkg is not installed. It gets installed by that state
21:10 buu Comment: Source directory saltrsync@192.168.1.14::buu/.vim/ was not found.
21:10 buu This is completely awful
21:10 buu =[
21:10 buu It never even tried to connect
21:10 buu And how come it takes 60 seconds to report an error?
21:11 toanju joined #salt
21:11 iggy that's probably the rsync timeout
21:11 iggy don't blame salt
21:12 buu ?
21:12 buu No it does that regardless of whether or not rsync is involved
21:12 Sketch irctc358: hmm, sounds like it should fail then, as iggy said.  dunno why it wouldn't, but i've also never tried that option.
21:12 buu Also rsync is just straight up broken, so whatever
21:13 buu I'll use file.recurse
21:13 Sketch irctc358: i assume you're also runnning at least 2015.5.0.
21:13 tercenya joined #salt
21:14 irctc358 @Sketch: 2016.11 - so i've to use {% if salt['pkg.version']('pkgname') %}
21:15 buu iggy: So my state change is applying 4 states. The duration of each state adds up to 17 seconds and yet the `salt state.apply` command takes 1m17s to return on the master
21:15 buu Why is that?
21:15 raspado what is this file responsible for? "/usr/lib/python2.7/site-packages/salt/master.py"
21:15 gtmanfred raspado: it is the file that contains the information about the master process...
21:16 theologian i'm still having an issue with what i think is targeting minions. i see the info in my grains.items, but when i try to call servers with the details, they show up with "No minions matched the target"
21:16 raspado is it the actual salt master binary?
21:16 gtmanfred no
21:16 gtmanfred there are no binaries in python
21:17 gtmanfred the entry point to salt-master is salt.scripts:salt_master()
21:17 theologian sudo salt -G 'ec2_tags: doing, stuff' cmd.run "echo test"
21:17 gtmanfred salt -C 'G@ec2_tags:doing or G@ec2_tags:stuff' cmd.run 'echo test'
21:18 gtmanfred ?
21:18 theologian gtmanfred: thanks!
21:18 gtmanfred if you call salt \* grains.get ec2_tags, does it return a list of with 'doing' and 'stuff' in it?
21:18 theologian i was just reading this... https://docs.saltstack.com/en/latest/topics/targeting/grains.html
21:19 theologian your worked and so did this.
21:19 theologian salt -G 'ec2_tags:doing:*stuff*' cmd.run "echo test"
21:19 gtmanfred if you want to match multiple tags, you will need to use the compound matcher https://docs.saltstack.com/en/latest/topics/targeting/compound.html
21:19 gtmanfred ahh, ok cool
21:19 theologian sweet. thanks for your time!
21:21 lws joined #salt
21:22 raspado anyone familiar with how I can troubleshoot this error on the salt master? "Received function _file_find which is unavailable on the master, returning False"
21:23 raspado it happens like 20-30 times a second
21:24 nickabbey joined #salt
21:24 bltmille_ joined #salt
21:25 mrueg joined #salt
21:26 Sketch raspado: do you have a minion which is running a newer version than your master?
21:27 raspado yes
21:27 gtmanfred don't do that
21:27 gtmanfred raspado: https://docs.saltstack.com/en/latest/faq.html#can-i-run-different-versions-of-salt-on-my-master-and-minion
21:27 raspado not sure how I can stop it right now, salt-cloud automatically installs a later version of the salt minion
21:28 gtmanfred add `stable <versionnumber` to the script_args in /etc/salt/cloud
21:28 gtmanfred and it will install the versino you specify
21:28 gtmanfred raspado: https://docs.saltstack.com/en/latest/topics/cl
21:28 gtmanfred https://docs.saltstack.com/en/latest/topics/cloud/misc.html#deploy-script-arguments
21:29 gtmanfred https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html
21:29 gtmanfred bootstrap-salt.sh stable 2014.7
21:29 gtmanfred literally `echo 'script_args: stable 2016.3.4' | sudo tee -a /etc/salt/cloud`
21:31 scsinutz joined #salt
21:33 tapoxi heh, "The following keys are going to be deleteed:"
21:33 raspado gtmanfred: oh nice
21:36 kingscott joined #salt
21:37 kingscott I'm looking to upgrade the zabbix agent on my minions. Has anyone done this effectively, or know how I would go about doing it?
21:37 raspado gtmanfred: how does stable <version> work? is that pulling a bootstrap-salt.sh of that version and downloading the same minion version?
21:42 tapoxi I think you can always use the latest bootstrap-salt.sh and the version number tells it what to install via your pkg manager/git
21:42 raspado kk thx
21:45 gtmanfred it doesn't always use the latest bootstrap, but it should install the latest package by default, if you want to update the bootstrap on your host, run `salt-cloud -u`
21:45 amontalban joined #salt
21:54 bfrog so far I've just been developing my salt-states on the saltmaster itself, which seems like a semi-questionable practice
21:54 bfrog do other people here do that typically or setup a bunch of local vms?
21:55 AndreasLutro local vms all the way
21:55 cmarzullo bfrog: http://unicolet.blogspot.com/2016/05/a-not-so-short-guide-to-tdd-saltstack.html
21:55 cmarzullo that's the pattern I follow.
21:58 bfrog cmarzullo: and how do you deal with salt-cloud and pillar config files?
21:58 cmarzullo salt-cloud is really a deployment step. not so much a development step. in my eyes at least
21:59 cmarzullo I break everything down into formulas for each service. each formula uses pillar.
21:59 cmarzullo with defaults and overrides.
21:59 cmarzullo So I figure out the formulas locally, then publish the formula, then it makes it to ze cloud
22:00 keltim_ cmarzullo, good article we need to take it to that level
22:00 bfrog well it seems like pillar data can make/break things pretty easily though
22:01 cmarzullo while it's true that changing pillar can break things. Having that all sorted out means you dno't have to change your states. which will brek even more things
22:01 cmarzullo keltim_: yeah we have a whole CI pipeline around that.
22:02 pcn I've got a new saltmaster I've launched via salt-cloud from an existing saltmaster.  Once the node is up, I've removed the /etc/salt/master file, and pointed the minion to localhost, and replaced the minion_master.crt
22:02 keltim_ jealous
22:02 cmarzullo bfrog: changing your pillar is akin to changing your config. Like we have these ini files to manage right? Well the developers can do PR against our pillar repo, and those changes make it into prod without having to touch our formulas. everything is dynamic
22:02 keltim_ as soon as we catch our breath we're going there
22:03 pcn but something has happened in the process that is causing the minion to not auth to the master.  Is there a way to reset all of this cleanly?
22:03 bfrog so you have two repos then, one for your salt states/formulas and another for your production pillar data?
22:03 cmarzullo it's really nice. we can get great cross team work going. and bringing in new people is easy. 'just add this to this formulas'
22:03 bfrog I suppose that makes some sense
22:03 cmarzullo Oh we have a lot of repos.
22:03 cmarzullo one for each formula.
22:04 bfrog its a one man show over here, so, I'm sort of thinking, one repo is good 'nuf :-)
22:04 cmarzullo ssh, iptables, aptprefereces, nginx, apache, nagios, etc etc etc
22:04 Praematura joined #salt
22:04 whytewolf personally I'm a one man show in my own home lab and i never have less then 2 repos
22:04 keltim_ we use formulas (our own) but just put them where the states go as we use salt environments
22:05 bfrog pillar + states?
22:05 whytewolf bfrog: my states and pillars live compleatly seperate
22:05 cmarzullo keltim_: yeah we basically do that too. we manage the file_roots and place them in like /srv/saltstack/formulas/nginx-formula
22:05 pcn folks, how do I reset my master and minion to fix communications between the two?
22:05 pcn they are on the same box, so no firewalls, etcl
22:06 cmarzullo pcn: you'll want to look at your keys. salt-key
22:07 pcn cmarzullo: right, after salt-key -d'ing everything the key makes its way back in, but the minion logs still say that authentication is failing
22:07 pcn I'm looking for any hidden/cached bits here I guess
22:07 whytewolf pcn restart the minion
22:07 bfrog cmarzullo: don't you have to deal with a bunch of master config files then
22:07 bfrog for gitfs and such
22:07 bfrog do you keep those in another repo?
22:08 whytewolf salt the master :P
22:08 cmarzullo bfrog: &&
22:08 cmarzullo bfrog: ^^
22:08 cmarzullo yeah our master is salted also.
22:08 cmarzullo but in home lab I just add entries to file_roots
22:08 bfrog how do you salt the master, without a master
22:09 bfrog so confusing
22:09 bfrog salt-cloud ?
22:09 cmarzullo vagrant
22:09 jrgochan Hello all. Is there an easy way to iterate through all salt minions in a jinja template?
22:09 Tech01x joined #salt
22:09 jas02 joined #salt
22:10 jrgochan wait. I think I already answered my question. omg
22:10 cmarzullo bfrog: keltim_ I'm out but you can hit me up tomorrow.
22:11 Sammichmaker joined #salt
22:11 Tech01x Hi, I need some help with using the keepalived formula... this is initial setup, salt-ssh 2016.11.0
22:13 jacekplacek joined #salt
22:14 Tech01x getting a unicode character error... http://paste.debian.net/900997/
22:14 Tech01x doing the most basic, initial setup
22:14 MeltedLux joined #salt
22:15 jas02_ joined #salt
22:15 bltmiller joined #salt
22:16 Tech01x I haven't modified the keepalived.jinja at all
22:16 Tech01x and not sure what position 621 means
22:17 jacekplacek joined #salt
22:17 tercenya joined #salt
22:19 athaller joined #salt
22:19 dlloyd you have 'magic' quotes somewhere, make sure all quotes are ' or " not the angled one word and friends replaced opening and closing with
22:20 dlloyd search for ’
22:20 Tech01x hmmm
22:21 Tech01x so there are no quotes in my pillar file
22:22 dlloyd and the sls?
22:22 dlloyd although that error makes me think its in the template file
22:23 Tech01x sls is just in the top.sls, have - keepalived
22:23 Tech01x and I'm using the git checkout of the keepalived formula
22:24 Tech01x I just cloned it from the repository again
22:25 dlloyd line 19 has a ’ in that comment
22:25 dlloyd python 2.7?
22:25 scsinutz joined #salt
22:26 Tech01x yeah
22:26 dlloyd just remove that and try
22:26 o1e9 joined #salt
22:27 Tech01x different error!
22:27 Tech01x progress
22:27 Tech01x thanks!
22:27 Tech01x should I be running a different python version?
22:27 Tech01x ls
22:27 Tech01x now it can't find my defaults.yaml
22:28 dlloyd no, ython 3 handles unicode better by default
22:29 Tech01x thanks much!
22:30 Tech01x next problem... it can't find my defaults.yaml, but it is where the formula supplied it... and I'm using the method where I specify the formula directory in the file_roots
22:30 Tech01x I get               TemplateNotFound: keepalived/defaults.yaml
22:30 Tech01x but it doesn't tell me the whole path
22:32 fracklen joined #salt
22:32 Tech01x the debug output from salt-ssh doesn't mention the path that it tried
22:34 writtenoff joined #salt
22:34 Tech01x trying a hard coded path
22:34 jrgochan I'm trying to use salt.pillar.file_tree to store files for each of my minions, but can't quite understand the documentation. Anyone know of any good guides on how to use it?
22:35 darvon joined #salt
22:35 Tech01x does it render this file on the master and then transfer to the minion?
22:35 Tech01x ie. is this an error on the master or an error in the minion?
22:35 whytewolf Tech01x: the minion downloads the template from the master and then renders it
22:36 Tech01x btw, I'm using salt-ssh
22:36 whytewolf ...
22:36 whytewolf that is an important piece of information
22:37 whytewolf salt-ssh doesn't use the fileserver in the same way. it only includes things that are directly requested.
22:38 Tech01x hmmm... I thought salt-ssh bundled all this up in a tarball and sends it across
22:38 whytewolf no
22:38 whytewolf like i said it only bundles what is called directly
22:38 Tech01x ah
22:38 Tech01x hmm
22:38 whytewolf https://github.com/saltstack/salt/issues/26585
22:38 saltstackbot [#26585][OPEN] salt-ssh not providing jinja file for salt-formula | When bootstrapping\setting up a VPS using salt-ssh, I use [salt-formula](https://github.com/saltstack-formulas/salt-formula) to properly configure the minion after the bootstrap script has done its job....
22:39 Tech01x thanks!
22:39 pcn oh, this is really weird.  From a root shell, running salt-minion -l debug works
22:39 pcn running salt-minion does not
22:39 Tech01x so extra_filerefs?
22:39 pcn salt-minion -l info works
22:39 whytewolf Tech01x: in thoery
22:39 pcn so logging is making this work for me?
22:41 Tech01x worked!
22:41 Tech01x thanks much
22:41 Tech01x - salt://keepalived/defaults.yaml
22:41 fracklen Hi awesome people. How can i configure salt-cloud to bootstrap a new minion with a specific version?
22:41 Tech01x in extra_filerefs:
22:41 whytewolf fracklen: script_args: stable <version>
22:42 pcn Well, ping works, but not a highstate
22:42 whytewolf fracklen: https://docs.saltstack.com/en/latest/topics/cloud/misc.html
22:42 pcn nm, I.m going to launch this another way
22:43 _Cyclone_ joined #salt
22:43 fracklen whytewolf: thanks - great :)
22:43 Tech01x argh... next step, the rendering is wrong, I only get the defaults.yaml contents
22:43 Tech01x hmmm
22:55 mrueg joined #salt
22:59 ronnie joined #salt
23:01 zzuf joined #salt
23:08 lubyou_ joined #salt
23:09 lubyou_ joined #salt
23:09 lubyou_ joined #salt
23:10 lubyou_ joined #salt
23:11 lubyou_ joined #salt
23:12 lubyou_ joined #salt
23:12 DEger_ joined #salt
23:13 vodik joined #salt
23:16 jas02 joined #salt
23:16 stooj joined #salt
23:17 sh123124213 joined #salt
23:17 jas02_ joined #salt
23:19 dendazen joined #salt
23:25 jrgochan is it possible to have a for loop in an sls files that iterates through all files/directories in a directory?
23:26 jrgochan i'd like to put a bunch of files in /srv/files/ and have an sls iterate through them all with file.managed
23:26 Sammichmaker so I'm a python nerd and I want to try out saltstack, have prior experience with Puppet and Chef in AWS -- are the docs generall the best place to start, or in addition, any recommend books?
23:27 Sammichmaker all of my infra is cloud based, no bare metal
23:28 watersoul joined #salt
23:28 onlyanegg joined #salt
23:31 khaije1 joined #salt
23:32 khaije1 is there a way to set the sls path seperator? I've found that the value of {{ sls }} is either "path.to.sls_example" or "path/to/sls_example" depending on how i've referenced it
23:33 whytewolf jrgochan: /srv/files will this be pillar or state based. if it is state based then jinja is rendered on the minion and it can't see that list of files.
23:33 whytewolf Sammichmaker: I started with the doccumentation. but the code is always where i go when ever i get stuck
23:34 Sammichmaker thanks whytewolf
23:39 nickabbey joined #salt
23:47 jrgochan hrm. I suppose it would have to be pillar based
23:47 jrgochan I'd like to have something like /srv/files/default/etc/ and /srv/files/custom/minionid/etc
23:48 jrgochan and have a template that iterates through all of those directories and gernerates file.managed statements for all the files there.
23:48 whytewolf jrgochan: how is the minion to see those files?
23:49 Sammichmaker are there others who have moved over from chef/puppet and have been happier? Especially if you enjoy python over ruby?  That's my situation and I've heard great things about saltstack lately.  Ansible has come a long way too..'
23:49 jrgochan i'd like to host them on the server. they could also be in /srv/salt/files
23:49 whytewolf jrgochan: also is this something that could be easier done with file.recurse instead?
23:50 buu Sammichmaker: Well, saltstack has far more puns in its documentation
23:50 pcn In a returner, where can I determine the version of the master I'm running on?  I need to be flexible behind a version check
23:50 pcn This is when using an external pillar
23:51 jrgochan i tried using file.recurse, but it doesn't quite meet my needs. i have a /srv/salt/files/custom/<minionid> directory that has a directory in it for every host with custom changes, then a /srv/salt/files/default/ that has default config files. I'd like file.recurse to recurse through the custom directory and then the default directory and merge the two, preferring custom
23:51 bek_ joined #salt
23:51 jrgochan it just stops if it finds a custom/<minionid> directory and never grabs any defaults
23:51 pcn ah, maybe __salt__ has it
23:52 whytewolf jrgochan: this sounds like bad juju all around.
23:53 jrgochan is there a more elegant/clean way of handling changes across a ton of machines? My coworkers aren't keen on making sls files for every file we want to manage
23:53 whytewolf well, don't... make your templates more ... dynamic
23:54 pcn whoops, I said pillar, I mean job cache
23:55 whytewolf pcn: you said returner earlyer so i assumed you were talking about a job cache anyway :P
23:57 whytewolf jrgochan: could you perchaance recurse your defaults. then state your custom stuff?
23:58 jrgochan whytewolf: that's what I'd prefer to do, but I'm not quite sure how to do it. the custom files are a subset of the defaults, in all cases
23:59 bkruger hi, just curious if anyone here has written unit tests with custom code.  Was curious about the best way to go about mocking salt.client.LocalClient()
23:59 jrgochan So I want to define a state that copies all defaults, but overwrites any customs, keyed off minion id
23:59 whytewolf yeah that won't work
23:59 jrgochan :(

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