Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-03-23

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

All times shown according to UTC.

Time Nick Message
00:01 warpaint joined #salt
00:15 jerematic joined #salt
00:28 bones050_ joined #salt
00:30 edrocks joined #salt
00:46 matthew-1arlette joined #salt
00:53 __number5__ say if I have a python module required by both my custom grains and execution modules, where should I put them?
01:05 bhosmer_ joined #salt
01:09 amcorreia joined #salt
01:16 aqua^mac joined #salt
01:22 matthew-1arlette joined #salt
01:25 ALLmightySPIFF joined #salt
01:31 bigpup3 joined #salt
01:36 iggy make it an execution module and call it via __salt__['custommod.function']()
01:47 __number5__ cool, thanks iggy
01:53 TyrfingMjolnir joined #salt
02:04 jerematic joined #salt
02:08 scbunn joined #salt
02:16 _JZ_ joined #salt
02:26 donmichelangelo joined #salt
02:32 aqua^mac joined #salt
02:32 RottenApple joined #salt
02:40 bigpup3 joined #salt
02:49 aqua^mac joined #salt
02:55 zwi joined #salt
02:58 catpigger joined #salt
02:59 GabLeRoux joined #salt
03:02 favadi joined #salt
03:05 kermit joined #salt
03:16 clintberry joined #salt
03:26 JoshuaX joined #salt
03:30 yomilk joined #salt
03:34 MatthewsFace joined #salt
03:35 jerematic joined #salt
03:41 thayne joined #salt
03:41 thayne_ joined #salt
03:48 Furao joined #salt
03:50 evle joined #salt
04:04 dvestal joined #salt
04:14 _ale1_ joined #salt
04:15 bfoxwell joined #salt
04:16 dude051 joined #salt
04:29 meylor joined #salt
04:30 meylor If a Salt grain is static what would be dynamic. allowing salt to update the grain?
04:31 Furao meylor: you should look at pillars if you dynamic stuff you have some control on
04:32 meylor is there some Salt framework for updating pillars based on grains ?
04:33 meylor basically when a new server comes up and is assigned a role, the pillar then gets knowledge of that server being apart of that group
04:33 Furao you can get grains value from pillars
04:35 iggy Furao: assigned a role how?
04:37 Furao maybe i don’t understand the problem
04:37 Furao I personally assign roles from pillars only
04:37 hemebond ^^ this
04:37 hemebond for me too
04:38 meylor I'm setting roles via grains.  My scenario is a large master-slave scenario. What if you have two masters and then 10 slaves. If both masters are terminated; I want to be able to update the slaves with the location of the new masters dynamically.
04:39 meylor This might actually work with with just grains with some intelligent jinja syntax..
04:39 mikaelhm joined #salt
04:39 jeffspeff joined #salt
04:39 Furao if both masters are terminated you need to do more than change /etc/salt/minion master value
04:40 Furao keys are likely to be differents and new master will need to accept new minion key
04:41 meylor joined #salt
04:46 chandankumar joined #salt
04:47 meylor Ah. sorry, I was referring to a master/slave scenario more like cassandra (seed/nodes) not salt master/minions
04:47 meylor but I may be able to do with with simple grains..
04:50 yomilk joined #salt
04:51 Furao consider grains like a rack position, power circuit, number of cores. things that are static and get build at startup. for configuration pillars are better. if you need dynamic information accross minions. look at salt mine
04:54 __number5__ Furao, do you know why most of ext_pillar is blacklisted in masterless mode?
04:54 iggy roles are a pretty common grain... you just have to be careful that the grains can't be faked and used to access sensitive/pillar data
04:54 meylor iggy: that's a good point. i hadn't considered that
04:54 Furao __number5__: because pillars are rendered in master only. so if you’re in local mode there is no master :)
04:55 yomilk joined #salt
04:55 Furao __number5__: but i think they should work anyway.
04:56 Furao maybe you just need to have ext_pillars configuration in /etc/salt/minion
04:56 __number5__ Furao: there is pillars in masterless mode, pillar_roots still works and 'libvirt', 'virtkey' is allowed
04:56 __number5__ https://github.com/saltstack/salt/blob/develop/salt/pillar/__init__.py#L139
04:58 Furao __number5__: oh I never seen that before (and I went trough a lof ot the code) thanks
05:00 dexter91x joined #salt
05:22 felskrone joined #salt
05:22 MatthewsFace joined #salt
05:23 jerematic joined #salt
05:29 root____3 joined #salt
05:32 felskrone joined #salt
05:33 chandankumar joined #salt
05:43 yomilk joined #salt
05:49 ramteid joined #salt
06:07 andreyst joined #salt
06:07 malinoff joined #salt
06:10 sieve joined #salt
06:14 losh joined #salt
06:17 yomilk joined #salt
06:19 viq joined #salt
06:20 nexsja^ joined #salt
06:21 otter768 joined #salt
06:34 dopesong joined #salt
06:35 sunkist joined #salt
06:37 sunkist joined #salt
06:40 aqua^mac_ joined #salt
06:43 jhauser joined #salt
06:45 dopesong_ joined #salt
06:45 Garo_ Can I embed python code directly into a state .sls file? I'm searching for a replacement for the ruby_block in Chef. I know that I could write state files purely in python, but that seems quite a lot more complicated way, because I still want to be able to use normal states (like file.managed) in a same state file
06:49 babilen Garo_: You can't have literal Python blocks in jinja, the default rendering engine in salt. I know that it is a shame, but that's how it is (jinja was a bad choice)
06:50 babilen You can, however, use different template languages such as mako that support Python blocks or write your SLS file in Python directly. There are a number of different renderers available: http://docs.saltstack.com/en/latest/ref/renderers/
06:52 Garo_ babilen: thanks. That's what I figured but didn't yet have time to investigate. Just to dig more into details: Chef has this concept of first building set of actions and then executing them later. Is the only 'right' way in salt to execute code on the minion to write custom execution modules with python?
06:52 babilen One way to deal with this is to write the "extra" functionality in a custom execution module (cf. http://docs.saltstack.com/en/latest/ref/modules/#modules-are-easy-to-write) and then call that as an external jinja filter ( salt['your_module.foo']('bar', ...) )
06:53 Garo_ yeah, thanks =)
06:54 babilen I'm sorry. jinja was, IMHO, a poor choice, but we have to live with it as the default. mako with its literal Python blocks might have been better, but meh ...
06:54 scristian joined #salt
06:56 Garo_ babilen: I'm still in my very early stages of writing my states. Do you think that mako is the best option, or maybe some other? I don't like yaml because it dependes too heavily on spaces on indentation to describe the structure and hierarchy
06:57 Corey Garo_: I tend to opt in favor of doing what the rest of the community is doing.
06:58 Garo_ Corey: mee too, but yaml files as states with jinja just seem so restricting
06:58 Corey Garo_: In what sense?
06:59 Corey Garo_: I mean, the entire thing is written in Python; if whitespace is a deal breaker, "you have chosen poorly," y'know?
07:02 Garo_ Corey: take for example this pillar and state file combo: https://gist.github.com/garo/ba161d49b984c80a2d33
07:02 Garo_ Corey: it uses a pillar to define a set of services and it then reads that and "executes" a set of state files for each service instance
07:02 Corey Garo_: Do you prefer I be polite, or honest? :-)
07:02 Garo_ Corey: honest
07:03 Garo_ Corey: I presume that it's mostly the jinja restrictions but trying to iterate the pillar structure and call individual macros seems overly hard
07:03 Corey {% from 'services/postgresql/init.sls' import postgresql_service %} <-- I've seen this shit before when it was in Puppet, and called inheritence.
07:03 krelo joined #salt
07:03 Corey You never know where a variable is being set, and it crops up into nonsense when you least expect it.
07:03 vstoniest joined #salt
07:04 Garo_ Corey: yep. I really hope there's better way to implement this kind of feature with salt as I really don't like the way I have written that =)
07:04 Corey We're another 6-18 months from Salt realizing this is crap, and deprecating it, but down that path lies madness.
07:04 Garo_ so I just hope that I've picked up a wrong way to implement this kind of feature set and that there's a much better way to do this =)
07:05 Corey It distills down into "how do we best separate data from code."
07:06 Garo_ :)
07:06 Corey Hang on, checking Github.
07:07 Corey https://github.com/saltstack/salt/issues/19332 speaks to this, in a tangential sense.
07:07 Corey ...but I'm not sure it fixes the root cause.
07:07 Garo_ let me explain my back story a bit: I'we been using Chef for the past two years in chef-solo mode and I'm pretty happy with the setup I have. There's few issues why I'm trying to port my infrastructure to salt-stack: 1) I've been merged with another team who already uses salt 2) the salt pillar system seems a nice way to separate credentials and other secret stuff and keep them better safe than what chef-solo allows and 3) ...
07:08 Garo_ ... salt remote execution / messaging is a clear victory over what chef-solo has
07:09 Garo_ Corey: thanks, I'll dig into that issue
07:11 Garo_ Corey: and about the whitespace issue: I have no problems with python using whitespaces, but I just prefer json over yaml any day :)
07:11 MatthewsFace joined #salt
07:11 hemebond Garo_: I think you can use JSON for Pillars and states.
07:12 hemebond And there are several templating modules available.
07:12 jerematic joined #salt
07:19 AndreasLutro joined #salt
07:25 bluenemo joined #salt
07:33 Furao joined #salt
07:34 ttrumm joined #salt
07:34 I3olle joined #salt
07:40 flyboy joined #salt
07:40 KermitTheFragger joined #salt
07:42 chandankumar joined #salt
07:44 AndreasLutro joined #salt
07:49 favadi joined #salt
07:52 dopesong joined #salt
08:00 Auroch joined #salt
08:02 andreyst joined #salt
08:03 dopesong_ joined #salt
08:05 intellix joined #salt
08:09 vstoniest joined #salt
08:09 AviMarcus joined #salt
08:10 pduersteler joined #salt
08:11 eseyman joined #salt
08:14 shanrei joined #salt
08:15 shanrei left #salt
08:22 otter768 joined #salt
08:25 seshan joined #salt
08:25 wincyj joined #salt
08:25 seshan when we say salt -t 60, a command waits for 60 seconds for return
08:26 __gotcha joined #salt
08:26 seshan but what if I want to wait it how much ever time, but until the minion returns an output
08:26 hemebond seshan: You want to wait forever?
08:27 seshan ya, like till all the minions return the data
08:27 hemebond Regardless of what you put after -t it should return as soon as the minion has finished.
08:27 seshan ya
08:27 hemebond So even if you tell it -t 300 it won't wait 5 minutes if it finishes in 1 minute.
08:27 hemebond As far as I know.
08:29 seshan we are basically running various tests, and some may fail and some go through, these are data storage box tests, so we want the master to wait till all minions return output
08:29 seshan it may sometimes be 500 or sometimes 6000000
08:29 hemebond hmm
08:29 dopesong joined #salt
08:29 hemebond They should still return, regardless of how long the master waits.
08:30 hemebond Why do you want to wait so long?
08:30 seshan Yep,
08:30 hemebond Could you perhaps use a different returner?
08:30 hemebond e.g., instead of the master waiting, just tell the minions to send their result to another location like a database.
08:30 babilen seshan: You shouldn't base your logic on the time the standard returner returns
08:35 SpX joined #salt
08:36 seshan returners, never had explored
08:36 seshan Looking it it
08:37 seshan babilen: yes correct, that is exactly why I was sure that  might not be the correct way to do it
08:37 seshan it is easy for us to create a database,
08:37 pduersteler hi all. I just updated salt-master (deb) and python but somehow I now get an error when salt tries to render pillar data. (ValueError, unknown locale). Apparently, getdefaultlocale() does not return a locale. Any hint? googling so far didn't helped me
08:39 pduersteler nevermind, explicitly setting the locale and reinstalling updated packages helped, apparently something was screwed
08:45 babilen seshan: You could also include a cmd.run with "order: last" to kick of the "next thing" or use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.event.html#salt.states.event.send to fire an event to which you react on the master (cf. http://docs.saltstack.com/en/latest/topics/reactor/)
08:45 babilen seshan: I would probably use the latter and either use "order: last" or, even better, require the state that is actually needed before you start "the next thing"
08:46 babilen (just throwing out ideas)
08:47 __gotcha joined #salt
08:48 pduersteler Err.. I thought filesystem_backends gives the order they're searched? I've put rootfs before git, however, overriding pillar data locally for testing purposes does not work, it only works for states... what am I doing wrong?
08:51 Hybrid joined #salt
08:53 pduersteler i can even remove the gitfs backend and remove the cache folder and it still shows wrong pillar data..
08:56 lietu joined #salt
08:59 Grokzen joined #salt
09:00 MatthewsFace joined #salt
09:00 ckao joined #salt
09:01 engblom joined #salt
09:01 jerematic joined #salt
09:01 refnode joined #salt
09:01 engblom file.recurse seem to not preserve permissions. What would be the best way to copy a whole directory inclusive permissions?
09:03 iromli joined #salt
09:04 dkrae joined #salt
09:05 lb1a joined #salt
09:06 sieve joined #salt
09:12 aparsons joined #salt
09:13 stokbaek joined #salt
09:14 stokbaek anyone else having issues where augeas says it will make changes to apache2 security file on a test=true but once you set test to false wont it make the changes?
09:22 bluenemo joined #salt
09:22 bluenemo joined #salt
09:28 xintron joined #salt
09:35 xintron joined #salt
09:35 kbyrne joined #salt
09:37 paulm- joined #salt
09:39 N-Mi_ joined #salt
09:40 dRiN joined #salt
09:40 \ask joined #salt
09:43 larsam joined #salt
09:44 arnoldB joined #salt
09:45 bhosmer joined #salt
09:46 jrluis joined #salt
09:48 I3olle joined #salt
09:51 esogas_ joined #salt
09:54 lietu joined #salt
09:56 Xevian joined #salt
10:00 engblom left #salt
10:01 mbrgm joined #salt
10:01 mbrgm hi! where can I get an overview of all available mine_functions?
10:03 ]V[ joined #salt
10:06 peters-tx joined #salt
10:08 fredvd joined #salt
10:11 dopesong joined #salt
10:13 \ask joined #salt
10:13 aquassaut joined #salt
10:13 johtso joined #salt
10:19 Garo_ Can I create directory hierarchy under /salt/_modules/ ? I've tried to create _modules/foo/bar.py and call it "salt '*' foo.bar' but it doesn't even load
10:23 otter768 joined #salt
10:23 seshan Garo_: did you do, salt '*' saltutil.sync_all
10:23 seshan or atleast salt '*' state.highstate
10:23 stokbaek joined #salt
10:23 dopesong_ joined #salt
10:24 Garo_ seshan: yes I did. I also tried to create /salt/_modules/foo/__init__.py and I can see that it's loaded (can see debug logging I wrote inside), but /salt/_modules/foo/bar.py wont load
10:25 seshan Garo_:  Did you also enable file_roots in master config ??
10:25 dopesong joined #salt
10:26 Garo_ seshan: yes. I have file_roots:\n  base:\n  - /vagrant/salt (under which _modules/ can be found)
10:27 seshan Garo_: exactly like this http://docs.saltstack.com/en/latest/ref/configuration/master.html#roots-master-s-local-file-server
10:29 Garo_ seshan: yes. my minion logs shows this error on saltutil.sync_all:
10:29 Garo_ [DEBUG   ] Failed to import module foo, this is most likely NOT a problem:
10:29 Garo_ File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 921, in load_modules
10:29 codehotter joined #salt
10:30 seshan just to try, can you move the foo.py to _modules and then try once
10:31 seshan your bar.py
10:33 Garo_ seshan: yes, that works if I have __virtualname__ = "bar" and def __virtual__(): return __virtualname__
10:33 Garo_ seshan: but for some reason it doesn't work if I don't have the virtual stuff set.
10:34 Garo_ never mind, it also works without the virtual stuff just fine when the bar.py is directly under _modules/
10:36 Garo_ I can live without the subdirectories if they just don't work for some reason
10:36 seshan Garo_: If i am not wrong, the design of salt is that bar.py has to be under modules
10:36 seshan so that it will pick up bar.foo
10:36 Garo_ ok. I know that I can use virtual stuff to name my module like it would be under a subdirectory: __virtualname__ = "foo.bar"
10:39 Garo_ seshan: thanks for your help =)
10:39 seshan Garo_: :)
10:40 stokbaek Anyone got some understanding on the augeas module here? :(
10:45 dopesong_ joined #salt
10:49 wnkz joined #salt
10:49 MatthewsFace joined #salt
10:50 jerematic joined #salt
10:53 sieve joined #salt
10:53 yomilk joined #salt
11:00 istram joined #salt
11:04 amcorreia joined #salt
11:05 bhosmer joined #salt
11:08 Hell_Fire_ joined #salt
11:24 \ask joined #salt
11:31 bluenemo just upgraded salt and the output for jinja errors in highstates now seems more verbose. *like* :)
11:43 bhosmer_ joined #salt
11:50 evle joined #salt
11:50 jerematic joined #salt
11:51 Furao joined #salt
11:51 __gotcha Is there a way to debug how environments are build by salt master ?
11:52 __gotcha IOW can I query the master to get a list of environments and of their settings ?
11:54 chandy joined #salt
11:55 cheus joined #salt
11:55 __gotcha I want to check that what I think I have setup is actually setup
11:59 __number5__ __gotcha: one way is go to minion and run salt-call -l debug state.highstate
11:59 __number5__ or just check the log at /var/log/salt/minion
12:00 __gotcha __number5__: /var/log/salt/minion on master or on minion ?
12:03 ]V[ joined #salt
12:04 __gotcha __number5__: thanks, running salt-call showed what I was suspecting: that my environments are not taken in account
12:04 AirOnSkin joined #salt
12:04 __gotcha any issue I should know to explain that the branches from my gitfs repo are not setup as environments ?
12:12 teskew joined #salt
12:17 leszq joined #salt
12:20 denys joined #salt
12:23 otter768 joined #salt
12:25 vstoniest joined #salt
12:25 mbrgm can I make a specific state a prerequisite for every other state?
12:25 mbrgm without explicitly referring to that or the other states?
12:27 cmcmacken joined #salt
12:31 dopesong joined #salt
12:32 mbrgm what I want to do is set a grain and in the same run match on that grain for other states
12:34 redzaku joined #salt
12:37 MatthewsFace joined #salt
12:37 paulm- joined #salt
12:38 rome_390 joined #salt
12:51 fredvd joined #salt
12:53 numkem joined #salt
12:54 __gotcha joined #salt
12:55 teskew joined #salt
12:59 CeBe joined #salt
12:59 chandankumar joined #salt
13:00 babilen *shudder*
13:02 tkharju joined #salt
13:03 chandankumar_ joined #salt
13:03 mbrgm I'm trying to achieve a role-based configuration, but I already found out that it's better to set the roles in pillars and then match against the pillar.
13:08 ndrei joined #salt
13:08 lictor36 joined #salt
13:08 Tecnico1931 joined #salt
13:08 Ahrotahntee mbrgm: I use a grains approach using grains.list_present
13:09 Ahrotahntee so you assign a state like salt 'target' state.sls nginx.load-balancer, and then it auto-assigns the role, and uses the top file to keep that state up to date on that machine
13:09 Ahrotahntee (via highstate)
13:10 __gotcha what is the way to run wheel modules ?
13:11 paulm- joined #salt
13:13 primechuck joined #salt
13:14 babilen __gotcha: Which module?
13:16 teskew joined #salt
13:18 debian112 joined #salt
13:21 Deevolution joined #salt
13:21 N-Mi_ joined #salt
13:25 cpowell joined #salt
13:27 sunkist joined #salt
13:28 bhosmer_ joined #salt
13:31 cuibonobo joined #salt
13:32 timoguin joined #salt
13:33 mpanetta joined #salt
13:34 bhosmer_ joined #salt
13:35 cpowell joined #salt
13:35 sieve joined #salt
13:36 renoirb joined #salt
13:36 cheus joined #salt
13:36 jdesilet joined #salt
13:42 __gotcha joined #salt
13:45 agend joined #salt
13:46 mbrgm Ahrotahntee: the problem with using grains was that I want to define a serialnumber-grain based definition for machines. i.e. I define the hostname, roles, etc., depending on the serial number of the machine. what I did before was assign a grain based on the roles from pillar, but then the matching could also be done on a second run _after_ setting the grains. now I match directly agains the pillar, which
13:46 mbrgm allows my state to converge in the first run.
13:47 mbrgm so the chain is G@serialnumber -> apply a specific pillar, which contains the roles, hostname etc. -> match against that pillar's roles etc.
13:47 mbrgm much easier now.
13:47 mbrgm before I had G@serialnumber -> apply pillar -> apply a state setting grains, which mirror the roles from the pillar -> match against the grains
13:48 mbrgm that was overly complicated.
13:49 jerematic joined #salt
13:50 cuibonobo left #salt
13:51 badon_ joined #salt
13:53 JoshuaX joined #salt
13:55 StDiluted joined #salt
13:57 timoguin joined #salt
13:59 babilen mbrgm: Yeah, that sounds overly complication for no obvious reason. Glad you got that sorted!
14:01 andrew_v joined #salt
14:03 chandankumar_ joined #salt
14:09 sieve joined #salt
14:10 MrMarv joined #salt
14:10 MrMarv hi guys
14:13 bluenemo joined #salt
14:13 bluenemo joined #salt
14:14 MrMarv can anyone confirm that compound targeting does work in 2014.7.2? I can correctly target with "salt -G 'os:Ubuntu' test.ping" but with any form of "salt -C 'G@os:Ubuntu' test.ping" it does not target a single minion...
14:15 MrMarv btw. "salt -C '*' test.ping" works as expected. So its more a compound with grains thing
14:15 timoguin_ joined #salt
14:19 _JZ_ joined #salt
14:23 kaptk2 joined #salt
14:24 otter768 joined #salt
14:25 catpig joined #salt
14:26 babilen MrMarv: Works fine here with "salt -C 'G@os:Debian' grains.get os"
14:26 MatthewsFace joined #salt
14:29 rypeck joined #salt
14:29 mbrgm there's a strange thing happening when setting the hostname on debian... salt restarts the network using `systemctl stop` and `systemctl start` networking.service, but this leaves the service in a active(exited) state instead of the desired active(running) state. and the host does not try to get a dhcp lease in that state. does anyone know how to fix that?
14:30 aberdine joined #salt
14:30 aberdine Hi - whats the difference between modules and states? Are module just for remote execute and state via .sls files?
14:30 bhosmer joined #salt
14:30 ndrei joined #salt
14:31 MrMarv babilen: thanks for checking. Thats strange. Any idea on how to debug this?
14:33 debian112 joined #salt
14:35 paulm- joined #salt
14:35 mbrgm aberdine: modules execute, states define a state. this means if the system does not have the declared state, modules are executed to put it into that state.
14:35 numkem joined #salt
14:36 aberdine ah, ok. So what's the syntax to go from state to module?
14:36 aberdine e.g. I can see a dnsmasq module
14:36 aberdine I can't see a counterpart state
14:39 mbrgm aberdine: not all modules have a state counterpart.
14:40 aberdine ah, ok. and if they don't it means that they can't be used in states unless someone writes the state code?
14:40 aberdine in the form of Python?
14:41 conan_the_destro joined #salt
14:41 mbrgm aberdine: iirc you can run a command as part of a state, but I don't remember how to do that. maybe have a look at the docs.
14:42 aberdine Yeah, I'm trying that - there are a lot of docs though :)
14:42 aberdine thanks for the pointers mbrgm . I'll carry on playing around
14:44 ALLmightySPIFF joined #salt
14:45 mbrgm can anyone tell me how the mine_functions work? is there a list of functions I can use in some place?
14:47 ALLmightySPIFF joined #salt
14:47 timoguin joined #salt
14:47 plameniv joined #salt
14:48 ipmb joined #salt
14:48 fogrito joined #salt
14:50 mordonez joined #salt
14:51 plameniv Hi, I am trying to set up 2 master VMs, each master has its own master_sign_key_name. The question is: how do I tell the minion which key belongs to which master?
14:53 timoguin joined #salt
14:55 APLU joined #salt
14:57 thedodd joined #salt
14:59 paulm-- joined #salt
15:03 smcquay joined #salt
15:03 scbunn joined #salt
15:03 paulm- joined #salt
15:08 ekristen joined #salt
15:09 pdayton joined #salt
15:13 clintberry joined #salt
15:15 mikaelhm joined #salt
15:18 mikaelhm joined #salt
15:18 speedlight hi ppl I accepted a minion key in the master, its work one time but in the minion log Im getting that "the master has cached the public key for this node.." every 10 secs.
15:19 speedlight and stop working
15:21 theologian joined #salt
15:23 StDiluted joined #salt
15:24 hobakill speedlight, have you run  in debug mode on the minion?
15:25 rgarcia_ joined #salt
15:25 vstoniest joined #salt
15:27 speedlight the connection is stablished right, and then just the error every 10secs..
15:27 jalbretsen joined #salt
15:27 speedlight one thing I 've read is the time of the master and minion
15:28 bhosmer joined #salt
15:28 speedlight is that right? the minion is in other utc, i cnat change the time :D
15:28 meylor joined #salt
15:28 speedlight cant*
15:30 neogenix joined #salt
15:35 speedlight I delete de key and readed but still the same..
15:36 eagles0513875_ joined #salt
15:37 evle Is there a way to give salt-ssh existing key? If I do "--priv=~/.ssh/id_rsa" it tries to overwrite it.
15:38 sastorsl Regarding SALT and YAML: Is "base:\n- listitem1\n- listitem2" the same as "base:\n  - listitem1\n  - listitem2" ?
15:38 JoshuaX joined #salt
15:39 chandy joined #salt
15:39 sastorsl Or "base:\n  level:\n  - item1\n  - item2" vs "base:\n  level:\n    - item1\n    - item2"
15:48 babilen sastorsl: http://refheap.com might come in handy
15:52 rudi_s Hi. I'm using "schedule" in my pillars to run salt automatically every hour (schedule: highstate: function: state.highstate seconds: 3600 splay: 1800 maxrunning: 1). However it looks like no salt run is actually happening. Any idea how I can debug this?
15:53 sastorsl https://www.refheap.com/c87ee677a8e1ddf4168381e0d
15:54 chandankumar joined #salt
15:54 eriko joined #salt
15:55 Brew joined #salt
15:55 toanju joined #salt
15:59 sieve joined #salt
16:00 meylor joined #salt
16:00 CryptoMer joined #salt
16:01 mgw joined #salt
16:02 pipps joined #salt
16:04 speedlight I stop the minion, rm the keys and clear the id, start the minion, the out show that is waiting to the master to acept the key.. I accept the minion key, the out in the minion show that is accepted and is ready to receive requets..
16:04 speedlight I do salt '*' test.ping.. nothing happend..
16:05 speedlight the output in the minion stop in Loaded minion key: /etc/salt/pki/minion/minion.pem
16:05 pipps joined #salt
16:05 speedlight now is not showing that the master cached the key.. but still do nothing :(
16:05 speedlight more ways to debug this?
16:07 scoates joined #salt
16:09 ek6 joined #salt
16:09 chandankumar joined #salt
16:10 huddy joined #salt
16:13 cpowell joined #salt
16:14 Ahlee put both master and minion into debug mode (or even trace) and try again
16:14 Ahlee unfettered access between the two on 4505/4506?
16:16 iggy sastorsl: 1: invalid 2: invalid 3: valid 4: invalid 5: valid 6: invalid  http://yaml-online-parser.appspot.com/
16:18 Brew speedlight:  ive always found salt-call from the minion itself to be helpful in starting the troubleshooting process.  good way to ensure you can talk to the master
16:18 speedlight Ahlee: im puting salt in a client machine to start all this of provision/deploy.. hv like 100 clients
16:19 hobakill speedlight, agreed with Brew
16:19 speedlight i'll have a lot of work with ports and firewall things XD
16:19 speedlight wonder why works one time and stop worikng..
16:20 hobakill speedlight, running the minion in debug should help you see what's barfing
16:20 speedlight Brew: sorry for be so noob, how i salt-call fro mthe minion?
16:20 speedlight from*
16:21 speedlight yes is started in debug.. the minion was waiting to the master for accept its key, when accepted said that is ready to receive requets and no more in the output
16:22 aparsons joined #salt
16:22 hobakill speedlight, salt-call state.highstate test=True
16:22 Brew speedlight:  ^^^
16:22 hobakill or you can remove the test=True
16:22 Brew or add -l debug to get more output
16:22 Brew salt-call -l debug state.highstate
16:23 Brew or any of the three :)
16:23 MatthewsFace joined #salt
16:23 speedlight haha tnkz, this n the minion side right?
16:24 OnTheRock joined #salt
16:25 otter768 joined #salt
16:29 mikaelhm joined #salt
16:29 TyrfingMjolnir joined #salt
16:31 ndrei joined #salt
16:31 aparsons joined #salt
16:32 KyleG joined #salt
16:32 KyleG joined #salt
16:33 nesv joined #salt
16:34 hobakill speedlight, yes
16:35 chandankumar joined #salt
16:37 chandankumar joined #salt
16:38 jerematic joined #salt
16:38 Ahlee hrm.  Looks like salt's caching output rather than re-running a salt['cmd.run']('ls /home/') in a state
16:42 speedlight meanwhile i can test in the client again.. how i can install and remove list of pkgs in the same sls?
16:42 rojem joined #salt
16:43 speedlight i googling but cant find an actual example of doit haha
16:44 malinoff joined #salt
16:44 hobakill speedlight, http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
16:46 spookah joined #salt
16:47 JoeJulian Any clue why this causes a file to change twice? http://fpaste.org/201570/14271292/
16:48 JoeJulian It puts in a blank line, then replaces it all in the same state.
16:48 JoeJulian Not the timestamps in that paste.
16:48 JoeJulian s/Not/Note/
16:50 Even_Me joined #salt
16:51 enarciso joined #salt
16:53 thayne joined #salt
16:54 iggy that state stanza doesn't match the log messages you pasted
16:54 iggy Running state [/opt/io/boot/node/00:50:56:28:22:d3/overlay/etc/hosts]
16:54 speedlight hobakill: yes thnkz im reading all that but cant understand how do something like this:
16:54 speedlight http://pastebin.com/KQ7FyQDJ
16:55 iggy should be: Running state [{{ node }}-overlay-hosts]
16:55 iggy (with {{ node }} expanded of course
16:55 JoeJulian It does that for every file.managed, using the name instead.
16:55 speedlight well pastebin move the spaces O.o
16:55 iggy speedlight: your indentation is all jacked up
16:56 JoeJulian In fact, I think it does that for everything with a "name" defined.
16:56 thayne_ joined #salt
16:56 speedlight I dont hv like that.. i salect Yaml for coding the paste..
16:56 speedlight select*
16:56 iggy don't use pastebin.com
16:56 iggy simple solution
16:56 speedlight :(
16:56 speedlight haha
16:56 iggy it sucks for that and many other reasons
16:57 lietu joined #salt
16:57 hobakill use hastebin
16:57 JoeJulian +1
16:57 iggy refheap, gist, just about anything other than that ad bloated pos
16:57 hobakill HAHAH! iggy
16:58 hobakill i need to bring hobaPaste back to life.
16:59 speedlight http://hastebin.com/zecomukaqe.sm
17:00 iggy that indentation still looks wrong
17:00 speedlight haha
17:00 speedlight but i a cut the removed part its work..
17:01 dalexander joined #salt
17:01 speedlight i follow the docs, donno where the indentation is wrong :(
17:01 hobakill speedlight, i think the syntax is wrong anyway... use this for an example: http://hastebin.com/ecasexanoj.sm
17:02 hobakill just swap out installed for latest
17:02 iggy aside from using latest (which will do a pkg metadata update every time), that is much cleaner
17:03 hobakill right iggy i just copy/pasted from the docs to give him a quick example. :)
17:03 Eureka_ Anyone have a working tomcat deploy using the manager to deploy .war files? I am having an issue where i keep getting state tomcat.war_deployed found in SLS is unavailable.
17:04 hobakill speedlight, and then do a pkg.removed and follow similar syntax
17:04 iggy Eureka_: that usually means you are missing a binary or python module of some sort
17:05 hobakill speedlight, something like this: http://hastebin.com/ducuyagico.sm
17:05 Eureka_ @iggy that makes sense. Ill see if I can dig it up. I did have this working at one point. I must have just not written up my fix for it before.
17:06 hobakill speedlight, obviously swap out your own packages.
17:06 iggy Eureka_: from the code, it looks like it's looking for /usr/share/tomcat/*/bin or /opt/tomcat/*/bin
17:07 Eureka_ @iggy. That makes sense. thank you =)
17:08 amcorreia joined #salt
17:09 andabata joined #salt
17:09 ajw0100 joined #salt
17:09 Eureka_ @iggy looks like that changed my error. Ill make a note to build a symlink in /opt to make sure the path /opt/tomcat/*/bin exists.
17:09 Heartsbane joined #salt
17:09 Heartsbane joined #salt
17:09 sieve joined #salt
17:10 iggy Eureka_: it also looks like it tries to authenticate against "dummy" (not too familiar with tomcat, so maybe you know what that means)
17:10 speedlight well just pkg.installed works... if I put the pkg.removed part I get:
17:10 speedlight ID 'pacdeps' in SLS 'pacclient' contains multiple state declarations of the same type
17:10 Eureka_ Ah, thats interesting. Ill have to look into that. I know it should be attempting to authenticate using data from the grains so maybe something has changed latley.
17:10 iggy speedlight: you can't have 2 pkg's in the same ide
17:11 Ahlee You can't combine pkg.installed and pkg.removed in the same declaration
17:11 Ahlee It's annoying, but it's a quirk in the system
17:11 hobakill Ahlee, didn't know that. well - two states then.
17:11 meylor I've got a colon ":" in a map.jinja file that is being passed in to a vile via file.managed with - contex: . Is there a simple way to escape the colon?
17:11 hobakill sorry speedlight for leading you astray a bit.
17:11 iggy it's mentioned in the docs in a few places
17:12 speedlight so two sls files is the way?
17:12 rgarcia_ joined #salt
17:12 speedlight one for removed pkgs and one for installed?
17:13 iggy speedlight: not 2 files, to stanzas
17:13 speedlight to noob for get that XD
17:14 seshan joined #salt
17:14 speedlight please explain a litle more :)
17:14 iggy so so like remove-old-shit:\n  pkg.removed ... install-new-hotness:\n  pkg.installed
17:14 speedlight oh
17:15 MatthewsFace joined #salt
17:15 Ahlee doh.  I think all my salt['cmd.run'] get run at start of run, so since i'm manipulating the results i'm going to have 'old' data
17:16 speedlight thnkz iggy ! sometimes the most simple solutions try tu run from us XD
17:16 iggy Ahlee: does reload_modules: True on the states where you change things not cause them to rerun?
17:16 Ahlee trying to iterate over /home and remove directories that fail an id {{ username }}, but if they do still exist file.managed some fils in
17:16 Ahlee iggy: hrm.  Let me give that a try
17:17 Ahlee nope
17:18 wincyj joined #salt
17:20 dude051 joined #salt
17:22 iggy sounds like a 0.17.x bug
17:22 * iggy runs
17:22 speedlight haha
17:22 hobakill chortle
17:22 hal58th_ Ooo, your SaltConf video is up Ahlee.
17:22 malinoff iggy, 0.16.x user here
17:22 hobakill daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaang link that hal58th_
17:22 speedlight back to the minion/master comunication.. the salt-call highstate from the minion works
17:22 hal58th_ https://www.youtube.com/watch?v=Bs_NPEa95mY
17:22 hobakill thx
17:23 speedlight but no a test.ping from the master
17:23 hal58th_ There is a few saltconf15 videos just uploaded. All case studies
17:23 Ahlee oh god
17:24 iggy malinoff: I'm sorty
17:24 iggy *sorry
17:24 Grokzen joined #salt
17:25 hal58th_ the video is pretty nice except the audio is low. Nice to see the slides up front like that
17:25 druonysus joined #salt
17:25 druonysus joined #salt
17:25 Ahlee link? i'm not seeing it
17:25 Ahlee pm, please
17:25 hal58th_ up there, but there you go  https://www.youtube.com/watch?v=Bs_NPEa95mY
17:25 hobakill https://www.youtube.com/watch?v=Bs_NPEa95mY
17:26 Ahlee ah
17:26 Ahlee oh, you linked it
17:26 Ahlee so many uh's
17:27 hobakill way better than 99% of my presentations. well done man!
17:27 hal58th_ Heh, you never realize how many uhms you say until you watch yourself
17:27 spookah Ahlee: it's not bad at all
17:27 gladiatr joined #salt
17:27 dalexander joined #salt
17:30 * speedlight gonna learn a lot with the video o/
17:30 sieve joined #salt
17:32 ajw0100 joined #salt
17:37 mikaelhm joined #salt
17:38 hal58th joined #salt
17:38 hobakill "RPMs can be a terrible experience...." -- Ahlee .... fantastic.
17:38 redzaku joined #salt
17:38 Ahlee I'm proud to be on record with that.
17:39 dude051 joined #salt
17:40 conan_the_destro joined #salt
17:40 amcorreia joined #salt
17:40 hobakill Ahlee, this was my 'up next' video: What Happens If You Shoot an iPhone 6?
17:41 hobakill https://www.youtube.com/watch?v=QR9_T00xmik
17:41 spookah "Being clever will come back to haunt you"
17:41 Ahlee I wish I could talk about the reason that line exists in the slide deck.
17:41 Ahlee such spectacular failures
17:42 ndrei joined #salt
17:44 ek6 spookah: how often in your work experience has clever NOT been a pejorative ? for me the answer is rarely
17:44 chandy joined #salt
17:47 itru joined #salt
17:47 Twiglet anyone kvae any idea why salt would besay an external pillar (https) is unavailable then serve up the pillar data?
17:48 FeatherKing joined #salt
17:48 enarciso joined #salt
17:49 FeatherKing does anyone know where the code lives for the salt -L command line switch?
17:49 FeatherKing i submitted a bug earlier but i wanted to see if it broke going from 2014.1 to 2014.7
17:49 spookah ek6: almost always but i've never heard it put that blunty.  it would be a good topic for another video
17:50 itru when I’m including one state into another, can I somehow pass a variable to the state?
17:50 seanz joined #salt
17:51 itru so I can use one state (which creates a file for example) several times with different states, like a function
17:51 amcorreia_ joined #salt
17:52 meylor to answer my own question: when using map.jinja and trying to pass in a nested dict to file.magaged (context: ) you can escape a special character, in my case a ":" with {{key}}={{ dict[key]|replace("___colon___", ":") }} and it will get you what you need. In my case map.jinja, I've set all colons ":" as ___colon___. otherwise I get a yaml render error
17:52 jodv joined #salt
17:53 markm joined #salt
17:54 iggy itru: there are extends and jinja macros
17:54 meylor iggy: thanks. i'll take a look at those next time
17:54 yannisc_ joined #salt
17:55 iggy that was meant for someone else
17:56 SheetiS meylor: you could also do context: {{ dict|json }} and save yourself a lot of trouble.
17:56 edrocks joined #salt
17:56 itru iggy, thanks, reading about extend
18:00 gchao joined #salt
18:01 itru iggy: can’t think out how I can implement “extend”… so I have a small state file, which expects “files” list and iterates over this list… so I want to call this state, passing it a single variable “files”
18:02 itru iteratiling like {% for file in files -%}
18:03 theologian joined #salt
18:04 iggy then you probably want jinja macro's
18:07 Bren joined #salt
18:10 yannisc_ I am new to using saltstack. Doing a POC where I have the following topology:
18:10 yannisc_ dcMaster1- has master & minion with master=localhost. podMaster1 has master, syndic with master=dcMaster1 and minion with master=localhost. leaf1 has minion with master=podMaster1 and leaf1 has minion with master=podMaster1.
18:11 yannisc_ When I do tests using salt "*" test.ping podMaster1 sees the nodes I expect podMaster1, leaf1, leaf2) but Node1 is missing leaf1 (it sees dcMaster1, podMaster1, leaf2).
18:11 yannisc_ Additionally, when I try using salt "leaf*", I get nothing from dcMaster1.
18:11 yannisc_ Can anyone provide insites on these 2 issues?
18:12 jtanner joined #salt
18:13 Bren_ joined #salt
18:14 _JZ_ joined #salt
18:14 toastedpenguin joined #salt
18:14 iggy most people new to salt don't jump into a master-multisyndic (I've been using it for 2 years and haven't needed anything like that)
18:15 yannisc_ well, we are looking at a_LARGE_ deployment, and it is inherently hierarchical
18:18 nickdew joined #salt
18:21 aravind joined #salt
18:22 iggy >1000 minions?
18:22 aravind hi, short of writing python code to import stuff.. is there a pillar or grain that gives you the current system time?  I want run some stuff based on the current system timestamp (seconds since epoch).
18:22 Guest70869 joined #salt
18:22 iggy aravind: since epoch or startup?
18:23 aravind since epoch
18:23 justyns does anyone else have issues with salt-master being white-space sensistive with minion public keys?   Like with an extra newline or space at the end of the file
18:23 aravind iggy: basically the value of date '+%s'
18:26 aravind I didn't find an easy way to get it from Jinja either.
18:26 iggy I had something for uptime, but not since epoch
18:26 otter768 joined #salt
18:27 iggy jinja's motto is "make logic decisions elsewhere and pass that through to jinja"
18:28 aravind yeah.. it looks like I will have to write python for this.
18:28 iggy which is great for django/flask/etc apps that actually have a python backend to make those decisions
18:28 iggy kind of falls apart when jinja is the only thing you have
18:28 aravind this feels like it should be available as a grain.
18:29 iggy nope
18:29 iggy grains are stuff that shouldn't change very often (# cpus, amount of mem, etc.)
18:29 aravind yup yup.. I know it isn't, just feels like it should be :-)
18:29 thedodd joined #salt
18:29 iggy you could probably write a custom grain to do it, but if you turn on grain caching, it falls apart
18:30 aravind yeah, I will get it from python and stick it in a pillar.
18:31 iggy that's still not going to be "up to the second" as pillars get rendered on the master and then cached on the minion
18:31 iggy whether that's "close enough" is obviously something you'll have to answer
18:32 aravind yup, it's close enough.. just something that's accurate to when state.highstate is called.
18:36 rgarcia_ joined #salt
18:36 yannisc_ yes, > 1000 minions in a DC. The concept of a "pod" holds some 10 nodes, there could by 100 - 500 pods
18:37 basepi iggy: had a conversation about _schedule.conf this morning. Short fix is to make the `clean` configurable via pillar. Longer answer is to add functionality to file.recurse to ignore certain files for the clean. In this case, any file with a leading underscore, which we assume will be managed by salt. We can't put _schedule.conf in the cache because it needs
18:37 basepi to persist.
18:38 iggy yannisc_: well, since you are PoCing this
18:38 iggy basepi: lol, whoever made a bunch of changes to salt-formula recently named the default config file it lays down _default.conf... I always thought that was silly... and now we know why
18:39 * basepi facepalms
18:39 iggy basepi: thanks, I'll work on fixing formulas... can someone there document that
18:39 basepi Well, maybe we'll just ignore _schedule.conf itself, rather than all _files
18:39 * basepi shrugs
18:39 basepi Though if we're managing it I guess it doesn't matter
18:40 basepi Anyway, I'll create that documentation issue.
18:40 Karlthane joined #salt
18:40 iggy yeah, I have to look at the actual states to see if that would be that big of a problem
18:40 iggy I suspect it will be, but we can always rename the file and tell the person who made that change in the first place to not do that anymore
18:41 basepi https://github.com/saltstack/salt/issues/21903
18:41 basepi Sure
18:41 iggy danke
18:42 KyleG bittew
18:42 KyleG -wq
18:42 KyleG -w*
18:42 arnoldB :)
18:44 speedlight still cant understand why salt-call works in minion but a test.ping in master dont..
18:44 * iggy votes firewall
18:44 speedlight ports are open in master, nmap or nc in minion show both are open in master
18:45 chandy joined #salt
18:45 iggy but the way you describe it, it's like it works to open the connection, but then times out
18:49 speedlight so i have to try with the times in the master config?
18:49 arnoldB sometimes I write long comments explaining problems that don't exist. sometimes I should ask myself "what crap are you writing here?"
18:49 teskew joined #salt
18:52 Bren joined #salt
18:53 jonher937 joined #salt
18:54 Bren Hey folks, I have a list of users I need to create on my linux servers that need to have a UID/GID that are in the 2000-2999 range. Is there a simple way to do this or will I need to incorporate some special juju to make it happen?
18:55 krelo joined #salt
18:55 arnoldB Bren: I'd create a custom execution module function that determines a free UID/GID for a given range
18:56 Bren Thanks arnoldB, I'll dig into that!
18:56 arnoldB Bren: you could assign the output of the function directly to your users.managed state (or similar)
18:57 Bren arnoldB: thank you, I couldn't immediately find something in the docs on this, your suggestions will give me something to work off of
18:59 iggy make a state that sets UID_MIN and GID_MIN, then your create user states, then set the UID_MIN/GID_MIN back to the defaults
19:00 amcorreia_ joined #salt
19:00 denys joined #salt
19:00 Bren iggy: thank you!
19:00 arnoldB Bren: it could be as simple as https://github.com/bechtoldt/salt-modules/blob/master/_modules/datetimeutil.py : execute user.getent, return the highest ID + 1
19:01 arnoldB h
19:01 arnoldB hm
19:02 iggy a feature request to be able to specify those in some way to user.present wouldn't be a terrible idea
19:03 arnoldB iggy: would this be possible without touching files? what defaults do you mean? /etc/login.defs ?
19:03 iggy yes, login.defs
19:03 otter768 joined #salt
19:04 shadowsun joined #salt
19:04 matti joined #salt
19:04 matti joined #salt
19:04 Damon joined #salt
19:04 stevednd joined #salt
19:04 martineg_ joined #salt
19:04 ksalman joined #salt
19:04 rawzone joined #salt
19:04 colonD joined #salt
19:04 Bateau_ joined #salt
19:05 iggy I checked to see if you could pass it as env variables, but those states/modules don't pass kwargs
19:06 snaggleb joined #salt
19:06 Gareth ahoy hoy.
19:06 Sypher joined #salt
19:06 eXistenZNL joined #salt
19:08 kaictl joined #salt
19:09 AviMarcus joined #salt
19:14 Ahlee Howdy Gareth
19:14 Gareth Ahlee: hey. hows it going?
19:14 justyns would there be any potential issues if I change this line to have .trim() on both public keys?    https://github.com/saltstack/salt/blob/develop/salt/master.py#L1714
19:14 Ahlee Gareth: Going really well, thanks for asking.  You?
19:14 JoshuaX joined #salt
19:15 Gareth Ahlee: Not too bad for a Monday :)
19:15 JDiPierro joined #salt
19:16 ek6 joined #salt
19:17 amcorreia__ joined #salt
19:17 sander____ joined #salt
19:18 mikaelhm joined #salt
19:18 bhosmer joined #salt
19:19 sander____ Is there some way to have grains properly detect vms? All mine show up as physical.
19:22 Auroch joined #salt
19:26 Ahlee What's your virutalization platform?
19:27 Ahlee xen, kvm, vmware all are detected for me
19:27 iggy GCE (kvm) isn't in older versions
19:27 iggy fixed in 2015.2
19:27 Ahlee ah
19:27 Ahlee interesting.
19:27 iggy so... upgrade and try again?
19:32 mikaelhm joined #salt
19:32 qybl we've had problems with FreeBSD VMs on kvm we're we set a specific cpu model, I believe it's fixed in a newer version than FreeBSDs 2014.7.2
19:33 qybl (the model being something other than 'QEMU Virtual CPU')
19:34 rgarcia_ joined #salt
19:34 sander____ Ahlee: yeah kvm.
19:34 sander____ iggy: This is kvm on cento6, hopefully 7 soon
19:34 rtanabe joined #salt
19:35 iggy what version of salt?
19:35 ryuhei is there a way to install salt-minion when it fails to install at spin up?
19:35 sander____ 14.7.2
19:36 iggy ryuhei: salt-ssh?
19:36 aparsons joined #salt
19:36 sander____ I can work around for now. I was just wondering if it depended on the hypervisor being salt-cloud or somethnig
19:36 sander____ er something
19:39 qybl sander____: my comment was directed at your problem, we've had the same under the specified circumstances
19:42 amcorreia__ joined #salt
19:42 dopesong joined #salt
19:44 sander____ qybl: so you filter based on that entry giving you defacto filtering?
19:45 sander____ er give you a virtual virtual grain. :)
19:45 chandy joined #salt
19:45 qybl not yet, so far we haven't tried with linux VMs and specific cpu models, supporting FreeBSD in our environment is just a hobby project
19:46 dopesong_ joined #salt
19:47 Ouzo_12 joined #salt
19:47 sander____ For me too. Just sticking my toe in. Our old config management tool is being retired. I need to either get onboard with the main initiative (puppet) or come up with our own plan. I want to go with salt, but I'm weighing out whether it will be too much work for our team going it alone.
19:47 speedlight iggy: thnkz again! i change the timeout and now is working
19:48 baweaver joined #salt
19:48 qybl sander____: also newer code (only checked on master) suggested it should work in an upcoming release, so we're not really in a hurry to find a workaround
19:48 dude051 joined #salt
19:49 dunz0r joined #salt
19:49 baweaver joined #salt
19:50 enarciso joined #salt
19:51 chalcy0n joined #salt
19:51 sander____ I am waiting to see what 2015 will be like as well.
19:52 toanju joined #salt
19:54 chandankumar joined #salt
19:58 yannisc joined #salt
20:02 nickdew joined #salt
20:07 yannisc1 joined #salt
20:12 ipmb joined #salt
20:19 yannisc1 /msg NickServ VERIFY REGISTER yannisc1 ixiwedjdbawi
20:21 yannisc1 left #salt
20:21 yannisc1 joined #salt
20:21 Ahlee new password time
20:22 yannisc heah - blush
20:22 speedlight haha
20:22 Kluger joined #salt
20:22 thayne joined #salt
20:22 thayne_ joined #salt
20:24 nickdew joined #salt
20:25 hal58th lol
20:25 nickdew yannisc1: You know want to change your NickServ password.
20:25 nickdew s/know/now
20:25 tzero joined #salt
20:25 hal58th im sure he realizes that
20:25 nexsja^ joined #salt
20:25 yannisc thanks guys - I realizae my stupidity
20:28 yannisc1 left #salt
20:28 yannisc1 joined #salt
20:28 yannisc1 left #salt
20:29 f4lse joined #salt
20:30 yannisc1 joined #salt
20:30 f4lse i use identify states/pillars from centos to redhat and im getting 'Jinja variable 'dict'' issues
20:31 f4lse its like it cant find my pillar file but it works fine in centos. suggestions?
20:33 nesv f4lse: Are you doing any sort of targeting on the "os" grain?
20:33 nesv f4lse: Something like "G@os:CentOS"?
20:34 Kluger joined #salt
20:34 f4lse nah, just a simple groups.sls "{% for group, args in pillar['groups'].iteritems() %}"
20:34 f4lse can't find 'groups'
20:34 nesv f4lse: hmm...
20:35 nesv f4lse: Are you targeting the new RHEL hosts in your pillar's top.sls?
20:35 f4lse "Rendering SLS 'base:groups' failed: Jinja variable 'dict' object has no attribute 'groups'"
20:35 SheetiS f4lse: Able to share your pillar (and possibly the pillar topfile that references it) then?  I'd suspect what nesv says has some merit.
20:36 f4lse just doing a salt fileshare1 state.sls groups
20:36 f4lse if i dont use a pillar runs fine
20:37 rsimpkins left #salt
20:38 f4lse http://pastebin.com/74DeMPMN
20:38 f4lse i try a 'salt fileshare1 state.sls groups' and get the error
20:39 nesv f4lse: I'm reasonably-new to Salt (only been using it for ~4 weeks now), and whenever I get an error like yours, is when I'm not actually mapping those pillars to the minions.
20:39 f4lse hmm
20:41 nesv f4lse: In your /srv/pillar/top.sls file, do you have something like `'*': - groups`?
20:41 nesv f4lse: ...that's assuming you want those groups on all minions.
20:41 f4lse no pillar file in use
20:42 nesv f4lse: ...you don't have a /srv/pillar/top.sls?
20:42 f4lse i mean top.sls file sorry
20:42 nesv :[
20:43 sgate1 joined #salt
20:43 nesv f4lse: I don't know why that's working on CentOS and not on RHEL, but you may want to add a /srv/pillar/top.sls file.
20:43 markm joined #salt
20:44 nesv f4lse: For reference, if you'd like a quick link http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html
20:44 f4lse i tried the top.sls file and it seems it can't map correctly
20:44 f4lse 'No Top file or external nodes data matches found'
20:45 nesv f4lse: Do you have your minions nested into environments?
20:45 nesv f4lse: Like "dev", "qa", etc.?
20:46 f4lse yes
20:46 f4lse but even the base * doesn't work
20:46 nesv f4lse: Also, if you have your pillars in a Git repo, and you're pulling them onto the master with gitfs, it usually takes a minute for the filesystem cache to refresh.
20:46 jrluis joined #salt
20:47 f4lse nah, writing my stuff in vi
20:47 nesv hmmm...okay
20:49 jonher937 f4lse: What happens if you run "salt 'myminion' pillar.get mypillarhere" ?
20:50 nesv f4lse: Have you tinkered with the "pillar_roots" master configuration value, at all?
20:54 jdesilet joined #salt
20:55 jeffspeff i'm working on a custom module. while this is running, the minion will be restarted, how can i get the module to properly continue at the next step when the minion comes back online?
21:00 SheetiS jeffspeff: You won't be able to get a module to 'continue' like that in a straightforward manner.  What are you trying to do?  Maybe there is another way to handle it either via orchestration, scheduler, or reactor depending on what you want to do.
21:00 jeffspeff wanting to edit the minion conf file after it does an update.
21:01 jeffspeff the module updates the minion, the update exe files restart the minion service which then causes the state to time-out. i want to edit the file after the install completes
21:03 SheetiS So I am not sure this is right way to do it, but what I would do is have a reactor that looked for minion starts and applied a state file for the minion conf.  Then on changes it would restart the minion again.  It might cause an extra minion restart, but at least it would have the conf you want.
21:04 jeffspeff ok. i'll look into that. also, speaking of reactor. is it possible to make reactor auto accept a minion key if it matches a certain pattern?
21:04 ek6 joined #salt
21:04 Eureka_ @jeff, yes it is. I had built an event to do exactly that
21:04 catpig joined #salt
21:05 Vynce joined #salt
21:05 Eureka_ @jeffspeff here is an example for you. http://docs.saltstack.com/en/latest/topics/reactor/
21:05 jeffspeff Eureka_, thanks
21:08 Kluger joined #salt
21:14 iggy there's also autosign_file
21:14 iggy which takes patterns
21:16 nesv Am I correct in assuming that if I set "mine_functions" in a pillar, I don't need to restart the salt-minion service?
21:17 iggy that's the theory
21:17 nesv Okay. Thanks, iggy :)
21:17 iggy well, you'd have to a refresh_pillars or something to get the pillars
21:17 nesv Awesome. Thank you.
21:17 rojem joined #salt
21:17 iggy and you probably will have to restart the minion anyway to lower the annoyingly long mine_interval
21:18 * nesv nods
21:18 fxhp joined #salt
21:19 nesv I already have "mine_interval" being set in a state, with the salt-minion service state watching that file.
21:20 Kluger joined #salt
21:20 iggy watch_in
21:21 catpig joined #salt
21:23 dalexand_ joined #salt
21:25 cpowell joined #salt
21:32 Kluger joined #salt
21:36 bhosmer__ joined #salt
21:37 otter768 joined #salt
21:41 istram joined #salt
21:41 fogrito joined #salt
21:42 fogrito Anyone know why I get "State 'apache_module.enable' found in SLS <my_sls_file> is unavailable" when running my state.sls file? Running 2014.7.0 on master and 2014.7.1 on minion
21:44 Kluger joined #salt
21:45 bmac2 joined #salt
21:47 relidy fogrito: Maybe a silly question, but do you have Apache installed on the minion?
21:47 huddy joined #salt
21:47 relidy fogrito: I've seen those sorts of errors when the toolset isn't installed (git, for example)
21:48 fogrito Yes, pkg httpd is installed on the minion
21:49 nesv Is it generally preferred to use "watch_in" over "watch" when setting requisites in states?
21:50 nesv ...in general, the "_in" requisites?
22:00 iggy nesv: whatever makes the most sense to you... I hate seeing my watch lists get up to like 7 entries, I so use _in ones
22:05 nesv Makes sense
22:05 nesv Thanks again, iggy
22:07 Hell_FireW joined #salt
22:08 * iggy suspects https://github.com/saltstack-formulas/salt-formula/pull/107 is going to be contentious
22:10 SheetiS I prefer watch_in as opposed to watch (when using watch instead of listen) as I can make some state later on that needs to restart this states service without the original state with the service ever knowing about it.
22:10 thayne joined #salt
22:10 SheetiS iggy: I think that looks fine.  You made a pillar option to maintain the old functionality if desired.
22:10 f4lse joined #salt
22:11 iggy there were already people that pushed back against me changing the default
22:11 SheetiS the default breaks _schedule.conf or whatever
22:11 SheetiS so it needs to change.
22:12 aquassaut joined #salt
22:12 thayne_ joined #salt
22:13 SheetiS If salt is going to be writing stuff there itself, you don't want the state for salt to default to 'cleaning' that.
22:18 dalexander joined #salt
22:18 thedodd joined #salt
22:19 SheetiS iggy: Worst case, you could switch which is the 'default' behavior if the pillar is not present, but I think the default behavior should now be considered wrong.
22:19 druonysus joined #salt
22:19 druonysus joined #salt
22:20 kermit joined #salt
22:20 iggy thank you... I seem to be the only who saw it was wrong
22:21 iggy I feel like I had to plead with people to even look into the problem
22:21 sunkist joined #salt
22:21 baweaver joined #salt
22:21 Ahlee it's times like this I <3 salt-api.  Running post-maintenance verifications by diffing python dictionaries is oddly satisfying
22:22 baweaver joined #salt
22:23 mosen joined #salt
22:34 timoguin joined #salt
22:37 pravka joined #salt
22:44 dude051 joined #salt
22:45 markm joined #salt
22:52 clintber_ joined #salt
22:53 giantlock joined #salt
22:53 gladiatr joined #salt
22:53 mosen joined #salt
23:02 thayne joined #salt
23:03 thayne_ joined #salt
23:28 hal58th forgito, salt-master should be higher version than minion. it can cause problems
23:29 hal58th forgito, other than that. make sure all the pkgs required for that module is installed. may have to look at code
23:38 otter768 joined #salt
23:38 VSpike joined #salt
23:41 N-Mi joined #salt
23:41 N-Mi joined #salt
23:48 rudi_s Hi. I'm using "schedule" in my pillars to run salt automatically every hour (schedule: highstate: function: state.highstate seconds: 3600 splay: 1800 maxrunning: 1). However it looks like no salt run is actually happening. Any idea how I can debug this?
23:49 dimeshake have you synced the pillar data rudi_s?
23:49 dimeshake salt '*' saltutil.refresh_pillar   (if this is a new addition and you haven't done anything else yet that would sync pillar)
23:50 nickdew Tried adding --verbose to the command?
23:51 nickdew You can also run running salt-call from the minion will show what is going on during the salt run.
23:57 rudi_s dimeshake: Of course.

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