Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-10-01

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

All times shown according to UTC.

Time Nick Message
00:02 aquinas_ joined #salt
00:06 murrdoc anyone use this yet, http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.state.html#module-salt.runners.state, is mas cool
00:06 murrdoc or mucho
00:06 murrdoc if u want to get technical
00:07 iggy orchestrate, yes
00:09 n8n joined #salt
00:10 murrdoc i am thinking event for now
00:10 perfectsine joined #salt
00:11 iggy seems cool for a one off kind of thing, but isn't reactor what you should be using for regular stuff?
00:14 asmaps joined #salt
00:14 mschiff joined #salt
00:15 Katafalkas joined #salt
00:15 Jarus joined #salt
00:15 bhosmer joined #salt
00:20 aparsons joined #salt
00:21 kickerdog joined #salt
00:27 aparsons_ joined #salt
00:27 oz_akan joined #salt
00:30 aparsons joined #salt
00:30 jeffspeff iggy, can you tell me what's wrong here? here is a file "testing" located in '/srv/salt/test' http://pastebin.com/Xsd5ZEAS   and this is my top.sls file in '/srv/salt' http://pastebin.com/NJhCdTiR
00:33 hasues joined #salt
00:38 Katafalkas joined #salt
00:38 thayne joined #salt
00:41 micah_chatt joined #salt
00:45 micah_chatt_ joined #salt
00:46 jeffspeff can anyone tell me what's wrong here? here is a file "testing" located in '/srv/salt/test' http://pastebin.com/Xsd5ZEAS   and this is my top.sls file in '/srv/salt' http://pastebin.com/NJhCdTiR
00:54 aparsons_ joined #salt
01:04 __number5__ jeffspeff: what error you have? is the minion you
01:04 __number5__ is the minion within the nodegroup called test?
01:05 jeffspeff the minion returns tru when i do 'salt -N test test.ping'
01:05 jeffspeff the error is  TypeError encountered executing state.highstate: Cannot serialize ConstructorError(). See debug log for more info.  Possibly a missing arguments issue:  ArgSpec(args=['test', 'queue'], varargs=None, keywords='kwargs', defaults=(None, False))
01:05 jeffspeff the minion is a windows 2008 server. salt master is centos
01:05 bhosmer joined #salt
01:07 floWenoL joined #salt
01:10 jeffspeff __number5__, any suggestions on where to look for the error?
01:10 __number5__ jeffspeff: on your minion, can you do `salt-call state.show_highstate` to see what comes out?
01:10 jeffspeff just a sec
01:12 jeffspeff salt.exceptions.SaltRenderError: Conflicting ID 'base' seems to be the error among the traceback data
01:12 jeffspeff salt.exceptions.SaltRenderError: Conflicting ID 'base'
01:20 __number5__ jeffspeff: looks like you defined 'base' multiple times in your states
01:26 jeffspeff so it's not supposed to be split up like that?
01:27 jeffspeff http://docs.saltstack.com/en/latest/ref/states/top.html at one point in there it gives a reference showing the states and defining a state tree then the next example it shows referencing those in other parts of the top file
01:27 jeffspeff Then our top file could reference the environments:
01:29 __number5__ jeffspeff: do you have more than one top.sls? that might cause issue too
01:29 jeffspeff no
01:30 jeffspeff i'm new to salt, just going through th docs trying to setup states
01:34 __number5__ jeffspeff: try this tutorial http://docs.saltstack.com/en/latest/topics/tutorials/states_pt4.html (started with part 1 if you haven't done before)
01:35 malinoff joined #salt
01:36 jeffspeff __number5__, awesome thanks i'll get to reading on that
01:37 sifusam joined #salt
01:37 AnswerGuy joined #salt
01:37 kusams joined #salt
01:37 eliasp joined #salt
01:38 terinjokes joined #salt
01:40 redms3 joined #salt
01:45 redms3 I'm trying to create a database in postgres.  When I run postgres_database.present I get an error: "CommandExecutionError: User 'numetric_web' is not available".  Just before this error, I can see that the user 'numetric_web" was successfully created.  Can anyone help point me in the right direction?
01:45 ramishra joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2014.1.10 is the latest | Help us test the 2014.7 RC! http://bit.ly/salt-rc | SaltStack is hiring! http://www.saltstack.com/careers | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:52 vejdmn joined #salt
01:52 druonysus joined #salt
01:52 druonysus joined #salt
01:56 ramishra joined #salt
01:57 ramishra joined #salt
02:21 n8n joined #salt
02:21 CeBe1 joined #salt
02:23 malinoff joined #salt
02:30 n8n joined #salt
02:39 delinquentme joined #salt
02:39 delinquentme so for 'unless' to work per this: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.wait
02:39 delinquentme it needs to return "False" ? or can it simply just break?
02:40 delinquentme I have  - unless: ls someFileName
02:40 delinquentme and i'm hoping it only runs if that ls command returns nada
02:44 vukcrni joined #salt
02:44 fbettag joined #salt
02:44 lyddonb joined #salt
02:45 CaptinHokk joined #salt
02:54 bhosmer joined #salt
03:07 possibilities joined #salt
03:11 __number5__ delinquentme: unless means it only runs when your command failed (e.g return non zero)
03:24 delinquentme __number5__, sure but what is an example of a failed command?
03:24 delinquentme is it false?  is it ls: cannot access dingo/: No such file or directory ?
03:26 aa_ joined #salt
03:27 semarie joined #salt
03:30 yomilk joined #salt
03:34 nyx joined #salt
03:41 bezeee joined #salt
03:46 jalaziz joined #salt
03:47 jalaziz joined #salt
03:59 mosen joined #salt
04:02 bezeee joined #salt
04:07 swa_work joined #salt
04:09 RKD joined #salt
04:11 RKD hey guys, simple question, if i retrieve a grains value in a SLS, how do I get it to return the result without the [' '] outside the value I need? Case in point {{ salt['grains.get']('fqdn_ip4','') }} returning the IP without any enclosing characters. thanks
04:11 intellix joined #salt
04:15 jalaziz joined #salt
04:25 mgw joined #salt
04:28 oz_akan joined #salt
04:29 Ryan_Lane joined #salt
04:37 chasehiccups joined #salt
04:40 pragu joined #salt
04:41 pragu left #salt
04:42 chasehiccups joined #salt
04:42 kermit joined #salt
04:43 malinoff RKD, {{ salt['grains.get']('fqdn_ip4',[''])[0] }}
04:43 bhosmer joined #salt
04:47 felskrone joined #salt
04:47 obimod joined #salt
04:59 pacopablo joined #salt
04:59 pacopablo what is the proper way of regenerating salt-minion keys?
05:05 bezeee joined #salt
05:07 ramteid joined #salt
05:08 jdmf joined #salt
05:16 chasehiccups joined #salt
05:16 yomilk joined #salt
05:17 RKD malinoff: thanks!!
05:29 oz_akan joined #salt
05:31 mihait__ joined #salt
05:31 wavis joined #salt
05:32 grepory joined #salt
05:34 Guest48893 joined #salt
05:35 glyf joined #salt
05:36 Guest48893 hello
05:39 catpigger joined #salt
05:51 n8n joined #salt
05:53 linjan joined #salt
06:00 iggy is there a way to "ls" in the salt:// namespace?
06:03 delinquentme joined #salt
06:05 rdorgueil joined #salt
06:07 jalbretsen joined #salt
06:18 yomilk_ joined #salt
06:23 possibilities joined #salt
06:27 aquinas joined #salt
06:27 flyboy joined #salt
06:27 aquinas_ joined #salt
06:30 oz_akan joined #salt
06:32 bhosmer joined #salt
06:34 oyvjel joined #salt
06:35 duncanmv_ joined #salt
06:53 fxhp joined #salt
06:58 Sweetsha1k joined #salt
07:03 lcavassa joined #salt
07:07 MatthewsFace joined #salt
07:09 masm joined #salt
07:12 bezeee joined #salt
07:21 chiui joined #salt
07:22 Outlander joined #salt
07:26 wnkz joined #salt
07:30 oz_akan joined #salt
07:31 ramishra joined #salt
07:34 ujjain joined #salt
07:41 mechanicalduck joined #salt
07:44 badon joined #salt
07:47 mechanicalduck joined #salt
07:47 darkelda joined #salt
07:52 ujjain joined #salt
08:05 Katafalkas joined #salt
08:05 zz_Cidan joined #salt
08:11 gmcwhistler joined #salt
08:12 rdorgueil joined #salt
08:12 rdorgueil joined #salt
08:12 bzf130_mm joined #salt
08:15 MrGreen joined #salt
08:15 MrGreen Happy Halloween
08:16 ramishra joined #salt
08:16 ggoZ joined #salt
08:17 babilen Tonight?
08:17 MrGreen yus
08:18 honestly I think you're a month early
08:18 babilen I have no idea ...
08:18 babilen Wikipedia seems to agree with you though
08:18 ramishra joined #salt
08:21 ramishra joined #salt
08:21 bhosmer joined #salt
08:26 stewba joined #salt
08:31 oz_akan joined #salt
08:33 felskrone joined #salt
08:34 rattmuff joined #salt
08:38 kbyrne joined #salt
08:40 CycloHex joined #salt
08:41 CycloHex hello all, I'm trying to use a formula (nginx), but I seem to be unable to get it to work... I installed and ocnfigured gitfs like I should, then added the git repo to my master, now I don't rly know hjow to call the formula in my top.sls.. When i highstate I get a no matching sls found for... Pls help me
08:43 CycloHex Ok, found my problem.. I am using multiple environments.. Is it possible to call a formula from another environment than base? Because I've just put it under my base env in top.sls and now it works
08:49 rattmuff If I have a few minions with id's "minion1", "minion2", "otherminon" and I wish to check in an if statement in my sls file if the minion that is being deployed starts with grain id "minion" to deploy a specific configuration file to those minions. How would such an if statement look?
08:49 rattmuff I've tried something like this: "{% if grains['id'] == "minion*" %}"
08:49 rattmuff but the == operator doesn't seem to help me here :
08:49 rattmuff :P
08:49 malinoff rattmuff, {% if grains['id'].startswith('minion') %}
08:50 agend joined #salt
08:51 mechanicalduck joined #salt
08:51 mattmb joined #salt
08:53 che-arne joined #salt
08:55 kerberos joined #salt
08:56 rattmuff thank you malinoff, I think my question was too simplified since I can't use "startswith" in my real problem. What if my minion id's are "london-dns-01", "ny-dns-02" and "otherminion"?
08:56 rattmuff and I wish to match on "dns"
08:57 CycloHex Where does this line get it's data? {% set home = nginx.get('home', '/var/www') -%} in an nginx pillar or in the nginx map?
08:57 rattmuff something like "*-dns-*"
08:57 CycloHex rattmuff, tried single quotes?
08:58 malinoff rattmuff, it is even simpler: {% if '-dns-' in grains['id'] %}
08:58 malinoff rattmuff, these expressions are just python expressions, not bash
09:00 rattmuff malinoff: yes, I'm trying to wrap my head around it. I can't use the * wildcard in these expressions? Like {% if 'world-*-dns-*' in grains['id'] %}?
09:01 malinoff rattmuff, of course you can't
09:01 malinoff rattmuff, that's why it is better to assign specific grains/pillars to specific minions and then use them like {% if grains['my_specific_grain'] == 'something' %}
09:02 rattmuff malinoff: I figured maybe I could use some python reg exp matching but suppose not :P
09:02 rattmuff malinoff: I see, I will try to look into that :)
09:02 rattmuff malinoff: thank you
09:02 malinoff rattmuff, there is no inline regex mechanism in python, only via "re" package, and jinja does not allow you to run an arbitrary python code
09:03 rattmuff malinoff: ahaa
09:03 malinoff rattmuff, it's much better to use mako
09:04 steffo joined #salt
09:05 Daviey joined #salt
09:05 krissaxton joined #salt
09:08 istram joined #salt
09:10 mndo joined #salt
09:10 agend joined #salt
09:10 ndrei joined #salt
09:11 mattmb joined #salt
09:12 dusel joined #salt
09:17 fe92 joined #salt
09:19 krissaxton joined #salt
09:20 akafred joined #salt
09:21 krissaxton joined #salt
09:21 Katafalkas joined #salt
09:28 ramishra_ joined #salt
09:29 bkrram_ joined #salt
09:33 jeddi I'm looking around for a good pillar / sls combo for managing debian /etc/network/interfaces file - something that can cope with variable numbers of interfaces, and some non-common options (eg. post-up) within any of the interface stanzas.  I started writing my own, using jinja template interfaces file, but it's hugely kludgy (ie. doesn't work).
09:37 laxity left #salt
09:39 lkannan joined #salt
09:40 workingcats jeddi, if you find one let me know please, i'll shortly be writing one of those, too ;)
09:41 circ-user-6sWwf joined #salt
09:41 circ-user-6sWwf HI
09:43 circ-user-6sWwf I'm using salt version 2014.1.10
09:43 wnkz__ joined #salt
09:43 circ-user-6sWwf Is the multi master with failover supported in this version?
09:44 circ-user-6sWwf It does not seem to recognize the failure of the connected master even though I have specified the master_alive_interval
09:45 CeBe joined #salt
09:47 MasterJ joined #salt
09:48 circ-user-6sWwf ??
09:49 krissaxton joined #salt
09:50 malinoff joined #salt
09:51 bkrram joined #salt
09:52 babilen circ-user-6sWwf: So you followed http://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html ?
09:52 circ-user-6sWwf Yes I have
09:52 circ-user-6sWwf But the signed key pairs themselves are not getting generated on restart
09:54 circ-user-6sWwf So i'm wondering if the master_sign_pubkey is even recognized as a valid option on this version
09:57 fredvd joined #salt
09:58 fxhp joined #salt
10:00 giantlock joined #salt
10:06 VSpike joined #salt
10:08 martoss joined #salt
10:09 bhosmer joined #salt
10:10 che-arne|2 joined #salt
10:14 alanpearce joined #salt
10:17 mik3 joined #salt
10:22 eofs sup
10:22 eofs any ideas how to implement something like this: https://dpaste.de/DHmO
10:22 eofs basicly sync before highstate run
10:26 Outlander joined #salt
10:33 oz_akan joined #salt
10:34 elfixit joined #salt
10:35 astol joined #salt
10:37 Katafalkas joined #salt
10:38 Katafalk_ joined #salt
10:39 astol hi all, can anyone help me? The thing  I am trying to do is that I need to have /data folder after state.highstate run, but since I have different environments (dedicated on hetzner, aws instance and dev docker containers), I need it to be different things on different environments. So now I have mount-data.sls that is creating an LVM partition (for hetzner), this state is being included by states which require /data - mysql, dovecot etc, how can I make
10:40 astol Or maybe I cannot do this and I need to change the whole thing somehow? "Switching" on grains in top sls doesn't seem right, because not every minion needs /data at all, and so including it by states that need it seems to be the most correct way
10:44 sunkist joined #salt
10:51 diegows joined #salt
10:53 CycloHex joined #salt
10:55 krissaxton joined #salt
10:55 linjan joined #salt
10:55 VSpike Hm, that's odd. A hightstate run failed on a few file.recurse states saying "The directory 'salt://....' does not exist on the salt fileserver in saltenv 'base'" ...
10:55 VSpike running those states again, it works
10:56 VSpike Not all the directory recurse states failed, and for those that worked, they are in the same path on the master and I can't see any differences between those that worked and those that didn't
10:57 VSpike Is the protocol prone to random failures like this? Does it hide network issues or timeouts as file not found errors, for example?
11:01 ramishra joined #salt
11:05 bhosmer joined #salt
11:05 krissaxton joined #salt
11:05 bhosmer joined #salt
11:10 tyler-baker joined #salt
11:12 babilen astol: You can conditionally include/change different states based on grains
11:13 scottpgallagher joined #salt
11:17 linjan joined #salt
11:23 lionel joined #salt
11:36 wnkz joined #salt
11:36 lionel joined #salt
11:40 wnkz__ joined #salt
11:46 krissaxton joined #salt
11:52 fredvd joined #salt
11:52 bhosmer joined #salt
11:54 snuffeluffegus joined #salt
11:58 linjan joined #salt
11:58 bhosmer joined #salt
11:59 mattmb joined #salt
12:00 bkrram Hi, does version 2014.1.10 support for multimaster PKI failover??!! Does not seem to work and does not even generate signed key pairs
12:02 PI-Lloyd joined #salt
12:05 ajolo joined #salt
12:07 ajolo_ joined #salt
12:09 MasterJ joined #salt
12:22 mattmb joined #salt
12:27 linjan joined #salt
12:27 cpowell joined #salt
12:32 rdorgueil joined #salt
12:33 alanpearce joined #salt
12:33 jeddi workingcats: if i remember, certainly ;)    it's one of the few things where a native .py script (and I really don't know python properly yet) seems to be the most adept way of doing this ...
12:34 astol babilen: can you tell me how?
12:35 workingcats jeddi, depending on just how complex it gets, could well be
12:41 joehoyle joined #salt
12:43 ekristen joined #salt
12:45 babilen astol: {% if grains['kernel'] == 'Linux' %} FOO {% else %} bar {% endif %} -- adapt as necessary and see available grains with "salt '*' grains.items"
12:45 astol babilen: yay, that's what I need! Wonder how I missed it, thanks
12:47 vejdmn joined #salt
12:50 superted666 joined #salt
12:50 babilen astol: http://jinja.pocoo.org/docs/dev/templates/#if
12:50 bhosmer joined #salt
12:53 lcavassa joined #salt
12:53 nyx joined #salt
12:53 scalability-junk Does salt have something similar to a service discovery feature such as etcd or consul?
12:54 scalability-junk or should I just use consul with salt.
12:54 troyready joined #salt
12:55 vejdmn joined #salt
12:55 vbabiy joined #salt
12:58 mik3 is there a way to specify something like cp.get_dir in a managed directory state so that a managed dir gets replicated to minions, like as if i were to rsync the directory by hand
12:59 scottpgallagher joined #salt
13:02 JordanTesting joined #salt
13:03 ikanobori joined #salt
13:03 oz_akan joined #salt
13:03 mpanetta joined #salt
13:05 wiqd joined #salt
13:06 mik3 hrm guess there's an rsync module, nice.
13:06 miqui joined #salt
13:09 mik3 oh but that's only for running rsync from the master on the minions...i think
13:10 mpanetta joined #salt
13:10 racooper joined #salt
13:13 mpanetta joined #salt
13:13 intellix joined #salt
13:14 prosper_ joined #salt
13:15 mpanetta joined #salt
13:16 nitti joined #salt
13:17 lcavassa joined #salt
13:17 mattmb joined #salt
13:18 kusams joined #salt
13:21 ramishra joined #salt
13:21 abele joined #salt
13:23 micah_chatt joined #salt
13:23 rypeck joined #salt
13:25 jeddi scalability-junk: you mean grains?
13:25 patrek_ joined #salt
13:25 nyx joined #salt
13:27 micah_chatt_ joined #salt
13:29 krissaxton joined #salt
13:30 krissaxton joined #salt
13:32 jhauser joined #salt
13:35 ramishra joined #salt
13:39 rattmuff I'm trying to read up on how the Pillar top.sls file prioritizes the entries but can't find an obvious answer. I have some patterns that might match more then one minion.
13:39 dude051 joined #salt
13:39 rattmuff Will it use the most specific one or the last one or some other prio order?
13:40 alanpearce joined #salt
13:42 jhauser joined #salt
13:43 pdayton joined #salt
13:44 elfixit joined #salt
13:45 Katafalkas joined #salt
13:45 joehoyle joined #salt
13:51 VSpike To ensure an install .NET 4.5.1. on Windows, I guess I'll have to copy the file to the machine ( e.g. C:\Install\... ) and then run some powershell to check if it's installed and run the installer if not
13:51 VSpike yay
13:51 TheThing joined #salt
13:51 VSpike By the way, if you fancy a laugh (at my expense) have a look at http://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx "How to: Determine Which .NET Framework Versions Are Installed"
13:52 perfectsine joined #salt
13:52 StDiluted joined #salt
13:57 mattmb joined #salt
13:57 jhauser_ joined #salt
13:58 kingel joined #salt
14:00 vbabiy joined #salt
14:01 nyx_ joined #salt
14:06 VSpike Well, I thought it was funny anyway
14:07 eunuchsocket joined #salt
14:07 dccc_ joined #salt
14:09 briner joined #salt
14:10 obimod joined #salt
14:10 mattmb_ joined #salt
14:12 johtso joined #salt
14:12 grove_ joined #salt
14:14 scottpgallagher joined #salt
14:14 johtso I'm just starting to get formulas involved in my project, and I'm a little unsure how I should be including them. I'd like to have them as submodules in my main salt-state repository for ease of development, but I don't see how I can expose them when using gitfs_remotes.
14:15 johtso when using file_roots it's easy, I can just have something like "- /srv/salt" and "- /srv/salt/formulas/users-formula"
14:16 Vye johtso, should just be a matter of adding the repo to your gitfs_remotes. You can try adding one of these to test: https://github.com/saltstack-formulas
14:17 Vye johtso, for example, if I wanted to be able to assign the "apache" formula in my top file I would add https://github.com/saltstack-formulas/apache-formula.git to my gitfs_remotes list.
14:17 johtso Vye: I suppose I could both have the formula as a submodule and an explicit gitfs_remote..
14:17 johtso the former for local development and the latter for production
14:18 Vye I'm not sure what you mean by submodules. Wouldn't you just use the same git repository but specify an environment that matches the branch?
14:18 johtso I mean get submodules, so I can just just pull down all my salt states including formulas, hack on them locally, and run them in vagrant
14:18 johtso *git
14:19 Vye johtso, I tried that once but it requires too much overhead to maintain. Also, I don't think gitfs supports submodules at this time.
14:20 hobakill joined #salt
14:20 Vye The problem I had with submodules is that you have to make a commit to update the parent. Where as if your git repos were separate there would only be 1 commit required.
14:21 johtso hmm, yeah
14:21 KennethWilke joined #salt
14:22 johtso it is a shame that I have to list every formula explicitly in the master config.. it would be nicer if I could just manage it on a git/filesystem level
14:22 johtso but the fact that the actual salt state is a subdirectory of the git repo makes that awkward
14:22 Vye I used to agree, but I think they got it right. Just pretend gitfs_remotes is your master repo and all of the entries are submodules ;)
14:23 johtso definitely don't want to have to be pushing to git to test local changes though..
14:23 johtso so then I have to have all the formulas manually checked out, and file_roots path for each
14:24 Vye That part of it is true. On my dev machine I have duplicate file_roots that point directly to where my git repos are checked out to avoid that.
14:24 johtso something that would probably be easier to manage with git submodules..
14:25 Vye true, but then you are always having to make additional commits to whatever the parent repo is. That got old fast, for me.
14:25 renoirb Hi all
14:25 johtso Vye: I'll probably just end up learning the same lessons as you :)
14:26 Vye ;)
14:26 che-arne joined #salt
14:28 diudaros joined #salt
14:28 Vye johtso, they also added new per-remote configurations in 2014.7 that give you more flexibility. Have you seen these yet? http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#per-remote-configuration-parameters
14:29 diudaros hi guys
14:29 mpanetta joined #salt
14:29 ckao joined #salt
14:29 diudaros i have this file.maneg on one of my states
14:29 diudaros http://pastebin.com/HjLA0tgz
14:29 scryptic1 joined #salt
14:30 diudaros everything works, the services (pdnsd) is installed on the minion with all config files in place
14:31 diudaros thng is, if i go on the minion and delete the config file (which this file is obtained/managed by the salt server) and run again the state on the minion
14:31 felskrone joined #salt
14:31 malinoff joined #salt
14:31 diudaros the minion indeed observes that the config file is missing but instead of re-creatinng the file from the "template" file in the salt-master, it creates just a new empty file
14:32 diudaros any ideas why this is happening?
14:33 crane hi, has anyone here already used salt formulas with gitfs in a vagrant box?
14:33 miqui joined #salt
14:34 Vye crane, all the time.
14:34 penguin_dan joined #salt
14:36 gmcwhistler joined #salt
14:37 prosper_ joined #salt
14:38 diudaros any ideas why state instead of copying the template file to the minion instead creates a new file?
14:38 wendall911 joined #salt
14:40 diudaros found it
14:40 diudaros idiot me
14:40 joehoyle1 joined #salt
14:41 diudaros instead of adding source:/path/to /template  i aded location:/salt/
14:44 kingel joined #salt
14:44 mike_perdide joined #salt
14:46 ramishra joined #salt
14:46 crane Vye: how did you insert the git repository into your box? :)
14:46 iggy is there a way to "ls" in the salt:// namespace?
14:46 Vye crane, is your minion connected to a master?
14:47 crane Vye: it's a masterless setup
14:47 johtso does gitfs pull down submodules?
14:47 dude051 joined #salt
14:47 iggy I don't think gitfs works with masterless
14:48 mike_perdide hi everyone, investigating why a gitfs root wasn't refreshed when needed, I found out that in the directory /var/cache/salt/master/gitfs/refs/master wasn't purged properly. On my server, that has been running gitfs for a few of months now, it was filled with previous versions of my state root
14:48 Vye crane, ah, I don't think gitfs is supported in masterless...yet.
14:49 jalaziz joined #salt
14:49 crane Vye: hmm... so i gues i have to manually add the formulas without the magic of git?
14:49 mike_perdide I tried to debug and fix it but got stuck in gitfs.py:def update() and could not quite understand how the local tree was actually updated. Could anyone provide a hint?
14:50 Vye crane, seems like it. I run a master/minion within my Vagrant boxes.
14:50 crane Vye: that would be overkill... i just need a small vagrant box with mysql for my students to learn sql ^^
14:51 renoirb crane, I have just that somewhere in my repos
14:51 crane renoirb: uh? catch me up :)
14:52 joehoyle joined #salt
14:52 renoirb crane, you mentione that you are searching a Vagrant box with MySQL to learn, right?
14:52 renoirb *mentionned
14:52 renoirb ... and that it uses salt stack too
14:53 * renoirb read randomly your plea, didn’t follow the full conversation.
14:53 Vye crane, Maybe a little extra RAM, but not much. Can you use the git state to checkout your repo to a file_root location? Would require more highstate runs but that may be ok in your environment.
14:53 iggy mike_perdide: have you changed the git config at all? changed access method? branch? subdir? etc?
14:53 mike_perdide iggy: no I didn't, I tried it on a fresh setup and could reproduce
14:53 iggy okay, there goes my theory
14:54 crane renoirb: indeed. i'm thinking about using formulas- if you have something already finish i would like to take a look on it
14:54 zooz joined #salt
14:54 mike_perdide steps are: commit something, wait for the master to update its root, then delete something and wait for the master to update. The deleted sls should still be on the master
14:54 zooz hi people
14:54 zooz can I execute salt modules from within sls file?
14:55 renoirb crane, take a look at https://github.com/renoirb/saltyvagrant-lampstack
14:55 crane Vye: imho this will make the setup to complex. also we are not using the same os so i decided to go with vagrant and salt
14:55 zooz I basically want to make sure that at the end of sls run there is a key set in etcd (http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.etcd_mod.html)
14:55 crane renoirb: thx i will take a look
14:56 renoirb It also supports salt mysql module `salt mysql.db_create`
14:56 iggy mike_perdide: file a bug (if one doesn't already exist)
14:56 Vye crane, ah, not sure what other options you have at this point if you want to stick with git then. If you come up with something, let me know.
14:56 ajolo joined #salt
14:56 crane Vye: i think i will just to the extra work and add the formulas manually
14:57 mike_perdide iggy: okay
14:57 thedodd joined #salt
14:58 Vye crane, you might be able to host them on a http server accessible by all the minions in file_root? Would save you having to distribute them. I haven't tried that though.
14:58 lcavassa joined #salt
14:59 crane Vye: nah... i will just stick around now by setting up a small box from vagrant cloud and a formular for mysql. should be enough for now
14:59 crane would have been intresting by using gitfs but doesnt matter if not
14:59 rallytime joined #salt
15:00 mattmb joined #salt
15:00 rattmuff If anyone know about how entries in the top.sls file for Pillars are ordered and prioritized I have an issue here where I try to figure it out: http://stackoverflow.com/questions/26144348/salt-stack-top-sls-pillar-order
15:01 to_json joined #salt
15:02 CycloHex what does the include_empty do? I want to check if a directory is empty and based on the returned result do something
15:05 jeffspeff I'm writing my first state file. http://pastebin.com/ZZUL33HX i get the error "ParserError: expected '<document start>', but found '<block mapping start>'"
15:05 jaimed joined #salt
15:07 ramishra joined #salt
15:07 rojem joined #salt
15:07 jeffspeff here is the full error http://pastebin.com/a1fYgPUG
15:07 CycloHex jeffspeff, your indentation is wrong
15:07 CycloHex when you have pkg:, on the next rule you should indent 2 more spaces than the pkg line
15:08 jeffspeff ok, thanks, let me try that
15:08 CycloHex like you did with your file.replace
15:09 CycloHex jeffspeff, and all of your packagenames should have no indent to start with
15:09 UtahDave joined #salt
15:09 CycloHex what does the include_empty do? I want to check if a directory is empty and based on the returned result do something
15:09 CeBe joined #salt
15:11 CycloHex jeffspeff, your yaml syntax of the entire file is corrupted.. top level has no spaces, the next has 2 more, the next again 2 more..
15:12 jeffspeff CycloHex, I just fixed that and this http://pastebin.com/Eus4rwdR  worked.
15:12 jeffspeff I thought that since the if statement was the beginning of the block and not indented that the next line required 1 space.
15:12 CycloHex I used to think that as well :D
15:13 kickerdog joined #salt
15:13 CycloHex I thought yaml always used 2 spaces as indent..
15:13 CycloHex you only use one after packagename and none after pkg, weird :d
15:17 zooz is there a way to trigger a state from another state? Say if service X starts fine, I want to do `module.run`  ?
15:17 conan_the_destro joined #salt
15:18 zooz I should say is there a way to trigger a module.run from a state only if service starts fine?
15:18 UtahDave left #salt
15:19 mike_perdide zooz: I think what you want is the watch argument
15:19 mike_perdide check http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
15:21 desposo joined #salt
15:22 scarcry joined #salt
15:23 MasterJ joined #salt
15:24 hasues joined #salt
15:24 viq and cmd.wait
15:24 CycloHex what does the include_empty do? I want to check if a directory is empty and based on the returned result do something
15:25 CycloHex I searched the docs, but it doesn't say what it does
15:25 mike_perdide viq: +1
15:25 CycloHex only uses it in an example
15:26 Ozack1 joined #salt
15:28 StDiluted joined #salt
15:30 alanpearce_ joined #salt
15:31 CycloHex ok, found it in the mailing list.. include_empty makes sure you copy empty dirs as well... not a solution for me then
15:31 mechanicalduck joined #salt
15:32 rdorgueil joined #salt
15:33 giantlock joined #salt
15:35 rihannon joined #salt
15:35 jeffspeff in order to properly use saltutil.update (http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.update) do you have to use a web server or can you specify a path as salt://  ?
15:36 SheetiS joined #salt
15:37 VSpike I seem to get this error quite a lot. Is this  a common one? https://bpaste.net/show/abe0c03a6e18
15:37 SheetiS good morning/afternoon/evening (depend on where you are) :D
15:38 StDiluted so has anyone had success with a 2014.7.0rc2 master on an AWS instance (I had no luck with Ubuntu 14.04)
15:39 CycloHex I want to check if a directory is empty and based on the returned result do something. Do I have to use cmd state for this or is it possible to do this an other way?
15:39 StDiluted Cyclo: I’d use an unless or onlyif in your state
15:40 johtso when using salt-ssh, does it completely ignore the target server's salt installation / configuration?
15:40 johtso because for some reason it's not finding my salt states
15:40 iggy I think unless is only in 2014.7
15:41 SheetiS VSpike: If you rerun the state, does it work the second time?   The error seems to indicate that I cannot pick up the winrepo file from the base saltenv.
15:41 StDiluted pretty sure unless has been around forever
15:41 johtso the master config that salt-ssh is using has file_roots defined that are in neighbouring directories
15:41 SheetiS iggy: You can use unless on a cmd.run in 2014.1 and earlier.  2014.7 expands it to all kinds of states.
15:41 iggy jeffspeff: if you find out, will you let me know ;)
15:41 johtso is there some way to debug where salt is looking for states and why it's not finding them?
15:41 jeffspeff iggy, yes
15:41 jeffspeff lol
15:41 iggy SheetiS: ahh, knew there was something about it
15:42 StDiluted ah, that’s cool
15:42 johtso salt-ssh --where-are-you-looking-for-states? :)
15:42 jalbretsen joined #salt
15:42 tligda joined #salt
15:43 gmcwhistler joined #salt
15:43 VSpike SheetiS: I think actually everything works despite the error
15:44 CycloHex StDiluted: can't rly find examples of the unless onlyif thingies.. Do i just give command like I would in a terminal?µ
15:44 VSpike I've seen this again on second box now. A hightstate run failed on a few file.recurse states saying "The directory 'salt://....' does not exist on the salt fileserver in saltenv 'base'" ...
15:44 manfred johtso, it passes over a binary blob, and executes it, this opens up a zmq connection back to your 'master' where you are running salt-ssh from, and that passes everything else over
15:45 kingel joined #salt
15:45 manfred and executes it
15:45 VSpike Not all the directory recurse states failed, and for those that worked, they are in the same path on the master and I can't see any differences between those that worked and those that didn't. It was the same ones that failed on the second box though.
15:45 manfred that is my understanding at least
15:45 manfred i haven't looked all the way into it like I have with regular master/minion setups
15:45 johtso manfred: aha, how would i go about working out why it's not finding my states?
15:45 StDiluted CycloHex: let me find an example, one sec
15:46 VSpike If I run the states individually, they work
15:46 oyvjel joined #salt
15:46 SheetiS VSpike: is your master getting overloaded and causing timeouts? It seems weird that it is not happening every time, and this makes me think to start looking there based upon what you just said and the first pase you shared.
15:46 manfred -l debug ? the states should be on the server you are running salt-ssh from in /srv/salt, unless you configured a master.conf on that server as well to move them elsewhere
15:47 CycloHex StDiluted, The interpretation of onlyif and unless arguments are identical to those of cmd.run, and all other arguments(cwd, runas, ...) allowed by cmd.run are allowed here, except that their effects apply only to the commands specified in onlyif and unless rather than to the function to be invoked. Ok, think I can proceed now... thanks!
15:47 VSpike SheetiS: the master is only talking to a single minion at that point. How would i tell if it's overloaded?
15:48 manfred beyond that, idk
15:48 johtso manfred: I've configured salt-ssh to look in `./salt-states`
15:48 StDiluted CycloHex: https://gist.github.com/dginther/d1468a0db58a338e9754
15:48 manfred sounds like it isn't working quite right
15:48 StDiluted there’s some examples of how I’ve used it
15:48 johtso manfred: what debug output am I interested in, Jinja search path?
15:49 manfred no idea, i am sorry, i have to go back to work
15:49 johtso no problem, thanks for the help!
15:49 CycloHex thanks, man!
15:50 XenophonF joined #salt
15:50 SheetiS VSpike: hmm I wouldn't expect it to be with communication to a single minion.  What OS is the master running? for *nix, you could use stuff like top or iostat to see if you have a higher load average than you'd want for your cpus or a high iowait on disk w/ iostat.
15:50 jcockhren here's an idea folks: I'm thinking about distributing a self-contained package for run salt-minions. Similar what omnibus is to chef
15:50 VSpike SheetiS: yah, Ubuntu 14.04
15:51 nyx_ we have a salt setup with 242 minions, and I did a mine.get accidentally targeting them all and now it's doing all this work that I want to stop. so I did 'salt '*' saltutil.kill_job' and that made it part way through the entire set of machines then hung itself.  salt is effectively hung for me now, how should I proceed?
15:52 chiui joined #salt
15:52 to_json joined #salt
15:52 jcockhren basically, rpm and debs with salt-minion and deps in virtualenv, and upstart scripts
15:52 VSpike SheetiS: could it be because the master is on my colo in london and the minions are EC2?
15:52 StDiluted ok, so 2014.7.0rc2 works just dandy on Amazon Linux, but not on Ubuntu 14.04.
15:52 jcockhren I'll do some testing and report back.
15:53 StDiluted Vspike, that could create some latency for sure
15:53 iggy jcockhren: have you looked to see if anything like that existed already?
15:53 SheetiS VSpike: network timeouts would cause what you are seeing for sure.
15:53 iggy I thought I read about something similar at one point
15:54 jcockhren iggy: I haven't found anything, yet. but if you know something that does that already, let me know. :)
15:54 VSpike hm, i get a very consistent 12 or 13 ms ping between them
15:54 bezeee joined #salt
15:54 CycloHex So when I want to only do git.latest if the dir foo/ is empty, how would the onlyif command be?
15:55 jcockhren iggy: there's vgrant boxes and I'm sure some folks in here have AMIs, but not simple deb packages with ALL the things.
15:57 peno joined #salt
16:01 anotherZero joined #salt
16:03 anotherZero joined #salt
16:03 VSpike It's so consistent, I'm not sure it's a network issue. And the master is doing almost nothing, as you'd expect
16:03 VSpike It seems to fail when running as part of state.highstate
16:03 VSpike There must be something different about the enviroment then
16:04 anotherZero joined #salt
16:05 iggy jcockhren: it was definitely something about a self-contained tarball kind of thing, but it's been a _long_ time, so I don't remember if it was something that existed or if it was just something somebody thought would be cool
16:05 VSpike On an unrelated note, it's very nice that if you install .NET 4.5.x runtine in Win Svr 2008 R2 it appears in the add/remove programs list (and pkg.list_pkgs) but on Svr 2012 R2, it does not
16:06 VSpike Because on 2012 R2 it's a windows feature, not an installed program! Logical
16:07 StDiluted Vspike: what does -l debug tell you
16:08 Katafalkas joined #salt
16:11 VSpike StDiluted: nothing very useful https://bpaste.net/show/b8d13165ba98
16:12 darkelda joined #salt
16:12 darkelda joined #salt
16:13 to_json joined #salt
16:14 cruatta_ joined #salt
16:14 hotbox_ joined #salt
16:14 rcsheets_ joined #salt
16:14 StDiluted VSpike: hrm, that’s really weird.
16:14 SheetiS1 joined #salt
16:15 roo9- joined #salt
16:15 pt|Zool_ joined #salt
16:15 Twiglet__ joined #salt
16:16 kusams_ joined #salt
16:16 pviktori_ joined #salt
16:17 MTecknol1gy joined #salt
16:17 pfalleno1 joined #salt
16:17 VSpike StDiluted: here's a run of just that state https://bpaste.net/show/fb10b5d25b9c
16:17 johtso ouch, so I can't do a salt-ssh --refresh (I think) because the pillar data fails to render because of a missing grain. But I can't add the missing grain because I can't refresh..
16:17 ifmw_ joined #salt
16:17 Hipikat joined #salt
16:17 robins joined #salt
16:17 __number5__ joined #salt
16:18 johtso running `salt-call grains.items` shows the relevant grain on the machine
16:18 renoirb joined #salt
16:18 johngrasty joined #salt
16:18 johtso but salt-ssh grains.items doesn't have it
16:18 ekkelett joined #salt
16:18 freelock joined #salt
16:18 goal joined #salt
16:19 kingel joined #salt
16:19 alexwh joined #salt
16:19 istram joined #salt
16:19 jut joined #salt
16:19 jasonrm joined #salt
16:20 prosper_ joined #salt
16:20 davet joined #salt
16:20 KyleG joined #salt
16:20 KyleG joined #salt
16:21 Katafalkas joined #salt
16:23 kickerdog joined #salt
16:23 gmcwhistler joined #salt
16:23 jforest joined #salt
16:23 jmccree joined #salt
16:24 aparsons joined #salt
16:25 siegen joined #salt
16:26 siegen Hopefully this is a quick question...we are looking to get started with Salt but first want to use it to take an inventory of our system (establish a baseline config).  Is salt mine the most effective way to do that? or is there a better way?
16:27 bhosmer joined #salt
16:28 rihannon left #salt
16:30 wnkz joined #salt
16:30 SheetiS The salt mine would be used to take information from one machine to provision states on another.  You could find out what machines were running apache to have haproxy point to them, for example.
16:31 SheetiS When you say 'take an inventory', are you saying that you want to see all of the current installed packages and/or configs?
16:31 iggy you can write custom mines as well
16:31 iggy so you could write a mine that grabs a list of packages from each host, etc.
16:32 iggy it's not something I'd leave on long term though
16:32 iggy wait, no grains
16:32 iggy I was talking about grains
16:32 SheetiS You could probably add pkg.list_pkgs to your mine functions for that...
16:34 saltymoli joined #salt
16:34 siegen correct, so basically want to get a clear picture of what is currently installed and configured
16:35 bhosmer_ joined #salt
16:35 siegen Thank you all for the help!   out of curiosity, what is the reason you wouldn't leave the mine on for long term?
16:36 StDiluted any way to get more information about this error: 2014-10-01 16:35:37,319 [salt.utils.event                           ][ERROR   ] Failed to render "/srv/salt/reactor/ec2-autoscale.sls"
16:36 chrisjones joined #salt
16:36 siegen is there a reason to use mine over grains or vice versa?
16:36 tyler-baker joined #salt
16:38 manfred the mine allows you to query information about other servers without having to peer the minions
16:38 iggy I was confused in my head... I was referring to grains when I said not to leave it on long term
16:38 johtso has anyone successfully used grains with salt-ssh?
16:39 anotherZero joined #salt
16:39 johtso this makes me think it should work: https://github.com/saltstack/salt/issues/8555
16:39 hardwire joined #salt
16:40 johtso but with a variable defined in /etc/salt/grains .. I can see with when running `sudo salt-call --local grains.get environment` on the machine.. but when I run `salt-ssh -c . 'vagrant' grains.get environment` I get nothing
16:40 johtso --refresh doesn't help
16:40 micah_chatt joined #salt
16:44 ozzzo1 joined #salt
16:45 hasues joined #salt
16:45 siegen ok, so if we already have the minions installed and configured to the masters then could probably accomplish via custom grains ?
16:47 diegows joined #salt
16:51 prosper_ joined #salt
16:51 conan_the_destro joined #salt
16:52 mgw joined #salt
16:52 jodv joined #salt
16:55 johtso I've opened an issue: https://github.com/saltstack/salt/issues/16292
16:56 aparsons joined #salt
16:56 saltymoli left #salt
17:01 delinquentme joined #salt
17:03 ggoZ joined #salt
17:04 StDiluted anyone know reactor enough to help me with this: https://gist.github.com/dginther/d9258a0e0c8f50402022
17:05 StDiluted running 2014.7.0rc2, followed the instructions in the readme for the ec2 autoscale, but it isn’t rendering the sls
17:05 StDiluted and i set it to debug level logs, but there’s really no info about why it failed
17:06 BrendanGilmore joined #salt
17:06 druonysus joined #salt
17:08 n8n joined #salt
17:09 spookah joined #salt
17:09 spookah joined #salt
17:11 murrdoc joined #salt
17:11 ajolo joined #salt
17:11 Ryan_Lane joined #salt
17:11 wt joined #salt
17:12 linjan joined #salt
17:12 wnkz_ joined #salt
17:17 johtso What's supposed to happen when you have an `/etc/salt/minion` and an `/etc/salt/minion.d/minion.conf`?
17:20 kermit joined #salt
17:27 kickerdog joined #salt
17:28 duncanmv_ joined #salt
17:29 jeffspeff joined #salt
17:34 StDiluted SWEET
17:34 StDiluted ec2-autoscale reactor working.
17:35 Gareth morning morning
17:35 trevorj johtso: minion is read first, then the minion.d files are included
17:36 harkx joined #salt
17:36 johtso trevorj: ah cheers, just realised it was a bug in salt-formula
17:36 johtso it was naming the file minion instead of minion.conf.. pushing the fix as we speak
17:36 druonysuse joined #salt
17:38 szicari joined #salt
17:39 felskrone joined #salt
17:39 harkx hi, I install a .deb with pkg.installed (from local sources) but how can I force upgrade this? (also an issue: https://github.com/saltstack/salt/issues/7772 )
17:40 aw110f joined #salt
17:43 felskrone1 joined #salt
17:45 jeffspeff i'm trying to write a state for using file.replace to change values in the minion config file. I can get it to work fine with http://pastebin.com/tZ4HpdWf  but i can't figure out the proper syntax for rpelacing multiple different entries in the same file. specifying multiple pattern/repalce values under "file.replace:" doesn't work, it also doesn't work to do this http://pastebin.com/4nAhR8eQ
17:46 eliasp is it possible to use a state in a SLS only when it is executed in an overstate context? I want to exclude it when running state.highstate…
17:46 possibilities joined #salt
17:46 eliasp is the context in which state (low,high,over) somehow available via Jinja?
17:47 jindo joined #salt
17:47 rypeck jeffspeff: specify the file to be managed as name: for the state and give each different replace operation you want to do a different ID.
17:48 iggy jeffspeff: tried something like? - pattern:\n - foo\n - bar\n- repl\n - foo2\n - bar2
17:49 jeffspeff iggy, no, because i didn't know how I would match the particular replacement value for each item within pattern
17:50 jeffspeff i'm basically just wanting to filter through a config file and change certain values from true to false or whatever the value needs to be set to
17:50 iggy me either, but in python, lists as args like that tends to work by matching 0:0 1:1 2:2 etc
17:50 obimod joined #salt
17:51 utahcon is there anyway using file.blockreplace to match "script" and not "pre-start script" ?
17:51 utahcon for the marker_start and marker_stop
17:51 saurabhs joined #salt
17:52 jeffspeff rypeck, are you suggesting to use name: in the same way that file.blockreplace uses it? http://makina-corpus.com/blog/metier/2014/saltstack-manage-entries-in-unmanaged-files-with-file-blockreplace
17:52 thedodd joined #salt
17:53 anotherZero joined #salt
17:55 tafa2 joined #salt
17:56 jeffspeff rypeck, this state http://pastebin.com/ctb1p8bt  results in this error http://pastebin.com/GK2cgf9c   I was trying how you suggested.
17:57 prosper_ joined #salt
17:58 prosper__ joined #salt
17:59 utahcon perhaps a better question is, does the "pre-start script" block need to go in a specific place in an upstart conf? if not I am just going to use file.append
17:59 mortis joined #salt
18:00 jalaziz joined #salt
18:01 mortis_ joined #salt
18:04 viq joined #salt
18:10 rypeck jeffspeff: you need a space between the - and "name" on line three there.
18:11 dalexander joined #salt
18:12 druonysus joined #salt
18:14 darkelda joined #salt
18:14 aparsons joined #salt
18:15 ajolo joined #salt
18:15 sarkis joined #salt
18:18 jeffspeff rypeck, awesome, that worked! thank you
18:19 lincolnkirchoff joined #salt
18:19 hobakill joined #salt
18:25 FeatherKing joined #salt
18:26 FeatherKing joined #salt
18:26 CF512875 joined #salt
18:29 kermit joined #salt
18:29 mklauber1 joined #salt
18:31 jalaziz joined #salt
18:35 alanpearce joined #salt
18:39 JordanTesting joined #salt
18:42 lincolnkirchoff Does anyone know if it's possible using salt.modules.aptpkg to list available upgrades for all packages installed on a target? I know that there's a relatively new function "pkg.uptodate", but from the documentation it seems that is used to check updates for a single package. More or less, I'm looking for a module to run the command "apt-get --just-print upgrade" on my targets.
18:42 rcsheets_ joined #salt
18:43 Gareth lincolnkirchoff: if that doesn't exist already it would be a great addition.
18:43 n8n joined #salt
18:43 lincolnkirchoff I'd be willing to put in the effort to code it up, I just want to make sure it isn't already a feature.
18:44 Gareth lincolnkirchoff: there is a list_upgrades function in the aptpkg module.
18:44 anotherZero joined #salt
18:45 pfallenop joined #salt
18:45 micah_chatt joined #salt
18:45 war2 joined #salt
18:45 Katafalkas joined #salt
18:46 lincolnkirchoff I must have missed that, I tested it on a few of my targets and it functions as expected. Thanks for pointing me in the right direction!
18:46 mikepea_ joined #salt
18:47 n8n joined #salt
18:47 Gareth no worries.
18:47 Gareth :)
18:48 saurabhs joined #salt
18:49 iggy so... I've got fileserver_backend set to git and roots, I've got gitfs_remotes set to - https://github.com/saltstack-formulas/rsyslog-formula.git and file_roots:base: set to /srv/dist
18:49 iggy when I do a cp.list_master, nothing from file_roots shows up, only the rsyslog-formula
18:50 iggy if I take git out of fileserver_backend, I can see everything in /srv/dist that I expect
18:52 babilen iggy: Mind pasting your configuration in toto to http://refheap.com ? (and please don't reference formulas directly, but fork them, you'll give everyone who can push into those root on your boxes otherwise)
18:52 CeBe joined #salt
18:53 iamtew good evening :)
18:53 aparsons joined #salt
18:54 prosper_ joined #salt
18:54 rypeck lincolnkirchoff: salt.modules.aptpkg.list_upgrades
18:54 semarie joined #salt
18:54 n8n joined #salt
18:56 iggy I know, I know
18:56 iggy that was an example
18:57 manytrees joined #salt
18:57 ikanobori joined #salt
18:57 abele joined #salt
18:58 wiqd joined #salt
18:58 imanc joined #salt
18:58 modafinil__ joined #salt
18:59 StDiluted mmmm, modafinil
18:59 babilen StDiluted: ECHAN? (/me hopes)
19:00 babilen tmi definitely
19:00 gamingrobot joined #salt
19:00 iggy https://www.refheap.com/91029
19:00 StDiluted ?
19:00 iggy that's the config... it really is as simple as I said it was
19:01 StDiluted someone with the name of modafinil joined, and I was just remarking on how wonderful modafinil is (the drug)
19:01 glyf joined #salt
19:01 babilen Sorry, not into that. </offtopic>
19:02 CeBe1 hi, why would file.recurse state not update the files in that directory?
19:03 dude051 joined #salt
19:04 nitti joined #salt
19:04 dude051 joined #salt
19:05 ndrei joined #salt
19:05 babilen CeBe1: Mind elaborating?
19:05 CeBe1 nvm, was an issues with wrong pillar setting
19:05 babilen okay
19:07 elextro_ joined #salt
19:07 elextro_ Does anybody know how I can tell salt to ignore an error if it occurs on a state?
19:08 CeBe1 elextro_: ignore and do what instead?
19:09 babilen Continue executing the rest of the states I guess
19:09 elextro_ CeBe1: Just ignore, then move on..
19:10 CeBe1 doesn't it do that unless you define dependencies?
19:10 elextro_ But I want it to do that even if I have a dependency defined.
19:11 perfectsine joined #salt
19:11 elextro_ Because I want to preserve the order in which things are done in my orchestration runner
19:11 CeBe1 elextro_: may I ask what is failing for you?
19:12 kickerdog joined #salt
19:12 elextro_ CeBe1: Sure. I'm running the cmd state module and the command inserts a user into mysql. However, when I re-run my orchestration-runner, that command fails saying that the user is already in the DB
19:12 kickerdog left #salt
19:13 elextro_ I want to ignore the fact that the cmd has failed and continue the orchestration
19:13 CeBe1 elextro_: then it would be better to let it return successfully in that case
19:14 elextro_ CeBe1: Hmm.m..what do you mean by that? Is there a way to force that?
19:14 CeBe1 you can change the command to something like    mysql "..." | echo "user seems to exist"
19:14 CeBe1 not the best way because it ignores any error but thats what you asked for ;)
19:15 CeBe1 sry, mysql "..." || echo "user seems to exist"
19:15 kingel joined #salt
19:15 CeBe1 has to be double ||
19:15 aparsons joined #salt
19:15 elextro_ CeBe1: Gotcha! That makes sense.
19:15 CeBe1 this will run the first command and if it fails, tries the second
19:16 babilen elextro_: You should use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_user.html
19:16 elextro_ babilen: Yeah I know!!!!
19:16 elextro_ lol
19:16 babilen So ... why don't you?
19:17 elextro_ I will do that once I get the bigger picture working ;)
19:18 babilen Well, it wouldn't fail if the user exists already
19:18 babilen Why not do things right to begin with?
19:18 elextro_ You're right. I should use that
19:24 babilen elextro_: There is also https://github.com/saltstack-formulas/ in case you require that.
19:24 krissaxton joined #salt
19:25 babilen elextro_: Err, I meant to point out: https://github.com/saltstack-formulas/mysql-formula/ :D
19:26 nitti joined #salt
19:27 rap424 joined #salt
19:29 murrdoc joined #salt
19:30 gadams joined #salt
19:30 FarrisG joined #salt
19:31 krissaxton joined #salt
19:32 mklauber1 left #salt
19:33 krissaxton joined #salt
19:33 Pixionus joined #salt
19:37 lyddonb joined #salt
19:39 krissaxton joined #salt
19:41 baconbeckons joined #salt
19:41 baconbeckons joined #salt
19:43 baconbeckons i’m having trouble using the formula salt-formula. it doesn’t appear to render any of the data in my pillar. how can i make sure that the pillar data is seen?
19:44 babilen shown in pillar.items for that minion?
19:45 iggy baconbeckons: does "salt-call pillar.items" show you what you expect?
19:45 murrdoc salt '*' saltutil.refresh_pillar
19:45 jxqz joined #salt
19:45 murrdoc salt '*' pillar.get ITEMNAME
19:45 * jxqz salts eightyeight
19:46 timoguin ITEMNAME should be salt for the salt-formula
19:48 druonysus joined #salt
19:50 murrdoc aw110f:  whats in a name!
19:51 baconbeckons iggy: thank you. the piller items were missing because i forgot to include them in top.sls :)
19:51 iggy I'm sure we've all been there
19:52 baconbeckons it would be better if i wasn’t late to work trying to figure that out
19:52 baconbeckons :)
19:53 aw110f murrdoc: yo
19:53 jeffspeff joined #salt
19:55 murrdoc anyone here get a log parser for salt, to work with logstash/elastic search
19:55 baconbeckons so the salt-formula puts the minion and master configs in /etc/salt/minion.d and /etc/salt/master.d whereas vagrant puts them in /etc/salt. if i bootstrap with vagrant, i can’t use the salt-formula without modifying it. is there an approach i can use so that i start salt with the vagrant provisioner, then remove the configs that vagrant inserts so that the salt-formula configs can take over?
19:56 ericof joined #salt
19:58 perfectsine joined #salt
19:58 smcquay joined #salt
19:58 possibilities joined #salt
19:59 darkelda joined #salt
20:02 iggy we faced the same problem, never fixed it afaik
20:03 iggy I want to say we just ended up changing our master provisioning script to suit the salt-formula
20:03 iggy not really an answer when using something like vagrant though
20:03 prandelicious joined #salt
20:03 prandelicious hi all
20:03 prandelicious how do i log output of a bunch of variables via DEBUG?
20:04 baconbeckons iggy: i’m running it right now with a modified salt-formula and i guess that works for now
20:05 druonysuse joined #salt
20:07 baconbeckons iggy: this does lead to another issue though… we are using gitfs but to get gitfs working, we have to install a lot of apt packages and then pip install pygit2. it puts us back into a situation where we can’t salt the salt-master until the files are in place. it seems like we need a two-tiered approach where we bootstrap a minimal salt master that doesn’t use gitfs, then we install what is needed for gitfs with salt,
20:07 baconbeckons then we replace the master config with a new version that adds the gitfs settings. is this something that i would use state.over for? is there an easier way?
20:07 perfectsine joined #salt
20:09 iggy that's what we do
20:10 desposo joined #salt
20:10 baconbeckons iggy: with state.over? is this something that you can share so i can see an example?
20:11 Imtnt joined #salt
20:11 Imtnt Is there a way to configure halite to use a prefix?
20:15 dude051 joined #salt
20:15 kingel joined #salt
20:16 eunuchsocket joined #salt
20:16 possibilities joined #salt
20:19 vbabiy joined #salt
20:19 SheetiS Imtnt: it looks like server_bottle.py in halite supports --base as an arg for its prefix
20:19 SheetiS help = "Base Url path prefix for client side web application.")
20:20 SheetiS From looking at https://github.com/saltstack/halite/blob/master/halite/server_bottle.py
20:21 Imtnt_ joined #salt
20:21 Imtnt_ I tried that but it had no effect
20:22 Imtnt_ in fact it's supposed to be able to specify that in the config
20:23 obimod joined #salt
20:23 catpig joined #salt
20:23 perfectsine joined #salt
20:26 iggy baconbeckons: I wrote some code that talks to gce to do our instance spin-up/etc... it has a special block for handling doing the initial salt spin up (which includes setting up the salt-formula and our pillars), then the salt-formula (and other formulas/states) take over from there
20:26 jobob joined #salt
20:27 murrdoc iggy, any reason u didnt use the salt cloud provider/deploy setup
20:27 murrdoc outside of it wasnt around
20:27 baconbeckons iggy: i sort of get that…
20:27 iggy salt-cloud sucks with gce
20:27 iggy bad...
20:27 UtahDave joined #salt
20:28 baconbeckons murrdoc: if you are salting a salt master, is that possible?
20:28 iggy also ^ that
20:28 murrdoc well it might not be
20:28 murrdoc buuuut it does use bash to setup the minions
20:28 murrdoc so its reusable code
20:28 iggy that was the easy part
20:28 baconbeckons iggy: are you able to share the states you mentioned?
20:29 iggy gce just has metadata called startup-script (or something) that it runs on startup
20:29 murrdoc which should be a file that you can place on the server at boot time
20:29 murrdoc ryan_lane did something similar
20:29 iggy none of the states are related to rolling out the master
20:29 murrdoc kept all the bootstrap stuff in s3
20:30 iggy it's stuff for our product/applications
20:31 iggy the salt bootstrap stuff is all of 35 lines of code, and we have no illusions of moving out of gce any time soon, so leveraging other code didn't seem necessary (or probably prudent based on our other experiences with salt-cloud)
20:31 StDiluted baconbeckons, are you on aws?
20:33 Blacklite joined #salt
20:33 baconbeckons StDiluted: yes, we are
20:34 Ryan_Lane joined #salt
20:34 UtahDave left #salt
20:35 jalaziz joined #salt
20:35 murrdoc can i ask why you want to automate the master's deploy
20:35 StDiluted what i did, because my state requires some pip stuff and other things that are not on the base image, was to bake an AMI of Ubuntu 14.04, ruby (because it takes forever to compile), and boto, and a couple other things, and that’s what i use to spin up my salt machines
20:36 iggy automate everything!
20:36 murrdoc *within reason
20:36 murrdoc :P
20:36 baconbeckons StDiluted: that is probably easier in the long run, but for now, that means that i need to maintain an ami as well as a vagrant cloud image
20:37 baconbeckons still, do you think that is better than having to setup the overstate?
20:37 murrdoc probably
20:37 StDiluted baconbeckons: yeah I totally get that. it’s just what I ended up doing. I will have to update ruby if we change versions, and then update my autoscale group, etc, but that was worth it to me
20:38 StDiluted I have not messed with overstates
20:39 peters-tx joined #salt
20:39 baconbeckons @StDiluted since this relates to the other problem i was talk about above with vagrant putting salt configs in a different location than the salt-formula, i started looking at overstates. i’m still not sure how to work with them though
20:39 iggy The only reason I'd maintain my own ami/disk image would be for speeding up spin-up of nodes... otherwise, I'd just go with a different top for doing the intermediate steps using state.top
20:40 baconbeckons if i maintained those two images myself, i would still need to deal with how vagrant deals with the salt configs
20:40 utahcon can you do something like: {% set var = 'somestring' %} {% set var2 = salt['grain.get'](var) %} ?
20:40 baconbeckons iggy: what do you mean by a different top?
20:41 iggy baconbeckons: /path/to/vagrant/config: - file.absent
20:41 iggy you can use a separate (possibly less complex) top file via the state.top function
20:41 baconbeckons how do you ensure that the file is only deleted after the salt-formula has taken over?
20:42 iggy overstate? or customize salt-formula
20:42 GrueMaster joined #salt
20:43 kvt joined #salt
20:43 kvt Hi folks, I have salt-ssh question
20:44 oz_akan joined #salt
20:44 kvt According to sources both local and remote machines are using /tmp.salt directory to prepare and execute files
20:44 baconbeckons iggy: ok, thanks. i’ll have to figure out more about overstates i think
20:45 kvt does this mean that if 2 people would try to update same remote host there would be conflict?
20:45 kvt same question goes to local machine
20:46 kvt if 2 people on the same host would run salt-ssh would they interfere with each other?
20:46 XenophonF joined #salt
20:46 UtahDave joined #salt
20:47 oz_akan joined #salt
20:49 smcquay joined #salt
20:54 baconbeckons using salt-formula, there are config files stored in salt/files/cloud.maps.d etc. since the config would be unique to your deployment, wouldn’t it make sense to have these files created based on your pillar? it appears that the authors expect you to fork the formula and then hard code your maps/profiles/providers within the formula?
20:56 baconbeckons er, maybe i’m reading the state wrong
20:56 murrdoc or setup a new provider ?
20:56 murrdoc and then setup the rest for it
20:56 murrdoc let me look at this
20:56 murrdoc sorry i should stop guess
20:56 murrdoc guesing*
20:56 murrdoc https://github.com/saltstack-formulas/salt-formula
20:56 murrdoc this one yeah ?
20:58 baconbeckons yes, that formula
20:58 bhosmer joined #salt
20:58 aw110f murrdoc: food for thought http://make.rafflecopter.com/clean-salt-states.html
20:59 possibilities joined #salt
20:59 murrdoc nice
21:00 murrdoc "wouldn’t it make sense to have these files created based on your pillar?"
21:01 baconbeckons murrdoc: for instance, in cloud.providers.d/ec2.conf, i need to deploy into a different location and i need to use a subnet. it appears that i’m supposed to modify the conf file in the formula but that doesn’t seem like a reusable approach for the salt-formula
21:01 murrdoc yeah, you can specify your own pillar and then the path to the config files
21:01 pssblts joined #salt
21:01 baconbeckons murrdoc: i can override these config files? i’m not seeing how the formula allows this without me modifying it...
21:02 murrdoc https://github.com/saltstack-formulas/salt-formula/blob/master/salt/cloud.sls#L2-L3
21:02 murrdoc so if u setup the 'salt' pillar from your own pillar file
21:02 murrdoc then it will use that
21:02 iggy baconbeckons: look at my fork of the salt-formula
21:02 iggy it does have the salt-cloud stuff more abstracted
21:03 iggy (although not very well documented)
21:03 murrdoc you will basically have a copy of https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example in your pillars directory
21:03 murrdoc with the config you want
21:03 murrdoc yeah iggy's used a few more dictionaries
21:03 murrdoc its +1
21:03 murrdoc someday pull request
21:03 * iggy really need to send that upstream
21:03 Daemonik joined #salt
21:04 baconbeckons murrdoc: if i’m reading that right, it still means that the provider conf will be based on https://github.com/saltstack-formulas/salt-formula/blob/master/salt/files/cloud.providers.d/ec2.conf which hard codes the location and availability_zone
21:04 Daemonik How may I run the equivalent of "salt-minion --log-level=info" on windows?
21:04 * baconbeckons looks at iggy’s version
21:04 murrdoc baconbeckons:  u would have your own directory
21:05 murrdoc oh u wont
21:05 murrdoc interesting
21:05 murrdoc https://github.com/saltstack-formulas/salt-formula/blob/master/salt/cloud.sls#L63
21:05 baconbeckons murrdoc: hehe yeah :)
21:05 murrdoc i was hoping that would read in the conf
21:06 ikanobori joined #salt
21:07 iggy oh, my version is for gce, not aws too
21:07 * iggy notes
21:07 murrdoc btw baconbeckons you dont have to use gitfs
21:07 murrdoc i am setting a salt-conf package, where i setup the formulas and stuff (without git) and ship stuff around
21:07 murrdoc the equivalent of using a fork
21:08 baconbeckons murrdoc: how does that work?
21:08 murrdoc for repos/locations; do git checkout repo location; git submodule update ..;rm -rvf .git*;
21:09 kballou joined #salt
21:09 murrdoc that sets up the directories
21:09 murrdoc then use fpm to go from directory to deb
21:09 baconbeckons oh, got it
21:09 murrdoc then deploy the deb
21:09 baconbeckons i was using git subtree for that except i wasn’t using a deb
21:10 baconbeckons i was deploying the formulas on their own from the salt filesystem
21:10 skullone howdy salt
21:10 baconbeckons howdy skullone
21:11 murrdoc iggy:  "i should send that upstream" http://is.gd/98B0xb
21:12 KennethWilke joined #salt
21:12 iggy I actually meant to do it last weekend, but got shitface drunk 3 days in a row instead
21:13 kvt no people with salt-ssh experience here?
21:13 pdayton joined #salt
21:14 iggy usually just people having problems with it
21:14 iggy that's probably exagerated
21:15 iggy I just don't know anything about it (or masterless) so I feel helpless when people have problems with it
21:15 kvt iggy: I see, thanks
21:17 iggy kvt: mind if I ask, why are you using salt-ssh vs regular salt?
21:17 forrest joined #salt
21:17 perfectsine joined #salt
21:18 Imtnt joined #salt
21:19 awu joined #salt
21:20 kvt iggy: regular salt is not stable for us
21:20 kvt minions crash
21:20 KennethWilke they crash?
21:20 kvt yes
21:20 KennethWilke what causes that?
21:20 iggy interesting, I've never seen one crash
21:20 KennethWilke yeah that's not an issue i've run into
21:21 iggy the minion seems like it's pretty standard python
21:21 krissaxton joined #salt
21:21 kvt we are using 2014.1.10
21:21 CeBe1 I've seen minions crash because of too less memory
21:21 KennethWilke makes me want to check my logs though
21:21 kvt we see minions sometime consuming 100% cpu with auth failures in the log
21:21 iggy kvt: did you file any bugs?
21:22 kvt most confusing is that master reports auth ok at the same time
21:22 kvt yes, we file bugs when we can provide enough information
21:22 KennethWilke meh, most of my minions have been up for months solid, i won't worry about it
21:22 iggy the devs have been pretty good about responding to bugs I've opened/followed
21:23 iggy kvt: what distro are the minions?
21:23 kvt also having clentless setup is very attractive for us
21:23 mndo joined #salt
21:23 KennethWilke that bit is understandable
21:23 kvt we use centos and ubuntu
21:23 baconbeckons when using salt-cloud, how are people ensuring that the minions can reach the salt master by using the hostname of ‘salt’?
21:24 KennethWilke baconbeckons, usually by changing that setting
21:24 iggy sure, but you lose out on certain things
21:24 KennethWilke ima look for a doc for you that shows you a nice way to handle that baconbeckons
21:24 geekatcmu Everybody thinks clientless setup is the bomb, until they start complaining about how expensive it is to set up new connections, manage ssh keys, etc.
21:24 iggy you set it on the provider
21:24 baconbeckons KennethWilke: ok, thanks
21:25 fsdfsdff joined #salt
21:25 fsdfsdff f
21:25 KennethWilke baconbeckons, http://docs.saltstack.com/en/latest/topics/cloud/config.html#minion-configuration
21:25 KennethWilke you can set some configs that'll be added to the minions configuration file
21:25 KennethWilke such as giving the master a fqdn or ip
21:26 iggy what geekatcmu said... you're probably going to end up doing the same amount of work either way... ssh keys or install minion... and salt-ssh has a few limitations
21:26 yomilk joined #salt
21:26 iggy the biggest one for me would be only being able to target by name
21:27 kvt target by name is not an issue, we are going to use external wrapper with flexible host selection
21:27 baconbeckons KennethWilke: if we do it that way, we need to end up with a public dns record for the salt master. it seems like it would be better to keep the dns internal to the servers, wouldn’t it?
21:27 * iggy shivers at the memory of things named AE-SOU-TW-NS-0001
21:27 murrdoc joined #salt
21:27 kvt ssh key management is not an issue as well, we are going to prdeploy management key during initial machine setup
21:27 KennethWilke you can use an IP instead of a dns record
21:28 iggy baconbeckons: aws should have resolvable names (iirc)
21:28 iggy I know gce does
21:28 KennethWilke or you can use an internal dns name if your kicks are configured to use internal dns
21:28 murrdoc only if you setup route53
21:28 iggy oh, did everybody hear gce lowered prices 10% today?
21:28 murrdoc in your vpc
21:28 baconbeckons murrdoc: isn’t route53 only for public dns?
21:29 murrdoc uh i think u can use it for your servers
21:29 nyx joined #salt
21:30 iggy kvt: we aren't trying to convince you to switch, you obviously have valid reasons for using salt-ssh... some people however don't
21:31 baconbeckons however, if iggy and the others were trying to convince you to switch, i would listen to them ;)
21:32 iggy don't listen to me... very bad idea
21:32 baconbeckons tell that to my states :)
21:32 geekatcmu Never listen to me.
21:34 baconbeckons maybe for now, i’ll just point minions to the master by ip… but how do i access to ip of the master that is running salt-cloud and insert it into the pillar data?
21:35 skyler__ joined #salt
21:35 murrdoc saltstack/salt-contrib
21:36 murrdoc has an aws-ip pillar thing
21:37 iggy and it should have a gce one too
21:37 Emantor joined #salt
21:37 * iggy adds something to his TODO list
21:37 rap424 joined #salt
21:37 dude051 joined #salt
21:42 baconbeckons murrdoc: are you talkign about this? https://github.com/saltstack/salt-contrib/blob/master/pillars/lookup.py
21:42 baconbeckons it looks like that could then be used to call the aws_info grain?
21:45 baconbeckons to use that, do I use ‘ext_pillar’ in my master conf?
21:45 possibilities joined #salt
21:46 murrdoc oh wait, you want to know how the minion would have the master's ip
21:46 murrdoc are you using the ec2 cloud provider stuff
21:46 baconbeckons from what i see, ext_pillars can’t load code that sits in an external file
21:47 baconbeckons murrdoc: yes i am
21:47 murrdoc /etc/salt/cloud.deploy.d/bootstrap-salt.sh will set that up
21:47 murrdoc also expillars: - path_to_python.py: param
21:48 murrdoc will run the code in path_to_python.py if there is an ext_pillar fucntion in it
21:48 iggy holy crap! you can have script provide pillar data
21:48 glyf joined #salt
21:48 iggy my world just completely changed
21:49 baconbeckons murrdoc: bootstrap doesn’t appear to set the host… how and where does it configure this? /etc/hosts?
21:49 babilen iggy: Sure, you can write them in Python if you want to. Just use "#!py" in the first line and implement run() to return a dictionary. Bam.
21:50 iggy how have I never noticed this in the last year of using salt...
21:50 babilen iggy: You can also manage files with python (i.e. renderer is #!py) which I use to write configuration for which there are parsers/emitters available in Python. Quite nice for, for example, ConfigParser INI files, ...
21:51 iggy honestly, I didn't know you could do anything other than file/git pillars
21:51 iggy now I see there are tons of them
21:51 iggy *mind blown*
21:51 iggy like triple rainbow level mind blown
21:52 babilen let me blow it some more ...
21:53 murrdoc thats what babilen said
21:53 * murrdoc waits
21:54 DaveQB joined #salt
21:55 babilen iggy: https://www.refheap.com/04716d74629bf65ec9e44a338 is a pillar (or rather the documentation) I use to define NRPE checks. I tend to write DSLs (domain specific languages) that generate me the data I need.
21:56 babilen "nrpe_check('check_load', 'check_load', '-w 15,10,5 -c 30,25,10')," (and so on)
21:56 StDiluted has anyone implemented a database backed pillar yet? Or an etcd one?
21:57 babilen StDiluted: http://docs.saltstack.com/en/latest/ref/pillar/all/ (pick your poison)
21:57 mike-d-d joined #salt
21:57 StDiluted ah nice
21:58 murrdoc yeah saltstack did the etcd
21:58 murrdoc there is a postgres one somewhere
21:58 StDiluted very cool
21:58 thedodd joined #salt
21:59 baconbeckons murrdoc: i’m looking in /etc/hosts and nothing is configured for the host ‘salt’ which is what i set as the master for the server i just started with salt-cloud
21:59 murrdoc whats in the /etc/salt/minion file
21:59 murrdoc cos i just tested with 2014.1
21:59 baconbeckons in the minion i just started?
21:59 murrdoc and i get the private ip for my master
21:59 murrdoc salt-cloud -p ec2 vmname
21:59 murrdoc i ran that to start the minion
22:00 iggy I notice there's a django_orm one... that should cover quite a few databases (assuming you don't mind formatting your data like Django)
22:00 bhosmer joined #salt
22:00 baconbeckons murrdoc: in /etc/salt/minion i have ‘master: salt’
22:00 murrdoc thats weird
22:00 murrdoc and you used salt-cloud ? to make the vm
22:00 baconbeckons is there some config i need to do in salt cloud?
22:01 baconbeckons murrdoc: yes, i just started that server with salt cloud
22:01 iggy there's a minion setting, but I thought it default to the host that was running salt-cloud
22:01 murrdoc thats what i saw happen too
22:01 murrdoc are u able to ping
22:02 murrdoc like salt '*' test.ping
22:02 murrdoc also if u have a minion running on the master you can always do salt 'master' grain.get ipv4
22:02 murrdoc to the get the ip
22:03 kermit joined #salt
22:03 baconbeckons murrdoc: in my cloud providers, i have ‘minion:\nmaster: salt’ were you saying that i should not set this to have it auto populate?
22:04 murrdoc oh yeah, for sure
22:05 kingel joined #salt
22:06 krissaxton joined #salt
22:06 oz_akan joined #salt
22:06 mosen joined #salt
22:07 nyx_ joined #salt
22:08 baconbeckons i removed the setting from the salt-cloud config but it still points master to salt in the minion config and salt is still an unknown host
22:09 murrdoc joined #salt
22:09 baconbeckons murrdoc: i removed the setting from the salt-cloud config but it still points master to salt in the minion config and salt is still an unknown host
22:09 murrdoc one second
22:09 baconbeckons ok
22:10 bhosmer joined #salt
22:10 murrdoc are you building vpc or ec2 classic machines
22:10 baconbeckons vpc
22:11 jalaziz_ joined #salt
22:12 murrdoc i am on ec2 classic's
22:12 iggy you rebuilt the instance after changing the config right?
22:13 murrdoc oh yeah build another machine
22:13 baconbeckons murrdoc: iggy yes, i built a brand new instance to test
22:13 baconbeckons let me past some config somewhere...
22:13 baconbeckons paste*
22:13 CeBe1 "Minions can be matched using Perl-compatible regular expressions (which is globbing on steroids and a ton of caffeine)." :-D
22:14 rojem joined #salt
22:15 rojem joined #salt
22:16 rojem joined #salt
22:16 murrdoc baconbeckons:  i am looking at http://docs.saltstack.com/en/latest/topics/cloud/aws.html#launching-instances-into-a-vpc
22:16 murrdoc doesnt say anything about setting the master
22:16 murrdoc oh restart the master daemon too :)
22:17 rojem joined #salt
22:17 murrdoc probably not needed
22:17 iggy did the new instance come up with any settings?
22:18 jalaziz joined #salt
22:19 baconbeckons iggy: what do you mean ‘any settings’?
22:19 iggy does it have master set in /etc/salt/minion ?
22:19 murrdoc paste in your /etc/salt/minion
22:19 iggy or anywhere in /etc/salt/minion.d/
22:20 kusams_ Hi...i am trying to start salt-api but getting error ImportError: No module named saltapi.cli...can anyone help me
22:20 DaveQB joined #salt
22:20 baconbeckons on the brand new minion i just made, /etc/salt/minion has this set ‘master: salt’
22:20 baconbeckons iggy and murrdoc ^^^
22:21 iggy that's your problem, how to fix that...
22:21 glyf joined #salt
22:22 murrdoc gotta step away dude, sorry baconbeckons
22:22 murrdoc be back maybe in 30 -40
22:22 baconbeckons murrdoc: thanks for your help. i’ll have my config pasted by the time you return
22:23 possibilities joined #salt
22:24 fejese joined #salt
22:27 aquinas joined #salt
22:28 baconbeckons iggy: can you give this a look over? http://dpaste.com/1S2Y8WK
22:30 mike-d-d Trying to build my first slightly-complex state structure, and I'm stuck...
22:30 mike-d-d 3 states (A, B, C)
22:30 mike-d-d A should always run
22:30 mike-d-d B should run if there are any changes to A
22:30 mike-d-d C should run after B, if B runs, or otherwise after A
22:30 mike-d-d i said "B: { onchanges: A }" and "C: { require: A, B }", but if there are no changes to A then C doesn't run ("One or more requisite failed")...
22:30 mike-d-d is there a way to get what i want?
22:30 mike-d-d just put them in the file in that order and count on the implicit ordering?
22:33 baconbeckons iggy: i restarted the salt-master service and created a new instance and it’s the same problem
22:35 iggy it didn't work when you had minion: master: ip-addr uncommented?
22:36 iggy I always had mine set in the providers
22:37 baconbeckons iggy: that’s the only way it works… i thought that you guys were saying that i should unset that so that i can use whatever the ip is of the salt master that i’m running salt-cloud from?
22:41 oz_akan joined #salt
22:42 oz_akan_ joined #salt
22:42 chrisjones joined #salt
22:43 iggy I said I _thought_ that's what it would do if it was unset
22:43 pdayton joined #salt
22:44 baconbeckons haha oops
22:44 iggy I only used salt-cloud for about 2 weeks before we had to come up with a different solution, so my knowledge of the intricacies isn't what it should be
22:44 baconbeckons iggy: so if i want the config to lookup the ip address of the salt master rather than hard code it, i’m not sure that i understand how to do that
22:45 iggy I don't either
22:45 aurynn iggy, I
22:45 aurynn I'm interested in why you had to come up with a different solution?
22:46 iggy salt-cloud that came with 2014.1 doesn't play as well with GCE as we would have liked
22:47 iggy and there was a... disagreement with a developer (that has since been resolved perfectly amicably)
22:47 aurynn ah gotcha
22:47 whytewolf baconbeckons: have the cloud providers file controlled by a salt state that looks up the masters ip address?
22:47 iggy in the meantime we needed something that worked, so I hacked up something
22:48 ze- baconbeckons: what do you mean by lookup? you mean setting up a fqdn that will have a dns lookup? or... how do you mean by "lookup" ?
22:50 jalaziz joined #salt
22:50 pssblts joined #salt
22:51 alexthegraham joined #salt
22:52 alexthegraham Does anyone have much experience dealing with excluding states, show_top, and test=True?
22:52 ajolo joined #salt
22:53 alexthegraham show_top doesn't appear to calculate include and exclude parameters within states (which is what I would expect), but is the same true for adding 'test=True'?
22:53 baconbeckons ze-: basically, in my /etc/salt/cloud, i have what you see here http://dpaste.com/1S2Y8WK but on line 6, i would like to not have to manually enter the ip of the salt master, i would like to have that ip address automatically provided to the minions
22:54 druonysuse joined #salt
22:54 ze- provided how, based on what?
22:55 baconbeckons ze-: salt-cloud is run from my salt master. so it would just need to lookup its own ip and insert that into the provider defined on line 3
22:57 possibilities joined #salt
22:58 ze- haven't played with cloud, but from my naive view:
22:58 ze- - one could use a fqdn, the minion will resolve it, allowing to have it not IP hard-coded
22:59 ze- - master might have multiple IP, or have only private IPs and be behind NAT... so might not be "easy" nor "good" to have it look for its own IP per default anyway.
22:59 skyler__ I am having trouble with a debconf regression in the release candidate: https://github.com/saltstack/salt/issues/16307
23:00 yomilk joined #salt
23:00 baconbeckons ze-: the thing i don’t like about that is that it then becomes a public dns entry unless i can figure out how to make route 53 work privatly. but mainly, i thought that this was something easy to do in salt but maybe it isn’t
23:01 ze- if it already does answer on a public IP, don't see much harm having it in a public DNS entry.
23:02 ze- doesn't have to be salt.yourdomain.tld either
23:02 whytewolf baconbeckons: I say have a salt state that controlls the cloud providers file. either use the expillar stuff from earlyer to populate that field, or manually enter the ip into pillar
23:02 baconbeckons oh, that makes sense whytewolf
23:03 * ze- points to whytewolf. Sounds like an idea... to have that file generated :)
23:03 baconbeckons sometimes working with salt feels like Inception :)
23:04 alexthegraham That's a great way of putting it, @baconbeckons.
23:04 whytewolf you just need to go deeper
23:04 baconbeckons if i go any deeper, my head might asplode
23:04 baconbeckons i mean, look at what happened to poor iggy ;)
23:06 kusams joined #salt
23:08 druonysuse joined #salt
23:09 aparsons joined #salt
23:11 perfectsine joined #salt
23:12 bmonty joined #salt
23:16 yomilk_ joined #salt
23:18 possibilities joined #salt
23:19 linjan joined #salt
23:22 StDiluted joined #salt
23:28 alexthegraham Anyone ever tried excluding sls files using 'exclude'?
23:29 alexthegraham i.e. if state1 is enforced, exclude state2?
23:29 iggy alexthegraham: tried state.top to use a completely different top file?
23:29 iggy oh
23:30 iggy _might_ be able to do that with orchestrate
23:30 alexthegraham No, state1/init.sls forces exclude of state2/init.sls
23:31 elfixit joined #salt
23:32 wt joined #salt
23:32 dlam joined #salt
23:32 dlam hey is there any tricks to testing out salt states on your laptop?   like run master/minion in a VM or something?
23:33 iggy dlam: like with most things in salt, there are many ways
23:33 iggy I'm thinking about starting to do a lot of development in docker containers
23:41 arctan joined #salt
23:42 arctan @dlam you’ll probably want to get bart to upgrade those laptops first before you try to run salt in a vm
23:43 oz_akan joined #salt
23:44 possibilities joined #salt
23:45 * geekatcmu has done the "build an entire saltstack+hadoop cluster in VMs on my laptop".  There's no such things as "enough resources".
23:46 arctan geekatcmu you have no idea how bad the laptops that dlam is on are…
23:47 GrueMaster I'm currently testing/evaluating salt for my network.  My intern is currently stuck on getting it to route through apache mod-proxy.  Aside from that, how well does it handle systems that are sometimes offline for a while, or rebooted several times during the course of testing?
23:47 Eugene Why use a laptop when you have CLOUD
23:47 geekatcmu arctan: Also, I have no desire to guess.
23:48 * geekatcmu pets his nice MBP
23:48 arctan geekatcmu: sadly, i know...
23:48 druonysuse joined #salt
23:48 thehaven joined #salt
23:48 geekatcmu I have *three* MBPs within arm's reach.  Two are personal.
23:48 GrueMaster For example, I have 10 systems currently (all running Ubuntu 12.04 - makes life a little easier).  I need to be able to queue up an update for shellshock.  Will they update next time they come up?
23:50 iggy depends how you do the update
23:51 iggy bash: pkg.latest should make it work, but then everything else is going to constantly be doing apt-get update's and trying to upgrade to the latest version
23:51 GrueMaster Normally by logging into each and running apt-get update && apt-get dist-upgrade (for all updates) or apt-get install for specific ones (bash).
23:53 kingel joined #salt
23:53 iggy well, in salt you could do a "salt '*' pkg.latest bash" or you could set it up as a state for all hosts
23:53 baconbeckons joined #salt
23:54 iggy in the first case, no any offline (or not yet created) hosts won't have the update installed
23:55 n8n joined #salt
23:55 GrueMaster So, no queuing.
23:56 iggy no, but that's what states are for
23:56 GrueMaster Hmmm
23:56 iggy you don't want to be constantly running commands on remote hosts
23:56 iggy that means things are reproduceable
23:56 iggy *arent'
23:57 iggy if you use states, then running highstate on a new host gives you an exact duplicate of the original host
23:58 possibilities joined #salt
23:58 GrueMaster I'll have my intern explore that more then.

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