Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-14

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

All times shown according to UTC.

Time Nick Message
00:00 kevinquinnyo joined #salt
00:03 zsoftich I am having trouble with event_return. my custom returner in _returners works when using --return <name>, but when I set event_return: <name> in the master config I get the error 'Returner not found'
00:08 claytron_ joined #salt
00:09 baweaver joined #salt
00:17 cachedout joined #salt
00:18 duendecat joined #salt
00:22 VR-Jack Fooooood Coma
00:24 baweaver joined #salt
00:25 otter768 joined #salt
00:26 gthank joined #salt
00:29 scoates Ryan_Lane: pardon the stupid question, but could you give me a quick rundown on how to run the boto_secgroup tests?
00:29 Corey I'm an idiot.
00:29 Corey Where does http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html live in git?
00:30 zsoftich2 joined #salt
00:30 Ryan_Lane scoates: I'll be honest. I don't know :)
00:30 scoates heh
00:30 scoates Corey: https://github.com/saltstack/salt/blob/develop/salt/renderers/gpg.py
00:30 scoates heh was to Ryan_Lane (-:
00:30 Gabemo joined #salt
00:30 gthank joined #salt
00:30 Ryan_Lane scoates: my former coworker wrote them
00:30 Ryan_Lane I think they're unit tests, right?
00:30 sunkist joined #salt
00:30 scoates yeah
00:30 Ryan_Lane so it should be however salt normally runs its unit tests
00:30 * scoates nods
00:31 scoates yak yak yak
00:31 Gabemo joined #salt
00:32 GnuLxUsr joined #salt
00:33 tzero joined #salt
00:33 Corey Ah, my bug got fixed already. Curse you, develop branch!
00:34 Corey Ryan_Lane: We should do a Saltstack Beer Summit soon. :-)
00:39 zsoftich anyone using event_return on salt 2015.5.2? just tried again with the mysql returner and I get the same error
00:41 scoates Ryan_Lane: got brainpower for a sanity check? https://gist.github.com/scoates/f1861dfa718cbf291aa1
00:43 yomilk joined #salt
00:46 hvn joined #salt
00:49 duendecat joined #salt
00:49 lmaoayy joined #salt
00:52 claytron_ joined #salt
00:53 ronrib joined #salt
01:11 dthorman joined #salt
01:13 breakingmatter joined #salt
01:19 duendecat joined #salt
01:27 scoates anyone know where this magic comes from? https://github.com/saltstack/salt/blob/develop/salt/modules/boto_secgroup.py#L44
01:27 scoates Ryan_Lane: maybe? ^
01:29 scoates ah. found it.
01:29 scoates https://github.com/saltstack/salt/blob/5840c2e06bd6e149e04f786bf759603f573fb3c1/salt/utils/boto.py#L263
01:30 Corey Anyone want to come work with Salt in downtown San Francisco? :-)
01:30 scoates good luck (-:
01:36 claytron_ joined #salt
01:36 VR-Jack I'd rather work with Puppet than work in downtown San Fran
01:39 Corey VR-Jack: I've done both!
01:39 VR-Jack You have my sympathy
01:39 Corey Including briefly *AT* Puppet in Downtown SF.
01:40 scoates I'd have started a brewery by now if I still had to work with puppet.
01:45 terratoma SF is the best. they just banned people from Market St
01:45 womble scoates: Would you call it "The SSL Certificate Mismatch Brewing Co."?
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.5.2 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:47 mosen years later still havent done scoates' saison
01:47 scoates me neither in years. )-:
01:49 ITChap joined #salt
01:50 scoates ahahahaha!!!! IT WORKS! *frankenstein noises*
01:50 duendecat joined #salt
01:52 scoates https://www.dropbox.com/s/97tuoh5aent32lw/Screenshot%202015-08-13%2021.52.16.png?dl=0 via salt + vpc_name
01:54 willburaus joined #salt
01:54 willburaus hi all, had a question about installing the salt minion on Mac OS X if anyone has the time to help?
02:00 willburaus I just cannot for the life of me get it to actually work, I am fairly new to this.
02:01 mosen willburaus: sure
02:01 mosen willburaus: I'm working on building a native package but for the moment you will have to do it through homebrew
02:02 mosen willburaus: what have you done so far?
02:04 murrdoc joined #salt
02:05 kevinquinnyo Does anyone here use something like Jenkins to test changes before submitting pull requests to your salt repositories / running salt states?
02:06 kevinquinnyo i ran into a bug (a stupid typo) that caused some problems for live environments and I'm wondering more broadly how I can prevent this through testing
02:09 kevinquinnyo i'm looking for resources / general info / advice by the way ^
02:11 tzero joined #salt
02:11 napsterX joined #salt
02:12 kevinquinnyo and also, I guess I'm looking for testing solutions in general -- I am very familiar with unit testing, but salt, as a configuration management system makes changes to systems, so a proper testing strategy must be more involved right?
02:12 womble kevinquinnyo: https://github.com/simonmcc/kitchen-salt appears to be what people seem to like around here.  I had this discussion yesterday, and the general consensus was that there is no way to do unit testing with Salt states.
02:13 mosen its strange because I thought that salt-testing repo had some unit tests for states
02:14 kevinquinnyo womble: thanks let me take a look at that
02:14 womble mosen: If it does, it certainly isn't obvious, and nobody's talking about how to use them.
02:15 womble And the salt-testing repo is not exactly replete with documentation...
02:15 mosen womble: and it depends on the unit tests being inside the salt repo
02:15 mosen womble: so trying to wedge your own states into it is pretty hard :)
02:16 womble mosen: That's not particularly helpful, then...
02:17 rideh joined #salt
02:19 kevinquinnyo I don't know much about "continuous integration" or Jenkins specifically, but I know when I submitted a PR for a facebook project in github, I'm pretty sure it deployed a virtual machine via (I think Jenkins) to test the changes I made before allowing the PR.  I was wondering if anyone does something like that
02:21 duendecat joined #salt
02:22 aurynn That's CI
02:22 kevinquinnyo if it's just writing php code or python code, it's easy with proper unit tests, but deploying changes to servers in a cluster...   You can make a typo that conceivably passes good unit testing, but breaks a live environment pretty easily as I discovered
02:23 aurynn I learned yesterday that there's a test-kitchen plugin for Salt, so you could conceivably do your unit tests like that
02:23 kevinquinnyo yeah i'm looking into it right now -- it was linked above by womble
02:23 mosen yeah thats what womble was talking about
02:23 mosen I assume its similar to beaker w/puppet
02:24 shaggy_surfer joined #salt
02:25 pm90_ joined #salt
02:26 aurynn and by "could concievably" I mean I'm going to explore it more because I want to use it
02:26 aurynn but it's pretty straightforward to have a Vagrant env that does the right thing, for testing
02:30 womble aurynn: Having automated CI/CD is still useful when devs "forget" to run the integration test suite before they commit, "because it takes too long"
02:30 hvn joined #salt
02:31 evle joined #salt
02:31 aurynn womble, yessssss.
02:32 aurynn also someone was saying on twitter today that the time it takes to run unit tests is an indicator of code quality
02:32 kevinquinnyo aurynn: lol, no i meant 'could conceivably' to mean i fucked up already
02:32 aurynn but I forget how
02:34 Gabemo joined #salt
02:39 claytron_ joined #salt
02:43 tedski joined #salt
02:44 zsoftich2 joined #salt
02:46 writtenoff joined #salt
02:46 pm90_ joined #salt
02:51 duendecat joined #salt
02:55 rgarcia_ joined #salt
03:04 Brew joined #salt
03:07 Shirkdog joined #salt
03:16 favadi joined #salt
03:22 otter768 joined #salt
03:22 duendecat joined #salt
03:25 yomilk joined #salt
03:27 smooth_penguin joined #salt
03:27 smooth_penguin hey
03:28 smooth_penguin Im sending out events using the salt reactor, and I get these events to run commands on certain minions
03:28 hvn joined #salt
03:28 hvn joined #salt
03:28 smooth_penguin all this works fine
03:28 smooth_penguin Im wondering if there is a way, I can grab output from the command I run
03:29 smooth_penguin I know I can use returners, but I want to return the output from local.cmd.run back to the host that sent out the event
03:30 smooth_penguin for e.g hostX sends out a reactor event, minionfoo and minionbar exec this command
03:30 smooth_penguin I want to send back the output from minionfoo, minionbar to hostX
03:30 smooth_penguin is this possible?
03:33 aurynn when last I looked, no - one needed to use a sidechannel
03:33 aurynn but that may no longer be correct
03:33 smooth_penguin ok
03:34 smooth_penguin I'll wait for more folks to answer, before I try to haxor in a solution
03:36 rabbitheart joined #salt
03:38 subsignal joined #salt
03:39 claytron_ joined #salt
03:39 hvn joined #salt
03:39 sk_0 i have some vars set in a salt rule and i want to use those vars to access pillar data like...
03:40 sk_0 salt['pillar.get']('{{ app_name }}:{{ env }}')
03:40 sk_0 but that's not working. how do i do this?
03:42 VR-Jack salt['pillar.get'](app_name:env)
03:42 VR-Jack sorry.
03:42 VR-Jack salt['pillar.get'](app_name ~ ':' ~ env)
03:43 VR-Jack Think {{ pillar[app_name][env] }} might work too
03:44 sk_0 i'm trying to use the new salt['pillar.get'] method
03:44 sk_0 that did it. thank you so much!
03:50 VR-Jack yw
03:51 ITChap Morning everyone
03:51 VR-Jack Evenin' ITChap
03:51 VR-Jack Not letting you keep me up until 3am this time. lol
03:53 duendecat joined #salt
03:53 ITChap VR-Jack: wanna bet ? :D
03:53 ajw0100 joined #salt
03:53 VR-Jack lol. yeah. fixing to hit the sack. Tired after last night
03:53 ITChap I still have a load of funny things in my saltmaster
03:55 ITChap I discovered this morning: http://docs.saltstack.com/en/latest/ref/states/requisites.html
03:55 ITChap I was still using watch and require only
03:56 VR-Jack I like listen
03:58 ITChap I tried it on one of my states
03:58 ITChap that's pretty nice
04:02 Jimlad joined #salt
04:03 breakingmatter joined #salt
04:04 subsignal joined #salt
04:05 ITChap Is there anyway to use a pillar file in the top.sls only of the file exists ?
04:05 VR-Jack ITChap: yes
04:05 ITChap doesn't seem to be any such test in JInja
04:06 VR-Jack you have to do a salt[] I believe
04:07 ITChap use a module ?
04:07 VR-Jack {% if salt['file.file_exists']('/srv/pillar/' ~value ~ '/hosts.sls') %}
04:08 ITChap ok
04:08 ITChap will give it a try
04:09 yomilk joined #salt
04:09 ITChap Arff I use gitfs :(
04:09 ITChap I can't test this way
04:09 VR-Jack hahaha
04:10 VR-Jack I've not used gitfs. does it not keep a local working directory?
04:13 sectionm1 joined #salt
04:13 ITChap that's fine I will create empty files --_--
04:14 MikeyYeahYeah joined #salt
04:15 MikeyYeahYeah Hello all
04:16 MikeyYeahYeah Was hoping someone could answer a question about using grains within pillars
04:18 VR-Jack MikeyYeahYeah: can't be done
04:19 rdas joined #salt
04:19 VR-Jack Oh, wait. grains. might be done
04:19 VR-Jack go ahead
04:19 * VR-Jack was thinking mine
04:19 MikeyYeahYeah SO lets say I want to use the following line in a top file:
04:20 MikeyYeahYeah {{ salt['pillar.get']( grains['host']:value) }}
04:20 MikeyYeahYeah Is something like this possible
04:21 MikeyYeahYeah I have been searching the net up and down but no luck :-(
04:21 VR-Jack not in pillar files themselves. Pillar doesn't have direct access to pillar
04:21 VR-Jack There is a module that does do it, though
04:22 VR-Jack You can do that in the salt root top.sls though
04:22 MikeyYeahYeah That is where I am trying to do that
04:23 MikeyYeahYeah My pillar data is just a simple yaml config
04:23 claytron_ joined #salt
04:23 duendecat joined #salt
04:24 MikeyYeahYeah I need to pull the host name from the grain to match against the pillar to pull the right value
04:24 VR-Jack MikeyYeahYeah: one major problem with that, though. You are dealing with strings and variables combined
04:24 MikeyYeahYeah If that makes sense
04:24 VR-Jack {{ salt['pillar.get']( grains['host']:value') }}
04:24 VR-Jack oops
04:24 VR-Jack {{ salt['pillar.get']( grains['host'] ~ ':value') }}
04:24 MikeyYeahYeah YES!!!!!
04:25 MikeyYeahYeah You just made my day!!!
04:25 MikeyYeahYeah Thank you so much!
04:25 MikeyYeahYeah One damn tilde lol!
04:25 MikeyYeahYeah VR-Jack++
04:25 VR-Jack Well, glad ya caught me.
04:25 VR-Jack G'night all. Time to Zzzz
04:26 MikeyYeahYeah Thanks again!
04:26 VR-Jack You're welcome
04:28 karlthane joined #salt
04:45 jaybocc2 joined #salt
04:54 napsterX joined #salt
04:54 duendecat joined #salt
04:57 djinni` joined #salt
05:11 Fiber^ joined #salt
05:13 markm joined #salt
05:13 catpigger joined #salt
05:22 otter768 joined #salt
05:25 duendecat joined #salt
05:27 calvinh joined #salt
05:33 kukacz joined #salt
05:34 sectionme joined #salt
05:37 pppingme joined #salt
05:37 yomilk joined #salt
05:41 katyucha joined #salt
05:41 kukacz joined #salt
05:43 sectionm1 joined #salt
05:50 sectionme joined #salt
05:53 breakingmatter joined #salt
05:55 duendecat joined #salt
05:56 jaybocc2 joined #salt
05:59 colttt joined #salt
06:08 claytron_ joined #salt
06:10 dopesong joined #salt
06:10 dopesong_ joined #salt
06:14 dopesong joined #salt
06:18 katyucha joined #salt
06:20 napsterX joined #salt
06:22 AndreasLutro joined #salt
06:24 malinoff joined #salt
06:25 duendecat joined #salt
06:25 malinoff joined #salt
06:25 tedski joined #salt
06:36 katyucha joined #salt
06:36 rgarcia_ joined #salt
06:41 TyrfingMjolnir joined #salt
06:43 KermitTheFragger joined #salt
06:46 sectionme joined #salt
06:48 krymzon joined #salt
06:55 sectionm1 joined #salt
06:56 kawa2014 joined #salt
07:01 yomilk joined #salt
07:07 hvn joined #salt
07:10 tmh_ joined #salt
07:12 claytron_ joined #salt
07:16 TyrfingMjolnir joined #salt
07:21 rgarcia_ joined #salt
07:23 otter768 joined #salt
07:24 eseyman joined #salt
07:26 TyrfingMjolnir joined #salt
07:27 kuromagi joined #salt
07:30 yomilk joined #salt
07:35 katyucha joined #salt
07:37 katyucha joined #salt
07:37 claytron_ joined #salt
07:37 ninkotech__ joined #salt
07:37 linjan_ joined #salt
07:40 katyucha joined #salt
07:40 duendecat joined #salt
07:41 airgee joined #salt
07:42 breakingmatter joined #salt
07:44 airgee joined #salt
07:45 rgarcia_ joined #salt
07:46 katyucha joined #salt
07:47 airgee Hi guys. I've an issue with the salt Python API. When I call the method cmd_async it returns a job ID but then I don't know what to do to check the status of the cmd, and get the result. Can someone help me? Thanks
07:48 jaybocc2 joined #salt
07:50 Grokzen joined #salt
07:53 AndreasLutro airgee: why async?
07:54 h3x3d joined #salt
07:54 airgee well it's required in my situation. That's behind a REST api and I just can't wait a cmd to finish.
07:55 AndreasLutro if you can't wait for a cmd to finish, how do you expect to get the results?
07:56 ITChap joined #salt
07:56 hvn joined #salt
07:57 airgee I'll run it in async and then check if its finish to recover the result on a regular bases.
07:58 GrueMaster joined #salt
07:59 AndreasLutro so you need a function that looks up job data based on job id, I presume
08:00 airgee Yeah that's that
08:02 AndreasLutro I don't know what function that would be, sorry
08:05 fe92 joined #salt
08:07 lb1a joined #salt
08:08 subsignal joined #salt
08:15 airgee I just get the answer. the function I was searching for is get_cli_returns
08:16 ws2k3 joined #salt
08:16 Xevian joined #salt
08:21 hvn joined #salt
08:21 hvn joined #salt
08:22 s_kunk joined #salt
08:24 rodio_ua joined #salt
08:25 MadsRC What is the recommended way to keep a set of hosts in highstate? Can you have minions periodically poll the master and ensure a highstate, or would I have to use a crontab
08:25 GreatSnoopy joined #salt
08:28 ITChap MadsRC: http://docs.saltstack.com/en/latest/topics/jobs/index.html#highstates
08:28 ITChap probably what you are looking for
08:31 MadsRC ITChap: Thanks man, looking right now :D
08:31 sectionme joined #salt
08:33 ITChap MadsRC: np
08:34 ITChap I am trying to get a timestamp in my jinja
08:34 ITChap Is there any way to do this ?
08:35 AndreasLutro ITChap: I do {% set date = none | strftime('%Y-%m-%d') %}
08:35 ITChap cool thanks
08:36 chosi_ left #salt
08:37 ITChap I always forget that salt added some new filters ....
08:38 AndreasLutro hmm, I think that one's standard jinja
08:43 jaybocc2 joined #salt
08:48 tzero joined #salt
08:49 N-Mi joined #salt
08:50 DanyC joined #salt
08:53 sakaYK joined #salt
08:54 h3x3d left #salt
08:58 linjan_ joined #salt
09:04 claytron_ joined #salt
09:09 CeBe joined #salt
09:19 denys joined #salt
09:19 bluenemo joined #salt
09:24 otter768 joined #salt
09:26 rgarcia_ joined #salt
09:27 rodio_ua left #salt
09:31 breakingmatter joined #salt
09:41 jim_ joined #salt
09:42 impi joined #salt
09:47 claytron_ joined #salt
09:56 favadi joined #salt
09:57 jngd joined #salt
09:59 slav0nic joined #salt
10:07 ranomore joined #salt
10:08 mike25de joined #salt
10:10 subsignal joined #salt
10:11 fii joined #salt
10:18 sakaYK joined #salt
10:18 kawa2014 joined #salt
10:24 sakaYK joined #salt
10:24 Twiglet think you need timelib installed for that to work
10:24 Twiglet and it's not installed by default
10:27 viq joined #salt
10:29 sakaYK joined #salt
10:31 duendecat joined #salt
10:32 napsterX joined #salt
10:32 sectionme joined #salt
10:34 claytron_ joined #salt
10:34 ingslovak joined #salt
10:36 sakaYK joined #salt
10:40 arif-ali joined #salt
10:43 sakaYK joined #salt
10:45 stephanbuys joined #salt
10:47 rgarcia_ joined #salt
10:53 ingslovak1 joined #salt
10:55 jaybocc2 joined #salt
10:55 evle joined #salt
11:08 XenophonF iggy, why did the salt-api fixes for cherrypy and tornado get reverted in saltstack-formulas/salt-formula?
11:10 jaybocc2 joined #salt
11:13 sectionme joined #salt
11:19 claytron_ joined #salt
11:20 amcorreia_ joined #salt
11:21 hoonetorg joined #salt
11:25 otter768 joined #salt
11:32 onovy joined #salt
11:32 sectionm1 joined #salt
11:33 onovy Hi, is it possible to do file.managed where source file is on minion? Something like file.copy, but with template: jinja
11:34 markm joined #salt
11:37 svetlyak40wt joined #salt
11:38 nyx_ joined #salt
11:39 napsterX_ joined #salt
11:48 guest1 joined #salt
11:49 guest1 where can i find the difference between saltstack open source and saltstack enterprise..is it just the added support or is there an enterprise version with additional functionality ?
11:51 ouzo12 joined #salt
11:53 zwi joined #salt
11:54 zwi joined #salt
11:54 bluenemo joined #salt
11:56 dijit oh he left.
11:57 XenophonF guest1: on www.saltstack.com, i guess?
11:57 XenophonF there's a webinar on saltstack enterprise coming up soon
11:57 XenophonF iirc there's a signup form
11:58 phx XenophonF, i could never find the actual difference, just marketing bullshit
11:58 XenophonF same
11:58 phx something like a datasheet or something would be nice to have on the website
11:58 XenophonF i mean, practically speaking, it's their masters plus their web ui
11:58 XenophonF it'd be nice if there were screenshots at least
12:00 kbaikov joined #salt
12:02 MadsRC What's the different between "salt 'host1' pillar.items" on the master and on host1: salt-call --local pillar.items ? They do not return the same data.
12:04 monkey661 joined #salt
12:04 claytron_ joined #salt
12:05 Norrland MadsRC: with --local I'm most certain that the minion will use local pillar_roots. So unless you have them specified it wont show up as much.
12:05 MadsRC Ah okay, haven't actually tried with --local on the minion... Let me try that :D
12:06 MadsRC Soz, salt-call pillar.items is identical to the one on the master
12:06 XenophonF onovy: maybe a file:// URI will work in that case?  check the file.managed docs to be certain
12:07 hvn joined #salt
12:10 napsterX joined #salt
12:18 jaybocc2 joined #salt
12:19 cachedout joined #salt
12:20 wnkz joined #salt
12:21 big_area joined #salt
12:27 calvinh joined #salt
12:27 CeBe1 joined #salt
12:30 dthom91 joined #salt
12:31 funzo joined #salt
12:32 rgarcia_ joined #salt
12:34 jaybocc2 joined #salt
12:35 dthom91 joined #salt
12:35 amcorreia__ joined #salt
12:37 scristian joined #salt
12:37 yomilk joined #salt
12:38 onovy XenophonF, according to docs, it's not supported
12:39 XenophonF ah too bad
12:41 Norrland babilen: ok, seems like the issue with 2015.5.2 -> 2015.5.3 isn't isolated to AWS built images. Just experienced the same issue (salt-minion dies, dpkg was interrupted). Running an minion in vagrant with 'debian/jessie64' image.
12:41 fii joined #salt
12:42 fii Morning/Afternoon All
12:42 duendecat joined #salt
12:44 babilen Norrland: I wonder if it is related to https://github.com/saltstack/salt/issues/26314
12:44 saltstackbot [#26314]title: salt-ssh  pkg.install salt-minion fail | ![image](https://cloud.githubusercontent.com/assets/6895983/9270348/a4e1afde-42a3-11e5-9dbb-ce260417febb.png)...
12:44 babilen (and therefore not really related to the packaging, but rather to pkg.install)
12:45 fii Trying to install an AWS instance but getting this
12:45 fii http://pastebin.com/xMPjt53N
12:45 fii Wondering if anyone can help please us please
12:46 dyasny joined #salt
12:46 jdesilet joined #salt
12:46 claytron_ joined #salt
12:47 Norrland babilen: hm, could be.
12:53 subsignal joined #salt
12:54 segfault_ joined #salt
12:57 Guest83895 Hello. I am trying to add an existing user to a group using saltstack. In the user.sls I added the group name to the list of groups, but this doesn't seem to do anything. If I manually add the user to the group the group membership is actually removed when I run state.highstate. How do I add an existing user to an existing group?
12:58 Shirkdog joined #salt
12:58 breakingmatter joined #salt
13:00 kbaikov joined #salt
13:01 AndreasLutro Guest83895: can you show us user.sls?
13:01 AndreasLutro fii: what version of salt?
13:02 Guest83895 AndreasLutro: Sure, one moment please
13:02 Guest83895 AndreasLutro: Here: http://hastebin.com/ujukecoquq
13:03 AndreasLutro looks correct!
13:03 Guest83895 I added "new_group" to the list, ran "salt <minion> state.highstate" but nothing seems to happen
13:04 fii AndreasLutro: http://pastebin.com/38adqXML
13:04 fii thanks
13:04 malinoff joined #salt
13:04 Guest83895 Then I tried logging on to the server and adding the user to the group manually (usermod -a -G new_group joe), but at the next state.highstate the user was removed from the group
13:04 AndreasLutro fii: probably want to create a github issue for that then, or look for an existing one
13:05 sectionme joined #salt
13:05 AndreasLutro Guest83895: stupid question but are you sure the .sls is getting saved?
13:05 fii AndreasLutro: Cool. Nothing wrong with the version then ?
13:05 AndreasLutro fii: nah, you're on the latest stable version, just wanted to make sure you weren't on an old one
13:05 fii Cheers
13:05 Guest83895 absolutely. I am using a gitfs backend, and I tried changing some other files to make sure it was working.
13:07 AndreasLutro seems unlikely to be a caching issue then, but you could try clearing /var/cache/salt for good measure
13:07 AndreasLutro the other thing that comes to mind is if there's duplicate user.sls states
13:07 AndreasLutro there's nothing wrong in the sls you pasted here in any case
13:08 Guest83895 I did clear the cache, but I haven't been looking for duplicates, good idea
13:08 hvn joined #salt
13:08 hvn joined #salt
13:08 _JZ_ joined #salt
13:08 nyx_ joined #salt
13:08 calvinh joined #salt
13:09 pm90_ joined #salt
13:10 fredvd joined #salt
13:13 dthom91 joined #salt
13:13 Guest83895 AndreasLutro: Ah, you're right. There's a duplicate here, someone put the user definition in the init.sls
13:14 Guest83895 Thank you for your help, this would have taken me hours to figure out!
13:15 lmaoayy left #salt
13:17 Akhter joined #salt
13:18 DammitJim joined #salt
13:20 AndreasLutro Guest19676: no problem :)
13:23 impi joined #salt
13:26 otter768 joined #salt
13:28 claytron_ joined #salt
13:31 fii AndreasLutro: With a bit a bit of googling I managed to fix it. Need to spend more time reading the docs. Thanks
13:31 dthom91 joined #salt
13:32 AndreasLutro fii: oh? I think you should report an issue regardless, because that error message is clearly quite cryptic
13:32 funzo joined #salt
13:33 fii AndreasLutro: Sure
13:34 jim__ joined #salt
13:37 dthom91 joined #salt
13:39 dalom joined #salt
13:41 murrdoc joined #salt
13:41 murrdoc how do u guys watch jobs
13:41 murrdoc watch -n 60 "salt-run jobs.print_job <jid>" is ugly output
13:43 murrdoc ah runner doesnt pass in outputter
13:43 murrdoc weak SAUCE
13:45 timoguin joined #salt
13:45 revjim joined #salt
13:46 monkey66 joined #salt
13:47 scoates joined #salt
13:47 revjim hi there. I'm new to Salt (have used Ansible in limited ways in the past). I'm trying to figure out the best way to update nginx configuration on mutiple hosts. I can see how to do this for one file, but it starts to get cloudy when I have a recursive directory filled with files that need to be updated on each host. Is there a module that does this that I'm missing?
13:48 babilen revjim: I would recommend to use generic states that take pillars as input and then provide a suitable pillar for each host. That way you don't have to tinker with states *and* data, but only ensure that the data is correct.
13:49 babilen States, or rather collections of such states, are called formulas and you find the one for nginx on https://github.com/saltstack-formulas/nginx-formula/
13:49 revjim looking now.
13:49 murrdoc good call babilen
13:49 murrdoc we really need to split out nginx-ng from that formula
13:49 murrdoc is high entry point
13:50 babilen https://github.com/saltstack-formulas/nginx-formula/blob/master/pillar.example exemplifies the configuration, but I have, as of now, no clear understanding as to which part belongs to the "ng" formula and which doesn't
13:52 revjim babilen: in this (https://github.com/saltstack-formulas/nginx-formula/blob/master/nginx/common.sls) what do lines 38-39 do?
13:52 SheetiS Yeah the ng formula should really completely be its own entity.  We're probably getting to the point now I'd think where deprecating the non-ng formula might also start making sense.  Of the 2, it seems the most 'dirty' and 'next generation' is now more really current practice.
13:52 bhosmer joined #salt
13:53 SheetiS revjim: it makes sure that the configuration folder exists to place the file in.
13:53 revjim ahhhh!
13:53 SheetiS Require the configuration folder state is run before the configuration file.
13:55 revjim If I'm reading this correctly, these forumulas establish an nginx server using boilerplate config (however the config has been reduced to one file, instead of multiple files, which is less readable). It does not, however, handle the config for each of the sites.
13:55 rdutch joined #salt
13:55 cpowell joined #salt
13:56 bhosmer joined #salt
13:56 dthom91 joined #salt
13:56 AndreasLutro revjim: if you want multiple config files, simply either add more file.managed states or use file.recurse
13:57 revjim file.recurse... let me look at that. thank you.
13:57 andrew_v joined #salt
13:57 babilen AndreasLutro: I was just arguing that that becomes messy if you have to manage a large number of different boxes
13:57 babilen revjim: Oh, so your problem wasn't with file.recurse ?
13:58 kaptk2 joined #salt
13:58 revjim i'm only seeing file.copy with a "recurse" option. (http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html) is this what you meant?
13:59 sectionm1 joined #salt
13:59 zwi joined #salt
13:59 AndreasLutro revjim: look in states, not modules
14:00 markm joined #salt
14:01 revjim I might be confused as to the difference between a "state" and a "module". But I found the states documentation for "file" and it looks like it might do what I want. I'm going to give it a go.
14:02 murrdoc a state is a defined module function call
14:02 timoguin joined #salt
14:02 murrdoc a state in jinja, yaml, pydsl and other such renderers is basically aclling state functions which wrap module functions
14:03 murrdoc for example state file.managed calls modules file.managed but along with it uses other modules to check hashes
14:04 evilrob joined #salt
14:04 khaije1 joined #salt
14:05 revjim murrdoc: ah. that makes sense.
14:05 revjim AndreasLutro: in file.recurse, the docs aren't making it clear if files are deleted. if a file exists on the minion, but not in the source directory, will it be removed?
14:05 AndreasLutro revjim: depends on the "clean" arg
14:05 revjim AndreasLutro: looking again.
14:06 VR-Jack-Zzzz Well, the rabbitmq-formula fix annoyed me, so https://github.com/saltstack-formulas/rabbitmq-formula/pull/28
14:06 saltstackbot [#28]title: Proper fix for https://github.com/saltstack-formulas/rabbitmq-formula/issues/20#event-382259981 | Previous bug fix broke things by moving the jinja import. It also did nothing to fix runs that didn't use .latest. This fix should fix both rabbitmq and rabbitmq.latest as well as revert the jinja import move.
14:06 kukacz joined #salt
14:06 murrdoc vr-jack, working hard while still in ZZZ
14:06 khaije1 i'd like to scan a systems for any files matching a list of hashes ... is there an especially clever way to do this w/ salt ?
14:07 VR-Jack-Zzzz murrdoc: yeah. still not done with 2nd cup of coffee. lol
14:07 AndreasLutro khaije1: I'd just go with a cmd.run/script
14:07 khaije1 I see the salt.module.file.check_hash() functionbut not sure how to load it up with lists to make it quick
14:07 revjim AndreasLutro: ok. I think I got this now.
14:07 revjim AndreasLutro, murrdoc, babilen: you have all been very helpful. Thank you.
14:07 murrdoc VR-Jack:  merged
14:07 khaije1 Hii AndreasLutro, thats what I was thinking just wanted to check and see first
14:08 VR-Jack revjim: I believe there's an extra option to delete extra files
14:08 icflournoy joined #salt
14:08 lothiraldan joined #salt
14:08 sectionme joined #salt
14:08 babilen Yeah, "clean"
14:08 VR-Jack ^^
14:09 VR-Jack murrdoc: do you run that? I don't, so I didn't actually test it. lol
14:09 murrdoc clean is dangerous
14:09 murrdoc remember to 'require' all files that u want to stay in the directory
14:09 babilen revjim: Doesn't https://github.com/saltstack-formulas/nginx-formula/blob/master/pillar.example#L67 (and so on) do what you want?
14:09 VR-Jack but syntax looks right, and I know includes work that way
14:12 VR-Jack python dev team needs to strangle themselves. iteritems, items, viewitems. bah
14:12 babilen Which is why we have Python3 these days
14:13 sectionm1 joined #salt
14:13 revjim babilen: it might. my nginx configuration is more complicated than the basic one described there. So I'd have to rewrite my configuration in this YAML format, which seems doable but I'm not sure I understand the benefit of doing so.
14:15 babilen revjim: Right, well, it *really* depends. From a purely salt perspective I typically prefer to use very generic states that are then driven by data provided in the form of pillars. The users formula is a good example of that.
14:15 VR-Jack babilen: yeah, except they moved iteritems w/ change of functionality to items then backported it to 2.7 as viewitems. So code that is trying to work on multiple python versions has to deal with that mess.
14:16 babilen revjim: https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example allows you to target "- users" to all your boxes and it would only actually do something if you also target suitable pillars to them. That way the whole "which box does which" question is primarily handled in the pillar (or rather not in *both* the pillar and states)
14:17 murrdoc VR-Jack:  u better check it mang, dont get me heat
14:17 VR-Jack revjim: sometimes I don't bother with the formulas. Sometimes I do file.managed, import my base config with a jinja template to set what few variables I want. Just depends on needs.
14:17 babilen In particular if you require different configuration on different minions this approach is nice .. if all you want is to copy a directory to all (or a subset) of minions, then file.recurse is the logical and best choice.
14:18 VR-Jack murrdoc: lol. the last merge was bad. that import move broke it.
14:18 VR-Jack Mine can't be worse
14:18 revjim babilen: your first response to me is making more sense now, and I see what you're saying
14:18 VR-Jack yeah, different options depending on what ya need
14:18 bluenemo joined #salt
14:19 revjim babilen: I'm thinking, at least for this first go round where I'm not really using salt for EVERYTHING, just this one task as an introduction, having a single config file with a few jinja templating options will be easier, get the job done, and get the management I'm looking for.
14:19 jngd joined #salt
14:19 sectionme joined #salt
14:19 babilen revjim: I read your initial "starts to get cloudy when I have a recursive directory filled with files that need to be updated on each host" as "I can no longer deal with the horrible if minion.id == 'foo' elif minion.id == .... malarky to tell salt which files go where."
14:19 VR-Jack definitely. start small and build yourself up
14:20 jngd joined #salt
14:20 revjim babilen: ah... no... I'm not experienced enough with salt to have that issue yet.
14:21 hoonetorg joined #salt
14:21 bhosmer joined #salt
14:21 babilen Looks as if file.recurse (maybe with a little templating and a few pillar references) are the perfect choice.
14:22 revjim babilen: awesome. now to figure out how to install salt on my actual boxes instead of the vagrants I spun up.
14:22 revjim thank you, again, for being so very helpful.
14:23 quasiben joined #salt
14:24 jaybocc2 joined #salt
14:27 kawa2014 joined #salt
14:28 babilen revjim: Use https://github.com/saltstack-formulas/salt-formula/ ;)
14:28 revjim babilen: now this is just crazy talk. :)
14:31 Akhter Hey guys, is salt-call integrated into salt now?  I'm trying to find python modules for __salt__['call'] but I don't know if it's just __salt__ now.
14:33 funzo joined #salt
14:34 Akhter Never mind, I found my answer.
14:34 revjim babilen: I'm going to spin up two production like boxes and see if salting itself doesn't explode things. because... that would be nice.
14:34 babilen revjim: I use the salt-formula on all my boxes
14:35 revjim babilen: it looks like, for the master, I still have to do a regular install, right?
14:35 revjim babilen: which is easy enough.
14:35 revjim babilen: I guess I could salt another master from a master. hahah. so recursive. I love it.
14:37 babilen revjim: You would install a minion on your master. And yes, my masters salt themselves. You naturally need a "bootstraping" configuration that you can either roll out manually, via salt-ssh or as part of your initial VM spinup procedure.
14:38 jngd joined #salt
14:39 revjim_ joined #salt
14:42 revjim with ansible, most people run the develop version from git, even in production. is it the same with salt?
14:42 SheetiS some do
14:43 dopesong joined #salt
14:43 SheetiS others use os packaged versions.  Others do latest stable from git.  Seems to be quite varied around here to be honest.
14:43 revjim fair enough. I'll go with git develop until I have issues. :)
14:43 pfallenop joined #salt
14:44 ajw0100 joined #salt
14:44 murrdoc revjim:  dont do it man
14:44 murrdoc https://github.com/saltstack/salt-bootstrap
14:45 revjim murrdoc: that's the page I'm on. and the very first example shows it being installed from git develop. :)
14:46 murrdoc git v2014.5.5
14:47 murrdoc save your self
14:47 murrdoc once u taste that develop
14:47 murrdoc its like crack man
14:47 murrdoc :) totally kidding
14:47 revjim murrdoc: hahahaha.
14:48 murrdoc welcome to the community
14:48 murrdoc have fun
14:48 murrdoc hit up iggy for all things wtf
14:48 murrdoc babilen:  and forrest too
14:48 mpanetta joined #salt
14:48 revjim murrdoc: thank you. babilen has already been incredibly helpful.
14:49 murrdoc dont mention it too much
14:49 murrdoc it ll go to his brains
14:50 * babilen laughs
14:51 benvon joined #salt
14:51 tedski joined #salt
14:52 zmalone joined #salt
14:56 sectionm1 joined #salt
14:57 revjim babilen: I bootstrapped the master, I added salt-formula to the gitfs_remotes. I'm assuming salt-ssh will connect to my not-yet-minion and minionize it?
14:57 jalbretsen joined #salt
14:58 dthom91 joined #salt
14:58 DammitJim joined #salt
14:58 teryx510 joined #salt
14:59 revjim babilen: ah. found this. I think this will get me going (https://github.com/saltstack-formulas/salt-formula/issues/18)
14:59 saltstackbot [#18]title: Not obvious how to use it | I'm new to Salt. I've read the documentation fairly extensively but without a "here's how to run this" in the `README.md` I'm unlikely to have time to figure out how to use this, even though I would really like to....
14:59 babilen revjim: Sorry, need to concentrate right now .. salt-ssh is essentially only a way to execute salt on boxes that don't run a minion, but to which you can connect via SSH. Most people I know simply run the bootstrap script ...
15:00 revjim babilen: no worries. thank you!
15:00 Brew joined #salt
15:00 sdm24 joined #salt
15:00 babilen One thing I would recommend is not to reference github formulas directly via gitfs_remotes as that constitutes a *massive* security issue (you are essentially giving everyone that can commit there root on your infrastructure)
15:01 revjim babilen: yeah. they cautioned against that but I did it anyway as a quick start with a note to fork the repo when I actually make this real.
15:02 babilen sure
15:02 icflournoy joined #salt
15:02 babilen (just wanted to make that absolutely obvious)
15:02 murrdoc so caring
15:03 babilen We simply install salt during our VM creation and then kick of a highstate with startup_states in the minion config (part of which configured the minion itself)
15:05 revjim babilen: which makes sense and is absolutely what I would do in the future. I have an installed base of about 100 boxes right now though. If I get this working, it'll be affecting about 20 of them. I will likely build a new salt bootstrapped image and then recreate the 20 boxes. But, I thought, hey, if I can do something to minionize them without having to manually bootstrap, then, cool! :)
15:14 claytron_ joined #salt
15:15 bhosmer joined #salt
15:18 xf10e joined #salt
15:18 xf10e tzag *
15:19 xf10e does anyone know what's the current state of Beryllium? will a PR from today still make it?
15:20 iggy XenophonF: git commit url?
15:21 sectionme joined #salt
15:22 jngd joined #salt
15:24 hvn joined #salt
15:26 dthom91 joined #salt
15:26 gladiatr joined #salt
15:26 gladiatr left #salt
15:27 otter768 joined #salt
15:29 kermit joined #salt
15:29 dezertol joined #salt
15:31 whytewolf xf10e: Beryllium  is still in RC [rc3 i believe.]
15:32 scoates anyone know if the tests will run on OS X? (also, the testing document is out of date /-: )
15:33 xf10e whytewolf: then we may get #26210 fixed for 2015.8 ;)
15:33 jngd joined #salt
15:33 funzo joined #salt
15:38 xf10e wow, my first PR not failing on jenkins' pylint..
15:39 hoonetorg joined #salt
15:41 tedski joined #salt
15:43 zarcos joined #salt
15:43 jeadr joined #salt
15:44 zarcos Quick question about the Events Sytem in salt. I'm using the Reactor on the Master, and it's awesome. It also looks like it's possible to send and get events on the minion in Salt (using custom python). Does the reactor system work on minions? The docs aren't really clear on this.
15:44 zsoftich2 joined #salt
15:45 AndreasLutro joined #salt
15:50 iggy zarcos: nope
15:50 iggy zarcos: there's a bug open about it
15:51 zarcos That's good to know!
15:51 vando left #salt
15:52 zarcos For my particular case, it probably wont' be a big deal. I need to do like, one event based thing on the minion, so writing a short script to do it won't be much more work than tying into the events system.
15:52 sectionm1 joined #salt
15:54 pm90__ joined #salt
15:54 iggy there are beacons that you can use to send events from a minion to the master and then have the master do most anything on the minion
15:57 zarcos Originally I was going to do that, but the process could potentially take a long time to complete.
15:58 claytron_ joined #salt
15:58 zarcos I didn't want to tie up worker threads on the master waiting for a long running request to finish on the minion.
15:59 zarcos There are tools in Salt that let me do what I need to without much fuss, but it's really something that would benefit from events if it were easy.
16:00 iggy well, they are the roadmap, it's just a matter of when
16:00 iggy the bug has more info
16:01 zarcos Yep! I found it, thanks for the pointer!
16:02 sectionme joined #salt
16:02 wendall911 joined #salt
16:04 troyready joined #salt
16:05 SheetiS joined #salt
16:05 Bryson joined #salt
16:11 Grokzen joined #salt
16:14 XenophonF iggy: nvm i figured it out
16:15 druonysus joined #salt
16:17 shaggy_surfer joined #salt
16:18 sectionme joined #salt
16:18 dthom91 joined #salt
16:19 irctc427 joined #salt
16:20 hasues joined #salt
16:20 hasues left #salt
16:20 bhosmer_ joined #salt
16:20 shaggy_surfer joined #salt
16:21 irctc427 hello all, just out of curiosity, where do you stop using your provisioning system and start usning salt? mean, if you need a system that is running the minion, you had toinstall it via provisionig systems (in my example spacewalk).. now, why should i set the ssh keys up on salt instead of my provision software at installation time?
16:21 irctc427 maybe this is not the case for packages, as i want to keep them up to date and with my configuration well formed
16:22 irctc427 but for stuff like, ssh keys, users and so, i saw a lot of examples, but i can't find a reason for using salt over the provision system..
16:23 venu0336 joined #salt
16:23 irctc427 Am I wrong?
16:24 sdm24 One advantange with using SSH keys with salt is that, at least for me, I generate the keys on Salt using 'sshkeygen' run on the master, and then push out the priv and pub files to the minions. This allows me to easily add keys to other known hosts servers, or re-use keys if we need to rebuild a server
16:25 is_null hi all, any idea why pip.installed doesn't work on salt 2015.5 ? http://dpaste.com/35830SN
16:25 sdm24 Or with users, you can easily add/update a bunch of users to a bunch of machines
16:26 dezertol You can also use reactors to manage the keys.. if a new minion spins up and knocks on the door.. a preset salt grain can be verified and you can use a reactor to add the key
16:26 calvinh joined #salt
16:26 dezertol they demo'd it at the saltconf conference last spring..
16:26 iggy irctc427: use whatever works best for you
16:26 iggy salt is very pragmatic
16:27 irctc427 thanks all for your thought
16:27 irctc427 a lot of things to digest :P
16:27 irctc427 already.. :P
16:28 irctc427 going to check "reactors" as I'm new to salt and i complately ignore the emaning of.. at the moment :P
16:28 dezertol I found the learning curve to be a bit like the learning curve for vi .. it's straight up for a while.. but then it all makes sense..
16:29 jeadr joined #salt
16:32 sdm24 well said
16:32 sdm24 thats why I use nano /runs
16:33 iggy I like atom lately... it's the only non-masochistic editor I've found that has salt syntax highlighting
16:34 zarcos is_null: Do you know if pip is already installed on the minion?
16:34 funzo joined #salt
16:35 dezertol I started with vi in 96 ..  back then linux was a single floppy and any other editor was jsut to big.. so I sorta "had" to learn vi.. and I've just never switched
16:36 dezertol o.. the days of building a kernel small enough to fit on a floppy
16:36 zarcos I've started using vim for real only in the last year. I used nano before that because it was easy, but vim has been a lifesaver when everything I do is in the console on remote boxes!
16:36 dezertol same here..
16:36 dezertol that is.. everything I do is on remote boxes
16:38 xf10e my prototyping of salt-stuff is local with my workstation as master for a bunch of VMs - but almost everything else is remote
16:38 claytron_ joined #salt
16:38 UtahDave joined #salt
16:39 dezertol I've got a fairly elaborate kvm-quemu env that I can do whatever I want with.. so all my testing and junk happens there
16:39 dezertol s/quemu/qemu/g
16:40 dezertol keep waiting for libvirt to get fully supported with salt-cloud/libcloud..
16:40 dezertol but I might just convert over to openstack or something else..
16:40 sorta joined #salt
16:41 lexter joined #salt
16:41 zarcos Yeah, I was just thinking about how I wished I could use salt-cloud in a local vm based cluster on my workstation, but I haven't looked very hard either.
16:41 duendecat joined #salt
16:41 xf10e OpenStack is a horrible, horrible mess... if you don't have to don't touch it before their release names rollover and start with A again...
16:41 dezertol I was getting that impression.. which is why I've not done anything yet..
16:42 dezertol I love how great salt-cloud works with my aws instances..
16:42 dezertol just which I could do that locally ..
16:42 zarcos Salt-cloud has let me float well above most of the ugliness, but I also don't have to implement like... any of it, just consume the API.
16:42 * xf10e "moves stuff to SaltStack, has to deal with OpenStack [...]" ;)
16:42 aparsons joined #salt
16:42 duendecat joined #salt
16:43 xf10e zarcos, I'm working on a formula to deploy the whole mess ;)
16:43 pfallenop joined #salt
16:44 zarcos Relying on salt-cloud let me port all our junk to AWS for testing in about 1 week, basically all by myself. Stuck with our OpenStack provider for now, but it's really really nice to know how easy it will be to switch when/if we need to.
16:44 zarcos That sounds awesome xf10e!
16:45 xf10e only until you've taken a look at https://github.com/fraunhoferfokus/openstack-formula ...
16:45 duendecat joined #salt
16:46 writtenoff joined #salt
16:46 sorta left #salt
16:46 zarcos is_null: did you get your problem solved with pip.installed?
16:50 xf10e but the nice thing about the openstack-formula is that I had a good excuse to get my salt-stuff on github
16:50 pm90_ joined #salt
16:51 pcdummy joined #salt
16:52 sdm24 I just uploaded my states and changed the sensitive info. I should update all of my states to be properly organized, but I just changed all the sensitive info to 'example.com' because I'm lazy
16:52 capricorn_1 joined #salt
16:53 xf10e sdm24: that's why I try to build _any_ state around input-data from pillar ;)
16:54 xf10e have a nive weekend everyone
16:54 sdm24 xf10e: for my situation, most things are largely static or can be done with grains
16:54 sdm24 you too
16:55 pfallenop joined #salt
16:57 KyleG joined #salt
16:57 KyleG joined #salt
17:00 Ludo- joined #salt
17:03 breakingmatter joined #salt
17:08 duendecat joined #salt
17:08 phw joined #salt
17:09 phw How can Imake this self-explaining twoliner work:
17:09 phw {% set good_kernel_pkg_name = 'kernel-'+ good_kernel_version %}
17:09 phw {% if salt.pkg.installed({{ good_kernel_pkg_name }}) %}
17:09 phw (then afterwards do stuff)
17:09 ageorgop joined #salt
17:10 iggy {{ }} insdie jinja tags is unnecessary
17:10 phw iggy: but then I get the error, that " Jinja variable 'collections.OrderedDict object' has no attribute 'installed"
17:11 iggy because the pkg module (at least aptpkg) doesn't have an installed function
17:12 phw iggy: ah okay, as i is a yum based installation this should work (i already use this elsewhere, although without a variable)
17:12 iggy there is not an installed function in yumpkg either
17:12 sdm24 yumpkg is also "install"
17:12 sdm24 yep
17:12 iggy I suggest you look at the other place this worked more closely
17:13 ekristen joined #salt
17:13 phw http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed but isnt that there?
17:13 sdm24 thats a state, not an execution module
17:13 iggy that's a state
17:13 sdm24 when you use salt.something, or salt['something'], thats an execution module
17:13 AndreasLutro phw: I imagine you can use pkg.version
17:13 AndreasLutro it'll return None or empty string if it's not installed
17:14 phw smd: oooohhhh.....
17:14 iggy what AndreasLutro said... pkg.version is likely your best bet
17:14 phw so using "salt.pkg.version should be good, right?
17:15 sdm24 yeah, salt.pkg.version(good_kernel_pkg_name)
17:15 dthom91 joined #salt
17:15 sdm24 you can't have jinja inside jinja
17:15 sdm24 eg {% if {{ this }} %} is bad
17:15 phw okay, very cool thank you very much
17:16 phw yeah, i am still getting used to that syntax...
17:16 Gareth o/
17:16 iggy {% if salt.pkg.version('linux-image-amd64') %} <- would work on debian
17:16 phw thanks for helping me out so much, you guys are awesome
17:16 iggy just find the right pkg name for yum
17:16 linjan_ joined #salt
17:16 sdm24 yeah no problem, it stumped me a while trying to work around it. I have one state where I have 3 different {% set %} because each part is masked around different quotes
17:16 iggy sdm24: you actually can... it's just redundant and silly
17:16 phw i am using the name with version specifier as I have to check wheater a specific kernel is installed or not
17:16 sdm24 really? I've never had it work when I tried
17:17 iggy {% if salt.pkg.version('linux-image-amd64') == good_ver %} <- would work on debian
17:17 iggy {% if good_sub_ver in salt.pkg.version('linux-image-amd64') %} <- would also work on debian
17:18 phw i am on centos and this should work hthere too
17:18 phw good point! could be multiple ones installed
17:18 iggy where good_sub_ver is something like 3.16+63~bpo
17:18 iggy and the full version would be 3.16+63~bpo70+1
17:19 iggy so you'd get everything bpo*
17:19 duendecat joined #salt
17:19 iggy or {% if salt.pkg.version('linux-image-amd64') in ['3.16+63~bpo70+1', '3.16+63~bpo70+2', '3.16+63~bpo70+3'] %}
17:19 forrest joined #salt
17:23 krymzon joined #salt
17:23 claytron_ joined #salt
17:24 SheetiS joined #salt
17:28 otter768 joined #salt
17:31 zmalone joined #salt
17:31 phw are includes only formulas or can i also create a "variables" file that is included by other files? (in my case i need the kernel version in two different files)
17:34 iggy you could do it with jinja (include/import/load_*/etc)
17:34 murrdoc #ssceapproved
17:34 iggy see map.jinja in all the formulas for an example
17:35 funzo joined #salt
17:35 kukacz joined #salt
17:38 phw oh wow, very very nice!
17:39 [dee] any good resources for someone coming from puppet? using salt at the new job next month
17:39 murrdoc uh python
17:39 iggy I think there's something on ryan lane's blog
17:39 murrdoc no state=pre
17:39 dthom91 joined #salt
17:39 [dee] iggy: cool ill check it out
17:39 murrdoc all execution is ordered unless u change it with requires
17:40 murrdoc formulas are what puppet used to do with 'types'
17:40 murrdoc what else
17:40 forrest [dee]: I still have this issue open: https://github.com/saltstack/salt/issues/14397, but I'd suggest to just go through this: http://docs.saltstack.com/en/getstarted/
17:40 saltstackbot [#14397]title: Create tutorials which explain moving to Salt from Puppet/Chef | I'm pretty sure this is something that has been explained in-depth multiple times by members of the Salt team during presentations, but it doesn't exist anywhere as actual documentation. This would be  pretty handy to have as it would skip some of the basics and instead focus on mapping of ideas to reduce the learning curve.
17:40 murrdoc jinja and yaml is dsl
17:40 forrest [dee]: I haven't touched puppet in about 3 years now, so I don't know what it currently looks like
17:41 forrest on that note, more companies need to switch from chef to salt
17:41 forrest People keep hitting me up for their chef jobs
17:41 forrest and I look at the syntax, and vomit spews from my eyes.
17:41 SheetiS Eye puke is nasty!
17:43 [dee] forrest: hahah
17:43 [dee] thanks for the links ill check them out
17:44 baweaver joined #salt
17:44 forrest [dee]: For sure.
17:44 [dee] +1'd your issue
17:45 forrest [dee]: Can you do me a favor? If you see any confusing/problematic stuff could you please create an issue notating that here: https://github.com/saltstack/salt/issues/ New user feedback is extremely important to us, and your opinion if you find anything confusing or poorly explained would be helpful
17:45 baweaver joined #salt
17:45 forrest Also thanks for the +1
17:45 [dee] definitely
17:45 [dee] i think my new coworker has given a few talks on salt too
17:46 iggy [dee]: where you going?
17:46 [dee] myfitnesspal
17:46 [dee] (under armour)
17:46 iggy oh, cool, I wasn't aware they were salty
17:46 [dee] http://www.meetup.com/Salt-Stack-DevOps/events/222542504/
17:47 [dee] uber is rolling out salt too
17:47 duendecat joined #salt
17:49 iggy they must have heard that I only use lyft because of ryan lane
17:50 forrest I thought you used lyft because they weren't as bad as uber /troll
17:52 forrest [dee]: I don't see slides up anywhere for that presentation, could you ask Bo to upload them somewhere when you start?
17:52 [dee] sure
17:52 honestly i was looking at ansible for a reason to go with salt instead and haven't found one...
17:52 Ryan_Lane scoates: lots of modules need to be fixed for this btw :)
17:53 Ryan_Lane scoates: for instance, some require vpc subnets
17:53 scoates heh. I feared (-:
17:53 Ryan_Lane the subnet are harder
17:53 Ryan_Lane since how do you look them up? I guess you can name tag the subnets, then reference them by name?
17:53 scoates vpc_name + cidr should be specific enough, no?
17:53 forrest honestly: not using SSH isn't enough for you?
17:54 lothiraldan joined #salt
17:54 Ryan_Lane scoates: I don't think that's how it works. you need to give it subnet ids
17:54 forrest honestly: Ansible is good for remote execution, I think their config management is pretty lacking (last time I looked was probably 3 months ago)
17:54 forrest honestly: Use ansible to run salt if you run masterless minions ;)
17:54 scoates Ryan_Lane: right; I meant (and I could be mistaken) that you can get a subnet_id from vpc_name + CIDR
17:54 Ryan_Lane honestly: http://ryandlane.com/blog/2014/08/04/moving-away-from-puppet-saltstack-or-ansible/
17:54 VR-Jack or you can let the power of Ryan Lane convince you as many here have.
17:55 [dee] Ryan_Lane: i sent my resume into lyft and they thanked me and said they're not moving forward lol
17:55 Ryan_Lane honestly: http://ryandlane.com/blog/2015/04/02/saltconf15-masterless-saltstack-at-scale-talk-and-slides/ http://ryandlane.com/blog/2014/08/26/saltstack-masterless-bootstrapping/
17:56 Ryan_Lane [dee]: really? can you pm me?
17:56 [dee] well i already took another job
17:56 Ryan_Lane -_-
17:56 zmalone joined #salt
17:56 iggy uber said they were hiring
17:56 [dee] i was talking to my friend carlos whitt this weekend.. he said hed push it through
17:56 Ryan_Lane I never saw your resume. I wonder who got it :(
17:56 * iggy trolls poorly
17:56 [dee] yeah uber offered me a job and then sent me a rejection
17:56 [dee] fuck those guys
17:56 forrest lol
17:56 [dee] 9 hours of wasted time
17:57 [dee] 2 onsites
17:57 forrest oh did you do one of those stupid onsites?
17:57 forrest Yeah I refuse to do those
17:57 iggy lol, better than an offer and then 2 months of background check
17:57 forrest If you want me to meet the team to make sure we gel, sure
17:57 [dee] they had a bar raiser who was a douchebag
17:57 [dee] hi "i'm the bar raiser"
17:57 forrest If you want to waste my time in a conference room coding on a whiteboard WITHOUT THE INTERNET LIKE I WOULD HAVE EVERY OTHER DAY
17:57 forrest then please, gtfo
17:57 Gareth a bar raiser?
17:57 [dee] yeah it's a amazon thing
17:58 forrest Gareth: Bar raisers are skilled evaluators who, while holding full-time jobs at the company in a range of departments, play a crucial role in Amazon's hiring process, interviewing job candidates in other parts of the company.
17:58 forrest Sounds awful
17:58 Gareth forrest: yeah. just found the same thing via Google :)
17:58 forrest Shocked every day Amazon has any employs left
17:58 forrest Gareth: Google fu go!
17:58 Gareth hah
17:58 VR-Jack My new test for hiring programmers. Pick an OSS project and ask them to fix X number of bugs.
17:58 murrdoc i need an intern bad for ci/cd
17:59 murrdoc has to be local to la
17:59 forrest iggy: Look man, Verizon wouldn't want you to be involved in any shady activities, when I think upstanding organizations that never do anything illegal or shady, I think Verizon, they have a standard to live up to okay?
17:59 iggy lol
17:59 VR-Jack Well, that rules iggy out
17:59 iggy double lol
17:59 honestly vr-jack that's terrible
18:00 forrest VR-Jack: That's not too bad if the project is really small. Asking someone to bust out some salt bugs if they weren't familiar would suck. I still have a hard time wrapping my brain around the code.
18:00 forrest Honestly just give homewokr
18:00 forrest *homework
18:00 murrdoc saltstack formulas need mad love
18:00 murrdoc only small percentage match the standard on template-formula
18:00 VR-Jack forrest: if I want a python programmer, salt is actually a great project. The code isn't stable, but the organization is good
18:00 scoates in fairness, the code would likely be easier to read without the dunders and other injections.
18:00 iggy especially for !debian (and some !centos)
18:01 honestly no fuck homework
18:01 forrest VR-Jack: I guess, that seems like a lot to ask
18:01 honestly unless you pay me
18:01 VR-Jack Considering I don't know python, I've had no trouble getting around the salt code base.
18:01 forrest honestly: I'd rather do homework than sit in a conference room for 8 hours.
18:01 Gareth forrest: +1
18:01 forrest honestly: I've never given a candidate something that takes more than 2 hours. Anything past that is ridiculous
18:01 Gareth forrest: sitting in a conference room and writing code on a white board.  ugh.
18:02 murrdoc HEY
18:02 forrest Gareth: Lol, you've been in a lot of conference rooms lately huh?
18:02 murrdoc i didnt want u to do that
18:02 VR-Jack Well, salt does have "low hanging fruit" hehe
18:02 forrest Gareth: I know man, it is the worst.
18:02 Gareth murrdoc: haha.
18:02 Gareth murrdoc: that wasn't too bad :)
18:02 murrdoc u were just so chill, Gareth peeps had no clue u could do what u do
18:02 forrest VR-Jack: I'd totally troll you and just do a bunch of documentation issues (since that's usually what I do anyways)
18:02 VR-Jack rofl
18:02 murrdoc also u live too far
18:02 Fiber^ joined #salt
18:02 murrdoc otherwise u d totally be in there
18:02 [dee] tech interviewing is messed up.... super stressful
18:02 forrest Gareth: I just don't get the point of the whiteboard stuff, seems antiquated.
18:03 iggy I didn't write anything on the white board
18:03 [dee] everyone asks you the same crappy questions they got from cracking the code interview
18:03 forrest iggy: Well, that's why you've been in limbo two months
18:03 whytewolf doing anything at the micro layer on a whiteboard for a job interview sucks.
18:03 * iggy smacks forrest
18:03 murrdoc damn forrest let the hate go
18:03 forrest ;P
18:03 forrest I don't hate iggy, how dare you murrdoc
18:03 Gareth murrdoc: yeah.  That was on my end.  seriously though, that drive every day would have killed me!
18:03 murrdoc the vz hate
18:03 Ac-town the only code I've ever had to do for a interview was before I was even there in person, it was over email
18:03 murrdoc yeah Gareth is all good man
18:03 forrest Gareth: That's why I've only been looking for remote, hate commuting
18:04 forrest murrdoc: That was like... 5 minutes ago.
18:04 Gareth forrest: I could see putting some code up with an issue, asking someone to point out the issue.  Maybe.  But writing code...no...doesn't make sense.
18:04 murrdoc forrest:  hows the weather in seattle
18:04 murrdoc does it rhyme with fit
18:04 forrest murrdoc: Overcast today, pretty nice out
18:04 murrdoc oh … i heard otherwise, my friend works at some travelling company
18:04 murrdoc expedia ?
18:04 forrest Gareth: I'm just tired of seeing Chef jobs, so many chef jobs. Look if you want to move from chef to salt, I'm all for it
18:05 iggy overcast = raining 23 hours?
18:05 sdm24 it was raining in north seattle earlier today
18:05 forrest murrdoc: Really? It's like 70 today
18:05 forrest iggy: It's only rained once in the last 10-15 days
18:05 Gareth forrest: Just take the Chef job and slowly replace it with Salt :)
18:05 Ac-town it rained a bit on saturday in seattle
18:05 forrest Gareth: I'd have to join with the expectation that would happen
18:05 whytewolf best homework i ever had was "here is the class we want to call, and a flow chart. build it. you have 8 hours. [was a date manipulation flow chart] they gave me 8 hours. so in that time i built it. and tests and documentation.
18:05 sdm24 ~30 minutes north of seattle, it sprinkled a couple days this week and then got sunny
18:05 murrdoc "yesterday was thunder storms"
18:05 VR-Jack Hmmm. Write hello world examples taking at least one argument and formatting the output in a table; in 10 different languages. Guess that might work.
18:05 murrdoc "changes by the hour."
18:05 forrest Ac-town, sdm24, ahh, yeah I only remember the rain from yesterday
18:06 Ac-town forrest: I don't live there but I was in town all last week
18:06 Ac-town thats why I only know last week lol
18:06 forrest Ac-town: Did it rain last week? Or are we talking 10 minutes of it spitting
18:06 Ac-town the latter
18:06 Ac-town "rain"
18:06 forrest Yeah
18:07 Ac-town i'm hoping for rain in portland today
18:07 Ac-town maybe some thunder and stuff too
18:07 forrest I remember that
18:08 claytron_ joined #salt
18:08 [dee] hope it rains this winter in SF
18:08 Gareth Send some of that rain down here.  We could use it. :)
18:08 Ac-town Gareth: we need it too
18:08 [dee] sounds like it will be rainy at burning man this year
18:09 Ac-town it's so dry up here i feel like a single spark can burn everything down
18:10 jeadr joined #salt
18:10 VR-Jack lol. I'm guessing jenkins died last night. My PR just restarted a build run
18:11 murrdoc your pr is broke
18:11 murrdoc u should feel bad
18:11 murrdoc slacker
18:11 pcdummy joined #salt
18:11 pcdummy joined #salt
18:11 VR-Jack my PR is perfect, thank you very much
18:11 quasiben joined #salt
18:11 forrest Ac-town: Do you live in Portland?
18:12 murrdoc can u review this VR-Jack https://github.com/saltstack-formulas/rabbitmq-formula/pull/29
18:12 saltstackbot [#29]title: Feature/declare queues | Replaces ...
18:12 Ac-town yep
18:12 murrdoc make sure it doesnt break your change
18:12 forrest Ac-town: Did you fly to Seattle or bus it?
18:12 Ac-town train
18:12 forrest Ac-town: How long was it
18:12 forrest PyCon is in Portland next year and I want to go
18:12 Ac-town a bit under 4hr
18:12 forrest ahh
18:12 Ac-town if you have the time to spare is nice and relaxing
18:12 Ac-town good views too
18:13 Ac-town s/is/it's/
18:13 forrest Ac-town: Yeah, it's like 50 bucks each way right?
18:14 Ac-town I did $88 for round trip last week
18:14 forrest That's not too bad
18:14 forrest I was looking at flights and it's about 130
18:14 Ac-town round trip?
18:14 VR-Jack murrdoc: breaks change. appears he didn't pull my changes before attempting
18:14 forrest Ac-town: Yup
18:14 Ac-town not too bad
18:14 forrest No not at all
18:14 VR-Jack ie, didn't register the rename of init.sls. but then that may be because I renamed and kept init.sls both
18:15 murrdoc VR-Jack:  leave a note
18:15 murrdoc mr oss for intereview
18:17 duendecat joined #salt
18:18 bhosmer_ joined #salt
18:18 solidsnack joined #salt
18:18 baweaver joined #salt
18:18 katyucha joined #salt
18:18 Ludo- murrdoc: if you find 2 of them in LA, send one my way :)
18:19 murrdoc Ludo-:  HA
18:19 murrdoc its rough man
18:19 honestly forrest: Something that can be done in two hours is fine, but "fix n bugs in $OSS project" is not that
18:19 murrdoc ci/cd devs are not found easily, all the good ones have jobs or dont want to move
18:21 murrdoc VR-Jack:  thnx
18:21 VR-Jack murrdoc: left a note
18:22 forrest honestly: Yeah
18:22 VR-Jack probably my fault. I was sure doing a git mv would make sure other changes would check and match to the new filename. *sigh*
18:23 VR-Jack Not really a git person. oh, well
18:23 jeffspeff joined #salt
18:23 honestly forrest: I  mean I have more than enough commits in open source projects, if that will get me a job I'm all for it
18:23 kukacz joined #salt
18:23 forrest honestly: I wish that was the case.
18:24 murrdoc VR-Jack:  i appreciate it man
18:24 murrdoc if it stinks iggy and forrest will choke u out
18:24 jeffspeff how can i get the version of a currently installed package? I want to use it in an if statement on a state.
18:24 murrdoc over irc
18:24 lothiraldan joined #salt
18:24 duendecat joined #salt
18:24 forrest murrdoc: I'm not so much for that, just like 'please fix this'
18:24 murrdoc jeffspeff:  {% set version = salt['pkg.version']('pkgname') %}
18:25 murrdoc ok forrest
18:25 jeffspeff thanks murrdoc :)
18:25 murrdoc VR-Jack:  if it stinks iggy awill choke u out, forrest will ask u to fix yo shit
18:25 cheus joined #salt
18:25 forrest heh
18:25 VR-Jack rofl
18:26 VR-Jack Well, the code is right. Just doesn't appear to be friendly for pending forks
18:26 [dee] forrest: bo's slides http://www.theaddedones.com/assets/saltstackmeetup/index.html#1
18:27 honestly To get back to my original topic (I was on the train and had bad connection), having a persistent agent running on every managed host, especially one that always has root privileges, is not an advantage of salt. I want minion less rather than master less
18:27 forrest [dee]: Thanks!
18:28 iggy honestly: salt-ssh?
18:28 forrest honestly: Use salt-ssh, or run salt under a different user?
18:28 iggy you can even mix them
18:28 dthom91 joined #salt
18:28 forrest yup
18:28 honestly Yeah I'd be using salt-ssh
18:29 gimpy2938 What's the best way to manage the ownership and perm of a file as well as make sure it has a specific line it?  https://gist.github.com/anonymous/c117f65009bf07346786
18:29 honestly forrest: Well you kinda need root privileges to manage servers, just not persistent
18:29 honestly Gimpy: file.append
18:29 murrdoc u dont
18:29 murrdoc salt does
18:29 murrdoc u can use salt-api let acls protect yo self
18:30 murrdoc feels good to turn off root access to the salt master
18:30 murrdoc feels good
18:30 honestly Heh
18:30 gimpy2938 honestly: That doesn't appear to have ownership and permision controls, just control the content of files
18:31 honestly gimpy2938: Use file.exists as well
18:31 iggy gimpy2938: file.managed doesn't require source/contents/etc
18:31 vando joined #salt
18:31 gimpy2938 honestly: How would that help?
18:32 honestly Well file.exists allows to specify owner and mode of the file doesn't it
18:32 gimpy2938 iggy: I know, the problem is it seems I need file.managed to control ownership and perms as well as file.append to get specific content without wiping out what else is in the file but it doesn't allow both to be used at once
18:33 gimpy2938 honestly: Not according to the docs
18:33 honestly It doesn't?
18:33 honestly Oh sorry I meant file.managed then
18:33 gimpy2938 ... and back to the root of the problem.
18:34 honestly You should definitely be able to use file.managed and file.append together
18:34 forrest You can't use it because it's in the same ID
18:34 forrest refresh the gist, I commented
18:34 sdm24 I'm not sure if you want to append then manage, or manage then append, but it should work
18:35 aparsons joined #salt
18:35 forrest Refreshhhh
18:35 sdm24 don't tell me what to do
18:35 forrest Okay
18:35 sdm24 (ty)
18:35 gimpy2938 hmm...unfortunate I can
18:36 funzo joined #salt
18:36 gimpy2938 ... can't say "in this ID is everything I want to do to that file" but instead have to split it up
18:36 iggy gimpy2938: give them unique IDs and use name
18:36 forrest gimpy2938: You can't because the ID has two file declarations, salt doesn't like that
18:36 forrest iggy: I already commented on the gist and gave them unique IDs and name declarations
18:36 iggy fancy
18:36 sdm24 IMHO, I prefer to break up each ID so that it is only 1 command. Makes it easier to determine exactly what is happening
18:37 * iggy wanders back to work
18:39 dthom91 joined #salt
18:40 Bryson joined #salt
18:42 duendecat joined #salt
18:42 aparsons joined #salt
18:46 pcdummy joined #salt
18:46 VR-Jack murrdoc: he's almost there.
18:51 zmalone joined #salt
18:52 solidsnack joined #salt
18:52 jeffspeff does only salt.modules.system exist? i can't find docs for salt.states.system.
18:53 jeffspeff does everyone just use module.run to use system?
18:53 sunkist joined #salt
18:54 claytron_ joined #salt
18:57 iggy jeffspeff: states are meant to be declarative
18:57 iggy running system commands isn't particularly declarative
18:58 SubOracle joined #salt
19:00 jeadr joined #salt
19:01 vando hello
19:01 icflournoy joined #salt
19:01 vando there is a way to refresh gitfs_remote?
19:02 ranomore left #salt
19:02 iggy restart the master
19:03 iggy wait
19:03 repl1cant sooooo, RAET
19:03 iggy do you mean refresh the setting or do an actual git pull?
19:03 repl1cant the master has to be able to make a direct connection to the minion? so if I have a minion nat'd behind a firewall I'd have to make create a bunch of port forwards?
19:04 SubOracle joined #salt
19:04 repl1cant make/create
19:04 iggy repl1cant: the minion connects to the master
19:04 scoates any of you launch instances from a salt state (not salt-cloud) ?
19:04 repl1cant i was looking at this thread: https://groups.google.com/forum/#!searchin/salt-users/raet/salt-users/wc4ZJYJ54Yw/iPGuDw-xhpoJ
19:05 rideh joined #salt
19:05 iggy scoates: there are cloud states
19:05 vando iggy: git pull because the master doesn't have the formulas
19:05 scoates iggy: I see, but it's unclear how they work from the doc. was hoping for some better examples.
19:05 iggy vando: salt-run fileserver.update
19:06 scoates http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cloud.html for example… is that YAML even properly formatted for salt states? (not a list…)
19:06 iggy vando: add -l debug if you're having issues (the fileserver should update every minute by default)
19:06 zmalone joined #salt
19:07 dthom91 joined #salt
19:07 vando iggy: thanks!
19:08 GreatSnoopy joined #salt
19:09 FeatherKing joined #salt
19:09 iggy scoates: no, looks like that state module was... "hastily" documented
19:10 scoates seems so (-:
19:11 FeatherKing are there any known issues with the salt master grain cache refreshing on 2015.5.0? i am setting grains and when i try to get them with a grains.get they dont show
19:12 iggy FeatherKing: with multi-master, yes
19:13 jeffspeff iggy, is there a better way to reboot a system as needed during a state file? the two ways i know of are using module.run to use system.reboot or using cmd.run and run the os' reboot command
19:14 FeatherKing iggy: is there any workaround?
19:14 FeatherKing we just added another master to try and solve some network issues
19:14 iggy FeatherKing: there's a bug open about it
19:15 iggy I don't know the exact state of things
19:15 FeatherKing ok i will look thx
19:15 hemphill joined #salt
19:15 iggy jeffspeff: the problem with rebooting during a state is that you run the risk of getting into a loop
19:16 iggy jeffspeff: that's why there's not a "standard" way of doing it
19:16 jeffspeff ok
19:16 iggy use whatever works best for your situation
19:17 ranomore joined #salt
19:18 scoates looks like that's supposed to be `profile: my-ec2-config` … but it's still not clear… /-:
19:18 breakingmatter joined #salt
19:18 scoates Ryan_Lane: you don't happen to launch your cloud instances via salt states, do you?
19:18 quasiben joined #salt
19:18 iggy please do file bugs
19:19 hemphill have the mount.mounted options recently changed?
19:19 scoates iggy: I know; I've sent two PRs just this week. At this point I need to actually get some work done…
19:20 iggy I hear that
19:20 aparsons joined #salt
19:25 pravka joined #salt
19:25 dingo lol
19:25 dingo i got 4 PR's in the most recent release changelog myself
19:25 dingo howy'all buggin today
19:25 dingo everybody do a rebuild and redeploy of salt this week too?
19:26 scoates so many yaks.
19:27 iggy takes 5 minutes to redeploy salt here
19:29 otter768 joined #salt
19:30 PredatorVI joined #salt
19:34 sk_0 i'm using jinja to write 'false' so a file but it's writing 'False' to the file. quoting "false" doesn't help.
19:35 duendecat joined #salt
19:35 troyready joined #salt
19:36 ingslovak joined #salt
19:36 iggy can you share the states that are causing it?
19:37 funzo joined #salt
19:37 Ryan_Lane scoates: I control everything through salt states
19:38 claytron_ joined #salt
19:38 scoates Ryan_Lane: any chance you could give me a working example cloud.profile state? the one in the docs is broken.
19:38 Ryan_Lane I don't use salt-cloud
19:38 sk_0 i do a jist. one min
19:38 Ryan_Lane every instance I launch is in an autoscale group
19:39 * scoates nods
19:39 zer0def joined #salt
19:39 Ryan_Lane scoates: here's a somewhat outdated example
19:39 Ryan_Lane https://github.com/trebuchet-deploy/trebuchet/blob/add-example/example/orchestration/saltmaster-testing.sls
19:40 Ryan_Lane what we're doing at lyft is a lot more elegant :)
19:40 Ryan_Lane scoates: are you in SF?
19:40 sk_0 iggy: https://gist.github.com/skinney6/3a90a59aebfe8c525f99
19:40 scoates no; Montreal.
19:40 * Ryan_Lane nods
19:41 sdm24 so without setting roles for each server, my boss wants Salt to be able to dynamically show what services are installed on a machine, even if that service isn't managed by Salt. Is that possible? I was thinking of like a state where {% if salt.cmd.get(ls /service/dir) is defined %} file.managed: service list
19:41 Ryan_Lane was going to say you could stop by and I could show you what we're doing :)
19:41 scoates thanks for that link, Ryan_Lane. I'll digest.
19:41 Ryan_Lane honestly: I run without a master. I also have no minion daemon running
19:41 Ryan_Lane I also don't use salt-ssh
19:41 dingo sk_0: quoting false should help, worse case:
19:41 dingo content:  |
19:41 dingo false
19:41 iggy sk_0: maybe quotes around {{ }} on L13
19:42 honestly Ryan_Lane: what is that magic
19:42 baweaver joined #salt
19:42 xf10e joined #salt
19:42 sk_0 dingo: i've tried single and double qotes around 'false' in pillar
19:42 sk_0 iggy: i'll try {{}}
19:42 xf10e hi again
19:43 dingo - context:
19:43 dingo send_interactions: |
19:43 dingo {{ send_interactions }}
19:43 dingo try that
19:44 scoates yaml gonna yaml
19:44 sk_0 dingo: that did it! thank you!
19:44 s_kunk joined #salt
19:45 dingo haw haw, you can thank my friend pravka for that trick
19:45 dingo he taught me that
19:45 dingo now we're computing!
19:45 dingo happy friday
19:45 pravka I love that multiline yaml
19:46 Ryan_Lane honestly: I use use salt-call
19:47 Ryan_Lane we deploy artifacts that contain all the salt code
19:47 honestly Ryan_Lane: over ssh?
19:47 Ryan_Lane nope. it's all pull based
19:47 Ryan_Lane from S3
19:47 DammitJim is there an easy way to create XML templates?
19:47 Ryan_Lane we update a key in S3 for a service that says "you should be running this artifact now"
19:47 DammitJim I'm trying to configure context.xml for tomcat for different servers... the connection pools
19:47 Ryan_Lane honestly: most of this is in the links I sent you :)
19:47 Ryan_Lane specifically the masterless one
19:48 honestly sounds like you still need to have a daemon with root privileges running that takes arbitrary code
19:48 Ryan_Lane no daemon
19:48 Ryan_Lane just a cron that runs once a minute that pulls down artifacts from S3 and runs salt-call
19:48 Ryan_Lane mostly. it does a bit more than that now, but that's roughly it
19:49 Ryan_Lane it's not "arbitrary code" it's the code that we deploy into S3 :)
19:49 Ryan_Lane which is protected by IAM privileges
19:49 dingo isn't all things arbitrary when you think about it
19:50 honestly Ryan_Lane: hmm, that's quite interesting
19:50 Ryan_Lane dingo: sure :)
19:50 Ryan_Lane honestly: pull based deploys are always best :)
19:50 * iggy shoots bit rewriting solar waves at AWS
19:50 Ryan_Lane well, pull with a push to say "hey, pull immediately" is even nicer
19:50 aparsons joined #salt
19:50 Ryan_Lane honestly: did you know you can run master/minion for remote execution, but still use a local file_client in salt? :)
19:51 dthom91 joined #salt
19:51 dingo i did not
19:51 dingo i mean i guess you can
19:51 dingo actually i did know that, was doing that accidently for a while
19:51 dingo somewhere i had a master that was never needed
19:51 kangarooo joined #salt
19:52 kangarooo left #salt
19:52 Ryan_Lane http://docs.saltstack.com/en/latest/ref/configuration/minion.html#use-master-when-local
19:53 Ryan_Lane so all pillars/grains/code/etc live on the local nodes and the master is just used as a remote execution/event system :)
19:53 markm joined #salt
19:53 Ryan_Lane honestly: I actually like the idea of a daemon that's running, I just don't like the availability story that comes with it
19:54 honestly If I don't have the time or resources to convince myself (and my boss) that this daemon isn't going to get us pwnd, I'm not going to run the daemon ;)
19:55 honestly wasn't there a thing about an exponent once
19:55 honestly way back when ;)
19:56 Ryan_Lane heh, well, assuming you're using ZMQ, then the daemon is pull based
19:57 Ryan_Lane it talks to the master, so the master it the only thing you strongly need to protect
19:58 UtahDave left #salt
19:58 honestly oh that is a good point
19:58 viq joined #salt
19:59 honestly I wasn't thinking about that
19:59 DammitJim silly question... can I have a jinja template for a context.xml that is different on the same server for different instances of tomcat?
20:00 Ryan_Lane honestly: I still do prefer masterless, but I <3 the idea of one day doing masterless with a master for remote execution
20:00 Ryan_Lane especially with salt-api and the event system
20:00 DammitJim does that make any sense?
20:01 DammitJim I have say 3 instances of tomcat on a minion... each instance has different context.xml files
20:01 Ryan_Lane DammitJim: sure. that's doable
20:01 VR-Jack PredatorVI: did my fix work?
20:01 DammitJim how do I make a template to satisfy each of them?
20:01 Ryan_Lane you can pass context into templates
20:01 iggy there are a couple ways you could to that (environments being one)
20:01 DammitJim Ryan_Lane, I've done it with a pillar in which I check the grains['id'] for the server
20:01 sdm24 DammitJim: like having 2 pillar values, config1, config2, and then {% for config in pillar['configs'] %}: file.managed: - source: salt://{{ config }}?
20:01 Ryan_Lane DammitJim: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
20:01 Ryan_Lane see the top example
20:02 Ryan_Lane it has - context:
20:02 Ryan_Lane in your state you can set the value of the variable inside of your state
20:02 timoguin joined #salt
20:02 DammitJim thanks Ryan_Lane ... reading
20:02 Ryan_Lane so you can have 1 template file that gets its variable data from the states
20:03 DammitJim but how do I tell it that on instance1, I need to use certain values specified in the pillar, but for instance2, I need other values specified in the pillar
20:03 DammitJim again, all this on the same server
20:04 DammitJim I"m reading about context, though
20:05 DammitJim so, the file in /var/local/instance1/context.xml is different than /var/local/instance2/context.xml
20:05 mdupont joined #salt
20:05 Sketch any suggestions on how to use salt to add it's minions to a monitoring server?
20:06 Sketch my first thought was to have a salt state run commands on the master (or another minion), but that doesn't seem likely from a security standpoint ;)
20:06 sdm24 Sketch: use the mine
20:06 Ryan_Lane DammitJim: yeah, so in each file.managed state, you'd pass in different context
20:06 Ryan_Lane and you'd have one file.managed state for each file
20:06 dthom91 joined #salt
20:07 DammitJim and the different context in the template would look up the xml tags in the pillar?
20:07 DammitJim I think I'm getting it
20:07 Ryan_Lane well, you'd not use pillars in the template
20:07 DammitJim oh, in this case I have to do all the logic in the template?
20:07 coval3nce joined #salt
20:08 DammitJim like I can't do this: https://github.com/saltstack/salt/issues/14185 ?
20:08 saltstackbot [#14185]title: 'Undefined jinja variable' How to use for loop in salt using jinja2 | My pillar sls file is like this:...
20:08 Ryan_Lane one sec
20:08 DammitJim thanks!!!
20:09 coval3nce Is there a concept of variables outside of jinja that can be captured in one state declaration and used in another?
20:09 sdm24 not really
20:09 sdm24 you can import variables, but that uses jinja
20:09 Ryan_Lane DammitJim: https://gist.github.com/ryan-lane/b4fe7c53a6e88972496c
20:10 coval3nce Hmm, have a really long command that requires a CLI app to be intalled, and jinja fails cause of course the package isn’t installed yet
20:10 Ryan_Lane coval3nce: pillars and grains
20:10 DammitJim oh, what I Have done in pillar, I have to move to the state
20:10 Sketch sdm24: hmm...looks potentially useful.  is there any way to have the master trigger something when a new minion connects?
20:10 Ryan_Lane coval3nce: you most likely want pillars
20:10 coval3nce Ryan_Lane: pillars can’t capture output of a command tho right?
20:10 Ryan_Lane if you're used to puppet, they're similar to hiera
20:11 Ryan_Lane ah
20:11 Ryan_Lane well... they can
20:11 iggy pillars run on the master
20:11 Ryan_Lane but... that
20:11 coval3nce Ryan_Lane: Essentially I need to install a package, run something t capture its outpute, then use that output in futher state declarations
20:11 Ryan_Lane if you're doing masterless it works fine :D
20:11 sdm24 Sketch: I think you want a reactor, but I don't use those
20:11 iggy a custom module
20:11 Ryan_Lane coval3nce: that's difficult
20:11 iggy then use reload_modules: True on the state that installs the dependency
20:12 iggy orchestrate
20:12 DammitJim Ryan_Lane, the other complexity in my case is that I have xml tags the repeat themselves and I have done loops in the past
20:12 iggy custom runner
20:12 Ryan_Lane DammitJim: yeah, you can still do all that
20:12 iggy reactor that fires a custom event (foo/installed) after the dep is installed
20:13 Ryan_Lane you still have jinja in the template and you can pass in full data structures from the context
20:13 Ryan_Lane you can also use a combination of context and pillars
20:13 rdutch left #salt
20:13 DammitJim context and pillars seems to be what I am looking for
20:13 DammitJim is there an example of that?
20:13 scoates sdm24: Sketch: example https://gist.github.com/scoates/240294cea3a551ac8bfc
20:13 scoates we've adapted that to a reactor script
20:14 baweaver joined #salt
20:14 iggy DammitJim: most of the formulas work like that (use pillars and context)
20:14 Qwazerty joined #salt
20:14 Ryan_Lane DammitJim: DammitJim updated: https://gist.github.com/ryan-lane/b4fe7c53a6e88972496c
20:14 zmalone joined #salt
20:14 duendecat joined #salt
20:15 DammitJim oh, are you saying pillar.my_pillar could be a data structure itself?
20:15 solidsnack joined #salt
20:15 duendecat_ joined #salt
20:15 Ryan_Lane oh, yeah, of course
20:16 Ryan_Lane pillars are full yaml datastructures
20:16 Ryan_Lane context can be too
20:16 DammitJim ok, I need to calm down and just try it
20:16 Ryan_Lane (grains technically can be too)
20:16 DammitJim well, I'm defining pillars according to grains to know what server gets what
20:17 Ryan_Lane careful using grains with pillars, if the pillars contain sensitive data
20:18 coval3nce Ryan_Lane: well thx man, maybe i’ll try to force one state to install before calling the other so the pre-reqs are installed before jinja rendered for other.
20:18 PredatorVI joined #salt
20:20 VR-Jack yeah, grains can be forged
20:21 coval3nce I guess that poses the same issue tho, jinja always rendered first
20:21 DammitJim Ryan_Lane, I don't want to beat this to the ground, but this is what I need to be able to generate: https://gist.github.com/anonymous/a45b234661dad2864b64
20:21 coval3nce no way to carry something from one state id to another in terms of a variable our output data
20:22 Sketch scoates: cool, thanks
20:23 DammitJim so, context.xml on instance1 has only 2 Resource tags, but instance2 has 3
20:23 claytron_ joined #salt
20:24 DammitJim if I had different servers, I know I could do this... I was just having a hard time with doing it on the same server (indicating the different instance) but somehow just specifying name, url, username, and password and dynamically build the file using a for loop in the template
20:26 duendecat_ joined #salt
20:27 dthom91 joined #salt
20:28 Ryan_Lane DammitJim: indicate it via the context
20:28 Ryan_Lane context works kind of like pillars, except it's within the scope of states
20:29 DammitJim oh, so I could loop through the context?
20:29 Ryan_Lane context is exactly like pillars
20:29 Ryan_Lane it's just a dict
20:30 Ryan_Lane well... you really want to set a variable in the context
20:30 Ryan_Lane and use that as your data structure
20:30 zmalone left #salt
20:30 Ryan_Lane I'm not sure you can access the context dict directly
20:30 Ryan_Lane it basically sets local variables in your template file, from the state
20:32 DammitJim https://gist.github.com/anonymous/3936079c83390b447718
20:32 DammitJim so, something like this?
20:33 DammitJim thanks, btw just for paying attention to my stupid question
20:34 tedski joined #salt
20:34 tedski- joined #salt
20:35 sdm24 DammitJim: another (maybe easier) solution is to have 3 different templates, named template1 template2 template3 or whatever, and then just use 3 file.managed with different name and - sources
20:35 duendecat_ joined #salt
20:35 sdm24 so the templates are mostly simiiliar, except for the small differences that you are trying to load
20:35 DammitJim sdm24, I considered that... but I wanted to see if one could do all this dynamically
20:35 sdm24 gotcha
20:35 DammitJim but I think I know what you are saying
20:36 sdm24 its definitely easy, but you won't "learn" from it
20:36 DammitJim I totally appreciate the input (at least it reinforces one of the options I thought about)
20:36 sdm24 like I have a ton of Debianconf.conf and Ubuntuconf.conf, and file.managed: - source: {{grains['os'] }}conf.conf
20:37 sdm24 and it might not be as "salty" or as pretty as one .conf file with a ton of jinja, but it gets the job done
20:37 funzo joined #salt
20:38 lothiraldan joined #salt
20:38 iggy DammitJim: < iggy> dammitjim: add `- key_url: https://downloads.linux.hp.com/SDR/repo/mcp/GPG-KEY-mcp` to your pkgrepo stanza
20:38 iggy that was from the other day... your an off
20:38 iggy *you ran off
20:38 dthom911 joined #salt
20:39 DammitJim iggy, thank you so much! I actually figured out that HP had a different key
20:39 Sketch scoates: it actually looks like this is pretty close to what i want, as a base... http://docs.saltstack.com/en/latest/topics/reactor/#syncing-custom-types-on-minion-start
20:40 * scoates nods
20:40 aparsons joined #salt
20:40 Sketch (though i need to find a better event than minion start)
20:40 DammitJim oh, Ryan_Lane so, I can't do what I posted here? https://gist.github.com/anonymous/3936079c83390b447718
20:40 solidsnack joined #salt
20:41 hemphill joined #salt
20:42 pcdummy_ joined #salt
20:44 pcdummy joined #salt
20:46 scoates Sketch: we use auth. it happens periodically
20:53 Ryan_Lane DammitJim: that should work
20:54 DammitJim how do I loop through the vars?
20:54 Ryan_Lane oh. whoops
20:54 Ryan_Lane DammitJim: put those three under a single var
20:54 DammitJim or is there no way to loop through them?
20:55 DammitJim https://gist.github.com/anonymous/78db05cccc5c45c82bf5
20:55 DammitJim like that?
20:56 DammitJim but how do I loop through them in my template?
20:56 DammitJim if I can get that, I think I'm good to go
20:56 VR-Jack mainvar.items() i believe
20:57 DammitJim oh, like Ryan_Lane said... it's just like pillar?
20:57 VR-Jack or if context shows as pillar pillar['mainvar'].items in a for loop
20:58 DammitJim so, in my template: {% set variable = {{ mainvar }} %}
20:58 VR-Jack okay, so it's direct into jinja
20:58 DammitJim then: {% for item in mainvar %}
20:59 VR-Jack don't need the set. mainvar is there
20:59 VR-Jack just {% for item, arg in mainvar.items() %} should work
20:59 DammitJim ok, great!
20:59 DammitJim wow... now I"m learning something new
21:00 VR-Jack item would be var1, var2. arg['name'] and such is whichever one you are on
21:00 dopesong joined #salt
21:00 dthom91 joined #salt
21:00 duendecat joined #salt
21:00 VR-Jack key, args   is the most common notation for that type of iteration
21:01 DammitJim yeah
21:02 VR-Jack items() is not as efficient as iteritems() in python2.6, but it will work and gain efficiency in python3 where iteritems is gone
21:02 VR-Jack might as well write it correctly first trip
21:02 DammitJim so, which one is it?
21:02 VR-Jack use items
21:05 gnudon joined #salt
21:05 xf10e yepp, else your code won't make it into salt (if you don't want to maintain your stuff yourself forever ;)
21:07 xf10e sometimes Jenkins is a jerk :(
21:07 VR-Jack heh. we have iteritems all over formulas. :(
21:08 xf10e didn't checkout properly and now it's my fault it doesn't git it...
21:08 iggy "we" also aren't even close to supporting python3
21:08 fredvd joined #salt
21:08 VR-Jack true, though "we" are making progress
21:09 xf10e do "we" know any salt-devs who are awake and can reset/restart a jenkins-job?
21:09 DammitJim VR-Jack, I actually need {% for var in mainvar.items() %}
21:10 DammitJim {% for item, args in var.items() %}
21:10 duendecat joined #salt
21:10 DammitJim right?since I am 2 lists deep?
21:10 VR-Jack item, args puts the first level in item and the rest into args
21:11 DammitJim oh, then I still have to interate through args?
21:11 VR-Jack only if you need to iterate. generally args will be the variables you actually want.
21:11 VR-Jack ie, {{ item }}: args['file']
21:12 DammitJim VR-Jack, thanks for looking at this... I'm talking about this state - context: https://gist.github.com/anonymous/78db05cccc5c45c82bf5
21:12 Akhter joined #salt
21:12 X67r joined #salt
21:13 VR-Jack correct, so if you want to loop through var1, var2 (twice through the loop), but then access the name: and url: for each in the loop, you do key, args and var1, var2 will be in key and args['name'] and args['url'] will be set right for each loop pass
21:13 breakingmatter left #salt
21:14 VR-Jack so first pass key = 'var1' and arg['name'] = portal. second pass key = 'var2' and args['name'] = load.
21:15 murrdoc joined #salt
21:15 breakingmatter joined #salt
21:16 breakingmatter I've been reading through the source code for Salt trying to understand how all of the processes get started. I understand that daemons.py parses the config and passes that to the master.py, which then loads all the options and sets up the process_manager. But, what exactly is the salt.engines.start_engines functionally do?
21:16 DammitJim oh ok, so I only need 1 for loop
21:18 DammitJim why did you say twice through the loop?
21:18 VR-Jack DammitJim: I was looking at the first state context. There were 2 options. var1 and var2. that's twice.
21:19 edrocks joined #salt
21:20 quasiben joined #salt
21:21 VR-Jack breakingmatter: from what I can tell, it loads up the various .py in the salt/engines directory if they are configured.
21:21 scoates Ryan_Lane: you're right. subnets are painful (-:
21:21 VR-Jack sqs_events, slack, and logstash
21:22 DammitJim VR-Jack, that's because instance1's context.xml should look like this: https://gist.github.com/anonymous/a45b234661dad2864b64
21:22 DammitJim does that make any sense?
21:23 xf10e http://10.0.122
21:23 xf10e narf, thx tmux
21:23 VR-Jack Yes. I was just saying why I said it goes through loop twice. one for each item under mainvar
21:24 DammitJim ah, ok
21:24 dthom91 joined #salt
21:24 VR-Jack for key,args  you are loading the key variable into key and the others as a dict into args which can be references as args['name'] or args['url']
21:25 breakingmatter VR-Jack: I see that salt.daemons.Master runs `self.master = salt.master.Master(self.config)`, which should pass the config options to the "master server". That config is the the `opts` variable that is then passed in `salt.engines.start_engines(self.opts, process_manager)`. I'm guessing that start_engines goes through the `opts` and runs anything that is defined that isn't a "core process" like a reactor or publisher.
21:25 xf10e scoates, Ryan_Lane: what about subnets?
21:26 Ryan_Lane xf10e: what do you mean? :)
21:26 breakingmatter I'm trying to learn more about how various software projects handle themselves running multiple functions/processes so I can incorporate some of those concepts into my own development.
21:26 scoates xf10e: current pain: I need to specify a subnet id in a cloud profile to get it to go into VPC… but I don't know the subnet id because it was determined by the AWS API (I do know the subnet name)
21:26 VR-Jack breakingmatter: I don't believe it does anything but engines. And you will find the opts dict passed everywhere.
21:27 quasiben1 joined #salt
21:27 xf10e scoates: ah, OK... had fun like this with OpenStack's Neutron, too ^^
21:27 scoates :smithicide:
21:27 duendecat joined #salt
21:27 breakingmatter VR-Jack: Lines 28-30 in salt.engines.start_engines() use the opts with salt.loader.utils(), salt.loader.minion_mods(), and salt.loader.engines()
21:27 DammitJim how does this look? https://gist.github.com/anonymous/f3f08c9559e75c812873
21:28 xf10e but I have also some plain IPv4 subnet-related functions in a py-rendered state I need to mv to salt.utils.networking (network?)
21:28 DammitJim /s/arg/args
21:28 VR-Jack breakingmatter: yes. they are getting information I believe. The engine starts themselves call proc_mgr.add_process.
21:29 VR-Jack breakingmatter: notice id does salt.loader.engines(opts, funcs, runners), but that's not where it starts the engines. That is done below in the for loop.
21:29 xf10e scoates: can you get a subnet by name? then you could just make another request to get the id
21:30 otter768 joined #salt
21:30 scoates yeah; there's boto_vpc.describe_subnet
21:30 scoates still painful, but maybe possible.
21:30 VR-Jack breakingmatter: I could be wrong. I don't know python, but that's how I read it.
21:30 xf10e wrap it in a function then you only have the pain when you look at the function's ugly code ;)
21:30 scoates it also seems that I can't pass a list to securitygroup ?
21:31 breakingmatter VR-Jack: So, salt.engines.start_engines most likely doesn't handle any of the "main" processes; it just handles the forwarding engines for slack/logstash/sqs
21:31 VR-Jack breakingmatter: correct.
21:31 VR-Jack salt is very good at breaking each thing apart into it's own directory.
21:31 VR-Jack modules in modules, runners in runners, engines in engines, etc
21:32 xf10e scoates: no idea. I don't think I've implemented security group stuff for Neutron yet ^^
21:32 breakingmatter VR-Jack: Okay, so it's separating the logic for loading the "engines" into a different function since it's not as simple as "add_process". i.e., logic needs to be done to get details on the engines and the opts they need passed
21:33 VR-Jack breakingmatter: correct, and notice the windows part. it requires the child process to do everything as it can't pass them from the parent.
21:33 DammitJim VR-Jack, did you get the chance to look at my paste? just to confirm my template looks right?
21:33 xf10e but first there's #26099: "`neutron` exec-functions aren't modeled after Neutron CLI Tools, are missing features"
21:34 breakingmatter VR-Jack: Okay, great. That makes sense now. Thanks! :)
21:34 dthom91 joined #salt
21:34 aparsons joined #salt
21:34 whytewolf xf10e: have you actually looked at the neutron that is already in saltstack, cause it DOES do security groups. http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.neutron.html#salt.modules.neutron.create_security_group and http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.neutron.html#salt.modules.neutron.create_security_group_rule
21:35 scoates ah. example shows `securitygroup` and I actually want `security_groups` … at least I failed quickly! (-;
21:35 VR-Jack DammitJim: when you reference the variables outside of the {%%} you need to do {{ args['url'] }}
21:35 DammitJim oh, I knew that!!!
21:35 VR-Jack gets confusing when you jump between {% and {{ :)
21:36 DammitJim thanks!
21:36 scoates …except not (-:
21:36 DammitJim now I need to prep my vm
21:37 xf10e whytewolf: when I started the whole openstack thing there were no neutron functions in salt at all. if there are sec grp related functions I'll convert them to match the CLI, too (over the next X releases...)
21:38 funzo joined #salt
21:38 mordonez joined #salt
21:39 mordonez joined #salt
21:39 xf10e whytewolf: and when I discovered the new neutron-module in salt it a) couldn't do most of the stuff I needed anyway and b) was structured completely different, so getting my additions in there was a longtime thing anyway
21:39 solidsnack joined #salt
21:39 whytewolf xf10e: yes it is compleatly different because it ties into the nova driver changes in salt-cloud.
21:40 whytewolf or at least that is the long time goal from what i understand
21:42 xf10e I hadn't had time to look into the salt-cloud code to figure out what belongs in there.
21:42 xf10e don't worry, I don't think the interfaces will change before oxygen
21:43 ingslovak1 joined #salt
21:44 peters-tx joined #salt
21:45 xf10e and then Icehouse won't be supported anymore (I think) and nova might be deprecated in the then current release. It's not like the OpenStack folks don't break or redefine existing versions of their APIs...
21:48 claytron_ joined #salt
21:48 mattrobenolt joined #salt
21:49 whytewolf xf10e: Icehouse is barely supported now.
21:49 whytewolf since it is 2 versions hind current
21:49 dthom91 joined #salt
21:51 xf10e RedHat and Canonical state they'll support Icehouse until 2017: https://access.redhat.com/support/policy/updates/openstack/platform/ and https://wiki.ubuntu.com/ServerTeam/CloudArchive
21:53 scoates I fear I may be too tired to deal with this, anymore. http://paste.roguecoders.com/p/ae018db20a13083855785a2be2d5e487.txt
21:59 solidsnack joined #salt
21:59 duendecat joined #salt
22:00 dthom91 joined #salt
22:01 xf10e scoates, your right. days over, I'm gone.
22:01 scoates it's been a week of this. )-:
22:02 xf10e and now this week's over ;)
22:02 xf10e have a nice weekend
22:02 xf10e bye *
22:03 murrdoc bye
22:08 jeadr joined #salt
22:09 wendall911 joined #salt
22:14 vando left #salt
22:15 subsignal joined #salt
22:18 Eccentricson joined #salt
22:19 Eccentricson I'm running high state on one of my minions, and I'm getting the following error.  It's a Python specific error, but not sure what is causing it.  I updated salt-master to 2015.5.3.  https://gist.github.com/anonymous/ccbe4d03476824d747cb
22:20 theologian joined #salt
22:20 jngd joined #salt
22:20 iggy do you have some unicode characters in your sls files?
22:23 rabbitheart left #salt
22:24 pm90__ joined #salt
22:24 Eccentricson I checked with vi, and :set list
22:24 Eccentricson I didn't find anything!
22:25 Eccentricson I also did a dos2unix on all of the sls files.
22:26 Eccentricson Then a file on all .sls files - none are reporting as utf-8.  All are reporting as ASCII
22:26 otter768 joined #salt
22:26 Eccentricson Rather than doing a highstate, I guess I'll run them individually to find out what state it is, and rewrite it
22:28 markm joined #salt
22:28 murrdoc u can throw in a # at top
22:29 murrdoc to force utf8
22:29 murrdoc # -*- coding: utf-8 -*-
22:29 whytewolf humm, paragraph seperator, in unicode. [\u2029]
22:29 Eccentricson It'd be nice to find the utf-8 character :D
22:29 Eccentricson Yeah whytewolf and yet, I can't find it.  :D
22:30 Eccentricson hah found the file!
22:30 Eccentricson 6.sls
22:33 Eccentricson https://gist.github.com/anonymous/01aee61829a30b2974c4   That's the part of the state causing the issue.  BAM!  Now to figure out why :D
22:35 Ludo- Comment: pkg.verify not implemented
22:35 Ludo- I don't understand why since my salt-minion and salt-call are 2015.5.2
22:36 VR-Jack OS?
22:36 whytewolf Ludo-: os distro and version
22:36 Eccentricson Fixed!  I took out the quotes on the cmd.run.
22:37 whytewolf Eccentricson: that is strange. quotes should not have caused a paragraph seperator
22:37 Eccentricson It's VERY possibly my text editor had smart quotes in there
22:37 Ludo- VR-Jack & whytewolf: ubuntu 14.04
22:37 Eccentricson I switched between a few text editors while writing the CIS hardening states
22:37 whytewolf Ludo-: it only works with yumpkg
22:38 Ludo- ok
22:39 funzo joined #salt
22:39 Ludo- I updated my elasticsearch formula from the 1.7.0 to the 1.7.1 package, but it's not upgrading it
22:39 Ludo- how will you do it?
22:39 scoates Ryan_Lane: turns out I need to expose _check_vpc() for my cloud stuff anyway heh
22:39 whytewolf are you using pkg.installed or pkg.latest?
22:40 Ludo- pkg.installed
22:40 Ludo- should I use pkg.latest?
22:41 sk_0 using jinja i want the variable to be wrapped in quotes in the template file but the closing quote is on the next line.
22:41 jeadr joined #salt
22:41 whytewolf pkg.installed won't upgrade it will just check if it is already installed and install latest if it is not. latest will update to the newest version in the manaager
22:41 Ludo- ok switching to latest! thanks
22:44 whytewolf huh i missed pkg.uptodate coming out. nice to have that no longer as a exacution modules only option
22:44 PredatorVI Have an odd issue w/ file.managed when pushing the rabbitmq erlang.cookie file for clustering.  Salt keeps telling me there are no changes but never updates/overwrite the file.  I was using '- source: salt://myapp/errlan.cookie', but tried just doing '- content:  ABCDEFGH...' and still salt thinks there is nothing to change.  I've tried changing the content of the source as well.
22:45 PredatorVI Not sure what else to look at...:/
22:45 whytewolf PredatorVI: strange, the only time i have seen that was when the changes were whitespace only changes.
22:46 bfoxwell joined #salt
22:47 PredatorVI Yeah, very odd...
22:47 whytewolf PredatorVI: can we see the state?
22:47 PredatorVI https://gist.github.com/PredatorVI/5be6d90222bd611f7c04
22:49 PredatorVI Ignore the error at the bottom...I resolved that one.
22:50 dthom91 joined #salt
22:50 whytewolf humm, I'm not sure. whats going on. very strange indeed. only too off the wall ideas that BOTH are 100% bonckers to think about and most likely are not issues.
22:51 whytewolf first. salt can't see hidden files, and second would be salt can't see into the file because of the permissions.
22:51 PredatorVI whytewolf:  I've reached bonkers status.
22:51 goodwill joined #salt
22:51 whytewolf s/too/two
22:51 whytewolf both of which i am sure are false.
22:51 j_bennet joined #salt
22:52 PredatorVI hmm..gonna remove the '.' and just see if it will copy *something* over.
22:52 VR-Jack Ludo-: I checked, and the reason verify wasn't added to apt is... there apparently isn't anything like rpm -Va
22:52 whytewolf like i said I don't think that is a real issue.
22:52 VR-Jack debsums is as close as it gets, but isn't the same thing.
22:53 claytron_ joined #salt
22:56 VR-Jack PredatorVI: make sure you salt-call -l debug to test so you get the most information
22:57 PredatorVI VR-Jack: ok
22:58 PredatorVI VR-Jack: wait...salt-call?  on minion?  I'm running state.highstate on master.
22:59 VR-Jack PredatorVI: you can salt-call state.highstate on a minion. same thing.
22:59 PredatorVI OH!
22:59 VR-Jack salt on master = salt-call on minion
22:59 * PredatorVI slaps PredatorVI and starts getting carried away
22:59 VR-Jack but salt-call usually has more info
22:59 * PredatorVI thinks I've been doing it the hard way :/
23:00 VR-Jack and I'd test the state by itself instead of in highstate
23:01 j_bennet left #salt
23:01 PredatorVI VR-Jack: states still should be on master then?
23:03 SheetiS joined #salt
23:03 VR-Jack PredatorVI: never test with salt. if orchestrate/reactor you can test with salt-run on master. Otherwise, test from minion with salt-call
23:03 VR-Jack -l debug of course
23:04 VR-Jack salt is only good for issuing commands to multiple minions in my opinion.
23:04 jmreicha_ joined #salt
23:04 PredatorVI ok
23:04 VR-Jack ie, what you do in production
23:04 PredatorVI but just clarifying, I don't copy the states manually to minion, but continue to host them on master for salt-call?
23:04 VR-Jack no. leave files as is
23:05 VR-Jack the call works identical to when you are on master but salt = salt-call and you don't specify a node
23:05 jmreicha joined #salt
23:06 VR-Jack so 'salt myminion state.sls mysls' becomes 'salt-call state.sls mysls'  but with -l debug ideally. They will pull the file from master and run. It's the output you get that changes.
23:06 VR-Jack salt-call gives more verbose debug
23:06 PredatorVI okay, it's Friday so forgive my slow cognition.  The process (as I am understanding).  1) edit/update states/pillars on master, 2) go to minion and run salt-call state.sls <whatever>'  Correct?
23:07 VR-Jack yep
23:07 PredatorVI kk
23:07 VR-Jack -l debug
23:08 PredatorVI kk got that, was just unsure where the updated states should reside.  I needed that tip...
23:13 * PredatorVI <swearwords>
23:13 VR-Jack no problem. sometimes salt -l debug gives info that salt-call doesn't (from the master's perspective) but that's rare
23:14 PredatorVI I changed the name of the destination to /tmp/FOO and salt-call says there is nothing to change
23:14 VR-Jack debug give any info?
23:15 PredatorVI crap-loads of output that doesn't seem to point to anything interesting.
23:17 baweaver joined #salt
23:18 PredatorVI Full content: https://gist.github.com/PredatorVI/e7bbf8345c590410f242
23:18 PredatorVI search for FOO
23:19 Dovy joined #salt
23:19 dthom91 joined #salt
23:19 Dovy So... need to talk to someone who knows a lot about Couchbase with salt and data mining if anyone is willing to chat with me.  ;)
23:19 PredatorVI And no file named /tmp/FOO is created :/
23:20 VR-Jack fyi, I'd change passwords. you pasted some in there
23:21 dthom91 joined #salt
23:23 VR-Jack PredatorVI: you did a prereq is why
23:23 VR-Jack if I recall right, prereq only runs if a change is expected
23:23 VR-Jack that's why there isn't a datetime for the started:
23:23 VR-Jack it skipped it
23:25 PredatorVI The cookie has to be copied before the service is started
23:25 PredatorVI I thought prereq was like 'require' but performed that state before
23:25 VR-Jack that's nice the very first time, but not for future runs
23:26 duendecat joined #salt
23:26 VR-Jack nah. it runs the state in test mode. if it reports changes (ie, we will start the service), then it runs the current state
23:26 PredatorVI service didn't start corretly without it...on the first time.  What should I do instead?
23:26 VR-Jack Since you are already running the service, there is no change, so it doesn't run that state
23:27 VR-Jack use require_in which makes the service require that first
23:28 * PredatorVI bangs head on desk
23:28 VR-Jack require_in is the same as adding require to the service, but you don't have to modify the service directly.
23:28 PredatorVI k..running now.
23:28 VR-Jack prereq is a way to say, I'm gonna run before that guy, but first tell me if that guy expects to have changes. If he does, I run. otherwise I do nothing
23:30 ageorgop joined #salt
23:31 VR-Jack prereq is often used for "I'm gonna shut down apache while a new website is deployed, so tell me if we are actually deploying one. ie, prereq file: deploysite"
23:32 VR-Jack your file.recurse runs in test mode. if it detects it will make changes, then apache shuts down. You then do the file.recurse state. Then presumably have another state to start apache.
23:32 VR-Jack use in web clusters sometimes so that nothing queries the site while it's updating and in an unstable state.
23:33 Eccentricson When doing a yum update -y on my salt-minion, my master comes back and says the minion didn't respond.  However, when I take a look in debug mode, I can see it's running.  But it did stop sending the keepalive message of what state it was working on.  Any reason why it would do this?
23:33 PredatorVI I remember now what I was trying to do....if the cookie changes, I want the rabbitmq-server service to restart.
23:34 PredatorVI or reload
23:34 solidsnack joined #salt
23:34 whytewolf PredatorVI: than you want a watch_in
23:34 whytewolf on the cookie
23:37 whytewolf oh. guess that is onchanges_in now
23:38 jeadr joined #salt
23:38 PredatorVI ok, tried that but it seems the restarting of the rabbitmq-server service hates me and I'm not too fond of it either.  I think I need a step to check to see if the cookie is going to change, stop the service first then update the cookie then restart the service.
23:38 VR-Jack PredatorVI: well, along with your require_in, add a listen_in. You can do both.
23:38 claytron_ joined #salt
23:38 PredatorVI kk
23:39 PredatorVI listen = onchanges?
23:39 funzo joined #salt
23:39 VR-Jack listen = watch with delay
23:40 iggy listen = watch with the action at the end of the run
23:41 VR-Jack watch happens immediately but generally buggers the state ordering. listen waits so that all states run first.
23:41 VR-Jack states being the single sls file
23:41 whytewolf iggy, you should have the bot have a way to compare the different requisites and the order of operations for them
23:41 PredatorVI I'm guessing I still need a separate module somewhere to stop the service using prereq before updating the cookie?
23:42 VR-Jack pretty sure it doesn't wait until the end of highstate. hehe
23:42 VR-Jack PredatorVI: will it not restart/reload properly?
23:44 PredatorVI I'm still learning aobut rabbitmq, but I think the cluster instance is based on the cookie so I need to stop the service with the old cookie intact, then replace the cookie.  Otherwise the darned service won't stop/go away.
23:44 VR-Jack If you would manually stop it to change cookie normally, then yes. You can add a service stop with prereq on your file.managed. and a require binding.
23:46 VR-Jack service.dead with prereq to file: cookie and in the file.managed do a require for the service.present one.
23:47 VR-Jack require_in. sorry
23:47 whytewolf service.running, not service.present
23:47 VR-Jack ^^^
23:47 * VR-Jack is tired and having memory parity errors
23:48 * PredatorVI sympathizes
23:49 * PredatorVI crosses fingers...
23:50 VR-Jack if it doesn't work, it's iggy's fault
23:51 PredatorVI Hee
23:51 Eccentricson :D
23:51 aparsons joined #salt
23:52 scoates hmm. is there a way to get a jinja evaluation to wait for another SLS to run?
23:52 scoates I have `require: - sls: thing` in my actual state, but I need to query for something done by `thing` in the template
23:53 VR-Jack scoates: have an sls with 2 includes. the 2nd include jinja shouldn't process until the first one is done running
23:54 VR-Jack I'm just guessing. I know it's states won't process
23:54 * PredatorVI Two thumbs way way up!
23:54 scoates won't the template render, though?
23:54 scoates I expect they'll all render before the dependency tree is determined, no?
23:54 PredatorVI VR-Jack, whytewolf, (and iggy):  Thanks for all your help!
23:54 VR-Jack why would it render jinja and not render the yaml which causes an error ?
23:55 VR-Jack scoates: no, because the 2nd include can't have depenencies in the first
23:55 VR-Jack or in the main sls
23:55 VR-Jack dependencies and includes only go in one direction
23:56 LV-426 joined #salt
23:56 VR-Jack so there's no reason to process the second include before the first is done. Of course that means you can't do a dependency between them
23:56 scoates clearly, I'm confused. (-:
23:56 scoates I thought that's how require_in works
23:57 VR-Jack yes, but only from the parent sls to the included sls. not between includes
23:57 whytewolf scoates: do you mean you need a jinja variable filled in from the state function of another sls that is happening in the same run?
23:57 dthom91 joined #salt
23:57 VR-Jack bah. I don't know. I just know the 2nd include won't process fully. give it a try.
23:58 scoates whytewolf: close. I need a boto_vpc.present state to run before jinja that queries that vpc's ID
23:59 VR-Jack scoates: we had a formula that did a module call that only worked if the package was installed. So we did the pkg install in first include and the module state in the second include. it worked.
23:59 VR-Jack haven't tried with jinja, but worth trying

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