Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-02-24

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

All times shown according to UTC.

Time Nick Message
00:00 eodgooch joined #salt
00:00 ajw0100 joined #salt
00:00 joe_n joined #salt
00:02 keimlink_ joined #salt
00:03 ericsysmin1 joined #salt
00:03 urda any tips on debugging pillars from git? I think I finally have my ext_pillar wired up right but I don't seem to have any items in my pillar now
00:07 teryx510 joined #salt
00:09 virtualguy joined #salt
00:09 mavhq joined #salt
00:10 garphy joined #salt
00:13 cpattonj joined #salt
00:13 cpattonj pretty confused regarding versioning in docs, if something says it's new in 0.9.8, what version is that supposed to be? 2015.9.8?
00:14 UtahDave cpattonj: 0.9.8 is really old. That's the old versioning scheme
00:15 joe_n joined #salt
00:19 kevin__ i deleted a couple hosts and rerun salts but not all info got imported like ip salt, os enviroment etc
00:19 kevin__ any idea what is going on
00:26 GnuLxUsr joined #salt
00:27 fracklen joined #salt
00:28 baweaver joined #salt
00:29 kevinquinnyo1 joined #salt
00:35 terratoma joined #salt
00:36 saltycharles joined #salt
00:40 zenlot1 joined #salt
00:41 flowstate joined #salt
00:42 ronp_usa1 joined #salt
00:46 eodgooch_ joined #salt
00:46 jnials joined #salt
00:48 ajw0100_ joined #salt
00:48 andrej joined #salt
00:49 andrej I'm seeing some odd behaviour with pkg.upgrade on Ubuntu machines. Using salt 2015.5.3.
00:50 andrej After successfully running pkg.upgrade and checking on the odd minion (most of them, really) I see "6 updates available" when running "/usr/lib/update-notifier/apt-check --human-readable"
00:50 andrej Why would that be?
00:57 keimlink joined #salt
01:00 keimlink_ joined #salt
01:02 joe_n joined #salt
01:10 amcorreia joined #salt
01:17 bhosmer_ joined #salt
01:20 ryanlraines joined #salt
01:20 cpattonj joined #salt
01:21 keimlink joined #salt
01:21 cpattonj Sorry @UtahDave I know this is way late after my last post, I had to step away: it surprises me that 0.9.8 is an old versioning scheme when it still says "New in..." in as most recent as the 2015.8.7 docs: https://docs.saltstack.com/en/latest/ref/file_server/file_roots.html
01:21 ryanlraines Hi All, this is my first time here. I'm working to add a scheduled job to my salt environment.
01:22 ryanlraines Here is what I have so far:
01:23 ryanlraines https://gist.github.com/anonymous/61e42ea0d7162959cbe8
01:23 ryanlraines but highstate is returning: "State 'schedule' in SLS 'postgresql.cron' is not formed as a list"
01:24 ryanlraines What is wrong with my formatting?
01:24 ericsysmin1 prolly missing - ?
01:25 cpattonj yep
01:26 akhter joined #salt
01:26 cpattonj I'd recommend getting a code editor that supports setting the syntax for SLS because if you did that it would've stood out like a sore thumb
01:27 ericsysmin1 left #salt
01:28 ryanlraines thanks @ericsysmin1
01:29 ryanlraines which line is missing the '-'?
01:29 ryanlraines Does notepad++ not support sls?
01:29 cpattonj function
01:29 cpattonj sublime does
01:29 ryanlraines oh, and thanks@cpattonj
01:31 UtahDave cpattonj: Yeah, that's correct. I believe the local file server was released in the 0.9.8 version.  Very early days of Salt
01:31 ryanlraines added -, now returning new error: Rendering SLS postgresql.cron failed, render error: while parsing a block collection   in "<unicode string>", line 10, column 5:         - function: cmd.run
01:35 auzty joined #salt
01:35 ryanlraines reformatted to this:  https://gist.github.com/anonymous/4b34124e7597424a2941
01:36 ryanlraines this error is returned: No function declared in state 'db_backup' in SLS u'postgresql.cron'
01:36 auzty joined #salt
01:37 Score_Under ryanlraines: is this a sls file you're writing? if so you need to put a state name there
01:37 NV joined #salt
01:37 Score_Under I would have said 'cron.present' or something but that doesn't look like what you're trying to use
01:37 ryanlraines its in an init.sls
01:37 Score_Under ah
01:37 cpattonj ryanlraines: https://gist.github.com/buddyp450/f86088db4257de9454dc
01:37 UtahDave left #salt
01:37 Score_Under https://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html#salt.states.schedule.present
01:37 cpattonj I rewrote it for you.
01:38 cpattonj (requires python-croniter)
01:38 nZac joined #salt
01:39 hacfi Hi there
01:39 hacfi does anyone setup his OS X with salt?
01:39 cpattonj granted, I'm not sure what version your'e on that has the syntax you were using with args instead of job_args but that'll do on 2015.8.7
01:39 cpattonj hacfi: yes but masterless
01:40 cpattonj so probably not helpful
01:40 hacfi I’ve tried a couple of times with a masterless setup but it caused some weird file permission issues
01:40 Score_Under hacfi: yes
01:40 Score_Under ah mine's not masterless
01:40 hacfi anything important to keep in mind when doing it?
01:40 hacfi will first try it again on my gf’s laptop :D
01:40 Score_Under nothing that errors won't tell you, I think
01:40 hacfi good
01:40 hacfi umask changed but not sure if it really was salt or something else
01:41 ryanlraines cpattonj - your submission returned: No function declared in state 'db_backup' in SLS u'postgresql.cron'
01:41 Score_Under probably something in your profile/bashrc doing that
01:41 cpattonj What version are you using?
01:42 ryanlraines salt 2015.8.5 (Beryllium)
01:42 flowstate joined #salt
01:44 cpattonj can you show how you're trying to invoke the saltstate file?
01:44 ryanlraines I was following along with this yt vid: https://youtu.be/y5FEUd7oG4A?list=PLMPrLbtWN6PWh91jCimWlYzqs9G9bgyUl&amp;t=1071
01:44 ryanlraines I'm trying to run a backup script nightly at 3a via salt state
01:45 cpattonj FYI that video is almost a year old lol
01:45 ryanlraines yeah...I know...
01:45 jeffspeff joined #salt
01:46 cpattonj sorry but I can't watch a 48 minute video to get the context lol, can you just paste the command you're running beginning with "salt" ?
01:46 cpattonj or salt-call I suppose
01:46 dendazen joined #salt
01:47 ryanlraines salt 'minion_id_here' state.highstate test=True
01:47 misconfig Hi, does anyone know what a salt retcode of 11 would elude to, I can't seem to find why I'm getting this error => https://gist.github.com/ndobbs/29b8faaee05f2fe967ac
01:48 Score_Under (↑ this kind of thing is why I run salt-call over ssh rather than letting salt do it)
01:48 cpattonj ryanlraines: I'll direct message you
01:49 iceyao joined #salt
01:49 misconfig I come from deep experience with Ansible - pretty new to salt and liking it. Odd I'm getting this retcode of 11 when I have no failures in my states. My master is using gitfs and ext_pillar.
01:50 zzzirk joined #salt
01:50 Score_Under did all the minions report success?
01:51 misconfig Yes they did. I currently only have 2 minions, one of the minions is the salt master.
01:51 ryanlraines cpattonj, getting 'Can't use this command in this window' in dm
01:52 cpattonj for just typing a message?
01:52 ryanlraines yes
01:52 misconfig salt-master and salt-minion installed - as my idea is to manage the salt-master's SSH keys with my 'common' formula just as the rest of the machines in the env.
01:52 cpattonj >.<
01:52 cpattonj hop on irc.lc/freenode/salt/ryanlraines
01:52 cpattonj idk what garbage that is
01:52 cpattonj that error you're getting
01:53 cpattonj and dm me when you get here
01:53 ryanlraines_ joined #salt
02:01 iggy misconfig: it's perfectly valid (and probably suggested) to have the master also be a minion
02:02 misconfig Thanks for the validation, iggy
02:04 XenophonF does anyone have any suggestions of how i might store xml in yaml in a salt formula-friendly manner?
02:08 whytewolf XenophonF: by ditching yaml and writing your own render? https://docs.saltstack.com/en/latest/ref/renderers/#writing-renderers
02:10 andrew_v joined #salt
02:11 Score_Under XenophonF: what's the use case/
02:12 bhosmer_ joined #salt
02:13 virtualguy salt-pack running on debian jessie x86_64 fails for me when running state.highstate saying: "The following packages were not built:..." for all 23 states. Any ideas?
02:14 cpattonj salt-call --local doesn't use the file root in my /etc/salt/minion... I have to specify --file-root, any tips?
02:15 Score_Under I really want to say 'make an alias' :P
02:15 fracklen joined #salt
02:16 cpattonj hahaha
02:16 cpattonj well I have a feeling it's not using the build in file server when I do it via the CLI because it looks like it initializes everything
02:16 cpattonj built-in
02:17 donmichelangelo joined #salt
02:17 cpattonj I'm a little confused because it says for masterless to shut down the salt-minion and just use salt-call but if I shut down the salt-minion doesn't that mean I'm disabling my configs inside /etc/salt/minion?
02:17 cpattonj hence removing my refs to my correct file-root
02:18 ninjada joined #salt
02:18 whytewolf cpattonj: the docs for masterless also say to set file_client: local in the config file and doens't say to use --local
02:18 cpattonj I wonder where I got --local from...
02:18 whytewolf https://docs.saltstack.com/en/latest/topics/tutorials/standalone_minion.html#telling-salt-call-to-run-masterless
02:19 cpattonj oh misread it >.<
02:19 cpattonj thanks
02:19 cpattonj friggin human errors
02:19 whytewolf no i know --local used to be needed for something
02:20 cpattonj it says to use --local to NOT use the config
02:20 gmoro joined #salt
02:20 cpattonj so I guess file-root would just go straight to /srv/salt/base or something
02:20 whytewolf ahh, well that would exaplin it :P
02:20 whytewolf yeap
02:26 iceyao_ joined #salt
02:27 quasiben joined #salt
02:28 baweaver joined #salt
02:32 nZac joined #salt
02:36 rem5 joined #salt
02:42 flowstate joined #salt
02:47 ilbot3 joined #salt
02:47 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.7 | Register for SaltConf16: http://saltconf.com/register/ | Paid support available for open source Salt! https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
02:50 catpigger joined #salt
02:53 GnuLxUsr joined #salt
02:56 cpowell joined #salt
02:58 zzzirk joined #salt
03:00 Guest31277 joined #salt
03:04 rem5 joined #salt
03:05 totzky joined #salt
03:05 totzky good day/night
03:06 bhosmer__ joined #salt
03:06 ajw0100 joined #salt
03:06 totzky Question:  Is there a way to ignore pillar data ?
03:07 zzzirk joined #salt
03:10 totzky Say I have minionA with pillar data {'a': [{'b': 'bb'},{'c': 'cc'}]} and I want to do a salt run for minionA but need to ignore a.b
03:10 ageorgop joined #salt
03:11 totzky This is very useful when testing, in that I'll be able to ignore irrelevant pillar data from being rendered
03:15 cpattonj pillar_roots?
03:15 cpattonj :/
03:16 totzky @cpattonj yeah but is there a way to do that dynamically? like specifying in a command line?
03:16 zzzirk joined #salt
03:17 totzky I wanna be able to plug it in a CI and dynamically inject excluded pillar
03:21 hasues joined #salt
03:25 zzzirk joined #salt
03:25 hasues left #salt
03:31 zzzirk joined #salt
03:31 hightekvagabond joined #salt
03:32 Antiarc_ http://intothesaltmine.readthedocs.org/en/latest/chapters/secret-storage/gpg-agent.html#gpg-agent
03:32 Antiarc_ "You’ll need to manually launch the gpg-agent and then tell SaltStack where it can find the running agent."
03:32 Antiarc_ *how* do I tell salt where to find the agent?
03:32 Antiarc_ The docs seem to be missing that detail
03:37 zzzirk_ joined #salt
03:37 jfelchner joined #salt
03:37 cpattonj joined #salt
03:38 jfelchner Alright all, I'm about ready to kill someone. :D Google has failed me.
03:39 jfelchner I'm doing a bunch of stuff in jinja and all I want to do is a simple output of a variable to STDOUT when the state runs.  I'm currently just working in masterless mode and running `salt-call --local state.apply my_state`
03:40 jfelchner I'm at a loss to understand how anyone builds complex states if you can't even spit out debug information when it runs.  I'm sure as a newbie I'm just missing something obvious. hahaha
03:40 writtenoff joined #salt
03:40 whytewolf jfelchner: I wrote this for that purpase https://github.com/whytewolf/salt-debug
03:41 racooper joined #salt
03:41 berserk joined #salt
03:42 ekristen joined #salt
03:42 jfelchner whytewolf that looks like it'll get the job done.  Thank you for the reply!  Nothing against this code, but is there nothing built in to just be like "Hey, if I see a Jinja `pprint` filter on something I'm going to throw it to STDOUT?
03:43 jfelchner I'm going to try your state now and I'll report back.  Thank you again!
03:44 cpattonj Am I completely missing the point of require_in? https://gist.github.com/buddyp450/1cefa48fd5d1e47b103c
03:45 whytewolf cpattonj: doesn't look like it. require_in is just the reverse of require. instead of I require this package. it just tells salt. this package requires me
03:45 whytewolf s/package/state
03:46 rem5 joined #salt
03:46 whytewolf jfelchner: no there isn't a default output system for templates.
03:48 cpattonj whytewolf: if you have time, could you explain to me why my expected behavior didn't happen?
03:49 evle joined #salt
03:51 whytewolf cpattonj: because opentsdb doesn't know to include java-init.sls
03:51 whytewolf so by salt.apply opentsdb it doesn't load java-init.sls
03:51 whytewolf so the require-in never triggers
03:52 cpattonj interesting, didn't know I needed to include
03:53 cpattonj I guess that makes sense, how else would it know what's going on
03:53 whytewolf exactly
03:53 cpattonj so note to self, apt-get autoremove default-jre-headless was a terrible idea
03:54 cpattonj don't do it
03:56 whytewolf that does sound painful
03:56 cpattonj I'm an idiot
03:57 jfelchner whytewolf DUDE THIS IS HUGE! THANK YOU!
03:57 whytewolf jfelchner: you are welcome
03:57 cpattonj I thought for sure that would remove the jre it just installed
03:57 cpattonj wasn't paying attention
03:57 zzzirk joined #salt
03:59 writtenoff joined #salt
04:00 fracklen joined #salt
04:00 bhosmer joined #salt
04:01 cpattonj ugh
04:01 cpattonj time to wake the it admin lol
04:02 whytewolf ouch
04:03 totzky joined #salt
04:11 anmolb joined #salt
04:13 izrail joined #salt
04:22 dkrae joined #salt
04:25 totzky joined #salt
04:26 stooj joined #salt
04:38 anmolb joined #salt
04:41 zzzirk joined #salt
04:43 jfelchner whytewolf this thing should be built into Salt.  No question.  It's absolutely necessary to do anything even borderline complex. I've gotten more done in the last 50 minutes than I have all day. Thanks again.
04:43 flowstate joined #salt
04:43 totzky joined #salt
04:47 cpowell joined #salt
04:47 rdas joined #salt
04:48 zzzirk_ joined #salt
04:53 treaki_ joined #salt
04:54 stooj joined #salt
04:55 bhosmer_ joined #salt
04:55 hightekvagabond joined #salt
04:56 anmolb joined #salt
04:57 cpowell joined #salt
04:58 zsoftich4 joined #salt
05:00 viq joined #salt
05:04 berserk joined #salt
05:12 ageorgop joined #salt
05:12 dendazen joined #salt
05:16 praveen joined #salt
05:17 iggy jfelchner: the problem is, you won't need it shortly.... there's a little hump everyone has to get over, then find yourself doing crazy debugging hacks less and less
05:24 flowstate joined #salt
05:25 jfelchner joined #salt
05:28 dimeshake joined #salt
05:28 lemur joined #salt
05:42 flowstate joined #salt
05:46 jaybocc2 joined #salt
05:46 brianfeister joined #salt
05:49 bhosmer_ joined #salt
05:54 linjan__ joined #salt
05:58 cpowell joined #salt
06:01 LostSoul Hi
06:01 LostSoul Does salt have inline change like ansible does?
06:05 jfindlay you mean file.line?
06:06 armyriad joined #salt
06:07 malinoff joined #salt
06:08 ramteid joined #salt
06:09 LostSoul Thanks jfindlay!
06:13 linjan_ joined #salt
06:14 jfindlay sure
06:18 jaybocc2 joined #salt
06:19 keltim joined #salt
06:20 chiui joined #salt
06:21 anmolb joined #salt
06:24 ninjada_ joined #salt
06:27 jhauser joined #salt
06:27 anthpa Hi There, Is it possible to deploy a salt-cloud maps file to an existing minion if the minion id matches what's in the map file?  I am porting everything into Maps now and would like to update the minion's without having to deploy new boxes and migrate application data.
06:29 felskrone joined #salt
06:33 nyx_ joined #salt
06:33 sauvin joined #salt
06:33 jfindlay anthpa: cloud maps aren't exactly like sls data in that they are consulted only when creating nodes and you can't use them to change node data after creation.  I could be wrong as I've never tried this, but I'm almost completely sure this is correct
06:35 anthpa jfindlay: I understand that.  My cloud maps profile is deploying correctly.  I've made some significant changes to my state files at the same time.  I'm just not sure if I need to do an initial run of the cloud maps profile to create a minion or if it will look to an exisitng minion with a matching id specified in the maps profile.
06:35 jfindlay but if you match up your running minions with the data you put into the map, you should be fine
06:37 anthpa jfindlay: I'm manually update the grains file so the maps profile may run as if it's a new deployment.  I'll test it out and see what happens on dev :)
06:38 jfindlay if there is a cloud minion with an id corresponding to a minion in the map, then salt-cloud should't care if you've manually refactored your setup outside of the map
06:39 jfindlay but you're on your own to make sure the map will replace existing cloud minions correctly
06:39 iggy run salt-cloud... it asks before it does anything
06:40 malinoff joined #salt
06:41 sauvin joined #salt
06:41 jfindlay the reasoning for this is that salt-cloud will only query so far as the cloud provider API and not necessarily introspect a cloud minion for salt-specific data
06:42 flowstate joined #salt
06:43 bhosmer_ joined #salt
06:47 LostSoul jfindlay: mode Replace - Will it add line if it's not there?
06:50 jfindlay the documentation is confusing on that
06:51 jfindlay states *should* be stateful, so I'm guessing that it will
06:51 jfindlay s/stateful/idempotent/
06:51 tweakism jfindlay: if you ever want to, feel free to tell me about doc stuff you'd like to see different and I'll make PRs
06:52 jfindlay tweakism: everything with the doc label? :-)
06:52 tweakism heh hadn't thought of that.  I'll take a look.
06:53 tellendil joined #salt
06:53 jfindlay so many issues come in every day.  I used to try to fix all the easy ones myself, but that ended up taking all day
06:53 steffo joined #salt
06:54 jfindlay tweakism: also, there's a Help Wanted label that we add to issues that should be easier to resolve
06:54 jaybocc2 joined #salt
06:55 jfindlay if you not of the disposition to be frustrated :)
06:55 tweakism what does it mean?
06:55 tweakism grunt-work needed?
06:55 tellendil hey ! I'm quite new to salt and trying to make my way around making a plugin to change the minion hostname. I'd need to be able to give a strictly increasing hostname number to each minion matching a given hostname. Is that even possible ? Do you have any clues where I should look ? I'm quite lost
06:56 malinoff joined #salt
06:56 sauvin joined #salt
06:57 jfindlay tweakism: it means that the issue should be easy to fix.  I don't really like the label name because when people see it, they think `Help Needed` and other specious diminutives.  It used to be `Low Hanging Fruit`, which I like even less, but `help wanted` is now a standard github label, so that's something
06:58 iggy tellendil: mine maybe? mine.get everything with a type or name glob pipe to count and increment
06:58 tweakism I just wanted to make sure it was Low Hanging Fruit, and not Need Help From Smarter People Cause This Is Beyond Me
06:58 jfindlay tellendil: you could investigate having the minions sending data into the salt mine and then rename based on that
06:58 tweakism chances of me helping much with the latter are small
06:59 tweakism tellendil: hostname is part of my bootstrapping process 'cause minion_id is based on it and I want to be right from the beginning.
07:00 jfindlay tweakism: yeah, I don't think anyone likes those labels.  If something is challenging for a full time member of a project, almost nobody else is experienced enough to not waste time working on it by definition
07:00 tellendil tweakism: I know, and this makes sense, but I have multiple live-cds that must be fired up and then get a correct hostname. Is there another way you would see for this ? I don't know anything about the ips they will get and have no control on the network
07:01 tweakism I actually think it's pretty awesome to have a label calling the attention of newer or less experienced people toward suitable issues.
07:01 tellendil iggy, jfindlay : ok this seems promising, but it lacks an atomic "fetch and update" :/
07:02 tweakism There's a lot of non-wizards that want to contribute to their favorite projects and could do it but get mired up in inconsequential stuff and never manage to.
07:02 iggy tellendil: I can't think of anyway (in salt) to get that kind of functionality
07:02 jfindlay tellendil: you could also look into sdb as an authoritative source of what minion ids out of your strict id namespace have been used, and which is next, etc.
07:03 jfindlay although I'm not exactly sure how I would set that up for your specific use case
07:04 tellendil iggy: in something else you would ? I could use something else if needed
07:04 tellendil jfindlay: ok, I'll get a look at it
07:07 mariusv joined #salt
07:08 iggy was thinking redis, but the redis module doesn't look like it has any support for the increment command
07:08 tweakism I think your options are between 'build something custom to do it' and 'select and specify manually at deploy time'
07:09 tweakism you could combine the approaches and make a web-based registry where a person can login and have a new ID issued
07:10 tellendil tweakism: could you confirm that unaccepted keys are in minion_pre right ? I could just use an inotify to ssh and hack my way through it
07:11 anmolb joined #salt
07:11 jfindlay tellendil: if you want use inotify, you should consider the inotify beacon and the salt reactor
07:12 tellendil jfindlay: ok I'll look at this, thanks !
07:12 jfelchner joined #salt
07:15 jfelchner iggy I don't see how that's possible.  Being able to see "Oh this is what salt is going to see when it renders this template" seems to be a necessary thing.  But I'll take your word for it! :D  I don't know enough salt to know what I'm talking about. hahaha
07:17 pwalsh joined #salt
07:17 jfindlay tweakism: if you think of a better label name than `Help Wanted`, let me know :-)
07:30 iggy jfelchner: if your templates are that hard to visualize, you may want to lay off the jinja
07:30 kawa2014 joined #salt
07:33 malinoff joined #salt
07:33 malinoff joined #salt
07:35 asmaps left #salt
07:35 jfelchner iggy it's not the templates themselves so much that are the problem, it's getting all the sources of the configs merged in properly.  A defaults file, a jinja file to take the defaults and configure them based on the OS and other grains and then merging in user-specified pillar overrides on top of that.
07:36 jfelchner Add to that the fact that *some* of those pillar configs are coming from ext_pillar stuff and it can get very complicated with no way of looking at a given run and seeing what the resulting configuration looks like.
07:36 iggy start smaller... formulas are a huge hurdle to quickly learning salt
07:37 jfelchner iggy Ok.  But I'm curious how more experienced salt users solve that problem.
07:37 bhosmer_ joined #salt
07:38 iggy what problem?
07:39 jfelchner Of being in a formula and working with defaults, mapping overrides based on grains and pillar data and understanding whether the mapped data is in the structure that you want and that you didn't accidentally make a typo somewhere.
07:40 Antiarc_ `salt-call pillar.raw` on a minion shows you the coalesced pillar data
07:40 jfelchner Because I've literally made a dozen typos today and it wasn't like "Oh that was dumb I didn't know what I was doing." it was "Oh that was dumb I accidentally typed x when I meant to type y"
07:40 jfelchner Antiarc_ does that include the data coming from the formulas?
07:41 Antiarc_ jfelchner: It's all the pillar data, it's not the states
07:41 flowstate joined #salt
07:41 Antiarc_ But in theory you should only be caring about pillar data :)
07:41 jfelchner Not if I'm writing a formula correct?
07:41 jnials joined #salt
07:41 Antiarc_ Well no, if you're writing a formula you will need to test it. I just test it by running on the minion and observing the output.
07:42 jfelchner Antiarc_ and therein lies my issue :)
07:42 Antiarc_ You're trying to test it without testing it, or...?
07:43 iggy jfelchner: state.show_highstate is helpful, `state.highstate test=True`
07:43 iggy etc
07:43 Antiarc_ Have you seen https://docs.saltstack.com/en/latest/ref/states/testing.html ?
07:43 Antiarc_ Which is basically what iggy just said :)
07:44 jfelchner The output gives me something like "In 'some.state' such and such doesn't respond to 'blah'"  Well if 'blah' is being called on a variable I'm defining in my formula, I don't know if/when/how/what the value is or was or what.
07:44 Antiarc_ Can you share some sample states? Might be that you're overcomplicating it
07:45 jfelchner I'm basically looking at states that are in the salt formulas repo and emulating their structure to try and learn.
07:45 jfelchner I'll check out the testing thing though :)
07:45 jfelchner Lemme give it a try and see if it helps my situation.
07:45 AndreasLutro the formulas are easily prone to being overcomplicated
07:45 AndreasLutro keep that in mind
07:46 jfelchner AndreasLutro duly noted :)
07:46 Antiarc_ Start simple. The way I approach it is "How would I do this manually at the command line?" and then I translate that into a salt state, and then I parameterize it with pillar data.
07:46 jfelchner Thanks for helping everyone, I'll jump back in here with my results.
07:47 dgutu joined #salt
07:49 GreatSnoopy joined #salt
07:49 iggy jfelchner: as I said... trying to learn with formulas is a bad idea
07:49 iggy start smaller
07:52 kbaikov joined #salt
07:52 linjan_ joined #salt
07:58 elsmo joined #salt
08:00 steffo joined #salt
08:02 mavhq joined #salt
08:03 brianfeister joined #salt
08:03 malinoff joined #salt
08:04 Miouge joined #salt
08:05 jbrnds joined #salt
08:05 fracklen joined #salt
08:06 ffredrikk joined #salt
08:07 ffredrikk Hi, how can I store information which will be accessible for both the minion and the salt-master? It seems if I store info in a pillar, it won't be accessible to the salt-master...
08:11 deniszh joined #salt
08:12 iggy ffredrikk: use case?
08:13 ffredrikk @iggy - I'm storing static data on machines, such as IP address, hostname, MAC address. Right now I store it in a pillar, but this isn't accessible from the salt-master, it seems. This data is not really sensitive.
08:13 colttt joined #salt
08:13 Antiarc_ How are you trying to access it from the master?
08:13 iggy like how are you trying to access it on the master?
08:15 ffredrikk from a Reactor state
08:16 ffredrikk it seems I can't call {{ pillar['something'] }} from a Reactor state
08:16 iggy who's pillar are you trying to access?
08:17 ffredrikk well, that's the thing. it's just static data. It's not based on grains from a minion.
08:18 ffredrikk let's say I have a slack api key I wish to store somewhere
08:19 ffredrikk and I'd like to be able to fetch this from both minions runinng e.g. a highstate as well as from reactor states
08:19 iggy did you try salt['pillar.get']() ?
08:20 slav0nic joined #salt
08:20 colttt joined #salt
08:20 ffredrikk no, can do that now. But I was under the impression that salt['pillar.get']('slack_api_key') is the same thing as pillar['slack_api_key']
08:21 iggy it isn't
08:21 iggy but I'm not ure it'll work any better
08:21 iggy wortha  try though
08:22 aarontc joined #salt
08:23 iggy the best way would be to pass whatever data you need through the reactor
08:25 chiui joined #salt
08:26 fracklen joined #salt
08:27 malinoff joined #salt
08:30 josuebrunel joined #salt
08:31 spaceSub joined #salt
08:32 bhosmer_ joined #salt
08:32 zer0def joined #salt
08:35 jfelchner_ joined #salt
08:37 ffredrikk @iggy It doesn't seem like salt['pillar.get']('slack_api_key') works. It doesn't error out, it just doesn't return anything
08:40 kshlm joined #salt
08:41 flowstate joined #salt
08:41 Rumbles joined #salt
08:41 dmaiocchi joined #salt
08:44 liqw joined #salt
08:56 cpowell joined #salt
08:57 blue joined #salt
08:58 ffredrikk @iggy - this seems a little odd. there must be some way of achieving this. I created a stackoverflow question: http://stackoverflow.com/questions/35597452/how-can-i-store-static-data-to-be-available-for-both-reactor-and-minions
08:59 Miouge_ joined #salt
08:59 garphy joined #salt
09:00 fracklen joined #salt
09:03 joe_n joined #salt
09:05 fracklen_ joined #salt
09:07 garphy joined #salt
09:11 s_kunk joined #salt
09:13 LondonAppDev joined #salt
09:14 Xevian joined #salt
09:17 tweakism joined #salt
09:19 joe_n joined #salt
09:21 fmnisme joined #salt
09:21 keimlink joined #salt
09:22 ronnix joined #salt
09:22 jfelchner joined #salt
09:26 bhosmer_ joined #salt
09:26 fracklen joined #salt
09:31 anmolb joined #salt
09:34 colegatron_ joined #salt
09:36 feliks joined #salt
09:40 fooda joined #salt
09:41 flowstate joined #salt
09:41 fracklen joined #salt
09:42 fracklen joined #salt
09:43 tweakism joined #salt
09:47 ffredrikk Okay, I think I found a way... although it exposes all of the master's configuration to all minions: http://stackoverflow.com/questions/35597452/how-can-i-store-static-data-to-be-available-for-both-reactor-and-minions/35598561#35598561
09:48 tongpu joined #salt
09:50 denys joined #salt
09:51 brianfeister joined #salt
09:55 elsmo joined #salt
09:55 Rumbles joined #salt
09:58 wnkz joined #salt
10:02 rubenb Hi, are there some (new) best-practices on updating the salt-minions (on Windows)
10:04 fmnisme @ffredrikk maybe you can storage data in event
10:06 mr_const joined #salt
10:06 mr_const hi all
10:06 fmnisme salt-call event.send 'foo' '{slack_api_key: xxxxx}'
10:06 mr_const is it possible for salt, when deploying files from git to delete 'obsolete' ones?
10:07 mr_const or maybe there are known walkarounds?
10:08 Antiarc_ `git clean` in your repo root will remove any files not staged
10:11 netcho joined #salt
10:11 mr_const there is no .git on target minion
10:12 favadi joined #salt
10:14 mr_const My point is: when regularly deploying files to target minion from git source, after some time minion becomes bloated with old files, which were deleted in git, but apparently weren't deleted on minion, because file.recurse only copies new files and doesn't delete old ones.
10:15 brianfeister joined #salt
10:15 Antiarc_ file.recurse takes a clean parameter which, if true, will remove anything not managed by salt
10:20 mr_const Antiarc_, thanks
10:20 bhosmer_ joined #salt
10:21 malinoff joined #salt
10:25 teryx510 joined #salt
10:27 fracklen joined #salt
10:33 Rumbles joined #salt
10:34 cberndt joined #salt
10:35 ronnix joined #salt
10:39 Miouge joined #salt
10:41 flowstate joined #salt
10:43 Rumbles joined #salt
10:44 joe_n joined #salt
10:55 MadHatter42 joined #salt
10:57 joe_n joined #salt
10:59 _JZ_ joined #salt
11:06 N-Mi joined #salt
11:09 amcorreia joined #salt
11:11 kawa2014 joined #salt
11:12 evle joined #salt
11:13 ninjada joined #salt
11:14 bhosmer_ joined #salt
11:15 dandelo joined #salt
11:22 malinoff joined #salt
11:24 favadi joined #salt
11:29 josuebrunel joined #salt
11:31 MadHatter42 joined #salt
11:37 Miouge joined #salt
11:41 flowstate joined #salt
11:45 evle1 joined #salt
11:47 SunPowered joined #salt
12:01 anthonypaip joined #salt
12:07 anmolb joined #salt
12:09 bhosmer joined #salt
12:11 akhter joined #salt
12:11 antpaip joined #salt
12:20 favadi joined #salt
12:22 jaybocc2 joined #salt
12:25 is_null hi all, anybody using salt in minionless mode ? (master + salt-calls)
12:32 cprior How may I target all but the master? From a reactor I "orchestrate" 2 state files. In one I am matching with salt.function the "tgt" of my saltmaster. In the other I want to match _all_ minions but the master.
12:33 cprior In my state top.sls I am using pcre-mathcing with '(?!saltmaster)'
12:33 fracklen joined #salt
12:34 cprior But that needs the `  - match: pcre` to work. Is there an easy way to "tgt" with a salt.function all non-master?
12:35 cprior (I am reacting to a shutdown button connected to the saltmaster. And then send a shutdown - 1 to all minions. I need to wait 2 min to issue the shutdown to the saltmaster.)
12:36 AndreasLutro is_null: that's not really a minionless system... salt-call makes the minion process talk to the master
12:36 cprior oops, sry. Forget about it, there is a tgt_type fpr salt.function. I could swear I had looked for it!
12:41 vilitux joined #salt
12:43 iceyao joined #salt
12:45 SunPowered Im looking for a proper way to debug my pillar matching, I'm not doing something right in my pillar / environment matching and having trouble debugging what salt is parsing
12:46 SunPowered I have a minion with no environment specified.  It is matching targets in the dev pillar environment.  Is this expected?
12:47 zzzirk joined #salt
12:49 AndreasLutro SunPowered: it's impossible to have a minion in no environment - do you mean the base environment?
12:50 SunPowered yes, I meant no environment was explicitly specified on the minion config.  Which would default it to the base environment
12:50 SunPowered so should it be targeting matches in the dev environment section of my pillar top file?
12:52 AndreasLutro I don't use environments to I may be wrong here... but which environment(s) a minion is depends on which environments its top.sls matches are put under
12:54 SunPowered i see, all targets in all environments are checked for a match, and if found that environment's salt/pillar tree will be used
12:54 flowstate joined #salt
12:54 SunPowered that would explain what I am seeing
12:56 zzzirk joined #salt
12:56 flowstate joined #salt
12:58 LondonAppDev joined #salt
12:58 cpowell joined #salt
12:59 rem5 joined #salt
13:01 SunPowered though what then is the point of setting the environment option in the minion config if its just going to be ignored?
13:03 bhosmer joined #salt
13:05 favadi joined #salt
13:06 mr_const how to debug 'The minion fuction caused an exception'?
13:07 patrek joined #salt
13:07 mr_const I'm trying to run this state and get an exception: http://pastebin.com/TDCku8nU
13:08 AndreasLutro SunPowered: no idea, I don't use environments :p
13:09 AndreasLutro I had so many issues when I tried
13:09 SunPowered AndreasLutro: Either I am missing something fundamental to environments or it is not implemented very well
13:09 SunPowered *about* environments
13:09 SunPowered I suspect it might not be very well hashed out
13:09 SunPowered My use case is pretty simple
13:09 AndreasLutro I suspect it's meant for more advanced use cases
13:10 SunPowered but my use case would be greatly helped by the concept of an environment
13:10 jaybocc2 joined #salt
13:11 AndreasLutro what is the end goal you're trying to achieve?
13:11 SunPowered Im developing new states / pillars.  I dont want to interfere with my production infrstructure but want to move past vagrant
13:11 SunPowered so I want to try out states and pillars from a dev salt environment on newly created boxes
13:12 AndreasLutro I'd recommend setting up a separate salt master for this test/stage/whatever environment
13:12 SunPowered I suppose that's a possibility, but it feels like this is exactly what environments are claimed to be for
13:13 SunPowered I think my problem is that I have the same targets defined in multiple environments
13:13 SunPowered so even production minions now are matching my dev targets
13:13 AndreasLutro yeah you're supposed to avoid that
13:14 SunPowered Ive seen that documented though
13:14 SunPowered let me find it
13:15 DammitJim joined #salt
13:15 SunPowered https://docs.saltstack.com/en/latest/ref/states/top.html#multiple-environments
13:15 SunPowered right there in the top file docs, they specify the same targets for multiple environments
13:16 AndreasLutro I guess that works *if* you pin the environment in the minion config
13:16 SunPowered maybe, I can try that
13:16 SunPowered force the minion to the prod environment
13:17 SunPowered Ill run the master in debug mode and see if anything pops out amongst the noise
13:20 irctc340 joined #salt
13:21 lompik joined #salt
13:22 SunPowered it would be nice to be able to query what environment is ultimately targeted for a minion
13:25 garphy joined #salt
13:27 KennethWilke joined #salt
13:30 kawa2014 joined #salt
13:30 garphy` joined #salt
13:30 AndreasLutro salt '*' cmd.run 'echo {{ saltenv }}' template=jinja
13:31 AndreasLutro should work I guess
13:33 dimeshake joined #salt
13:35 catpig joined #salt
13:35 fracklen_ joined #salt
13:38 Sacro joined #salt
13:38 Score_Under Is there a way to display a templated SLS file? I want to find out why one of my substitutions is causing a syntax error in the YAML, but the syntax error only gets reported down the line.
13:42 SunPowered Score_Under: salt '*' state.show_sls <sls_target>
13:42 SunPowered AndreasLutro: nice, that could definitely work
13:44 Score_Under SunPowered: unfortunately that's still one step too far - shows the error but not where it came from
13:44 Score_Under Rendering SLS services.ssh.service failed, render error: expected '<document start>', but found '<block mapping start>'
13:44 Score_Under and points to the next declaration after the substituted variable
13:46 numkem joined #salt
13:49 gh34 joined #salt
13:50 Score_Under okay, it's just the yaml filter outputting a '...' after strings, breaking the file syntax
13:50 Score_Under not sure what that's about
13:51 subsignal joined #salt
13:51 ponpanderer joined #salt
13:51 SunPowered can you post a link to the yaml?
13:51 SunPowered also, check spaces / tabs
13:52 keltim joined #salt
13:52 slav0nic joined #salt
13:56 subsigna_ joined #salt
13:57 bhosmer joined #salt
13:58 jean-michel joined #salt
14:00 pmcnabb joined #salt
14:02 CeBe joined #salt
14:02 ronnix joined #salt
14:03 snc joined #salt
14:05 DammitJim joined #salt
14:05 ssplatt joined #salt
14:07 ekristen joined #salt
14:07 losh joined #salt
14:11 mavhq joined #salt
14:12 mr_const can anyone help with 'The minion function caused an exception... KeyError'?
14:13 Rkp mr_const: could be pretty much anything. you'd need to check in which state it happened, and check the logs of the salt-minion
14:13 Rkp if you have no salt-minion logs, might be good to activate them
14:14 mr_const I have logs
14:14 mr_const there is nothing new :(
14:14 Rkp might be in /var/log/salt/minion, sometimes the actual error is a bit before
14:15 Rkp the python or jinja errors are too cryptic otherwise
14:15 Rkp can you paste your failed state output somewhere?
14:15 AndreasLutro you can run salt-call -l debug followed by the module/function you were running from the master to get more info
14:16 hasues joined #salt
14:16 mr_const http://pastebin.com/TDCku8nU
14:16 hasues left #salt
14:17 AndreasLutro that just means the bower state module isn't available, either because you're on an older version of salt or bower isn't installed properly
14:18 ronp_usa joined #salt
14:18 fooda joined #salt
14:19 Rkp yeah, recent minion versions will give you some other error
14:19 mr_const # salt 'c-bot*' cmd.run 'bower --allow-root' runs fine
14:19 mr_const shows bower output
14:20 mr_const updating minion from 2015.5 to 2015.8
14:21 blue left #salt
14:22 fracklen joined #salt
14:22 iceyao_ joined #salt
14:24 Rkp maybe the bower modules for salt are also relatively recent
14:25 racooper joined #salt
14:25 zsoftich4 joined #salt
14:25 Rkp don't see them in the 2015.5 branch docs
14:26 mr_const strange, I thought, I've seen them yesterday
14:28 snc joined #salt
14:31 lompik joined #salt
14:33 cpattonj joined #salt
14:34 cpattonj Is there a particular reason that https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html recommends storing salt formulas in the file_roots rather than just alongside every other statefile folder in /base?
14:34 cpattonj Or is that roughly equivalent?
14:35 pooogles joined #salt
14:37 cpattonj I'm guessing it's from a purely organizational perspective.
14:37 renaissancedev joined #salt
14:37 pooogles salt-cloud quesiton, I can see in the docs you can add volumes in the yaml profile declaration for AWS, however see nothing for GCP at https://docs.saltstack.com/en/latest/topics/cloud/gce.html#size ?
14:40 bhosmer joined #salt
14:42 Tanta joined #salt
14:44 mr_const Rkp, indeed, problem was with old version of a salt-minion
14:44 mr_const now I have weird problem with bower, which is ran as www-data
14:44 mr_const inside a directory with www-data ownership
14:44 mr_const it can't create directory
14:46 mr_const not a salt problem, though
14:46 scoates joined #salt
14:46 mr_const su - www-data -s /bin/bash -c 'mkdir config'
14:46 mr_const mkdir: cannot create directory ‘config’: Permission denied
14:52 zzzirk joined #salt
14:53 Tanta why not just use file: directory: name: /path/config user: www-data group: www-data
14:54 DammitJim joined #salt
14:55 jean-michel good morning.  I'd like to manage a file in salt that contains jinja that should NOT be interpreted or templated ( https://www.refheap.com/115145 ) but should be installed exactly as shown in the paste.  Is there a trick to accomplishing this?  I tried template=None in file.managed but that didn't seem to do the trick.
14:55 fracklen joined #salt
14:58 RandyT_ joined #salt
14:58 Tanta don't put template: jinja in the file.managed state declaration
14:59 Tanta that will render it as plaintext
15:00 flowstate joined #salt
15:01 mr_const weird thing with file.recurse with clean option
15:02 mr_const doc says: Make sure that only files that are set up by salt and required by this function are kept. If this option is set then everything in this directory will be deleted unless it is required.
15:02 mr_const I added required: file: local-config
15:02 zmalone joined #salt
15:02 mr_const and file.recurse deleted this file...
15:02 cpowell joined #salt
15:02 mavhq joined #salt
15:03 cpowell joined #salt
15:05 jean-michel Tanta: cool, thanks
15:07 rem5 joined #salt
15:08 flowstate joined #salt
15:08 toastedpenguin joined #salt
15:11 flowstat_ joined #salt
15:13 ronnix joined #salt
15:15 DammitJim joined #salt
15:15 rem5 joined #salt
15:19 XenophonF mr_const: if you set that flag, only files created by the file.recurse state itself are kept
15:19 XenophonF salt isn't artificially intelligent
15:19 XenophonF yet
15:22 jaybocc2 joined #salt
15:24 flowstate joined #salt
15:26 MadHatter42 joined #salt
15:28 viq XenophonF: SaltNet ? ;)
15:34 _JZ_ joined #salt
15:34 flowstate joined #salt
15:35 racooper joined #salt
15:36 dabb what is the proper way to use OR in an IF statement with the jinja renderer (in a file)? {% if grains['var'] == 'value1' || grains['var'] == 'value2' %} ?
15:37 jaybocc2 joined #salt
15:40 tehsu if I have a tomcat service that I want to start if it stops, would, beacons be the best approach? such as beacons: service: tomcat: onchangeonly: True
15:40 tehsu would that need to be set as a schedule
15:43 andrew_v joined #salt
15:45 mpanetta joined #salt
15:45 flowstate joined #salt
15:46 saru12 joined #salt
15:46 Tanta use systemd, upstart, supervisord, or similar tehsu
15:46 Tanta that's what daemon managers are for
15:48 mpanetta joined #salt
15:49 hightekvagabond joined #salt
15:49 jfg joined #salt
15:50 * fullstop loves runit
15:50 fullstop so simple
15:50 fullstop although it will fall to systemd eventually.  :-/
15:50 spuder joined #salt
15:51 nZac joined #salt
15:52 fracklen joined #salt
15:54 flowstate joined #salt
15:55 sk_0 joined #salt
15:55 jfg In a salt.states.lvm.vg_present, it's not possible to pass the options --force and --yes  ?
15:58 hairytoez joined #salt
16:00 shaggy_surfer joined #salt
16:01 cpowell_ joined #salt
16:01 tehsu Tanta: true, thinking of control over it during maintenance but I guess a manual stop wont invoke it to respawn
16:03 zzzirk joined #salt
16:03 cpowell_ joined #salt
16:04 cpowell joined #salt
16:07 jfg Same for pvcreate  --force and --yes are ignored ?
16:10 tracphil joined #salt
16:11 morissette joined #salt
16:12 tracphil I have two formula that i am using and both put a file in /etc/salt/master.d/ (a master-formula and a  pki-formula). My question is can I use a watch statement in each formula to restart salt-master on change or should I keep all the files in master.d in that salt-mater formula?
16:15 slav0nic joined #salt
16:16 amcorreia joined #salt
16:19 bowhunter joined #salt
16:21 brianfeister joined #salt
16:22 zzzirk joined #salt
16:23 pfallenop joined #salt
16:28 brianfeister joined #salt
16:30 tligda joined #salt
16:30 hightekvagabond joined #salt
16:33 Score_Under I want to write a custom grain but it will need access to grains['os_family'], is that possible or should I try to reimplement that?
16:34 malinoff joined #salt
16:35 ageorgop joined #salt
16:45 nZac joined #salt
16:48 srinivas joined #salt
16:49 catpig joined #salt
16:51 ironfroggy joined #salt
16:52 cyborg-one joined #salt
16:52 Fiber^ joined #salt
16:53 kim0 joined #salt
16:54 ironfroggy if i have a cmd.script state which references a script from my salt conf like salt://users/purge-users.sh but i have parameters to that so the line is "name: salt://users/purge-users.sh whitelist of users" will salt try to use those parameters as part of the file to look up? because it seem to be failing to find it.
16:54 alemeno22 joined #salt
16:54 ecrane joined #salt
16:54 eryk joined #salt
16:55 alemeno22 joined #salt
16:55 eryk can anyone tell me if there is a nice way of removing master key from minion after master has been re-deployed?
16:56 eryk getting: SaltSystemExit: Invalid master key
16:56 dimeshake joined #salt
16:58 racooper joined #salt
16:58 jfindlay eryk: I'm not sure if there's a better answer, but you can `minion # rm /etc/salt/pki/minion/minion_master.pub`
17:00 kawa2014 joined #salt
17:01 eryk jfindlay: that's what I just did, but if you have 100s of nodes than doing it manuall is a bit of pain. you would think that there is a better way of doing this, hmmm
17:02 jimklo joined #salt
17:03 lionel joined #salt
17:03 Score_Under ironfroggy: I've recently gone and removed all cmd.script invocations from my own salt sls repo, because it seems to be better accomplished with a custom state or module, and it tries to execute files under /tmp (which is blocked by noexec /tmp mounts, and by hardened kernels)
17:04 Score_Under I would advise against ever using it.
17:04 shiriru joined #salt
17:04 ironfroggy ok, but for now, this works for all the places where i'm doing the same thing but without parameters
17:05 jfindlay eryk: you could salt-ssh as a backup for situations like this
17:12 writtenoff joined #salt
17:13 atmosx joined #salt
17:15 pooogles qq, is there any way to lowercase grains?
17:16 jfindlay pooogles: in what context?
17:17 dfinn joined #salt
17:20 pooogles we have a custom grain role that’s got a value of “Foo”, for some config we need that to be “foo”.
17:20 onlyanegg joined #salt
17:21 pooogles I can see ‘lower’ in the jinja templating spec, so I can assume it’s possible just a bit confused on the syntax.
17:21 garphy joined #salt
17:22 Heartsbane joined #salt
17:22 Heartsbane joined #salt
17:22 iggy pooogles: {{ salt['grains.get']('mygrain') | lower }}
17:23 pooogles <3
17:23 iggy is that what you were looking for?
17:23 andrew_v joined #salt
17:23 pooogles yeah that looks like it.
17:23 iggy k, note you can also chain filters together
17:24 iggy {{ listval | first | lower }}
17:24 iggy something like that
17:24 iggy or any sort of filters really
17:25 onlyanegg joined #salt
17:29 fracklen joined #salt
17:32 cprior This Python base is soooo fun to wrok with! This works on my particular hardware: salt 'foobar' grains.item gpus:0:model but in a state file this failed: `{% if (  grains['gpus:0:model']`...   BUT it doaesn't take much thinking to rewrite it as `grains['gpus'][0]['model']` This pythonic stuff shines through at so many corners, I just love working with Salt :D
17:34 flowstate joined #salt
17:37 UtahDave joined #salt
17:41 hightekvagabond joined #salt
17:44 iggy cprior: the : separator only works with grains.get (and apparently grains.item) whereas {{ grains[] }} is just normal python lookups
17:49 jaybocc2 joined #salt
17:53 soma left #salt
17:54 hightekvagabond joined #salt
17:57 flowstate joined #salt
17:59 capricorn_1 joined #salt
18:02 baweaver joined #salt
18:06 amcorreia joined #salt
18:12 flowstate joined #salt
18:15 shaggy_surfer joined #salt
18:17 bucky_ joined #salt
18:18 jimklo_ joined #salt
18:18 DammitJim joined #salt
18:20 bujordan new to salt here - trying to setup mysql using pieces of the mysql-formula and getting a KeyError: 'mysql_database.present'. here's my configs: https://gist.github.com/bujordan/ed400a7a82bb74c41727
18:21 bujordan I found in the irc logs that this is probably caused by python-mysqldb not being installed in the right order. Everything works when I remove database.sls. Maybe I'm not understanding how extend works?
18:22 gcorey joined #salt
18:22 gcorey left #salt
18:23 nZac joined #salt
18:26 nZac joined #salt
18:32 ronnix joined #salt
18:33 disbound joined #salt
18:33 akhter joined #salt
18:36 jvv joined #salt
18:36 mpanetta joined #salt
18:37 mpanetta joined #salt
18:39 keimlink joined #salt
18:40 zmalone joined #salt
18:40 rem5 joined #salt
18:42 brianfeister joined #salt
18:50 GreatSnoopy joined #salt
18:53 mpanetta_ joined #salt
18:54 onlyanegg joined #salt
18:54 dmaiocchi joined #salt
18:55 StevenGFX joined #salt
18:55 impi joined #salt
18:56 cpowell joined #salt
18:57 cpowell joined #salt
19:04 flowstate joined #salt
19:06 linjan_ joined #salt
19:08 fracklen joined #salt
19:13 fracklen joined #salt
19:18 aboe joined #salt
19:20 flowstate joined #salt
19:20 baweaver joined #salt
19:20 mpanetta joined #salt
19:20 khaije1 joined #salt
19:21 khaije1 Hi, I'd like to create an alert that generates an email when server load is too low for more than an hour ... any pointers on where/how to start?
19:22 yidhra joined #salt
19:25 ajw0100 joined #salt
19:25 DammitJim do you use a reactor for that?
19:25 Tanta yes, use cloud watch
19:25 DammitJim or a schedule?
19:27 whytewolf khaije1: nagios, cloud watch, zabbix. any number of tools that are built for monitoring.
19:28 Tanta http://pastebin.com/zrZBiTSf here's some shell bits that will calculate the CPU load, you can do that from Cron and report it or track it with timestamps
19:30 khaije1 If I wanted to use Salt, is there a sensible way to accomplish it?
19:30 laudiacay joined #salt
19:30 Tanta Salt can install the scripts and cron jobs and do the reporting with the appropriate state functions
19:31 Tanta it's not magic
19:31 laudiacay hi all! so I currently want to use salt to install arch on a group of computers, and have it install a list of packages
19:31 laudiacay is that possible?
19:33 jim__ joined #salt
19:33 khaije1 I'm aware that there are alternatives that that Salt isn't magic. Just wanted to assess the feasibility.
19:35 Tanta I would tell you that rolling your own monitoring built on top of naked Salt will require non-trivial amounts of work and probably not as great as other tools like newrelic-sysmond, ganglia, etc, that are purpose-built for reporting system metrics
19:35 cliluw How do I allow a group of minions to run a specific Salt module on other minions?
19:35 ajw0100_ joined #salt
19:36 whytewolf Agree with Tanta. it is possable, but more trouble then it is worth and more error prone then a tool purpase built for monitoring
19:36 khaije1 Yeah that tracks.
19:37 khaije1 Think of it as a thought experiment if it helps.
19:37 whytewolf not to mention i highly doubt that you only want to monitor 1 thing.
19:37 Tanta I use a combo of newrelic-sysmond, custom cloudwatch metrics, and 3rd party like Pingdom to monitor systems
19:37 grumm_servire joined #salt
19:38 Tanta all that is orchestrated by salt and customized with pillar
19:38 nidr0x joined #salt
19:39 khaije1 Tanta: do you use spm in your setup at all? (jw)
19:39 Tanta what's that?
19:39 whytewolf I typically cross zabbix, ELK, and influxdb with graphite.
19:40 Glasswalker I'm trying to install a develop branch on my master, using "install_salt.sh -M -N git develop" but it's throwing an error: "error: error in command line: command 'Install' has no such option 'salt_config_dir'"
19:40 khaije1 Salt Package manager, if https://docs.saltstack.com/en/latest/topics/spm/ is to be believed
19:40 Glasswalker Anyone have any suggestions on how I can troubleshoot?
19:40 whytewolf khaije1: spm is packaging salt formulas
19:40 Tanta oh, nope, just a custom Git repository that houses /pillar and /salt
19:41 catpig joined #salt
19:41 Tanta if you want to use formulas, you could make them Git submodules to your primary automation repository
19:43 akhter joined #salt
19:44 denys joined #salt
19:44 hal58th joined #salt
19:45 khaije1 Tanta: Yeah thats what I do. It sounded like you have a mature solution so just wondering if it included a use for spm. I ask because I'm not include to use it and I wonder if I should be.
19:45 Tanta I've honestly never heard of it
19:46 hightekvagabond joined #salt
19:47 invalidexception joined #salt
19:48 MikaT joined #salt
19:49 lero joined #salt
19:49 keimlink joined #salt
19:49 lero hey. in this example, http://dpaste.com/1A1752T, is the require -> pkg needed?
19:50 lero or can I just remove and it should be fine?
19:51 fracklen joined #salt
19:55 josuebrunel joined #salt
19:56 kahiru joined #salt
19:57 surge_ joined #salt
19:58 surge_ Apart from allowing my minion SSH access to the salt master, do I have any other option to somehow pass “queue=True” via “publish.full_data” ?
19:59 aboe joined #salt
19:59 surge_ Setting queue=True as the default for all state runs seems to be another option. Apparently I’m not the first to think of this : https://groups.google.com/forum/#!msg/salt-users/4W1xnzROfas/Jdnlj-J0CwAJ
20:05 forrest joined #salt
20:07 urda joined #salt
20:07 chiui_ joined #salt
20:08 urda In salt: can a minion determine their environment from their hostname alone? For example devweb = development or dev ; prodweb = production or prod
20:08 urda such that Setting high state across the board means devweb gets development states, prodweb gets prod
20:08 jaybocc2 joined #salt
20:08 fracklen joined #salt
20:10 ajw0100 joined #salt
20:16 zsoftich4 joined #salt
20:17 aboe joined #salt
20:17 rem5 joined #salt
20:24 ALLmightySPIFF joined #salt
20:24 jimcroft joined #salt
20:26 jimcroft joined #salt
20:27 fracklen joined #salt
20:32 brianfeister joined #salt
20:35 bujordan joined #salt
20:37 cberndt joined #salt
20:39 baweaver joined #salt
20:39 netcho_ joined #salt
20:42 bujordan joined #salt
20:42 baweaver joined #salt
20:43 tercenya joined #salt
20:44 bujordan joined #salt
20:46 bujordan joined #salt
20:46 elsmo joined #salt
20:47 ksalman joined #salt
20:48 shaggy_surfer joined #salt
20:50 ksalman i am trying to figure out how salt figures out the id grains. I found this https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L971. what is __opts__?
20:50 aboe joined #salt
20:51 onlyanegg joined #salt
20:51 UtahDave __opts__ is the configuration info from the minion config
20:52 ksalman REading here https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html, is that just reading id from minion_id file?
20:53 ksalman UtahDave: The very first time salt is installed, it sets the minion_id file to the FQDN. At that point the file does not exist, no? I assume at some point it populates that and after that it can populate __opts__
20:54 UtahDave well, it checks __opts__ because you can set the id in the minion config and it will use that first, if it exists
20:55 brianfeister joined #salt
20:55 joe_n joined #salt
20:55 ksalman what if it does not exist? It appears to use FQDN in that case unless i am remembering wrong
20:56 srinivas joined #salt
20:59 onlyanegg joined #salt
20:59 UtahDave ksalman: Yeah, it tries 2 or 3 things in order to get a name.  FQDN, /etc/hosts/, and something else.  I think the exact calls and order is documented somewhere
20:59 UtahDave It tries to find a suitable name
20:59 flowstate joined #salt
20:59 andrew_v joined #salt
21:00 ksalman That is what I am trying to find, where in the code it is. I was pretty sure it was in grains/core.py but it's been a while since I checked
21:00 ksalman It may just have been moved since the last time I checked heh
21:02 Rockj joined #salt
21:03 slav0nic joined #salt
21:04 fracklen joined #salt
21:05 aboe joined #salt
21:05 akhter Hey guys, is there a way to use a variable within an "if" statement?
21:05 khaije1 I couldn't think of it in the moment, but the beacon system is what I had in mind for my earlier question. https://docs.saltstack.com/en/latest/topics/beacons/
21:05 nZac joined #salt
21:05 pooogles joined #salt
21:06 akhter For example {% set var = pillar['somedict']['somesubdict'] %}  {% if grains['value'] in {{ var }} %}
21:06 akhter Would that work?
21:08 ksalman UtahDave: nvm i found it. It's get_id in confg.py
21:08 cliluw akhter: Almost, remove the "{{" and "}}" that surround var.
21:08 akhter cliluw: I'll try that.
21:10 flowstate joined #salt
21:11 akhter cliluw: Thanks, that worked wonderfully.
21:11 pooogles joined #salt
21:11 TaiSHi joined #salt
21:11 TaiSHi o/ all
21:11 TaiSHi Long time no see
21:12 TaiSHi Seems PPA fell a couple versions behind...
21:13 bujordan joined #salt
21:14 deniszh joined #salt
21:14 tzero left #salt
21:14 TaiSHi So, just random question, I have es_ES.UTF-8: locale.present set, but when I run that state it says "Bad entry 'es_ES.UTF-8 '" (note the space after UTF-8)
21:15 jfindlay TaiSHi: the PPA is no longer used, you should use repo.saltstack.com instead
21:15 TaiSHi jfindlay: Thanks for letting me know, I'll update my clusters
21:15 jfindlay TaiSHi: that is likely a bug
21:15 bujordan joined #salt
21:15 TaiSHi jfindlay: I'm on 2015.5.3 so it -could- be fixed
21:16 TaiSHi I'll test and bother you after I move
21:16 jfindlay yeah, it might be fixed, there have been changes to locale since then
21:16 jfindlay actually, I think I remember that bug
21:18 perfectsine joined #salt
21:19 jhauser joined #salt
21:19 TaiSHi jfindlay: I reported a couple of bugs back in 2014.1 iirc, but don't recall them being like that one
21:20 deniszh joined #salt
21:22 bujordan new to salt and have a question about extend - if I'm extending service under a state should requirements for that state still be satisfied before the extended service bits?
21:22 perfectsine joined #salt
21:24 pooogles joined #salt
21:25 nZac joined #salt
21:26 fracklen joined #salt
21:29 dfinn joined #salt
21:32 joe_n joined #salt
21:37 bhosmer joined #salt
21:40 joe_n joined #salt
21:52 jimcroft joined #salt
21:52 deniszh joined #salt
21:55 _JZ_ joined #salt
21:57 rannick joined #salt
21:57 brianfeister joined #salt
21:57 rannick hey all, i'm looking at salt package manager, and the docs in devel are getting a lot better! Will this packaging system let me deploy multiple version of a given package? i.e. server X gets version 2015.02 but server Y gets version 2014.08?
21:58 koomi left #salt
21:59 kermit joined #salt
22:02 jimcroft joined #salt
22:03 pooogles joined #salt
22:04 nZac joined #salt
22:05 subsignal joined #salt
22:05 cpowell joined #salt
22:05 rannick it really looks like this is not how spm works.
22:05 rannick it looks like it's still this one states file where everything in an environment follows one specific state
22:06 rannick states repo*
22:08 nZac_ joined #salt
22:12 UtahDave rannick: you should be able to install different versions of a package right now using a little jinja
22:13 rannick UtahDave: happen to have a good link?
22:13 disbound or even using grains
22:13 disbound https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
22:13 rannick oh
22:13 rannick not RPM packages
22:13 rannick sorry
22:13 rannick different SLS files.
22:13 rannick like this is the rev 7 of the set of SLS files for setting up apache
22:13 UtahDave yeah, you could still do that.
22:13 frew hey guys, I'm trying to implement the map.jinja pattern but for python consumers
22:14 frew I'd be fine with python loading the map.jinja file, but that hasn't worked for me
22:14 rannick and i need server X to user rev 7 of the sls files, and server y to user rev 8
22:14 frew if anyone knows how to do that, it would be great
22:14 ninjada joined #salt
22:14 UtahDave Basically have a higher level sls file that imports the correct version based on whatever criteria you want for each server
22:14 frew alternately, I have a working way to read other python files from a py rendered pillar, but it's sorta gross
22:14 netcho joined #salt
22:14 frew and ofc once you do that jinja pillars can't read it
22:14 frew thoughts?
22:15 rannick UtahDave: and i'm out of luck for transitive dependencies then? or would i SPM for the latest version of my dependency, which happens to have formulas for every version ever.
22:15 * frew thought UtahDave was UltraDave
22:15 * UtahDave considers changing his nick
22:15 UtahDave :)
22:16 frew I kinda wanna change my nick to Ultrafrew now
22:16 cyborglone joined #salt
22:16 UtahDave rannick: Hm. I haven't used SPM yet. Let me see what I can find out.
22:16 Reilly joined #salt
22:17 rannick UtahDave: It looks very good for dealing with transitive dependencies, but it seems to only solve it for a single salt base. Not on a per-package thing
22:18 UtahDave rannick: well, I'm pretty sure handling dependencies has only recently been added and may still be actively being worked on.
22:19 UtahDave This might the perfect time to bring this issue up.  Could you open an issue on Github requesting it?  I'll point the lead developer on SPM to that.
22:19 rannick UtahDave: yes. it definitely didn't exist before august of last year's release
22:19 bujordan joined #salt
22:20 rannick UtahDave: will do.
22:20 UtahDave frew: I'm not exactly sure how to go about doing that. You might ask on the salt-users list.
22:20 frew was JUST drafting an email :)
22:20 UtahDave thanks for the idea, rannick!  We're hoping to make SPM really useful
22:20 UtahDave frew: great minds....   :)
22:20 frew indeed UltraDave
22:22 bujordan joined #salt
22:23 frew UltraDave++
22:23 andrew_v joined #salt
22:23 UltraDave I feel like I need to buy a cape or a spandex suit with a lightning bolt logo
22:24 frew your call
22:25 jfindlay do it!
22:27 Reilly Is there a reason require: pkg is not working for me? https://gist.github.com/ReillyProcentive/4c58d6cea964de274b48
22:27 Reilly Centos 7.2.1511 and Salt 2015.8.7
22:28 rannick UtahDave: I'm a java guy, and i'm hoping i can start thinking about my servers the way i think about my applications - with maven dependencies.
22:30 flowstate joined #salt
22:31 pooogles joined #salt
22:32 totzky joined #salt
22:34 chamunks joined #salt
22:38 evidence the schedule is time elapsed since minion startup when just using the standard seconds, correct?  and the cron format uses the same?  curious if there is a way to use absolute times when doing something every hour for example, on the top of the hour.  the when to specify absolutes gets a bit unweidly with that many data points
22:40 knite joined #salt
22:40 flowstate joined #salt
22:41 shaggy_surfer joined #salt
22:42 whytewolf Reilly: pkg: essential-packages
22:42 zenlot1 joined #salt
22:42 whytewolf Reilly: it is by state id
22:43 hasues joined #salt
22:43 hasues left #salt
22:44 Reilly Thanks! That fixed it
22:44 grumm_servire joined #salt
22:46 stooj joined #salt
22:49 UltraDave evidence: yeah, you can use times:  https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
22:49 knite joined #salt
22:52 baweaver joined #salt
22:52 pooogles joined #salt
22:59 mohae joined #salt
23:04 Aleks3Y joined #salt
23:10 joe_n joined #salt
23:12 ninjada joined #salt
23:16 knite how can I represent "if I need to do something, do something else first"? specifically, I want to do a file.absent on an upstart job we no longer need, but I want to stop that job before deleting the file, if the file is present.
23:17 knite it doesn't feel like a require_in or watch.
23:18 knite so basically, if file.absent would trigger a change, run another state first.
23:18 totzky joined #salt
23:19 honestly uh I do that
23:19 donmichelangelo joined #salt
23:20 honestly what I have is I change settings on a network interface and I ifdown before I do it and ifup afterwards but only if there is a change
23:20 honestly I use cmd.wait state
23:20 honestly but I'm not in the office so I can't tell you exactly how I made it work
23:21 knite docs say cmd.wait runs *after* the state change.
23:22 evidence UltraDave: thx, yeah i just mean if I want to say run something every hour.. the times are a bit unwieldy no?  maybe i'm missing the proper way, but if i want everything to run in unison every hour, do i have to list each hour?
23:23 ronrib joined #salt
23:23 evidence knite: you could always use onlyif in the stop state.  stop service only: test -e /etc/init.d/service
23:24 evidence then in the file.absent require the service stop
23:24 knite evidence: hm, that's a decent option. will break if the job is present but not currently running, though.
23:24 evidence so both execute each time, but the stop only runs if the file is there and the absent obviously remove if the file is there
23:25 honestly knite: https://docs.saltstack.com/en/latest/ref/states/requisites.html#prereq
23:25 honestly must be this
23:25 evidence for why?  the stop would not hinder the file.absent
23:25 bhosmer joined #salt
23:25 knite so the onlyif test returning false won't prevent the file.absent from running?
23:25 evidence you are using prereq simply to modify the ordering in this case
23:26 knite hadn't seen prereq, reading docs now...
23:26 laudiacay left #salt
23:27 dfinn joined #salt
23:27 nZac joined #salt
23:30 UltraDave knite: yeah, I think prereq is what you want.
23:30 LotR why not just use service.dead to stop the job, and then have the file.absent depend on that?
23:31 UtahDave joined #salt
23:32 dfinn joined #salt
23:32 knite LotR: hadn't seen service.dead either - that supports upstart jobs in /etc/init, I assume? if so, I think service.dead as a require for file.absent should work.
23:36 LotR I think salt states try to be implementation agnostic, so I assume it works with upstart too, but I've never used upstart myself
23:36 knite there has to be an implementation somewhere, since the docs don't say how salt determines what a service is? upstart? systemd? old style init?
23:37 tweakism you can specify which provider to use
23:38 tweakism there's an example in the docs somewhere, I think, for the debian situation of systemd being the default but a certain service only has a sysvinit init script
23:40 LotR yeah, what I meant by 'try to be implementation agnostic' is that you can have service.running whether you use sysv or systemd (or something else) and it still works the same from the state point of view
23:40 flowstate joined #salt
23:42 UtahDave There are multiple "service" modules. One for each type of system.
23:42 UtahDave The proper one is determined and loaded at minion startup
23:43 UtahDave if you run    salt <minion id> sys.list_functions service     you'll see the functions available for your OS
23:43 UtahDave or   salt <minion id> sys.doc service for more detailed info
23:43 tampakrap joined #salt
23:48 cpowell joined #salt
23:50 hightekvagabond joined #salt
23:58 bujordan joined #salt
23:59 lero joined #salt

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