Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-04-28

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

All times shown according to UTC.

Time Nick Message
00:08 gw joined #salt
00:08 gw joined #salt
00:09 Guest55616 joined #salt
00:09 Guest55616 joined #salt
00:10 gw_ joined #salt
00:10 gw_ joined #salt
00:12 diegows joined #salt
00:20 mgw joined #salt
00:24 Ashtonian joined #salt
00:27 mateoconfeugo joined #salt
00:42 rygyonthefly joined #salt
00:49 Luke_ joined #salt
00:53 ajw0100 joined #salt
01:00 garthk joined #salt
01:00 faldridge joined #salt
01:03 jslatts joined #salt
01:07 halfss joined #salt
01:14 garthk_ joined #salt
01:16 mgw joined #salt
01:17 malinoff joined #salt
01:19 mpoole joined #salt
01:21 ajw0100 joined #salt
01:23 rygyonthefly joined #salt
01:24 rygyonthefly_ joined #salt
01:31 garthk joined #salt
01:34 rome joined #salt
01:37 rome joined #salt
01:39 rygyonthefly joined #salt
01:39 fridiculous joined #salt
01:40 fridiculous what's the best way to reassign minions in salt-cloud?
01:40 fridiculous e.g. i have a database minion, which i want to make as a database_minion_backup and spin up a new database minion of that same name instead
01:44 malinoff fridiculous, the general way is: delete database_minion from `salt-key`, ssh to the database_minion instance, remove /etc/salt/minion_id, change id in /etc/salt/minion, restart minion, accept key with `salt-key`
01:44 malinoff I don't familiar with salt-cloud, maybe there is a better way to do this
01:44 MoonSweep joined #salt
01:44 ckao joined #salt
01:44 fridiculous i see
01:44 MoonSweep left #salt
01:46 manfred as far as I am aware, there is not a way to do that directly in salt-cloud
01:48 Nexus_x1_ joined #salt
01:48 garthk joined #salt
01:50 fridiculous manfred do you agree with the general point?
01:52 manfred i get the idea, but i don't believe there is anything in salt-cloud that could accomplish it, best thing would be to do a file.replace on /etc/salt/minion to change the minion_id, or depending on how the files load, maybe just overwrite the current minion_id with a file in /etc/salt/minion.d/ , and then restart salt-minion on that minion using an atd job and accept the new key
01:52 manfred then delete the old one, and spin up your new server
01:59 joehoyle_ joined #salt
01:59 mgw joined #salt
02:08 deares joined #salt
02:11 acabrera joined #salt
02:12 jrdx joined #salt
02:13 individuwill Is there a way to get the iptables state to stop adding a duplicate rule on each highstate?
02:15 garthk_ joined #salt
02:15 rygyonthefly joined #salt
02:16 TyrfingMjolnir joined #salt
02:17 manfred are you using iptables.append or position?
02:18 manfred append does a search for the rule to be in your iptables rules, and if it is in there already, it won't add it
02:19 manfred actually, it does a check regardless https://github.com/saltstack/salt/blob/develop/salt/states/iptables.py#L393
02:20 manfred can I see your iptables state and what version of salt you are running?
02:25 individuwill here is the state I’m using: http://pastebin.com/KxGN7Z5d
02:26 Luke_ joined #salt
02:26 individuwill salt version: 2014.1.0-5305-gbfa3413
02:27 individuwill manfred: I tried append and insert, and both are duplicating the rule
02:28 xl1 joined #salt
02:29 Gordonz joined #salt
02:31 rygyonthefly joined #salt
02:32 mgw joined #salt
02:34 ajw0100 joined #salt
02:35 mgw joined #salt
02:35 mateoconfeugo joined #salt
02:36 toastedpenguin joined #salt
02:43 manfred individuwill: what distribution are you running on?
02:44 individuwill manfred: centos 6.5
02:45 rygyonthefly joined #salt
02:45 manfred there is something wrong with the logic used with os_family == 'RedHat' in the iptables.check module
02:46 manfred it tries to check everything against the output of iptables-save, and fails
02:47 smcquay joined #salt
02:51 war2 joined #salt
02:52 manfred individuwill: https://github.com/saltstack/salt/pull/12337
02:54 individuwill nice....
02:54 garthk joined #salt
02:54 individuwill manfred: did you just put that together now?
02:56 mapu joined #salt
02:56 manfred yes
02:58 individuwill awesome! any idea why the redhat os was being checked differently?
03:00 manfred i do not
03:00 micko joined #salt
03:00 manfred but the problem with the iptables-save version
03:01 manfred is it doesn't take into account using long opts or short opts from what I can see
03:01 manfred and iptables has a built in -C to check them
03:01 individuwill ahh
03:01 manfred (unless it didn't on Rhel 5...)
03:02 manfred on your centos 6 box it did have iptables -C right?
03:03 manfred it does not
03:03 manfred damn
03:03 manfred that is why
03:05 garthk_ joined #salt
03:05 catpiggest joined #salt
03:07 individuwill my version of iptables seems to recognize the -C option
03:07 individuwill it gives me: option ‘-C’ requires an argument
03:07 manfred oh really
03:07 individuwill but I can’t seem to get the syntax correct to actually do something
03:07 manfred hrm...
03:08 mateoconfeugo joined #salt
03:08 manfred iptables -t filter -C INPUT -i lo -j ACCEPT
03:08 mateoconfeugo joined #salt
03:10 rygyonthefly joined #salt
03:10 individuwill that command gave the same error
03:11 manfred what is the error?
03:12 individuwill `iptables v1.4.7: option `-C' requires an argument`
03:12 manfred yeah, that is what I get, it might be something weird with iptables handling incorrect flags, but it doesn't accept the -C check flag
03:13 war2 joined #salt
03:13 aarontc joined #salt
03:15 malinoff individuwill, did you copy-paste that command or input by yourself?
03:16 manfred malinoff: i get the same error, there just isn't a -C option on iptables for 6 or 5, i just spun up cloud servers to check
03:16 malinoff manfred, I've googled this: http://serverfault.com/questions/573665/iptables-v1-4-7-option-state-requires-an-argument
03:16 malinoff That might be a case
03:17 manfred yeah, but iptables --help on a centos 6 box doesn't have the -C flag
03:17 malinoff Oh
03:19 andrej or --check, for that matter
03:19 andrej check in unknown to Rhel it appears
03:23 fragamus joined #salt
03:24 ninkotech joined #salt
03:30 liwen joined #salt
03:37 napper joined #salt
03:38 manfred individuwill: you will have to tailor your rules to how they will look in iptables http://ix.io/bY2
03:38 manfred individuwill: like Related goes before Established, so even though you can actually write the rule differently, iptables will spit it out in a specific order, just need to make sure that yours match that
03:40 individuwill let me make sure I understand…
03:40 individuwill the order needs to match top to bottom?
03:41 manfred no, the order that the state is rendered in needs to match the way that it will be in iptables-save
03:41 manfred because there is no --check in iptables for 6
03:42 Gordonz joined #salt
03:42 manfred so, if you remove your comment
03:42 manfred because it won't order the two matches correctly
03:42 manfred http://ix.io/bY3
03:42 manfred that one will work
03:43 manfred because it wants the j, instead of --jump
03:43 manfred it is just doing essentially a regex on the output of the command
03:44 manfred and it orders the rule like this when you have state and comment under match
03:44 manfred -A INPUT -p tcp -m state -m comment --state NEW,ESTABLISHED -m tcp --dport 1080 --comment "Allow Socks5 connections to dante" -j ACCEPT
03:44 manfred with the two matches at the front
03:44 manfred and iptables-save moves them around'
03:45 manfred -A INPUT -p tcp -m state --state NEW,ESTABLISHED -m comment --comment "Allow Socks5 connections to dante" -m tcp --dport 1080 -j ACCEPT
03:45 manfred so it won't match
03:46 micko joined #salt
03:47 RandalSchwartz what do I need to do to launch bare metal with salt?
03:47 RandalSchwartz as in, something on EC2?
03:48 RandalSchwartz Is there a salt-installed AMI?
03:48 manfred RandalSchwartz: are you familiar with salt-cloud?
03:49 manfred it will spin up an image on the major cloud providers, and then ssh in and bootstrap them for you
03:49 garthk_ joined #salt
03:49 manfred RandalSchwartz: http://salt-cloud.readthedocs.org/en/latest/topics/aws.html
03:49 manfred so then any ami image becomes salt installed
03:53 individuwill manfred: perfect!
03:54 individuwill thanks much for your help with that
03:54 manfred np
03:55 Eugene You should be able to do truly "bare metal" with a Kickstart script, etc
03:56 RandalSchwartz not sure what the equivalent of that is for freebsd, but ok.
03:57 Corey RandalSchwartz: Provisioning bare metal over a netinstall on FreeBSD wasn't trivial, the last time I looked at it.
03:57 Eugene Any installation of FreeBSD is non trivial, but hey....
03:58 Corey Yeah. It's great once it's working, but getting it there is "fun"
03:58 Eugene "I am a Wizard" vs "I want the Wizard to do it for me"
03:59 ericholscher left #salt
04:20 garthk_ joined #salt
04:25 MBroadhead joined #salt
04:29 garthk joined #salt
04:39 MBroadhead joined #salt
04:40 mgw joined #salt
04:47 garthk joined #salt
04:52 jY is there anyway to log modules like anything run via cmd.run?
04:52 UtahDave joined #salt
04:54 elfixit joined #salt
05:08 gildegoma joined #salt
05:08 mapu joined #salt
05:09 manfred individuwill: https://github.com/saltstack/salt/pull/12338
05:10 manfred so that it won't do it on future versions of rhel/centos/fedora
05:10 manfred and now I am off to bed
05:10 manfred o/
05:11 MBroadhead o/
05:11 individuwill manfred: much more explicit! now I can tell why redhad is different in the code
05:11 individuwill thanks again for your help!
05:12 MBroadhead joined #salt
05:13 fridiculous so i need some help
05:13 fridiculous i changed the id
05:13 fridiculous deleted the key
05:13 fridiculous and yet the minion still keeps popping up
05:13 fridiculous this is in reference to the earlier question i raised, a couple hours ago
05:14 war2 joined #salt
05:14 fridiculous i disabled caching, and yet it still keeps poping up
05:17 epcim joined #salt
05:24 fridiculous can anyone tell me why despire changing my minion name
05:25 fridiculous my minion id automatically still pops up as a key on my salt-master
05:25 bezaban where did you change it?
05:25 bezaban I've had luck changing in /etc/hosts, deleting key, restarting minion
05:26 bezaban but that is still an auto-generated key as opposed to an arbitrary one
05:26 Corey fridiculous: Yes, I can indeed.
05:27 Corey fridiculous: In a lapse of judgement, minion ID is set by the results of socket.getfqdn() in Python. Fire up the python interpreter and see what that says.
05:27 Corey It tends to take the form of an rDNS query of all things.
05:28 bezaban you can explicitly set it in the minion config with the id: directive.  Never tried it thoguh
05:28 Corey bezaban: Yes, that works as well. :)
05:29 bhosmer joined #salt
05:31 fridiculous i've done all of that bezaban
05:31 fridiculous thanks
05:31 fridiculous >>> socket.getfqdn() 'elasticsearch2.qa.livelovely.int'
05:32 fridiculous i've deleted my cache
05:32 fridiculous it worked before on another minion
05:32 fridiculous change hostname
05:34 MBroadhead Hi guys, I want to help contribute to this project. I'm an information systems grad but have 0 experience with code other than mine. Anyone want to mentor me? :D
05:35 MBroadhead I want to start helping with bugfixes but feel like I am in over my head.
05:36 bezaban well. Start by cloning the the salt github and see if there are any issues you can submit a pull request for
05:37 MBroadhead I've cloned it and have been trying to get familiar with the code but am overwhelmed. I just don't know where to start
05:38 MBroadhead I've never dealt with code that I have to install on a machine. Is there a better way to test changes/
05:38 garthk_ joined #salt
05:38 MBroadhead I'm also new to CI
05:38 MBroadhead and jenkins etc
05:39 schimmy joined #salt
05:39 bezaban I don't have that kind of insight in saltstack either, so I'm not of much help, but I'd think you'd want some experience with using it - so maybe a test setup would be in place
05:40 MBroadhead I've set up a jenkins instance in my homelab but haven't gotten much further than that.
05:43 schimmy joined #salt
05:44 Nikolas joined #salt
05:44 Nikolas left #salt
05:48 fridiculous corey, bezaban, the issue was i ssh'ed on to the server and as i was on it, the server was still communicated with the master
05:54 garthk_ joined #salt
05:55 ravibhure joined #salt
05:57 fridiculous anyone know what this is, with respect to salt-cloud? [ERROR   ] Failed to deploy 'minion'. Error: Failed to connect to remote ssh
06:06 it_dude joined #salt
06:11 gamedna joined #salt
06:11 nmistry joined #salt
06:13 it_dude joined #salt
06:26 garthk_ joined #salt
06:40 alunduil joined #salt
06:42 jayfk joined #salt
06:42 ggoZ joined #salt
06:44 micko__ joined #salt
06:48 gammalget joined #salt
06:48 micko joined #salt
06:55 slav0nic joined #salt
06:55 slav0nic joined #salt
06:57 garthk joined #salt
06:59 giannello joined #salt
06:59 anuvrat joined #salt
07:03 slav0nic joined #salt
07:03 slav0nic joined #salt
07:05 Kenzor joined #salt
07:08 harobed joined #salt
07:08 ml_1 joined #salt
07:08 harobed joined #salt
07:17 mekstrem joined #salt
07:17 dRiN joined #salt
07:21 CeBe joined #salt
07:28 Ansem joined #salt
07:29 alunduil joined #salt
07:43 bmonty joined #salt
07:43 AviMarcus joined #salt
07:53 giannello joined #salt
08:00 liwen joined #salt
08:01 topochan joined #salt
08:12 jcsp joined #salt
08:15 CeBe joined #salt
08:16 aleszoulek joined #salt
08:16 gw joined #salt
08:16 gw joined #salt
08:20 giannello joined #salt
08:29 kadeshiseraph joined #salt
08:30 borgstrom joined #salt
08:31 justlooks joined #salt
08:32 justlooks hi,how can i get substring in pillar variable?
08:32 kadeshiseraph Hello! I am hoping someone can help point me in the right direction, I'm experiencing strange behaviour in Salt. Targeting all minions with '*' returns multilpe responses from minions. Some minions return 3 "true" for a test.ping, others return 1, others 2. This is the same for test.ping and other commands but I only get one return when I target a single minion. Any ideas? Thank you
08:35 babilen kadeshiseraph: Haven't seen that before. Which salt version do you use on the master and the minions? Do you also only get a single response from those minions that returned multiple before?
08:39 kadeshiseraph salt master version 2014.1.1. Most minions have the same version, a couple with 2014.1.3. Both versions return multiple responses. I get multiple responses from each minion when targeting all but always a single response when I match their name.
08:40 giantlock joined #salt
08:40 justlooks can jinja2 use regex to replace a substring?
08:42 babilen justlooks: You can use standard python functions for that in your jinja templates
08:43 babilen justlooks: Also see http://jinja.pocoo.org/docs/templates/#replace in the jinja documentation
08:48 justlooks babilen:  can replace filter use regex to match old ?
08:49 pviktori joined #salt
08:55 babilen justlooks: replace is the equivalent of Python's string.replace and therefore only takes substrings
08:55 babilen (which is what you asked for)
09:00 swissknife joined #salt
09:00 borgstrom joined #salt
09:00 cnelsonsic joined #salt
09:04 justlooks babilen:  i try write this {% for i in pillar['cluster'] %}{{ (sel,ip)=i.split(':');sel }}{% endfor %} but failed , (sel,ip)=i.split(':');sel is python ,but how can i write multi-statement into {{ }} ?
09:09 aleszoulek joined #salt
09:11 gammalget joined #salt
09:13 krak3n` joined #salt
09:14 babilen justlooks: I am actually trying to answer exactly the same question too. I'll let you know once I've figured it out.
09:14 babilen justlooks: http://jinja.pocoo.org/docs/templates is a good place to start
09:16 mekstrem joined #salt
09:22 justlooks try to do like this failed https://gist.github.com/justlooks/11366523
09:25 gildegoma joined #salt
09:30 topochan joined #salt
09:32 Vivi-1 joined #salt
09:32 Vivi-1 Hello there
09:35 krak3n` joined #salt
09:36 ninkotech joined #salt
09:40 swissknife left #salt
09:47 Ansem joined #salt
09:55 Ansem joined #salt
09:58 bhosmer joined #salt
10:00 gmoro joined #salt
10:11 elsmorian1 joined #salt
10:11 elsmorian1 Hi all
10:12 jayfk hi
10:12 elsmorian1 Is there a way to get highstate to print out the result of commands it runs as they happen?
10:13 elsmorian1 Usual behaviour seems to be run command, then print output
10:14 elsmorian1 I know salt looks at the output to try and determine if a command has succeeded or not whcih might cause issues I guess
10:24 TyrfingMjolnir joined #salt
10:25 viq elsmorian1: there is an experimental 'salt console', but that's a different beast. I would say "no", but someone can prove me wrong
10:26 priyan joined #salt
10:27 priyan hi
10:27 elsmorian1 viq: ahh, thanks anyway :)
10:27 priyan is salt free to use ?
10:27 Vivi-1 priyan: sure
10:28 Vivi-1 you can fork it on github
10:28 priyan great.. for corporate also ?
10:28 Vivi-1 sure
10:28 priyan that's again cool :D
10:33 morsik joined #salt
10:34 morsik hello there, it's possible to not show files that were not touched by salt when i'm using state.highstate?
10:34 morsik we have bacula configuration deployment from salt, and reading status od 1k files is not nice when we're finding only for few new/changed files ;\
10:37 balboah joined #salt
10:37 balboah left #salt
10:40 viq morsik: http://salt.readthedocs.org/en/latest/ref/configuration/master.html?highlight=state_output#state-output  ?
10:40 viq Not quite what you ask, but closer
10:41 morsik viq: yeah, just found that - I think this is what I need. Checking right now
10:41 viq morsik: you can pass that as a flag to salt too
10:42 viq salt -v --state-output=changes '*' state.highstate
10:45 morsik viq: but it's about output, not about verbose.
10:45 morsik state_verbose is what i was looking for
10:46 morsik few lines up in docs you sent (-;
10:46 ranjan joined #salt
10:49 viq hm, never really looked at that setting ;)
10:49 ranjan Hi, all, I am new to Salt, was a puppet user before
10:50 babilen ranjan: It's okay .. we've all been there
10:50 ranjan I would like to have some help in setting up halite
10:51 viq ranjan: ask the questions, we'll see if we have answers ;)
10:52 ranjan viq: i am trying on a CentOS 6.5 and install salt-{minion,master} and python-halite from epel, now can someone point me to a working doc, that will help me in integrating halite and salt-master
10:53 viq https://github.com/saltstack/halite/blob/master/README.rst
10:54 viq ranjan: namely "Deployment" section of it
10:55 ranjan viq: let me give a try
10:57 hhenkel Hi all, I got a question regarding target matching with pcre with the example of: http://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions
10:58 hhenkel Wouldn't it be correct to use '^(memcache|web)\.(qa|prod)\.loc$': instead of the stuff written there?
10:58 ranjan viq: i am getting a message like this when trying to create self signed cert using salt tls.create_ca_signed_cert' is not available.
11:00 hhenkel I'm currently facing problem with matching hosts with pcre and from what I can say and have checked my syntax seems right but salt misbehaves.
11:01 viq ranjan: IIRC you need to install something like PyOpenSSL
11:01 viq ranjan: pyOpenSSL appears to be the proper name of the package on centos
11:03 ranjan viq: install pyOpenSSL still the same.
11:03 viq ranjan: did you restart salt-minion after installing that?
11:03 xmj gnihihi: when will salt switch to LibreSSL ?
11:04 viq xmj: isn't that somewhat up to the underlying OS? I don't think salt brings by itself any crypto libraries
11:05 dstufft left #salt
11:07 ranjan viq: oh so restarting salt-minion did the trick, but how is that related,??
11:07 xmj viq: probably one of salt's dependencies in turn depends on pyOpenSSL depends on OpenSSL
11:07 ranjan viq: oh okie, understood :)
11:07 xmj layered cake
11:08 viq ranjan: salt-minion loads functionality it has available. It didn't have that available, it was telling you so. And then you reloaded it, it rechecked, and started reporting new functionality
11:09 viq xmj: yeah. And so far I don't think there are many things that even know about LibreSSL, not to mention supporting it
11:09 viq xmj: is LibreSSL even made portable yet? I haven't looked, I know it wasn't a week ago ;)
11:10 xmj i saw someone link to a libressl-portable repo on git
11:11 xmj but even then the question is if it can be used as dropin replacement for pyOpenSSL to depend on ... :-)
11:11 viq I think they said it's API-compatible
11:12 xmj awesome
11:14 elfixit joined #salt
11:14 crooton joined #salt
11:17 ranjan viq: SSL Certs are ready, and restarted salt-master, but i cant see anything running on port 8080 as per the master configuration for halite
11:17 yomilk joined #salt
11:18 viq ranjan: meh, I was hoping for you it would work, I had exactly same problem, didn't solve it yet
11:18 viq terminalmage: have you tried running halite on redhat/centos?
11:18 diegows joined #salt
11:26 babilen I want to use the value as defined in the pillar or fallback to HOSTNAME-fd in a configuration file. Am trying "{{ foo.name|default("%s-fd"|format(grains['host']))}}" now, but find that a bit verbose. Would that work and is there a better (easier to understand if you read it) idiom for that?
11:29 viq babilen: {{ salt['pillar.get']('pillar', 'default value') }}    ?
11:30 babilen viq: yeah, I had something like that before .. I would probably just use '"%s-fd"|format(grains['host'])' in lieu of 'default_value' in that case. Correct?
11:30 viq I wonder if this would work: {{ salt['pillar.get']('some:pillar', {{grains['host']}}) }}
11:30 babilen And is salt['pillar.get'] or pillar.get preferred?
11:31 babilen viq: I am not sure if I can nest {{ }} like that and I also need the additional "suffix -fd" after the hostname" bit in there
11:32 viq babilen: http://salt.readthedocs.org/en/latest/topics/pillar/index.html#pillar-get-function discisses that
11:32 viq babilen: no idea
11:32 babilen me neither and I am growing tired of stabbing in the dark which is why I asked here :)
11:32 viq babilen: you can always do {{ ... }}-fd
11:32 babilen yeah
11:33 babilen So now I only have to figure out if I can nest in jinja
11:33 topochan joined #salt
11:36 ranjan viq: no one else has got halite working !! this is strange
11:36 jY is there anyway to log modules like anything run via cmd.run?
11:37 viq ranjan: oh, I got it working - on debian installed from pip
11:37 ranjan which version of each salt-* are you using?
11:38 fsniper joined #salt
11:39 viq Most of my boxen are now on 2014.1.3
11:40 fsniper Hello. I have a problem with multiple envs and custom modules. I have a host on dev environment and salt host pillar.getgives me all the related pillars. But with salt host custommodule.method salt prepares __pillar__ from prod environment so the module fails.
11:41 fsniper can anybody help me?
11:41 hhenkel Anyone around that is willing to help out with regex issues? https://www.refheap.com/82201
11:41 xmj terminalmage: hey, do you plan to extend salt.states.pkgrepo for freebsd's pkgng repositories ?
11:41 xmj APT and YUM-based repos are all fine but pkgng is shiny too :-)
11:42 viq xmj: while at it you could pester someone to alias dryrun=True to test=True so it behaves same as the others
11:42 fsniper hhenkel: try '^svx-be-cleh?dat0[1-9]\.(example\.com|example\.loc)$':
11:42 xmj viq: you do it :p
11:43 viq xmj: no, right now I'm battling syslog :P
11:44 viq Also trying to figure out how to make salt create a symlink whose name is an output of a command
11:44 hhenkel fsniper: Thanks for the hint, but any idea why the other thing does not work?
11:45 fsniper viq: try a custom grain module to gather output
11:45 fsniper hhenkel: I have no idea :) it was just a hunch
11:46 viq fsniper: "ln -s cert.crt `openssl x509 -hash -noout -in cert.crt`.0" is what I need
11:47 jaimed joined #salt
11:47 hhenkel fsniper: Looking at the regex you posted, I'm not sure that would match anything? As far as I understand the "?" matches one char and would match as a result something like: svx-be-clehAdat01.example.com ...
11:48 fsniper viq: put this command into a custom grain module and use grain['mycustomgrain'] for symlink target or name
11:48 fsniper hhenkel: nope. ? would make a match with a char preceding the ? or nothing
11:48 fsniper hhenkel so: ah? = 'ah' or 'a'
11:48 viq fsniper: hm, haven't played with custom grains yet... I am actually thinking of putting this in cmd.wait watching a state that distributes the cert.crt
11:50 hhenkel fsniper: you're right...I was confused...nonetheless it would not match because of the "t"
11:50 fsniper viq: so you are creating a cert in a subshell? I would not use a subshell for this. Just create two seperate states.
11:50 viq fsniper: no, state is just a file.managed
11:50 viq erm, cert is distributed as a file.managed
11:51 hhenkel fsniper: ^svx-be-cleh?dat?0[1-9]\.(example\.com|example\.loc) would work I guess?
11:51 viq fsniper: but some things (I'm looking at you, syslog-ng) need to have it symlinked like that to see it
11:51 fsniper hhenkel: yes it should. but it would match clehdat clehda cleda cledat
11:52 fsniper viq: what is the output of  openssl x509 -hash -noout -in cert.crt?
11:52 viq fsniper: for example e0dab96f
11:53 fsniper viq: So this is a signature. so two ways to go. 1 custom grains. 2 symlink in a cmd.run :)
11:53 hhenkel fsniper: I need to match clehda and cledat ...
11:54 fsniper hhenkel: I think (clehda|clehdat) would be a better choice. But I'm not sure why it does not match
11:55 fsniper Well so nobody knows anything about custom modules and pillar environments.
11:56 viq fsniper: sorry, as you can see I don't even really know about custom grains ;)
11:57 fsniper viq: :) once i did not too. I believe you will learn soon
11:57 viq Though I think for now I'll just use cmd.wait for this
11:57 fsniper viq: simplist solution for your situation is  to use cmd.run
11:58 viq yeah. Though I still need to encode in there 4 different paths depending on what OS this is
11:58 hhenkel fsniper: All I did in the past was to implement a simple module to do hostname to ip translation.
11:58 fsniper viq: "ln -s cert.crt `openssl x509 -hash -noout -in cert.crt`.0": cmd.run
11:59 fsniper viq: for multiple oses use {% if grains['os'] == 'linux' %}
12:00 viq fsniper: yeah, I know. Though I think I will actually go with jinja variables at the top of the file, less ifs later
12:00 fsniper hhenkel: modules are great but this multiple environment issue is a mess with saltstack
12:02 hhenkel fsniper: Yes this can be blessing or curse. We're currently running with gitfs for states and pillars but with pillars we only got a base env...
12:03 hhenkel fsniper: within the pillar we set the env/branch that is used for the states etc.
12:03 hhenkel fsniper: Within the pillars we also set roles for servers.
12:04 fsniper hhenkel: I have moved our stack to a multi environment config but my custom modules can't get pillar data from that hosts environment.
12:05 hhenkel fsniper: hmm, okay so your custom module always fetches (or tries) to fetch data from base then?
12:09 acabrera joined #salt
12:09 xmj moin
12:09 xmj does anyone here have some salt states for GitLab (6.8) ?
12:10 viq xmj: there's a gitlab formula, though I didn't update the config yet for the changes in new gitlab
12:11 viq xmj: also it currently only installs on debian, I need to fix that too
12:12 xmj do you have a link?
12:13 xmj we're hosting things on OpenNode OS (centos-derivate) so debian-only would be killer :|
12:13 xmj viq: do you know a way of doing `gitlab-ctl reconfigure` without that being run through chef?
12:13 dmorrow joined #salt
12:13 viq xmj: https://github.com/saltstack-formulas/gitlab-formula
12:13 viq xmj: I know nothing about gitlab-ctl
12:14 yomilk joined #salt
12:14 viq xmj: the main part about not running on centos is that I didn't manage to make it see a newer ruby, and didn't have/make time yet to have a closer look at SBCL
12:15 viq xmj: also https://github.com/viq/gitlab-formula
12:15 xmj SBCL ???
12:16 viq Software collections. Something like omnibus, but redhat's own approach to that
12:16 viq I could be misremembering the acronym
12:17 xmj SBCL == Steel Bank Common Lisp :p
12:17 viq Anyway, there's a newer ruby distributed as such, and the 1.8 available on centos is too old for gitlab AFAIK - but that one installs to opt and is outside of normal paths, and stuff fails
12:17 viq xmj: it's very likely I'm misremembering :P
12:17 xmj viq: everything is available on CentOS if you use the right repository
12:18 viq xmj: which is the tricky part ;)
12:18 xmj *shrug* if anything, we'll just package it ourselves
12:19 viq xmj: I'd like the formula to be relatively non-intrusive
12:19 ninjabox joined #salt
12:19 viq xmj: have you looked at their new omnibus packaging?
12:19 xmj yyyyes
12:20 xmj i'm really not the biggest fan of using vendor-provided packages for thirdparty software as that usually screws up other things
12:20 xmj and we're currently discussing on how to saltify this omnibus package :\
12:20 viq well, in omnibus the stuff is self-contained
12:21 viq xmj: I assume you've seen https://www.gitlab.com/downloads/ as well ?
12:22 xmj sure
12:22 xmj which brings me to the question.. i know how to install pkgs from a repo, and saltify custom repos.. but how do i `rpm -i /path/to/custom/url.rpm` consistently from a salt state?
12:23 rome joined #salt
12:23 viq IIRC you can just pkg.installed an URL
12:24 viq xmj: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#module-salt.states.pkg  sources
12:24 xmj OH
12:24 xmj well that'd be easy.
12:26 viq eh, time to eat, my thinking ceases to work
12:26 rome joined #salt
12:28 nhubbard joined #salt
12:28 jeremyBass joined #salt
12:29 rygyonthefly joined #salt
12:30 rygyonthefly left #salt
12:30 rygyonthefly joined #salt
12:37 topochan joined #salt
12:38 nicksloan left #salt
12:39 toastedpenguin joined #salt
12:40 fsniper xmj: I have gitlab states but written by a friend
12:40 jslatts joined #salt
12:45 doanerock joined #salt
12:45 mapu joined #salt
12:46 elfixit joined #salt
12:50 war2 joined #salt
12:54 it_dude joined #salt
12:55 jeremyBass left #salt
13:05 happytux joined #salt
13:06 ipmb joined #salt
13:06 halfss joined #salt
13:09 jrdx joined #salt
13:10 millz0r joined #salt
13:13 racooper joined #salt
13:22 yomilk joined #salt
13:22 happytux joined #salt
13:22 vbabiy joined #salt
13:23 halfss joined #salt
13:28 Networkn3rd joined #salt
13:32 andrein__ Hi guys. I have question. I've just started scratching the surface of salt. We have some frontend servers serving static content and some backend servers running our application. Assuming the number of frontend/backend servers is dynamic, how would I go about dynamically generating their config files using salt?
13:32 fsniper adrein: use grains and pillars.
13:34 viq I guess also either mine or the pass-through execution could be useful here
13:34 fsniper andrein__: also use nodegroups
13:34 viq eg allow backends to query frontends for their IP addresses to let them through.
13:34 viq Also the other way around
13:34 Eugene xmj - i would suggest you also set up a proper yum repo. 'Createrepo' on the server side, and use salts repo definition to point at it
13:35 ktenney joined #salt
13:35 xmj why? gitlab upstream doesn't have a package repository
13:35 xmj looks like we'll just put the rpm into git.
13:36 xmj making life simple
13:36 Eugene Just because they're idiots doesn't mean you need to follow along
13:36 andrein__ hmmm, viq, fsniper can you elaborate a bit? I have my recipes (in my head :) ) for the two roles, but I'm not sure how exactly to pass the ips from one side to the other.
13:36 quickdry21_ joined #salt
13:36 Eugene Oy, rpm in git? Nope nope nope
13:37 fsniper andrein__: you may put ips into pillars or you may use salt event system to update each other with related information
13:37 xmj now why not?
13:37 Eugene Because you never put binaries into a git repo
13:37 xmj now why not?
13:38 Eugene /msg gitinfo !binary
13:38 xmj the reason for not doing something should not be "don't do that"
13:38 timoguin having a few binaries in git is okay, but it's not good practice
13:38 andrein__ fsniper: I'm not sure keeping IPs in pillars is the right approach here since I have to maintain them in two places. (once when I assign the state to the minion, and once in the pillar).
13:39 Eugene Because git is for code, not binaries is the short answer.
13:39 Eugene Discussing binary diff storage algorithms is difficult from the bus
13:40 fsniper andrein__: You do not have to use ips in minion state matching. You may just use network cidrs. So any host in the network may match the states.
13:40 faldridge joined #salt
13:41 viq andrein__: https://github.com/saltstack-formulas/hostsfile-formula here is something that does something similiar, populate a file based on IPs of machines it knows about
13:41 selenite29 joined #salt
13:42 will_514 joined #salt
13:43 viq andrein__: another http://stackoverflow.com/questions/17158665/how-to-get-a-list-of-all-salt-minions-in-a-template
13:43 andrein__ fsniper: well, sort of, we're actually using hostnames but you get the point :)
13:43 andrein__ viq: i just stumbled upon that one :) seems to do what I need :D
13:43 will_514 I need to report a bug in the Windows install exe (Salt-Minion-2014.1.3-AMD64-Setup.exe)
13:43 will_514 Can someone point me to the right place to go?
13:44 fsniper andrein__: how do you know whether a host is a backend or frontend?
13:44 timoguin will_514: the issue tracker on github.
13:44 timoguin the mailing list if you wanna get some feedback first
13:45 will_514 newbie here, I'm not sure which project
13:45 viq will_514: most likely salt
13:45 viq will_514: https://github.com/saltstack/salt/
13:46 andrein__ fsniper: we just name them frontend* and backend*
13:46 andrein__ still seems there's a bit of duplication even using the salt mine. I'll just try to implement it and see how it goes :)
13:47 will_514 Cool, thanks. It is already reported - #12339
13:50 fsniper andrein__: so you can target hosts easily :)
13:52 war2 joined #salt
13:53 GradysGhost joined #salt
13:58 babilen Will I have access to grains anywhere within {{ .... }} in jinja or do I have to always wrap it in {{ ... }} ?
13:59 AdamSewell joined #salt
13:59 AdamSewell joined #salt
13:59 kaptk2 joined #salt
14:00 viq babilen: it sounds like you're asking "do I need to use {{}} or can I just use {{}}?" so maybe rephrase
14:01 babilen viq: Oh, yes. *blush*
14:02 fsniper left #salt
14:02 babilen I mean can I use "{{ salt['pillar.get']('foo:bar', grains['host'] ) }} or will I have use nested {{ ...}} around grains[...]
14:02 viq Oh, good question
14:03 babilen In related news: What are sensible ways to debug/test issues such as this. I find the whole, "commit", "push", "run with test=True" process to be quite cumbersome when working on template files.
14:04 babilen I've just finished reading the jinja template developer guideline and am just not entirely sure how it all fits together. :)
14:05 viq babilen: https://github.com/simonmcc/kitchen-salt ?
14:05 ndrei joined #salt
14:05 Eugene Develop in production, copy and commit to dev, then push to production
14:05 viq babilen: also I use vagrant to test things
14:05 rome joined #salt
14:06 eriko joined #salt
14:06 babilen viq: So do I, but it would be nice to have a simple "jinja-render /path/to/file.jinja /path/to/pillar.example" command that simply generates file.jinja with the values as provided in pillar.example
14:06 sroegner joined #salt
14:06 babilen .oO( Weekend project! )
14:06 viq hehe
14:07 topochan joined #salt
14:08 simonmcc viq: test-kitchen & kitchen-salt use Vagrant to spin up instances & apply salt to them, it just does the donkey work of setting up for you & allows you to run a suite of tests after to verify what you hope happened actually happened
14:08 sroegner joined #salt
14:08 dmorrow left #salt
14:09 simonmcc really for babilen that comment :)
14:10 timoguin simonmcc: kitchen-salt is fun.
14:10 * timoguin needs to write some formula tests
14:10 rgbkrk joined #salt
14:10 babilen simonmcc: It looks great and I will definitely see how I can use it to test our setups, but I am simply looking for a more lightweight solution to test everything jinja when i develop formulas
14:10 viq I should find time to play with that
14:11 viq And now back to bashing TLS syslog
14:11 babilen Something like the command above that takes grains from localhost would be sweet
14:11 simonmcc babilen: in my experience, you can’t test your jinja without a full salt “compile” of the data, one of the fun bits of nested templating & data
14:12 ccase joined #salt
14:12 KennethWilke joined #salt
14:13 ajprog_laptop joined #salt
14:14 babilen simonmcc: Yeah; I'm just at this point where you think "There must be a better way" :)
14:14 jeddi joined #salt
14:15 simonmcc babilen: I’ll be delighted when you find it :) in the mean time, after your first `kitchen converge` all subsequent converge runs are vert light weight, and you don’t have to use a local vagrant/vbox instance, it can be an ec2 or openstack instance just as easily.
14:15 jcockhren simonmcc: does kitchen salt have to be used on a formula or any states directory?
14:15 babilen simonmcc: libvirt?
14:18 babilen I don't really expect "director = {{ messages.get('director', {{"%s-dir = all, !skipped, !restored"|format( {{ grains['host'] }}) }}) }}
14:18 babilen to work ;)
14:18 timoguin jcockhren: it doesn't have to be a formula specifically
14:18 timoguin it just has to have access to the SLS to be able to call it
14:19 simonmcc babilen: http://kitchen.ci/ has the list that kitchen supports, looks like only lxc via libvirt
14:19 ndrei joined #salt
14:19 Eugene Bracing looks correct to me
14:20 faldridge joined #salt
14:20 simonmcc jcockhren: it needs something salty to call, it doesn’t have to be a formula (use the state_collection collection to just use a collection of sls files, or even just a single sls file.
14:21 babilen simonmcc: Fair enough. It definitely looks like a tool we want to use in our setup (or a different one that does the same thing) -- Thanks for mentioning it
14:21 rnts joined #salt
14:21 simonmcc jcockhren: kitchen-salt just sets up everything needed to call `salt-call`
14:21 jcockhren simonmcc: can state_collection be used in lieu of state_top ?
14:22 war2 joined #salt
14:23 workingcats joined #salt
14:24 pdayton joined #salt
14:25 vejdmn joined #salt
14:25 jeremyBass1 joined #salt
14:25 simonmcc no, state_collection just tweaks where kitchen-salt looks for the sls files, you still need to specify a state_top
14:26 seme joined #salt
14:26 simonmcc babilen: I’d love to hear what you find, test-kitchen’s ruby deps make for a bit of a culture clash in the salt/python world :)
14:26 babilen salt/python/debian world then :)
14:27 babilen Oh dear, ... will I have to use gems?
14:27 timoguin ruby and python are worlds where more colliding would be good
14:27 timoguin imo
14:28 timoguin too many good tools on both sides
14:28 jcockhren this is true
14:31 happytux_ joined #salt
14:31 danielbachhuber joined #salt
14:34 jalbretsen joined #salt
14:35 mgw joined #salt
14:37 opapo joined #salt
14:37 selenite29 hi everybody
14:40 pdayton joined #salt
14:40 picker joined #salt
14:41 yomilk joined #salt
14:41 smcquay joined #salt
14:42 seme hi :)
14:42 wendall911 joined #salt
14:44 perlchild joined #salt
14:45 selenite29 salt has a strange behavior with www-data group: first it can tell me that Group www-data is already present in function group.present, and secondly it can tell me the following group(s) are not present: w,w,w,-,d,a,t,a in user.present's require. Does salt hate apache2 because of Python ? :)
14:45 viq selenite29: show your sls file
14:46 selenite29 http://pastebin.com/yG2EtLWN
14:48 viq selenite29: line 12 expects a list, I think
14:48 selenite29 Ah yes
14:48 selenite29 viq: thx
14:50 selenite29 viq: that was that, I get another error but I will try to correct it by myself behore asking any help
14:51 babilen selenite29: Don't be afraid to ask though
14:51 selenite29 babilen: ok, thx
14:52 topochan joined #salt
14:54 Gordonz joined #salt
14:56 it_dude joined #salt
14:57 Gordonz joined #salt
14:59 ktenney joined #salt
15:00 meteorfo_ joined #salt
15:02 kballou joined #salt
15:03 Ryan_Lane joined #salt
15:03 conan_the_destro joined #salt
15:04 mekstrem joined #salt
15:05 schristensen joined #salt
15:05 dmorrow joined #salt
15:08 homes12 joined #salt
15:08 _jslatts joined #salt
15:09 dmorrow hi everyone, I am having trouble in my pillar top.sls , I am trying to match against minion grains using the jinja syntax as per the http://docs.saltstack.com/en/latest/topics/targeting/grains.html . I can see that my minion has the grain set , was wondering could anyone help?
15:14 Ryan_Lane joined #salt
15:15 tyler-baker joined #salt
15:15 viq dmorrow: not without more info ;)
15:16 viq dmorrow: eg pasting your top.sls somewhere
15:16 dmorrow viq of course yes sorry one moment
15:16 schimmy joined #salt
15:18 smcquay joined #salt
15:18 dmorrow I have uploaded my top.sls to http://pastebin.com/aYAS17Z9
15:20 dmorrow one thing I can not is if I use another syntax it works fine, I think for some reason my env always gets set to None?
15:20 viq ...whoa
15:20 schimmy1 joined #salt
15:20 viq What is the error you're getting?
15:21 homes12 Hey guys, I would like to ask you about practical experience with SaltStack in multi-master configuration together with GitFS fileserver backend used for sharing/tracking Salt states.
15:21 Networkn3rd joined #salt
15:22 dmorrow viq: The error appears on the salt side that it does not know about the pillar data, i.e my pillar base just looks like this base: with nothing underneath , if that makes sense?
15:23 smcquay joined #salt
15:24 homes12 What happens if I have a state in git repo which I change and then one master pulls this changed state and propagate it to a mapped minion by top file while another will pull it later? What happens if a second minion is registered to a second master and it depends on that change which was applied on the first minion only?!?
15:25 viq homes12: "while another" another master or another minion?
15:26 mrj joined #salt
15:26 homes12 Basically, the question is if gitfs backend takes care of coherency between locally pulled git repositories
15:26 viq homes12: look up overstate, it can do "do this stuff on those minions, and then this on those other ones"
15:26 viq homes12: by default masters refresh their copies of git every 60 seconds
15:28 war2 joined #salt
15:28 jimklo joined #salt
15:29 homes12 further, do you have any idea how gitfs may affect performance of the masters? the point is that we plan to have "repository per service" model so we may have 10 repos at the beginning but we can end up with 100 in one year :-/
15:30 meteorf__ joined #salt
15:30 viq Sorry, no idea. But I think those still will be local copies, so shouldn't be that expensive to deal with
15:30 meteorf__ joined #salt
15:32 meteor___ joined #salt
15:34 rome joined #salt
15:35 seanz joined #salt
15:44 tligda joined #salt
15:44 ccase joined #salt
15:49 chrisjones joined #salt
15:49 selenite29 joined #salt
15:50 [diecast] joined #salt
15:53 ajolo joined #salt
15:54 jslatts joined #salt
15:56 [MT] What would be the proper way to have multiple boxes connect to specific syndic servers? Should I write an ext_mod that takes the hash of syndics and the minion and pins the minion to the next two syndics based on the hash?
15:56 ml_1 joined #salt
15:59 meteorfo_ joined #salt
15:59 twobitsprite joined #salt
16:00 travisfischer joined #salt
16:01 travisfischer joined #salt
16:03 mgw joined #salt
16:04 mateoconfeugo joined #salt
16:10 ndrei joined #salt
16:13 UtahDave joined #salt
16:17 meteorfo_ joined #salt
16:18 meteorfo_ joined #salt
16:19 wincus joined #salt
16:19 TheRealBill joined #salt
16:20 schimmy joined #salt
16:20 ajolo_ joined #salt
16:21 schimmy1 joined #salt
16:26 [diecast] joined #salt
16:27 KyleG joined #salt
16:27 KyleG joined #salt
16:28 ThomasJ|d joined #salt
16:29 troyready joined #salt
16:33 vbabiy joined #salt
16:36 vbabiy joined #salt
16:38 UtahDave kiorky: Hey, do you have a full example of using the salt docker states?
16:39 mapu joined #salt
16:41 topochan joined #salt
16:42 vbabiy joined #salt
16:45 fragamus joined #salt
16:46 war2 joined #salt
16:46 possibilities joined #salt
16:46 timoguin UtahDave: here's a tab i still had opening with a nice blog post about them: http://thomason.io/automating-application-deployments-across-clouds-with-salt-and-docker/
16:47 UtahDave Ah, very nice.  Thanks, timoguin!
16:48 Vye How do I remove stale jobs from minions? I removed all files in the proc cache on both the master and minion but as soon as I run salt minion salutil.running it will recreate the job cache.
16:49 joehillen joined #salt
16:51 vbabiy joined #salt
16:52 wincus left #salt
16:52 ajolo joined #salt
16:53 joehillen joined #salt
16:53 taterbase joined #salt
16:54 wincus joined #salt
16:54 mgw joined #salt
16:56 mapu joined #salt
16:58 Heartsbane Is there a way use salt-cp to push an entire directory structure
16:58 bhosmer joined #salt
16:58 UtahDave Heartsbane: are you doing this in a state?
16:59 Heartsbane like salt-cp qa1derp /srv/salt/zeesuperdata/* /var/lib/zeesuperdata/
16:59 Heartsbane no
16:59 Heartsbane I can do it a file at a time
17:00 Heartsbane but if use wildcard msgpack complains
17:00 Heartsbane Am I doing something wrong
17:00 wincus joined #salt
17:02 UtahDave Hm. I haven't used salt-cp much. It was written very early on.
17:02 UtahDave I usually use the file.recurse state.
17:02 Heartsbane Grrrrrr
17:02 UtahDave let me look at the docs for salt-cp
17:02 UtahDave So you want to do this on the cli, right?
17:03 Heartsbane ya I will write the state later
17:03 Heartsbane because I need to push the data, I thought I could do it quick and dirty
17:04 UtahDave I usually create a real simple state that uses file.recurse.  3 or 4 lines of yaml
17:04 UtahDave then from the cli    salt 'minion01' state.sls myslsfile
17:04 UtahDave boom
17:04 timoguin state.single could also call file.recurse directly
17:05 UtahDave yep
17:05 MoonSweep joined #salt
17:06 Corey Good morning.
17:07 UtahDave morning, Corey
17:07 Heartsbane UtahDave: you are already harshing my mellow
17:07 rygyonthefly Anyone folks here have experience with salt-cloud and openstack specifically?  Having quite a bit of trouble getting the config sorted
17:07 * Heartsbane mumbles something about Monday.
17:07 UtahDave sorry, Heartsbane.
17:08 Ryan_Lane joined #salt
17:08 Heartsbane Don't worry about it Dave, it is just Monday
17:08 UtahDave rygyonthefly: can you pastebin a sanitized copy of your salt-cloud provider config and profile?
17:08 ml_1 joined #salt
17:08 Heartsbane UtahDave:  1/7th of my life will be spent on Monday, that is just depressing
17:08 MoonSweep left #salt
17:09 * Heartsbane writes a state.
17:11 rygyonthefly UtahDave: http://pastebin.com/G13FTwxS
17:11 jaimed joined #salt
17:12 UtahDave rygyonthefly: do you get output when you run   salt-cloud --list-images hp_ae1-2     ?
17:13 possibilities joined #salt
17:14 rygyonthefly UtahDave: I do indeed: http://pastebin.com/TzkTV6pV
17:14 UtahDave are you sure the user you have has sufficient rights?
17:14 rygyonthefly Positive
17:15 rygyonthefly Does that config appear correct to you ?
17:16 yusuket joined #salt
17:16 war2 joined #salt
17:16 UtahDave Is this your own openstack infrastructure, or is this the HP cloud?
17:16 rygyonthefly HP's
17:19 UtahDave Hm.  the docs have single quotes around the urls and regions and file paths.
17:19 UtahDave also, does your pem file have proper permissions?
17:19 rygyonthefly I'll double check those
17:19 Gareth morning morning
17:20 UtahDave rygyonthefly: the docs also have    compute_name: Compute
17:26 zain joined #salt
17:28 zach I hate Java.
17:29 Gareth don't hate it.  it feeds on your hate.
17:29 zach That is true
17:29 Gareth just ignore it and hope it quietly fades away :)
17:29 zach I can't
17:29 zach I have to support a java application
17:29 zach It used to be Python :\
17:30 zach Then about a year ago, they decided to rewrite it into Java
17:30 zach They're trying to be SaaS, but....each deployment is self contained....doesnt work for a SaaS setup
17:31 zach so each deployment is a complete server, java app, pgsql, etc - instead of spreading it out across multiple machines that can handle all customers, each customer has a dedicated VM that runs everything
17:32 thedodd joined #salt
17:32 * zach annoyed</rant>
17:32 jeffg_ joined #salt
17:32 ianawilson left #salt
17:32 bhosmer joined #salt
17:37 jdenning joined #salt
17:38 war2 joined #salt
17:39 hembree joined #salt
17:40 MoonSweep joined #salt
17:41 zain joined #salt
17:42 MoonSweep left #salt
17:45 lukeg1 joined #salt
17:48 arthabaska joined #salt
17:48 elsmorian joined #salt
17:49 war2 joined #salt
17:52 rygyonthefly joined #salt
17:57 mgw joined #salt
17:57 war2 joined #salt
17:57 jeffg_ hi everybody...
17:57 rome joined #salt
17:58 jeffg_ I am a bit new to salt and was looking for advice on how to set up my folder structure in a very heterongenous envi
18:00 Corey jeffg_: No worries.
18:00 Corey jeffg_: /srv/salt should be a git repo.
18:00 conan_the_destro joined #salt
18:00 Corey jeffg_: /srv/pillar shoul dbe a *different* git repo.
18:00 Corey jeffg_: Now that that's out of the way, where are you stuck? :-)
18:01 Kenzor joined #salt
18:01 ajw0100 joined #salt
18:01 jeffg_ for example... I need to manage dev/qa and prod instances.  would you separate those into different folders on the same master?
18:02 Corey jeffg_: You could, or you could set up a git branch to track each environment.
18:02 Corey It mostly depends upon you.
18:04 jeffg_ Corey: that kinda helps. so if I have a dev branch, would I create app specific things in pillars?  for example our website has very specific requirements for their apache vhost configs.
18:05 possibilities joined #salt
18:06 lukeg1 hello... what is the best way to keep track of a long running install? I have a JuliaLang install that make testall runs for about 2 hours.
18:08 hembree left #salt
18:08 rome joined #salt
18:09 gq45uaethdj26jw6 joined #salt
18:10 gq45uaethdj26jw6 anyone have any issues with joyent not working with salt-cloud? i'm unable to get a list of images from them. works through sdc cli tools
18:11 GradysGhost joined #salt
18:11 rome joined #salt
18:11 gq45uaethdj26jw6 did have an issue with their cli tool being an older version, and the sdc-listimages script was not included. any chance that could be related at all?
18:11 CaptTofu joined #salt
18:12 nahamu gq45uaethdj26jw6: salt-cloud doesn't use the joyent cli tools at all.
18:12 nahamu so it's not that.
18:15 ajw0100 joined #salt
18:18 rome joined #salt
18:21 rome joined #salt
18:22 MindDrive joined #salt
18:23 gq45uaethdj26jw6 i'm open to other suggestions if anyone might have any
18:23 thedodd joined #salt
18:25 googolhash joined #salt
18:26 doddstack joined #salt
18:26 war2 joined #salt
18:27 elsmorian joined #salt
18:27 kiorky UtahDave: you may contact err the other guys that commited a lot in the state
18:27 rome joined #salt
18:27 kiorky UtahDave: he is a frenchy guy working for a german firm, and is working a lot lately with the docker module
18:28 kiorky UtahDave: as you know our interrest here at makinacorpus is not anymore for th e moment with docker for a lot of reasons
18:28 kiorky UtahDave: we reswitched back to bare lxc with overlayfs
18:29 kiorky UtahDave: far more convenient.
18:29 UtahDave cool!
18:29 kiorky UtahDave: let me find his nicl :)
18:29 kiorky *nick
18:29 UtahDave thank
18:29 UtahDave s
18:30 kiorky UtahDave: ticosax
18:30 kiorky UtahDave: (nicolas delaby)
18:30 kiorky UtahDave: he is the most aware of the current state of the module afaij
18:31 kiorky UtahDave: you can reach him on irc at european time, and he is not a fulltime bot like me :pp
18:31 UtahDave lol,  ok thanks!
18:32 rome joined #salt
18:32 kiorky UtahDave: i though you were experimenting with lxc lately with thatch
18:32 rome joined #salt
18:33 UtahDave Oh, yeah, we definitley are.  Our testing ci system uses lxc
18:33 UtahDave but I'm working on a project that needs some additions to the docker stuff
18:41 patrek_ Hi, need some help with gitfs_remotes, on 2014.1.0
18:41 sroegner joined #salt
18:41 rome joined #salt
18:41 patrek_ Trying to use mountpoint with the following syntax: https://gist.github.com/patrek/11380382
18:42 mgw joined #salt
18:43 bastion1704 joined #salt
18:46 ajolo joined #salt
18:48 rome joined #salt
18:50 ml_1 joined #salt
18:54 patrek_ as soon as add parameters (like root or mountpoint) to a remote, it breaks my configuration. Even states defined on the filesystem become unavailable.
18:56 seme hey guys... I installed chef and now I have the server, workstation and one linux and windows node bootstrapped...
18:57 goncalo left #salt
18:57 seme where can I find pre-defined windows cookbooks?
18:58 timoguin seme: just because, https://github.com/opscode-cookbooks/windows
18:58 timoguin but probably #chef would be better. ;-)
18:58 seme :)
18:58 seme thanks :)
18:59 jalaziz joined #salt
18:59 ZombieFeynman joined #salt
19:00 rome joined #salt
19:00 seme I've been setting up demo environments of chef and salt... sorry wrong channel :)
19:02 [diecast] joined #salt
19:02 beardo joined #salt
19:05 [diecast] joined #salt
19:09 bhosmer joined #salt
19:12 patrek joined #salt
19:13 possibilities joined #salt
19:13 bmcorser joined #salt
19:15 Networkn3rd joined #salt
19:19 GradysGhost joined #salt
19:19 nyx joined #salt
19:19 possibilities joined #salt
19:19 jcockhren simonmcc: does the states listed in state_top have to be listed in state_collection?
19:19 wOoP left #salt
19:21 simonmcc jcockhren: yes, unless you want salt to fail on states that it can’t fined :)  the state_top is used to build a top.sls, so salt-call will try & apply them
19:21 ndrei joined #salt
19:21 simonmcc if they don’t exist, it _should_ error out (but salt can be a little fiddly at reporting errors)
19:22 epcim joined #salt
19:23 jcockhren ok. I have another one for you: it seems that the 'formula' key needs to be defined or it errors out, for any ol' directory containing SLS files, what is the valus of 'formula'?
19:23 pssblts joined #salt
19:24 meteorf__ joined #salt
19:25 xcbt joined #salt
19:26 simonmcc Hmmm, the formula key shouldn’t be needed if state_collection isn’t set….but maybe I missed something
19:27 jcockhren if I understand you correctly, both formula and state_collection is needed?
19:28 ghanima hello all
19:28 bhosmer joined #salt
19:28 ghanima does anyone have a recommendation on where to look in regards to outputing data in a aggregated way instead of the default which is per node
19:29 ghanima The goal would be to take output that is  exactly the same and create one classification and anything that is uniq output as its on key,value
19:29 simonmcc jcockhren:  state_collection is boolean, and formula should be optional if state_collection is true, but I’ve just spotted the problem
19:30 Ahlee I have the need to execute a runner from a state, is this doable?
19:30 simonmcc jcockhren: the formula name is used to build the directory name on the target, even when it’s a state collection: https://github.com/simonmcc/kitchen-salt/blob/master/lib/kitchen/provisioner/salt_solo.rb#L332
19:30 jcockhren yep that's the line. I assumed I was doing it wrong honestly
19:31 simonmcc jcockhren: that should be easy enough to fix..
19:31 honestly that's ok jcockhren
19:31 Ahlee i'm executing this state against 40ish systems, and need it to exeucte a state just once on success against the 40 nodes, so I'd rather not do something like have one of the nodes execute and handle which node via pillar or similar
19:31 jcockhren LOL
19:31 jcockhren honestly++
19:33 KyleG Let's say I have a hostname of: kyle.city.domain.com - and I want to create a cronjob via salt for a script located at /home/kyle/projects/script.sh - How would I grab just the first part of the hostname in salt?
19:33 KyleG So i can replace /home/<VAR>/projects/script.sh with /home/kyle/projects/script.sh
19:33 ZombieFe_ joined #salt
19:34 nyx_ joined #salt
19:34 simonmcc jcockhren: https://github.com/simonmcc/kitchen-salt/issues/2 I’ll get to that shortly!
19:34 kickerdog joined #salt
19:36 possibilities joined #salt
19:36 seme joined #salt
19:40 jslatts joined #salt
19:49 ajw0100 joined #salt
19:51 logandg joined #salt
19:52 ZombieFeynman joined #salt
19:56 Kenzor joined #salt
20:00 diegows is there a way to define an order in which pillar are resolved?
20:00 jrdx joined #salt
20:00 ZombieFeynman joined #salt
20:00 diegows I have pillar variables that depdens on other pillar variables, works fine with salt-call --local but doesn't work when I use a master
20:01 meteorfo_ joined #salt
20:03 GradysGhost joined #salt
20:04 ZombieFeynman joined #salt
20:04 possibilities joined #salt
20:06 rygyonthefly_ joined #salt
20:07 garthk joined #salt
20:08 seme hi guys.. anyone using salt to manage windows packages?
20:08 seme I was wondering how stable you felt it was
20:13 ajolo whiteinge: ping
20:13 ajolo diegows: o/
20:14 diegows ?
20:14 jdenning joined #salt
20:14 diegows ajolo, salt user? good! :)
20:15 UtahDave hey, ajolo! back hom?
20:15 aleszoulek joined #salt
20:15 UtahDave home?
20:15 whiteinge ajolo: yo
20:16 diegows UtahDave, may be you have the answer for my question :)
20:16 jslatts is there an easier development cycle for creating an external pillar than constantly killing and restarting the master process on my dev box and scanning through logs?
20:16 diegows I have pillar variables that depdens on other pillar variables, works fine with salt-call --local but doesn't work when I use a master
20:18 UtahDave jslatts: I usually have the master process running in a terminal in debug mode. I usually can see any stacktraces or errors that pop up
20:18 UtahDave diegows: can you pastebin an example of what you're trying to do?
20:18 druonysus joined #salt
20:18 druonysus joined #salt
20:18 jslatts @UtahDave: thats what I'm doing, just making sure there isn't something easier
20:18 diegows I'm setting a pillar variable
20:18 diegows that depends on other pillar variable
20:18 diegows app_path: {{ pillar["apache_docroot_path"] }}
20:19 jslatts @UtahDave: i'm building an s3 external pillar... to go with the s3fs stuff coming in vNext
20:19 UtahDave jslatts: nice!
20:19 diegows in the top.sls file of the pillar_roots I have the file where apache_docroot_path before the file where I use it
20:19 jslatts i'm on a quest to ditch gitfs
20:19 UtahDave diegows: I don't that you can do that.  basepi is that still correct?
20:19 eliasp any ideas why this code: http://pastie.org/9120827 results in the traceback below? Minion is 2014.1.3 on Win7 Enterprise x64…
20:20 GradysGhost_ joined #salt
20:20 diegows UtahDave, worked running masterless minion :)
20:20 eliasp jslatts: a quest to ditch gitfs? sounds like insanity? why would one do that? :)
20:21 jslatts eliasp: because mixing source control and deployment is asking for trouble
20:21 eliasp jslatts: ah, so you're going to deploy your states from git to S3?
20:21 jslatts eliasp: we have to cache the gitfs/git pillars on each master in case github goes down
20:21 jslatts eliasp: yeah
20:22 jslatts eliasp: we already need s3 for our app builds, so i want to contain our external dependencies to only s3
20:22 eliasp jslatts: ok, makes sense then… I just thought you're going to abandon version control completely for developing your states…
20:22 jslatts eliasp: nope... it will actually improve our situation for dev... right now if you push a broken branch to the git repo, gitfs tries to compile it
20:23 jslatts and there is the strange environment -> branch mapping
20:23 harobed joined #salt
20:23 eliasp jslatts: sure, I fully understand your reasons… just didn't get it right in the first place
20:23 jslatts ah, cool
20:23 UtahDave diegows: OK, just asked around.  That's not going to work on the master because the minion's pillar isn't injected into the master's jinja environment
20:23 eliasp jslatts: would probably be nice to be able to only map defined branches/envs in gitfs… don't know whether that's already possible
20:24 UtahDave diegows: We do want that to work eventually, but we haven't settled on the best way to do that yet.
20:24 diegows UtahDave, oh... I understand... :P
20:24 UtahDave If it's working on the minion, it's by accident.  :)
20:24 eliasp jslatts: anyways… in your case, the path you're going is completely reasonable
20:24 jslatts eliasp: I didnt bother to investigate when it happened to us because I was already working to move is this way
20:24 diegows well, not serious I can use another method
20:25 jslatts eliasp: i just wish pillar and states were delivered via the same FS modules
20:27 UtahDave eliasp: what's your traceback?
20:27 eliasp UtahDave: it's in the paste as well: http://pastie.org/9120839 … see the part at the end
20:29 UtahDave eliasp: where is your CDLL() function?
20:29 eliasp UtahDave: that should be provided by 'ctypes'
20:30 UtahDave eliasp: then you'll need something like  file = ctypes.DLL(dllpath)
20:31 eliasp UtahDave: well, I feel stupid now… it works :)
20:31 eliasp UtahDave: thanks a lot and expect another PR soon ;)
20:31 hhenkel Hi all, anyone around who can confirm such issues? https://github.com/saltstack/salt/issues/12342
20:32 UtahDave eliasp: looking forward to it!!
20:33 eliasp UtahDave: oh, btw: could you have a look at the TODO: https://github.com/saltstack/salt/pull/12279#issuecomment-41464756
20:34 eliasp just want to make sure it doesn't end up like this in the next release
20:34 ajolo diegows: of course :) just got back from a training with UtahDave and whiteinge
20:35 ajolo UtahDave: first day from BA :/
20:35 ajolo whiteinge: how are you ?
20:35 whiteinge good! had a relaxing weekend.
20:35 whiteinge ajolo: how was your flight?
20:35 ajolo :D
20:35 ajolo Loooong
20:35 * whiteinge nods  :-P
20:36 UtahDave eliasp: Helium
20:36 eliasp UtahDave: k, I'll issue another PR for this then, thanks
20:36 UtahDave eliasp: thank you!
20:37 elfixit1 joined #salt
20:39 Ansem Correct way to get version info from a file so I can dynamically select a template?
20:40 thayne joined #salt
20:41 ZombieFeynman joined #salt
20:41 Ansem Or, more generally, how do I load a file and extract information from it?
20:42 jslatts Ansem: from a remote source?
20:42 eliasp Ansem: loading a file: cp.get_file_str
20:42 Ansem Local, from a git-repo
20:42 Ansem it'll be JSON if that's helpful
20:43 eliasp Ansem: ah, so you want to load JSON, parse it, extract the version from a specific field?
20:43 mapu joined #salt
20:43 Ansem Yes, precisely
20:43 eliasp Ansem: and all that withing a SLS or within a module?
20:44 GradysGhost joined #salt
20:44 Ansem Within an SLS if possible?
20:44 Ansem It's a *very* simple JSON file, so I could use regex if needed
20:45 jslatts Ansem: you will have to write an SLS using the python renderer
20:45 eliasp Ansem: there should be a |json filter in Jinja
20:45 eliasp this might provide some hints: http://librelist.com/browser/flask/2012/1/18/how-do-i-pass-this-javascript-object-into-a-jinja2-template/#5a94edc1ce13a72f59b641457b9a5ad8
20:46 Ansem Thanks!
20:46 eliasp Ansem: ah, sorry… seems to be Flask-specific ;(
20:46 Ansem hrm
20:46 Ansem so I may just need to use python then..
20:47 jslatts Ansem: I am doing this same thing. its not too bad
20:48 seme hey guys can I use 2014.1.3 minion wiht 2014.1.0 master?
20:48 meteorfo_ joined #salt
20:49 Ryan_Lane seme: in general your master should always be a higher version than your minions
20:50 scarcry joined #salt
20:50 seme thanks
20:51 Ryan_Lane yw
20:54 seme I want to get salt working in my environment with windows... so far it hasn't been working well on windows
20:56 scarcry joined #salt
20:57 scarcry joined #salt
21:00 ggoZ joined #salt
21:02 gq45uaethdj26jw6 joined #salt
21:03 stevednd is there any way with host.absent to remove any entries for a name regardless of the IP associated with it?
21:03 seme wow a clean install of salt and it is working with windows :)
21:04 seme operator error I guess :)
21:07 jmpf joined #salt
21:07 rome joined #salt
21:11 jmpf investigating this problem we are having where our salt master is filling up /var/cache/salt/master - http://pastie.org/9120985 the number of inodes are huge - I know it's probably just something we are doing wrong but curious if anyone else has ran into this? we were running a rather older version 0.16 something -- but now have upgraded and still are seeing it (after clearing out the directory and restarting)
21:11 rome joined #salt
21:14 jalaziz joined #salt
21:17 jmpf this https://github.com/saltstack/salt/issues/7417 <-- seems rather similar - just not sure what we might be doing wrong? is there any reason to have a 24hr keep_jobs?? what effect does turning off the job cache have?
21:18 Ryan_Lane jmpf: I'm not sure I'd turn it off completely. when you run a command it turns it into a job if you do things like hit ctrl-c or it times out
21:18 Ryan_Lane it also lets you see the status of run jobs
21:19 Ryan_Lane if you don't care about any of that you can disable it or shorten it a lot
21:19 jmpf ah - ok - is it ok to shorten it to something like 1hr?
21:20 Ryan_Lane I'd imagine so, yeah
21:20 jmpf Ryan_Lane: also - any clue w/what was going on w/these other tkts? I see a lot of them opened but nothing really clear on what the fix was
21:20 yusuket joined #salt
21:20 ikanobori '
21:25 travisfischer joined #salt
21:26 yusuket joined #salt
21:28 MBroadhead joined #salt
21:29 doanerock joined #salt
21:30 philipsd6 joined #salt
21:31 yusuket joined #salt
21:31 rgarcia_ joined #salt
21:34 seme can someone help me understand how you would structure your setup when you are using salt for unix/windows servers and workstations?
21:34 seme just looking for some best practice guidance
21:34 seme I see the best_practices doc in docs but for some reason that is only focused on server environments.
21:35 seme or at least I don't see how I would apply it to workstation environments
21:36 mgarfias how can i debug why my minion can't get info back from the mysql server?
21:36 mgarfias i can't get anythying back except 'mysql.status is not available'
21:37 Ahlee is it possible to have a state execute a runner?
21:37 jslatts mgarfias: start the minion in debug mode and look at the stack trace
21:37 Ahlee short of my current proposed solution of having hte state cmd.run a curl to the salt-api
21:37 jslatts mgarfias: salt-minion -l debug
21:38 timoguin mgarfias: that sounds like the mysql module isn't loaded. probably dependency related, i.e., you probably don't have the necessary modules installed for it to load
21:38 whiteinge Ahlee: yes. that can be done directly from a state via the Peer system, or indirectly via a state by firing a custom event from the state and having the reactor call the runner.
21:39 whiteinge Ahlee: http://docs.saltstack.com/en/latest/ref/peer.html#peer-runner-communication
21:39 Ahlee whiteinge: so the master would peer back to the master?
21:39 timoguin mgarfias: specifically, you need the mysqldb python module
21:39 Ahlee I'm already targeting/running from the master, but I suppose that's irrelevant once we get to the state section
21:40 whiteinge Ahlee: oh, so you're running a state on the master and want to call out to a runner function locally?
21:40 cewood joined #salt
21:41 Ahlee whiteinge: kind of.  I'm targeting 40 nodes with a state, once that finishes I want to execute a command once and only once
21:41 Ahlee i'd prefer not to promote one of the 40 nodes to be special to handle it via a pillar identifiying it as special
21:41 cewood joined #salt
21:43 whiteinge Ahlee: that sounds like a good use-case for a custom runner. basically to emulate the parts of state.orchestrate that you care about
21:44 whiteinge Ahlee: is this an occasional one-off from the CLI or is this something you'll be calling repeatedly?
21:44 Ahlee So then move the state calls to within the runner
21:44 Ahlee whiteinge: repeatedly
21:44 * whiteinge nods
21:44 aw110f joined #salt
21:44 Ahlee whiteinge: current flow is to call the states via calls to the API
21:45 Ahlee build host calls to salt to go install this software to the minions it needs to run on, i then need to run a script that updates some object definitions
21:45 Ahlee it's better if that executes only once
21:46 whiteinge yeah. i'd encapsulate all that into a custom runner module so you can have the flexibility of having that "main" process controling/watching everything else
21:46 whiteinge you can still trigger the runner via the API if that's working for you
21:46 whiteinge the build server is not running a Salt minion daemon, is that correct?
21:46 ajw0100 joined #salt
21:47 rome joined #salt
21:47 tmcpeak joined #salt
21:47 Ahlee nah, can't trigger runners via the api
21:47 Ahlee short of cmd.run salt-run
21:48 Ahlee (that i'm aware of)
21:48 [MT] The windows installer really should look to see if the minion id and master location have already been set and if so just silently install the update...
21:48 Ahlee sorry, three things going on.  The build server is running a minion, but must talk to three different environments and running one minion talking to each environment was deemed too complex
21:49 Ahlee so peer_communication was scrapped and we reverted to the API
21:49 Ahlee since we can poke a firewall hole for the API and call cross-environment easy enough
21:49 Ahlee (environment in htis case is stand alone salt master with N minions, not saltenv or similar)
21:49 yusuket joined #salt
21:50 aw110f Hi, can someone suggest how i can watch whenever a packgage updates and do something
21:53 tmcpeak joined #salt
21:55 faldridg_ joined #salt
21:55 tmcpeak Hi all.  I'm trying to build a threat model for Salt.  Does anybody know of any good architecture diagrams that I can use to get started?
21:56 upgrayedd_ joined #salt
21:56 troyready joined #salt
21:56 Corey tmcpeak: Not offhand, but the short answer is "if you compromise the master it's game over," "any minion can walk /srv/salt so plan accordingly," and the security of the entire environment is only as secure as who has commit access to whatever you're using as your git origin.
21:57 upgrayedd_ would it be overreaching to make the vsphere provider in salt-cloud able to configure nics?
21:57 upgrayedd_ would a pull request to do that make it in?
21:58 bhosmer joined #salt
21:58 yusuket joined #salt
21:58 tmcpeak thank you for the response Corey.  I'm hoping to get started with a thorough understanding of how the various components connect.  For example, where does the message queue fit in with the server and clients, how is that connection made, etc.
22:00 whiteinge Ahlee: you can definitely trigger runner modules via salt-api. that said, if you're running a minion on the build server you don't need salt-api at all. you can use custom events instead
22:01 Ahlee Nah, as the build server can only talk to one salt environment, and can't communicate with the other two without running an additional 'dummy minion' that cross-talks to the different environment
22:01 Ahlee we have stand alone staging, uat, and prod salt masters, whihever environment the build servers are in they can't talk to the other two
22:02 whiteinge Ahlee: if that minion can trigger events that are seen on the master, you can do All The Things regardless of environment
22:02 Ahlee whiteinge: air gap between environments
22:02 * whiteinge reads the second sentence in Ahlee's description
22:02 whiteinge oh.
22:03 whiteinge air gap
22:03 Ahlee annoying.
22:03 Ahlee Wish i'd have understood syndics before the decision to split was made :)
22:03 whiteinge yeah, you'll need salt-api then. but you can call runner modules just fine through salt-api
22:05 ghanima does anyone have a recommendation on where to look in regards to outputing data in a aggregated way instead of the default which is per node
22:06 ghanima The goal would be to take output that is  exactly the same and create one classification and anything that is uniq output as its on key,value
22:06 whiteinge Ahlee: for your custom runner, this may be a helpful starting point: https://github.com/saltstack/salt/blob/develop/salt/runners/state.py#L128
22:06 Ahlee huh
22:06 Ahlee https://github.com/saltstack/salt-api/blob/develop/saltapi/__init__.py#L81
22:07 Ryan_Lane ghanima: a custom outputter, if you want that format from the master, or a custom returner if you want to return it somewhere other than the master (like a database)
22:07 Ahlee Not that api, whiteinge.
22:07 Ahlee the lovely cherrypy API
22:07 whiteinge ghanima: this may be helpful for that: http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.survey.html
22:08 eliasp whiteinge: oooh that's awesome… didn't know about that one
22:09 whiteinge it's new. don't remember if it made the Hydrogen cut or not
22:09 ghanima Ryan_Lane: I would say the goal would be from the master
22:09 Ahlee nice, survey looks awesome
22:09 faldridge joined #salt
22:09 whiteinge Ahlee: you're calling APIClient() from your own Python code?
22:09 Ahlee whiteinge: Not in this case.
22:10 Ryan_Lane ghanima: a custom outputter may work. whiteinge's runner may help, too
22:10 Ahlee I'm making a call back to the master via salt-api
22:10 Ahlee I should have been more careful in my wording calling it just "the api" and not salt-api
22:11 ghanima Ryan_Lane: My uynderstanding of a returner allows for data to be redirected not neccssarily reformated no?
22:11 Ahlee anyway, matter remains.  Node 1 calls the master to run a state against 40 nodes, and then once complete execute a state once and only once
22:11 yomilk joined #salt
22:11 Ahlee calls the master via a curl request to salt-api
22:11 Ahlee man. i suck at describing this
22:11 ndrei joined #salt
22:11 Ryan_Lane ghanima: well, a custom returner takes the data and writes it however you want
22:11 Ryan_Lane but that's different from a runner
22:12 Ryan_Lane runners are ways to run orchestrated code from the master
22:13 whiteinge Ahlee: e.g.:  curl -sSi https://salt-api.example.com:8000 -d client='runner' -d fun='myrunner.myfunction' -d foo='Foo!' -d bar='Bar1'
22:13 lukeg1 left #salt
22:13 Ryan_Lane whiteinge: that survey runner is pretty awesome
22:14 ghanima whiteinge: is survey available in release 2014.1.2
22:14 whiteinge Ahlee: does the Node 1 that initiates the process need to be notified of success? or does it just need to fire-and-forget and whatever picks up the signal needs to ensure the state run is only ever run once?
22:14 whiteinge ghanima: bah. thanks. i'll add that to the docs
22:15 whiteinge ghanima: er. misread. no, it doesn't look like it's available in Hydrogen
22:15 whiteinge you can probably grab survey.py off github and put it in your ``extension_modules`` directory though
22:15 whiteinge i don't think it required any additions to salt-core
22:16 druonysus joined #salt
22:16 druonysus joined #salt
22:16 Ahlee whiteinge: fuck me. yes, that. I completely missed client='runner'
22:17 Ahlee whiteinge: node1 should know success or not, but i think i can figure that out from here
22:17 seme can someone help me out.... I'm a little confused about the salt-states repo... I included it via the GitFS config but I can't figure out how to leverage it... I tried referencing the sls files in it but I keep getting errors that the sls files aren't found
22:19 Ahlee whiteinge: thank you.
22:19 whiteinge np!
22:20 Ahlee of course, now I need to extend my own api wrapper app to understand client='runner'
22:20 Ahlee but, small price to pay for this
22:20 whiteinge heh
22:24 ashb joined #salt
22:24 ashb Detected conflicting IDs, SLS IDs need to be globally unique. ;_;
22:24 druonysus joined #salt
22:24 druonysus joined #salt
22:28 ghanima whiteinge: You mention I could add this to extension_module directory
22:28 yusuket joined #salt
22:28 ghanima but reading the documentation there is no default set correct?
22:28 dmorrow joined #salt
22:30 [diecast] joined #salt
22:30 whiteinge ghanima: correct, no default. i like to make a /srv/modules/{runners,wheel,auth} directory so I can version-control that along with /srv/{salt,pillar,modules}
22:30 whiteinge but you can put it anywhere
22:33 ghanima whiteinge: and I modify the master file I presume
22:34 whiteinge yes
22:36 ghanima whiteinge: I am getting this error
22:36 ghanima [ERROR   ] An un-handled exception was caught by salt's global exception handler: AttributeError: 'module' object has no attribute 'get_local_client'
22:36 * whiteinge looks
22:38 whiteinge ghanima: doh! try this one: http://paste.fedoraproject.org/97637/72469913
22:40 smcquay_ joined #salt
22:43 l0x3py joined #salt
22:44 pydanny joined #salt
22:44 yusuket joined #salt
22:45 rygyonthefly joined #salt
22:46 Luke_ joined #salt
22:54 ghanima whiteinge: that worked thanks
22:54 whiteinge woot
22:54 ghanima whiteinge: Got to play around with it... but is the only way to execute this is with salt-run.... I am trying to test salt-run survey.hash "*" test.ping
22:55 ghanima but I want to do salt -v '*' test.ping
22:55 ghanima so I can see the nodes that don't return
22:55 whiteinge although it didn't require any changes in salt core, it was using a Helium-ism  :-P
22:55 whiteinge ghanima: you'll have to modify the runner for that
22:56 ghanima whiteinge: Gotcha... I will play around with it... but It is defintely a step in the write direction.. does this allow to specify multiple outputs
22:58 whiteinge multiple outputs?
23:00 whiteinge look into switching from calling LocalClient().cmd() to calling (perhaps) cmd_cli() instead. You can pass the ``verbose=True`` kwarg but you may have to work around the modfied return structure
23:01 KyleG joined #salt
23:01 KyleG joined #salt
23:06 rygyonthefly joined #salt
23:15 ninkotech joined #salt
23:19 bhosmer joined #salt
23:22 ajprog_laptop joined #salt
23:24 travisfischer joined #salt
23:26 gw joined #salt
23:26 gw joined #salt
23:26 Guest63757 joined #salt
23:28 Guest63757 joined #salt
23:28 mgarfias how do i reference a state in a different environment than the one i have it configured in my top.sls?
23:28 fridiculous joined #salt
23:30 N-Mi joined #salt
23:30 N-Mi joined #salt
23:31 mpoole whats the best way to log everything run via cmd.run ?
23:33 ZombieFe_ joined #salt
23:35 yomilk joined #salt
23:35 kdorf joined #salt
23:35 l0x3py joined #salt
23:36 kdorf when using the py renderer for states, is there a standard way of importing another py state?  I would like to have one file contain several functions.
23:38 zain joined #salt
23:39 ZombieFeynman joined #salt
23:43 KyleG joined #salt
23:43 KyleG joined #salt
23:43 N-Mi joined #salt
23:43 N-Mi joined #salt
23:50 happytux joined #salt
23:51 whiteinge mgarfias: you have to include it and you can reference the envirionment in the include statement: http://docs.saltstack.com/en/latest/ref/states/include.html
23:55 swa_work joined #salt
23:56 ajw0100 joined #salt
23:59 possibilities joined #salt

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