Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-10

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

All times shown according to UTC.

Time Nick Message
00:02 ayee I have my salt infrastructure setup, I can do commands to the baremetal boxes I setup. eg this `salt 'b-kubernet*' cmd.run 'uptime'`, works fine. I wanted to use this repo: https://github.com/jonlangemak/saltstackv2 to deploy kubernetes. The instructions say "Push the Salt Stack config to all of your servers defined in the pillar (salt '*' state.highstate)", I'm confused about what command would push the salt stack config to all the servers defined in the pillar?
00:02 ayee or I'm even confused about defining the pillar, I think I only need to edit kube_data.sls to define the pillar yes?
00:03 iggy a highstate syncs at the start, so that command will do the sync
00:05 murrdoc we think
00:05 ayee ok, yolo. we'll see what happens.
00:06 druonysus joined #salt
00:06 druonysus joined #salt
00:07 murrdoc salt minion state.apply yolo
00:07 murrdoc will work
00:07 whytewolf yolo? you oughta look out?
00:07 aurynn sure :)
00:07 ayee you only live once
00:07 murrdoc you only lie once , whytewolf
00:09 whytewolf I lie all the time.
00:12 IanV0rn2341 joined #salt
00:17 baweaver joined #salt
00:19 ayee https://gist.github.com/anonymous/5bbbc4a733a4ee0368f5
00:19 ayee ^ I got tons of these: "No Top file or external nodes data matches found"
00:20 ayee I tried putting the top.sls in /srv/base (this wasn't in the instructions), but I get the same error after trying that.
00:29 sectionme joined #salt
00:30 cztanu joined #salt
00:32 amcorreia joined #salt
00:36 julez joined #salt
00:39 bfoxwell joined #salt
00:41 primechuck joined #salt
00:43 primechuck joined #salt
00:44 primechu_ joined #salt
00:44 bfoxwell joined #salt
00:56 ingslovak ayee: the default file root is /srv/salt/ , as mentioned in http://docs.saltstack.com/en/latest/ref/configuration/master.html#std:conf_master-file_roots
00:56 ingslovak ayee: so try moving the top.sls file there
00:57 otter768 joined #salt
00:58 ingslovak FYI, if you try to use smtp returner in reactor files, the correct value for "-ret: " is "smtp", not "smtp_return" that's in the docs
01:04 druonysus joined #salt
01:06 desposo joined #salt
01:07 pdayton joined #salt
01:11 aqua^c joined #salt
01:26 beauby joined #salt
01:34 ageorgop joined #salt
01:46 kevinquinnyo joined #salt
01:48 kevinquinnyo so is there a reliable way to have a salt-minion restart itself?  I have some states that make changes to ulimit and things, and as a result, the salt-minion service needs to be restated to take the hanges
01:49 kevinquinnyo if i try to do this with the states.service module, it kind of works, but it leaves child processes and I have to manually go over there and killall -9 salt-minion and restart for it to behave again
01:50 kevinquinnyo i understand why this would probably fail, but i'm wondering if there is a trick
01:50 beauby joined #salt
02:00 cornfeedhobo joined #salt
02:03 quasiben1 joined #salt
02:04 cornfeedhobo disclaimer: i am just starting to read and trying to understand what is possible with salt.    could someone tell; is it possible to run masterless, but also have something like a multi-master setup only for parallel on-demand command execution?
02:09 CeBe joined #salt
02:09 beauby joined #salt
02:14 evle joined #salt
02:18 sectionme joined #salt
02:20 campee joined #salt
02:28 CeBe2 joined #salt
02:28 CeBe3 joined #salt
02:29 sunkist joined #salt
02:39 yomilk joined #salt
02:40 beauby joined #salt
02:41 clintberry joined #salt
02:46 loz-- joined #salt
02:50 CeBe joined #salt
02:58 otter768 joined #salt
03:01 yomilk joined #salt
03:10 beauby joined #salt
03:11 sarerto joined #salt
03:12 favadi joined #salt
03:12 stoogenmeyer__ joined #salt
03:15 ayee hmm, ok I have this new-ish error... https://gist.github.com/anonymous/ebd2c6f5febed6240985
03:15 ayee I think my top.sls is found now
03:16 ayee but I get lots of these: "State 'kube_nodes' in SLS 'kube_data' is not formed as a list"
03:18 desposo joined #salt
03:24 whytewolf ayee: kube_data.sls and the top.sls that was with it go in /srv/pillar
03:24 whytewolf not in /srv/salt
03:24 TyrfingMjolnir joined #salt
03:25 whytewolf it is trying to read pillar data as state data
03:34 malinoff joined #salt
03:34 ahammond kevinquinnyo best solution I've seen is a cmd.run that sets an at command to restart the salt-minion in 5 seconds. Personally, I just do a cmd.run service salt-minion restart
03:40 djinni` joined #salt
03:46 kevinquinnyo ahammond: thanks I was worried it would require some hacks like that
03:48 Ryan_Lane is the jinja renderer from salt customizable at all?
03:48 Ryan_Lane a coworker pointed me at ansible's playbook filters and they're really extensive: https://docs.ansible.com/playbooks_filters.html
03:48 Ryan_Lane would be nice if salt's jinja could be easily extended
03:58 Bryson joined #salt
04:03 napsterX joined #salt
04:06 ajw0100 joined #salt
04:07 sectionme joined #salt
04:11 ayee whytewolf: ok, my pillar_roots was set differently from what I thought.
04:13 julez joined #salt
04:14 ayee whytewolf: I got all green ( https://gist.github.com/anonymous/6051185519aa3bfc9be5 ) when I ran `salt 'b-kubernet*' state.highstate`, but when I go to any of the nodes from kube_data.sls I don't see /opt/kubernetes, or anything running.
04:15 ayee The last step I followed was "Push the Salt Stack config to all of your servers defined in the pillar (salt '*' state.highstate)", I wonder if there is a step after that?
04:25 Aidin joined #salt
04:28 quasiben joined #salt
04:33 hasues joined #salt
04:33 hasues left #salt
04:37 TyrfingMjolnir joined #salt
04:48 ramteid joined #salt
04:50 bezeee_ joined #salt
04:53 mosen joined #salt
04:59 otter768 joined #salt
05:12 impi joined #salt
05:14 quasiben joined #salt
05:22 marnom joined #salt
05:23 marnom anyone using peer publishing through a syndic? It seems to always return none, even though the 'master of master' sees the return of the sub minion :(
05:44 napsterX joined #salt
05:45 Aidin joined #salt
05:46 julienlavergne joined #salt
05:53 sectionme joined #salt
05:54 AndreasLutro joined #salt
05:58 catpiggest joined #salt
06:01 SheetiS joined #salt
06:02 julez joined #salt
06:05 patron joined #salt
06:17 impi joined #salt
06:22 neilfse joined #salt
06:25 sectionme joined #salt
06:38 julienlavergne joined #salt
06:48 sectionme joined #salt
06:52 bhosmer joined #salt
06:59 otter768 joined #salt
07:00 Ztyx joined #salt
07:04 zooz joined #salt
07:05 soren joined #salt
07:05 stephanbuys joined #salt
07:09 kawa2014 joined #salt
07:18 bhosmer joined #salt
07:24 thalleralexander joined #salt
07:32 pcdummy joined #salt
07:33 pcdummy Can i get the saltenv in a state?
07:33 pcdummy {%- for full_file in salt['cp.list_master'](saltenv="pcdummy", prefix=patches_source) -%} <-- want to replace the hardcoded "pcdummy" here
07:35 AndreasLutro pcdummy: salt.environment
07:35 pcdummy AndreasLutro: thanks!
07:37 pcdummy AndreasLutro: hmm its undefined
07:37 rdas joined #salt
07:39 AndreasLutro pcdummy: works fine here, what version are you using? can you paste the whole line of code again?
07:41 pcdummy AndreasLutro: http://pastebin.com/dh7PK8px thanks
07:41 pcdummy AndreasLutro: its my way to patch a salt-minion (all patches have a pull request :))
07:42 AndreasLutro I don't see salt.environment anywhere there
07:42 pcdummy yeah, removed it
07:42 pcdummy replaced "pcdummy" with salt.environment
07:42 pcdummy hmm maybe a typo, will test again
07:44 pcdummy AndreasLutro: no, http://pastebin.com/R8Ug4ipb
07:44 pcdummy AndreasLutro: http://pastebin.com/eLPkQAz8
07:45 phix pcdummy: how's life?
07:45 pcdummy phix: ? do we know each other? :)
07:45 pcdummy phix: live is a bit hard, but thats fine.
07:48 ndrei joined #salt
07:48 AndreasLutro pcdummy: dunno then, could be some weird behaviour when passing it to a salt module function
07:49 AndreasLutro I know I do {% if salt.environment.startswith('dev') %} and it works fine
07:50 Ztyx joined #salt
07:52 pcdummy AndreasLutro: still thanks, maybe i find another resolution.
07:52 pcdummy solution
07:53 bhosmer joined #salt
07:57 s_kunk joined #salt
08:01 phix pcdummy: no, should we?
08:01 phix ah ok
08:05 chiui joined #salt
08:08 pcdummy phix: just wondered why you ask me :)
08:09 pcdummy https://github.com/pcdummy/saltstack-resources <-- a long list of salt formulas in submodules if someone is interested
08:12 N-Mi joined #salt
08:12 N-Mi joined #salt
08:13 phix pcdummy: just being polite
08:13 pcdummy phix: he :)
08:13 phix sup?
08:13 pcdummy yeah :)
08:16 Xevian joined #salt
08:19 VSpike I don't get this. I have two saltmasters with identical ec2.conf files in /etc/salt/cloud.profiles.d but when I run salt-cloud --list-providers on one it runs with no errors, and on the other it complains about a profile being extended not being defined
08:19 stephanbuys joined #salt
08:20 impi joined #salt
08:21 VSpike https://bpaste.net/show/d741ea35645b
08:22 VSpike I spent a while yesterday trying to figure out a similar sort of issue, which turned out to be that you can have a profile that extends a profile that extends a profile
08:22 VSpike s/can/&'t/
08:22 VSpike It just dies with a stack trace
08:22 AndreasLutro VSpike: try again with -l debug maybe
08:26 VSpike AndreasLutro: not much that will help, I don't think. Spot anything? https://bpaste.net/show/b4e7879a0109
08:27 phix pcdummy: what's the latest?
08:27 pcdummy phix: the latest of what?
08:28 phix the latest in the life of a pcdummy
08:34 linjan joined #salt
08:36 julez joined #salt
08:38 AndreasLutro VSpike: if you're sure that the profiles config is identical, it may be because the provider names are different
08:40 pcdummy phix: have you seen "the life of brian" ? Then you know my life :P
08:41 markm joined #salt
08:42 phix pcdummy: oh so you're in the PFJ or the PJF?
08:43 VSpike AndreasLutro: yes, indeed it was that
08:43 VSpike Not a very informative error message :)
08:44 AndreasLutro agreed
08:44 AndreasLutro I think the issue is, profiles with a provider that's missing are silently skipped
08:44 AndreasLutro not sure if that's intended behaviour or not
08:44 VSpike I think you're right.
08:45 darknight87 joined #salt
08:46 darknight87 Hi guys, I have a python script, which I want to convert into a saltstack module. This module needs to be called on minions. How can I achieve this?
08:46 cast i'd start by looking at very simple existing modules, and using one of them as a template
08:47 evle Is there a way to use pillars outside of states? Something like
08:47 evle salt * cmdmod.shell "some_command {{pillar[password]}}"
08:48 fivmo joined #salt
08:48 darknight87 cast: I can't find any example where a python script was converted into a module. I just found a link which says place a python module in the _modules dir under the file_root
08:49 AndreasLutro evle: no, you'd have to run salt \* pillar.get, and pipe it through a parser
08:50 VSpike evle:something like PWD="$(salt 'aws-dev-p-db-1' pillar.get 'users:johncc:userinfo:password' --out=text | awk '{print $2}')" salt * cmdmod.shell "some_command {{$PWD}}"
08:50 evle I need command to be run with different parameters on different hosts.
08:51 evle Can't just render parameter on master.
08:51 VSpike except not $PWD
08:52 AndreasLutro evle: probably best to write a custom module then
08:54 keimlink joined #salt
08:55 evle AndreasLutro: It's just a lot of random tasks involving connection to database on every host in group. Obviously database connection settings are different everywhere. Tasks are too random to make a module and I'd like to avoid creating states since there is no reason to ever repeat them.
08:56 cast seems like useful generic behavior, rather than writing a custom module could extend cmd perhaps [if there isn't some way in salt that we're not seeing to do it already]
08:56 AndreasLutro according to the docs, in 2015.5 the cmd.shell module has a template arg
08:57 AndreasLutro so you could try cmd.shell template=jinja
08:57 gcfhvjbkn joined #salt
08:57 AndreasLutro then you can do {{ pillar.foo }}
08:57 keimlink joined #salt
08:57 cast i see that, that's pretty cool
08:58 ndrei joined #salt
09:00 otter768 joined #salt
09:02 evle Beautiful. Missed that somewhy.
09:03 evle One more thing. Should be something obvious but why is cmd module called cmdmod in documentation? (http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html)
09:04 bhosmer joined #salt
09:11 sk_0 joined #salt
09:11 ingslovak joined #salt
09:24 Aidin joined #salt
09:25 AndreasLutro evle: not obvious https://github.com/saltstack/salt/commit/18010c2cf632c5d1c4c54947259d8d7fca398e90
09:26 sk_0 joined #salt
09:27 evle AndreasLutro: Interesting. Makes documentation weird. :-)
09:28 AndreasLutro a bit yeah
09:29 napsterX joined #salt
09:31 ndrei joined #salt
09:35 packeteer joined #salt
09:37 impi joined #salt
09:40 seblu joined #salt
09:43 zooz joined #salt
09:46 marnom left #salt
09:46 marnom joined #salt
09:50 che-arne joined #salt
09:51 desposo joined #salt
09:55 jespada joined #salt
10:08 darknight87 joined #salt
10:17 LeProvokateur joined #salt
10:19 ndrei joined #salt
10:25 robothands joined #salt
10:27 jhauser joined #salt
10:27 ben_NN_ joined #salt
10:28 jim__ joined #salt
10:30 jim__ hey everyone, having a wee bit of trouble with Salt, salt-run manage.status suggests that all minions are down, but they're up, and hosts can all ping each other
10:30 jim__ any ideas what could be causing this?
10:39 sgargan joined #salt
10:40 julez joined #salt
10:41 yexingok joined #salt
10:46 ntropy do you get anything back from salt '*' test.ping?
10:47 ntropy when salt says minion is down, it means just that, it can't talk to the minion
10:48 aqua^c joined #salt
10:48 ntropy if the hosts are up and can establish connections to the master, then check that salt minion is running and master has accepted their keys
10:51 jim__ hm, salt-key -L shows no keys in any categories. Should I run key regen?
10:51 jim__ and salt '*' test.ping returns nothing
10:55 _JZ_ joined #salt
10:55 ntropy right, then are your hosts running salt minion?
10:55 ntropy thats kinda important :)
10:56 ntropy salt minion will generate its keys on start and will connect to master, if it can
10:56 ntropy at that point you should be able to see host keys in salt-key output
10:57 riftman joined #salt
10:58 evle joined #salt
11:01 otter768 joined #salt
11:02 inad922 joined #salt
11:15 amcorreia joined #salt
11:16 jim__ yeah jthey are
11:18 LotR and you changed the minion config to point to the correct master host?
11:18 giantlock joined #salt
11:30 darknight87 joined #salt
11:35 markm joined #salt
11:38 ingslovak joined #salt
11:38 ndrei joined #salt
11:41 DammitJim joined #salt
11:52 aqua^c joined #salt
11:53 TyrfingMjolnir joined #salt
11:54 darknight87 joined #salt
11:55 omegamike joined #salt
11:56 denys joined #salt
11:57 keimlink joined #salt
12:05 yexingok joined #salt
12:16 Ztyx joined #salt
12:20 stoogenmeyer__ joined #salt
12:33 pressureman joined #salt
12:33 furrowedbrow joined #salt
12:37 ninkotech joined #salt
12:44 riftman joined #salt
12:46 20WABNM8Y joined #salt
12:51 anotherZero joined #salt
12:52 aqua^c joined #salt
12:54 subsignal joined #salt
13:01 markm joined #salt
13:02 otter768 joined #salt
13:03 linjan_ joined #salt
13:05 jY i have the following in /etc/salt/minion https://gist.github.com/mzupan/a9d09675d2de07e8b0ee
13:05 hasues joined #salt
13:06 hasues left #salt
13:06 jY but the job never seems to run and its not listed in salt-call schedule.list
13:07 XenophonF joined #salt
13:08 XenophonF it's probably time to learn a templating mechanism other than jinja
13:09 XenophonF or possibly come to the realization that not every config can get shoehorned into pillar
13:09 eliasp XenophonF: just use plain Python to write your SLS
13:09 XenophonF eliasp: i think that's what it's coming to
13:10 eliasp babilen should have quite a few nice examples how this looks like…
13:10 XenophonF btw debugging salt templates is a pain
13:10 sunkist joined #salt
13:10 eliasp it takes time getting used to it… I'm mostly comfortable with it now
13:10 AndreasLutro would be nice if you could just print out a rendered template
13:11 eliasp AndreasLutro: you can…
13:11 AndreasLutro how? :o
13:11 eliasp AndreasLutro: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#debugging
13:11 eliasp AndreasLutro: ah wait, that's about the context
13:12 eliasp AndreasLutro: anyways… I'm mostly just using "show.low_sls" to see the resulting data structures
13:12 eliasp AndreasLutro: besides that, I think "-l debug" gives you the rendered YAML as output
13:13 eliasp AndreasLutro: "salt-call -l debug state.sls foo"
13:13 AndreasLutro yeah but that still runs all the states. you can put on test=True of course
13:13 eliasp sure
13:13 AndreasLutro also -l debug gives me literally 1000s of lines of output
13:13 jespada joined #salt
13:14 XenophonF my salt states repo is in git, so my commit history is littered with "Tweak Jinja whitespace controls in template foobar" :(
13:14 keimlink joined #salt
13:14 eliasp yeah, I mean the resulting YAML is part of this output
13:14 eliasp XenophonF: that's why you use an experimental/dev branch to get things stable, then rebase + merge back to master
13:14 AndreasLutro whitespace is da bomb
13:15 eliasp but yeah… whitespace control in Jinja causes a lot of pain ;)
13:15 AndreasLutro at least I use salt-ssh so I can run states before commiting
13:15 XenophonF that's exactly what i do
13:16 XenophonF commit, wait 60s or salt-run fileserver.update, state.sls, and repeat
13:16 XenophonF test=True
13:16 AndreasLutro yeah that sounds awful
13:16 AndreasLutro maybe set up a local master and a minion in a vm?
13:16 eliasp I just run a nspawn container where I bind-mount my salt-repos into… testing takes literally just a few seconds
13:16 pdayton joined #salt
13:17 Tecnico1931 joined #salt
13:17 XenophonF i was kind of hoping there's a way to call jinja.render or whatever it is with a saltenv argument
13:17 eliasp restarting the container from scratch to get back to a "clean" system also just takes 2-3 seconds
13:19 XenophonF that's a good idea
13:19 XenophonF maybe i can set something up on my mac or pc like that
13:19 giantlock joined #salt
13:19 DammitJim do you guys know what the salt enterprise offers that regular salt doesn't?
13:20 eliasp systemd-nspawn is Linux only… but similar (but slower) approaches can be achieved using kitchen-salt which uses Vagrant
13:20 XenophonF DammitJim, I'm a regular Salt user, not a sales engineer!
13:20 XenophonF ;)
13:20 DammitJim yup yup
13:20 DammitJim ;)
13:20 eliasp DammitJim: http://saltstack.com/saltstack-enterprise-benefits/
13:21 eliasp DammitJim: oh, sorry… that's just marketing-blurb
13:21 pdayton1 joined #salt
13:22 XenophonF I wonder if they have a free trial.
13:23 DammitJim yeah, it doesn't tell me anything
13:23 DammitJim I think salt by itself does all that
13:23 DammitJim not sure what the value proposition is
13:24 primechuck joined #salt
13:25 XenophonF support
13:25 XenophonF training
13:25 eliasp webinterface
13:25 XenophonF god yes
13:25 DammitJim they have a webinterface for the master?
13:25 eliasp yes
13:31 peters-tx joined #salt
13:32 pdayton joined #salt
13:34 jdesilet joined #salt
13:39 jhauser joined #salt
13:43 jespada joined #salt
13:44 DammitJim anyone here configure JASIG CAS?
13:45 favadi joined #salt
13:46 kusams joined #salt
13:47 cpowell joined #salt
13:48 quasiben joined #salt
13:48 darknight87 joined #salt
13:49 timoguin joined #salt
13:55 icflournoy joined #salt
14:00 yomilk joined #salt
14:00 dyasny joined #salt
14:02 ekristen joined #salt
14:04 ahammond joined #salt
14:07 andrew_v joined #salt
14:07 berserkir joined #salt
14:12 chiui joined #salt
14:12 kbyrne joined #salt
14:12 sgargan joined #salt
14:14 favadi joined #salt
14:15 pdayton1 joined #salt
14:15 berserkir joined #salt
14:19 giantlock joined #salt
14:19 mpanetta joined #salt
14:20 mpanetta joined #salt
14:21 pdayton joined #salt
14:25 spark_ joined #salt
14:27 pullphinger joined #salt
14:28 sunkist joined #salt
14:29 kawa2014 joined #salt
14:31 SheetiS joined #salt
14:33 murrdoc joined #salt
14:36 ipmb joined #salt
14:39 yomilk joined #salt
14:41 aqua^c joined #salt
14:42 adelcast left #salt
14:42 pguinardco DammitJim: Cas is on the way out the door, the suggested thing to go with is shibboleth for a server side implementation.
14:44 DammitJim oh really?
14:44 DammitJim shibboleth?
14:44 murrdoc shiboleth ?
14:45 DammitJim joined #salt
14:45 pguinardco Yes guys that do quite a bit of work on cas are working on moving it.
14:46 DammitJim hhhmmmmm
14:47 teryx510 joined #salt
14:47 DammitJim I wonder if it supports db2
14:48 pguinardco It will support the cas protocol for the server in the near future but I am not sure how long it will be supported
14:50 DammitJim confusing
14:50 darknight87 joined #salt
14:50 pguinardco It's so that some people can make the transission without breaking things
14:53 spark_ joined #salt
14:57 furrowedbrow having trouble running highstate on masterless minion salt-call —local state.highstate output and file_roots info here, can somebody advise me on what I could be doing wrong? http://pastebin.com/XnRM8TXk
14:57 quantumsummers left #salt
15:03 otter768 joined #salt
15:11 adelcast joined #salt
15:21 icflournoy joined #salt
15:21 pguinardco You man not have anything defined for your minion in your top file.
15:22 kbyrne joined #salt
15:23 murrdoc ok
15:23 zsoftich1 joined #salt
15:25 andygabby joined #salt
15:26 mpanetta joined #salt
15:27 spark_ joined #salt
15:29 ajw0100 joined #salt
15:29 kbaikov joined #salt
15:30 jondonas joined #salt
15:33 sgargan is it possible to run a script in a sls and use the output of the script as data for other states in the sls?
15:42 codehotter sgargan: I am very new to salt, but I think you can write python code that calls some state and does something with the output
15:42 codehotter sgargan: what do you need this for?
15:42 aparsons joined #salt
15:42 omegamike joined #salt
15:42 codehotter sgargan: maybe as a more experienced user, you can help me! I want to run a command (selinux policy rebuild) only if the previous command (upload a new selinux policy package) changed something.
15:42 codehotter should I use watch for this?
15:45 codehotter Or maybe cmd.wait?
15:45 timoguin joined #salt
15:45 omegamike joined #salt
15:48 sgargan this might be a case of the the blind leading the blind
15:49 codehotter I absolutely recommend that you never follow any of my advice
15:50 sgargan likewise ;)
15:50 sgargan might any of the conditionals help you
15:50 sgargan ?
15:51 sgargan i think what we’re both trying to do is very similar
15:51 jsjb joined #salt
15:51 LotR codehotter: yes, use watch for that. but isn't there a selinux formula that makes things easy?
15:52 danlsgiga joined #salt
15:52 codehotter LotR: I think I can enable selinux booleans with salt.states.selinux, but not sure how to upload a custom selinux policy package (.pp file)
15:53 danlsgiga is there any way to merge aggregate pillar key values to the formula defaults? I have an array of package names that must be installed by default, but I want to specify additional packages for some servers only using Pillar
15:53 hasues joined #salt
15:54 codehotter is there a thing I can name my sls file so that if I call the directory it is in, it will automatically load that sls?
15:54 codehotter like index.html is automatically loaded if I specify a directory in my webbrowser
15:54 jespada joined #salt
15:55 codehotter without putting /index
15:55 zsoftich1 init.sls
15:55 codehotter thanks
15:56 zsoftich1 codehotter: https://github.com/saltstack-formulas/template-formula can be a good reference
15:56 iggy danlsgiga: sadly, no... use 2 separate datasets (required_pkgs_list user_pkgs_list or whatever)
15:57 hasues left #salt
15:57 codehotter zsoftich1: oh, neat! Thanks
15:57 spark_ joined #salt
15:57 danlsgiga iggy: really? =/
15:57 iggy danlsgiga: then {% set pkgs_list = required_pkgs_list + user_pkgs_list %} {% for pkg in pkgs_list %}....
15:58 clintberry joined #salt
15:58 iggy codehotter: there's also https://github.com/SS-archive/salt-states
15:58 LotR codehotter: I've never used selinux myself, but if this .pp is just a file, you can put it on the minion with file.managed, and then run the policy rebuild thing with cmd.wait I guess
16:00 codehotter Is there a way to do selinux rebuild only once, if I have multiple policy packages? It uses a lot of memory/cpu and takes rather long
16:00 codehotter I need to rebuild if any one of the modules changes, but preferably only once
16:00 LotR iggy: it can work with the new PillarStack thing, right?
16:00 codehotter I guess I can put a single cmd.wait at the end, and watch multiple things
16:00 SheetiS codehotter: you could do a 'listen_in' so that it did it at then end
16:01 SheetiS or watch_in works too
16:01 codehotter how do I do it if I am applying multiple states, any of them might upload a policy package, and I want to rebuild policy only once?
16:01 codehotter can I include a cmd.wait state and then listen_in that one?
16:02 SheetiS yeah you'd have to include the cmd.wait state file in any of your other states that could affect it
16:02 SheetiS then just tell the individual states in the file to 'listen_in' the cmd.wait state
16:02 codehotter SheetiS: perfect, thanks!
16:03 codehotter if I listen_in, it does it once at the end, if I watch_in, it does it immediately? Did I understand it correctly?
16:03 codehotter or more like, if I watch_in, it's going to do it at some random point in the future?
16:04 codehotter Let's say I have the opposite use case, and I need to rebuild selinux policy right after uploading it, before the next state runs
16:04 codehotter is that what watch_in does?
16:04 SheetiS it could happen mid states any time after all watch_in were met with watch
16:04 codehotter normally I rely on the ordering in my file and don't put requisites everywhere. How does watch_in work with that? Is it inserted between the watch_in state and the next state in my file?
16:05 SheetiS watch_in wouldn't run more than once afaik, but it wouldn't necessarily happen at the very end.  Just after all the watches were met I think.
16:05 codehotter oh, hmmm.
16:05 SheetiS if you had watch_in on 13 things, it could run any time after all of those were met
16:05 SheetiS but not necessarily at the very end.
16:06 codehotter OK, so if I need it to run immediately, I can put a new cmd.wait right under it, doing selinux rebuild, rather than including my 'central' selinux rebuild
16:06 SheetiS if you are using ordered runs (no require or require_in), watch will mess with ordering, where listen will not.
16:06 codehotter the new cmd.wait only listen/watch one thing so it will run right away
16:06 codehotter Is that correct?
16:06 SheetiS yeah you could have a separate one for things that need to run immediately
16:06 SheetiS if you use listen, it is always at the end though.
16:07 codehotter OK, so if I need it to run immediately, in the place it is in the file, I need to put watch, and make sure nothing else also watches that same cmd.wait
16:07 codehotter I mean watch_ins*
16:07 codehotter nothing else watch_ins that same cmd.wait
16:08 codehotter Does that guarantee it is run in the place it is in the file?
16:08 SheetiS While you cannot determine specific order with watch/watch_in, I think that would work mostly as you say.
16:08 codehotter hmmm
16:08 SheetiS if you need an exact order, you can use - order:
16:08 codehotter I need the exact order it is in my file
16:08 codehotter that's how my brain works =(
16:09 SheetiS http://docs.saltstack.com/en/latest/ref/states/ordering.html#the-order-option
16:10 speriyasamy joined #salt
16:10 codehotter Is there any way to get output halfway through a state?
16:10 codehotter Like it already tells me 1 2 3 succeeded, while it is doing 4
16:10 codehotter currently it just gives me a full explanation at the end
16:12 ageorgop joined #salt
16:12 speriyas_ joined #salt
16:14 Eureka703 joined #salt
16:15 zsoftich1 -l debug
16:15 JordanRinke joined #salt
16:15 murrdoc is there a 'IS PHYSICAL' or "IS VIRTUAL' grain ?
16:16 Eureka703 left #salt
16:16 speriyas_ joined #salt
16:16 Eureka703 joined #salt
16:17 LtLefse murrdoc: there is a grain called "virtual"
16:17 perfectsine joined #salt
16:17 murrdoc yeah
16:17 murrdoc u right
16:17 LtLefse shows "physcial" or "kvm" for me
16:17 codehotter zsoftich1: I probably shouldn't do state.highstate, then? Becaus well, that only runs one thing, and then waits for highstate output to come back
16:17 codehotter what should I run instead of state.highstate to get state-by-state output
16:19 murrdoc LtLefse:  {% if salt['grains.get']('virtual') == 'physica' %}
16:19 murrdoc should work ?
16:22 spookah joined #salt
16:25 Eureka703 Hi all. Having an issue with reactor. Im getting an exception cmd_async() takes at least 3 arguments (2 given) error.
16:25 Eureka703 Any thoughts?
16:27 darknight87 joined #salt
16:28 aparsons joined #salt
16:29 KyleG joined #salt
16:29 KyleG joined #salt
16:29 Eureka703 Oh, looks like i found it thanks to an old post by quique =) Looks like you need to somehow specify tgt: to target a minion.
16:30 aqua^c joined #salt
16:33 LtLefse murrdoc: I have stuff like {% if grains['os'] == 'Debian' %}
16:33 LtLefse is grains.get a better practice?
16:34 murrdoc yeah
16:35 murrdoc the l33test is salt.grains.get('key')
16:35 murrdoc but i dont trust the salt loader enough to do that
16:35 toastedpenguin joined #salt
16:36 LtLefse working-ness > l33t-ness
16:36 murrdoc u got it
16:37 iggy murrdoc: it's not 100%, but usually works pretty well
16:37 iggy (i.e. GCE reported physical until 2015.5)
16:40 amcorreia joined #salt
16:45 danlsgiga iggy: I'm checking the yamlex renderer... question: do I need to do anything else in my formula do render my pillars as yamlex?
16:46 danlsgiga iggy: I've changed my pillars to have the header #!yamlex and I'm setting my list with the !aggregate tag
16:46 iggy never used it
16:47 danlsgiga ok... will keep trying... this type of merging is crucial for me
16:47 iggy LtLefse: salt.grains.os should work too
16:48 iggy danlsgiga: my suggestion is to find another solution... even if you manage to sort of, kind of get the merging working... the merging has been _very_ inconsistent for us (even changing between point releases)
16:49 nesv joined #salt
16:50 danlsgiga iggy: You mean, the aggregate merging strategy?
16:50 darkhuy joined #salt
16:52 iggy I've never used it because the syntax makes me want to claw my eyes out
16:53 iggy no, I meant regular merging
16:55 toastedpenguin joined #salt
16:57 danlsgiga iggy: ok, so the best option for now is your first suggestion to merge using 2 different dicts
16:57 tomh- joined #salt
16:57 iggy it's an option, there are probably others
16:58 LotR danlsgiga: what about https://github.com/bbinet/pillarstack or am I misunderstanding your problem?
16:59 gcfhvjbkn http://i.imgur.com/dnXcS5V.png
16:59 gcfhvjbkn what is that that salt-minion does with all that memory?
16:59 gcfhvjbkn blue is the program that i run
17:00 gcfhvjbkn red is salt-minion while i run it
17:00 gcfhvjbkn orange is salt-minion running as usual
17:00 iggy 50M doesn't seem terrible for a python application
17:00 gcfhvjbkn yeah, but what is he doing with it?
17:00 gcfhvjbkn *it
17:01 iggy loading grains, modules, the state compiler, outputters, returners, pillars, etc
17:01 gcfhvjbkn it didn't occur to me that salt-minion needs to do anything other than os.Popen at that time?
17:01 gcfhvjbkn but the difference of 8% (40mb) …
17:01 quasiben joined #salt
17:02 danlsgiga LotR: Don't think so... I just want some way of aggregate merging my pillars... I have a list of default packages to be installed by all nodes and some specific nodes have additional packages
17:02 iggy gcfhvjbkn: it does a lot more
17:03 danlsgiga LotR: I was trying to use yamlex but it doesnt seem to be working
17:03 LotR danlsgiga: yes, that thing is all about merging pillars
17:04 otter768 joined #salt
17:06 kusams joined #salt
17:06 aparsons joined #salt
17:10 kusams joined #salt
17:12 danlsgiga LotR: pillarstack looks interesting, thanks for the suggestion!
17:15 viq joined #salt
17:15 Bryson joined #salt
17:16 aparsons joined #salt
17:23 quasiben joined #salt
17:24 ageorgop joined #salt
17:26 danlsgiga LotR: Do you use PillarStack? Is it ready for production?
17:27 s_kunk joined #salt
17:28 LotR danlsgiga: I only discovered it a few days ago. I have yet to start implementing it myself
17:29 gcfhvjbkn joined #salt
17:29 LotR danlsgiga: but it's only a small bit of code, so..
17:29 murrdoc joined #salt
17:30 LotR danlsgiga: contact the author and ask him how he'd rate its status?
17:36 murrdoc joined #salt
17:36 desposo joined #salt
17:43 zer0def joined #salt
17:49 spark_ joined #salt
17:55 michelangelo joined #salt
17:55 cliluw joined #salt
17:57 andrew_v joined #salt
17:59 lexter joined #salt
17:59 kevops joined #salt
18:00 aboe joined #salt
18:01 perfectsine joined #salt
18:01 ageorgop joined #salt
18:02 kevops Has anyone seen "Specified file not present to generate hash" when pulling from blob storage?
18:02 kevops no problems dl'ing the file otherwise
18:03 kevops sorry. error occurs when runing salt-call state.highstate
18:03 kevops from client
18:06 kusams joined #salt
18:08 zooz joined #salt
18:13 denys joined #salt
18:16 baweaver joined #salt
18:19 aqua^c joined #salt
18:19 tomasq anyone have experience removing grains from a minion via cli? I tried: salt 'minion' grains.absent, but the error is 'grains.absent' is not available: http://pastebin.com/ZDp1Va3w
18:20 linjan_ joined #salt
18:20 murrdoc joined #salt
18:21 whytewolf tomasq: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.delval and http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.remove
18:21 tomasq ooh, I was reading states/ and not modules/, thanks!
18:22 gcfhvjbkn joined #salt
18:26 Bart_ Hi guys, this could be more of a general Python question but this code works when doing a "salt-call" from the minion, but not from the master
18:26 Bart_ https://gist.github.com/anonymous/ce5f274d0e0cc6917a40
18:27 Bart_ It's a simple PopUp alert
18:27 Bart_ Any idea why ?
18:30 Bart_ The module does run form the Master without crashing, but nothing happens... As if the script did not run properly... But why would it work via "Salt-Call" on the minion
18:30 iggy you want to run a command on the master and popup a command on the osx minion?
18:31 XenophonF maybe because salt-call's running within some security context or environment that lets it do things the master or minion itself can/t
18:31 XenophonF left #salt
18:32 iggy I'm guessing more like <osx equivalent of DISPLAY> not set
18:32 LtLefse Bart_: I don't know about Darwin but with linux/X11 that wouldn't work remotely because 1) the minion doesn't know what DISPLAY to send the dialog to and 2) even if it does, it doesn't have authorization
18:32 whytewolf it is also possable that in the context. the script doesn't know where to display the popup when run from the master as when you run it from the salt-call you have an enviroment set that lets it know where the display is
18:32 LtLefse in X11 there's xauth cookies, Mac probably has something similar
18:32 whytewolf or what iggy just said
18:33 iggy at least we're all thinking along the same lines... even if none of us know osx well enough to actually be helpful
18:34 Bart_ I see, you're right on my CenOS verison of this script I do specify a Disaply
18:34 Bart_ Display*
18:34 kusams joined #salt
18:35 iggy now search for "osascript run from cron not displaying"
18:35 iggy or something
18:35 iggy cron just seems like the most logical place that would fail
18:35 baweaver joined #salt
18:38 icflournoy joined #salt
18:38 whytewolf ahh try this. tell app 'Finder' display dialog "%s" buttons {"Ok"} with icon stop with title "test"' &
18:39 whytewolf err. change quotes around to match what you need
18:40 whytewolf or change the app to 'System Events'
18:40 iggy <3 atom.io + language-salt
18:41 Bart_ I'll find a way to tell "AppleScript" wich Disaply
18:42 whytewolf Bart_: no literally it is tell app 'appname' http://alvinalexander.com/mac-os-x/applescript-shell-unix-command-line-bash-dialog
18:42 s_kunk joined #salt
18:43 Bart_ I'll give it a shot
18:44 whytewolf I forgot applescript has that built in natural lang stuff.
18:44 baweaver joined #salt
18:45 Bart_ Yaa its horribal hahaha
18:45 Bart_ HOrrible*
18:45 Bart_ Nice got it working
18:45 Bart_ SO by adding the "tell app "Finder" to .....
18:45 iggy trbl </CharlesBarkley>
18:46 Bart_ also adding "tell app "Finder" to activate"  after, otherwise the popup is in the background
18:46 calzadron joined #salt
18:47 whytewolf yay!
18:48 whytewolf so in the end it wasn't a salt issue. or a python issue. it was an applescript issue
18:48 zooz joined #salt
18:49 Bart_ Haha well it was a coding issue :-)
18:49 iggy there's another term for that
18:50 Bart_ Thank guys !
18:50 ayee I'm trying to stand up kubernetes using this salt repo: https://github.com/jonlangemak/saltstackv2 , I got all green when I run `salt '*' state.highstate`, but it doesn't seem like the kubernetes binaries were put on any of the hosts or started. I'm not sure if 'masterinstall.sls' or 'minioninstall.sls' were run.
18:51 Bart_ I came here beacause it was working via "salt-call", I won't come here to troubleshoot my AppleScript issues
18:51 Bart_ :_P
18:51 ayee Here are the results of the run: https://gist.github.com/anonymous/6051185519aa3bfc9be5
18:51 iggy ayee: that repo doesn't work (it didn't for me anyway)
18:51 ayee There are two top.sls files, I think I'm confused about which top.sls goes in what directories. I have the default master config.
18:52 ayee iggy: ahh, I see. What kubernetes salt deployment did you use?
18:52 iggy still working on that
18:52 ayee iggy: You have a github repo yet?
18:52 iggy tbh, I f'ing hate kubernetes
18:52 iggy no, it's all internal for now
18:52 ayee ok
18:53 ayee I'm going to work on basically the same thing
18:53 iggy (kind of hoping I get a job offer from somewhere else before I have to finish this)
18:53 ayee Though it's only my second day playing with salt.
18:53 ayee but I did get my minions and master setup properly for salt.
18:53 ayee iggy: ahh, so I won't hold my breath for your kubernetes salt deploy.
18:54 ayee I deployed kubernetes manually once now, it wasn't that bad. at least for a single node
18:54 ayee the HA stuff looks pretty tricky though
18:54 iggy ayee: we use debian too, I looked at adding debian support to that repo, but they guy seemed unresponsive to anything I sent him, so I decided to go at it alone
18:54 ayee o, I sent him an email, he got back to me in 5 minutes
18:55 iggy nobody likes me I gues
18:55 whytewolf salt likes you iggy
18:55 iggy it really doesn't
18:55 * iggy looks at all his open bug reports on github
18:55 ayee How can I run the template code in an sls file manually?
18:56 ayee say from the salt master
18:56 ayee to validate if a statement is true or false, or whatever
18:56 ayee `if 'minion' in salt['pillar.get']('kube_nodes:' ~ grains['host'] ~ ':type')`
18:56 ayee I want to see the result of that, for one minion in particular.
18:56 iggy you don't
18:57 ayee I'm assuming I can stuff print statements or something in the template?
18:57 whytewolf nope
18:57 iggy you can run grains.get host and pillar.get 'kube_nodes......
18:57 ayee How do you debug stuff?
18:57 iggy and approximate it
18:57 whytewolf with a lot of effort
18:57 ayee oy
18:57 quasiben joined #salt
18:58 iggy oh, you can use "salt-call -l debug state.sls foo.state" and it'll show you the rendered yaml
18:58 whytewolf iggy. I think it is in the top file
18:59 whytewolf salt 'minion' state.show_highstate
18:59 whytewolf ?
18:59 iggy that was always hard for me to read
19:00 murrdoc its been a problem since u were a kid
19:00 iggy by the time I gained enough knowledge to grok show_highstate, I didn't really need to see debug output
19:00 * iggy throws poop at murrdoc
19:00 soren joined #salt
19:01 murrdoc hah
19:03 Sokel joined #salt
19:04 Sokel left #salt
19:05 otter768 joined #salt
19:05 nesv joined #salt
19:07 andrew_v_ joined #salt
19:20 ndrei joined #salt
19:24 thayne joined #salt
19:25 ferbla joined #salt
19:27 baweaver joined #salt
19:36 DammitJim joined #salt
19:37 kaptk2 joined #salt
19:41 Bart_ Simple "IF" and requirements question here, https://gist.github.com/anonymous/fb57ec2ffaa083a4a654
19:42 Bart_ WHen states are "required" but between "IF", they do not resolve if the "IF" is not True
19:43 Bart_ in the code example, if /usr/bin/gcc is present
19:43 irated left #salt
19:44 Bart_ command_line_tools will not be set, and since it's required by my "salt" command, it fails... How can I keep my code from running unecessary installs if I can't "IF"
19:45 tomasq Bart_: you want these http://docs.saltstack.com/en/latest/ref/states/requisites.html instead of those if's
19:45 tomasq I think
19:45 mrwboilers joined #salt
19:46 Slimmons joined #salt
19:46 mrwboilers I have what I hope is just a quick question:
19:46 kusams_ joined #salt
19:47 mrwboilers Can you use wildcards when templating?
19:47 Slimmons if you have a cmd.run sent to a minion that tells it to run a python web server, (or anything that has a continuously running state), will salt stop there, or just report that it executed correctly, and have it running on aprocess on the minion?
19:47 Slimmons I would think the second, just trying to troubleshoot a problem
19:48 mrwboilers For example, something like {% if grains['ipv4'] == '192.168.100.*' %}  ??
19:49 Bart_ Tomasq: Thanks but the "required" part seems ok between my two states, it's more of a "Don't run if you don't need to, but make sure everyone else knows you exist"
19:50 Bart_ If you look at my code example, it's pretty simple, but it fails If i have "gcc" present
19:50 whytewolf Bart_: the if's render before the require checks. so the state that is "required" doesn't exist to salt. so it can't meet the requirement and so doesn't run
19:50 Bart_ because the "command_line_tools" is never loaded, and "salt" depends on it...
19:51 Bart_ I undestand that, but how can I achieve this then ?
19:51 Bart_ without running commandline installs at every .highstate"
19:52 whytewolf onlyif and unless
19:53 whytewolf http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
19:53 tomasq check for gcc and nest the second if inside of it
19:53 tomasq if gcc; then if pip; then stuff; endif; endif
19:53 tomasq but requisites would be better
19:55 Bart_ Tomasq: it won't work if I have gcc already intalled
19:56 Bart_ Whytewolf: I think I need to go onlyif on my cmd.run state
19:56 Bart_ I don't see other options
19:56 whytewolf Bart_: yes it actually reads cleaner then poping jinja if statments all over
19:56 tomasq if gcc installed; then install pip/upgrade salt; elseif install gcc; then install pip/upgrade salt
19:57 mrwboilers Is there another operand that I would need to use instead of "==" something like "like" or anything else?
19:57 tomasq the advice I'm giving there is horrible though
19:57 mrwboilers Or do you have to match the entire grain or none at all?
19:57 Bart_ Tomasq: You're right I see what you mean
19:58 Bart_ I think I'll go with "WhyteWolf approach
19:58 Bart_ Cleaner
19:58 whytewolf Bart_: you could also use creates. since you are just checking if a file exists
19:59 whytewolf https://gist.github.com/whytewolf/589fa0100acb8a870d8a
20:00 Bart_ what would that tell salt states exactly ?
20:00 whytewolf it would tell the cmd.run to not run if the file that it "creates" already exists
20:00 Bart_ oh ok ok
20:01 Bart_ thanks for the options
20:01 whytewolf unless and onlyif would be better if you wanted to upgrade it if a newer vewsion was there
20:01 druonysus joined #salt
20:01 Bart_ It's probably faster to
20:01 Bart_ Ya, check a version or something
20:02 Bart_ option 1:      unless: test -f /usr/bin/gcc
20:02 Bart_ option 2:      - creates: /usr/bin/gcc
20:02 Bart_ such small code, that the difference is minimal :-)   but really good to know
20:04 Bart_ last question, does the "onlyif" "unless" so on.... work on most states or just the "cmd.run"
20:04 whytewolf I have read that onlyif and unless works on most states. but i have not tested it. also creates is cmd only.
20:05 Bart_ Thank you very much, this IRC channel is heaven
20:05 Bart_ I read the Doc a lot, but sometimes it's just good to have a quick question answered :-)
20:06 druonysuse joined #salt
20:06 druonysuse joined #salt
20:06 whytewolf no problem that is what the channel is here for [unles i am wrong about that]
20:07 tmclaugh[work] joined #salt
20:12 pfallenop joined #salt
20:12 mrwboilers I suppose it's actually jinja that I need a guide to, not yaml, correct?
20:15 iggy Slimmons: the minion gets pissed (unless you properly background/daemonize it somehow)
20:15 kevops hey room.  all of my minions are timing out on installing a pkg that is stored in blob storage.
20:16 kevops warning speciefied file http:/... is not present to generate hash
20:17 iggy mrwboilers: {% if grains['ipv4'].startswith('192.168.100') %}
20:17 iggy Bart_: require_in
20:18 mrwboilers iggy: Many thanks!
20:18 baweaver joined #salt
20:18 iggy mrwboilers: also {% if '192.168.100' in grains['ipv4'] %} (if you don't actually need the string at the start)
20:19 iggy kevops: you have to specify a hash for http:// uris
20:19 druonysus joined #salt
20:20 giantlock joined #salt
20:23 Ztyx joined #salt
20:24 Ztyx joined #salt
20:24 sophomeric For detecting what init system is in use, what's wrong with 'cat /proc/1/cmdline' :P
20:26 X67r joined #salt
20:26 andrew_v joined #salt
20:30 kevops iggy: i'm on an older version and it was working w/o a hash.  any thoughts?
20:31 ajw0100 joined #salt
20:36 druonysus joined #salt
20:39 KyleG joined #salt
20:39 KyleG joined #salt
20:40 iggy is everything on the older version?
20:40 iggy either way, you're going to have to put a hash in there at some point, so might as well do it now
20:40 Slimmons iggy: thanks
20:43 sjwoodr joined #salt
20:44 sjwoodr Hey guys.  Do you ever see a case where state.highstate takes a long time (15+ mins) on a minion but it completes in under 2 mins for other minions using the same states, on the same sized hardware ?  If so, how would go about debugging that?  The /var/log/salt/minion file doesn't show anything happening.... and then after a long time, it does show the activity.
20:44 Ztyx1 joined #salt
20:45 iggy probably a command waiting for input
20:46 sjwoodr Hmm, possible.  But why wouldn't it hang on the other minion(s) ?
20:46 sjwoodr OH, i should look at the highstate output and see which task had the long duration.... duh.
20:46 kevops iggy:  many thnks for the response.  i'll do that.
20:47 sjwoodr here is a "file.directory" with Duration: 137145.789 ms
20:47 sjwoodr the directory in question is 3.9gb ... so maybe its taking a while to check all the content
20:47 iggy oh, probably lots of small files (that happens on my graphite host recursively setting owner on all the graphite files)
20:48 sjwoodr but its strange that another minion breezes through that.
20:48 iggy do the other minions have the same number of files in that dir?
20:48 iggy sudo salt '*' cmd.shell "find /path/to/dir/that/takes/forever | wc -l"
20:49 sjwoodr -recurse with -user -group .... so its setting ownership on every file
20:50 sunkist joined #salt
20:50 sjwoodr about a 80k difference in the # of files  ... 215k vs 280k files  but this is a dev box vs. a staging box.
20:51 iggy VMs?
20:51 whytewolf do the boxes that are taking a while have a higher io wait on avg?
20:51 iggy yeah, this just sounds like what I ran into the other day... you pay a price for sizing dev instances smaller than production
20:52 iggy and that cost is time I'll never get back
20:52 sjwoodr no, they're both t2.small EC2 instances
20:52 sjwoodr we run m3.xlarge for prod but t2.small in dev and stage
20:52 iggy EBS?
20:52 sjwoodr yeah for all
20:52 iggy different volume sizes?
20:53 LV-426 is it possible to trace the logic associated with a minion grain, eg. establish whether salt considers /etc/debian_version when looking up 'osrelease'?
20:53 sjwoodr that i'd have to check
20:54 iggy LV-426: in the source, yeah
20:54 iggy LV-426: that's probably going to be in salt/grains/core.py
20:54 LV-426 ok, tried here: https://github.com/saltstack/salt/blob/develop/salt/modules/grains.py,
20:54 LV-426 I'll give core.py a look
20:57 sunkist joined #salt
20:58 thayne joined #salt
20:58 teryx510 joined #salt
20:59 ageorgop joined #salt
21:00 sjwoodr iggy: actually my mistake... dev is t2.small (burstable) and staging was m1.small (slow as molasses)
21:01 timoguin joined #salt
21:02 ndrei joined #salt
21:02 ingslovak joined #salt
21:04 whytewolf wow, didn't know you could still get m1 instances. thought they decommed those. [been a while since i have used AWS]
21:04 sjwoodr yeah... they're previous gen stuff but apparently still there.  no idea how or why someone on my team built it that way
21:05 sjwoodr the cloud profile for dev and stg should have been the same
21:05 whytewolf when i used AWS m1 was the only instence type
21:05 LV-426 ok, for anyone interested 'osrelease' on Debian stems from platform.linux_distribution()
21:06 otter768 joined #salt
21:06 sjwoodr yeah i just looked at the cloud.profiles.d dir and for this app type they're t2.small for dev and stage and m3.xlarge and c4.xlarge for our prod instances
21:07 whytewolf is the m1 the one having the performence issues?
21:07 Ztyx joined #salt
21:07 KyleG joined #salt
21:07 KyleG joined #salt
21:08 Ztyx joined #salt
21:09 zooz joined #salt
21:15 sjwoodr yes, sure is
21:15 sjwoodr i'll stop it, bump it up to t2.small and i expect it'll be better.  for some reason i thought both were the same...
21:18 soren joined #salt
21:19 sgargan joined #salt
21:21 amanuel joined #salt
21:25 spookah joined #salt
21:27 green_ joined #salt
21:28 greenage joined #salt
21:29 greenage Hi all... So, salt '*' test.ping from the master tests connectivity to all the minions but is there a way from one minion to see if it's connected to the master?
21:29 hybridpollo joined #salt
21:29 Kraln joined #salt
21:30 nesv joined #salt
21:31 darknight87 joined #salt
21:36 markm joined #salt
21:36 aw110f joined #salt
21:37 teryx510 Seems like salt-call test.ping works for that functionality???
21:38 strobe joined #salt
21:40 greenage Does it? I wasn't sure. I just deleted one of my minion
21:40 greenage minion's keys off the master to test and it still returns Local: True
21:40 strobe hi, i'm new to salt and having a hard time understanding the approach to templates.   I have situation where i need to create x number of ini files based on data in a pillar.  I have an sls file that loops over the pillar data successfully, but I'm trying to understand how I create each file (named and configured dynamically) in an jinja template off of that sls file
21:40 cberndt joined #salt
21:41 EvaSDK strobe: sls files are template of their own
21:41 strobe i've tried creating the jinja template that imports a variable set in the parent sls, but it can never find the variable
21:41 EvaSDK so you can create loops there as well
21:41 strobe @EvaSDK so I can't nest a template off of a template then?
21:41 EvaSDK you must specify it in the state, it's in the examples iirc
21:42 EvaSDK if you want to change the name, it's going to be hard from inside the template itself
21:43 strobe where do i find the example you're referring to?
21:43 EvaSDK I'm looking it up
21:44 strobe ahh thank you very much
21:44 EvaSDK http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html -> defaults is one thing
21:44 EvaSDK context it is
21:44 greenage @teryx510 You were right. Thanks, turns out I left auto_accept on in my test env :/
21:48 julienlavergne joined #salt
21:50 sgargan joined #salt
21:53 greenage joined #salt
21:54 strobe joined #salt
21:56 aqua^c joined #salt
21:57 Bryson i’m having trouble with starting PostgreSQL’s service. Anybody around who might help?
21:58 eccentricson joined #salt
21:58 eccentricson Good afternoon #salt!
21:59 Bryson I think we’re the only ones here, eccentricson
22:00 eccentricson I have hopefully a quick question, I'm utilizing the user formula that's up on the github repo for Salt.  I have the pillar for users.sls that contains the user information, but it's not pulling down the ssh key from source: http://pastebin.com/m7CHMRn5
22:00 eccentricson Well Bryson you're the only one I need :D
22:00 Bryson I wish that were true for both our sakes! I came with a question also, and am no expert.
22:00 eccentricson hehehe well, what's your question?  I might be able to answer it!
22:01 Edgan joined #salt
22:01 Bryson When I start the Postgres process, salt starts it without daemonizing the process, so the state.highstate command just hangs, and never finishes.
22:02 iggy Bryson: paste your code to gist.github.com
22:02 Bryson http://pastebin.com/78nE8nyh'
22:03 Bryson http://pastebin.com/78nE8nyh
22:03 iggy eccentricson: that's the pillar?
22:03 eccentricson correct iggy  it's missing a u to finish "users"
22:04 eccentricson Bryson: if you enable reload, does it properly reload the service?
22:04 Bryson no, reload didn’t change anything enabled or not
22:05 eccentricson Interesting.  Are you sure the service is postgresql and not postgresql-9-4 or something like that?
22:05 iggy initdb doesn't start the server
22:05 Bryson correct
22:05 iggy it creates data files/etc
22:05 Bryson but you can’t start the server without having run that
22:06 iggy are you sure that's not the part hanging?
22:06 linjan_ joined #salt
22:06 iggy and do you want that running every time?
22:06 eccentricson Yeah, having initdb running everytime would worry me :D
22:07 Bryson no, i do not want it running every time. but i’m just focusing on one thing at a time. first thing: get the server bootstrapped and running.
22:07 Eureka703 Hi All. Im trying to work with the git.status (or git.pull) but I keep getting an error saying "specified cdw either not absolute or does not exist". I am fairly sure I have things setup correctly? https://gist.github.com/anonymous/4503d34314804d416bd7
22:08 eccentricson I would break out the cmd.run and service.running into separate states within the one sls.  so like postgresql-init: and postgresql-enable:   or something like that, to be able to pinpoint whether it's truly the enable or is the init breaking it
22:09 Bryson eccentricson: i will do that now and see what happens.
22:09 iggy eccentricson: the pillar for users-formula uses ssh_auth_sources not ssh_auth.present
22:09 eccentricson and iggy I can see the .ssh directory being created for the user, but no authorized_keys there.
22:10 Bryson eccentricson: if i run state.highstate, won’t it run both of the states in the single .sls file anyway, though?
22:10 eccentricson Ahh let me take a gander at the state again!
22:10 eccentricson Bryson: yes, but it should tell you which state it's hanging on in the logs.  OR you could separate into separate sls'
22:11 iggy Eureka703: what command are you running that errors (paste it, you can revise gist's)?
22:11 iggy Eureka703: also paste the exact error message...
22:13 eccentricson iggy: I switched it to     ssh_auth_sources:    but no bueno.  I didn't find that in the init.sls for the state, where did you find htat?
22:13 iggy eccentricson: pillar.example
22:13 eccentricson Thank you!
22:13 primechuck joined #salt
22:14 iggy that formula is tough to read
22:15 aw110f joined #salt
22:15 Eureka703 @iggy I created a new one. https://gist.github.com/anonymous/9021c6de1d844ec9e3ed
22:15 dopesong joined #salt
22:16 iggy Eureka703: cwd vs cdw
22:16 Eureka703 As listed, I am using event.send from the minion to generate an event for reactor. Reactor is then running the .sls file which should use git.status or git.pull to do work with a git repo. After which it restarts services.
22:16 eccentricson iggy: https://gist.github.com/anonymous/97bfb9cf3d9e06bc08fa   I changed it, but no bueno. :(
22:17 Eureka703 @iggy i seem to get the same error regardless of using cwd or cdw
22:18 eccentricson Eureka703: same error?  This should've at least changed: "{\'cdw\': \'/opt/myproject/\'}""
22:19 eccentricson Can you post the error you just got in the channel here?
22:19 iggy Eureka703: you may need to restart the master... reactors are a weird one
22:19 Eureka703 Oh, yeah -- that part changes. I just mean that the overall error is still the dir either not absolute or does not exist.
22:21 eccentricson Would he have to put the path in quotes, maybe?  iggy
22:22 Eureka703 @iggy I just tried changing it and restarting each time. No dice so far. Ill try a few more things though.
22:22 ljt joined #salt
22:25 Eureka703 @iggy So here is an annoyance. If I run " salt '*dev*' salt.status /opt/myproject it works. If I put it in the SLS file for the reactor it breaks.
22:28 bfoxwell joined #salt
22:31 Eureka703 @iggy oh, i may have found it. It seems that I have to specify the directory like this. -arg: [/opt/myproject]
22:31 Eureka703 @iggy otherwise it seems to not properly read the argument for the git.pull/git.status command.
22:32 iggy yeah, cwd is definitely not right for that
22:32 Eureka703 @iggy and it thinks that - cwd or - cdw are part of the path.. Thus making it look at "- cwd: /opt/myproject"
22:32 Eureka703 which clearly wont exist ;)
22:32 iggy lol, got hung up on the cdw and missed that
22:33 Eureka703 Thanks for pointing me in the right direction. Its friday.. Brain was too fried to figure that out myself haah.
22:33 iggy I generally write that stuff out as states and just use cmd.state.sls to run the state
22:34 Eureka703 ah, i suppose that makes sense. Ill look into that. Having to do the cmd.git.pull and tgt: stuff is kind of annoying.
22:34 iggy because I figure I'm probably going to want to run that state at some point and "salt 'foo' state.sls some.state" is easier than "salt 'foo' event.send 'some/event/that/fires'"
22:34 sgargan joined #salt
22:35 Eureka703 That makes a lot of sense ;)
22:35 Eureka703 Thanks again!
22:38 sgargan joined #salt
22:42 iggy anybody use atom on osx?
22:43 murrdoc no
22:43 * murrdoc shows #vimforlife
22:43 Bryson iggy: I gave it up last week.
22:43 murrdoc you ho
22:43 iggy or just osx?
22:44 Bryson iggy: yes, that too
22:44 whytewolf I'm on osx for at least one of my computers
22:44 iggy open http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
22:44 icflournoy joined #salt
22:44 iggy run that
22:45 whytewolf I don't have salt on my mac. sorry
22:45 iggy you don't need it
22:45 murrdoc no one does
22:45 iggy that should (hopefully) just open the page in a browser
22:46 Bryson i thought you wanted me to get my list of installed packages
22:46 whytewolf yes it does
22:46 Bryson but `open http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed` as a command in terminal does, indeed, just open a browser window to the right page.
22:46 iggy okay, thanks
22:47 whytewolf well it works in bash. in fish it strips off the anchor
22:47 Bryson iggy: what was your question about the Atom editor?
22:48 iggy I was going to have someone test an addon, but I think just knowing what "open <url>" does tells me what I need to know
22:51 Bryson iggy: eccentricson: Oh goody! It isn’t a Postgres problem after all! I tailed the minion log file, and discovered the minion is timing out trying to get to the master then restarting. http://pastebin.com/7Xc47KWS
22:52 Bryson problem is this: i’m running a masterless minion, and in my minion config i have `file_client:local` set
22:52 * iggy runs away... quickly
22:53 eccentricson hahahah
22:53 daemonkeeper joined #salt
22:53 eccentricson does the directory /etc/salt/pki exist?
22:53 eccentricson Bryson:
22:54 murrdoc #ballislife
22:54 Bryson eccentricson: no, but I’m on FreeBSD and `/usr/local/etc/salt/pki/` *does* exist
22:54 Ludo- joined #salt
22:55 cornfeedhobo joined #salt
22:55 jerrcs joined #salt
22:55 heise joined #salt
22:55 eccentricson oo I'm definitely no BSD person.  Try removing that directory and restarting the salt-minion.  I'm not up to par with my masterless yet, but sometimes when it can't authenticate with the master removing the directory, deleting the key and readding it fixes the issue.  This is mainly because of a master switch or master recreation.
22:55 Micromus joined #salt
22:55 cro joined #salt
22:56 ShibMcNe_ joined #salt
22:56 buxy joined #salt
22:57 Aikar joined #salt
22:57 juanito joined #salt
22:58 yexingok joined #salt
23:02 iggy need a bot in here
23:03 iggy !seen utahdave
23:03 iggy :(
23:05 hasues joined #salt
23:06 hasues left #salt
23:07 hasues joined #salt
23:07 otter768 joined #salt
23:07 hasues left #salt
23:24 subsignal joined #salt
23:25 sgargan joined #salt
23:33 Bryson eccentricson: you still around? iggy
23:37 iggy figure it out?
23:37 Bryson ish.
23:38 Bryson i seperated the initdb and the service.running
23:38 Bryson initdb command works fine, but the service.running command starts the service then looks for the master and restarts the client and hangs.
23:40 Bryson http://pastebin.com/j78ufyeU that’s the current state of the file. uncommenting only lines 16/17/18 causes the whole can’t-auth-to-master-restarting-minion thing
23:41 yomilk joined #salt
23:41 whytewolf Bryson: do you have a id called /usr/local/pgsql/data/postgresql.conf and /usr/local/pgsql/data/pg_hba.conf?
23:42 Bryson whytewolf: not currently, that’s why i left those lines commented. i haven’t gotten that far yet, because I can’t get the server to even start up.
23:42 Bryson so those files exist after initdb runs, but they are not salt-managed
23:43 zsoftich1 joined #salt
23:44 whytewolf okay so they are commented out so thats not the issue
23:45 Bryson right. uncommenting lines 16-18 only is causing me problems
23:45 Bryson i just want the server to get started up
23:45 aqua^c joined #salt
23:45 Bryson and salt does that, but after it sends postgresql the start command it tries to contact a master, fails, and restarts the minion which causes my salt-call to hang and never finish.
23:46 Bryson it’s running masterless, and has file_client:local in the minion config file.
23:46 whytewolf it shouldn't be trying to connect to a master. you might need to file a bug on that one
23:46 Bryson yeah i feel like that’s what’s happening. there’s no way to get this working masterless.
23:47 whytewolf try adding --local to your salt-call if you havn't already
23:52 Bryson nope, --local was no help.
23:52 whytewolf i didn't think so but was worth a shot
23:53 whytewolf add -l debug
23:53 Bryson i’m almost glad it didn’t work. technically the salt-call is being made by vagrant, so if that worked inside the VM i’d have to file a bug with vagrant to get --local added to the command
23:57 timoguin joined #salt
23:59 Bryson whytewolf: the debug output doesn’t show anything new before the master auth failure happens. :-/
23:59 aparsons joined #salt

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