Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-03-07

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

All times shown according to UTC.

Time Nick Message
00:00 mavhq joined #salt
00:02 mavhq joined #salt
00:03 misconfig joined #salt
00:08 brianfeister joined #salt
00:10 justanotheruser joined #salt
00:16 Lee- joined #salt
00:17 flowstate joined #salt
00:18 ajw0100 joined #salt
00:24 edrocks joined #salt
00:29 bry4n joined #salt
00:41 edrocks joined #salt
00:44 brianfeister joined #salt
00:57 iceyao joined #salt
00:57 cyborg-one joined #salt
01:02 iceyao_ joined #salt
01:04 ageorgop joined #salt
01:07 mdasilva joined #salt
01:08 amcorreia joined #salt
01:09 ajw0100 joined #salt
01:09 NaPs joined #salt
01:09 s_kunk joined #salt
01:19 morissette joined #salt
01:21 beardedeagle joined #salt
01:26 ageorgop joined #salt
01:26 xenoxaos joined #salt
01:32 flowstate joined #salt
01:34 zmalone joined #salt
01:40 scoates joined #salt
01:40 jankmcjanker joined #salt
01:44 k_sze[work] joined #salt
01:44 morissette joined #salt
02:01 iceyao joined #salt
02:10 iceyao_ joined #salt
02:10 zengine joined #salt
02:11 catpigger joined #salt
02:19 zmalone joined #salt
02:23 digitalhero joined #salt
02:24 michelangelo joined #salt
02:26 malinoff joined #salt
02:28 iceyao joined #salt
02:29 catpigger joined #salt
02:32 flowstate joined #salt
02:38 racooper joined #salt
02:40 fracklen joined #salt
02:46 brianfeister joined #salt
02:46 MajObviousman joined #salt
03:07 favadi joined #salt
03:08 ajw0100 joined #salt
03:10 malinoff joined #salt
03:17 kermit joined #salt
03:22 beardedeagle joined #salt
03:24 josuebrunel joined #salt
03:31 flowstate joined #salt
03:36 anmol joined #salt
03:48 kermit joined #salt
04:10 zmalone joined #salt
04:13 ramteid joined #salt
04:18 rdas joined #salt
04:20 twiedenbein joined #salt
04:24 blue0ctober joined #salt
04:26 zmalone joined #salt
04:29 digitalhero joined #salt
04:32 flowstate joined #salt
04:32 brianfeister joined #salt
04:34 lahwran joined #salt
04:43 kshlm joined #salt
04:47 zmalone joined #salt
04:56 brianfeister joined #salt
04:56 onorua joined #salt
04:57 onorua I would like to create my own module and execute commands inside the module in non-blocking manner, using multithreading or multiprocessing, does salt support this kind of modules? Is there any documentation available?
05:02 fracklen joined #salt
05:04 digitalhero joined #salt
05:11 anmol joined #salt
05:13 flowstate joined #salt
05:22 cberndt joined #salt
05:23 ajw0100 joined #salt
05:27 mason_ joined #salt
05:31 flowstate joined #salt
05:46 digitalhero joined #salt
05:47 colegatron joined #salt
05:48 favadi joined #salt
05:54 keimlink joined #salt
06:12 keimlink joined #salt
06:13 Micromus joined #salt
06:22 brianfeister joined #salt
06:23 k_sze[work] joined #salt
06:27 atmosx joined #salt
06:45 felskrone joined #salt
06:46 digitalhero joined #salt
06:50 malinoff joined #salt
06:51 mavhq joined #salt
07:06 colttt joined #salt
07:14 ffredrikk joined #salt
07:17 favadi joined #salt
07:23 beardedeagle joined #salt
07:32 favadi joined #salt
07:34 yuhlw joined #salt
07:36 evle1 joined #salt
07:40 impi joined #salt
07:43 keimlink joined #salt
07:49 Miouge joined #salt
07:51 fracklen joined #salt
07:54 jbrnds joined #salt
07:54 NV joined #salt
07:54 ffredrikk joined #salt
07:58 armyriad joined #salt
07:58 mavhq joined #salt
07:59 AirOnSkin joined #salt
08:04 mavhq joined #salt
08:05 fracklen joined #salt
08:06 Davs joined #salt
08:10 Davs Hi! I have my states defined in /srv/salt. Is there a way to make a state include/execute a state in another directory, let's say /home/davs/salt?
08:12 Davs I wan't to do a state like this (for a project): 1. get the code from git, 2. install some dependencies 3. execute a .sls file inside the project's directory
08:12 hemebond Davs: Add the directory in your salt master config.
08:12 hemebond Or just use a symlink.
08:19 Rumbles joined #salt
08:21 brianfeister joined #salt
08:24 dmaiocchi joined #salt
08:29 cyborg-one joined #salt
08:29 dgutu joined #salt
08:31 flowstate joined #salt
08:40 josuebrunel joined #salt
08:41 fracklen joined #salt
08:41 fracklen joined #salt
08:42 Davs thanks, I'll look into it.
08:42 felskrone is it possible to import a file (passwd-like) into a state, and loop over the lines?
08:44 felskrone i found things like import_text… and import yaml, but thats not what im looking for
08:44 s_kunk joined #salt
08:45 av_ joined #salt
08:49 chiui joined #salt
08:50 hemebond felskrone: What other import process do you need?
08:53 felskrone i need to fill in a template with a dynamic list of users, the userlist is in passwd-format from which i actually only need the username
08:53 tweakism it might be easier to just throw that into pillar
08:53 tweakism maybe with file_tree
08:53 denys joined #salt
08:54 k_sze[work] joined #salt
08:54 felskrone tweakism: i would love to do that, but the user list is unique per server and only available locally on each server
08:54 tweakism ah
08:55 tweakism well you could handle the unique-per-server still w/ pillar
08:55 tweakism but not the locally-per-server, if that's really how it is
08:57 felskrone i dont have control over the user-creation or which user is created where. to be able to out them in pillars i'd have to have control or offer an api which i cant atm :-)
08:58 felskrone for now i can only do it locally with some salt-magic
08:58 JohnnyRun joined #salt
09:01 josuebrunel joined #salt
09:08 ronnix joined #salt
09:09 ITChap joined #salt
09:10 slav0nic joined #salt
09:23 Damon_ joined #salt
09:23 Damon_ exit
09:24 Davs Is there a way to run a wheel module from a state? Namely wheel.config.update_config from https://docs.saltstack.com/en/latest/ref/wheel/all/salt.wheel.config.html ?
09:32 flowstate joined #salt
09:38 babilen felskrone: You could write a custom grain for that and make the local information available to salt that way
09:39 debian112 joined #salt
09:40 flebel joined #salt
09:42 fracklen joined #salt
09:42 fracklen joined #salt
09:43 felskrone babilen: that sounds good, let me try that real quick
09:43 jhauser joined #salt
09:49 impi_ joined #salt
09:58 JohnnyRun joined #salt
09:58 ITChap joined #salt
09:58 freeaks joined #salt
09:59 N-Mi joined #salt
10:00 scarcry joined #salt
10:01 cztanu joined #salt
10:02 josuebrunel joined #salt
10:10 brianfeister joined #salt
10:33 flowstate joined #salt
10:33 brianfeister joined #salt
10:35 Nazca joined #salt
10:45 Nazzy joined #salt
10:46 MadHatter42 joined #salt
10:46 Cignacio joined #salt
10:47 permalac joined #salt
10:48 abednarik joined #salt
10:49 hemebond uwaaaa, I had no idea environ.setenv worked. Uglier than just using /etc/environment but still good to have.
10:55 fracklen joined #salt
10:55 fracklen joined #salt
10:59 impi_ joined #salt
11:00 mavhq joined #salt
11:00 MadHatter42 joined #salt
11:01 hemebond Blast, still not good enough.
11:04 Nazca__ joined #salt
11:06 s_kunk joined #salt
11:09 mavhq joined #salt
11:09 ronnix joined #salt
11:10 amcorreia joined #salt
11:13 kshlm joined #salt
11:13 mavhq joined #salt
11:15 mavhq joined #salt
11:17 mavhq joined #salt
11:21 mavhq joined #salt
11:22 favadi joined #salt
11:22 mavhq joined #salt
11:25 mavhq joined #salt
11:31 flowstate joined #salt
11:43 mavhq joined #salt
11:47 digitalhero joined #salt
11:51 mavhq joined #salt
11:56 fredvd joined #salt
12:02 mavhq joined #salt
12:05 mavhq joined #salt
12:10 fracklen joined #salt
12:17 LostSoul_ Hi
12:17 LostSoul_ Is it possible to add list of packages to pip ?
12:19 s_kunk joined #salt
12:20 cztanu pip freeze
12:20 cztanu oh wait you mean in salt
12:20 cztanu forgot what channel i was in
12:20 _JZ_ joined #salt
12:21 cztanu https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pip_state.html
12:22 LostSoul_ Yeah, found out that pkgs works here too :)
12:28 LostSoul_ Thanks
12:31 mdasilva joined #salt
12:32 flowstate joined #salt
12:33 armyriad joined #salt
12:40 rubendv joined #salt
12:43 ggoZ joined #salt
12:47 SunPowered joined #salt
12:49 SunPowered has anybody played with the pattern of a null state.  A common named state that has other requisites attached which can be used in other requisite statements?
12:49 SunPowered I don't know if such a state exists in saltstack.  I found the test.nop state function, which may do what I want.
12:54 ronnix joined #salt
12:56 babilen SunPowered: You can do that, yeah
12:56 SunPowered seems like a nice way to group action requisites
12:56 babilen You lose granularity, but gain abstraction
12:56 SunPowered right
13:03 bluenemo joined #salt
13:04 zengine joined #salt
13:10 dgutu joined #salt
13:10 mavhq joined #salt
13:24 favadi joined #salt
13:25 mavhq joined #salt
13:27 losh joined #salt
13:28 numkem joined #salt
13:35 mage_ joined #salt
13:37 s_kunk joined #salt
13:39 Nazca__ joined #salt
13:40 gh34 joined #salt
13:40 akhter joined #salt
13:43 Nazzy joined #salt
13:44 bry4n joined #salt
13:46 akhter joined #salt
13:48 chiui joined #salt
13:49 flowstate joined #salt
13:49 akhter joined #salt
13:52 LondonAppDev joined #salt
13:52 mavhq joined #salt
13:54 edrocks joined #salt
13:54 sab3r Has anyone here used some of bechtoldt's formulas? I'm quite new to salt and I'm trying to get this elasticsearch (https://github.com/bechtoldt/saltstack-elasticsearch-formula) formula to work but his github is missing instructions on how to use the formulas. The file hierarchy seems to be different than in the official salt formulas. How I should declare it in my configurations or in my top.sls?
13:55 Miouge joined #salt
13:57 subsignal joined #salt
13:57 TooLmaN joined #salt
13:57 anmol joined #salt
13:59 flowstate joined #salt
14:00 lorengordon joined #salt
14:01 ronnix joined #salt
14:02 bhosmer joined #salt
14:03 notnotpeter joined #salt
14:07 mavhq joined #salt
14:08 toastedpenguin joined #salt
14:08 misconfig joined #salt
14:15 opdude joined #salt
14:16 geomacy joined #salt
14:18 penguin_dan joined #salt
14:22 flowstate joined #salt
14:27 mavhq joined #salt
14:29 ronnix joined #salt
14:31 JohnnyRun joined #salt
14:36 scoates joined #salt
14:38 malinoff joined #salt
14:43 mavhq joined #salt
14:44 hasues joined #salt
14:45 spiette joined #salt
14:46 hasues left #salt
14:46 flowstate joined #salt
14:47 bry4n joined #salt
14:49 akhter joined #salt
14:49 zmalone joined #salt
14:53 pdayton joined #salt
14:53 Fiber^ joined #salt
14:55 Tanta joined #salt
14:56 spiette joined #salt
14:56 * iggy advises against it
14:58 ALLmightySPIFF joined #salt
15:02 pgoetz_ joined #salt
15:03 mpanetta joined #salt
15:05 andrew_v joined #salt
15:12 bry4n joined #salt
15:12 highbury joined #salt
15:12 denys joined #salt
15:16 pgoetz_ joined #salt
15:24 akhter joined #salt
15:25 dgutu_ joined #salt
15:27 Rumbles hi, can anyone advise how to install a gem with the --user-install flag set? Do I need to write he command out in full under gem_bin?
15:32 mdasilva joined #salt
15:35 Nazca__ joined #salt
15:37 mdasilva joined #salt
15:38 kawa2014 joined #salt
15:38 kawa2014 joined #salt
15:39 toastedpenguin joined #salt
15:40 atmosx joined #salt
15:40 dyasny joined #salt
15:40 flowstate joined #salt
15:41 toastedpenguin joined #salt
15:42 toastedpenguin joined #salt
15:44 flowstate joined #salt
15:50 zengine_ joined #salt
15:56 racooper joined #salt
15:56 akhter joined #salt
15:59 Niamkik joined #salt
16:02 fracklen joined #salt
16:04 fyb3r joined #salt
16:10 titilambert joined #salt
16:11 scoates joined #salt
16:13 flowstate joined #salt
16:13 ALLmightySPIFF joined #salt
16:18 hal58th joined #salt
16:22 ZiLi0n joined #salt
16:24 vilitux joined #salt
16:25 ZiLi0n Hello everyone, is there a way to make sure a service is running? so that the minion blocks, and once ready continues and applies the next state (which requires the service running/listening on a port)
16:25 Brew1 joined #salt
16:26 akhter joined #salt
16:26 TheLoeki joined #salt
16:27 noraatepernos joined #salt
16:28 ronnix joined #salt
16:29 abednarik joined #salt
16:31 mavhq joined #salt
16:32 cpowell joined #salt
16:34 iggy not that I know of
16:34 fracklen joined #salt
16:35 beardedeagle joined #salt
16:35 marie1972 joined #salt
16:36 MadHatter42 joined #salt
16:36 babilen ZiLi0n: You might be able to use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event and send an event to the master when the service is available
16:38 amcorreia joined #salt
16:39 ZiLi0n babilen thank you. this involves the master right? is there a way for the minion to wait somehow before continuing?
16:39 babilen Or integrate that in your systemd unit file (Type=notify)
16:40 babilen It waits for those events on the event bus, yeah
16:40 maduro joined #salt
16:40 babilen https://www.freedesktop.org/software/systemd/man/systemd.service.html discusses that option
16:40 Netwizard joined #salt
16:43 fnbv joined #salt
16:43 andrew_v_ joined #salt
16:44 fxhp joined #salt
16:44 colegatron ZiLi0n, maybe a service.running and a - require or require_in is enough for your use case
16:48 mdasilva_ joined #salt
16:50 ageorgop joined #salt
16:51 jimklo joined #salt
16:52 iggy there's a difference between "process spawned" and "service up, listening on ports, etc"
16:52 flowstate joined #salt
16:52 colegatron babilen, I continue struggling with the gitfs. I understood how gitfs works for states, but it behaves different for pillars
16:52 iggy sometimes a _huge_ difference (/me eyes every java service he's ever seen)
16:53 colegatron example, test and master config: http://pastebin.com/vZWqRjCm
16:54 babilen iggy: Absolutely
16:54 babilen colegatron: I am very reluctantly looking at pastebin.com ;)
16:55 colegatron let's explain: I have three repositories, one with states and two folders inside (salt and pillar folders). and a production config repo (with a cfg-production.yml) and a development config (with a cfg-dev.yml)
16:55 babilen And it is the end of my workday .. so, might want to ask the channel
16:55 colegatron :) sure :) maybe someone can help :)
16:58 shaggy_surfer joined #salt
16:58 colegatron in the pillar folder I have a top.sls specifying 'frontalserver': [ onepillar-on-states-repo, prodconfigpillar-on-config-repo ]
16:59 colegatron I always get an error saying 'prodconfigpillar-on-config-repo' env 'base' is not avaialbe on the salt master
16:59 mdasilva joined #salt
17:00 colegatron but if I create a top.sls file in the config-repo and set 'frontalserver': [ prodconfigpillar-on-config-repo ] it works without problems
17:00 colegatron but this is annyoing, because it forces me to have as much top.sls files as repositories I want to merge
17:00 colegatron and repeat the minion matching on every top.sls file.
17:01 colegatron does anyone found that 'problem' and solved it in some way?
17:03 iggy sounds like a bug, check for issues?
17:03 colegatron it would be great salt merge all top files in a single top.sls and all the pillar files in one big pillar list, but instead of this, it matches top file by top file and (maybe) then merges the top.sls
17:03 iggy also, what version of master? The state and pillar git code used to be totally different
17:04 babilen I'd also use separate repos for top files
17:04 colegatron salt-master 2015.8.5 (Beryllium)
17:04 iggy colegatron: you aren't saying you want the state and pillar tops merged are you?
17:04 colegatron iggy, no, of course :)
17:04 colegatron babilen; separate repo for top files?
17:04 iggy okay, got a little confused
17:05 colegatron iggy, I know, it is difficult to explain
17:05 iggy colegatron: yeah, so you don't have to worry about top merging between branches (which usually bites people... horribly)
17:05 colegatron salt states seems to be ok, it is only the pillar part
17:05 colegatron iggy, I do not use branches (god thanks)
17:06 babilen colegatron: I *hate* top file merging across branches/environments, but still like to use proper git workflows. I therefore keep top files in their own repo (with only the top file in there)
17:07 colegatron but... let's see you you solve this: (maybe it is my approach)
17:07 colegatron I have a repo with salt/ and pillar/ (pillars are for standard states, nginx, jenkins, etc)
17:07 hal58th I wouldn't use git pillar anyways. It has issues when you have lots of minions doing highstate because your git server will deny people to prevent DDOS
17:08 colegatron hal58th, then this problem arises will see :)
17:08 DammitJim joined #salt
17:08 colegatron hal58th, tnx anyway :)
17:08 colegatron good to know
17:08 hal58th welcome
17:08 babilen My git server will do what?
17:08 babilen (and why?)
17:09 colegatron babilen, then I have a production config repo, which has a production.sls
17:09 cpowell joined #salt
17:10 colegatron and a devevelpoment config repo, which has a development.sls
17:11 colegatron every minion has to reach the states it needs (nginx,etc) and also ONE config, specified as a pillar in pillar/top.sls
17:11 colegatron sorry, every minion has to reach the states it needs (nginx,etc) and also ONE config
17:11 colegatron how do you write your salt/top.sls and pillar/top.sls to let a minion get the production.sls ?
17:13 dfinn joined #salt
17:13 ZiLi0n colegatron, thanks. I have seen that service.running has a sig parameter to look for a string within ps output command
17:13 zengine joined #salt
17:14 ZiLi0n does someone know if the ps command is a "ps aux" command? ps does not show the process of the service I would like to look at
17:14 babilen colegatron: You simply assign the minion in the production: block and mention that SLS
17:15 colegatron ZiLi0n, you can also run a cmd.run: - name: ps aux | grep whatever and a - require: instead a service.running
17:15 babilen top files assign minions to environments and SLS files to minions
17:15 colegatron babilen, I have no production: block all repos are being bind to base env
17:16 colegatron babilen, so, in your opinion should be  (any) top.sls base: 'minion': [ nginx, production-config ], right?
17:16 babilen Well, then just assign "base: - production"
17:16 colegatron babilen, ok, now you're on my point: that does not works
17:16 babilen It does
17:17 Blyte joined #salt
17:17 babilen If it doesn't then you are doing something wrong or you are running into a bug.
17:17 babilen We shall not accept g&t sipping, non-working pillars and states
17:18 colegatron babilen, I agree with you, it is my fault or a bug :)
17:18 colegatron that's why I pasted my master config :) maybe someone is able to find my fault
17:19 akhter_1 joined #salt
17:19 colegatron I think it is ok, but... I never found a bug before, so I prefer to think is my fault until someone more experienced says it is not :)
17:20 misconfig joined #salt
17:20 babilen You are missing the base: part
17:21 babilen Also .yml files aren't .sls files
17:21 colegatron babilen, you're right, they are sls in the repo, not yml.
17:21 colegatron my fault when writting the paste
17:22 colegatron but about the base: ... what do you mean?
17:22 colegatron oh, I see, the env:
17:22 babilen yeah
17:22 colegatron it is in the files
17:23 colegatron not in the paste, sorry
17:23 writtenoff joined #salt
17:23 misconfig Does anyone have an idea as to how one can calculate a percentage of memory against a salt grain and set it as a variable? I would do this in ansible all of the time: https://gist.github.com/ndobbs/f7fec52ae6f6567a13c4
17:24 colegatron babilen, my simple test: pillar/top.sls : http://pastebin.com/XYcAR5S9
17:25 ecdhe Is there a canonical list of salt versions and release dates?
17:26 colegatron {% set mem=grains['memory']*(1/percentage) %} not sure the grain name
17:27 catpig joined #salt
17:27 colegatron misconfig, .
17:27 misconfig grain name is mem_total - thanks: colegatron
17:27 colegatron welcome
17:29 akhter joined #salt
17:30 colegatron babilen, do you mean you can specifiy base: 'minion': [ repo1/sls1, repo2/sls2 ] with this config: http://pastebin.com/R4jXqm9D  ??
17:30 cberndt joined #salt
17:32 hal58th ecdhe: not that I know of
17:33 ecdhe Sometimes I install salt out of a repo and I don't know *how* old it is.
17:33 hal58th thats true. repo.saltstack.com has taken over though
17:34 zengine_ joined #salt
17:34 ecdhe Thanks hal58th.
17:35 mavhq joined #salt
17:36 akhter joined #salt
17:37 colegatron does it is the right mailing list of saltstack to ask for community support? https://groups.google.com/forum/#!forum/salt-users
17:39 drawsmcgraw joined #salt
17:40 zmalone I'm on that list, you might get mixed replies, but you'll usually see something
17:43 dmaiocchi joined #salt
17:47 flowstate joined #salt
17:48 brianvdawson joined #salt
17:48 brianvdawson left #salt
17:50 shaggy_surfer joined #salt
17:52 akhter joined #salt
17:56 cpowell joined #salt
17:57 bmac2 joined #salt
18:02 ageorgop joined #salt
18:05 hal58th joined #salt
18:09 Blyte Hi there, quick question regarding Pillar, I'm using a salt-formula from github and what's the proper way to change Pillar settings regarding the minion? I need minions to have a different settings
18:11 dfinn1 joined #salt
18:12 brianfeister joined #salt
18:12 dfinn2 joined #salt
18:12 ZiLi0n colegatron thanks. but will that cmd.run run like in a loop waiting for he output that says the service is running? I guess the cmd.run will run and then the next states will be executed without waiting
18:13 jnials joined #salt
18:13 colegatron oh, that's true; you can use a while: do ps; sleep 1; done or something similar. that's ugly but it works
18:14 AndreasLutro if your init.d script/systemd unit/whatever is written correctly you shouldn't need to do that
18:16 denys joined #salt
18:16 cpowell joined #salt
18:16 dfinn joined #salt
18:18 colegatron AndreasLutro, I agree, but depends on how he is using salt.
18:19 Netwizard joined #salt
18:20 iggy colegatron: you wouldn't specify the repo in the sls path
18:20 ZiLi0n So the init.d script should not return from start function until the system is fully operation and listening on every port right? AndreasLutro that is what you're suggesting correct?
18:21 colegatron iggy, sorry, what?
18:21 iggy "base: 'minion': [ repo1/sls1, repo2/sls2 ]" <-- what is with the repo1 repo2 stuff?
18:22 N-Mi_ joined #salt
18:22 colegatron ah, only to explain the sls1 comes from repo1
18:22 iggy colegatron: I think your best bet is to boil it down to the simplest non-working config and then post everything you can (top files, master config, etc)
18:23 linjan_ joined #salt
18:23 colegatron It is what already did on the paste. I'm going to fix the typos pointed by babilen  and repaste
18:25 atmc left #salt
18:26 fracklen joined #salt
18:26 kahiru joined #salt
18:26 dfinn1 joined #salt
18:28 colegatron done, here it is :http://pastebin.com/URsq4zCN
18:28 colegatron I think it is clear, let me know if not
18:29 bmac2 joined #salt
18:29 iggy pastebin complains that I use adblock
18:30 fyb3r haha
18:31 neevor joined #salt
18:31 fyb3r Take some popups for the team iggy!
18:32 iggy it's the f'ing video ads I hate
18:32 iggy like seriously... do you need to peg one of my cpu's and make my browser run like shit to get your point across?
18:32 iggy I think every web dev and ad designer should have to use 10 year old computers
18:33 fyb3r and 56k connections
18:33 XenophonF with 1000 ms RTTs
18:33 mdasilva joined #salt
18:34 fyb3r Gentlemen, we just solved the internet's most prominent problem: pop-up ads.
18:35 iggy colegatron: everything loos okay... assuming that all the bits you cut out of your paste are correct (probably not)
18:38 disbound joined #salt
18:40 colegatron the only bits out in the master are: timeout: 10, failhard: true, fileserver_backend: true
18:43 iggy it's the other files that I'd be more worried about
18:44 iggy p.s. gist.github.com allows pasting multiple files in a single "paste" without having to shove a ton of info into one paste
18:44 fyb3r Its hard for us to help though without actually having the files in their entirety. sometimes we will fire up a quick VM with the settings and see if we can replicate the issue
18:45 bhosmer__ joined #salt
18:48 Trauma joined #salt
18:48 akhter joined #salt
18:48 digitalhero joined #salt
18:49 igorwidl joined #salt
18:50 AndreasLutro ZiLi0n: correct
18:50 igorwidl when I go 'salt '*' state.highstate' is there a way to show which hosts never run the command? We are having trouble with machines that are shutdown and we never know if salt run on them or not
18:51 AndreasLutro igorwidl: if the machines shut down before returning to the master, then no, there's no way of knowing
18:51 igorwidl AndreasLutro: their key is already in salt
18:52 AndreasLutro igorwidl: are the machines shutting down in the middle of a highstate? do you have a reboot state or something?
18:52 nate_c joined #salt
18:53 mdasilva joined #salt
18:53 iggy run highstate at boot?
18:53 igorwidl AndreasLutro: What i mean is, i want to run state.highstate on all minions so they are brought up to the latest state. But if some machines are shut down I would like to know that the state.highstate never run on those so I can re run it when they do come up
18:53 fyb3r you can see which ones timeout, but you wont know if they actually ever ran the highstate and just barfed mid run or not
18:54 fyb3r igorwidl, why not create a reactor that will run it on start
18:54 AndreasLutro igorwidl: 1. I don't think that's possible 2. the way salt works you should be able to just run state.highstate over and over
18:55 colegatron iggy, can you please have a look to this explanation to see if it is clear? I am going to write it on the google's forum: http://pastebin.com/yVnaZA5m
18:55 colegatron I tried to simplify as much as possible
18:55 igorwidl if I do reactor or run state.highstate on startup, I am worried if I start 100 nodes in AWS they will overload our VPN and servers.
18:56 igorwidl we had a recent problem when I did state.highstate on '*' nodes, but some nodes were so overloaded the salt minion timed out on them, and I never knew the state.highstate didnt run which caused issues
18:56 AndreasLutro maybe try using the --batch option
18:57 fyb3r ^
18:57 linjan_ joined #salt
18:57 fyb3r though I dont think thats possible since a single reactor will fire per minion
18:57 igorwidl AndreasLutro: we do run batch, but nodes that timeout/are not responsive are actually excluded fromt eh batch run
18:58 igorwidl Fiber^: but if i start 20+ minions and they all do yum update it will overload the vpn
18:59 iggy colegatron: did you try not putting pillars in a subdir and taking out the root?
18:59 highbury joined #salt
18:59 AndreasLutro igorwidl: if that still happens with --batch I'd suspect other underlying issues than salt honestly - and the yum thing is why many people set up repository mirrors/caches
19:00 forrest joined #salt
19:00 colegatron I think I tried. I'm going to re-try, just in case...
19:00 fyb3r igorwidl, we had the same issue with about 6000 of ours coming in when we would release an update. to solve it we did what AndreaLutro suggests and we created repo mirrors
19:01 flowstate joined #salt
19:02 igorwidl the repo will solve the AWS issue
19:02 igorwidl but I dont think --batch will let me know if salt failed to run on node 'x' if that node 'x' times out or is dead
19:03 fyb3r youll get a timeout back in the return
19:03 igorwidl --batch uses test.ping first, and if the noe does not return it will be skipped
19:03 igorwidl maybe in the newer versions, we still have 2015.5.
19:03 fyb3r but whether or not that means the machine was taking forever executing the state or just didnt execute it at all
19:04 fyb3r nope, its always been in the events. just set the timeout
19:04 fyb3r but as I said, the minion could still be running the state and just didnt make it in time to return data
19:05 flowstate joined #salt
19:05 ajw0100 joined #salt
19:05 colegatron iggy, nop, same problem; if in the pillar top.sls specify a pillar stored in a different repo, salt does not finds it for that top.sls
19:05 colegatron it is like if salt processes each top.sls with only the files stored in the same repos, without merging the list of files on all repos
19:07 iggy colegatron: and the problem only shows up on pillars? not on states?
19:08 mdasilva joined #salt
19:09 colegatron iggy, right. on states it works
19:09 colegatron just posted on forum: https://groups.google.com/forum/#!topic/salt-users/BwaAWXmoY2A
19:10 iggy sadly, the debugging available to pillars isn't quite the same as for pillars
19:10 fracklen joined #salt
19:10 colegatron hope someone can help with this, because this is the only thing that is keeping me on master-less mode
19:11 colegatron I want to move asap to master-minion approach, leave behind vagrant and start playing with reactors
19:11 colegatron but for now.... time to play with the kids. see you tomorrow
19:12 iggy colegatron: what is top_file_merging_strategy set to?
19:13 dendazen joined #salt
19:13 colegatron top_file_merging_strategy: same
19:13 iggy and you have top files in every tree?
19:14 igorwidl you guys are right, if i run salt '*' will return the failed nodes.  but it does not do it in batch mode and we have batch mode by default.. I think its somethign weird on our side
19:14 colegatron iggy if I don't have them, I can't see the other repos sls
19:16 baweaver joined #salt
19:16 iggy I didn't understand that statement, but I've never actually used multiple git repos, so I'll be quiet now
19:18 colegatron excuse my english; if in a top.sls in the first repo I mention a pillar sls stored on the second repo, it is not found by salt
19:18 colegatron then if I write a top.sls in the second repo matching the minion and specifying the sls, it is found.
19:19 hal58th_ joined #salt
19:19 highbury joined #salt
19:21 colegatron Have to go. see you tomorrow
19:21 noraatepernos joined #salt
19:22 linjan_ joined #salt
19:26 dmaiocchi joined #salt
19:28 baweaver joined #salt
19:30 digitalhero joined #salt
19:33 neevor joined #salt
19:36 edrocks joined #salt
19:38 adelcast left #salt
19:40 fracklen joined #salt
19:41 josuebrunel joined #salt
19:42 mdasilva joined #salt
19:47 armguy joined #salt
19:47 akhter joined #salt
19:54 djgerm joined #salt
19:56 fracklen joined #salt
19:57 s_kunk joined #salt
20:05 adelcast joined #salt
20:06 digitalhero joined #salt
20:10 fracklen joined #salt
20:11 Aleks3Y joined #salt
20:11 jimklo joined #salt
20:12 racooper joined #salt
20:13 keimlink joined #salt
20:18 akhter joined #salt
20:25 neevor joined #salt
20:26 ajw0100 joined #salt
20:37 akhter joined #salt
20:40 nZac joined #salt
20:42 Trauma joined #salt
20:44 baweaver joined #salt
20:47 flowstate joined #salt
20:48 SamYaple joined #salt
20:50 SamYaple hello. question about a pure python renderer for state files. is there a way to share classes across many state files? some type of inheritance?
20:51 RabidCicada joined #salt
20:55 teryx510 joined #salt
20:55 dmaiocchi joined #salt
20:57 iggy aside from normal python stuff, probably not... those kinds of states aren't widely used, so not much work has been done
20:59 Rumbles joined #salt
21:04 Netwizard joined #salt
21:05 RabidCicada I just posted this to the salt-users email list...but please...anyone who sends an email asking for a solution...please follow up with what the solution was so that others may learn and at least the contributors to your email thread may know they helped:)  https://xkcd.com/979/
21:06 fyb3r If an alternate roster file location is passed to salt_ssh, will it default to the /etc/salt/roster if the minion is not found inside the alternate?
21:14 flowstate joined #salt
21:15 jimklo joined #salt
21:16 baweaver joined #salt
21:17 SamYaple iggy: well normal python stuff is what im looking for
21:17 SamYaple iggy: but there is no import or inheritiance type thing I can find
21:17 djgerm left #salt
21:18 gtmanfred SamYaple: unless you are passing it through the __salt__ function dictionary, i do not believe so
21:19 gtmanfred otherwise, you can just import other python libraries if you wanted
21:19 gtmanfred though
21:19 SamYaple hmm. disapointing
21:19 SamYaple i could pass it thorugh a renderer like jinja2
21:19 SamYaple that could hold my class
21:19 SamYaple then super the class
21:20 SamYaple that might work
21:20 gtmanfred SamYaple: https://docs.saltstack.com/en/develop/topics/tutorials/packaging_modules.html this just got added
21:20 SamYaple looking
21:20 gtmanfred i don't think there is anything specifically like what you are wanting
21:21 mdasilva joined #salt
21:21 SamYaple yea gtmanfred not quite what im looking for
21:22 SamYaple so its not great but I could have the py renderer be in jinja2 form and have jinja2 populate the "shared" abstract class and then super that class in the specific state
21:22 SamYaple that sounds.. posible
21:24 akhter joined #salt
21:26 dyasny joined #salt
21:27 SunPowered joined #salt
21:27 PeterO joined #salt
21:29 Rumbles joined #salt
21:30 gekken joined #salt
21:31 flowstate joined #salt
21:31 beardedeagle joined #salt
21:32 beardedeagle joined #salt
21:35 PeterO Is there any easy way to manipulate the $PATH variable in Linux using a Salt State?
21:36 tweakism PeterO: the thing is, there's not one global place where PATH gets set
21:36 tweakism so it partly depends on what needs it, i.e. it's different for cron jobs
21:36 tweakism but usually, you need to set it in the global shell startup files
21:36 tweakism like /etc/profile
21:36 PeterO Makes sense
21:37 RabidCicada PeterO: You can set it in bashrc for non-login non-interactive shells
21:37 tweakism RabidCicada: bash doesn't read any startup files by default when non-interactive
21:37 tweakism if you want it to you have to set BASH_ENV
21:38 RabidCicada interesting...it's working for me right now:).  .bashrc for a particular user
21:38 tweakism .bashrc is read for interactive non-login shells
21:38 tweakism and .bash_profile or .profile for interactive login shells
21:39 jimklo joined #salt
21:39 tweakism zsh has .zshenv for all shells, including non-interactive
21:39 tweakism RabidCicada: so, your shell is either interactive or a child of an interactive shell
21:39 RabidCicada you are correct tweakism.  I am not en expert in linux internals...but I do wonder why my solutoin works now.
21:40 ajw0100 joined #salt
21:41 llua .zshenv is read for most shells, not all.
21:41 tweakism llua: what's it not read for?
21:42 llua when started in a emulation mode
21:42 tweakism heh
21:42 tweakism ok, technically correct
21:43 tweakism bash reads different stuff when invoked as sh, too
21:44 llua .zshenv is skippable with other options unset too, like rcs.
21:44 PeterO kind of a related question, any one have handy a golang formula? The salt-formulas org doesn't have a repo for one.
21:46 brianfeister joined #salt
21:49 jhauser joined #salt
21:49 akhter joined #salt
21:51 akhter_1 joined #salt
21:51 PeterO Nevermind, I just created one.
21:52 akhter joined #salt
21:53 dfinn joined #salt
21:53 phila_ joined #salt
21:54 dfinn1 joined #salt
21:55 akhter joined #salt
21:55 dfinn1 joined #salt
21:58 akhter_1 joined #salt
22:00 akhter joined #salt
22:03 akhter joined #salt
22:05 akhter_1 joined #salt
22:10 akhter joined #salt
22:12 PeterO can you use a file.managed without a source or contents? I just want to chmod a file.
22:13 baweaver joined #salt
22:14 hemebond PeterO: The parameters are optional but easier to just test.
22:14 PeterO That's what I was thinking.
22:15 abednarik joined #salt
22:15 akhter joined #salt
22:22 flowstate joined #salt
22:22 akhter joined #salt
22:30 flowstate joined #salt
22:36 misconfig joined #salt
22:38 grumm_servire joined #salt
22:40 flowstate joined #salt
22:40 mr_chris joined #salt
22:41 zenlot joined #salt
22:41 dfinn joined #salt
22:41 onlyanegg joined #salt
22:44 dfinn1 joined #salt
22:44 dfinn1 joined #salt
22:51 dfinn joined #salt
22:51 dfinn joined #salt
22:52 lemur joined #salt
22:58 dfinn joined #salt
23:03 bhosmer joined #salt
23:08 dumbfoundedsaltu joined #salt
23:09 conan_the_destro joined #salt
23:13 dumbfoundedsaltu hi, is it possible to run a command on a minion from the master as a particular user in a login shell? essentially, i need that user's .bash_profile to be sourced before running the cmd
23:13 PeterO su -c ?
23:13 djgerm joined #salt
23:13 djgerm any suggestions on making a state file into a cmd line?
23:13 dumbfoundedsaltu interestingly, on the minion, sudo salt-call cmd.run runas=myuser 'mycmd' works
23:14 dumbfoundedsaltu but, on the master, sudo salt -G 'mygrain' cmd.run runas=myuser 'mycmd' does not
23:15 hal58th_ doesn't "user=myuser" work?
23:15 PeterO dumbfoundedsaltu: - name: su myuser -c "my command"
23:15 dumbfoundedsaltu lemme try
23:17 dfinn1 joined #salt
23:17 dumbfoundedsaltu @PeterO do i need runas?
23:17 PeterO I don't think so
23:17 PeterO that command should just do it.
23:17 dumbfoundedsaltu yeah, not working
23:18 dumbfoundedsaltu $PATH isnt updated
23:18 PeterO that user doesn't have a password does it?
23:18 dumbfoundedsaltu so i guess .bash_profile isnt sourced
23:18 llua left #salt
23:18 baweaver joined #salt
23:18 llua joined #salt
23:21 tweakism su -c doesn't do a login shell
23:21 tweakism you need su - -c
23:21 djgerm left #salt
23:21 PeterO su myuser -c should though
23:21 PeterO as that user.
23:22 tweakism no, you'd need su - myuser -c
23:22 tweakism (or su myuser -l -c)
23:22 tweakism there's probably a better way though, in the context of salt.
23:22 flowstate joined #salt
23:23 dumbfoundedsaltu the user does have a password
23:23 dumbfoundedsaltu but why does it work on the minion?
23:23 dumbfoundedsaltu and not the master
23:25 dumbfoundedsaltu on the minion, but not *from* the master
23:26 tweakism maybe salt-call lets your environment propagate down
23:26 tweakism try removing whatever it is that makes it work for your own environment, and see if sudo salt-call still works
23:30 tweakism hrm, there's a cmd.shell, but I would've expected it to have an option to run a login shell
23:31 dumbfoundedsaltu so what im seeing from master: sudo salt -G 'role:webapp' cmd.run runas=myuser mycmd
23:32 tweakism you can always specify an absolute path to mycmd, if that's enough to fix it.
23:32 tweakism and also there's env=
23:32 dumbfoundedsaltu seems like it picks up everything from that user's passwd entry (cwd and shell), but does not run a login shell, so .bash_profile is not sourced
23:32 flowstate joined #salt
23:33 dumbfoundedsaltu yeah, i know there are workarounds, but im trying to understand why salt cant do it cleanly with runas
23:33 tweakism because of what you just said
23:33 tweakism it doesn't run a login shell.
23:34 abednarik joined #salt
23:34 tweakism I don't think it runs a shell at all unless you tell it to.
23:34 tweakism (that would be the python_shell param, I think.)
23:34 mr_chris joined #salt
23:35 brianfeister joined #salt
23:37 dumbfoundedsaltu no, doesnt seem to work
23:37 tweakism it's still not a login shell.
23:39 dumbfoundedsaltu ok, i guess its a login shell, but salt doesnt honor whats in the passwd entry?
23:39 dumbfoundedsaltu cmd.run runas=myuser shell=/bin/bash mycmd works
23:40 dumbfoundedsaltu kinda confusing that cmd state uses 'user', but the cmd module uses 'runas'
23:40 dumbfoundedsaltu ok thanks tweakism for your help
23:41 tweakism from what google tells me
23:41 tweakism when you use runas= it does invoke an interactive (non-login) shell
23:41 tweakism so it should read ~/.bashrc
23:41 tweakism (.bash_profile / .profile would be for a login shell)
23:42 tweakism although you might have to also do shell=/bin/bash 'cause if it's using /bin/sh that behavior won't happen
23:43 dumbfoundedsaltu can you post the link to your findings?
23:44 tweakism it was someone's commenting on a bug, might be out of date
23:44 tweakism 1 sec
23:45 brianfeister joined #salt
23:46 tweakism actually could you just try that
23:46 tweakism run from master, with runas= and shell=
23:46 tweakism shell=/bin/bash rather
23:47 tweakism the docs say it should use the 'system default shell' but above it it shows =/bin/sh as the default, and besides there's no such thing as a system default shell, only a user's default shell.
23:47 tweakism so it probably always defaults to /bin/sh like the comment said.  I don't have time to look at the code.
23:47 ZiLi0n joined #salt
23:47 tweakism this was the comment https://github.com/saltstack/salt/issues/6785
23:47 saltstackbot [#6785]title: PATH being overwritten | Running CentOS. Salt 0.16.3. Minion and master running as root user....
23:48 tweakism anyway gotta run, good luck.
23:48 ZiLi0n Hello everyone, I am trying to learn how to use service.running -sig: .But I don't see any mention in the logs at debug level, after starting the service (with sig) the minion goes directly to execeute the next state, it does not block
23:51 akhter joined #salt
23:51 hal58th_ You don't start the service with sig, you use sig to search for the process to make sure it actually started
23:51 hal58th_ ssh_service:
23:51 hal58th_ service.running:
23:51 hal58th_ - name: ssh
23:51 hal58th_ - sig: /usr/sbin/sshd
23:52 hal58th_ damnit, wanted to paste in one line, sorry all
23:54 nZac joined #salt
23:55 dfinn joined #salt
23:55 cberndt joined #salt
23:57 dfinn joined #salt
23:58 dfinn joined #salt
23:58 dumbfoundedsaltu thanks tweakism

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