Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-12-15

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

All times shown according to UTC.

Time Nick Message
00:00 M-liberdiko whytewolf: thanks, unfortunately I'm looking for the sessions on systemd-nspawn and I can't find it there
00:00 M-liberdiko I had been struggling with LXC for a couple of days and was looking to try nspawn but it looks like there is only a module. No states or salt-cloud integration...
00:02 ekristen_ joined #salt
00:03 burp_ joined #salt
00:05 Kelsar joined #salt
00:06 Kelsar joined #salt
00:06 whytewolf interesting looks like Thatch & erik johnson  gave that talk.
00:11 whytewolf M-liberdiko: https://www.youtube.com/watch?v=gdvlJXajBWE&list=PL9svBjLDUl_8Cy3BWOfmeWwWgnCc6_eLb&index=12
00:12 houngj How well does Salt do with masterless window machine config management?
00:12 keimlink_ joined #salt
00:12 M-liberdiko whytewolf: Awesome!! How do you manage to find it?
00:13 whytewolf M-liberdiko: I searched for the title and found the closest one
00:13 whytewolf my google-foo be strong
00:14 whytewolf houngj: well. in theory it should be fine. of coarse that being said. take anything i say about windows with a bucket of salt. cause like a bad maid. I don't do windows.
00:15 shaggy_surfer joined #salt
00:16 M-liberdiko whatapain: True. Googling 'nspawn saltconf15' find it, my bad
00:17 dyasny joined #salt
00:21 otter768 joined #salt
00:21 CaptainMagnus joined #salt
00:22 tmclaugh[work]_ joined #salt
00:24 abednarik joined #salt
00:26 burp_ joined #salt
00:27 magicarrow joined #salt
00:31 magic_arrow joined #salt
00:33 renoirb joined #salt
00:43 keepguessing whytewolf: I forgot you mentioned a way to print all grains/pillars
00:43 whytewolf keepguessing: pillar.items and grains.items
00:44 keepguessing whytewolf: thanks. I think I missed the grains.items.
00:46 keepguessing whytewolf: it would be great if there was a cheatsheet [I googled and found something but it did not a lot of things.] I have used puppet before and I can relate to salt via puppet. I like the tutorials that salt has. Sometimes they are more realistic then the ones in the repo.
00:46 keepguessing s/repo/puppet
00:47 whytewolf keepguessing: you could sugest a cheatsheet. as a document features
00:59 bhosmer_ joined #salt
01:05 zmalone joined #salt
01:12 shaggy_surfer joined #salt
01:12 jaybocc2 joined #salt
01:20 irctc148 joined #salt
01:24 ageorgop joined #salt
01:25 syph3r joined #salt
01:33 mapu joined #salt
01:38 lesterc joined #salt
01:41 colegatron joined #salt
01:42 chadhs joined #salt
01:43 jondonas joined #salt
01:44 jondonas left #salt
01:48 falenn joined #salt
01:57 ageorgop1 joined #salt
01:57 ageorgop2 joined #salt
01:59 ageorgop2 joined #salt
02:00 nZac joined #salt
02:02 nZac joined #salt
02:02 ageorgop joined #salt
02:03 dyasny joined #salt
02:09 shaggy_surfer joined #salt
02:13 burp_ joined #salt
02:16 Cottser joined #salt
02:17 iggy I think there might be a ticket for it already
02:17 iggy "rosetta stone"
02:19 dork joined #salt
02:22 otter768 joined #salt
02:23 ]V[ joined #salt
02:24 samed joined #salt
02:24 samed joined #salt
02:25 keepguessing joined #salt
02:31 bhosmer_ joined #salt
02:31 anmol joined #salt
02:39 rideh joined #salt
02:40 racooper joined #salt
02:41 brianfeister joined #salt
02:46 evle joined #salt
02:49 bonzibuddy joined #salt
02:50 keimlink joined #salt
02:51 larsfronius joined #salt
02:52 auzty joined #salt
02:56 TyrfingMjolnir joined #salt
02:58 catpiggest joined #salt
02:58 favadi joined #salt
03:02 grumm_servire joined #salt
03:02 stooj joined #salt
03:05 beardedeagle joined #salt
03:07 wych joined #salt
03:08 Rumbles joined #salt
03:13 hightekvagabond joined #salt
03:16 beardedeagle joined #salt
03:20 rideh joined #salt
03:23 rideh joined #salt
03:29 PeterO joined #salt
03:29 DammitJim joined #salt
03:38 hightekvagabond1 joined #salt
03:41 hightekvagabond joined #salt
03:44 falenn_ joined #salt
03:53 stooj joined #salt
03:55 anmol joined #salt
03:56 syph3r left #salt
03:59 venu0336 joined #salt
04:10 stooj joined #salt
04:23 otter768 joined #salt
04:26 stooj joined #salt
04:26 packeteer joined #salt
04:31 ex-cowboy joined #salt
04:44 DammitJim joined #salt
04:44 stooj joined #salt
04:56 stooj joined #salt
04:58 brianfeister joined #salt
05:00 dendazen joined #salt
05:09 kshlm joined #salt
05:14 burp_ joined #salt
05:19 malinoff joined #salt
05:22 burp_ joined #salt
05:23 tpaul joined #salt
05:23 colegatron joined #salt
05:25 burp_ joined #salt
05:27 rdas joined #salt
05:31 cliluw joined #salt
05:32 bhosmer joined #salt
05:32 rodr1c joined #salt
05:32 rodr1c joined #salt
05:33 ramteid joined #salt
05:33 MTecknology joined #salt
05:36 nafg_ joined #salt
05:38 stooj joined #salt
05:38 burp_ joined #salt
05:40 nidr0x joined #salt
05:57 favadi joined #salt
06:01 calvinh joined #salt
06:06 burp_ joined #salt
06:11 joren joined #salt
06:24 otter768 joined #salt
06:28 kshlm joined #salt
06:29 kaushal_ joined #salt
06:38 nafg__ joined #salt
06:41 kshlm joined #salt
06:46 flowstat_ joined #salt
06:47 brianfeister joined #salt
06:47 kshlm joined #salt
06:48 felskrone joined #salt
06:51 AlberTUX joined #salt
06:53 larsfronius joined #salt
07:00 brianfeister joined #salt
07:01 hojgaard joined #salt
07:02 linjan joined #salt
07:04 bonzibuddy joined #salt
07:10 brianfeister joined #salt
07:11 kuromagi joined #salt
07:15 Ollyne_Apple joined #salt
07:20 hightekvagabond joined #salt
07:26 hightekvagabond joined #salt
07:28 bhosmer_ joined #salt
07:30 cberndt joined #salt
07:45 KermitTheFragger joined #salt
07:46 Joren_ joined #salt
07:48 flowstat_ joined #salt
07:49 ubikite joined #salt
07:57 blacktoko joined #salt
07:59 jamesp9 joined #salt
08:17 eseyman_ joined #salt
08:20 M-liberdiko joined #salt
08:25 otter768 joined #salt
08:28 jcockhren joined #salt
08:28 amcorreia joined #salt
08:29 elsmo joined #salt
08:42 cyteen joined #salt
08:46 keimlink joined #salt
08:47 dgutu joined #salt
08:47 flowstat_ joined #salt
09:02 cyborg-one joined #salt
09:07 Couch joined #salt
09:07 dgutu joined #salt
09:09 jaybocc2 joined #salt
09:12 GreatSnoopy joined #salt
09:15 slav0nic joined #salt
09:23 Rumbles joined #salt
09:23 Rumbles hi
09:23 thalleralexander joined #salt
09:23 Rumbles can anyone advise whether I can use greater than logic in jinja templates?
09:23 Rumbles I want to set a value to half the memory, but if that's over 31GB, it needs to be 31
09:24 jaybocc2 joined #salt
09:26 * babilen guesses Java
09:27 babilen Rumbles: http://jinja.pocoo.org/docs/dev/templates/#comparisons
09:27 Rumbles thanks
09:27 Rumbles yeah java heap for elasticsearch :)
09:27 babilen Obviously :)
09:28 jayne joined #salt
09:30 thalleralexander joined #salt
09:31 thalleralexander joined #salt
09:34 babilen Can I somehow force salt to sort its output based on the minion id?
09:34 babilen https://github.com/saltstack/salt/issues/21797 guess not
09:34 saltstackbot [#21797]title: [outputter] add sort option | We have minions named by this scheme:...
09:35 s_kunk joined #salt
09:35 s_kunk joined #salt
09:35 amcorreia joined #salt
09:38 malinoff joined #salt
09:40 malinoff joined #salt
09:45 malinoff joined #salt
09:46 vim-zz joined #salt
09:50 thalleralexander joined #salt
09:52 egil joined #salt
10:00 Rumbles is there a way to get the command salt['grains.get']('mem_total') to return in GB?
10:00 babilen maths!
10:01 Rumbles I'm not sure what the default returns, my server is set to use 8192 MiB, but the value returns 7984
10:01 cliluw joined #salt
10:02 babilen It returns MiB AFAIR
10:02 Rumbles well, that's a kvm machine
10:02 Rumbles I'll check an AWS instance
10:06 denys joined #salt
10:08 rotbeard joined #salt
10:09 Rumbles well, someones math is poor :(
10:13 babilen How so?
10:13 Rumbles looks like it just returns the total memory in the free -m command
10:14 babilen That is /proc/meminfo in MiB, isn't it?
10:14 Rumbles well, if that's in MiB, and I have defined in QEMU to use 8192MiB, why the difference :/
10:15 Rumbles /proc/meminfo is in kB
10:16 Rumbles oh sorry, yeah I see what you mean
10:16 Rumbles just weird, I just need to figure out how to get the value right
10:17 babilen Regarding 8192 vs 7984 I'm not sure either and it can't really be MB vs MiB
10:18 yomilk joined #salt
10:20 Rumbles I know I put it in to google
10:20 Rumbles :)
10:20 Rumbles thanks, it's clearly not a salt issue
10:21 Rumbles more a virtualisation issue
10:22 yidhra_ joined #salt
10:22 Rumbles would you say this logic looks right babilen ? http://fpaste.org/300973/
10:25 otter768 joined #salt
10:26 babilen You could do that, yeah
10:26 Rumbles ... but...? :)
10:26 babilen 31000 feels a bit, well, non-binary
10:27 yomilk joined #salt
10:27 AlberTUX hi ppl
10:27 Rumbles heh, well, since it returns in MiB, I thought easier to stick with that
10:27 babilen Rumbles: fwiw, are you aware of https://github.com/bechtoldt/saltstack-elasticsearch-formula ?
10:27 Rumbles nope :)
10:28 AlberTUX is there a deeper doc on top merging strategy?
10:28 babilen Well, you are now. It is one of those typical bechtold formulas, but it might help a little
10:28 babilen AlberTUX: Deeper than what?
10:28 AlberTUX than this: https://docs.saltstack.com/en/latest/ref/states/top.html#how-top-files-are-compiled
10:28 Rumbles never heard of bechtold
10:29 AlberTUX what i want to achieve is to apply a state to a cluster and a different one to a node within that same cluster, but the states are exclusive
10:30 AlberTUX i wanted to know how does the merge works, if the more specific states should go higher in the top file or what is the strategy salt uses to merge it
10:30 babilen AlberTUX: What's so speshul about that minion?
10:31 AlberTUX say i want to test some new state (a newer version of a package) in a minion that belongs to a cluster
10:31 babilen Shouldn't be too hard to model with a compound matcher "and not theuglyduckling" :)
10:32 yidhra_ joined #salt
10:32 AlberTUX right, that would also work. but what about the top merging strategy?
10:33 babilen What do you want to know?
10:33 Rumbles I don't understand how these work, thanks though babilen
10:34 babilen Rumbles: You mean formulas in general or that one in particular?
10:34 mdupont joined #salt
10:34 Rumbles I don't understand how these work
10:34 Rumbles no idea about other formulas
10:34 babilen (bechtold's aren't the easiest to understand, which is IMHO one of the problems with them)
10:35 Rumbles well, the files for example are just a couple of if statements
10:35 Rumbles I don't get how that will apply the right config...
10:36 babilen Rumbles: Okay, in general you clone formulas you want to use somewhere and then make them available via GitFS or locally on the master. The basic idea behind them is that they provide a number of generic states with sane defaults for each distribution that can be tailored to your wishes and needs by defining suitable data in pillars.
10:36 babilen https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
10:36 Rumbles yeah we only use one distro
10:36 babilen which one? (nosy babilen)
10:36 yomilk joined #salt
10:36 Rumbles ubuntu
10:37 Rumbles I prefer CentOS, but everything is in ubuntu already, I only started a few months back
10:37 babilen Most formulas support Debian and Ubuntu rather well
10:37 babilen I'm a Debian person myself
10:37 Rumbles that's fine, but I wouldn't want to use something I don't understand so we have added support for distros we don't use
10:38 Rumbles I dnt understand what these do for example: {{ datamap.user.name|default(f.user) }}
10:39 Rumbles what's dtamap? where are those values taken from... ?
10:39 Rumbles s/dtamap/datamap
10:40 giantlock joined #salt
10:40 babilen Rumbles: Well .......
10:40 Rumbles oh, sorry I see it at the top
10:41 babilen Rumbles: I wouldn't necessarily start of with that formula if you aren't too deep into the ideas behind them. bechtold's formulas are also quite complicated and opinionated
10:41 babilen https://www.youtube.com/watch?v=UalzJq40xMk might be interesting to watch. It describes some of the basic design ideas behind modern formulas
10:41 Rumbles okay, np
10:41 Rumbles thanks
10:41 Rumbles it's probably something to look in to further when I'm not working to a deadline to get a deployment tested :)
10:42 babilen Sounds good :)
10:42 babilen (but aren't we always?)
10:42 Rumbles yep :)
10:44 yidhra_ joined #salt
10:45 yomilk joined #salt
10:45 MaZ- joined #salt
10:48 kermit joined #salt
10:50 avenda joined #salt
10:53 nafg_ joined #salt
10:53 nafg__ joined #salt
10:54 tkharju joined #salt
10:55 larsfronius joined #salt
10:58 cliluw joined #salt
11:07 quarcu hi chaps, got a short questions
11:08 quarcu currently got 1 master, 3 minions
11:08 quarcu apply executed from jenkins via salt api
11:08 quarcu sometimes I got error that salt is waiting for 1 minion
11:08 quarcu any ideas what could be issue ?
11:09 quarcu ERROR: One or more minion did not return code 0 for state.sls
11:18 beardo_ joined #salt
11:19 quarcu ok chaps, seems it is not an issue with timeout / waiting
11:19 quarcu but seems like I have issue with postgres_user state
11:19 babilen Could the state have genuinely failed?
11:19 quarcu it sometimes fails to remove the user
11:19 quarcu from db
11:21 tkharju joined #salt
11:29 ggoZ joined #salt
11:33 colegatron joined #salt
11:34 LondonAppDev joined #salt
11:34 bhosmer joined #salt
11:34 wenxin joined #salt
11:36 evle joined #salt
11:36 jaybocc2 joined #salt
11:47 dendazen joined #salt
11:51 jaybocc2 joined #salt
11:53 av_ joined #salt
11:54 nafg____ joined #salt
11:54 flowstat_ joined #salt
12:00 nafg_ joined #salt
12:01 malinoff joined #salt
12:03 quarcu https://github.com/saltstack/salt/blob/develop/salt/modules/postgres.py#L1540:L1562
12:04 quarcu https://github.com/saltstack/salt/blob/develop/salt/modules/postgres.py#L1138:L1162
12:04 quarcu thing that wonders me a bit, that user_remove and group_remove use same method - _role_remove
12:12 jaybocc2 joined #salt
12:12 Grokzen joined #salt
12:13 s0lar joined #salt
12:20 jvblasco hi everyone
12:21 jvblasco the actions that can be called from salt.cloud.CloudClient for a precise provider are found in salt.cloud.clouds.provider?
12:22 jvblasco eg: for vmware it would be the actions defined in salt.cloud.clouds.vmware (https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.vmware.html)
12:22 jvblasco just starting with salt cloud and i'm trying to understand how it works ^^
12:23 quarcu anyone can point me where this is given: https://github.com/saltstack/salt/blob/develop/salt/states/postgres_user.py#L298
12:26 otter768 joined #salt
12:28 jaybocc2 joined #salt
12:28 tmclaugh[work]_ joined #salt
12:31 quarcu kk, nvd
12:31 quarcu *nvm
12:33 quarcu must be something on my side with db still holding user and method postgres.user_remove unable to remove user at point in time
12:40 yomilk joined #salt
12:41 zerthimon joined #salt
12:43 bhosmer joined #salt
12:44 flowstat_ joined #salt
12:50 PeterO_ joined #salt
13:00 quarcu would be good if method would return more meaningful info why it failed...
13:00 flowstat_ joined #salt
13:02 PeterO_ joined #salt
13:02 pmcnabb whytewolf, buhman: Thanks for your response yesterday. I think I want to run a state, not a module, in standalone mode. I tried "salt-call --local state.sls example" but I think this is using the base environment and looking for example.sls in /srv/salt instead of my current directory. Is there a way to run a state file that is outside of a defined environment?
13:02 nZac joined #salt
13:06 Score_Under hi, I've got a "watch_in" in my ssh/config.sls, which watches the service in ssh/service.sls, but it doesn't restart the service. If I change it to use a 'watch' instead, it works, but then I have to do my includes backwards. Is that the expected behaviour?
13:07 pfallenop joined #salt
13:09 quarcu pmcnabb: AFAIK it is not possible to use states outside of state tree
13:10 quarcu Score_Under: cant find watch_in TBH...
13:14 quarcu should be more or less like this: http://pastebin.com/BggxNfjX
13:14 quarcu so best way, post some code to get a grasp of it
13:18 babilen Score_Under: No, that is most definitely not expected behaviour. Please paste your states and applicable output to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, …
13:21 wangofett pmcnabb: you can run state.apply
13:22 pfalleno1 joined #salt
13:22 Score_Under actually one possibly critical piece of information I left out is that the state I'm running the watch_in from is one from _states (i.e. a custom one). It doesn't have any special code for watch_in, but should that affect anything?
13:22 wangofett e.g if you have the frobnitz.sls state file you can run `salt 'myminion' state.apply frobnitz`
13:24 quarcu wangofett: i might be wrong, but pmcnabb is using salt in standalone
13:26 wangofett salt-call --local state.apply frobnitz, then... I *believe*
13:26 favadi joined #salt
13:26 flowstat_ it's state.sls
13:26 babilen no
13:26 babilen It's both!
13:26 flowstat_ NO WAY
13:27 babilen state.apply == state.{sls,highstate,sls_id?}
13:27 flowstat_ interesting
13:27 quarcu I believe it is highstate babilen
13:28 Score_Under https://dpaste.de/R7X2 config.sls, https://dpaste.de/afxT service.sls (both with some unimportant states stripped out, e.g. mac osx stuff). conffile.set_option is a state in our salt config repository designed to edit an arbitrary config file if that matters. The problem here is that watch_in *never* causes restart_sshd to restart, but if I change it to a watch for "conffile: ensure_pubkey_only", it rest
13:28 Score_Under arts without a problem on changes
13:29 Rumbles is it possible to select more than one host in a top file, or when running a salt state with something like (app1|app2).host.name.com ?
13:29 Rumbles I'm struggling to find the docs :/
13:29 Score_Under salt-minion version is 2015.5.5 (pending an upgrade for a while now...)
13:29 quarcu Rumbles: you mean globbing
13:29 Rumbles I don't want to do app* quarcu
13:30 wangofett Rumbles: "target" is the word you're looking for
13:30 quarcu you can ie go with app*.*.*.* ;)
13:30 wangofett you can target by grains
13:30 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.apply ← so no sls_id yet, but it calls highstate or sls based on how it is being called
13:30 Rumbles found it, thanks everyone https://docs.saltstack.com/en/latest/topics/targeting/globbing.html
13:30 quarcu no probs
13:31 wangofett That's the one :)
13:31 quarcu here is a lvl up doc Rumbles : https://docs.saltstack.com/en/develop/topics/targeting/index.html
13:31 quarcu sorry for devlop branch, switch to latest
13:31 * babilen particularly recommends compound matcher
13:33 Score_Under babilen: I have a feeling I'm being an idiot
13:33 Score_Under should I have done "watch_in:\n    - service: restart_sshd" instead?
13:34 babilen Score_Under: Please explain in great detail why you think that you are an idiot
13:34 Score_Under though, I didn't see any warning for that
13:34 pmcnabb wangofett: using state.apply gives me "No matching sls found for 'example' in env 'base'"
13:34 pmcnabb (same as before)
13:34 quarcu pmcnabb: move your sls to base tree
13:34 quarcu in standalone it will not be read AFAIK
13:35 BogdanR I have this ting in my jinja template for haproxy: http://hastebin.com/aqoqokimog.rb
13:35 babilen Score_Under: Yes, you need "- service: restart_sshd"
13:35 BogdanR As you can see it get's the IP addresses and it sets the first IP
13:35 babilen Score_Under: (that's a bad name for that state by the way)
13:35 denys joined #salt
13:35 BogdanR How how I be able to specify multiple grains in jinja?
13:35 Score_Under babilen: I didn't name it :D but I'm free to rename it, what would you suggest?
13:36 * babilen sees 'roles:apache' and expr_form='grain' and runs
13:36 pmcnabb quarcu: ok, that's what I was wondering (apparently it can't be done outside of /srv/salt)
13:36 quarcu btw, Score_Under cant you just inclue services.ssh and make an init file ?
13:37 babilen Score_Under: Well, given that it is a "service.running" state, how about: sshd_service ?
13:37 quarcu ie services/sshd/init.sls
13:37 babilen BogdanR: You could use a compound matcher, but I'd think long and hard why you want to store 'roles' in grains to begin with. (How are you managing those grains?)
13:38 BogdanR babilen: From the cloud map
13:38 babilen BogdanR: Also note that you want a logical 'or' for a union of sets
13:39 BogdanR babilen: can you plase give me an example how that line would look with two grains in the mix?
13:39 quarcu BogdanR: I would target nodes from topfile it compund matchers
13:39 babilen BogdanR: What is this 'cloud map' you refer to?
13:39 BogdanR babilen: The cloud map is this: https://docs.saltstack.com/en/latest/topics/cloud/map.html
13:40 babilen BogdanR: 'P@roles:(apache|accidentallythewholecloud|dominatetheworld|...)'
13:41 dendazen joined #salt
13:41 babilen BogdanR: How would you change those grains later on? What's the advantage over using grains in that context over pillars?
13:42 teryx510 joined #salt
13:43 quarcu ATM I dont see use for grains except targeting and some data collecting TBH
13:44 DammitJim joined #salt
13:44 BogdanR babilen: I don't plan to really change the grains. I also begin to think it's safer to match against pillar because matching against grains seems to be interrogating all minions if they have those grains
13:45 flowstat_ I'm doing the same. My pillars are fluid, I'm treating grains as immutable
13:46 babilen BogdanR: And the minions could even intentionally *lie* about the value of their grains ;)
13:46 babilen flowstat_: exactly .. well, semi-immutable
13:46 flowstat_ yeah, semi is probably a better way to put it
13:47 flowstat_ I'm in AWS, so I have a naming convention that I break down into things like service name, environment, etc etc. Those are grains and set at bootstrap time. I don't touch them afterwards
13:47 flowstat_ s/so/and
13:48 quarcu s/service/role you mean? ;)
13:49 zigurat joined #salt
13:49 flowstat_ also that
13:49 BogdanR babilen: Also, for some AWS addrs[0] works just fine in there but for DigitalOcean I would require addrs[1]
13:49 BogdanR How would you go around this?
13:49 zigurat Hi. Looking to fail the salt stack sls if a file has an old timestamp. Help?
13:50 babilen Well, at one point you need to define a mapping for 'roles' that is based on the minion id (as it is the only datum that you can trust)
13:50 wangofett pmcnabb: Assuming your files are in /srv/salt/
13:50 wangofett i.e. /srv/salt/top.sls
13:51 wangofett You have to have /srv/salt/example.sls
13:51 wangofett if you have /srv/salt/fnord/example.sls
13:51 wangofett you have to use state.apply fnord.example
13:51 quarcu BogdanR: you can target based on IPv4 from master
13:52 BogdanR How would I do that?
13:52 quarcu https://docs.saltstack.com/en/latest/topics/targeting/ipcidr.html
13:52 babilen Or S@ in https://docs.saltstack.com/en/latest/topics/targeting/compound.html
13:53 quarcu yup, as babilen says
13:53 pmcnabb wangofett: right, that works. I was just hoping that they could be run outside of /srv/salt
13:53 flowstat_ you can
13:53 BogdanR babilen: But I don't really have the IP address. That's what I want to determine based on roles
13:53 flowstat_ use the '-c' flag
13:53 quasiben joined #salt
13:54 flowstat_ or, if you want it to be a permanent thing, set your file_roots
13:54 quarcu BogdanR: use globbing then based on registered node name
13:54 babilen BogdanR: All I'm saying is: grains are not necessarily (!) the best choice for modeling "roles". I personally prefer (external) pillars or a intuitive naming scheme and globbing for that
13:56 TyrfingMjolnir joined #salt
13:56 BogdanR quarcu: Can you please give me a practival example because I don't really know how I could extract the IP address in jinja even if I have the actual node name
13:56 quarcu I use topfile for targeting
13:56 babilen network.ip_addr + cidr mask? Throw the mine into the mix if you need the address of other minions
13:56 BogdanR babilen: Sure. I perfectly understand your point. The other problem I have is that for AWS I would have to use addrs[0] and for DigitalOcean I would have to use addrs[1]
13:57 babilen BogdanR: Why is that?
13:57 quarcu but still, do you must use addr instead of node name ?
13:58 pmcnabb flowstat_: that would require having a config file set up, too (is that right?). I just want to be able to run "salt-call --local state.sls /path/to/example.sls"
13:58 BogdanR quarcu: yes, I need to use the IP address
13:58 flowstat_ yeah, if you use the '-c' flag, you set the path for salt to look in
13:58 flowstat_ not the path directly to the file itself
13:58 babilen BogdanR: What is addrs in this context exactly and why do you want the first or the second element of it depending on the provider?
13:58 flowstat_ but the directory to use as the root
13:59 flowstat_ I'm doing this in my masterless setup
13:59 pmcnabb flowstat_: ok, thanks
13:59 BogdanR babilen: Because for AWS the first IP address which is returned is the one from the local network. For DigitalOcean, the first IP address that is returned a one that can't be used because it doesn't reall forward packets in the local network
13:59 flowstat_ 'salt-call -c /path/to/state/root --local state.sls mystate'
13:59 flowstat_ np!
14:00 babilen BogdanR: Yes, that's why you pass a suitable cidr mask to network.ip_addrs
14:02 subsignal joined #salt
14:03 cyteen_ joined #salt
14:03 BogdanR babilen: The interfaces look like this in DigitalOcean: http://hastebin.com/suwedejeje.lua
14:04 babilen BogdanR: And which address do you want?
14:04 BogdanR 10.15. is the one that I don't want
14:04 babilen Are you familiar with CIDR ?
14:05 BogdanR Other that that I think it would be quite difficul to predict which class would the address be in
14:05 quarcu i might be wrong, but grains should return you all addr
14:05 quarcu and once targeting via grain addr is should sorta do grep on that
14:06 babilen BogdanR: Both cloud providers should be able to provide information about the network (specified in cidr) of your instances
14:07 babilen BogdanR: https://www.refheap.com/112718 I use those two mine functions (+ more specific ones for other networks) on all my minions. You should be able to come up with something similar for your usecase.
14:07 quarcu BogdanR: try salt '*' grains.item ip4_interfaces first
14:08 quarcu and then match on that
14:08 babilen no, that is not ordered and a wild mix
14:08 quarcu salt '*' grains.item ipv4
14:08 babilen The right approach is to specify the network explicitly from which you want the address
14:09 giantlock joined #salt
14:09 babilen I mean you can always iterate over grains and do things like "if not theadd.startswith('10.15') ...", but seriously?
14:09 quarcu babilen: I got same thinking as you, but that might be the answer for BogdanR
14:09 BogdanR quarcu: This are my grains on one of the DO server: http://hastebin.com/uyuwalutuw.sm
14:10 quarcu BogdanR: use salt '*' grains.item ipv4
14:10 babilen yes .. why not hardcode the interface name in your states!
14:10 babilen sorry /s
14:10 quarcu it will get you all ipv4s without adapter name
14:10 numkem joined #salt
14:11 babilen BogdanR: Both cloud providers should have a method to get information about their networks. That way you can get hold of the CIDR you would have to use for your minion and pass that via pillars.
14:11 larsfronius joined #salt
14:12 babilen If you use that argument to network.ip_addrs you end up with *exactly* the right IP address in a way that is both easy to adapt to other providers and in such a way that you don't hardcode assumptions like "always on eth0" or "always the second address" into your states
14:12 babilen (that *will* break at one point)
14:13 BogdanR babilen: I understand your point
14:13 BogdanR I wonder if it's possible to do this completely automatically in the jinja template
14:14 StolenToast I have a short list of rpms to install (pkgs.installed) from the salt server, but I need to make sure a specific version of one of them is installed to upgrade an older packagep
14:14 StolenToast Can I list both a version req and a source in a pkgs list?  Or do I need to make a seperate pkg.installed section under the state?
14:14 StolenToast would that even work
14:15 debian112 joined #salt
14:16 subsignal joined #salt
14:16 quarcu BogdanR babilen I had in mind something like salt -G 'ipv4:192.168.37.22' test.ping
14:17 quarcu where you can put any ipv4 in place, or even CIDR BogdanR
14:17 quarcu then, you can use such for targeting in you topfile
14:18 quarcu so if you have a multiple ipv4 on a node, it will match one of them depend on your grain 'syntax'
14:18 quarcu worked for me, as having 3 adapters
14:18 BogdanR quarcu: Yep. But the thing is that I am automating the deployment of servers so I don't know they're IP addresses
14:18 quarcu and targeted like written above
14:19 quarcu ok, but you should know then the node names
14:19 quarcu so make it follow some convention
14:19 BogdanR Yes, the names are predictable
14:19 quarcu it websrv.prod.example
14:19 quarcu use it to target in topfile
14:19 quarcu https://docs.saltstack.com/en/develop/topics/targeting/globbing.html
14:20 BogdanR Yes, in the top file I am targeting based on names because those are predictable
14:20 BogdanR but in the states I would like to be able to extract the internal IP addresses from those servers
14:21 babilen BogdanR: And what are the networks these addresses are from?
14:22 BogdanR for Amazon is pretty much de defalt VPC
14:22 BogdanR And for DigitalOcean the default newtork
14:23 quarcu https://stackoverflow.com/questions/18360528/how-to-get-ip-address-of-hostname-inside-jinja-template
14:23 quarcu that should provide the answer
14:23 babilen BogdanR: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.http.html#salt.modules.http.query + AWS/DO REST API ?
14:23 quarcu so i presume you could use {{ grains.ipv4 }} in your template
14:24 quarcu since ipv4 grain is already in place for you
14:24 mapu joined #salt
14:24 quarcu still though, this will give you list AFAIR, that you will have to filter anyway
14:26 _mel_ joined #salt
14:27 BogdanR quarcu: The difference is this: http://hastebin.com/ucufetotom.sm
14:27 Tanta joined #salt
14:27 otter768 joined #salt
14:27 BogdanR In both cases I don't see a way to predictably get the correct address
14:28 bhosmer joined #salt
14:29 quarcu well, you wont be able to predict them, since you cant target them IMO
14:29 quarcu just get the grain list, and then if over them
14:29 thekingofbandit joined #salt
14:30 quarcu or, you can get a grain with matching CIDR
14:31 flowstat_ anyone familiar with the boto stuff for AWS?
14:31 flowstat_ I mean the boto module
14:31 quarcu for a test run try this: salt -C 'S@192.168.37.0/24' test.ping
14:32 quarcu BogdanR:
14:32 Grokzen joined #salt
14:32 quarcu anyway, you will most likely need to run over such returned list
14:33 flowstat_ I'm seeing illegal keyword arguments when I'm trying to create policies for an iam_role
14:33 flowstat_ despite matching the documentation entirely
14:34 morissette joined #salt
14:35 cpowell joined #salt
14:35 quarcu you sure you got proper casing flowstat_
14:35 quarcu first topletter ;)
14:35 quarcu *uppercase
14:35 flowstat_ ohhhhh
14:35 flowstat_ it has to be uppercase?
14:35 quarcu most cases
14:35 flowstat_ welp.
14:35 Grok joined #salt
14:35 flowstat_ okay, I'll report back
14:35 quarcu the first one is usually uppercase
14:35 tkharju joined #salt
14:35 quarcu kk
14:36 saltman joined #salt
14:36 saltman I have the following state:
14:36 saltman monit.service.running:   service.running:     - onchanges:       - file: httpd.delete.monit
14:36 Grokzen joined #salt
14:37 * babilen hands saltman some http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, …
14:37 saltman Ok, just a minute
14:37 Grokzen joined #salt
14:37 saltman I have the following: https://www.refheap.com/112719
14:38 saltman The state httpd.delete.monit return True and the change dictionary is empty
14:38 saltman https://www.refheap.com/112719 is still executing.
14:39 saltman Why? I want that it will execute only when something is changed
14:39 quarcu erm...wasnt it "watch" meta instead onchanges?
14:39 jaybocc2 joined #salt
14:39 quarcu ;)
14:40 babilen saltman: Could you paste both states and your output. It would also help if you could be more specific about the state you want to execute when which state had changes
14:41 saltman quarcu: If the "changes" key contains an empty dictionary, the watch requisite acts exactly like the require requisite (the watching state will execute if "result" is True, and fail if "result" is False in the watched state).
14:42 mclosson joined #salt
14:42 perfectsine joined #salt
14:44 Grokzen joined #salt
14:44 saltman babulen: https://www.refheap.com/112720
14:45 flowstat_ well, I solved that issue, but now I'm getting a silent failure of the state. If I use debug, I get "TypeError: __init__() got an unexpected keyword argument 'object_pairs_hook'"
14:45 saltman babilen: https://www.refheap.com/112720
14:47 flowstat_ there's something wrong with how I'm defining my IAM policies, which are being turned into an ordered dict
14:48 flowstat_ the problem is that the official documentation doesn't match Ryan D Lane's, which is what I'm basing this on
14:49 flowstat_ the differences are here: https://gist.github.com/flowstate/7d059a763eaeb6796843
14:50 thekingofbandit joined #salt
14:52 babilen saltman: There is no service called "monit.service.running" on your system
14:52 flowstat_ joined #salt
14:52 saltman babilen: I know it
14:52 saltman But I don't want the this state will be executed
14:52 dyasny joined #salt
14:52 babilen So .... why don't you pass the correct service name via "- name: ..." so that salt can actually work with it?
14:53 saltman I want that it will be executed only when the is change in the state: httpd.delete.monit
14:53 babilen Yes, but the state definition is wrong
14:54 saltman Because in other system, there is a service like this, while in other - not
14:54 favadi joined #salt
14:54 babilen I doubt that you have *any* system with a "monit.service.running" service. I would expect that to be called something like "monit" rather than "monit.service.running"
14:55 flowsta__ joined #salt
14:55 jaybocc2 joined #salt
14:55 dkrae joined #salt
14:55 babilen Why don't you indulge me (I know it is horrible to actually fix things), but why don't you add a suitable "- name: ..." parameter on line 4 in the "monit.service.running" state and give that a try?
14:56 saltman I try it now.
14:56 jdwilly2001 joined #salt
14:58 saltman It still fail
14:58 babilen How so?
14:58 jdubski joined #salt
14:59 _JZ_ joined #salt
14:59 saltman But the issue is diffrent: why it has been executed?
14:59 babilen So, what happened now?
14:59 saltman The named service monit is not available
14:59 BogdanR babilen: Earlier I mentioned I would like to change this line to match against multiple grans: http://hastebin.com/ovonekamut.sh
14:59 babilen And just to be clear: The state can neither execute nor not execute as it was wrongly defined (the service doesn't exist)
15:00 tpaul joined #salt
15:00 babilen BogdanR: Yes, and I provided an example on how to do that (based on compound matching).
15:00 saltman So how salt solve it?
15:00 BogdanR How exactly would I do that because I don't really want to match against multple roles, I would like to match against multiple grains
15:01 saltman It some systems there is a service monit, and I want to run it only if httpd files have changed
15:01 saltman How can I do it with salt?
15:01 babilen Then list different grains there ... "P@FOOOO or P@BAAAR or ..."
15:01 BogdanR I think you're example would work fine in the CLI but I'm not sure about how it would work in the jinja template
15:01 babilen saltman: You wouldn't be able to use service.running if the service is not available
15:01 babilen saltman: So, only target that state to minions on which you *want* the state
15:02 babilen saltman: Keep in mind that salt is about enforcing the state you want, not reacting to the state that is present
15:02 babilen saltman: If you want to do what you are doing there, you have to ensure that monit is installed on all minions on which you want to run that state
15:03 babilen BogdanR: Just the same .. expr_from is "compound" and the expression looks like what I just showed
15:03 babilen expr_form
15:03 BogdanR babilen: Bot it. Thanks
15:04 babilen BogdanR: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html#salt.modules.mine.get + https://docs.saltstack.com/en/latest/topics/targeting/compound.html
15:04 babilen (and make sure to use 'or' not 'and' if you want the union!)
15:05 babilen I'd still keep roles in pillars (and match with "J@..."
15:05 babilen )
15:05 jdwilly2001 question about minion log rotation within windows. is it possible with the stock minon?
15:05 jdwilly2001 or is it best practice to ship minion logs off world
15:05 BogdanR babilen: Yeah, I will consider moving the roles to pillar
15:07 Grokzen joined #salt
15:08 amcorreia joined #salt
15:08 andrew_v joined #salt
15:10 giantlock joined #salt
15:10 beardedeagle joined #salt
15:14 perfectsine joined #salt
15:14 dyasny joined #salt
15:16 KennethWilke joined #salt
15:16 kwilke joined #salt
15:17 winsalt joined #salt
15:17 Rumbles hmmmm, having some troubles with archive.extracted
15:18 Rumbles I'm trying to deploy kibana with salt
15:18 Rumbles but when I deploy it I have some issues
15:19 Rumbles the archive.extracted was running without error but nothing appears in the folder
15:19 Rumbles http://fpaste.org/301130/
15:20 Rumbles I don't think this will work as I hoped regardless, as within the archive their is a folder, which I would normally rename, is there any way to handle that?
15:20 zigurat joined #salt
15:21 zigurat Hi. How can I verify the modified time of a file in a sls?
15:24 slav0nic zigurat, maybe salt.modules.file.stats + salt.states.module
15:25 zigurat I run my salt locally. How can I achive modules locally?
15:26 zigurat Ah got it
15:26 zigurat salt.states.module
15:26 zigurat :*
15:28 ericof joined #salt
15:31 Rumbles so the reason it won't extract is the folder I want to extract to already exists
15:31 Rumbles which is quite annoying
15:31 nZac joined #salt
15:32 mapu joined #salt
15:32 zigurat Ok. I managed to run the stats. How can I now pull this mtime: data and compare it to my value
15:32 Rumbles doesn't tell me it can't extract, just "     Comment: /opt/kibana/ already exists"
15:32 Joren_ joined #salt
15:34 Rumbles once it has extracted the file, the root folder of the tar is a subfolder in my target folder, is there any way I can make it so that the root folder is removed and the contents moved in to my target folder?
15:34 Rumbles or do I have to write a script to do that, or re-tar my archive.... ?
15:34 dendazen_ joined #salt
15:35 tmclaugh[work] joined #salt
15:46 flowstat_ joined #salt
15:48 slav0nic joined #salt
15:50 venu0336 joined #salt
15:50 wangofett Rumbles: is there a force option for extracting the archive?
15:50 * wangofett isn't familiar with those docs
15:51 Rumbles not sure, I got it to work in the end
15:52 Rumbles - tar_options: --strip-components=1
15:52 pcn Is anyone familiar with how to invoke salt-cloud so the bootstrap script only installs/updates salt, but doesn't run the highstate?
15:53 StolenToast I'd like to upgrade a package installed on the system with a provided rpm, but my state just sees the wrong version of ganglia installed and says it failed
15:53 StolenToast http://hastebin.com/evigaxolev.sm
15:54 StolenToast how can I force it to install the version I provide, regardless of what's there?
15:54 keepguessing joined #salt
15:54 StolenToast Specifying version just makes it check for that version and fail
15:54 StolenToast specifically the problem is the package on line 10
15:55 perfectsine joined #salt
15:56 StolenToast if I run the state twice it works but that shouldn't have to happen
15:57 RabidCicada joined #salt
15:57 cpowell joined #salt
15:59 KennethWilke joined #salt
16:01 dkrae joined #salt
16:02 boody joined #salt
16:04 mclosson joined #salt
16:06 StolenToast I can define this state like a sequence, install pkgs > install configs > manage service
16:06 StolenToast I'm trying to set it up such that it will not have problems with dependancies in enforcing this state
16:07 StolenToast right now what fails after run 1 is gmond is not installed, which causes the service state to fail too
16:08 guest258 joined #salt
16:09 andrew_v_ joined #salt
16:10 viq joined #salt
16:12 hightekvagabond joined #salt
16:13 murrdoc joined #salt
16:14 nZac joined #salt
16:16 PeterO_ joined #salt
16:17 PeterO__ joined #salt
16:22 flowstat_ joined #salt
16:22 malinoff joined #salt
16:24 dkrae joined #salt
16:26 jeffspeff joined #salt
16:28 hasues joined #salt
16:28 otter768 joined #salt
16:28 IPA` joined #salt
16:30 chadhs joined #salt
16:30 IPA` how do i set a password for postgres in ubuntu using salt? ideally i have to run sudo -u postgres psql postgres
16:32 xmj is there no formula for that?
16:33 IPA` xmj: haven't found one
16:34 mpanetta joined #salt
16:36 murrdoc damn fools in #travis are turds
16:36 murrdoc sup with you guys
16:41 Brew joined #salt
16:43 flowstat_ joined #salt
16:44 IPA` how do i add the formula if i am master is local?
16:48 pcn IPA`: have you looked at the postgresql formula and at https://docs.saltstack.com/en/latest/ref/states/all/salt.states.postgres_user.html
16:49 IPA` pcn: i have the posgresaql formula from https://github.com/saltstack-formulas/postgres-formula i am trying to figure out how to use that in the sls file.
16:54 conan_the_destro joined #salt
16:59 chi__ joined #salt
17:00 pzipoy joined #salt
17:00 chi__ hi all how can we trace version with salt as subversion pls help
17:01 kidneb joined #salt
17:02 pzipoy Hello, I have a quick question. What is the purpose of an AES dropfile in the context of salt/crypt.py?
17:02 chadhs argh… found an annoying bug in the boto_asg module
17:04 pcn IPA`: The magic is in the pillar definitions at https://github.com/saltstack-formulas/postgres-formula/blob/master/pillar.example#L16-L43
17:05 pcn IPA`: and that is acted on here: https://github.com/saltstack-formulas/postgres-formula/blob/master/postgres/init.sls#L83-L105
17:06 chadhs ill file this on github as well but here's the bug
17:06 chadhs https://gist.github.com/chadhs/aaacb715af45bac21808
17:06 IPA` pcn: awesome
17:06 shaggy_surfer joined #salt
17:06 IPA` thanks for the pointers
17:08 chi__ can any one help mehi all how can we trace version with salt as subversion pls help
17:09 KennethWilke joined #salt
17:11 khmub joined #salt
17:13 mclosson I'm hitting an issue where whenever I try to set a value to "YES" or "NO" with sysrc.managed the module call fails because somewhere in the stack the values "YES" and "NO" are converted to True or False, later preventing sysrc._set from concatenating strings and throwing an exception.  Using sysrc.managed to set the same value to something else like "-d 5" works fine.
17:13 acsir joined #salt
17:17 khmub left #salt
17:19 jfindlay mclosson: that is probably the infamous yaml automagic truthiness filter, which you should be able to defeat with double quoting "'YES'" or '"YES"'
17:20 mclosson jfindlay: cool thanks for the info, I tried a few quoting attempts without success but will try that, perhaps related to this too: https://github.com/saltstack/salt/issues/23010
17:20 saltstackbot [#23010]title: salt cmd module will convert "yes" to True for stdin | <pre>...
17:21 wendall911 joined #salt
17:21 mclosson jfindlay: indeed the "'value'" worked.
17:22 jfindlay mclosson: nice
17:24 denys joined #salt
17:24 chadhs joined #salt
17:28 Bryson joined #salt
17:33 colegatron joined #salt
17:37 writtenoff joined #salt
17:37 Fiber^ joined #salt
17:38 racooper joined #salt
17:43 hasues left #salt
17:46 charli joined #salt
17:47 dyasny joined #salt
17:48 rotbeard joined #salt
17:53 hightekvagabond joined #salt
17:53 drawsmcgraw joined #salt
17:56 pcn So can anyone give me some help with salt-cloud and the bootstrap script?  Is there a combination of flags that will bootstrap salt, but not run a highstate?
17:57 pcn I'm looking for a band-aid for this: https://github.com/saltstack/salt/issues/29682
17:57 saltstackbot [#29682]title: salt-cloud launches via ec2 are very slow | ```...
17:59 bhosmer_ joined #salt
17:59 morissette hmmm
18:01 morissette https://docs.saltstack.com/en/latest/topics/cloud/troubleshooting.html#salt-bootstrap
18:02 morissette you should be able to use a custom deploy script
18:02 scarcry joined #salt
18:05 pcn morissette: where would I specify that?
18:05 morissette in your provider conf
18:07 racooper where I can find just barely older packages for salt for SuSE 11.3? there's some missing dependency hell in 2015.8.3-219.3 currently available and I can't find -219.1 to reinstall
18:07 morissette pcn: http://salt-cloud.readthedocs.org/en/latest/topics/misc.html
18:09 chadhs @morissette: i figured out the issue with subnets
18:09 chadhs don't nest a boto_lc creation in a boto_asg creation
18:11 morissette Well that's good to know I'm about to really get deep into the provisioning aspect of my project now
18:11 morissette But VPC/Subnet stuff may be a bit down the line
18:12 chadhs morissette did you mess with adding any other storage yet? like additional ebs volumes?
18:13 larsfronius joined #salt
18:13 morissette No I've been working on mainly application stuff and direct boto3 - just finished SQS integration into salt-cloud about 30 mins ago so now moving to deciding which packages were gonna offer
18:13 morissette and then setting up cloud.profiles and cloud.providers
18:14 morissette I'm more versed in salt as itself than salt-cloud :)
18:14 morissette learning salt-cloud now :)
18:15 baweaver joined #salt
18:15 chadhs gotcha
18:16 flowstat_ anyone here have any experience with the boto module?
18:16 flowstat_ I can't get my launch config to work for the life of me
18:16 flowstat_ the cloud_init section is broken
18:16 flowstat_ even if I literally copy the documented example
18:16 chadhs can you share a gist flowstat_ im working on that now
18:16 flowstat_ sure
18:17 morissette flow what are you trying to do?
18:17 giantlock joined #salt
18:17 morissette flowstat_, http://mattharris.org/2015/10/amazon-boto3-library-for-python-basics/
18:18 pcn morissette: really?  I don't see any documentation for that.  I see the "script" option here: https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.ec2.html but it seems to be about getting the script, not setting it
18:18 DammitJim joined #salt
18:19 morissette pcn, the documentation is sparse
18:19 morissette but you should be able to set the script with the script: tag
18:19 chadhs dang nabit lol, the one thing im missing the ansible docs are teasing me with…
18:20 morissette yeah but ansible is all ssh
18:20 morissette it's icky and slow
18:20 morissette just like salt-ssh
18:20 pcn morissette: Thanks the source is kind of dense and spread out too
18:20 flowstat_ here's the gist
18:20 flowstat_ https://gist.github.com/flowstate/255f241b764440d2018c
18:20 chadhs volumes: - device_name: volume_type: iops: volume_size:
18:20 flowstat_ those are the two outputs I'm getting when I try to set the script
18:20 chadhs argh!
18:20 flowstat_ it's all down to spacing or something
18:21 flowstat_ freaking driving me insane
18:21 morissette flowstat_, so thought you were talking about the boto library sorry
18:21 flowstat_ I've copied both the official documentation and Ryan Lane's
18:21 flowstat_ neither work
18:21 flowstat_ no worries, morisette
18:21 chadhs line 16 flowstat_
18:21 flowstat_ I should have been more specific
18:21 flowstat_ I should have been more specific
18:21 flowstat_ I should have been more specific
18:21 flowstat_ I should have been more specific
18:21 flowstat_ I should have been more specific
18:21 flowstat_ I should have been more specific
18:21 racooper stopppppp
18:22 chadhs just indent 2 spaces so it lines up with the r in scripts
18:22 morissette or I should have assumed that #salt is salt related and #boto||#python is not salt related :P
18:22 chadhs and change 'run_salt.sh': to just salt:
18:22 flowstat_ ...sorry, my keyboard locked up.. on up.
18:22 murrdoc anyone here understand travis ?
18:22 morissette pcn, if you see that gist above it might help
18:22 morissette pcn this one: https://gist.github.com/flowstate/255f241b764440d2018c
18:23 racooper so...I've narrowed down the issue with SuSE 11.3 and salt 2015.8.3-219.3.  the problem is actually with python-tornado 4.3-1.1 and missing dependencies.
18:23 racooper https://github.com/saltstack/salt/issues/29714
18:23 saltstackbot [#29714]title: SuSE packages for salt-minion 2015.8.3-219.3 missing dependencies | having multiple issues with salt-minion 2015.8.3-219.3 from http://download.opensuse.org/repositories/devel:languages:python/SLE_11_SP3/devel:languages:python.repo.  First, a new code dependency on python-singledispatch was added but the package was not added to the salt packages as a dependency.  After getting past that, there is a missing dependency on backports_abc that
18:23 * morissette how to use a real linux distro - pick one that is debian or redhat based :P j/k
18:24 flowstat_ ahadhs, I did that, getting the "could not found expected ':'
18:24 flowstat_ btw, 'could not found' is hawt.
18:27 dkrae joined #salt
18:27 flowstat_ I'm doing this on our old jenkins box which is running python 2.6. could this be a pyYAML issue?
18:29 otter768 joined #salt
18:29 ALLmightySPIFF joined #salt
18:29 ex-cowboy joined #salt
18:31 baweaver joined #salt
18:32 KennethWilke joined #salt
18:39 cberndt joined #salt
18:41 chadhs so apparently it's not possible to create EBS volumes with the salt boto modules yet
18:41 chadhs it only works with cloud profiles
18:41 chadhs - volumes:
18:41 chadhs - { size: 32, device: /dev/sdf, type: io1, iops: 100 }
18:41 pcn morissette: in the profiles
18:42 chadhs crap…
18:42 morissette it's ok
18:42 chadhs so for now; it's either boto_cfn and cloudformation json adventure or ansible
18:43 chadhs flowstat_ any luck with your cloud-init script
18:43 Bryson joined #salt
18:43 chadhs once you get that test working, you can actually store it in a pillar so you can reference multiple places :-)
18:44 flowstat_ I'm running it on a different machine
18:44 flowstat_ just to sanity check that it's not a python version issue
18:44 morissette or you could virtualenv it
18:44 morissette the right way to do things :)
18:45 tzero joined #salt
18:47 chadhs virtualenv is worth spending a little time learning
18:47 chadhs very handy
18:47 chadhs on your desktop i highly recommend virtualenvwrapper makes things even nicer imho
18:47 stooj joined #salt
18:47 pcn Or go all the way and use pyenv with the virtualenv support
18:47 nZac joined #salt
18:48 chadhs isn't that python3?
18:48 pcn So far 2+3
18:48 pcn It's more for personal/per-user work, though.  Not appropriate for system salt
18:49 chadhs gotcha
18:50 chadhs good to know pcn
18:50 chadhs thnx
18:50 hightekvagabond joined #salt
18:50 chadhs man i feel like im taking crazy pills today… i have the power to spin up anything in AWS via boto except not disks
18:50 chadhs ahhhhh!  ;-P
18:54 perfectsine joined #salt
18:56 ageorgop joined #salt
18:59 flowstat_ so, turns out that boto_lc isn't available as a module in salt.
18:59 flowstat_ as in, it's not there in github
19:00 flowstat_ you're not the only one taking crazy pills
19:00 flowstat_ what the hell
19:00 flowstat_ Comment: State 'boto_lc.present' was not found in SLS 'aws'
19:00 flowstat_ Reason: 'boto_lc' __virtual__ returned False
19:01 flowstat_ wait, it's in states..
19:05 dyasny joined #salt
19:05 Xevian joined #salt
19:06 pviktori_ joined #salt
19:07 steffo joined #salt
19:07 shaggy_surfer I am running 2015.8.3 of salt-master and trying to turn on the salt-api functionality.  I added the CherryPy module which reflects in my salt-master versions-list but when I restart the salt-server there is no port listener, any ideas?  I thought you didn't need to install salt-api package as it was supposed to be included in this release
19:08 mpanetta shaggy_surfer: salt-api is a different process
19:08 mpanetta It isn't in the salt-master process.  It has its own init scripts and soforth.
19:09 shaggy_surfer so it does need to be installed then?
19:09 mpanetta I don't think so
19:09 mpanetta It is part of salt-master package I believe
19:09 hackel joined #salt
19:10 shaggy_surfer right, so I added the rest_cherrypy configuration exampled here:  https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
19:10 shaggy_surfer I restarted master and it doesn't have the port 8000 listener
19:10 mpanetta The master is not the correct process
19:10 mpanetta you need to restart salt-api
19:10 whytewolf both should be restarted.
19:10 shaggy_surfer oh I got you
19:10 mpanetta Oh is it both?
19:10 shaggy_surfer so /etc/init.d/salt-api start
19:11 shaggy_surfer something like that
19:11 mpanetta yeah
19:11 shaggy_surfer gotcha, sorry I was confused
19:11 mpanetta It happens :)
19:11 shaggy_surfer thanks for the clarification
19:11 whytewolf yeah. the master still needs to get the hooks needed for cherrypy. but the salt-api still builds the listener
19:12 mpanetta whytewolf: That makes sense
19:12 oeuftete Running 2015.8.3 and trying to move to dockerng, and I'm really disappointed.  Am I missing something obvious?  Say, this: https://gist.github.com/oeuftete/c386e59f3bec42fbb7e4
19:12 shaggy_surfer but you do need the salt-api package installed as I don't have any init scripts for it
19:12 whytewolf if you don't have init scripts then yes
19:13 ranomore joined #salt
19:13 whytewolf it is supposed to have been added to the salt-master package. but i think it is being missed by the package creation scripts
19:13 pviktori joined #salt
19:14 denys joined #salt
19:14 baweaver joined #salt
19:14 flowstat_ figured it out, chadhs
19:14 mpanetta whytewolf: That is what I thought.
19:14 shaggy_surfer I see, that's seems to be the issue then, I am using the official salt repo's for ubuntu
19:14 mpanetta Well not the part about it being missed
19:14 mpanetta heh
19:15 shaggy_surfer I see the listener now thanks guys
19:16 mpanetta no problem
19:16 whytewolf np
19:16 ajw0100 joined #salt
19:17 felskrone joined #salt
19:18 ranomore How can I make data from salt.utils.http.query available in a jinja template? the words seem to escape me.
19:18 ranomore *the google words
19:19 elsmo joined #salt
19:22 denys joined #salt
19:22 cyborg-one joined #salt
19:23 chadhs flowstat_ what was it!?
19:23 flowstat_ my spacing was correct when it was giving the 'iteritems' issue
19:23 flowstat_ it was then complaining about the fact I needed 4 spaces on the 'size' attribute of my block device
19:23 flowstat_ but now it's broken in another place
19:24 flowstat_ "You may not reference Amazon VPC security groups by name"
19:24 chadhs yup
19:24 morissette Yep
19:24 morissette need to use ID
19:24 chadhs if you define subnets you need to use id
19:24 flowstat_ which means that Ryan Lane's documentation and the actual documentation are full of it
19:24 chadhs for the sec groups
19:24 morissette securitygroupid:
19:24 morissette - sg-663a2000
19:24 morissette pulled a chad
19:24 flowstat_ I can't derive that id
19:25 flowstat_ since I'm theoretically creating it in the same state file
19:25 flowstat_ all I have for reference is its name
19:25 flowstat_ the only way to get it is to manually look it up and set it
19:26 flowstat_ so what's the point of trying to automate any of this
19:27 flowstat_ this completely violates one of the variants behind his entire approach
19:27 flowstat_ end of rant, I guess, but this really pisses me off
19:27 flowstat_ s/variants/invariants
19:28 subsignal joined #salt
19:28 jimklo joined #salt
19:29 morissette well gonna have to figure it out then huh
19:29 flowstat_ there's no figuring it out. This is a dead end.
19:30 morissette can't extend it?
19:30 flowstat_ I'll have to use salt-cloud or something else for provisioning
19:30 flowstat_ hmmm, actually, maybe
19:31 flowstat_ it checks in boto whether or not a security group exists
19:31 morissette That's the great thing about open source software
19:31 flowstat_ I'm just not sure if it's even possible. I guess I need to look into it with boto
19:32 flowstat_ but I wanted to blame someone else!!! How could you be rational about this, morissette!?
19:32 jrgochan1 I'm trying to use salt.states.mount to mount a few NFS shares. One of the servers is down and the operation just seems to hang. Is there a way to make salt timeout/ignore an operation after a set amount of time/tries?
19:32 morissette http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#vpc
19:33 morissette flowstat_, what exactly are you trying to accomplish?
19:33 flowstat_ so for my launch configuration, I have to supply a security group
19:34 flowstat_ the way it's done in the boto_lc state is by security group name
19:34 flowstat_ that is not allowed for security groups within a VPC
19:34 morissette Yeah
19:34 flowstat_ so basically, I need to have a flag that says "I'm behind a VPC"
19:34 morissette so you need the sgid
19:34 flowstat_ and if that's set
19:34 woodtablet joined #salt
19:34 woodtablet hey guys
19:34 hightekvagabond joined #salt
19:34 flowstat_ I need to go search within my security groups in the vpc for one with the supplied name
19:34 flowstat_ and put the id in instead
19:34 morissette if not re.match(/\S{2}-\S+/): call boto and translate?
19:34 flowstat_ hopefully I can just list them all with boto
19:35 GreatSnoopy joined #salt
19:35 morissette http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#securitygroup
19:35 flowstat_ I've got to use old boto
19:35 morissette ewww
19:35 flowstat_ if I'm going to extend the existing state
19:35 flowstat_ yeah
19:36 babilen jrgochan1: It will, eventually, timeout, but that might take a while. Not sure if you can influence that.
19:38 woodtablet if i am trying to install the salt cloud ec2 driver on a non-amazon machine (IE RHEL 6) box. where would i get it ? i found the rpm here wants ruby and oracle instant client: https://aws.amazon.com/developertools/Amazon-EC2/368
19:38 woodtablet but i thought i wanted python libs or something..
19:39 akhter joined #salt
19:39 jrgochan1 babilen: Thanks. I can't find any way to do it yet. If I find something I'll post it here
19:39 morissette woodtablet, it shouldn't need ruby
19:40 morissette (daemon)[root@ip-172-30-0-225 salt]# which ruby
19:40 morissette /usr/bin/ruby
19:40 morissette although
19:40 morissette ruby is installed
19:40 morissette maybe it does need ruby
19:40 woodtablet tell me about it
19:40 woodtablet lol
19:40 woodtablet ---> Package ec2-ami-tools.noarch 0:1.5-7 will be installed
19:40 woodtablet --> Processing Dependency: ruby for package: ec2-ami-tools-1.5-7.noarch
19:40 woodtablet --> Running transaction check
19:40 woodtablet ---> Package ruby-enterprise.x86_64 0:1.8.7...2010.02.alumni-0.tg will be installed
19:40 woodtablet --> Processing Dependency: oracle-instantclient11.1-basic >= 11.1.0 for package: ruby-enterprise-1.8.7...2010.02.alumni-0.tg.x86_64
19:40 * babilen hands woodtablet one http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, …
19:40 morissette I mean ruby is just better python
19:40 woodtablet oh sorry about that
19:40 morissette it actually ends it blocks
19:41 woodtablet spaces are blocks =D
19:41 woodtablet code blocks!
19:41 morissette doesn't just trail off in to newline/space land
19:41 woodtablet but that definately a big adjustment for me as well
19:41 woodtablet so my amazon ami version doesnt have oracle instant client on it
19:42 woodtablet so i am little irritated that this version needs it
19:42 woodtablet how do you guys install the ec2 driver for salt-cloud ?
19:42 morissette Pretty sure it was just there
19:43 morissette I just pip installed sal
19:43 morissette salt
19:43 morissette and it was there
19:43 morissette but I'm also on an aws server
19:43 woodtablet hm.. ok.. i ll look again. these urllib3 warnings just clogging things up
19:47 jhauser joined #salt
19:49 morissette run ion venv?
19:49 morissette upgrade pip and python
19:49 woodtablet morissette: ohh.. i think you are right! i just had lots of errors.. still do, but the complaints arent ec2 missing
19:50 woodtablet morissette: what is that ? that is ion venv?
19:50 morissette no
19:50 morissette pip install virtualenv
19:51 Rumbles joined #salt
19:51 woodtablet ha, sorry, i didnt catch that. ok ill try newer version of it all in a virtenv
19:58 om joined #salt
19:58 om Hey Guys
19:59 om I am doing if conditionals in jinja with grains['fqdn'].startswith('serverfqdn')
19:59 om anyone have pointers to match the same but with wildcards?
19:59 om grains['fqdn'].startswith('*serverfqdn')
19:59 om is there a type of grains['fqdn'].contains('serverfqdn')
20:00 om or something like that?
20:00 jrgochan1 sorry for the pasted yaml, but anyone see why this isn't working?
20:00 jrgochan1 - onlyif:
20:00 jrgochan1 - network.ping {{hosturl}} return_boolean=True
20:00 AndreasLutro om: no, but https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html
20:00 AndreasLutro jrgochan1: onlyif expects a shell command, not a salt module invocation
20:01 jrgochan1 Good to know. Thanks AndreasLutro
20:03 perfectsine joined #salt
20:03 pcn Anyone know if there's a solution in the works for https://github.com/saltstack/salt/issues/29581
20:03 saltstackbot [#29581]title: Complaints about pyOpenSSL version on Saltstack 2015.8.3 | When 2015.8.3 is installed on Ubuntu 14.04 from repo.saltstack.com, I get the following error on run:...
20:04 om AndreasLutro: so, let me see if this makes sense
20:06 cray- joined #salt
20:08 om if salt['match.grain']('fqdn') == ('*server') %}
20:08 om not sure that is correct syntax...
20:08 TyrfingMjolnir joined #salt
20:09 AndreasLutro om: just try it on the command line - `salt my-minion match.grain fqdn` is the same as `{{ salt['match.grain']('fqdn') }}`
20:10 AndreasLutro so you can see what it returns
20:10 jrgochan1 Anyone know if there's a way to customize the output of a state run? I'd like to make one of them red, conditionally
20:12 om think this will work
20:12 om {% if salt['match.grain']('fqdn:*-webserver-*'%}
20:12 om matches fqdn wildcard of all web servers ?
20:13 aidalgol joined #salt
20:13 jfindlay jrgochan1: you can create a custom outputter.  It seems like you might want to modify the highstate putputter
20:13 jfindlay s/putp/outp/
20:14 jfindlay pcn: #29632
20:15 jfindlay https://github.com/saltstack/salt/pull/29632
20:15 saltstackbot [#29632]title: reduce severity of tls module __virtual__ logging | Related to #29630.
20:15 om thanks AndreasLutro
20:15 om works
20:16 AndreasLutro om: cool!
20:20 pcn jfindlay: OK, so it's waiting on future releases, got it.
20:21 pcn jfindlay: and thanks for taking a look at the issue re: salt-cloud.  Does my last update make sense?
20:21 flowstat_ joined #salt
20:21 jfindlay pcn: it looks like I misunderstood, the change I made reduces the logging severity, but the real issue is a contemporary pyopenssl dependency package
20:21 perfectsine joined #salt
20:22 jfindlay pcn: yeah, I'm waiting for techhat to respond there, as I'm not very familiar with the issues involved
20:22 jrgochan1 Thank ya jfindlay
20:23 jfindlay jrgochan1: no problem :)
20:23 pcn jfindlay: I think for most ppl, that reduction in messages may be enough (e.g. "don't bother me" but I don't know what x509 features would be missing, and who would miss it if the error didn't bubble up)
20:23 beardedeagle joined #salt
20:24 beardedeagle Not seeing any docs on adding security groups to salt-cloud for openstack. Is this not possible outside of a state ran in post create?
20:24 jfindlay yeah, especially since the `logging.error()` is in the `__virtual__` of that module, which is processed by *everybody*.  A classic newbie mistake :-)
20:25 baweaver joined #salt
20:26 pcn beardedeagle: looks like the feature isn't documented well, but it is noted as being present in other places, e.g. http://spaghetti.io/cont/article/saltstack-cloud-and-openstack/1/1.html
20:27 beardedeagle well shoot-darn @pcn, thanks
20:28 nZac joined #salt
20:29 pcn Give it a shot
20:29 bhosmer_ joined #salt
20:30 jaybocc2 joined #salt
20:30 beardedeagle @pcn: yeah spinning up an instance now
20:30 otter768 joined #salt
20:30 ajw0100 joined #salt
20:31 scoates joined #salt
20:31 wangofett Does anyone know how to add a yum package repo? i.e. I'm trying to effectively do `yum localinstall http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm`
20:31 wangofett Am I pretty much restricted to cmd.run?
20:32 wangofett I'm not really finding anything promising here: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.yumpkg.html#salt.modules.yumpkg.install
20:32 ranomore wangofett: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
20:32 jfindlay wangofett: pkgrepo.managed?
20:32 wangofett I thought I could use sources or pkgs, but it looks like I have t
20:32 PeterO joined #salt
20:32 wangofett *to provide a package name
20:33 wangofett jfindlay: That's what I've done for some other things... I haven't seen the settings for that repo
20:33 wangofett i.e. I don't see it here: https://wiki.postgresql.org/wiki/YUM_Installation
20:34 wangofett (and this formula only has debian: https://github.com/saltstack-formulas/postgres-formula/tree/master/postgres)
20:35 buhman wangofett: eh? you mean you can't read the pgdg-94-centos.repo in that package and make a salt state from that?
20:35 whytewolf wangofett: I believe you are on the right path with pkg.install
20:35 whytewolf and sources
20:35 jfindlay wangofett: is this their repo RPM: https://wiki.postgresql.org/wiki/YUM_Installation#Install_PGDG_RPM_file?  If so you could just install than and move on from there
20:36 beardedeagle @pcn: that worked perfectly. I am about 5 seconds away from offering salt as a service to GoDaddy.
20:36 whytewolf wangofett: the pkg name is pgdg-centos94
20:37 pcn beardedeagle: well, good work!
20:37 jfindlay wangofett: or here's a whole list of repo packages: http://yum.postgresql.org/repopackages.php#pg94
20:37 wangofett whytewolf: oooh, lemme try that then
20:38 winsalt does anyone know if its possible do an exclude for a reactor event tag?
20:38 cberndt joined #salt
20:39 viq joined #salt
20:39 whytewolf winsalt: no way to really exclude the reactor. could wrap the reactor stanzas in jinja to do nothing on the servers that don't match though
20:40 akhter joined #salt
20:43 winsalt i have a reactor for salt/cloud/*/created, for bootstrappy stuff.  But I am also attempting a testing orchestration that spins up a new minion to test states in, and im trying to figure out how to separate those.
20:45 wangofett Hah, whytewolf that worked perfectly, thanks!
20:45 whytewolf wangofett: no problem
20:46 flowstat_ joined #salt
20:46 jrgochan1 hrm. Does Salt have support for CUPS?
20:46 wangofett https://gist.github.com/waynew/c3bf3025596db975b73b <- That's what my state looks like for anyone who might need a similar thing
20:47 wangofett jrgochan1: http://lmgtfy.com?q=saltstack+cups doesn't turn up anything useful
20:47 wangofett so... probably not
20:47 jrgochan1 yeah. it sure doesn't
20:47 wangofett That sure would be handy though
20:48 wangofett jrgochan1: there is https://pypi.python.org/pypi/pycups
20:48 jrgochan1 agreed.
20:48 wangofett that looks like it's got somewhat recent development
20:48 wangofett you could probably wrap some of that in your own state/module
20:49 jrgochan1 Perhaps once everything else is configured and working, just going to copy around config files for now :)
20:49 jrgochan1 Thanks for the link wangofett
20:51 jfindlay jrgochan1: if you do end up writing a state/exec modules, don't forget to push it upstream to salt-contrib or salt :)
20:51 bluenemo joined #salt
20:52 jrgochan1 Most definitely. Don't think bossman would want me working on that just yet though
20:55 jerrcs joined #salt
20:58 baweaver joined #salt
20:58 PeterO joined #salt
21:00 KennethWilke joined #salt
21:00 PeterO joined #salt
21:00 kusams joined #salt
21:04 akhter joined #salt
21:07 keimlink joined #salt
21:08 fyb3r joined #salt
21:08 fyb3r https://gist.github.com/fyb3r/55d91b0cf58d44fbe4e8
21:09 nZac joined #salt
21:09 fyb3r can someone take a look at that and tell me why it is keeping a socket open after every reactor
21:10 nZac joined #salt
21:11 LondonAppDev joined #salt
21:12 fyb3r master is reacting to syndic's events and calling localclient cmd inside the runner to perform another action.
21:13 bhosmer_ joined #salt
21:16 zin joined #salt
21:22 zin can someone advise on how to use the salt network module to configure an interface on CentOS w/ an IPv6 address?  I’m looking at https://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html , but I’m not seeing a good example for IPv6 configuration
21:25 RandyT joined #salt
21:25 RandyT Hey, what's shakin?
21:25 RandyT I have a new puzzle that I would appreciate some input on.
21:26 RandyT Getting the feeling I am doing something wrong given the amount of conditionals I am having to put in every state file.. maybe an artifact of working with Windoze.
21:26 RandyT I am attempting to apply a set of database sql scripts
21:26 jfindlay fyb3r: you could try pinging cachedout on github.  I seem to remember a recent issue similar to this
21:27 RandyT they must be applied in order
21:27 jfindlay fyb3r: or jacksontj
21:27 RandyT I've put conditional jinja around the individual handling of each file with requisites pointing at the previous script.
21:27 fyb3r yeah that issue was actually mine lol
21:28 RandyT But as you could predict, once the script is applied, it is rendered out of the state file so the requirement does not exist...
21:28 fyb3r i think i had told you to mark it as fixed but it seems i was incorrect in thinking that the dunder dictionaries were closing all of the threads
21:28 jfindlay fyb3r: do you have the number?  Should we change the labels?
21:28 RandyT I would appreciate any guidance as to how to deal with this situation.
21:29 fyb3r https://github.com/saltstack/salt/issues/29616
21:29 saltstackbot [#29616]title: Executing LocalClient inside a custom Runner causes 2 threads to be left open upon return | Ive been testing this for a while and for some reason it seems 2 of the 4 spawned threads close when the runner module is completed....
21:30 drawsmcgraw left #salt
21:32 clintberry joined #salt
21:34 baweaver joined #salt
21:34 RandyT Here is a gist to show what I am trying to solve: https://gist.github.com/rterbush/9719d2280d19eb95d583
21:35 RandyT How do you impose order in a set of states that may not render if previous states are complete?
21:35 lorengordon RandyT: try the `_in` form of the requisite
21:36 lorengordon within the state inside the conditional block, use the `_in` syntax pointing at the other state
21:38 fyb3r jfindlay,  thanks for changing it. im going through and providing more logs and notes for this one.
21:39 RandyT lorengordon: so required_in for the prior state, or the following state?
21:40 flowstat_ joined #salt
21:41 inad922 joined #salt
21:42 mapu joined #salt
21:42 losh joined #salt
21:44 larsfronius joined #salt
21:48 LondonAppDev joined #salt
21:50 RandyT lorengordon: if I use require_in to point to the state that is possibly not rendered, I get an error: "Cannot extend ID ... It is not part of the high state"
21:52 solidsnack joined #salt
21:52 lorengordon RandyT: sorry was pulled into a phone call...
21:52 lorengordon yeah, i saw the gist after i first replied
21:52 RandyT lorengordon: np
21:53 lorengordon you're basically using the grains to determine state, right?
21:53 cray- left #salt
21:53 RandyT yes, which feels wrong, but I am unaware of how to handle these things any other way
21:54 lorengordon there are at least two options
21:54 RandyT many things I am doing in Windows environment (and probably specific to database configuration) do not allow me to apply them a second time.
21:54 whytewolf RandyT: it is bad and you should feel bad. your cmd.run's should use unless or onlyif to become stateful
21:54 lorengordon 1. use the `stateful: True` option to cmd.run
21:54 lorengordon 2. use the onlyif/unless requisite as a test instead of the jinja wrapper
21:54 RandyT whytewolf: :-)
21:54 lorengordon :)
21:55 RandyT I feel bad
21:55 whytewolf twas a joke RandyT :P
21:55 RandyT whytewolf: I get it. :-)
21:56 RandyT lorengordon: whytewolf thanks, I will have a look at these other options.
21:56 lorengordon you could also change from cmd.run to cmd.script with `stateful: True`
21:56 lorengordon the stateful option basically allows you to run a test similar to unless/onlyif, but i like it better because it reports back like a regular state
21:57 whytewolf there is a third option. write a customer module/state that handles this and is statful
21:57 whytewolf s/customer/custom
21:58 RandyT whytewolf: that option has occurred to me to possible extend the mssql module to handle these more gracefully.
21:58 lorengordon here's the doc for the cmd state, the stateful option is outlined in the first section: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#execution-of-arbitrary-commands
21:59 RandyT thanks again
22:02 deedubs joined #salt
22:03 PeterO joined #salt
22:03 mclosson joined #salt
22:05 viq1 joined #salt
22:10 ronrib joined #salt
22:11 StolenToast can I make salt copy everything in a directory in the salt file server into a local one?
22:12 whytewolf you mean like file.recurse?
22:12 StolenToast I want a state that distributes all the modulefiles in a dir
22:12 cyteen_ joined #salt
22:13 StolenToast whytewolf: perfect, thanks
22:13 abednarik joined #salt
22:16 edrocks joined #salt
22:18 grumm_servire joined #salt
22:21 nZac joined #salt
22:23 darien joined #salt
22:30 StolenToast hm, I'm noticing that sometimes salt says a node already has highstate running but it will run anyway
22:30 StolenToast I wonder if there is a timeout causing a bug here
22:31 otter768 joined #salt
22:32 _JZ_ joined #salt
22:35 Netwizard joined #salt
22:35 beardedeagle can you not specify master params in salt-cloud like you can minion?
22:35 MindDrive Upgrading one of my environments from Salt 2015.5.0 to 2015.8.3.  Looks like it's seriously breaking things... http://paste.pound-python.org/show/gGY2ILGMsvEVLkrQBeFN/ - the line I'm concerned with is 'Could not LazyLoad tds.install'.
22:36 MTecknology I have someone with an interesting goal. Instead of doing regular system updates, he wants to re-deploy each server every work day. He wants to update a VM template, then update base images from that template, then deploy replacement boxes for every running server, and then suck them into the LB and slowly kill off the old boxes.
22:37 MTecknology The theory being that even if you have one server broken into, the server life cycle is so short that it won't really matter.
22:37 beardedeagle huh, docs says you should be able to...time to launch everything in debug
22:38 oeuftete Did something about the dockerng grumbling I was going earlier (opened issue, proposed fix): https://github.com/saltstack/salt/issues/29727
22:38 saltstackbot [#29727]title: dockerng.running does not pull image as documented | According to https://docs.saltstack.com/en/latest/ref/states/all/salt.states.dockerng.html#salt.states.dockerng.running, "\[t]his state will pull the image if it is not present".  However, this doesn't seem to be the case:...
22:40 baweaver joined #salt
22:42 abednarik joined #salt
22:42 MindDrive Anyone have an idea why the lazy load is failing in my case?
22:44 Grokzen joined #salt
22:44 beardedeagle ah, it doesn't apply master params if you don't make_master: True first. I was installing salt-master via bootstrap.
22:45 flowstat_ joined #salt
22:50 bluenemo joined #salt
22:53 bhosmer_ joined #salt
22:56 pegmanm joined #salt
22:58 lumtnman joined #salt
23:02 clintberry joined #salt
23:06 MindDrive *sigh* It's crap like this that really makes me hate Salt at times.  Upgrading my version should NOT break my whole environment.
23:07 arapaho joined #salt
23:08 fyb3r this latest release seemed to be a huge overhaul on the inner workings of it
23:08 abednarik left #salt
23:08 abednarik joined #salt
23:08 fyb3r its also why i fly the "if it aint broke dont fix it" rule typiclaly
23:09 MindDrive The upgrade was because I was having problems, but at least I could function with those problems.  This case is different.
23:09 fyb3r roll back imo
23:10 miked510 joined #salt
23:16 johnkeates joined #salt
23:16 MindDrive Can't.
23:16 lumtnman joined #salt
23:17 johnkeates So say we all.
23:18 MindDrive In the sense that RedHat is run by morons and RPM is the most broken packaging ever invented.
23:18 morissette joined #salt
23:19 tkharju joined #salt
23:20 johnkeates And that's why real computers always run Debian.
23:20 johnkeates Even the space station does it!
23:21 jfindlay MindDrive: it looks like tds is a custom execution module.  Does it have a `__virtual__` function?  Is there any reason that it might not be loaded in other circumstance? can you use python's loader to load it: `cd /srv/salt/_modules ; python -c import tds`
23:21 justanotheruser joined #salt
23:22 MindDrive jfindlay: It was all working fine until I tried to upgrade Salt.  At that point neither the masters nor the minions would recognize it existed.
23:22 johnkeates left #salt
23:23 fyb3r remove the master_minion.pub?
23:24 fyb3r also the dependencies changed from 2015.5 to 2015.8.x
23:26 jfindlay I wonder if you need to `salt '*' saltutil.refresh_modules` after the upgrade
23:27 MindDrive I'm in the process of fixing RPM braindeadness and backing out... it seems to be fixing things, but it will take time.
23:27 jfindlay although I don't immediately see why that would be necessary
23:28 MindDrive jfindlay: sync_modules and refresh_modules were both doing nothing.
23:33 colegatron joined #salt
23:33 fyb3r left #salt
23:36 clintberry joined #salt
23:37 stooj joined #salt
23:39 jfindlay MindDrive: the next thing I would try is `salt minion cmd.run 'cd /var/cache/salt/minion/extmods/modules ; python -c "import tds"'`
23:43 msx joined #salt
23:45 larsfronius joined #salt
23:46 flowstat_ joined #salt
23:51 dyasny joined #salt
23:52 MindDrive jfindlay: At this point I've completely backed out to 2015.5.0 and things seem to be returning to normal.  I guess I'll need to do the upgrade much more carefully with a lot more testing.
23:52 MindDrive Thanks for the advice, though.
23:52 solidsnack joined #salt
23:52 jfindlay sure, I'm sorry it didn't work out.  Let me know if you run into trouble again
23:54 MindDrive Thanks.  I have a contact at SaltStack I'm going to email and see if he can give me some things to check pre-upgrade (like configuration changes, etc.) before I do this again.
23:57 andrei_ joined #salt
23:57 andrei_ Is it possible in salt stack to only select minions with no user input for some time? For instance, I want to only run command on the minions that have no mouse and keyboard events for at least half an hour
23:59 jfindlay andrei_: you may want to look at beacons, although turning that into a minion selection may not be a single step kind of thing

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