Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-07-18

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

All times shown according to UTC.

Time Nick Message
00:17 oz_akan joined #salt
00:24 bhosmer joined #salt
00:31 micko joined #salt
00:37 n8n joined #salt
00:38 aquinas joined #salt
00:39 dlam hey for `salt-run`   how can i find all the commands i can run?
00:40 dlam like  `salt-run manage.status`  shows all the minions connected or not to master
00:45 retrospek salt * sys.doc
00:47 ajolo__ joined #salt
00:55 Ryan_Lane joined #salt
01:11 rojem joined #salt
01:11 logix812 joined #salt
01:17 rojem joined #salt
01:17 bhosmer_ joined #salt
01:19 oz_akan joined #salt
01:22 sectionme joined #salt
01:33 dimeshake ye
01:34 rojem joined #salt
01:37 oz_akan joined #salt
01:38 otter768 joined #salt
01:48 gywang joined #salt
01:49 gywang I'm sorry but who can tell me what does these codes mean: https://github.com/saltstack/salt/blob/develop/salt/modules/file.py#L3205-L3213
01:49 gywang When I create file I get mode 666
01:49 robawt gywang: what's your current umask?
01:50 gywang Where could I find it?
01:51 schimmy joined #salt
01:52 retrospek yes that code is making it 666 by default
01:53 retrospek as your umask is 0
01:55 retrospek sadly that code is asking the current process for it's umask rather than referencing a grain or parameter so if you want some other mode (umask) than the running salt instance you'll have to provide the explicit file mode on call to manage_file
01:57 gywang Okay, sadly it is. Why doesn't it copy mode from source file ~~
01:58 retrospek rarely makes sense to do so
01:58 robawt aw shoot it's retrospek :)
02:13 ajprog_laptop1 joined #salt
02:21 rampantmonkey joined #salt
02:24 rampantmonkey I am trying to enable a service that happens to have a '.' in the name. I can't figure out a way to convince YAML to parse it and not have salt try to interpret it.
02:25 retrospek hey robawt
02:26 rampantmonkey any suggestions?
02:26 retrospek rampantmonkey: example?
02:27 retrospek robawt: no more drago :(
02:27 rampantmonkey fastcgi:
02:27 rampantmonkey pkg:
02:27 rampantmonkey - installed
02:27 rampantmonkey service:
02:27 rampantmonkey - name: "fcgiwrap.socket"
02:29 jY is there anyway to do something like this  http://pastebin.com/bVzuKTCb and use passport_config in the common state?
02:29 aCodinMan joined #salt
02:29 aCodinMan joined #salt
02:33 babilen basepi: Which issue are you referring to exactly in https://github.com/saltstack/salt/issues/14307 ? What do I do if I updated my master to .7 and still have .5 minions around?
02:33 babilen Sorry, did not see anything related in the release notes (or not sure which issue that was)
02:35 retrospek rampantmonkey: that looks fine. what is going wrong?
02:36 rampantmonkey this error message: No function declared in state "service" in sls fcgiwrap
02:37 KyleG joined #salt
02:37 KyleG joined #salt
02:44 bhosmer joined #salt
02:51 manfred /quit
02:51 manfred ...
02:52 ramishra joined #salt
02:53 retrospek rampantmonkey: try adding '    - service.running' between service/name
02:53 retrospek or i should say make service into service.running for that
02:55 rampantmonkey retrospek: works. non-context-free grammars make things hard. thanks.
02:56 retrospek indeed
02:57 davet1 joined #salt
02:59 rojem joined #salt
03:01 * goodwill looks at retrospek in disbelief
03:01 TheThing joined #salt
03:06 bhosmer joined #salt
03:09 yomilk joined #salt
03:10 dude051 joined #salt
03:10 oz_akan joined #salt
03:11 \ask joined #salt
03:13 ml_1 joined #salt
03:14 gzcwnk Hi I keep getting an yaml error but I cant see what is wrong http://pastebin.com/cgkrxTUp
03:15 vandemar joined #salt
03:16 otter768 joined #salt
03:17 dccc joined #salt
03:17 rampantmonkey missing colon on /etc/sudo-ldap.conf
03:17 gzcwnk thanks, I just found it....doh
03:19 XenophonF joined #salt
03:20 XenophonF dear Friends, as with any programming language, make sure you spell keyworks correctly in your SLS files
03:21 XenophonF I just spent about 4 hours troubleshooting the error 'the state"extends" in sls postfix.relay is not formed as a list'
03:21 XenophonF when the correct keyword is "extend"
03:21 * XenophonF feels like an idiot
03:22 gzcwnk i balme my fingers
03:22 gzcwnk balme
03:22 rampantmonkey that makes 3 SLS errors in less than an hour.
03:22 gzcwnk blame
03:22 gzcwnk ll
03:22 gzcwnk lol
03:23 XenophonF :)
03:23 XenophonF and i managed to misspell "keywords" as "keyworks"
03:23 XenophonF that's irony for you
03:23 gzcwnk i reckon my left finger is doing it on purpose
03:31 pfallenop joined #salt
03:32 catpiggest joined #salt
03:50 poogles joined #salt
03:52 ajolo joined #salt
03:53 soggie joined #salt
03:54 soggie hi guys, was wondering
03:54 soggie is it possible to run a service as a custom user?
03:54 soggie in a salt sate
03:54 soggie *satte
03:54 soggie *state
03:58 war2 joined #salt
04:04 jamesbdev joined #salt
04:05 jamesbdev Hi guys, I am a web developer and we are looking for an easy way to create new virtual machines on our digital ocean hosting account. Is this the right use case for salt ? could someone please point me to some updated docs on how to accomplish this ?
04:08 soggie jamesbdev yep
04:08 soggie There's a whole series of blogspot on that
04:08 soggie lemme find that for you
04:09 jamesbdev thanks so much soggie
04:09 soggie http://blog.publysher.nl/2013/07/infra-as-repo-using-vagrant-and-salt.html
04:09 soggie actually, if you meant creating VMs automatically through digital ocean, i'm not sure if salt is meant to do that
04:09 soggie provisioning the VMs on the other hand, yeah, salt makes it super easy
04:12 sectionme joined #salt
04:13 TyrfingMjolnir joined #salt
04:15 Outlander joined #salt
04:16 war2 joined #salt
04:17 ajolo joined #salt
04:24 jamesbdev i meant both actually.. creating vms and provisioning. looks like vagrant + vagrant digital ocean plugin can do what i want
04:24 jamesbdev + salt
04:31 soggie glad to help. :)
04:36 jalbretsen joined #salt
04:42 yomilk joined #salt
04:47 robawt retrospek: aww man that's terrible news
04:47 Ryan_Lane joined #salt
04:50 krow1 joined #salt
04:50 n8n joined #salt
04:53 scooby2 joined #salt
04:55 bhosmer joined #salt
04:56 ramteid joined #salt
04:57 TyrfingMjolnir joined #salt
05:00 TyrfingMjolnir_ joined #salt
05:02 dccc joined #salt
05:11 war2 joined #salt
05:14 ml_1 joined #salt
05:18 Ryan_Lane joined #salt
05:32 war2 joined #salt
05:38 greyhatpython joined #salt
05:46 Lomithrani joined #salt
05:48 war2 joined #salt
05:54 ramishra joined #salt
05:55 Ryan_Lane joined #salt
05:58 picker joined #salt
06:07 war3 joined #salt
06:10 war3 joined #salt
06:21 zain_ joined #salt
06:22 davromaniak joined #salt
06:26 mechanicalduck_ joined #salt
06:30 cyberjames joined #salt
06:31 krow joined #salt
06:34 zain_ joined #salt
06:35 cyberjames hi
06:43 bhosmer joined #salt
06:46 kermit joined #salt
06:47 n8n joined #salt
07:00 krow1 joined #salt
07:07 xzarth joined #salt
07:11 ml_1 joined #salt
07:13 q1x joined #salt
07:15 yomilk joined #salt
07:22 ndrei joined #salt
07:23 alanpearce joined #salt
07:28 linjan joined #salt
07:29 scott_walton joined #salt
07:31 alanpearce joined #salt
07:33 nullscan joined #salt
07:33 nullscan hey everybody
07:34 ujjain joined #salt
07:34 nullscan i'm trying to assign all my servers to server groups which i want it to be a grain value, right after i set the minions hostname
07:34 nullscan i am using salt-ssh without master
07:34 nullscan does anyone know how i should go about doing this?
07:36 matthiaswahl joined #salt
07:44 Ryan_Lane joined #salt
07:47 topochan joined #salt
07:48 luette joined #salt
07:48 meganerd joined #salt
07:49 darkelda joined #salt
07:51 CeBe joined #salt
07:51 bhosmer joined #salt
07:51 xsteadfastx joined #salt
07:52 waverider joined #salt
07:52 waverider hello
07:54 waverider is there a way to use saltstack as library for generating network config files for various distros without running master, nor minion. Just run own python code that uses saltstack as lib and generate these config files (config files will not be placed on localhost /etc but on a mounted image).
07:56 chiui joined #salt
07:57 vu joined #salt
08:01 ndrei joined #salt
08:06 Lomithrani Hi guys , is it possible to ask file.managed to create the directory in the path if it doesnt exist ?
08:07 krow joined #salt
08:09 vu joined #salt
08:10 babilen Lomithrani: makedirs
08:10 Lomithrani Thanks :)
08:10 Lloyd_ - makedirs: True
08:11 Lloyd_ morning babilen, did you manage to fix that master in the end?
08:14 babilen No, still ongoing
08:14 krow1 joined #salt
08:15 Lloyd_ balls
08:16 babilen Lloyd_: I mean it might well be something unrelated to salt, but I just want some more error messages. This is also a HA system that uses xnbd devices and we are running filesystem checks at the moment and are considering nuking the master box completely
08:17 babilen I ended up purging *everything* on the master and one minion and it seems as if the minion never gets the key from the master (or cannot really communicate with it). I tested TCP traffic with netcat + telnet and that works (on those ports) and can telnet from the minion to master:4506 ...
08:19 meganerd joined #salt
08:21 Micromus_ waverider: proxy minion?
08:22 waverider hmm, how woudl that help? All I need is to generate network config files (for arch, ubuntu, centos etc.) without having a master or minion, just salt as library
08:26 Micromus_ I have little exp. with salt, but maybe you only need the config template tools that salt builds on?
08:29 Lloyd_ babilen: I would of already nuked the master and had a new one provisioned from backups / repo personally. Especially if it's a HA system, it's counterpart should be handing everything while that one can't.
08:29 babilen waverider: The answer is more or less "no", but there might be a way. The most common way is to bootstrap a local minion and use that in masterless mode to run salt states.
08:30 waverider babilen, but I assume I need to run archlinux locally if I want an arch network config, right?
08:30 Lloyd_ the other thing babilen, is did you try pointing one of the non-responding minions at a test master just to rule out minion problems? (chances of all the minions screwing up is unlikely but need to be sure of these things)
08:30 babilen Lloyd_: I would simply like to understand what happened so that I can make sure it doesn't happen again. But it will happen next.
08:30 babilen waverider: You would run that on the box you want to do it
08:31 waverider ok, we'll do jinja2 templating on the networking files then :D
08:31 babilen Lloyd_: Also that is on the things we will try (bit tricky as we have to handle the networking part (they are all in their little network bubble))
08:32 babilen waverider: You might be interested in: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html
08:32 babilen (no Arch though)
08:32 bhosmer joined #salt
08:32 waverider does salt has a "lib mode" with no master and no minion?
08:33 cDR_ joined #salt
08:39 krow joined #salt
08:41 babilen waverider: Not to my knowledge (hence the "no" in the "more or less")
08:41 vu joined #salt
08:42 yomilk joined #salt
08:42 waverider ok, thanks
08:42 babilen Nothing stops you from importing the python modules though .. most execution modules might work, but rely on proper injection of specific information into __grains__ and __salt__. The first is probably easy, but I have no idea how to approach the latter right now.
08:44 krow joined #salt
08:44 waverider well if code is modularized like I can call a function and get a str as output for config file would be easier
08:48 shorty_mu joined #salt
08:49 babilen As I said: Take a look at the execution modules in question, but __salt__ will be problematic there.
08:49 MrTango joined #salt
08:50 shorty_mu Hi all, I need help witj Jinja in a state file. Code is the following:
08:50 shorty_mu {% for name in salt['pillar.get']('lighttpd:additional_configuration', {}) %}
08:50 shorty_mu {{ name }}:
08:50 shorty_mu file.managed:
08:50 shorty_mu - name: /etc/lighttpd/conf.d/{{ name }}.conf
08:50 shorty_mu - content: {{ salt['pillar.get']("lighttpd:additional_configuration:{{ name }}:content") }}
08:50 shorty_mu - watch_in:
08:50 shorty_mu - service: service_ligttpd
08:50 shorty_mu {% endfor %}
08:50 shorty_mu The Problem is, that the file is empty. My guess is that {{ name }} isn't evaluated. Any ideas of what I'm doing wrong? Thx
08:51 Shish anything inside {{ }} is python code
08:51 Shish "lighttpd:additional_configuration:{{ name }}:content", in python, is just a regular string - to get the "name" variable into the string you'd do something like "lighttpd:additional_configuration:" + name + ":content"
08:52 Shish (or %s string formatting, depending on preference)
08:57 sectionme joined #salt
08:57 chiui joined #salt
08:59 babilen shorty_mu: You simply cannot nest {{ }}
09:00 shorty_mu Shish: Thx, I give that a try. I still can't wrap my head aroung the mixing of YAML, Jinja & Python.
09:00 babilen jinja is ugly
09:00 babilen (for anything even a little complex that is)
09:01 shorty_mu babilen: What's the alternative?
09:02 babilen I write an increasing portion of salt directly in Python these days. See http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html and http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pydsl.html
09:02 shorty_mu *argh* Until now I was able to get aroung learning Python. Bad luck I guess ;)
09:03 babilen A bunch of my pillars are pure Python (you just cannot implement zip() or anything even remotely fancy in jinja) too and I am writing my own execution modules to do things that don't come with salt.
09:03 babilen You should learn Python. Unfortunately you should learn Python 3.4 which is great, but will be forced to write 2.7 because salt uses that.
09:04 shorty_mu Makes sense, but makes the code complicated. Also all my colleagues would be forced into learning Python. Learning Python...? Don't like it.
09:05 war2 joined #salt
09:05 babilen Anyway, it makes a bunch of things a lot easier .. (e.g. https://groups.google.com/forum/#!searchin/salt-users/wolodja/salt-users/6BPSS-iMBiw/WfY2E60v1OsJ )
09:06 war2 joined #salt
09:06 shorty_mu I did the following now: {{ salt['pillar.get']("lighttpd:additional_configuration:" + name + ":content") }}. Debug shows me that "content" is evlauated and has the correct value. But the file is still empty. Well. have to dig further. At least my inital issue is solved. Cheers again.
09:07 war2 joined #salt
09:12 Lomithrani hi , in order to use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.dockerio.html do I have to do something special ?
09:12 Lomithrani State docker.built found in sls cassandra is unavailable
09:14 lopez joined #salt
09:14 lopez left #salt
09:15 lopez joined #salt
09:19 babilen Lomithrani: Do you have docker-py installed on the minion and did you restart the minion after installing it? (salt won't make modules available it couldn't import)
09:20 Lomithrani babilen: going to check that !
09:21 babilen (it mentions that on the page you linked)
09:25 juo100 joined #salt
09:25 juo100 left #salt
09:26 yomilk joined #salt
09:33 giannello joined #salt
09:34 giannello http://docs.saltstack.com/en/latest/ref/states/all/salt.states.augeas.html this page is not correct - I'm running 2014.1.7 and the augeas.change state does not exist.
09:36 babilen giannello: And you do have the necessary packages installed for that module to run and restarted the minion in question? Can you run "salt minion-id cmd.run 'python -c "from augeas import Augeas"'" ?
09:37 babilen (as in: did you read the note on that page and performed the basic troubleshooting detailed there? if so, paste it's output to http://refheap.com or http://paste.debian.net
09:37 babilen _
09:37 giannello babilen, https://github.com/saltstack/salt/blob/2014.1/salt/states/augeas.py
09:38 babilen yes, that
09:38 babilen https://github.com/saltstack/salt/blob/2014.1/salt/states/augeas.py#L18 is the part I am referring to
09:38 giannello the "change" function is not present in the code
09:38 giannello s/function/method/
09:39 superted666 joined #salt
09:39 babilen Should be a function
09:39 babilen https://github.com/saltstack/salt/blob/develop/salt/states/augeas.py#L44 has obviously not merged. One second please.
09:40 ggoZ joined #salt
09:40 giannello https://github.com/saltstack/salt/blob/2014.7/salt/states/augeas.py and it's present here
09:42 babilen You can put it in _states and run saltutil.sync_states, but something went wrong there.
09:43 giannello yeah, and seems that there's not so many augeas users out there
09:44 ndrei joined #salt
09:44 babilen giannello: "git branch --contains a11622b2b01b234974b9d50ccbe513ba499c9a02" lists only 2014.7 and develop, so it obviously hasn't been merged into 2014.1
09:47 felixhummel joined #salt
09:47 bhosmer joined #salt
09:51 TheThing joined #salt
09:55 ramishra joined #salt
09:56 yomilk joined #salt
09:57 Lomithrani babilen: it was that (and I know it mentionned it) but I thought the error I had was a different issue , but it wasn't . Thank you :)
10:00 poogles joined #salt
10:03 harkx joined #salt
10:05 sectionme joined #salt
10:07 ramishra joined #salt
10:09 darkelda joined #salt
10:10 ndrei joined #salt
10:19 chiui joined #salt
10:21 bhosmer_ joined #salt
10:21 TheThing joined #salt
10:23 jalaziz joined #salt
10:23 shorty_mu left #salt
10:51 luminous Exception TypeError: 'an integer is required' in <bound method LocalClientEvent.__del__ of <salt.utils.event.LocalClientEvent object at 0x285a250>> ignored
10:51 luminous anyone able to help me make sense out of this error? ^^
10:53 luminous I have a simple class Foo(object) with an __init__(self): that has self.client = salt.client.LocalClient()
10:53 luminous nothing fancy
10:54 masterkorp hello
10:57 elfixit joined #salt
10:58 sectionme joined #salt
10:59 masterkorp any way to configure salt to show only the failed state blocks ?
11:00 dfinn joined #salt
11:00 dfinn where does salt pull the "host' grain from?  I've got a prod server that's broken because it's setting that wrong and I can't tell where/how it's getting it.
11:01 masterkorp i uses the fdqn
11:02 masterkorp hostname -f
11:02 dfinn that's not where it's getting it then
11:02 dfinn it has other info
11:03 masterkorp can you run salt <minion> cmd.run "hostaname -f" ?
11:03 masterkorp what os is it ?
11:04 dfinn [prod][root@salt-master01 (salt-master) cron.livedb01]# salt livedb01.bcinfra.net cmd.run 'hostname -f'
11:04 dfinn livedb01.bcinfra.net:
11:04 dfinn livedb01.bcinfra.net
11:04 dfinn so that's the correct hostname
11:04 luminous dfinn: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1081
11:04 dfinn it's CentOS 6.4
11:05 luminous there's your answer
11:05 luminous RE what grains['host'] is derived from
11:05 dfinn guessing that's reverse dns?
11:07 dfinn how can I run this to see what is returned?
11:07 dfinn alt.utils.network.get_fqhostname()
11:07 dfinn salt.utils.network.get_fqhostname()
11:09 TheThing joined #salt
11:09 ggoZ joined #salt
11:21 geekmush joined #salt
11:28 Lomithrani joined #salt
11:32 diegows joined #salt
11:33 jrdx joined #salt
11:34 yomilk joined #salt
11:43 sectionme joined #salt
11:44 vbabiy joined #salt
12:07 ramishra joined #salt
12:09 bhosmer joined #salt
12:11 kiorky joined #salt
12:12 jaimed joined #salt
12:18 scott_w joined #salt
12:19 zain_ joined #salt
12:19 Lomithrani anyone using docker here ?  I have a problem with docker.running in a state
12:22 badon joined #salt
12:22 zain__ joined #salt
12:25 jeffrubic joined #salt
12:27 fke joined #salt
12:28 tkharju joined #salt
12:30 Lomithrani https://www.refheap.com/88336 concerning the problem above , if anyone has an Idea I'll take :)
12:33 nhubbard Lomithrani: the docker running container has to be a container name
12:33 nhubbard not an image name
12:33 Luke joined #salt
12:35 Lomithrani oh right I have to  docker.installed first
12:35 nhubbard Lomithrani: so something like this (might not work just throw it together) http://pastebin.com/LiWPcMFV
12:36 Lomithrani feels odd because in docker I only build then run
12:36 Lomithrani but that's definetly right thanks
12:37 nhubbard Lomithrani: I agree it's a little odd, but that is because you are ensuring that a specifc container is running with the docker.running, which isn't the exact same as a docker run, as you could be running multiple containers from the same image. So you have to build the container and then start the container
12:38 Lomithrani nhubbard: that makes sense :) Thanks !
12:52 eclectic joined #salt
12:55 ramishra joined #salt
12:57 Lomithrani nhubbard: https://www.refheap.com/88336 well running in another issue now :-(
12:58 nhubbard that looks more like a bug then anything
12:58 nhubbard what happens if you run through the states again?
13:00 intellix joined #salt
13:00 jslatts joined #salt
13:01 bhosmer joined #salt
13:03 Lomithrani nhubbard: it doesnt reinstalled (because it already exist) and can't run either
13:06 babilen Lloyd_: We've tracked it down!
13:06 Lloyd_ oh?
13:07 babilen Lloyd_: Well, some network engineers did and the bottom line is more or less that due to some braindead (bug?) handling of ARP requests on interfaces Linux shouldn't listen to we ended up with different MTU settings between the master and the minion.
13:07 pclermont joined #salt
13:07 Lloyd_ lol!
13:08 Lloyd_ I'm glad you've managed to find the problem, all good now then?
13:08 babilen We will have to investigate further as this (in their words) is a "nasty" Linux bug and we ended up setting "net.ipv4.conf.all.arp_ignore = 1" and "net.ipv4.conf.default.arp_ignore = 1" for now so that we no longer get those bogus routes.
13:09 nhubbard Lomithrani: if you look on the box user docker ps -a does the container show up and is it named correctly?
13:09 babilen Salt always worked perfectly and I simply didn't probe deep enough into our network infrastructure to find the broken hop. The *huge* question that remains is: Why did it *ever* work. :)
13:10 babilen Lloyd_: My uneducated guess is that the configuration of the two systems in the HA pair was ever so slightly different and that rebooting (and the switch back and forth) caused some changes, but I let the people who deal with that work it out.
13:11 Lloyd_ I've seen something similiar happen in a HA environment when we were using hardware load balancers, the ARP tables would bug out during a failover, causing the failover to fail.
13:11 Lloyd_ but yeah, it was down to an ever so slightly different config between the two LBs that caused it
13:11 Lomithrani nhubbard: a8b785a66147        lgentil/mycassandra:latest   /bin/bash            23 minutes ago      Exited (0) 23 minutes ago                       mycassandra
13:12 babilen This was slightly more devious and apparently a security problem because you could, AFAIUI, inject bogus routes with ARP requests, but I'm not a network engineer and my knowledge of this only goes so far. :)
13:13 Lloyd_ well that's not ideal :| at least it's been discovered before someone could abuse it
13:13 Lloyd_ :)
13:14 ghartz joined #salt
13:15 babilen Well, I definitely learned more about salt during this excercise :)
13:15 nhubbard Lomithrani: what does container with the ID f862814f34cf6 look like?
13:15 mpanetta joined #salt
13:16 Lomithrani no name , no stsatus
13:17 Lomithrani seems like I have to container running with no names and  no status
13:17 john5223 joined #salt
13:17 babilen Lloyd_: https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt → arp_ignore .. The default is to "reply for any local target IP address, configured on any interface" which is obviously not what you want.
13:18 nhubbard that is strange...container names have to be unique and you seem to already have a mycassandra container, so you would either need to delete that one or use a different name in salt. Although salt should be returning that the container is already installed
13:20 nhubbard Lomithrani: I would try explicitly defining the name variable in the docker.installed state just to ensure that is being set, should be but something isn't quite right here
13:20 babilen Lloyd_: So essentially:  You have eth0 and eth1 and configured 192.168.1.1/24 on eth1 .. Linux will, by default, answer ARP requests to 192.168.1.1 on eth0 .. this introduced some weird-shit behaviour by some routers (and packets were routed not as intended). It's fine after setting it to 1 - "reply only if the target IP address is local address configured on the incoming interface"
13:21 Lomithrani nhubbard: ok I'll try that
13:21 Lomithrani nhubbard: thanks a lot
13:22 rojem joined #salt
13:22 Lloyd_ babilen: good to know, thanks for the info! :)
13:28 gingersnaps joined #salt
13:32 Lewoco_ joined #salt
13:34 ipmb joined #salt
13:40 kaptk2 joined #salt
13:43 rallytime joined #salt
13:44 smcquay joined #salt
13:46 waverider left #salt
13:47 XenophonF joined #salt
13:48 XenophonF hi all
13:48 XenophonF what does "requisite declaration state_name in SLS sls.name is not formed as a single key dictionary"?
13:49 ajolo joined #salt
13:49 XenophonF the SLS in question has extend: state_name in it
13:50 war2 joined #salt
13:52 oz_akan joined #salt
13:52 aquinas joined #salt
13:55 babilen XenophonF: Please paste everything you deem relevant to http://paste.debian.net and give us the link. (command, sls you extend, extend statement)
13:55 XenophonF let me post both SLS files
13:56 ramishra joined #salt
13:57 bhosmer_ joined #salt
13:58 acabrera joined #salt
13:58 vejdmn joined #salt
13:58 XenophonF here's top.sls - http://paste.debian.net/110401/
13:59 XenophonF here's postfix/client.sls - http://paste.debian.net/110400/
13:59 XenophonF and here's postfix/relay.sls - http://paste.debian.net/110399/
13:59 XenophonF relay.sls overrides client.sls
14:00 kermit joined #salt
14:00 XenophonF I suspect that I'm using "extend:" wrong.
14:00 XenophonF Other examples import another SLS and extend its states, but the original SLS isn't also applied to the minion.
14:01 XenophonF but in my case, both the original SLS and the extended one get applied
14:01 XenophonF I think I need to figure out how to disable postfix.client when postfix.relay is being applied, but I'm not sure how best to do that
14:04 workingcats joined #salt
14:04 rojem joined #salt
14:07 housl joined #salt
14:13 rojem joined #salt
14:17 krow joined #salt
14:17 mgw joined #salt
14:19 kiorky joined #salt
14:22 krow joined #salt
14:23 ajprog_laptop1 joined #salt
14:26 XenophonF joined #salt
14:26 war2 joined #salt
14:26 ajprog_laptop2 joined #salt
14:27 tkharju joined #salt
14:29 ajprog_laptop1 joined #salt
14:34 XenophonF can I mix "require_in" or "watch_in" with an "extend" declaration?
14:36 babilen XenophonF: It helps if you highlight me (otherwise I miss your replies)
14:37 krissaxton joined #salt
14:38 jalbretsen joined #salt
14:38 oz_akan_ joined #salt
14:38 babilen Not really trivial files there :)
14:39 vejdmn joined #salt
14:39 krissaxton joined #salt
14:40 krow joined #salt
14:41 _ale_ left #salt
14:41 ajprog_laptop1 joined #salt
14:42 XenophonF hah no
14:42 thedodd joined #salt
14:44 XenophonF babilen: the postfix.client SLS works fine
14:44 superted666 joined #salt
14:44 XenophonF I'm going to try commenting out large chunks of postfix.relay to see where that gets me
14:45 babilen XenophonF: context: mode: relay is missing a -
14:45 kivihtin joined #salt
14:45 babilen Ah, no you want a dictionary there
14:46 dude051 joined #salt
14:47 yomilk joined #salt
14:47 babilen XenophonF: Ah! It's line 106 (missing file:)
14:49 Heartsbane joined #salt
14:49 Heartsbane joined #salt
14:54 rojem joined #salt
14:55 ml_1 joined #salt
14:55 Lomithrani where are the logs for salt in debian wheezy ?
14:56 kaptk2 joined #salt
14:56 masterkorp Anyone ever did a docker-salt integration to deploy and orchestrate the application stacks
14:57 ramishra joined #salt
14:57 johngrasty Quick question. I'm trying to get the mysql formula setup and working. I'm getting this error though: Rendering SLS "base:mysql.database" failed: Jinja syntax error: expected token ',', got 'pillar'
14:57 krow joined #salt
14:59 XenophonF babilen: oh thank you so much!
15:03 babilen Lomithrani: /var/log/salt (surprise!)
15:06 krow1 joined #salt
15:08 Lomithrani babilen: thanks , though I'm in the wrong channel I was meaning to ask for cassandra , well more precisely for services
15:09 Lomithrani (like the svc logs on solaris)
15:10 krow joined #salt
15:10 ndrei joined #salt
15:10 johngrasty Lomithrani: Here's what I do, so I don't have to remember where service logs are:  cat/tail/whatever `svcs -L cassandra`
15:12 krow1 joined #salt
15:12 Lomithrani johngrasty: thanks !
15:13 ipmb joined #salt
15:14 vejdmn joined #salt
15:15 johngrasty Is there any Jinja validator to see if I can track down my problem?
15:15 krow joined #salt
15:20 krow1 joined #salt
15:21 higgs001 joined #salt
15:25 kaptk2 joined #salt
15:28 Eureka_ joined #salt
15:28 johngrasty Okay. One more question: is there a way to find out why a particular module is not available?
15:28 btorch for checking if a grain exists ... is it safer/proper to use just {% if grains['hehe'] %} or use {% if salt['grains.item']('hehe') %}
15:29 vu joined #salt
15:29 yomilk joined #salt
15:30 pclermont joined #salt
15:31 war2 joined #salt
15:35 kballou joined #salt
15:40 lopez johngrasty: @jinja validation: jetbrain's PyCharm (pro) has a decent basic syntax inspection for jinja2. But in the end to test it, you have to run salt (if there's any better path, i'd be happy to hear about it too..). I use salt <minion> <state> test=True -l debug|trace ...
15:42 tligda joined #salt
15:44 beneggett joined #salt
15:44 beneggett joined #salt
15:45 lopez some problems can only be tracked down on the minion himself, via salt-call <state> - but caution: in salt-call, test=True is not usable... (would be nice to have it there, too, or any equivalent option..)
15:47 scott_walton joined #salt
15:47 eriko joined #salt
15:53 kiorky joined #salt
15:54 johngrasty lopez: Thanks.
15:58 ramishra joined #salt
16:00 vu joined #salt
16:00 whytewolf joined #salt
16:00 eriko_ joined #salt
16:02 Theo-SLC joined #salt
16:03 ramishra joined #salt
16:04 ajprog_laptop1 joined #salt
16:05 taterbase joined #salt
16:14 XenophonF btorch: I've seen both forms used
16:14 XenophonF I tend to use grains['whatever'] in my templates.
16:14 XenophonF It's more concise, IMO.
16:20 Ryan_Lane joined #salt
16:22 RandalSchwartz joined #salt
16:22 RandalSchwartz yeay - FBSD fixed their packaging system - the new py-salt now has egg info!
16:24 RandalSchwartz ooops... spoke too soon
16:24 RandalSchwartz ugh
16:24 forrest joined #salt
16:26 KyleG joined #salt
16:26 KyleG joined #salt
16:27 ramishra joined #salt
16:28 UtahDave joined #salt
16:30 funzo joined #salt
16:32 cachedout joined #salt
16:32 troyready joined #salt
16:33 elfixit joined #salt
16:35 btorch XenophonF: thanks .. yeah I used it before but I think the reason I stopped on if's was due to redering breaking when the grain doesn't exist
16:36 XenophonF btorch: hm, I wasn't aware of that
16:38 beneggett joined #salt
16:42 bhosmer joined #salt
16:42 MatthewsFace joined #salt
16:44 btorch XenophonF: yeah I edned up changing it to filegen peerstats file peerstats type day enable
16:44 btorch {% if salt['grains.get']('rsync','False') != 'False' %}
16:44 btorch hehe not sure what that was :)
16:44 wendall911 joined #salt
16:45 kiorky joined #salt
16:46 rallytime joined #salt
16:50 kiorky joined #salt
16:50 dlam joined #salt
16:55 arthabaska joined #salt
16:55 ekristen joined #salt
16:59 RandalSchwartz yeah - FBSD py-salt still doesn't package with an egg
17:00 RandalSchwartz even though many other python packages built just fine this morning
17:00 forrest RandalSchwartz, did you talk to the packager?
17:00 RandalSchwartz I've emailed him
17:00 forrest ok
17:00 RandalSchwartz I had hopes because it was getting rebuilt this morning
17:00 RandalSchwartz but that was because of a jinja change
17:01 RandalSchwartz is there any way to figure out how much of my ZFS pool is snapshots instead of "actual" space
17:01 RandalSchwartz I guess a du would tell
17:01 RandalSchwartz just wanted something faster. :)
17:02 RandalSchwartz ahh... zfs list -o space
17:04 higgs001 joined #salt
17:05 RandalSchwartz oops... thought I was in FBSD channel :)
17:05 JoeHazzers why in the best practices guide is everything pillar under the "lookup" subkey?
17:14 XenophonF JoeHazzers: that's just for mapped settings in the formulas, I think
17:16 herlo_ joined #salt
17:17 allanparsons joined #salt
17:17 rojem joined #salt
17:19 herlo joined #salt
17:19 herlo joined #salt
17:20 tkharju1 joined #salt
17:20 herlo1 joined #salt
17:21 herlo1 joined #salt
17:23 jperras what's the easiest way to debug a custom grain definition in _grains/custom.py ?
17:23 jperras after a sync_grains call, I still don't have it show up in grains.items
17:24 djaime joined #salt
17:25 jperras ah, think I figured it out. nvm.
17:29 davet joined #salt
17:33 pclermont Anyone have any good reference | documentation | links for extending pillar data ?
17:34 n8n joined #salt
17:35 intellix joined #salt
17:36 bhosmer_ joined #salt
17:39 forrest pclermont, http://jonatan.nilsson.is/extending-pillar-data-in-saltstack/ ?
17:39 forrest like that?
17:39 pclermont yes
17:40 pclermont maybe someone had something less ugly.
17:40 tkharju2 joined #salt
17:40 forrest so what way do you mean 'extend'
17:40 forrest the idea of extend explained here? https://github.com/saltstack/salt/issues/3991
17:40 forrest or just multiple files
17:42 pclermont yes, I am looking for result from the proposition A
17:42 krow joined #salt
17:43 pclermont basically creating a formula for syslog-ng and I want each services adding their custom sources,destinations,… all with pillar data
17:43 XenophonF pclermont: the sudoers formula might be a useful source of inspiration
17:43 XenophonF i think it's https://github.com/saltstack-formulas/sudoers-formula
17:44 penguin_dan joined #salt
17:44 pclermont XenophonF: this one creates a file in the /etc/sudoers.d/ folder for each “extra” declaration
17:44 pclermont mmm
17:44 XenophonF yeah but you wouldn't have to do it that way
17:45 rojem joined #salt
17:45 XenophonF you could just as easily loop over a list of configs in Pillar
17:46 vexati0n so... who do i have to pay to make a feature where i can specify a pub_port in a minion config file ?
17:47 n8n_ joined #salt
17:47 lopez hi fellow saltmasters.. i have some files that get jinjed (fstab files for freebsd jails, for the record). works fine, uses my pillar data, etc. but when i move a jail away from a machine, i
17:47 lopez 'd like the fstabs for that jail to be no more there
17:48 lopez is there a way to ensure that a file is not there (besides explicitly)?
17:48 pclermont XenophonF: something similar to the firs link from forrest ( http://jonatan.nilsson.is/extending-pillar-data-in-saltstack/ )
17:48 pclermont ?
17:49 Ryan_Lane joined #salt
17:51 aw110f joined #salt
17:52 tempspace So, Helium is going to be released this month I take it?
18:02 krow joined #salt
18:02 geekmush joined #salt
18:04 luminous Exception TypeError: 'an integer is required' in <bound method LocalClientEvent.__del__ of <salt.utils.event.LocalClientEvent object at 0x285a250>> ignored
18:05 luminous ^^ I've defined a simple class object which sets self.client = salt.client.LocalClient()
18:06 luminous what does this exception suggest is wrong?
18:07 luminous pclermont: I use reclass to make my life sane, while doing what I think you are looking to do
18:07 luminous s/make/keep
18:08 higgs001 joined #salt
18:10 bhosmer joined #salt
18:11 pclermont luminous: ok will read on the subject, I’m assuming http://reclass.pantsfullofunix.net/ is the proper place to start
18:20 luminous pclermont: yes, that is the one. But I must warn you, reclass is not your silver bullet, it is how you use it that maintains your sanity
18:20 big_area joined #salt
18:22 kiorky joined #salt
18:25 TheThing joined #salt
18:27 n8n joined #salt
18:28 tkharju3 joined #salt
18:28 luminous this exception makes no sense. if I put the code outside the virtualenv it runs in, there is no exception. this suggests the virtualenv is the problem.
18:29 luminous so I run salt-master from inside the virtualenv.. but I still get the exception from my code
18:29 luminous >.<
18:29 ckao joined #salt
18:29 luminous Exception TypeError: 'an integer is required' in <bound method LocalClientEvent.__del__ of <salt.utils.event.LocalClientEvent object at 0x285a250>> ignored
18:31 Rojematic joined #salt
18:35 krow joined #salt
18:35 Deevolution On Windows salt-minions I'm seeing "Service salt-minion received unsupported INTERROGATE control, which will not be handled." once/minute.  Anyone know what that means?
18:36 kamal_ joined #salt
18:36 ThomasJ|d joined #salt
18:36 mschiff joined #salt
18:36 mschiff joined #salt
18:36 svs joined #salt
18:36 mpoole joined #salt
18:37 Guest49537 joined #salt
18:37 alekibango joined #salt
18:37 robawt hey yawls
18:38 xintron joined #salt
18:40 robawt is it normal to add a specific repo during the provisioning process with salt + vagrant?
18:41 retrospek for?
18:42 krow joined #salt
18:43 ldlework joined #salt
18:47 fke joined #salt
18:48 robawt retrospek: i want to install salt from a specific repo to keep in line with other machines
18:48 Ryan_Lane robawt: I use a github fork
18:48 Ryan_Lane and manage salt with pip
18:49 robawt I know in a salt minion i can add a repo as part of a salt state, but for bootstrapping salt, i want it to follow a particular repository
18:49 robawt ah, interesting Ryan_Lane
18:49 Ryan_Lane oh, you mean formulas?
18:49 Ryan_Lane or salt itself?
18:49 robawt salt itself
18:49 robawt using vagrant, i know i can specify versions
18:49 Ryan_Lane I have a fairly elaborate bootstrapping process
18:49 robawt but i'd really like to say "go get salt from this repo" for bootstrapping
18:49 Ryan_Lane oh, this is just for vagrant?
18:49 robawt yessir
18:49 robawt I know I can just point to a git branch
18:50 Ryan_Lane I don't use the salt provisioner for vagrant
18:50 Ryan_Lane I use a shell script and have it create a venv, then use pip -e <mygitrepo> in the venv
18:50 krow joined #salt
18:50 robawt i see
18:51 Ryan_Lane then I link the necessary binaries from the venv to /usr/local/bin
18:52 retrospek yea that's the approach i used way back when til vagrant was stable
18:52 luminous robawt: I would recommend using the same bootstrap process everywhere
18:52 robawt luminous: I see i can pass a branch/tag value to bootstrap
18:52 Ryan_Lane I like this mostly because it lets me use unreleased versions of salt, but maintain a specific version
18:52 luminous it'll save you a lot of headache as things get more complex (eg, as you use salt more)
18:53 robawt so apparently the closest thing to that would be the git option
18:53 Ryan_Lane I also use vagrant to create a salt artifact that I store in S3, for AWS
18:53 retrospek ryan: yea i had my own fork for a while for much the same
18:53 krow joined #salt
18:53 luminous Ryan_Lane: that is sweet.. I like that linking iea
18:53 robawt luminous: I appreciate it, but I was looking for a way to follow my local repos
18:53 Ryan_Lane and use that in the bootstrapping process
18:54 luminous robawt: well, find a bootstrap process that meets all your usecases
18:54 luminous :)
18:54 luminous at least, that is my answer/method
18:54 Ryan_Lane I make a boostrap artifact in S3, then my salt states manage the venv during the salt run
18:54 Ryan_Lane so I can upgrade salt using salt in its own venv
18:54 luminous I like the look of nixos for that reason
18:55 luminous or for similar reasons
18:55 Ryan_Lane I should really write a blog post about my bootstrapping process
18:56 luminous please do, it is always great to hear/see
18:56 luminous everyone benefits
18:57 krow1 joined #salt
18:59 matthiaswahl joined #salt
19:00 retrospek how did you solve config migration between venvs?
19:01 Ryan_Lane config migration?
19:02 retrospek specific to the minion in a venv upgrading itself aspect that is
19:02 Ryan_Lane what breaks in that regard?
19:02 Ryan_Lane I haven't really tried it
19:02 Ryan_Lane my minion config lives in /etc/salt/minion
19:02 retrospek i ran down a similar path for handling upgrades for minions long ago so wondered if it was a solved problem. guess not :)
19:03 Ryan_Lane I use a venv for the code and dependencies, otherwise salt is setup like it normally would be
19:03 retrospek oh so you rely on that remaining consistent so not a full venv ok
19:03 retrospek guess that explains that heh
19:03 luminous retrospek: the binaries in /usr/local are linked to the venv
19:03 Ryan_Lane yep. so /usr/local/bin/salt-call -> /srv/salt/venv/bin/salt-call
19:04 retrospek yea but the configs arent so any change between versions borks
19:04 luminous why?
19:04 luminous what borks?
19:04 retrospek if you have a specific config for X vs Y
19:04 Ryan_Lane I have config in /etc/salt/minion and /etc/salt/minion.d/
19:05 logix812 joined #salt
19:05 luminous retrospek: manage all config through pillar
19:06 luminous nothing borks
19:06 Ryan_Lane yeah, the only thing that should likely exist in the venv is the code and dependencies
19:06 luminous don't use file.managed to copy a file, copy a template that uses pillar
19:06 luminous :)
19:06 Ryan_Lane heh. I use file.managed
19:07 Ryan_Lane but my states and such live elsewhere on the filesystem
19:07 luminous I'm not saying file.manage should not be used, but rather, recommending that we use file.managed with templates everywhere, with _all_ details coming from pillar
19:08 Ryan_Lane I actually try to use pillars as little as possibl
19:08 Ryan_Lane abstraction is the devil
19:08 luminous then, if you use something like reclass, where you have sensible management over pillar, extending pillar, and all that, you can do some incredible stuff with very little overheard
19:09 luminous pillar by itself sucks
19:09 luminous tbh
19:09 Ryan_Lane pillars actually works fine, if you use them sparingly :)
19:09 luminous it's terrible because there is no easy way to extend and manage pillar
19:09 luminous Ryan_Lane: I've taken the opposite approach, simply because reclass is included in the mix
19:09 luminous which, if you have not looked at, I highly recommend you do
19:09 Ryan_Lane pillars are only necessary because there's differences between environments and applications
19:09 luminous not really, no
19:10 luminous they make development of formula sane
19:10 Ryan_Lane or because you want to make very abstract states
19:10 luminous formula
19:10 Ryan_Lane I think the concept of formulas is a broken one by design
19:10 luminous my logstash formula is a template for installing and configuring logstahs
19:10 Ryan_Lane (and puppet forge, and ansible galaxy, and all of the other things like this)
19:10 luminous using reclass/pillar, I can then control which version and what types of configs
19:11 luminous what I've got is most definitely not broken
19:11 luminous it's actually incredible
19:11 diegows joined #salt
19:11 bhosmer joined #salt
19:11 luminous it has saved/keeps my sanity
19:11 luminous :)
19:11 Ryan_Lane formulas exist for the purpose of reuse
19:11 luminous reuse is only to an extent, you are correct
19:11 Ryan_Lane and in general when you go to reuse one, it needs to be modified and you end up with a fork
19:12 Ryan_Lane which defeats the entire purpose
19:12 luminous well, yea, but that is because you either accept their wya of doing things, or you have to integrate it into your stuff
19:12 luminous take logstash as an example
19:12 Ryan_Lane or you write a state yourself that's like 10x smaller and simpler :)
19:13 luminous you are missing my point, but that is ok
19:13 Ryan_Lane I know that i'm not taking the normal stance here ;)
19:13 luminous I don't disagree with you
19:13 luminous I came to salt with that perspective
19:13 luminous what I've got has gone above and beyond that, tbh
19:13 * Ryan_Lane nods
19:14 luminous you would not be able to pick up a piece of my stuff and just start using it
19:14 luminous that is not the problem I tried to solve though
19:15 luminous what I've outlined above is more helpful to those of us with lots of formula and crazy demanding schedules and needs, all of which need to be balanced and maintained
19:16 Ahlee_ i need a state to be able to know all directories in a specific directory, thoughts on how to pull that off?
19:17 Ahlee_ since it needs data from minion side I'm a bit perplexed on how to get this without a custom execution module, which I really don't want to do
19:17 beneggett joined #salt
19:19 rojem joined #salt
19:19 BrendanGilmore joined #salt
19:22 Ryan_Lane Ahlee_: when you say know all of them, you need to be able to reference them from other states?
19:23 Ryan_Lane you could use jinja like this: {% set myvar = salt['file.find'](path) %}
19:24 Ryan_Lane then iterate over them generating file.exists states
19:24 Ryan_Lane that's ugly, but it would work
19:25 Ryan_Lane if you don't need the states, but just need to know the files, setting the var is enough
19:28 beneggett joined #salt
19:34 q1x joined #salt
19:35 bhosmer joined #salt
19:40 fragamus joined #salt
19:41 krow joined #salt
19:44 Ahlee_ oh wow, yeah
19:44 Ahlee_ that'll work
19:44 Ahlee_ thanks man!
19:46 diegows joined #salt
19:51 q1x joined #salt
19:52 stevednd How does the fall through work for environments work with gitfs branches(if at all)?
19:52 Ahlee_ in order, first match wins
19:53 stevednd Ahlee_: Yes, but how does it know which branch is first?
19:53 Ahlee_ oh.
19:53 Ahlee_ well, each branch is going to be an environment
19:53 AdamSewell joined #salt
19:53 AdamSewell joined #salt
19:53 Ahlee_ so unless you match an environment it's going to go branch > master
19:53 Ahlee_ right?
19:54 Ahlee_ as master == base
19:54 Ahlee_ so if env=mybranch, nothing there it'll search master, then exti?
19:55 KyleG joined #salt
19:55 pfallenop joined #salt
19:55 KyleG joined #salt
19:55 eclectic joined #salt
19:55 Theo-SLC joined #salt
19:55 aCodinMan joined #salt
19:55 troyready joined #salt
19:55 harkx joined #salt
19:55 scooby2 joined #salt
19:55 stevednd right, but let's say I have something  using roots exactly like what's described here http://docs.saltstack.com/en/latest/topics/tutorials/states_pt4.html#environment-configuration
19:55 vbabiy joined #salt
19:55 dude051 joined #salt
19:56 ajprog_laptop1 joined #salt
19:56 lahwran joined #salt
19:56 stevednd the dev environment falls through from dev to qa, then to prod/base
19:57 djaykay joined #salt
19:58 stevednd I really don't want to have to constantly merge changes back up into the dev/qa branches if I just need to make the change straight from master\
19:59 smcquay joined #salt
20:04 rojem joined #salt
20:05 smcquay joined #salt
20:05 RandalSchwartz left #salt
20:08 notpeter_ joined #salt
20:11 poogles joined #salt
20:18 notpeter_ joined #salt
20:19 Ryan_Lane1 joined #salt
20:21 ajolo joined #salt
20:23 dooboo joined #salt
20:25 fragamus joined #salt
20:26 dooboo I'm confused on how to install modules such as salt.modules.git so i can use it on my minions?
20:27 forrest dooboo, you would install git
20:27 dober joined #salt
20:27 forrest dooboo, the modules are basically invoking commands on the system, so you need to have the underlying support.
20:27 dooboo install through pip or something else?
20:27 forrest if the module errors out it should say something along those lines
20:27 forrest git??
20:27 forrest no install via system package
20:27 retrospek lum/ryan: i was referring to the configuration file for the minion itself. not a state
20:29 Ryan_Lane retrospek: yeah, I put that into /etc/salt
20:29 Ryan_Lane so it's always the same between versions
20:29 retrospek yea therein lies the rub
20:29 Ryan_Lane just like if it was installed via a package
20:30 retrospek like the 'simple' case of trying to upgrade the version of a minion instance (venv) and at the same time introduce a new config (or keys, or regroom to a different master, etc)
20:30 retrospek freely changing venvs while using global configs is a problem
20:30 notpeter_ joined #salt
20:31 Ryan_Lane it should be possible to upgrade the venv in a state and then trigger a module refresh, right?
20:31 Ryan_Lane so if you're running ordered, you can always put that before the minion config change
20:32 Ryan_Lane I guess I'm also using salt-call and not running a minion daemon, so maybe I'm not hitting any issues there yet
20:32 sijis joined #salt
20:32 retrospek yea that's part of the issue. remotely invoking a transition from one minion instance to another. the handoff is fuzzy
20:33 retrospek ideally it would have changing of the guard logic to prevent the case of no minion running but that didn't exist last time i tried this
20:33 retrospek granted that's over a year ago now. still playing catchup on latest changes
20:34 Ryan_Lane the minion has some logic for doing this with pkg.install for salt-minion
20:37 retrospek yea doesnt help here when you have a pinned non package base heh
20:39 TheThing joined #salt
20:42 Comradephate joined #salt
20:42 dooboo I have git install but i want to call git.clone and I get ' 'git.clone' is not available.'
20:43 alainv dooboo: you may need to restart the salt-minion service
20:43 Ryan_Lane dooboo: are you installing git in a state, then trying to use the module?
20:43 Ryan_Lane in the same state run?
20:44 Ryan_Lane if so, you can refresh modules. using module.run (or module.wait) and the saltutil.refresh_modules module
20:44 Ryan_Lane http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.refresh_modules
20:44 sijis i'm tyring o salt client api on the master. if i just do python; import salt.client its ok. if i have a script test.py htat has 'import salt.client', i get 'no module named client'. (i'm in as root on the system)
20:44 sijis is there a 'trick' to this?
20:44 Ryan_Lane dooboo: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#module-salt.states.module
20:45 dooboo I'm not sure i just install a salt master and minion and I want to clone something on the minion
20:45 Ryan_Lane ah, you're just running execution modules
20:46 dooboo This si the command ' sudo salt '*' git.clone /var/www git://github.com/saltstack/salt.git'
20:47 Ryan_Lane you may want to restart the minion as alainv suggested
20:47 forrest dooboo, you did you install git onto the salt minion?
20:47 dooboo but I don't know if the salt module  git.clone is a builtin or do I have to pull it in from somewhere
20:47 Ryan_Lane it's builtin
20:47 forrest he still needs git installed for it to work though
20:47 rojem joined #salt
20:48 dooboo Ok the restart of the minoin seems to work
20:48 Ryan_Lane forrest: he had likely installed git, but the minion already has the modules loaded in memory
20:48 Ryan_Lane which doesn't include git
20:48 forrest yea
20:48 Ryan_Lane saltutil.refresh_modules likely would have worked too
20:49 alainv indeed
20:50 Ryan_Lane are the newest versions of salt using pycrypto and not m2crypto?
20:52 arthabaska joined #salt
20:55 dooboo Thanks for solving that issue. where do I put label/alias on a number of minions like "web" = [server1, server2, server3]
20:57 sijis left #salt
20:57 quantumriff joined #salt
20:57 johnthedebs joined #salt
21:04 talwai joined #salt
21:05 forrest dooboo, http://docs.saltstack.com/en/latest/topics/targeting/nodegroups.html
21:12 bhosmer_ joined #salt
21:15 bhosmer_ joined #salt
21:18 arthabaska joined #salt
21:19 Whissi joined #salt
21:23 snuffeluffegus joined #salt
21:32 bhosmer joined #salt
21:35 mgarfias_ joined #salt
21:35 mgarfias_ is there any magic for dealing with mkfs?
21:36 mgarfias_ in a state, not via CLI
21:39 druonysus joined #salt
21:39 druonysus joined #salt
21:40 forrest mgarfias_, use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html and the associated module
21:41 mgarfias_ oooh
21:42 Ryan_Lane is MarkupSafe a new requirement?
21:44 Ryan_Lane for some reason when I use pip -e <mygitrepo> for salt it isn't putting MarkupSafe into my venv
21:45 forrest Ryan_Lane, for 2014.1.7? I don't know, I haven't played with it yet
21:45 Ryan_Lane in develop
21:45 forrest oh
21:45 btorch is it possible to call a specific state within a state file ? like doing "state.sls common.controller_tools.files.{managed_file_name}" ?
21:45 forrest btorch, why would you want to do that?
21:46 forrest instead of either A. re-using that item, or B. including it via a unique state
21:46 btorch another ops was giving me crap that he couldn't just ask to modify one file :)
21:46 forrest why would he not just modify the file itself and re-run the state?
21:46 seanz joined #salt
21:47 forrest or does he only want to include that single file from the entire state?
21:47 btorch there are states with over 10 files managed and creating a state file for each seems weird
21:47 forrest if so, sounds like the state needs t obe broken up
21:47 seanz whiteinge: ping
21:47 forrest btorch, well, he doesn't want 9 of them, and only 1?
21:47 joehillen joined #salt
21:47 forrest sounds like that should have it's own state which is included in the state with 9 other files if he doesn't want those :P
21:48 btorch yeah , this is in cases like if other ops are also modifying files within the same state, so when he asks to update that state other files would be updated as well that is not related to his changes
21:48 forrest btorch, ahh yea that's a problem in any org, sounds to me like if that is the case where those other users can break files, it should be in it's own state.
21:49 Ryan_Lane oh. I think I'm just doing something wrong
21:49 forrest then you could just include all of the files in one 'modify_all_files' state
21:49 forrest and avoid stepping on the toes of others.
21:49 btorch forrest: I see, yeah I guess we could have common/controller_tools/files/each_files.sls :)
21:49 Ryan_Lane heh. my venv wasn't being created
21:50 forrest btorch, yea that is what I would do, it's not perfect, but it avoids a lot of problems
21:50 btorch it just sounds like a lot of pain and files , specially on other states that the number of files are huge
21:51 btorch but could worl for small stuff
21:52 forrest btorch, well, I wouldn't suggest it for everything, in most cases files are associated with services right? This is just a one off because one person could screw another within the same area, which isn't super common
21:52 btorch ordering could end up messy no ? when some files require others to be first .. needs to be careful with that I guess
21:52 forrest well, if you have a deps chain, then you should be including those in each other
21:52 forrest at that point, you just need people to not do stupid stuff :P
21:53 forrest or everyone has their own branch they are using for testing
21:53 forrest always an option
21:53 mgarfias_ forrest: does this look right?  https://gist.github.com/mgarfias/44b21c47b16dbd999375
21:54 btorch forrest: well I have tried to split things up into packages.sls, services.sls, files.sls .. etc but yeah in order for services to run some files need to be exist first ... etc
21:54 forrest mgarfias_, looks good to me other than a missing state ID
21:54 btorch forrest: thanks for the info though
21:54 forrest btorch, right but does the service rely on all 10 files?
21:54 mgarfias_ oh yeah, i missed the copy :)
21:54 btorch forrest: nah
21:55 forrest mgarfias_, yea seems ok to me then, I haven't used that one much, but the syntax looks fine
21:55 forrest btorch, ahh ok
22:05 tkharju4 joined #salt
22:11 TheThing joined #salt
22:19 smcquay_ joined #salt
22:25 smcquay joined #salt
22:32 tligda joined #salt
22:34 whiteinge seanz: pong
22:35 forrest worst game of ping pong ever :(
22:36 seanz whiteinge: Hey man, how be it?
22:36 retrospek they like eating the balls too much
22:36 jeward joined #salt
22:37 rojem joined #salt
22:37 smcquay joined #salt
22:37 whiteinge seanz: good, sir! you?
22:40 tkharju joined #salt
22:40 seanz whiteinge: Doing well. I just got upgraded to Google Fiber this week. :) It's quite smooth.
22:41 seanz That's not why I'm pinging you, but I am excited enough to have wanted to mention it.
22:41 seanz whiteinge: I actually had a salt question related to Java software and wanted to see if you had any thoughts.
22:41 seanz If you've got time for such questions now.
22:41 * whiteinge shakes his fist at seanz in jealousy
22:42 seanz Oh, that I get to use Java?
22:42 whiteinge seanz: i have many thoughts on java software
22:42 seanz haha - join the club.
22:42 whiteinge ...that is not one of my thoughts, no.
22:42 seanz haha!
22:42 whiteinge shoot
22:42 seanz Mine is a salt-Java question. I've got a Java service that starts up, takes about 20-25 seconds to really be running.
22:43 seanz I've got a stateful bash script that configures the service.
22:43 seanz The bash script pings every second continually for 2 minutes until the service responds, and then issues the configuration commands.
22:43 seanz At first, this worked. I moved the salt state around a bit, and now, no matter how long the bash script pings, the service never comes up until *after* the bash script is done.
22:44 seanz I even had it pinging for up to 20 minutes before. Nothing.
22:44 seanz Just wondering if you have run into a similar situation.
22:44 whiteinge sounds like the bash script is blocking the whole state run
22:45 seanz whiteinge: How could that happen?
22:45 seanz The service reports back as started, and then the bash script is called.
22:46 seanz So the events are happening in the right order at least.
22:47 whiteinge each function in a state run is called sequentially, nothing is run in parallel. how do you know the service is getting started first?
22:48 seanz I can see the {'my_java_service': True} in the raw output.
22:48 seanz I also see the service.status and service.restart calls before the script is called.
22:50 whiteinge when the state run is finished do you see that same order in the final ouput?
22:51 seanz Yes, I see the service being started and then the script being called.
22:51 seanz Sometimes there are other things in between, but nothing that would break the overall flow.
22:52 tligda joined #salt
22:54 seanz whiteinge: Possibly also worth noting: I monitor the log file for the service, which doesn't even get created until a few seconds after the bash script runs.
22:54 seanz So the bash script may be blocking it, but I really don't know how.
22:55 whiteinge hm. well it certainly *sounds* like a race condition. at the time the bash script starts the thing it's looking for doesn't exist so it just blocks until the timeout
22:56 seanz whiteinge: The odd thing is that I've put some "distance" between the two and have another package and configuration file being installed between when the service starts and when the bash script runs.
22:56 whiteinge perhaps the startup time of the java app? when you start the service for that does it return immediately even though the java app is not fully started?
22:56 seanz Yes, it does.
22:56 whiteinge hm
22:56 seanz Here is the big change in the salt state:
22:56 seanz This approach was working during my first iteration of this state.
22:57 whiteinge seanz: maybe a quick test could be to just put a 40-second sleep at the top of the bash script before it starts looking for the thing it's monitorying
22:57 Luke joined #salt
22:58 seanz whiteinge: I can try that. I believe I've tried it once where I put in a cmd.run sleep statement and it didn't help, but let me do as you suggest.
23:00 tligda joined #salt
23:01 retrospek seanz: when you install the package are you telling the pm/upstart (if ubuntu) to not run the service in default config before subsequently starting it later in the other state?
23:01 retrospek could be it is running with the stock config and not the one you intend
23:01 seanz retrospek: Greetings!
23:01 seanz Let me check.
23:03 seanz retrospek: So you're saying I could have the service configured to not run in the current runlevel and then starting it manually, with the result that it doesn't start?
23:04 elfixit1 joined #salt
23:05 seanz The upstart script has the lines "start on startup" and "stop on shutdown".
23:05 seanz I assume that means what it looks like it means.
23:06 retrospek well it depends on the chain of actions. it sounded like you said it worked when you installed the pkg and had a script waiting on it
23:06 retrospek then it broke when you changed that to "1) install pkg A 2) install pkg B 3) change config for A 4) run script that waits on A"
23:06 vbabiy joined #salt
23:07 retrospek im just saying if that's accurate when you installed A it came up with the package default config unless you specifically told the package manager to NOT start the process on package install completion
23:07 seanz retrospek: There is no official package for this software. It's a manual download, untar, symlink, drop in the upstart file, run.
23:07 retrospek and that's what your script is doing? all those steps?
23:07 seanz That's what the salt state is doing.
23:07 retrospek then waiting at the end until it is 'up'?
23:07 seanz The script is making HTTP requests to the service's API.
23:08 seanz It waits at the beginning until it is responding to status pings, and then begins issuing requestes.
23:08 seanz *requests
23:08 bhosmer joined #salt
23:08 retrospek that busyloop is at the end of the install script or separately running forever until realized (and you want it concurrent)?
23:10 seanz retrospek: So the salt state installs the upstart file and then does a service.running to start it up. Then the configuration script is executed which pings the service every second for 120 seconds until it is available. Once the pings are responded to, then the script starts issuing configuration commands.
23:12 retrospek using require/watch then?
23:12 seanz retrospek: Using require.
23:12 yomilk joined #salt
23:13 seanz The bash script is stateful and therefore also idempotent. It runs on every highstate without concern for other changes.
23:14 retrospek which one? the watcher or the installer (or both)?
23:15 seanz What do you mean by the watcher? The configuration script?
23:15 retrospek mmm sure
23:15 seanz I want to make sure I understand your terms.
23:15 retrospek they're yours. you tell me :P
23:15 seanz haha, ok.
23:15 seanz The upstart script is obviously only dropped in once.
23:16 retrospek you have state A invoking the installation (tarball, upstart hack) - that's run every time?
23:16 seanz The Java program is downloaded, untarred and "installed" only once.
23:16 retrospek k
23:16 retrospek so the configuration part is what you mean runs every highstate
23:16 retrospek k
23:16 seanz Yes.
23:16 seanz Well, it all runs but sometimes no action is taken.
23:16 seanz That was a given. Sorry, didn't need to be said.
23:17 seanz So the configuration script always runs after the service is ensured to be running.
23:17 seanz Dumb thing about this service is that it doesn't have a "status", so salt always just restarts it.
23:18 seanz I don't know that that matters in this case.
23:18 retrospek so the 'problem' is that the installation state runs/works, but the configuration script never finishes? (sleep forever?)
23:19 seanz The configuration script stops looking for the service after 120 seconds. The thing is, no matter how long I set the configuration script to wait, the Java service always starts running *after* it fails.
23:19 seanz After the configuration script finishes.
23:19 seanz I know this because I tail the log before it exists: test -f /path/to/log && tailf /path/to/log
23:20 seanz So I know as soon as the service is up enough to start logging (which is pretty early on) that it is alive and starting up.
23:20 seanz It's a jetty server that is serving up the Java application - I don't know if that matters.
23:20 retrospek and this configuration script is ONLY referenced in the require for this installation state?
23:20 forrest oh java
23:20 seanz Yes, if I understand your question.
23:20 seanz forrest: Yes, I talked with you about this before.
23:21 forrest seanz, yea
23:21 forrest I just don't get java
23:21 seanz You suggested waiting a bit, which I implemented in the form of pinging the service.
23:21 forrest it's so bad in so many ways
23:21 forrest yet used so often :\
23:21 forrest did you try to use at?
23:21 forrest at now +1 and have that do the check?
23:21 seanz Is that the ad hoc cron scheduler command?
23:21 forrest so then you don't run into that issue with the constant ping
23:21 retrospek because if your state A (installation) is only running after B (monitor) finishes you have a state inversion problem
23:22 forrest uhh not really, it just let's you schedule a command in the future. It's a common workaround for restarting the salt minion, it might work for this.
23:22 retrospek which implies B is being used elsewhere
23:22 retrospek you could look at the lowstate and see the actual order of operations
23:22 seanz retrospek: state.lowstate?
23:22 forrest yep
23:22 retrospek you may have a ABA issue
23:23 retrospek state.show_lowstate
23:23 seanz Ah, ok. Let me try.
23:23 forrest sorry seanz was replying to retrospek :P
23:24 seanz I'm not quite sure how to read this. If I pastebin it, would you mind taking a look?
23:24 retrospek sure
23:24 kumarat9pm joined #salt
23:24 retrospek can't really help without context anyhow. this is all academic at this point
23:24 * forrest hands retrospek his top hat and monocle
23:24 seanz retrospek: It's not academic. It's MY LIFE.
23:25 seanz Just kidding.
23:25 forrest if your life is work, I feel bad :(
23:25 seanz This has been quite a pain for a while, though.
23:25 forrest ditch java
23:25 seanz forrest: Touche.
23:25 forrest problem solved :P
23:25 forrest just go 'sorry guys, java is too shit, please use a good scripting language, functionality be damned!.'
23:25 retrospek well that travels into the realm of solipsism quickly
23:27 seanz retrospek: http://pastebin.com/hMZzWaHX
23:27 seanz Of course, I have to leave in 3 mins, but I will check back w/ you and see if you have any thoughts based on this pastebin entry.
23:28 seanz Odd that the configuration call is at the top of the output. I wouldn't expect that.
23:29 seanz The lowstate is in the same order as highstate? This order is different than the highstate output.
23:29 seanz I better just read up on lowstate vs highstate.
23:29 seanz In the meantime, I have to head out. Thanks again whiteinge, forrest and retrospek for talking this through with me.
23:29 poogles joined #salt
23:30 forrest later
23:30 retrospek well part of the issue is that you're giving everything order 1 in the same state so it is effectively whatever salt decides to do with it
23:31 beneggett joined #salt
23:32 yomilk_ joined #salt
23:33 retrospek oh nm this is the lowstate and not your sls
23:34 retrospek wrong pastebin :)
23:45 TyrfingMjolnir joined #salt
23:55 Hell_Fire is the mine available from the master minion when using state.orchestrate?

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