Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-03-16

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

All times shown according to UTC.

Time Nick Message
00:08 mdasilva joined #salt
00:17 cliffstah joined #salt
00:17 brianfeister joined #salt
00:17 digitalhero joined #salt
00:23 jhauser joined #salt
00:32 kliquori joined #salt
00:33 jhauser joined #salt
00:34 bhosmer_ joined #salt
00:35 dendazen joined #salt
00:40 zmalone joined #salt
00:42 digitalhero joined #salt
00:48 digitalhero joined #salt
00:51 digitalhero joined #salt
00:55 nZac joined #salt
00:57 jeddi joined #salt
01:00 mapu joined #salt
01:04 nidr0x joined #salt
01:09 digitalhero joined #salt
01:09 nZac joined #salt
01:15 shaggy_surfer joined #salt
01:16 relicanth joined #salt
01:17 ageorgop joined #salt
01:17 RobertChen117 joined #salt
01:18 kliquori joined #salt
01:19 cberndt joined #salt
01:21 racooper joined #salt
01:33 bhosmer_ joined #salt
01:47 _JZ_ joined #salt
01:49 brianfeister joined #salt
01:53 mavhq joined #salt
01:55 anmol joined #salt
02:12 jeddi joined #salt
02:12 favadi joined #salt
02:12 digitalhero joined #salt
02:14 zmalone joined #salt
02:16 hightekvagabond joined #salt
02:20 huddy joined #salt
02:22 justanot1eruser joined #salt
02:23 cyborglone joined #salt
02:23 rem5 joined #salt
02:29 rem5 joined #salt
02:38 malinoff joined #salt
02:39 nZac joined #salt
02:40 dendazen joined #salt
02:41 evle joined #salt
02:42 AnalogLifestyle joined #salt
02:51 bhosmer_ joined #salt
02:59 khaije1 joined #salt
03:00 khaije1 is there a state that wraps the partition module?
03:02 digitalhero joined #salt
03:08 digitalhero joined #salt
03:16 digitalhero joined #salt
03:20 kliquori joined #salt
03:27 fracklen joined #salt
03:29 stooj joined #salt
03:29 digitalhero joined #salt
03:34 bhosmer joined #salt
03:39 brianfeister joined #salt
03:40 ramteid joined #salt
03:42 RobertChen117 joined #salt
03:46 anmol joined #salt
03:47 digitalhero joined #salt
03:54 MK_FG joined #salt
03:55 digitalhero joined #salt
04:01 digitalhero joined #salt
04:03 cyborgIone joined #salt
04:06 kliquori joined #salt
04:09 beardedeagle joined #salt
04:19 ajw0100 joined #salt
04:21 tkharju joined #salt
04:21 malinoff joined #salt
04:28 barajasfab joined #salt
04:28 bhosmer_ joined #salt
04:31 zmalone joined #salt
04:32 digital__ joined #salt
04:35 digitalhero joined #salt
04:38 mowntan joined #salt
04:38 mowntan joined #salt
04:40 rem5 joined #salt
04:42 digitalh_ joined #salt
04:46 zmalone joined #salt
04:50 fracklen joined #salt
04:52 RobertChen117 joined #salt
04:55 jeddi joined #salt
05:01 anmol joined #salt
05:01 digitalhero joined #salt
05:21 brianfeister joined #salt
05:22 RobertChen117 joined #salt
05:23 brianfeister joined #salt
05:39 stooj joined #salt
05:46 impi joined #salt
05:48 favadi joined #salt
05:49 sauvin joined #salt
05:51 mavhq joined #salt
06:02 digitalhero joined #salt
06:08 kliquori joined #salt
06:16 kshlm joined #salt
06:30 nZac joined #salt
06:35 bhosmer_ joined #salt
06:37 aw110f joined #salt
06:40 aw110f_ joined #salt
06:44 mdasilva joined #salt
06:49 felskrone joined #salt
06:51 hightekvagabond joined #salt
06:53 kliquori joined #salt
06:54 jeddi joined #salt
07:00 dkrae joined #salt
07:01 rdas joined #salt
07:03 linjan joined #salt
07:10 euidzero joined #salt
07:14 RobertChen117 joined #salt
07:22 brianfeister joined #salt
07:24 cberndt joined #salt
07:26 rdas joined #salt
07:26 penguin_dan joined #salt
07:28 MTecknology dangit, I forgot how to do this... how can I use jinja to trip a string after a character?
07:29 MTecknology I have a string with spaces and want to only use everything before the first space
07:29 bhosmer_ joined #salt
07:30 hemebond MTecknology: You could maybe split on spaces
07:30 beardedeagle has anyone ever had to a failover for a master of masters type setup. I can get the syndic to get it's minions, but I can't get the master of masters to see the syndic or it's minions
07:30 malinoff MTecknology: {{ var.split(' ')[0] }}
07:31 MTecknology oh, I forgot that was available in jinja2
07:31 MTecknology thanks!! :D
07:33 beardedeagle nevermind, it just took forever and day and a half for the keys to appear
07:34 beardedeagle can't see the syndics minions though
07:39 KermitTheFragger joined #salt
07:45 mariusv joined #salt
07:45 mariusv joined #salt
07:46 beardedeagle yeah, can't see minions of syndic. Is there any docs or a thread for failovers in syndic layouts?
07:47 fracklen joined #salt
07:48 lunarlamp joined #salt
07:54 yuhlw_ joined #salt
07:56 fracklen joined #salt
07:56 beardedeagle aha
07:56 fracklen joined #salt
07:56 beardedeagle figured it out. not a terrible failover process but definitely involved.
07:57 opdude joined #salt
07:59 fracklen joined #salt
08:01 JohnnyRun joined #salt
08:02 TyrfingMjolnir joined #salt
08:03 atmosx joined #salt
08:07 digitalhero joined #salt
08:09 josuebrunel joined #salt
08:11 dmaiocchi joined #salt
08:14 josuebrunel joined #salt
08:20 stooj joined #salt
08:20 permalac joined #salt
08:21 dgutu joined #salt
08:22 kbyrne joined #salt
08:23 bhosmer_ joined #salt
08:24 bowhunter joined #salt
08:28 bhosmer_ joined #salt
08:30 dgutu joined #salt
08:31 nZac joined #salt
08:32 Nazzy joined #salt
08:32 remyd1 joined #salt
08:33 ronnix joined #salt
08:39 ikarpov joined #salt
08:42 kshlm joined #salt
08:43 jhauser joined #salt
08:44 RobertChen117 joined #salt
08:45 RobertChen117 joined #salt
08:46 mdasilva joined #salt
08:49 cberndt joined #salt
08:50 jeddi joined #salt
08:53 Miouge joined #salt
08:55 lero joined #salt
08:55 kliquori joined #salt
08:56 denys joined #salt
08:57 RobertChen117 joined #salt
08:59 Miouge joined #salt
09:00 potens joined #salt
09:05 iarba joined #salt
09:06 Miouge joined #salt
09:07 Rumbles joined #salt
09:08 atmosx joined #salt
09:10 geomacy joined #salt
09:10 s_kunk joined #salt
09:11 brianfeister joined #salt
09:12 digitalhero joined #salt
09:17 Miouge joined #salt
09:26 fracklen joined #salt
09:27 RobertChen117 joined #salt
09:27 slav0nic joined #salt
09:29 beardedeagle joined #salt
09:30 beardedeagle Is anyone aware that the newest versions of salt-bootstrap are broken with passing minion and master config options through salt-cloud?
09:35 brianfeister joined #salt
09:35 GreatSnoopy joined #salt
09:35 JohnnyRun joined #salt
09:36 fracklen joined #salt
09:36 Rumbles joined #salt
09:40 elsmo joined #salt
09:41 kliquori joined #salt
09:44 ajw0100_ joined #salt
09:47 Miouge joined #salt
09:51 ronnix joined #salt
09:54 Miouge joined #salt
09:58 N-Mi joined #salt
09:58 N-Mi joined #salt
09:58 digitalhero joined #salt
10:00 RobertChen117 joined #salt
10:02 catpig joined #salt
10:05 Miouge joined #salt
10:07 Rumbles joined #salt
10:11 ronnix_ joined #salt
10:14 noway_ joined #salt
10:15 Miouge joined #salt
10:22 ravenx joined #salt
10:22 ravenx how can i use the .sls files to copy a file from a directory to antoher directory
10:23 ravenx not using salt:// or ftp:// so i can't really use file.managed
10:23 ravenx i've tried cmd.run but i can't seem to get the syntax to work
10:23 ravenx what i want to do is clone a repo, and copy one file from there to my home
10:23 hemebond cmd.run is basically just bash/sh
10:23 hemebond So you should be able to copy a file.
10:24 kawa2014 joined #salt
10:24 ravenx hemebond: will it cp every signle time?  or will it only be smart enough to cp when it has detected a change?
10:24 hemebond it will unless you put in a test.
10:24 hemebond States can have conditionals.
10:24 ronnix joined #salt
10:25 ravenx test?
10:25 ravenx so i dont use the watch command?
10:25 hemebond Just checking the docs for it.
10:25 babilen ravenx: You can use file.copy
10:25 hemebond What is it you're really trying to achieve?
10:25 keimlink joined #salt
10:26 ravenx hemebond: just copy a config file, from a git repo, onto my ~/
10:27 ravenx and if there is a change from teh git repo
10:27 ravenx so i have the whole "cloning" of the git repo done as a state
10:27 ravenx just trying to get the cp working.
10:27 babilen ravenx: And you have that git repo cloned locally?
10:27 ravenx it isn't on my salt master
10:27 ravenx it is on my salt minion
10:27 hemebond Could you not just use a symlink?
10:27 ravenx babilen: thanks will take a look at that.
10:27 babilen Yes, that is what I meant by "locally" -- use file.copy
10:28 ravenx hemebond: dont see waht that would achieve
10:28 ravenx i still need to use cmd.run
10:28 babilen It would be up-to-date all the time
10:28 hemebond ^
10:28 hemebond No, you don't need to use cmd.run to create a symlink.
10:28 ravenx so i will use file.managed for a symlink?
10:29 babilen No, file.symlink is what you'd use for that
10:29 bhosmer joined #salt
10:29 ravenx where can i check all the file.functions?
10:29 ravenx i only know of file.managed
10:29 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
10:30 losh joined #salt
10:30 s_kunk joined #salt
10:31 ravenx thanks
10:31 hemebond (why can I not see states listed in the right-hand side of the docs? Am I blind?)
10:31 ravenx i think i have enough docs to continue wher ei left off
10:31 ravenx thanks you hemebond  and babilen
10:31 hemebond (gah, I see it now)
10:33 Miouge joined #salt
10:34 babilen ravenx: All the best :)
10:36 jeddi joined #salt
10:37 ronnix joined #salt
10:39 ravenx babilen: :)
10:45 teryx510 joined #salt
10:45 geomacy joined #salt
10:47 mdasilva joined #salt
10:48 dendazen joined #salt
10:52 LondonAppDev joined #salt
10:53 amcorreia joined #salt
10:54 stooj joined #salt
11:00 impi joined #salt
11:01 harkx I'm trying to list grains via cli but is there a way to only have output when the grain exists (not empty)
11:02 babilen harkx: grains.items() should list only grains you have
11:02 RobertChen117 joined #salt
11:03 babilen What are you really trying to achieve?
11:03 harkx babilen, maybe I'm doing it (thinking) the wrong wya, I want to get a list of all minions having  a specific grain set
11:03 babilen Whatfor?
11:03 harkx to know what other minions need that grain because I will be using it in a state file for targetting
11:04 babilen So you are after a list of minions that does *not* have that grain?
11:04 harkx yes, or vice versa :)
11:05 harkx I think can resolve it by just targeting with grains in cli ... and then I'll have my list I supposer
11:05 babilen How do you decide if a grain needs to be set if a minion doesn't have it?
11:05 harkx I decide
11:05 babilen Ah!
11:05 babilen So there is no actual rule?
11:06 harkx no, I will use that grain to deploy specific state files
11:06 ronnix_ joined #salt
11:06 babilen Yeah, I was afraid you'd say that :)
11:06 harkx whys that?
11:06 harkx I can find my minions with: salt -G 'grain:true' test.ping
11:06 babilen You should be able to use a compound matcher that matches and grain and negates that match
11:07 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html
11:07 harkx babilen, yes, correct, that's how my cli line now works
11:08 digitalhero joined #salt
11:08 babilen harkx: I am not a friend of using grains for this due to a number of reasons, such as: 1. Grains aren't trustworthy (A minion can claim to have whatever grains it wants) 2. There typically is no necessity to save this information in a distributed manner 3. You have to manage those grains as well, which brings you right back to the question "How do I *really* decide which minion gets which state?"
11:09 babilen Pillars can be used just like grains and you could target them by minion list or write something more fancy ..
11:10 babilen You could also acquire this information from a different datasource and make it available via one of https://docs.saltstack.com/en/latest/ref/pillar/all/
11:10 babilen (that just as background to "I was afraid you'd say that")
11:11 iceyao joined #salt
11:12 SunPowered joined #salt
11:12 euidzero joined #salt
11:15 harkx okay, that makes more sense, I will look into pillars for "managing" that type of information, thanks for giving me that insight!
11:15 Miouge joined #salt
11:16 Nazca__ joined #salt
11:17 babilen harkx: Note that grains might be perfectly fine in your situation
11:18 harkx babilen, ok, yes, I will have a look into it, thanks
11:19 ggoZ joined #salt
11:23 bhosmer joined #salt
11:24 rhodgin joined #salt
11:36 cberndt joined #salt
11:38 fredvd joined #salt
11:39 RobertChen117 joined #salt
11:42 favadi joined #salt
11:42 kliquori joined #salt
11:48 atmosx joined #salt
11:52 JohnnyRun joined #salt
11:52 Miouge joined #salt
11:54 hightekvagabond joined #salt
11:56 malinoff joined #salt
11:56 amcorreia joined #salt
11:57 masterkorp joined #salt
11:57 masterkorp hello
11:59 fracklen joined #salt
11:59 fracklen joined #salt
12:01 masterkorp When using salt-ssh I cannot use a map.jinja import, here is the error https://ptpb.pw/KPtL
12:01 masterkorp this only happens with salt ssh
12:04 masterkorp any ideas?
12:06 babilen masterkorp: I can't see that paste
12:16 euidzero joined #salt
12:19 Nazzy joined #salt
12:21 netzvieh joined #salt
12:21 netzvieh Hi, is it possible to show which minions hit a specified state/formula?
12:25 babilen You mean in the past?
12:27 metalseargolid joined #salt
12:27 rem5 joined #salt
12:29 kliquori joined #salt
12:31 west575 joined #salt
12:32 netzvieh nope, just which minions would hit that state, if i'd run a state.highstate, but only the minionlist
12:32 evle joined #salt
12:35 dendazen joined #salt
12:44 Nazca__ joined #salt
12:44 mdasilva joined #salt
12:50 Nazzy joined #salt
12:51 jwinters joined #salt
12:55 liqw joined #salt
12:55 cyborg-one joined #salt
12:55 numkem joined #salt
12:56 dyasny joined #salt
12:56 teryx510 joined #salt
12:57 subsignal joined #salt
12:58 Adi1 joined #salt
12:58 Adi1 HI, Can I ping to a list of IP's
12:59 ravenx using the pip module, is it possible to make pip install the setup.py i give it?  basically i am IN the repository of my python project, which contains a setup.py
12:59 ravenx i want to use this:  https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pip.html
12:59 gh34 joined #salt
12:59 ravenx and run a 'pip install .'
13:00 ravenx instead of giving it a package name.
13:00 rhodgin joined #salt
13:01 Adi1 If I need to invoke command via sls to ip like: 10.1.2.3 , 10.1.2.4, 10.1.2.5 at the same time
13:01 Adi1 How can I do it?
13:02 euidzero joined #salt
13:02 Adi1 In the salt manual the says that this command is working but it doesn't salt -C 'G@os:Ubuntu and minion* or S@192.168.50.*' test.ping
13:02 akhter joined #salt
13:03 Adi1 When I invoke it with my IP, it complains that there isn't any minion like it
13:03 Adi1 like this
13:03 Nazca__ joined #salt
13:03 kliquori joined #salt
13:06 Adi1 Anyone?
13:07 ajw0100 joined #salt
13:07 mpanetta joined #salt
13:11 jeddi joined #salt
13:17 subsignal joined #salt
13:17 iceyao joined #salt
13:19 malinoff left #salt
13:19 JohnnyRun joined #salt
13:20 edrocks joined #salt
13:21 anmol joined #salt
13:23 Miouge joined #salt
13:24 DammitJim joined #salt
13:25 CrummyGummy joined #salt
13:26 scoates joined #salt
13:27 quix joined #salt
13:27 kawa2014 joined #salt
13:28 friedrich_ joined #salt
13:29 bhosmer joined #salt
13:29 masterkorp babilen: hello, sorry
13:30 masterkorp I will repaste
13:32 XenophonF Adi1: there's either a bug in the CIDR matching code or the documentation is wrong
13:33 XenophonF Adi1: use a proper netmask, e.g., S@192.168.50.0/24
13:33 XenophonF Adi1: also, netmasks of /32 don't appear to work, just FYI
13:33 Adi1 Thank you very much
13:33 Adi1 I check it
13:33 impi joined #salt
13:34 XenophonF Adi1: you should file a bug report
13:34 Adi1 where?
13:34 XenophonF https://github.com/saltstack/salt
13:34 babilen XenophonF: Yeah, I've seen problems with /32 before in the context of targeting/salt-ssh rosters
13:35 ravenx babilen: do you know if the pip module in saltstack can run a `pip install .` in a folder with a setup.py?
13:35 Adi1 But it's a known bug
13:35 ravenx essentially, i want to install my project.  or not necessarily even the pip module, just any way at all.
13:35 babilen ravenx: I have no idea
13:36 TooLmaN joined #salt
13:36 deus_ex1 joined #salt
13:36 ravenx babilen: darn it.
13:36 ravenx babilen: thanks anyways :)
13:37 Adi1 this command  salt S@10.1.1.2/24 test.ping
13:37 Adi1 does not work either
13:38 mdasilva joined #salt
13:39 racooper joined #salt
13:39 Adi1 XenophonF?
13:39 XenophonF in meeting sorry brb
13:40 Adi1 O,k
13:40 Adi1 Thank you
13:40 Adi1 I will appreciate if you can answer me later
13:40 Adi1 How can I use salt command to change for specific computers the dns entry?
13:41 Adi1 I read it https://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html but I don't know how to use it
13:41 Adi1 to change only this parameters, then to restart the computer automatically
13:43 _JZ_ joined #salt
13:43 hightekvagabond joined #salt
13:44 Rumbles joined #salt
13:54 mapu joined #salt
13:55 nZac joined #salt
13:58 mdasilva joined #salt
13:59 zmalone joined #salt
14:00 CeBe joined #salt
14:01 Adi1 How can I define that In 2 AM all the minion will rebooted by the server?
14:01 kliquori joined #salt
14:01 bhosmer joined #salt
14:02 zmalone https://docs.saltstack.com/en/latest/ref/states/all/salt.states.at.html might work for you
14:03 XenophonF Adi1: again, that's what i'd consider a bug in the ipaddr matcher
14:03 XenophonF Adi1: you _must_ use subnet addresses _only_
14:04 XenophonF Adi1: so S@10.1.1.0/24
14:04 XenophonF Adi1: even that we both know that 10.1.1.2/24 should be accepted
14:04 Adi1 yes
14:04 Adi1 Ok
14:04 masterkorp When using salt-ssh I cannot use a map.jinja import, here is the error https://ptpb.pw/mlQA
14:05 Adi1 Can I use list of gains in one command?
14:05 XenophonF Adi1: what do you mean?
14:06 spiette joined #salt
14:06 Adi1 something like that
14:06 masterkorp babilen: just repasted, if you can shed any light i would be thankful
14:07 Adi1 salt -G 'osrelease:8.1' -G'os:ubuntu' .....
14:07 XenophonF Adi1: use a compound match
14:07 Adi1 -C?
14:08 XenophonF salt -C 'G@os:ubuntu and G@osrelease:8.10' or whatever it is on ubuntu
14:08 hasues joined #salt
14:11 Adi1 I did something like that
14:11 Adi1 salt -C 'G@ipv4:'172.23.76.62 or G@ipv4:'1723.23.76.61' test.ping
14:11 Adi1 ERROR: Minions returned with non-zero exit code
14:11 Adi1 XenophonF
14:11 Adi1 It does not work
14:12 Adi1 XenophonF?
14:12 hasues left #salt
14:13 lemtargatwing joined #salt
14:13 ronnix joined #salt
14:13 shiriru joined #salt
14:14 Adi1 other quetions: can I see if process is up and running in all the minions?
14:14 Adi1 In case it isn't to run it or to send an email?
14:14 Adi1 Can I do it with Salt?
14:15 honestly you can put salt calls into a crontab.
14:15 ashirogl joined #salt
14:17 Adi1 Yes this is an option
14:17 babilen You might want to use a more explicit monitoring tool for that (e.g. checkmk, icinga, shinken, zabbix, ... consul ...)
14:17 ashirogl1 joined #salt
14:19 Adi1 but I want to do it with salt
14:19 babilen Why?
14:19 Adi1 because It's my configuration
14:19 Adi1 tool
14:19 masterkorp https://github.com/saltstack/salt/issues/21370 ok this is exactly my problem
14:19 Adi1 I need for all the computers
14:20 AndreasLutro don't be stubborn
14:20 AndreasLutro use the right tool for the job
14:20 AndreasLutro salt is a configuration management tool, not a monitoring/alerting tool
14:20 Adi1 ok
14:20 Adi1 What is the best tool to do that?
14:20 babilen You can use salt to configure those, but you shouldn't use it to replace them
14:21 masterkorp Adi1: you can have a look at sensu
14:21 Adi1 I need to monitor windows and nix* processes
14:21 honestly monit is nice and doesn't have a big setup cost
14:21 masterkorp its configuration management friendly
14:21 honestly haha, no idea about windows
14:22 drawsmcgraw joined #salt
14:22 Adi1 I can run cmd.run command from salt
14:22 Adi1 to check and proccesing
14:22 Adi1 monitor process for both
14:22 Adi1 and use perl to run salt
14:23 Adi1 with case of windows and nix*
14:23 Adi1 What do you think?
14:23 masterkorp salt is not a golden hammer my friend
14:23 masterkorp use the best tool for the job
14:24 Adi1 I need a tool to monitor process
14:24 Adi1 both for windows and nix*
14:24 masterkorp give sensu a look
14:24 masterkorp Adi1: https://sensuapp.org/
14:25 Adi1 i see the tool supported by chef< ansible<puppet
14:25 Adi1 Is it free?
14:26 masterkorp yeah, and opensource
14:26 masterkorp its reality easy to automate in salt
14:26 masterkorp since all the config files are json
14:26 remyd1 Hi
14:26 masterkorp you can just serialized the pillar data directly to json
14:27 Adi1 ok thank you
14:27 Adi1 I will check it
14:27 remyd1 I have an issue with states ssh_known_hosts
14:27 remyd1 Unable to receive remote host key
14:27 Adi1 Can I reboot system by salt?
14:27 Adi1 windows and unix together?
14:27 subsignal joined #salt
14:28 Nazzy joined #salt
14:28 Adi1 can I kill process automatically for all minions?
14:32 Adi1 like
14:32 Adi1 salt.states.process.absent?
14:33 Adi1 What can I do with salt except install packages?
14:33 Adi1 Process have a tool, reboot have a tool, and so
14:33 remyd1 many things Adi1
14:33 Adi1 Can you please tell me
14:33 remyd1 just read the docs
14:33 Adi1 I read
14:33 Adi1 You can create user, install packages,
14:33 remyd1 yes you can kill processes
14:33 ronnix joined #salt
14:34 Adi1 How I didn't find
14:34 Adi1 or show if process is exist
14:34 Adi1 s
14:34 Adi1 remyd1?
14:35 Adi1 I can use run.cmd and kill command for ubuntu
14:35 remyd1 salt '*' cmd.run 'kill -9 PID'
14:35 Adi1 yes
14:35 Adi1 this is I now
14:35 Adi1 know
14:35 ntropy so?
14:36 Adi1 but I hope that Is a module to
14:36 Adi1 do this in better way
14:36 Adi1 How can I use PID if in all minions the PID is changeing
14:36 Adi1 ?
14:36 Adi1 in one minion PID is 6087
14:37 Adi1 In other 6187
14:37 Adi1 after restart the pid will change
14:38 remyd1 salt '*' cmd.run 'pkill firefox'
14:38 remyd1 ^
14:38 remyd1 ^^
14:38 remyd1 If you define it as a service you can manage it in a better way
14:38 keisetsu joined #salt
14:39 Yorokobi joined #salt
14:39 fooda joined #salt
14:39 remyd1 you can also check for filenames
14:40 remyd1 if it is a linux client you can search for /proc/pid...
14:40 Adi1 and show if process is alive?
14:40 Adi1 Yes I can do many command
14:41 Adi1 But I don't see the benefit of salt here
14:41 Adi1 puppet has cmd command too
14:41 remyd1 or e.g. /var/run/salt-minion.pid
14:41 remyd1 module are easy to write
14:42 keisetsu Is there a way to require a named block of commands? I've seen requiring an sls and requiring a state function, but I'd like to require a set of commands
14:42 remyd1 easier thatn in ruby ...
14:45 remyd1 saltutil.kill_job
14:46 remyd1 perhaps it is what you are looking for
14:46 remyd1 ...
14:46 remyd1 salt-call sys.doc saltutil.kill_job
14:46 remyd1 Adi1
14:46 keisetsu I'm trying to do something like this: https://gist.github.com/anonymous/6711ee18f6bdf56577a5
14:48 babilen keisetsu: Shouldn't that be "pkrepo: my_package_repo" ?
14:48 babilen *pkgrepo naturally
14:49 keisetsu babilen: Yeah, it's not the best example.
14:50 Adi1 I think salt '*' saltutil.kill_job <job id> is for salt job and to regular process
14:50 mdasilva joined #salt
14:50 Adi1 And I don't have the nubmer
14:50 keisetsu pkgrepo is already there, I was just hoping to be able to do something like pkgrepo for any command block
14:50 Adi1 Sends a kill signal (SIGKILL 9) to the named salt job's process
14:50 Adi1 CLI Example:
14:51 babilen keisetsu: I am not entirely sure what you mean by "command block"
14:51 babilen brb
14:51 babilen ENOCOFFEE
14:51 keisetsu bablien: not sure what the right word is. I'll try to make a better gist
14:52 remyd1 Adi1: to reboot salt '*' system.shutdown
14:52 remyd1 *reboot sorry
14:52 remyd1 obviously
14:53 Adi1 Thank you
14:53 Adi1 You see
14:53 Adi1 This command I look for
14:53 Adi1 that salt will do it
14:53 Adi1 not the cmd.run
14:53 Adi1 like this
14:53 Adi1 BTW, all the module is here yes: /usr/lib/python2.7/dist-packages/salt/modules?
14:54 Adi1 there are 350 module only
14:54 remyd1 salt is younger than puppet. It is just a matter of time to have all modules you already have in pupper
14:54 remyd1 puppet
14:54 Adi1 puppet have 4000 module
14:54 Adi1 s
14:55 Adi1 but this is not impress me
14:55 Adi1 I need a simple tool
14:55 remyd1 https://github.com/saltstack/salt/tree/develop/salt/states
14:55 masterkorp is it possible to send salt commands to salt master without being root?
14:55 remyd1 https://github.com/saltstack/salt/tree/develop/salt/modules
14:56 _JZ_ joined #salt
14:57 Adi1 Can mcollective work with Salt?
14:57 quasiben joined #salt
14:59 Nazca__ joined #salt
15:01 metalseargolid joined #salt
15:01 nahamu there won't be tight integration, but there's no reason you couldn't use mcollective to trigger salt to do things.
15:02 impi joined #salt
15:02 remyd1 babilen: I have an issue with ssh_known_hosts. I am using fingerprint. "Unable to receive remote host key". Any idea ?
15:02 keisetsu babilen: Here's a new gist. https://gist.github.com/keisetsu/b46f4e767711917ad767 When I say "command block", I mean "my_package_installed" or "conf_managed". I'm sure there's better name, but not sure what it is!
15:04 keisetsu bablilen: I realize this can sort of be done with require: pkg.installed, but I want to specify that the pkg installed is exactly as it is in "my_package_installed", including version info, but I don't want to repeat those requirements in the require block
15:07 quasiben joined #salt
15:07 fooma joined #salt
15:08 remyd1 Humm it is due to name resolution
15:11 digitalhero joined #salt
15:13 losh joined #salt
15:13 fracklen joined #salt
15:14 babilen keisetsu: That would be "require: - pkg: my_package_installed" -- The format is require: STATE_MODULE: STATE_ID
15:14 Adi1 can I check with salt if the service is running?
15:14 XenophonF Adi1: yes, use a "service.running" state
15:14 babilen That enables the service
15:15 jerredbell joined #salt
15:15 Adi1 but I need service like xbca
15:15 babilen Adi1: Seriously .. use a monitoring tool
15:15 Adi1 that does not in the module
15:15 jerredbell left #salt
15:16 Adi1 Then I don't know why I need to use salt
15:16 jerredbell joined #salt
15:16 Adi1 just to install packages and run state?
15:16 Adi1 I am realy want to understand why to use?
15:16 mavhq salt is to configure your computers
15:17 Adi1 What's mean?
15:17 XenophonF same goes for any other configuration management tool
15:17 mavhq to install software, change settings files, and update them with changes over time
15:17 Adi1 oh I see
15:17 Adi1 thank you
15:17 potens joined #salt
15:17 mavhq :-)
15:18 Adi1 anything else?\
15:18 XenophonF you'd use something other than salt/ansible/puppet/chef/cfengine/etc. to do continuous integration
15:18 fooma joined #salt
15:18 XenophonF and you'd use something other than salt/ansible/puppet/chef/cfengine/travis/jenkins/etc. to do real time monitoring and centralized logging
15:18 XenophonF the only tool i can think of that tries to do everything all at once is something like Microsoft System Center
15:19 XenophonF that's Windows-only, though
15:20 mavhq because it costs money
15:20 Adi1 I used jenkins
15:20 XenophonF if you're looking for config+monitoring, Adi1, and you're running a pure Windows environment, maybe you want to look at System Center Essentials (or System Center Configuration Manager + System Center Operations Manager)
15:20 Adi1 and I need now to choose a config
15:20 mavhq how many computers are you managing?
15:20 Adi1 system
15:20 keisetsu babilen: Thanks, I thought I had to use the actual package name, but I can use the state module? Great, that should work perfectly. I figured it had to be there, didn't know it was so simple.
15:20 Adi1 above 150 unix
15:21 Adi1 and 100 windows
15:21 fracklen joined #salt
15:21 keisetsu "actual package name" = "apt package name" or whatever
15:21 XenophonF Adi1: I actually dropped System Center Essentials in favor of Salt.
15:21 XenophonF with monitoring via InterMapper
15:22 Adi1 I have AD 2012 R2
15:22 XenophonF ~150 servers worldwide, so we're not that big compared to some of the other salt users around here
15:22 babilen keisetsu: Requirements simply use "STATE_MODULE_NAME: STATE_ID" to handle this .. this could be "- service: apache2" or "pkg: git" or whatever you have there
15:22 mavhq salt might be a good fit then, is the documentation available in your native language?
15:22 babilen keisetsu: In fact you can refer to either the state id or to its - name: argument
15:22 Miouge joined #salt
15:22 remyd1 Adi1: I am trying to set monitoring in salt. I already made a "ganglia" formula (states)
15:22 Adi1 I can read english :)
15:22 Adi1 I read the basic manual
15:23 Adi1 All the basic from the site
15:23 Adi1 include pillar and grain
15:23 remyd1 Now I am trying to create a "service watcher"
15:23 keisetsu babilen: but will this work with something like the state.pyenv module?
15:23 Adi1 the job and event I didn't understand because the document isn't good enough
15:23 Adi1 for my opnion
15:23 keisetsu babilen: or is it just for packages?
15:23 babilen keisetsu: It's for *every* state
15:24 Adi1 Can mcollective do these things?
15:24 Adi1 manage process, kill and so on
15:24 babilen keisetsu: For pyenv it would be "pyenv: YOUR_STATE_ID"
15:24 Adi1 I have experience in Git\CQ\CC\HP QC and so on
15:24 Adi1 not in these tool
15:24 Adi1 I am new in this field
15:24 XenophonF i don't think you need mcollective
15:24 keisetsu babilen: OOH! Ok, I will give it a try.
15:25 Adi1 What is mcollective purpose?
15:25 XenophonF iirc mcollective does remote execution, which you can easily do with salt
15:25 babilen keisetsu: You simply drop the function (the 'install' in pkg.install or the 'installed' in pyenv.installed) and use the name of the state module (pkg, pyenv, file, ...) and the ID/NAME_ARG of the state in question
15:26 keisetsu babilen: Is this documented? That's very cool
15:27 babilen Adi1: Salt is a very powerful tool to configure your infrastructure, but it isn't meant to be used to monitor it. There are specific tools for that as well and you might want to check those listed on https://github.com/kahun/awesome-sysadmin#monitoring
15:27 babilen keisetsu: I'm sure it is .. Let me check
15:27 XenophonF keisetsu: https://docs.saltstack.com/en/latest/ref/states/requisites.html
15:27 babilen ^
15:28 keisetsu babilen: I read that again and again, I didn't see that element to it.
15:28 babilen Is anybody of you guys also using riemann?
15:28 XenophonF keisetsu: https://docs.saltstack.com/en/latest/ref/states/requisites.html#id1
15:29 keisetsu I guess it does say The generalized form of a requisite target is <state name> : <ID or name>
15:29 XenophonF keisetsu: https://docs.saltstack.com/en/latest/ref/states/highstate.html#requisite-reference
15:29 Adi1 thank you babilen
15:30 remyd1 babilen: agree with you but you can easily create a pillar where you define service to watch and get some reports with cgi or mails
15:30 keisetsu Thanks, XenophonF, it just didn't fit before, but I think I get it.
15:30 remyd1 it is enough for me
15:30 Adi1 All, What is your prefered tool in this link? https://github.com/kahun/awesome-sysadmin#monitoring
15:31 XenophonF keisetsu: here's a concrete example - https://github.com/irtnog/salt-states/blob/development/accounting/init.sls#L3
15:32 remyd1 Adi1: collectl for me
15:32 babilen remyd1: In the end it really boils down to what you want and what the easiest way is to achieve that. If asked I'd always recommend "proper" tools over "hacks", but then .. if *all* you need is that one thing and a little hack gets you there, there is no point in configuring a massive infrastructure "just because"
15:32 XenophonF Adi1: i've beaten my head against cacti, librenms, monit, munin, nagios, and zenoss
15:32 XenophonF Adi1: i like the way zenoss hurts me the most
15:32 darix when I access a variable like salt['grains.get']('osrelease') in a template. how can i cast it to a float?
15:32 * XenophonF shrugs
15:32 XenophonF they all kind of suck
15:33 darix i tried "float()" and "|float" both lead to render errors
15:33 babilen XenophonF: We are sort of happy with checkmk and collectd/influx/grafana ...
15:33 XenophonF thanks babilen, i'll check those out
15:34 dmaiocchi joined #salt
15:34 XenophonF zabbix is also on my list of things to investigate in my Copious Free Time
15:34 babilen I'm looking for more adaptable health monitoring though and also need a "stream analysis" tool .. riemann comes to mind and the fact that it is written in Clojure appeals to me, but my colleagues would hate me if I force OPS people to learn a lisp
15:34 remyd1 IMO zabbix is too verbose
15:35 * AndreasLutro uses sensu + kapacitor + influxdb
15:35 remyd1 lol babilen
15:35 XenophonF python is basically a lisp, just without as nice a syntax ;)
15:35 remyd1 AndreasLustro some ppl told me that influxdb grow very fast compare to rrd db. Is it right ?
15:36 XenophonF actually salt's internal data structures feel very lisp-like to me
15:36 quasiben joined #salt
15:36 netzvieh so I'm a bit lost here. I have 2 pillar envs, base and intranet. In both I define ntp_servers, but the env listed second in the top.sls (intranet) fails to overwrite the value of the first one (base). the values of intranet only turn up in pillar.items, if i delete the ntp_servers key from the base env.
15:36 sprky joined #salt
15:36 netzvieh the docs say that per default the order of loading in the top file, decides which values are used. but that somehow doesn't happen
15:37 mfournier babilen: IME no need to "learn a lisp", just to grasp riemann's streams concept. Once you understand the idea, the howto page has a ton of examples you can base on.
15:37 dfinn joined #salt
15:37 remyd1 babilen: you could also have "stream analysis" with collectl
15:37 mfournier ... there's also a nice "just enough clojure for riemann" page on the website.
15:38 remyd1 and you can add datas collected with collectl in what you want
15:38 babilen mfournier: That is probably true. I love developing in Clojure and am not sure how much of a mental overhead riemann would be for people who don't know Clojure or another lispy language
15:38 remyd1 and multiplex with daemon/client or with colmux
15:39 babilen AndreasLutro: Did you, by chance, evaluate riemann vs. kapacitor ?
15:39 rm_jorge joined #salt
15:41 VSpike Is there a good description of using gitfs backends with branches as environments? I've avoided use environments at all so far, because TBH they don't make much sense to me
15:41 keisetsu XenophonF: Great example, thank you
15:42 tweakism joined #salt
15:42 AndreasLutro just barely... like you said, lisp ;)
15:42 babilen AndreasLutro: haha, I guess that is not a "Yay, lisp" for you then ;)
15:42 AndreasLutro I'm the type of sicko who would prefer java or c# over python
15:43 babilen ...
15:43 VSpike I've always mananged just using template logic to switch the small changes between beta and production. But in this case I have quite a large file tree (an nginx config), and I don't really want two side-by-side copies in my states - that would be hard to maintain
15:43 XenophonF VSpike: I can show you how I use gitfs with environments, but I don't know how well it generalizes/scales.
15:43 VSpike I've always thought that using gitfs + envs/branches would be good but never quite had the motivation to do it, and there always seemed to be problems with it that were gradually getting fixed
15:44 VSpike AIUI it's basically a branch per environment, right? The complication IIRC was around the base env, the fact that "master" is always base, and where do you put top.sls
15:44 babilen AndreasLutro: Do you also use Telegraf?
15:45 XenophonF VSpike: take a look at https://github.com/irtnog/salt-states/blob/master/README.md and https://github.com/irtnog/salt-states/blob/master/top.sls
15:45 AndreasLutro babilen: yeah - the data structure it pushes to influxdb makes for easier querying than collectd
15:45 AndreasLutro though when/if collectd gets better influxdb support that may change
15:46 XenophonF VSpike: I assign the minion's environment and role via Pillar based on their hostnames - https://github.com/irtnog/salt-pillar-example/blob/master/top.sls#L32 and https://github.com/irtnog/salt-pillar-example/blob/master/top.sls#L40
15:46 remyd1 babilen: advantages of having everything in a small file (important data and services) : https://groups.google.com/forum/#!searchin/salt-users/mix/salt-users/aKbY6xnOW_w/VeiSH64XCgAJ
15:47 remyd1 simpler manage
15:47 babilen Interesting :)
15:47 noraatepernos joined #salt
15:48 remyd1 I think I can get it to work now with roles/grains and pillars
15:50 VSpike XenophonF: in your pillar, "environment" is just a regular pillar value, right? it has no magic significance?
15:52 XenophonF correct
15:52 VSpike Cool. Yeah, that all makes sense. To use staging, you pass the env in as an option to the call to salt?
15:52 XenophonF correct
15:52 VSpike Very neat
15:53 XenophonF so the idea is to use a flow-like change process
15:53 VSpike So, you only have a top.sls in master, and only have top.sls in master?
15:53 XenophonF correct
15:53 fracklen joined #salt
15:53 XenophonF if i want to make changes in production, i use "salt minion state.sls state1,state2,state3 saltenv=staging"
15:54 XenophonF then if we fail user acceptance testing for whatever reason, we can back out with "salt minion state.highstate"
15:54 XenophonF and if we pass UAT, we just merge staging->production
15:54 VSpike You don't actually use salt environments in the pillar, right?
15:54 XenophonF correct
15:54 VSpike Yeah, that always seemed like an unnecessary complication to me
15:54 VSpike Well, that seems simple enough!
15:54 XenophonF to test pillar data changes i currently specify it on the command line
15:54 VSpike Heh
15:55 Adi1 joined #salt
15:55 XenophonF again, the idea is that state.highstate _always_ gets me back to a known good config
15:56 hightekvagabond joined #salt
15:56 XenophonF VSpike: here's how i set up my salt-states repo - https://gist.github.com/xenophonf/95357d87b6e0b5e2b0e6
15:57 XenophonF my master and development/testing/staging/production branches are separate, and
15:57 XenophonF s/, and//
15:57 VSpike I use a python pillar that works off the hostname, so similar principle. If the machine is in "aws-beta" environment, it will try to include the /srv/salt/pillar/env/aws/beta.sls file
15:58 XenophonF my pillar top.sls at work isn't as pretty because they didn't let me revise our naming conventions :(
15:58 VSpike Ahh that's useful. Ta
15:59 VSpike I created the naming conventions :) The devs bitch about them all the time, but what the heck
15:59 VSpike I did send out a document proposing them about 6 months before I started using them and no-one replied
16:00 XenophonF it's taken me 10 years just to get everyone on the team to follow our original naming conventions
16:00 VSpike :)
16:00 XenophonF so when i said, "hey, let's change them" my boss kind of laughed at me
16:00 XenophonF rightly so
16:00 VSpike Yeah, we had a contractor who kept freestyling on the names. They look a bit like mine, but he just kinda made them up
16:00 XenophonF ugh
16:01 VSpike And the local hostnames, the names in the vm host, and the dns names are all different.
16:01 VSpike Yay
16:02 XenophonF crazy
16:02 VSpike :)
16:02 VSpike XenophonF: that's awesome .. many thanks! I'll have a go at implementing that, I think
16:02 XenophonF i keep trying to drive home the idea of making the network self-documenting
16:02 XenophonF since no one seems to want to write documentation anyway ;)
16:03 XenophonF alright! good luck! let me know if you see anything in my configs that don't make sense
16:03 VSpike Yeah, that makes sense
16:03 VSpike Oh, was going to ask ... what's the workflow? Do you work on your local machine, make changes, push to github and then run salt?
16:04 XenophonF at work, yes, that's how we do it
16:04 XenophonF specifically, push to the development branch
16:04 VSpike Do you need to tell the saltmaster to update the gitfs files, or does it just pick up the changes?
16:05 XenophonF salt's file server updates its clone every 60s by default
16:05 amcorreia joined #salt
16:05 VSpike Do you use your pillar direct from git too?
16:05 XenophonF i toyed around with the idea of using github webooks + salt-api + salt reactor to force an update whenever someone pushes changes
16:06 XenophonF https://github.com/irtnog/salt-states/blob/development/salt/files/reactors/github.sls
16:06 XenophonF i don't think i got it to work properly and haven't had time to mess with it since
16:06 XenophonF yes, we keep our pillar data in github
16:06 rem5 joined #salt
16:06 XenophonF both our states and pillar repos are private, and the salt-master has its own read-only github account
16:07 SunPowered hey, I'm seeing pillar data merging between environments, and causing lots of duplicates.   This isn't the expected behaviour is it?
16:07 XenophonF at some point i intend to figure out how to gpg-encrypt our pillar data
16:09 SunPowered if I have identical pillar targets for different environments, I don't expect them all to merge
16:09 Adi1 joined #salt
16:09 Brew joined #salt
16:10 onlyanegg joined #salt
16:11 XenophonF that's why i don't use environments with pillar
16:11 XenophonF i kept getting confused
16:14 zmalone joined #salt
16:14 keisetsu_ joined #salt
16:14 jettero joined #salt
16:15 jettero I'm trying to use gitfs for some ext_pillars... pygit2, 2015.8.7  ...
16:15 VSpike Hm, this is probably a question for #git, but I think I need to figure out how to transplant my existing states git repo commits in the dev/test/staging/production branches of the new repo
16:16 jettero the one pillar isn't as trustworthy, so I put it in an environment, but I don't understand how to pillar.ls and pillar.get to look at the pillar values from that environment
16:16 jettero saltenv doesn't seem to work with pillar.get and pillar.ls
16:17 SunPowered i cant imagine the use case for just merging everything in one big mess
16:18 SunPowered how am I supposed to test configurations?
16:18 RedundancyD joined #salt
16:19 SunPowered XenophonF: so you have all your pillar targets defined in the base env, even if your state envs are different?
16:19 XenophonF correct
16:20 SunPowered That makes for difficult development, I would imagine when configuring things via pillar, ie nginx.ng
16:20 XenophonF SunPowered: i can't show you my work configs, but here's how i prototyped it in my home network - https://github.com/irtnog/salt-pillar-example/blob/master/top.sls#L54
16:21 rem5 joined #salt
16:22 ronnix joined #salt
16:22 writtenoff joined #salt
16:22 XenophonF the pillar top data for a minion would end up looking something like {'base': {'uxeprdlnxmine01.irtnog.net': ['environment.production', 'role.minecraft', 'minecraft.irtnog.org']}}
16:23 XenophonF if i have a dev or testing server, i give them different service access points, usually something like minecraft-dev.irtnog.org
16:23 quix_ joined #salt
16:24 XenophonF well, the top data would include things like the `default` Pillar SLS which has things like my network-wide Postfix and OpenSSH configs
16:26 brianfeister joined #salt
16:28 SunPowered thanks, that helped
16:28 RedundancyD Is this how you would do a grain withing a pillar.get? https://gist.github.com/anonymous/653fa2185953c77c3fd9
16:29 RedundancyD trying to make mount configurations in pillar unique to each host
16:31 Rumbles joined #salt
16:32 XenophonF sure that'd work
16:32 iggy RedundancyD: that's one way
16:32 XenophonF but if i were you
16:33 rem5 joined #salt
16:33 iggy I don't think you need the ~ after (it literally means coerce to string and concatenate)
16:33 XenophonF i would just assign a unique value to `local_disk_mounts` for each minion in Pillar
16:33 iggy that's not going to work for everyone
16:33 antpa joined #salt
16:34 * iggy would hate to have to write out pillars for all 20k minions
16:35 XenophonF iirc doesn't pillar automatically merge dicts?
16:35 XenophonF brb
16:35 iggy RedundancyD: oh wait, pillars don't inherit anything from the file name if that's what you were expecting
16:36 RedundancyD yeah I was trying to figure a way to handle adding lots of disks to nodes for hdfs. I was going to add uuids for the dev so each disk alwas was mounted to the corect mount point… maybe...
16:36 iggy so you need to indent everything in that file and put `local_disk_mounts:` on the first line
16:36 beardedeagle joined #salt
16:36 Nazzy joined #salt
16:37 SunPowered pillar runs everything out of base
16:37 SunPowered states are still separate
16:37 RedundancyD yeah like the user formula…
16:37 iggy the file name is only about tartgetting
16:39 beardedeagle Scenario: masterofmasters -> syndic -> minions. The syndic or masterofmasters dies and has to be replaced. Is it recommended to just remove the individual key of the old syndic/master from /etc/salt/pki or should I be clearing /etc/salt/pki /var/cache/salt /var/run/salt?
16:39 iggy an improvement could be to have a couple different sets of mounts in different files and target those pillar files based on something else (number of drives, node type, hardware class, etc)
16:40 iggy beardedeagle: it never hurts to clear /var/cache/salt (I mean there isn't anything there that can't be regenerated)
16:41 beardedeagle ok so that and just the individual key? I would prefer that if possible, since otherwise I have to clear the *ENTIRE* tree of masterofmaster -> all syndics -> all minions. And that is a pain in the arse.
16:42 akhter joined #salt
16:43 iggy I dislike making recommendations on encryption related things because somebody with a raging security... complex always wants to argue things to the death
16:44 anthpa joined #salt
16:44 iggy but I would probably just have set keys for the top couple of layers, keep those somewhere safe, and deploy them with the node
16:45 RedundancyD iggy: The only other idea I had was to build grains mapping disks at provisioning time and then use state to make sure they are mounted… or something like that
16:45 impi joined #salt
16:45 beardedeagle thanks @iggy, I'll probably store them in vault -> consul
16:45 zmalone joined #salt
16:46 quasiben joined #salt
16:48 rem5 joined #salt
16:52 ashirogl joined #salt
16:53 grumm_servire joined #salt
16:54 VSpike Hm. I hate never getting time to finish anything. on my master I have salt-formula, salt-formula.saved and salt-formula.old directories and no idea whataver what they are
16:54 VSpike Something to do with trying to cherry pick some changes I made against a really old version of the formula into the latest. I think.
16:54 Rumbles joined #salt
16:54 ronnix joined #salt
16:55 impi joined #salt
16:56 ageorgop joined #salt
16:58 Karunamon Hi folks - I think I'm doing something silly here, but I'm trying to have my ssh daemon recycle when Augeas makes some changes to the sshd_config. Following the instructions in the docs for apache, I end up with a "following requisites were not found" error. I've got the (short) SLS here too: https://gist.github.com/Karunamon/a528db0d724544242bcb
16:59 XenophonF back
17:00 XenophonF anyone here run salt on netbsd?
17:01 XenophonF when i start the minion in the foreground, i get the following errors
17:01 XenophonF Invalid argument (src/thread.cpp:135)
17:01 XenophonF error singular rather
17:01 iggy Karunamon: - watch: - file: ssh_settings
17:01 shaggy_surfer joined #salt
17:02 iggy requisites are <module>: <ID> not <module>: <filename>
17:02 Karunamon AUGH. Another Puppet habit come back to bite me.
17:02 Karunamon much thanks.
17:02 iggy (although you typically see the filename be the same as the ID)
17:04 Karunamon Mm. I'm trying to avoid that here just because of the "can only declare an ID once" rule.
17:04 Karunamon so the ID is what it does, with -name: set to the filename
17:04 evidence is it best practice to not use current grains in custom grain modules (_grains)?  it seems the grains dict is not available under normal circumstances
17:05 quix joined #salt
17:05 notnotpeter joined #salt
17:07 Nazca__ joined #salt
17:07 akhter joined #salt
17:14 Jarus joined #salt
17:14 heaje joined #salt
17:17 Nazzy joined #salt
17:20 drawsmcgraw joined #salt
17:21 wych joined #salt
17:24 XenophonF evidence: i don't think you can/should use grains from within a grain module
17:25 XenophonF evidence: here's how i ended up writing a custom grain for windows - https://github.com/irtnog/active-directory-formula/blob/master/_grains/windows_installation_type.py
17:26 XenophonF i.e., rather than use grains['os_family'] == 'Windows', I used the is_windows() function
17:26 Fiber^ joined #salt
17:26 Netwizard joined #salt
17:28 evidence XenophonF yeah i was just confirming that was the intention to not use them, as they aren't passed in by default.  thx for the example
17:29 forrest joined #salt
17:31 VSpike Wow, that's depressing. When you google for an error message, click the top hit, and it's your own github issue from 4 months ago
17:31 VSpike With no responses
17:33 Karunamon I've felt that feel :(
17:33 forrest VSpike, Does the issue have tags associated with it so the team at least has it in the queue?
17:34 Karunamon Okay, another question. When you set a key_url in pkgrepo.managed, is it supposed to import the key with the URL given, or just set it in the appropriate repo file?
17:34 Karunamon Docs just say "URL to retrieve a GPG key from"
17:35 djgerm joined #salt
17:35 djgerm holy smoke I just read this part of the salt-cloud man page:        -H, --hard
17:35 djgerm When  specifying  a  map file, the default behavior is to ensure that all of the VMs specified in the map file
17:35 djgerm are created. If the --hard option is set, then any VMs that exist on configured cloud providers that  are  not
17:35 djgerm specified in the map file will be destroyed. Be advised that this can be a destructive operation and should be
17:35 djgerm used with care.
17:36 djgerm You can destroy EVERY guest that isn't in your maps!?
17:36 Karunamon Yup. There's a use case for that if you don't want any unmanaged guests running.
17:38 Karunamon though I wish there was a way to NOP that option out. Passing in -H when you wanted -h for help would be... unpleasant.
17:38 spiette joined #salt
17:40 losh joined #salt
17:41 forrest Karunamon, I would seriously consider making an issue for that, if anything it should be -HH
17:42 forrest one capital H I can KIND of forgive, if you seriously typed two capital Hs on purpose, no pity
17:42 forrest *on accident
17:43 iggy it prompts you
17:43 hightekvagabond joined #salt
17:43 forrest iggy, Good to know
17:44 Karunamon ok, whew. I was about halfway through looking for the python module to rip that option out.
17:45 drawsmcgraw joined #salt
17:46 Heartsbane joined #salt
17:47 quasiben joined #salt
17:47 Heartsbane So just a little off topic; what if you are in the middle of maintenance event and another Ops member breaks the salt-master. What should his punishment be?
17:48 noraatepernos joined #salt
17:48 djgerm +1 to locking down, making -H for salt-cloud incredibly hard to execute
17:48 Karunamon I always liked the idea of an auto-targeting Nerf gun cannon.
17:48 drawsmcgraw Tradition dictates a box of donuts.
17:48 Karunamon set your file backend to git so all changes have commits attached, have a CI system run a syntax check on the SLSes, and when someone breaks it: https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjSqOj-4cXLAhVO9GMKHYsCA70QtwIIJTAB&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1EGk2rvZe8A&amp;usg=AFQjCNHbpVgPanwAtLs0FckbG2dtZfAXPA
17:49 Heartsbane Karunamon: I do have a the NERF Maverick REV-6 on my desk, and box of donuts will be suggested as well
17:49 Heartsbane thank you Karunamon and drawsmcgraw
17:49 Karunamon ^^
17:50 drawsmcgraw Heartsbane: The good ones! None of those stale, day-old ones you find at the chain stores :)
18:01 beardedeagle @Heartsbane: make them narfle the garthok
18:06 mavhq Or a box of fruit so you don't die before creating the perfect system
18:07 ageorgop joined #salt
18:09 Karunamon well.. crap. Apparently the key_url thing just sets the URL, it doesn't actually import it on the minion.
18:10 Heartsbane beardedeagle: This particular individual would call that HR violation
18:10 Heartsbane But i know what that is ... and I going to say it
18:10 ageorgop joined #salt
18:11 berserk joined #salt
18:12 saltForeverNoob joined #salt
18:13 shaggy_surfer joined #salt
18:13 quasiben joined #salt
18:13 cpowell joined #salt
18:16 saltForeverNoob_ joined #salt
18:23 fracklen joined #salt
18:24 mavhq joined #salt
18:26 cpowell joined #salt
18:27 zmalone joined #salt
18:27 cpowell_ joined #salt
18:30 berserk joined #salt
18:33 goal anyone know why pkg.version sometimes prefixes the version with '1:'
18:34 onlyanegg joined #salt
18:34 iggy because the package manager does
18:34 josuebrunel joined #salt
18:35 quasiben joined #salt
18:37 akhter joined #salt
18:38 akhter joined #salt
18:38 Miouge joined #salt
18:39 beardedeagle wooo salt-pack takes forever to clone
18:40 goal iggy: well, because salt asks for the epoch value in it's repoquery format, yes. But anyhow, the problem is that when you use pkg.installed it tries to compare the version with the epoch prefix
18:40 zmalone beardedeagle: salt-pack includes tar balls for a ton of dependencies
18:40 beardedeagle yeah, about to add to it
18:40 zmalone it will probably run into the github repo size limit within a year or two
18:40 goal iggy: so, if you ask for a version with pkg.installed, it doesn't match the installed version even if that exact version is installed, as it compares 1:2.3.4 with 2.3.4
18:41 zmalone ("don't commit large binaries to git" etc.)
18:41 beardedeagle promised dmurphy winexe for centos7 and just now getting around to it
18:41 zmalone I think it sits at 700mb, and github has a limit of gig
18:42 beardedeagle what about pushing that stuff into artifactory, or gitfs. of course that would depend on if you guys have either of those.
18:42 drawsmcgraw Anyone have experience using the rbenv module on really old Centos machines? Like, Centos 6.2?
18:42 beardedeagle no way for me to know if you guys do though, not a salt dev :(
18:44 garphy joined #salt
18:45 iggy git lfs?
18:45 beardedeagle sorry, yes that is what I meant
18:46 GreatSnoopy joined #salt
18:48 euidzero_ joined #salt
18:48 Karunamon Why is anything that involves GPG a massive pain in the arse?
18:49 i90rr joined #salt
18:50 Karunamon I'm serious. It's like one thing after another.
18:51 mapu joined #salt
18:54 rem5 joined #salt
18:56 Brew joined #salt
18:57 Fiber^ joined #salt
18:58 Karunamon ..holy crap, I found the problem. Salt isn't interpreting the key_url option, it's just verbatim dropping it into the repo file.
18:58 fullstop hi all, trying to resolve what should be a simple jinja template mistake
18:58 Karunamon .repo syntax under Rhellikes uses "gpgkey=" not "key_url="
18:59 fullstop http://pastebin.com/raw/WAyhGvPB is the part of the template which is failing
18:59 fullstop and this is in the pillar: http://pastebin.com/raw/58reQnpG
19:00 west575 joined #salt
19:00 fullstop and this is the output: http://pastebin.com/raw/d4muN1Ng
19:01 fracklen joined #salt
19:01 fullstop both prefix and version name are set in the pillar, so I'm kind of stumped with why there is a type mismatch.
19:08 brianfeister joined #salt
19:09 DammitJim joined #salt
19:09 garphy joined #salt
19:09 ageorgop joined #salt
19:10 beardedeagle @goal: just ran into your `1:` issue with pkg.installed
19:12 rubenb joined #salt
19:13 ALLmightySPIFF joined #salt
19:13 fullstop got it, my sls file was clearly defined as a list.
19:14 onlyanegg joined #salt
19:15 quasiben joined #salt
19:16 dmaiocchi joined #salt
19:16 PeterO joined #salt
19:19 dmaiocchi joined #salt
19:21 dendazen Guys i get this error
19:21 dendazen Unable to manage file: string indices must be integers, not str
19:21 dendazen can someone take a look at my salt state?
19:22 forrest what salt release are you on dendazen?
19:24 dendazen this is my state
19:24 dendazen https://gist.github.com/dendazen/16436e29efd3e5049b98
19:24 dendazen for server or client
19:24 forrest both
19:25 dendazen let me look one sec
19:25 dendazen salt-master-2015.5.5-1.el6.noarch
19:25 dendazen on server
19:25 dendazen client salt-2014.7.1-1.el6.noarch
19:25 dendazen salt-minion-2014.7.1-1.el6.noarch
19:26 forrest yeah that's at least partially why
19:26 forrest version mismatches can create issues.
19:26 forrest and there was also a bug with 2014.7 with this error.
19:26 forrest Also, fix line 13 please: https://gist.github.com/dendazen/16436e29efd3e5049b98#file-gistfile1-txt-L13
19:27 rmnuvg joined #salt
19:27 dendazen oh what is the problem with it?
19:27 dendazen line 13
19:27 Muchoz joined #salt
19:27 forrest just not indented.
19:27 dendazen is it ' - installed' part
19:27 dendazen oh i see you are right.
19:28 forrest Doubtful that is causing the error but good to find.
19:28 dendazen Thanks, let me commit
19:28 forrest Yeah np, I would update that minion to the same release as the master if you can
19:28 forrest or do it on a system in test first to make sure everything still works as expected.
19:29 baweaver joined #salt
19:31 daveleigh joined #salt
19:31 dendazen yeah, i will do that, thank you very much.
19:31 forrest np
19:31 dendazen i did not realize versions were different.
19:32 fracklen joined #salt
19:33 fullstop is it possible to get the user of a file.directory from a grain?
19:41 drawsmcgraw For anyone curious, the rbenv module installs rbenv just fine on centos 6.2.
19:41 Karunamon left #salt
19:42 dendazen I got this error after upgrading salt-minion https://gist.github.com/dendazen/31ccbb386d2997595170
19:42 ALLmightySPIFF joined #salt
19:43 forrest file.sed isn't a state option as far as I am aware.
19:43 forrest should probably be file.replace: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace
19:45 dendazen oh maybe it was in the previous version
19:45 zmalone1 joined #salt
19:48 fracklen joined #salt
19:48 marie1972 joined #salt
19:49 baweaver joined #salt
19:54 shaggy_surfer joined #salt
19:55 zmalone joined #salt
19:56 JPT joined #salt
19:59 berserk joined #salt
20:04 akhter joined #salt
20:04 geomacy joined #salt
20:05 dendazen now all worked but i get this error on that state
20:05 dendazen https://gist.github.com/dendazen/58a899fcd06c1f66c119
20:05 RedundancyD left #salt
20:05 dendazen but ls -la packages/sudo/files/etc-sudoers
20:05 dendazen -rw-r--r--  1 draynki  staff  806 Mar 11  2015 packages/sudo/files/etc-sudoers
20:08 cliluw joined #salt
20:09 cliluw joined #salt
20:11 MindDrive joined #salt
20:17 brianfeister joined #salt
20:19 fracklen joined #salt
20:19 digitalhero joined #salt
20:23 ALLmightySPIFF joined #salt
20:25 babilen dendazen: And it is in file_roots?
20:25 dendazen yes, it is, sir.
20:26 babilen Prove it! ;)
20:29 fracklen joined #salt
20:29 mavhq joined #salt
20:29 jeddi joined #salt
20:29 akhter joined #salt
20:32 babilen dendazen: So, it is listed in "salt 'yourminion' cp.list_master" then?
20:33 dendazen one sec
20:33 dendazen here
20:33 babilen And please .. prove that it is in file_roots
20:34 djgerm left #salt
20:34 dendazen one sec
20:35 akhter joined #salt
20:35 dendazen here you go
20:35 dendazen [root@ops1 ~]# sudo salt -v 'uat-orbitz1.chi1.*' cp.list_master | grep etc-sudoers
20:35 dendazen - packages/sudo/files/etc-sudoers
20:36 babilen Cool, and you still get the error that it is not available? Are you using environments?
20:36 dendazen no, no evironments, i mean i do use env but not for this case
20:36 babilen Well, is the master configured for different environments?
20:37 babilen I mean .. it could well be in a different one. The master obviously knows about this file and salt://packages/sudo/files/etc-sudoers should™ therefore work
20:37 dendazen ok let me run it versus host in prod environment, this one is uat
20:37 dendazen but it shouldn't matter
20:38 dendazen it worked before
20:39 babilen We have to start somewhere :)
20:39 babilen And: before what exactly?
20:40 dendazen before i upgraded salt master version i guess and had old salt-minion
20:40 fxhp joined #salt
20:40 dendazen now i upgraded salt-minion to version of salt-server
20:41 dendazen and this error started popping up
20:41 babilen Okay, which versions are these?
20:41 dendazen let me try one thing though
20:41 babilen And you restarted the minion and all that?
20:41 dendazen when i updated the minion i did not flush cache
20:41 dendazen maybe that's the reason
20:41 babilen You might also want to clear its caches and try similar things.
20:41 babilen yeah
20:41 dendazen one sec
20:42 dendazen how do I clear cache properly? is there a command
20:42 dendazen i used to just rm the content
20:42 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.clear_cache
20:45 dendazen hmm same thing
20:45 fracklen joined #salt
20:48 dendazen super weird
20:54 lemur joined #salt
20:57 Rumbles joined #salt
21:04 cberndt joined #salt
21:09 mdasilva_ joined #salt
21:09 dendazen now for prod env i get this error
21:09 dendazen AttributeError: 'module' object has no attribute 'exceptions'
21:09 dendazen some state crapped out as well
21:09 dendazen not sure which
21:16 edrocks joined #salt
21:17 atoponce joined #salt
21:20 jeddi joined #salt
21:22 sc250024 joined #salt
21:22 sc250024 Anyone have time for a sanity check question?
21:27 bhosmer joined #salt
21:27 forrest sc250024, Just post your question, if someone has time or familiarity they will answer :)
21:30 sc250024 ok
21:31 sc250024 Having an issue with something very simple, `- require\n- sls: some_sls`
21:31 sc250024 If I require another formula (I'm using - include already), that implies that the current formula waits until the required SLS finishes?
21:32 fracklen joined #salt
21:33 forrest sc250024, So when you run the`include:` at the top that state should run first unless you have it set otherwise in the conf file. The require is ensuring things worked properly, I can't remember if for a whole state it requires everything in there worked though.
21:33 tweakism hrm, can you require a whole sls?
21:33 tweakism states usually require other states, dunno what other options there are.
21:33 forrest tweakism, Yes you can require a whole state.
21:34 forrest as long as it is included at the top of the state.
21:34 jeddi joined #salt
21:34 tweakism can you show me what the syntax would look like?
21:34 tweakism I know of include, but include is not quite require
21:34 forrest include is required when you use a whole state like this, there's an example here: https://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file
21:35 sc250024 So in that example on the webpage, 'bar' only executes when 'foo' has completed, right?
21:35 forrest sc250024, Correct.
21:35 sc250024 Hmmmm...
21:36 forrest What is it you are trying to do?
21:36 tweakism cool, thanks much.
21:36 forrest tweakism, np
21:36 rem5 joined #salt
21:37 sc250024 forrest, basically that example you linked to
21:37 forrest sc250024, Okay, I thought your 'hmm' was because you were trying to do something else with it.
21:37 sc250024 I have three formulas: one for user management, one for Papertrail (online logging), and one for custom PPAs we use
21:37 Ashald hi guys
21:37 Ashald I have question about pepper client library
21:37 sc250024 And I want to make sure those are executed first before another module
21:38 Ashald I'm trying to execute: pepper --client runner state.orchestrate mods=deploy pillar='{"name": "sample-project", "version": "0.0.1.dev3", "build": "x2"}'
21:38 Ashald but getting: SaltInvocationError: Pillar data must be formatted as a dictionary
21:38 forrest sc250024, Did you already just put them ordered in your top.sls?
21:38 Ashald Is there is a way to pass pillar data to a runner through pepper client?
21:40 sc250024 forrest, does Salt follow the order defined in top.sls explicitly?
21:41 forrest sc250024, https://docs.saltstack.com/en/latest/ref/states/ordering.html#state-auto-ordering Pretty sure it does, gtmanfred do you remember?
21:42 gtmanfred by default it does top down
21:42 forrest There's https://docs.saltstack.com/en/latest/ref/states/compiler_ordering.html#ordering-layers but it doesn't talk about the top file.
21:42 gtmanfred until you start putting in require: or prereq
21:42 forrest gtmanfred, Cool, I thought so but couldn't remember specifically for the top.sls
21:42 forrest Right
21:42 gtmanfred yar
21:42 sc250024 Interesting
21:42 gtmanfred it is all top down, which is why it is an ordered dictionary
21:42 forrest That should be in those ordering docs.
21:42 forrest I'll make an issue.
21:42 gtmanfred and also why I use fail_hard: True, cause i don't use require at all
21:43 forrest Fair
21:43 gtmanfred yar, would rather it bail on the first failure :)
21:43 forrest yeah
21:43 digitalh_ joined #salt
21:44 grumm_servire joined #salt
21:44 forrest sc250024, https://github.com/saltstack/salt/issues/31931 if you want to +1 it.
21:44 sc250024 Just did, thanks guys!
21:45 digitalhero joined #salt
21:45 sc250024 So basically, if state_auto_order is set to false globally, Salt will follow the ordering in each SLS file the way you wrote it?
21:46 forrest No, True = sls ordering
21:46 forrest per the doc: If the classic ordering is preferred (lexicographic), then set state_auto_order to False in the master configuration file. Otherwise, state_auto_order defaults to True.
21:47 digitalh_ joined #salt
21:48 CeBe joined #salt
21:49 felskrone joined #salt
21:50 sjmh joined #salt
21:52 sc250024 forrest, to clarify, if I have two formulas 'formula1' and 'formula2', and in my top.sls file it reads 'base: \n '*': \n - formula2 \n - formula1'
21:52 sc250024 state_auto_order=True means the order in top.sls will be followed or not followed?
21:53 forrest The top.sls will be followed, so formula2 would operate first, then formula1
21:53 forrest Should just run it in a test environment and see it in action :)
21:53 sc250024 Got it, ok, thanks again guys!
21:53 forrest np
21:53 sc250024 I'm doing that now actually, just trying to get the theory behind it correct
21:54 forrest Cool
21:55 shaggy_surfer joined #salt
21:55 shaggy_surfer1 joined #salt
22:00 shaggy_surfer joined #salt
22:02 edrocks joined #salt
22:02 west575 joined #salt
22:03 baweaver joined #salt
22:03 Rumbles joined #salt
22:05 nethershaw joined #salt
22:05 babilen sc250024: You might still make the *actual* requisites explicit (e.g. if you install a package from a specific repository, have a require on the repo
22:05 babilen )
22:09 sc250024 Like '-require: \n - pkgrepo: php56_ppa' ?
22:09 babilen For example
22:18 ilbot3 joined #salt
22:18 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.7 | Register for SaltConf16: http://saltconf.com/register/ | Paid support available for open source Salt! https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
22:18 fracklen joined #salt
22:19 angvp joined #salt
22:19 quix_ joined #salt
22:20 nidr0x joined #salt
22:21 baweaver joined #salt
22:21 hightekvagabond joined #salt
22:22 angvp hello, i have a newbie question maybe, here's the thing, I have a process that copies eventually files from the salt master to its minions, it
22:22 angvp happens to be that sometimes one of those minions can be down and be up two hours after, so .. I assume since salt uses zeromq as long as those
22:22 angvp node connects it will get the files, right?
22:24 gtmanfred what process are you using? just a file.managed in a highstate? or salt-cp?
22:24 gtmanfred either way, i do not believe that it will make it to the minion 2 hours later
22:24 gtmanfred because the connection/job will timeout
22:24 gtmanfred if the minion is not repsonding
22:24 angvp gtmanfred: salt-cp
22:25 ajw0100 joined #salt
22:25 angvp hmm ok
22:25 gtmanfred yeah, i don't think it will go, because it will have timed out waiting for the minion
22:26 rhodgin_ joined #salt
22:26 angvp so .. if I want the minion to get that file, i should write something on my own who can copy the file again
22:27 gtmanfred so, you could put it as part of a highstate? so that it copies down the files
22:27 gtmanfred alternatively, you could throw a bunch of stuff into a reactor, and when minions connect to the salt master, the salt-cp gets run to transfer files to that minion
22:27 babilen You could also look into rectors and watch for start or presence events and then trigger a stuiable state
22:27 gtmanfred ^^
22:28 angvp great
22:28 angvp ok, I will research a little bit about how to implement it with the reactor
22:28 lero joined #salt
22:34 brianfeister joined #salt
22:35 scoates joined #salt
22:39 baweaver joined #salt
22:40 digitalhero joined #salt
22:41 zenlot6 joined #salt
22:43 frew does anyone know of a bug with ext_pillars, even when set to be run first, not being avaliable on the master in pillardata?
22:43 frew I can work up a test case but I would not be surprised if there is already an issue in the gigantic pile of issues on github :)
22:50 Rumbles joined #salt
22:54 jeddi joined #salt
22:55 teryx510 joined #salt
23:01 teryx510 joined #salt
23:02 karlamrhein joined #salt
23:07 noraatepernos joined #salt
23:13 iggy frew: you mean you can't use ext_pillar info in the top file?
23:15 jhauser joined #salt
23:18 ajw0100 joined #salt
23:26 rem5 joined #salt
23:27 scoates joined #salt
23:30 fgimian joined #salt
23:33 sc250024 joined #salt
23:34 codewaffle can I trigger a state based on when a package is first installed (and not on subsequent updates/etc?)
23:35 mdasilva joined #salt
23:35 sc250024 Using `onlyif` or `unless` in the declaration perhaps?
23:37 digitalhero joined #salt
23:37 dendazen joined #salt
23:38 sc250024 codewaffle, Can you be more specific?
23:39 joe_n joined #salt
23:41 cpowell joined #salt
23:45 kliquori joined #salt
23:47 duckfez joined #salt
23:47 teryx510 joined #salt
23:47 kliquori joined #salt
23:48 iggy salt doesn't update packages (unless you use pkg.latest)
23:51 duckfez hi, so I'm looking for help with working around file.recurse not propagating file permissions.  ( https://github.com/saltstack/salt/issues/2707 )
23:52 duckfez I have a set of file.recurse states that put file for host_type_1 in dir1 and host_type_dir in dir2
23:53 duckfez I'm trying to template-out a set of file.managed rules to fix known binaries in both cases
23:53 duckfez but clearly failing at it
23:57 mavhq joined #salt

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