Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-10-31

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

All times shown according to UTC.

Time Nick Message
00:02 Guest13607 Hello I have some what of an urgent question.  Our Salt master crashed and I have brought another online I have accepted keys on the new master.  However when I run manage.status all minions show as down.  And I cannot send commands to them  Does anyone have any suggestions?
00:02 snuffeluffegus joined #salt
00:04 babilen http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html (or remove master key, all the best)
00:04 micah_chatt joined #salt
00:04 rojem joined #salt
00:05 Guest13607 Thanks I will give that a shot!
00:06 babilen There's also rhe pki multimater variant
00:09 ghanima hey guys another question... I have a custom grains module I am trying to exectute and I think I need initiate highstate on the minion
00:09 ghanima is that correct
00:09 ghanima if I so I am getting an error saying no Top file or external nodes data matches found
00:10 ghanima why does a top file need to be created to sync highstate?
00:17 X86BSD joined #salt
00:17 pdayton joined #salt
00:18 ghanima anyone still on
00:18 aurynn afaik the topfile is what highstate uses to tell what to run where
00:23 mapu joined #salt
00:29 murrdoc yup
00:29 murrdoc top.sls is state file for highstate
00:30 murrdoc so salt '*' state.sls top == salt '*' state.highstate
00:30 murrdoc to be fair you cant run the first one
00:34 aqua^mac joined #salt
00:44 badon_ joined #salt
00:51 mpanetta joined #salt
00:52 bhosmer joined #salt
00:53 nitti joined #salt
00:58 rojem joined #salt
01:07 chitown anyone from saltstack here?
01:08 chitown had a problem with a custom grain
01:08 chitown basically; i screwed up _grains/foo.py
01:09 chitown but, when i tried to fix (saltutil.sync_all) the minion couldn't find the top file because "__grains__" was empty...
01:10 chitown i had to manually delete cache_dir/extmods/grains/foo.py
01:10 chitown is there a "better way"?
01:10 aqua^mac joined #salt
01:10 mdasilva joined #salt
01:15 mgw chitown: what did you have in foo.py?
01:21 aquinas joined #salt
01:22 andrej Is there a way to manually modify a mine entry on the master? I have two hosts that have changed IPs but are currently down, so I can't do my normal grains.set_val && mine.update routine, but I need their values changed
01:34 dave169 joined #salt
01:35 elfixit joined #salt
01:37 dave169 left #salt
01:42 zlhgo joined #salt
01:45 mgw andrej: It looks like the master caches the data in /var/cache/salt/master/minions/<minion>/mine.p
01:46 andrej mgw - yup, but it looks kind of like binary data for seprartors :)
01:47 andrej I was wondering whether it's safe to modify them
01:50 mgw not manually
01:50 mgw but you sohuld be able to with salt.payload
01:50 mgw if you really have to
01:52 andrej Hmmm ... I'll google that :) thanks
01:53 mgw you basically want to do this (not testd)
01:56 mgw well,  first let me ask if you're semi-comfortable wit python
01:56 mgw andrej: ^
01:56 andrej semi :)
01:57 mgw ok
01:57 andrej I have hacked up a few scripts over the years
01:57 andrej Trying to understand what others are thinking doesn't always work for me :)
01:57 andrej But I have two capable programmers around me ;}
01:58 mgw echo "from msgpack import loads; print loads(open('mine.p').read())" | python
01:58 mgw that will get the data out as a json object
01:58 mgw to write it back is the reverse
02:00 racooper joined #salt
02:01 mgw "from msgpack import dumps; open('mine.p', 'w').write(dumps({'key': 'value'}))"
02:01 mgw make a backup of mine.p before you start
02:01 mgw correction though
02:01 mgw it's not a json object
02:01 mgw it's a python obj
02:02 mgw andrej, i've got to step out for a bit, but that should allow you to do what you have to do.... use at your own risk
02:02 mgw I don't think there's a built in way to hack at the mine data
02:02 mgw to answer your original question
02:02 andrej Heh
02:02 andrej OK
02:02 andrej Thanks, I'll give it a shot
02:07 malinoff joined #salt
02:09 perfectsine joined #salt
02:15 Nexpro joined #salt
02:22 Rojematic joined #salt
02:22 dude051 joined #salt
02:28 thedodd joined #salt
02:31 BossR joined #salt
02:35 rojem joined #salt
02:39 jaimed joined #salt
02:54 bezeee joined #salt
02:59 hasues joined #salt
02:59 hasues left #salt
03:06 murrdoc joined #salt
03:07 TheThing|24-7 joined #salt
03:09 bhosmer joined #salt
03:15 kt76 joined #salt
03:19 kt766 joined #salt
03:22 mosen joined #salt
03:22 jeddi joined #salt
03:24 decwrl joined #salt
03:27 dude051 joined #salt
03:30 bezeee joined #salt
03:32 doriftoshoes joined #salt
03:32 snuffeluffegus joined #salt
03:37 tf198_ joined #salt
03:40 cztanu joined #salt
03:41 cztanu left #salt
03:43 schristensen joined #salt
03:43 rojem joined #salt
03:45 djaime joined #salt
03:50 ramishra joined #salt
03:52 Rojematic joined #salt
03:55 rojem joined #salt
03:56 ajolo joined #salt
03:58 rojem_ joined #salt
03:59 rojem joined #salt
04:02 Rojematic joined #salt
04:03 rojem joined #salt
04:07 Rojematic joined #salt
04:09 rojem_ joined #salt
04:15 rojem joined #salt
04:18 trevorj joined #salt
04:20 murrdoc joined #salt
04:20 rojem joined #salt
04:34 garthk Anyone in? Trying to read blockreplace text from a file, but getting “Encountered unknown tag 'import_text’.” despite http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
04:37 iggy garthk: paste your state somewhere
04:41 bhosmer joined #salt
04:42 ndrei joined #salt
04:42 SheetiS iggy: do you ever sleep man? :D  I thought I was bad about being around at all hours. :)
04:43 murrdoc o/
04:44 iggy I'm trying... even got an app that nags me to go to sleep... it's been at it for an hour already
04:45 ramishra joined #salt
04:46 SheetiS heyo murrdoc :D
04:46 SheetiS iggy: I hear that.  For me most of my best ideas come right as I am winding down to sleep, so I get up and plug away on it.
04:50 garthk iggy: {% import_text “filename” as entry %}
04:50 garthk Rendering SLS "base:deploy" failed: Jinja syntax error: Encountered unknown tag 'import_text'.; line 10
04:53 SheetiS import_text doesn't appear to be in the 2014.1 branch jinja renderer.  What version are you using?
04:54 beneggett joined #salt
04:55 SheetiS not in salt/utils/jinja.py I mean
04:57 ingwaem joined #salt
04:58 bhosmer joined #salt
04:59 SheetiS garthk: I _think_ you can get away with a plain import instead of import_text in 2014.1 and it will do what you want
05:00 garthk SheetiS: thanks
05:00 SheetiS {% import "/path/to/text/file" as entry %} or whatever
05:01 kt766 joined #salt
05:01 SheetiS at least I have a place where I am doing that in a pillar it looks like.
05:03 kt76 joined #salt
05:07 ramishra joined #salt
05:22 BossR joined #salt
05:23 BossR joined #salt
05:24 perfectsine_ joined #salt
05:30 pipeep joined #salt
05:31 pipeep I think the salt pdf documentation is broken: https://media.readthedocs.org/pdf/salt/latest/salt.pdf
05:31 pipeep (linked from http://docs.saltstack.com/en/latest/index.html)
05:33 jalaziz joined #salt
05:38 anotherZero joined #salt
05:45 murrdoc warnings:
05:45 murrdoc - 'enable' and '__reqs__' are invalid keyword arguments for service.mod_watch. If you were trying to pass additional data to be used in a template context, please populate 'context' with 'key: value' pairs. Your approach will work until Salt Lithium is out. Please update your state files.
05:45 murrdoc das new
05:54 jalbretsen joined #salt
06:04 ajolo joined #salt
06:06 ramishra joined #salt
06:10 aw110f joined #salt
06:11 Ryan_Lane joined #salt
06:11 ghanima joined #salt
06:14 aw110f_ joined #salt
06:17 ramishra joined #salt
06:25 epcim joined #salt
06:27 ramteid joined #salt
06:28 smcquay joined #salt
06:34 smcquay joined #salt
06:36 AirOnSkin Good morning everyone. Say, anyone got an idea how I'd use a salt.states.cmd.run with and interactive command?
06:36 AirOnSkin I need to submit a password to kinit...
06:40 malinoff AirOnSkin, use expect
06:40 aurynn 'expect' is an old tool that's usually used for interacting with interactive things
06:40 aurynn heh
06:41 TheThing joined #salt
06:47 bhosmer joined #salt
06:50 oyvjel joined #salt
06:52 AirOnSkin malinoff, aurynn: Thanks for the tip. I use expect already in some other scripts, but didn't think of using it with Salt. How does that look in a State. Do you have an example?
06:53 Nexpro1 joined #salt
06:53 malinoff AirOnSkin, just use file.managed on expect script and then use cmd.run to run it
06:57 smcquay joined #salt
06:58 AirOnSkin malinoff: Ah well, I was hoping I could avoid that. Having a script lying around with the password in it on the host...
06:59 AirOnSkin I could delete it afterwards... that would work
06:59 malinoff AirOnSkin, just wanted to say that
06:59 AirOnSkin malinoff: I just discovered an old discussion on GitHub about that topic: https://github.com/saltstack/salt/issues/6712
07:00 AirOnSkin Sadly it seems to be stalled since a year
07:00 epcim joined #salt
07:02 duncanmv joined #salt
07:04 possibilities joined #salt
07:11 TyrfingMjolnir joined #salt
07:11 trikke joined #salt
07:12 kt76 joined #salt
07:13 TyrfingMjolnir joined #salt
07:15 tk75 joined #salt
07:16 ramishra joined #salt
07:17 thayne joined #salt
07:18 ramishra joined #salt
07:24 oyvjel joined #salt
07:26 akafred joined #salt
07:28 TyrfingMjolnir joined #salt
07:33 ghanima hello all
07:33 ghanima anyone on
07:34 jeblair joined #salt
07:47 lcavassa joined #salt
07:56 thayne joined #salt
08:00 flyboy joined #salt
08:04 AirOnSkin Can I require states in the top.sls file?
08:09 babilen AirOnSkin: I don't see how that would make sense. What are you trying to do?
08:11 live3son joined #salt
08:13 bbnix joined #salt
08:24 jcockhren yeah. expect would be the business
08:24 jcockhren I'm for it
08:26 giomandaz joined #salt
08:26 karimb joined #salt
08:27 AirOnSkin babilen: Certain states need to be executed before others. I can only start the sssd service, once the package is installed. Services and packages are two different states.
08:27 AirOnSkin I know I can require the package in the service state, I just wanted to know if any kind of ordering is possible in the top.sls
08:27 babilen AirOnSkin: Then define that *in* the states.
08:28 AirOnSkin I'm still new and trying to figure out the 'best practices' ^^
08:28 AirOnSkin babilen: Will do, thanks :)
08:28 AirOnSkin jcockhren: Yeah, I'll do that with expect. Though it would be great to see integration in salt for it...
08:29 CeBe joined #salt
08:32 kermit joined #salt
08:35 bhosmer joined #salt
08:37 giomandaz hi guys. i need a little help on this one
08:38 giomandaz http://justpaste.it/hs7j
08:38 giomandaz i want to access a pillar which contains users (as seen in pasted linkl above)
08:40 giomandaz what i want to do is to create a template config file that will check  each user in the pillar and if the role of the user is addmin it will then add the e-mail of tha user to the template
08:41 giomandaz the way i tried to do this can be found on the pasted link
08:41 giomandaz but aint working
08:41 giomandaz so  my first question is: can yuo add a jinja variable inside a jinja sextion
08:41 giomandaz e.g
08:42 giomandaz {% if salt['pillar.get'] ('users:{{ user }}:role') == 'admin' %}
08:44 ramishra joined #salt
08:45 flyboy82 no you can't do that but you can: {% for user, data in salt['pillar.get']('users').items() if data.role =='admin' %}    if I'm not mistaken
08:47 ramishra joined #salt
08:47 giomandaz ok ill give it a try
08:48 giomandaz thanks flyboy82
08:48 AirOnSkin I believe to have found a minor error in the documentation. Where or how would I submit this?
08:52 giomandaz @flyboy82 ok i get that but how do i then print the e-mail of that user (which have role == admin?)
08:52 flyboy82 inside the for loop you can call it as {{ data.email }}
08:53 flyboy82 where data is your for variable which has been populated by the entire dictionary that lies below username
08:53 giomandaz LONG LIVE flyboy82
08:53 giomandaz praise to the gods
08:55 flyboy82 check this out: http://salt.readthedocs.org/en/latest/topics/yaml/   It's invaluable for working with yaml structures
08:56 giomandaz thanks!!!!
08:59 b1nar1 joined #salt
09:07 linjan joined #salt
09:08 AirOnSkin If I use salt.states.cmd.script to transfer & execute a script on a host and this script has a clear text password in it, could I use Pillar here to "fill in" the password on transfer?
09:08 BossR joined #salt
09:08 AirOnSkin Or would the script, once transferred to the host, still contain the variable?
09:11 alex-mesos joined #salt
09:23 CeBe1 joined #salt
09:23 krak3n` joined #salt
09:24 krak3n` hey guys, is it possible to target a minion based on if it dose not have a grain set, for example i want target minions where they don't have a specific grain
09:25 krak3n` ah i answered my own question
09:25 krak3n` salt 'G@roles:foo and not G@bar:True' -C test.ping
09:25 krak3n` :D
09:36 cberndt joined #salt
09:38 possibilities joined #salt
09:40 linjan joined #salt
09:42 badon joined #salt
09:46 ramishra joined #salt
09:47 ramishra joined #salt
09:51 alex-mesos joined #salt
09:51 alex-mesos joined #salt
09:53 ramishra joined #salt
10:00 possibilities joined #salt
10:07 nocturn joined #salt
10:12 bbnix joined #salt
10:13 ajolo joined #salt
10:14 lcavassa joined #salt
10:17 AxelFooley joined #salt
10:20 AxelFooley is it possible to use the "root=" option into the git_pillar module with salt-master version 2014.1.13+ds-1~bpo70+1?
10:21 peters-tx joined #salt
10:24 bhosmer joined #salt
10:26 linjan joined #salt
10:32 CeBe joined #salt
10:38 CycloHex joined #salt
10:44 bhosmer joined #salt
10:49 jhauser joined #salt
10:51 TOoSmOotH joined #salt
10:55 AxelFooley joined #salt
10:57 k3ys3r joined #salt
10:58 ggoZ joined #salt
11:00 possibilities joined #salt
11:04 intellix joined #salt
11:06 CeBe joined #salt
11:13 giantlock joined #salt
11:13 linjan joined #salt
11:13 AxelFooley joined #salt
11:17 BossR joined #salt
11:24 bhosmer joined #salt
11:25 CeBe joined #salt
11:30 bluenemo joined #salt
11:30 kermit joined #salt
11:36 b1nar1_ joined #salt
11:44 bluenemo hi guys. I've just setup a new master server on a recent ubuntu and noticed some changes in the output of highstate as shown here: http://paste.debian.net/129559/  I highly depend of the ID of the state being shown for keeping an overview of the states and I'm in trouble with this disabled (as I deploy a LOT) of machines from day to day and the new few makes it much harder to associate states in my mind imho. REALLY hope you can help me getting th
11:44 bluenemo e ID shown back into the highstate output! :(
11:46 bluenemo any hint on how to customize the output, in which file the highstate output is compiled, is highly appriciated
11:51 malinoff joined #salt
11:53 karimb joined #salt
11:54 SpX joined #salt
11:56 AxelFooley joined #salt
12:00 possibilities joined #salt
12:02 bluenemo hm, I see that some changes were made to salt/output/highstate.py
12:05 bluenemo hm cool, replacing it with the old version works so far.. I guess I'll be getting into writing some custom outputter then :)
12:07 bluenemo All in all I cant say I'm happy about the change to exclude the ID in the output. I think its a very helpful information
12:11 CeBe joined #salt
12:15 babilen bluenemo: Those are not the same state?!
12:16 bluenemo hi babilen, no thats not the issue. my problem is that the field ID is not shown. overall the format of the outputter was changed (which is ok for me I guess, except that installed packages are now shown in json formatting), but it now does not show the ID field anymore. Thats sth I rely on ;)
12:17 babilen Isn't the ID simply the "State: ....." part?
12:20 bhosmer_ joined #salt
12:21 williamthekid joined #salt
12:21 ramishra joined #salt
12:22 BossR joined #salt
12:24 SpX joined #salt
12:25 bluenemo babilen, line 3 in http://paste.debian.net/129559/ the other state does not show the ID field. The new State field is now just stating the function being used (in this case cron). Name is now displaying some basic information about the actual command, which is cooler than before imho. but the actual "name" of my state as shown by ID is not being shown :D in this case it would be sth like logrotate_cron_chkrootkit, as in the first line of every sta
12:25 bluenemo te. I like to set something descriptive there, I know its not the default.
12:26 bluenemo as in http://paste.debian.net/129570/ for example. For several reasons I like to do it the second way
12:26 bluenemo For example, in highstate output you have much more oversight over what is going on as you have some 'human' description of the actual task you wrote
12:27 bluenemo but this outputter formatting thing was sth I wanted to get my hands on anyway, so I'm currently reading the code and intend to hack around on it a little ;)
12:30 linjan joined #salt
12:33 babilen bluenemo: Isn't the ID what you have on line 12?
12:34 X86BSD joined #salt
12:36 Marcos joined #salt
12:36 Marcos left #salt
12:36 Marcos joined #salt
12:37 bluenemo babilen, the ID field is the first line in every state, as 'monitoring_check_mk_agent_chkrootkit_cron' in http://paste.debian.net/hidden/f69ee32f/
12:37 AxelFooley joined #salt
12:37 bluenemo its what you can use via require, as in - require: \n - file: 'monitoring_check_mk_agent_chkrootkit_cron'    when monitoirng_... has a file declaration
12:38 bluenemo that thing :D
12:38 bluenemo I know I am using it different from whats in the salt docs. But I have to say I like it my way :)
12:39 babilen bluenemo: My understanding is that: (State: | ID:) monitoring_check_mk_agent_chkrootkit_cron and Name: /usr/sbin/chkrootkit > /var/log/chkrootkit.log -- Which means that in lieu of "ID" you simply have "State:" in the "new" format, don't you?
12:39 k3ys3r a jinja question - I am using {{ salt['network.ip_addrs']('br1') }} in a file.managed config file to get the ip address of the br1 interface. However when I run it it returns the ip inside square brackets ['192.168.x.x'] which is not much help.... how do I get it just to return the IP?
12:40 babilen It would definitely help if you could paste the old/new output for the same state
12:40 bluenemo k, one sec.
12:41 babilen k3ys3r: You can assign multiple IPs to the same interface which is why you get a list. I would recommend to specify a cidr range of the address you want -- http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs
12:41 bhosmer_ joined #salt
12:41 babilen k3ys3r: You can, naturally, say something like "salt['network.ip_addrs']('br1')[0]" but that is brittle and an implementation detail. You really shouldn't rely on a specific order in that list.
12:41 babilen (and that would also fail horribly if you forgot to assign an IP address)
12:42 k3ys3r ah - infact cidr would be perfect - let me give it a go
12:44 bluenemo cant you give the name of the key in that list instead of the 0?
12:44 diegows joined #salt
12:44 bluenemo as in eth0:0 or sth?
12:46 bluenemo babilen, k here ;) http://paste.debian.net/129574/
12:46 babilen k3ys3r: It really helps to express things in that way rather than hardcoding "the first element in a list of addresses assigned to br0 if that list happens to be sorted alphanumerically" :)
12:47 bluenemo on the old one it shows logrotate_config_iptables. thats what I want back ;)
12:47 SpX joined #salt
12:48 bluenemo babilen, thats an interesting topic (sorting). I have that problem with the nginx formula where I have a list of key values that I need to parse in a specific order. How would you do that?
12:48 babilen bluenemo: Ah, I see.
12:48 miqui joined #salt
12:48 babilen bluenemo: As soon as I have to do anything like that I start writing pillars and states in Python
12:48 bluenemo ah, new to saltstack?
12:49 nitti joined #salt
12:49 bluenemo actually I think write most stuff in yaml and jinja.. ;)
12:50 linjan joined #salt
12:50 babilen bluenemo: yes, but jinja is getting horrible if you have to express something a little more complicated. I'd rather have a pillar/state/file in 5 lines of Python than 30+ in jinja
12:51 bluenemo babilen, I seem to have the same problem.. wanted to 'continue' a for loop the other day and that seems to be complicated ;)
12:51 Marcos joined #salt
12:52 babilen I also very much like to use "template: py" as renderer for file.managed and then just use the parser/emitter in Python for that datastructure to write it. A lot of configuration files are in a format for which Python comes with a parser/emitter and I'd much rather use json.dump(data) than hack something in yaml/jinja
12:52 CeBe joined #salt
12:53 bluenemo OH, I see! http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html
12:53 bluenemo wtf
12:53 bluenemo I totally missed that!
12:54 bluenemo omg
12:54 bluenemo I think I will have to rewrite some formulas...
12:54 lothiraldan joined #salt
12:54 bluenemo ok, cool :)
12:54 bluenemo thx for the hint ;)
12:56 ramishra joined #salt
13:00 possibilities joined #salt
13:16 hobakill joined #salt
13:17 elfixit joined #salt
13:18 crane joined #salt
13:20 CeBe joined #salt
13:22 lude joined #salt
13:22 AirOnSkin I've got the following grain: id: moonrat.zhaw.ch
13:23 AirOnSkin I'd like to use this grain inside a managed file, but cut away the .zhaw.ch
13:23 AirOnSkin How would I do that?
13:23 anotherZero joined #salt
13:24 linjan joined #salt
13:25 BossR joined #salt
13:26 pdayton joined #salt
13:28 mgw joined #salt
13:28 racooper joined #salt
13:30 jdmf joined #salt
13:30 intellix joined #salt
13:32 mpanetta joined #salt
13:35 mpanetta_ joined #salt
13:36 thayne joined #salt
13:37 jhauser joined #salt
13:37 saravanans joined #salt
13:37 AirOnSkin jhauser: Hey there :)
13:37 jhauser hiho
13:38 dude051 joined #salt
13:38 AirOnSkin jhauser: I'm almost through with transforming our standard installation into salt states
13:38 jhauser so you are a happy camper now
13:39 jhauser have you used the pillar pattern?
13:39 AirOnSkin I am :) I still have to do all the Pillar stuff though
13:39 jhauser ah :-)
13:39 ckao joined #salt
13:39 jhauser are you using environments?
13:40 AirOnSkin Say, would you happen to know how I can cut away the domain (.zhaw.ch) from my grain id: moonrat.zhaw.ch (so it would leave me with only 'moonrat')?
13:40 AirOnSkin Yes, I've setup the master filer roots with: base, dev, test, prod
13:41 chiui joined #salt
13:41 AirOnSkin base maches for all, for dev, test & prod I'll define a grain
13:41 bhosmer joined #salt
13:44 jhauser AirOnSkin: we often use ‚intratools*‘ instead of ‚intratools.customer.de‘
13:45 jhauser also you can set the minion-id in /etc/salt/minion_id
13:46 jhauser and it would be possbile to set an id by matching rules in the pillar top.sls
13:47 jaimed joined #salt
13:47 micah_chatt joined #salt
13:48 rattmuff joined #salt
13:49 timoguin AirOnSkin: you'd need to create a custom module that performs the split function. then you can call it like this {% foo = salt['module.function'](domainname)[0] %}
13:50 timoguin the file module has a helper function for joining paths: https://github.com/saltstack/salt/blob/develop/salt/modules/file.py#L4188
13:50 timoguin there may be one for returning a split string somewhere
13:51 AxelFooley joined #salt
13:52 oc joined #salt
13:52 ndrei joined #salt
13:52 mdasilva joined #salt
13:53 oc hi, I have a heterogenous setup of servers running both debian stable and testing. the testing instances use systemd, and that generates errors such as "The named service <xyz> is not available."
13:53 AirOnSkin jhauser: I'd like to keep the minion id like that and I know about the targeting... on the shell I'd do something like: salt moonrat.zhaw.ch grains.items | g '\ \ id:*' | awk '{print $3}' | cut -d. -f1
13:53 kt76 joined #salt
13:53 oc I assume this is because systemd names them like i.e. snmpd.service, where as sysv init names it simply snmpd
13:53 AirOnSkin jhauser: I just thought I'd use the information already available, but cut it up a bit ;)
13:54 AirOnSkin timoguin: I thought I'd be a simpler matter with jinja... a custom module seems a bit much. Or am I mistaken?
13:54 oc is there an easy hack to either append .service to the service name if systemd is installed, or make salt.states.service detect this somehow, and either use the service LSB wrappers, or append .service?
13:56 AirOnSkin oc: I just asked a similar question. Not sure how to do that yet. Though I guess you could write a condition and based on it's result add some info (text) ... maybe from Pillar?
13:57 oc AirOnSkin: I wanted to avoid using pillars or grains :~)
13:57 timoguin AirOnSkin: well jinja has a filter for joining strings, but not one for splitting, oddly enough
13:57 ramishra joined #salt
13:58 timoguin adding a module for this might be easier than you think
13:58 AirOnSkin oc: Hmm, you could always use a command and work with it's output, or a script even...
13:58 oc the documentation needs update too: i.e. "name: The name of the init or rc script used to manage the service", as it obviously uses systemctl when systemd is used, and not the /etc/init.d/foo
13:58 oc AirOnSkin: or even just check the process (sig)
13:59 AirOnSkin timoguin: I see. Well, I'll start reading into it then :) Thanks for the hint
13:59 AirOnSkin oc: Something like that, yeah. Do you use salt for CfgMgmt or for remote execution only?
13:59 Ashwee joined #salt
14:00 possibilities joined #salt
14:01 Ashwee salt on windows, with a win repo. I have created a nodejs package however it doesnt recognise that the package is installed. when i call pkg.list_pkgs, no mention of node at all in anyway in list packages
14:01 perfectsine joined #salt
14:02 Ashwee anyone have any ideas? :/
14:04 Ashwee relevant stuffs: http://pastebin.com/zRXfpbna
14:10 viq joined #salt
14:10 viq joined #salt
14:11 CycloHex Anyone here using file.replace? I'm trying to replace a string "${doesntmatter} = '4';" This is a literal string. So I tried setting the flag escape. This reports an error.. I noticed that salt runs the function .upper() on the flag. but this flag is defined in lowercase. How is it possible for me replace a litteral string then?
14:13 Marcos does salt have a plugin to interact with OCS Inventory tool?
14:17 Ahlee jinja question, can i {% set foo = {{ something_else }} %}?  doesn't look like it
14:17 Ahlee throwing expexted token 'colon', got '}'
14:18 Ahlee Marcos: i've never heard of it/seen it, but should be doable via ext_pillars if you're looking to query it
14:19 Marcos Ahlee, thanks
14:19 CycloHex Ahlee:  {% set foo = something_else %}
14:19 CycloHex within the {% %} block you can just reference variables by it's name, no need to print them
14:21 TheThing joined #salt
14:23 harmanaz joined #salt
14:25 Ahlee CycloHex: ah.  silly me.  Thanks
14:28 TheThing joined #salt
14:29 rypeck joined #salt
14:29 nitti joined #salt
14:30 yetAnotherZero joined #salt
14:30 saravanans joined #salt
14:30 oc AirOnSkin: both
14:31 BossR joined #salt
14:31 glyf joined #salt
14:33 notbmatt joined #salt
14:34 harmanaz hi. I want to create a template file which is going to include all finions fqdns
14:34 harmanaz i assume this will be done with the use of "for loop"
14:34 AirOnSkin oc: Well, not using Grains and Pillars but commands instead kind of removes the power of the tool you're using. I've only just started myself so I can tell it's not that hard to get into these concepts...
14:34 h8 joined #salt
14:34 h8 hi everyone
14:35 harmanaz but how can i get a list/dictionary of the fqdns of all minions
14:35 harmanaz is it only by using salt mine?
14:36 h8 when I try to install halite, based on http://docs.saltstack.com/en/latest/topics/tutorials/halite.html , at the salt-call I get an error, saying that salt-call unkown command, there's no salt-call in my repos, I do have EPEL enabled, checking further I've seen that I need salt-minion to be installed? Is it safe to have that installed on the master also?
14:36 mgw h8: yes, it's common for the master to be a minion
14:36 h8 mgw: awesome, thank you
14:37 berto- joined #salt
14:38 CeBe joined #salt
14:39 housl joined #salt
14:40 h8 now I get the error "unction tls.create_self_signed_cert is not available", any RTFM for this? A quick search didn't reveal anything
14:40 glyf joined #salt
14:42 viq h8: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.tls.html
14:42 mgw h8: You need python-openssl package or something like that
14:42 viq depends:
14:42 viq PyOpenSSL Python module
14:42 mgw yeah, listen to viq
14:42 h8 thank you
14:43 h8 yes, worked like a charm
14:43 dooshtuRabbit joined #salt
14:43 notbmatt joined #salt
14:45 crocket joined #salt
14:46 crocket I think "salt-run virt.init" tries to load an entire virtual machine image onto RAM.
14:46 crocket I think it doesn't work.
14:46 crocket It should instead stream a VM image through salt-minion.
14:46 crocket The issue is described at https://github.com/saltstack/salt/issues/17066
14:50 XenophonF joined #salt
14:50 XenophonF hey all, how do i generate a hash suitable for the user.present state from the command line?
14:51 timoguin look at the hashutil module
14:51 XenophonF ah thanks
14:51 crocket What alternatives do I have if I can't utilize virt.init?
14:52 linjan joined #salt
14:52 mgw crocket: are you dependent on virtualization? Maybe LXC would work for you...
14:52 mgw If you only need Linux systems
14:52 crocket mgw, I also need X11.
14:53 mgw I don't see why that wouldn't be possible
14:53 mgw I've not tried it though
14:56 superted666 joined #salt
14:57 diegows joined #salt
14:57 oc AirOnSkin: ah, I meant to either extend the salt.states.services to do this/detect systemd, and translate <svc>.services for me
14:58 thedodd joined #salt
14:58 ramishra joined #salt
15:00 perfectsine joined #salt
15:00 possibilities joined #salt
15:02 TheThing joined #salt
15:06 notbmatt joined #salt
15:09 berto- joined #salt
15:13 bbnix joined #salt
15:13 jchen hey, I'm seeing my minions spawn multiple salt-minion daemons, which is causing multiple returns on salt-master, and causing issue for jobs that require locks, such as pkg.upgrade. this is --versions-report on the minion. Is this a known issue? https://gist.github.com/fly/5c755d1819838fcccde3
15:14 XenophonF is the user.present state supposed to reset someone's password?
15:15 XenophonF dang it, should have set "enforce_password: False"
15:16 markm_ joined #salt
15:17 notbmatt joined #salt
15:17 berto- joined #salt
15:19 AxelFooley joined #salt
15:20 crocket left #salt
15:20 bhosmer_ joined #salt
15:20 TyrfingMjolnir joined #salt
15:21 pdayton joined #salt
15:21 ndrei joined #salt
15:26 P0bailey joined #salt
15:26 P0bailey joined #salt
15:26 diegows joined #salt
15:29 lothiraldan joined #salt
15:29 alex-mes_ joined #salt
15:29 P0bailey joined #salt
15:29 P0bailey joined #salt
15:30 perfectsine joined #salt
15:32 glyf joined #salt
15:32 troyready joined #salt
15:34 mpanetta_ Anyone here know how to specify a returner to use when using the cli API?
15:34 mpanetta_ Do I just use returner=foo as one of the kwargs?
15:34 mpanetta_ I can't find any examples...
15:35 mgw mpanetta: --return=foo
15:35 BossR joined #salt
15:35 mgw by cli api, you mean the salt command?
15:35 mgw or you mean the python api?
15:35 mpanetta mgw: Sorry, I mean when using the cli api, not the salt cli itself.  IE salt.client.LocalClient.cmd_async
15:36 mpanetta Yeah
15:36 mpanetta The pyton api
15:36 mgw I'm not sure, but I think LocalClient is at a lower level than that
15:36 mpanetta Hmm
15:37 mpanetta Is there a way to specify a returner for the highstate then?
15:37 mgw i' wrong
15:38 mgw it's kwarg ret
15:38 rojem joined #salt
15:38 mpanetta kwarg, or kwargs?
15:38 mpanetta (that is confusing BTW...)
15:39 mgw client.cmd("*", "cmd.run", ["ls"], ret="ret1, ret2"])
15:39 mgw so neither
15:39 mpanetta Ok sweet!
15:39 mgw a named kwarg
15:39 mpanetta Ah ok
15:39 mpanetta Let me try rthat
15:39 mgw I found this in client/__init__.py
15:39 pdayton joined #salt
15:39 mgw I imagine that docstring is found in the docs too
15:40 mgw not sure where though
15:40 mpanetta Hmm
15:41 blackhelmet joined #salt
15:43 bezeee joined #salt
15:44 StDiluted joined #salt
15:45 oc joined #salt
15:45 jalbretsen joined #salt
15:48 Ozack1 joined #salt
15:49 Bateau_ joined #salt
15:52 rojem joined #salt
15:52 bbnix joined #salt
15:53 bhi joined #salt
15:53 AxelFooley joined #salt
15:54 jeffspeff how can do a new line with file.replace?
15:54 CeBe1 joined #salt
15:54 wt joined #salt
15:55 chitown mgw: RE: my grains issue...
15:55 jeffspeff something like "repl: 'blah blah' /n 'foo foo'
15:55 chitown 18:07 < chitown> had a problem with a custom grain
15:55 chitown 18:08 < chitown> basically; i screwed up _grains/foo.py
15:55 chitown 18:08 < chitown> but, when i tried to fix (saltutil.sync_all) the minion couldn't find the top file because "__grains__" was empty...
15:56 bhosmer joined #salt
15:56 chitown the contents of foo.py dont matter; what i was trying to get at; is there a way to clean out the cache so the minion can resync?
15:56 chitown other than "rm -rf /var/..."
15:56 chitown well, to be specific: "rm -f {cache_dir}/extmods/grains/*"
15:57 dabb joined #salt
15:59 ramishra joined #salt
16:00 possibilities joined #salt
16:00 dabb if I'm using a custom grain, generated from a python script on a minion, would it be enough to match it with 'G@grainname:value' in top.sls
16:01 dabb I get a match with salt -C 'G@grainname:value' test.ping, but it does not seem to work when I run an highstate
16:01 ndrei joined #salt
16:02 claytron joined #salt
16:02 jaimed joined #salt
16:02 babilen dabb: You also have to use "- match: compound" to specify that you are using a compound matcher
16:03 mgw chitown: I'm trying to figure out why __grains__ is empty...
16:03 mgw also, I didn't know __grains__ needed to be populated for the minion to do a sync
16:03 babilen dabb: http://docs.saltstack.com/en/latest/topics/targeting/compound.html and http://docs.saltstack.com/en/latest/topics/targeting/grains.html respectively for compound/grains matcher
16:04 babilen mgw: Is this about a custom grain?
16:05 mgw babilen: chitown had written a custom grain that somehow broke his minion -- just trying to figure out why/how
16:05 mpanetta Beh, there are weird bugs in the salt presence system...
16:05 chitown mgw: it looks like its failing when trying to find top file
16:05 mgw What's the error?
16:05 chitown one sec... trying to search the logs
16:06 TheThing joined #salt
16:06 chitown you want the final stack trace here?
16:06 dabb babilen: lovely, thank you very much
16:06 chitown File "/usr/lib/python2.7/urllib2.py", line 258, in get_type
16:06 mgw chitown: gist or pastebin
16:06 chitown raise ValueError, "unknown url type: %s" % self.__original
16:06 chitown k... one sec
16:07 XenophonF i could use a clue regarding github and salt state/pillar repositories
16:08 XenophonF right now, i'm putting my states into github, but my pillar data lives only on the Salt master
16:08 babilen That's sensible
16:08 brayn joined #salt
16:08 XenophonF the state repo is public
16:08 viq I installed gitlab in our network for that
16:09 babilen The alternative would be to configure the gpg renderer which allows you to put sensible data in your public repositories too
16:09 XenophonF i'm inclined to move the pillar data to a private repo, because having that under revision control would be very, very helpful
16:09 chitown mgw: https://gist.github.com/craig5/ca8c56260eb15b63e616
16:09 babilen Ah! Yeah, I have it in a private repo but that doesn't leave the master.
16:09 chitown i cut some stuff out... it was a *LOT* of errors :)
16:09 XenophonF but i feel uncomfortable giving github my pillar data
16:09 * SheetiS <3 gpg renderer for pillar passwords/ssh privkeys/etc
16:09 viq XenophonF: yes. In theory you can also have a git repo living in that dir ;)
16:10 babilen XenophonF: You can access git repositories via SSH and have them on the master.
16:10 XenophonF i'd prefer to run my own kallithea instance, but i lack the time necessary to set that up
16:10 tligda joined #salt
16:11 to_json joined #salt
16:11 viq oh, that rhodecode fork?
16:11 XenophonF yes
16:11 scottpgallagher joined #salt
16:11 SaltieOne joined #salt
16:11 mgw chitown: is this one minion or many?
16:11 mgw that have this issue
16:12 viq XenophonF: http://doc.gitlab.com/ce/install/installation.html ?
16:12 bbnix joined #salt
16:12 XenophonF viq: looks interesting but i'm completely unfamiliar with ruby/rails
16:13 viq Same, and I got it running ;)
16:13 viq I even made a formula, though it certainly could use some love...
16:13 XenophonF :)
16:14 aparsons joined #salt
16:14 mgw I think there are so called omnibus packages for gitlab
16:15 viq yeah
16:15 KyleG joined #salt
16:15 KyleG joined #salt
16:15 lcavassa joined #salt
16:16 chitown mgw: its in a "testing" env... so, 1 host = minion + master
16:16 mgw restarting the minoin doesn't help?
16:16 chitown env... not a "salt env"; an isolted host
16:16 chitown no
16:16 chitown restarting the minion and the master
16:16 chitown it *looks* like it continues to read the bad cache files
16:17 mgw It was my understanding that grains are generated on startup
16:17 chitown as soon as i delete the custom grain in cache_dir, its fine
16:17 mgw and then it happens again?
16:17 chitown as soon as i do a sync_{grains,all}
16:17 alex-mesos joined #salt
16:18 mgw is your custom grain messing with the __grains__ dict in some way?
16:18 chitown granted; my custom grain is messed up. totally! :)
16:18 chitown but, thats not the point... IF i get in that situation, how do i fix it
16:18 XenophonF so regarding git, one other issue i'm having is whether i'm using branches the right way
16:18 chitown manaully deleting the cached files seems kinda brutal
16:18 aparsons joined #salt
16:19 XenophonF right now i have master/development/testing/production branches
16:19 XenophonF master is empty
16:19 mgw does sync_grains fail too?
16:19 chitown it was trying to read from __grains__, but it was always empty
16:19 mgw or just sync_all
16:19 XenophonF and development has a top.sls plus a handful of dev-only states
16:19 chitown yes, sync_grains failes
16:19 chitown also, __salt__ is empty
16:19 XenophonF dunno if i ought to use git differently
16:19 mgw WTH did you do in your grain?
16:19 chitown :)
16:19 chitown NOTHING! I SWEAR! :)
16:19 mgw uh huh
16:19 linjan joined #salt
16:20 perfectsine joined #salt
16:20 chitown seriously, i was just trying to set a couple of grains based on parsing the hostname
16:20 chitown its SUPER simple...
16:20 possibilities joined #salt
16:20 XenophonF like, i probably ought to have all of the production states in dev and test
16:20 Ashwee joined #salt
16:20 lothiraldan joined #salt
16:20 mgw chitown: can you share it?
16:21 XenophonF but i'm having a hard time wrapping my head around how all of it (salt and git) works together
16:21 Ashwee if i do "salt 'windows-test-minion' pkg.list_pkgs"  in debug and as a service i get a different list of packages
16:21 XenophonF ideally, i'd develop state formulas in the dev branch, and then merge with test and production as appropriate
16:21 chitown mgw: uh.... sure.... but, at this point its FULL of crap trying to figure out what was happening
16:22 mgw XenophonF: that's what I do
16:23 bhosmer joined #salt
16:23 thayne joined #salt
16:24 Ashwee it's a user permissions thing, if i run the service as the user i run the debug command under the pkg appears
16:24 * Ashwee weeps
16:25 AxelFooley joined #salt
16:25 mgw I would too if I were working with Windows ;-)
16:26 Guest25158 joined #salt
16:27 totte joined #salt
16:27 Ashwee ALLUSERS=1 prolly the secret
16:28 Ashwee dude, i basically wrote a bespoke version of openstack because infastructure made me use hyper-v over kvm
16:28 Ashwee hating microsoft hard recently
16:29 druonysuse joined #salt
16:29 druonysuse joined #salt
16:31 beneggett joined #salt
16:32 XenophonF mgw: can you explain how you handle targeting (top.sls) among minions in the different environments?
16:32 chitown mgw: trying to debug... it works fine if i just remove:
16:33 XenophonF like, do you use wildcards at all?
16:33 chitown if __name__ == '__main__':
16:33 chitown ....
16:33 chitown i had that in there to better test
16:33 mgw XenophonF: I use a tops module -- no top.sls at all
16:33 XenophonF i have this notion of a default common config across all minions, so this is what my top.sls looks like at the moment: https://github.com/ibrsp/salt-states/blob/production/top.sls
16:34 mgw chitown: That's a bit odd
16:34 mgw it must be related to how the loader works
16:34 XenophonF and then there's a dev version https://github.com/ibrsp/salt-states/blob/development/top.sls
16:35 XenophonF mgw: what's the tops module?
16:35 XenophonF am googling
16:35 wt XenophonF, master_tops
16:36 wt you write some python to provide the top data instead of using top.sls
16:36 XenophonF found it - http://salt.readthedocs.org/en/latest/ref/tops/
16:36 wt is readthedocs up to date?
16:36 wt Last time I looked, it was way out of date.
16:38 TheThing joined #salt
16:38 timoguin I think it's still a bit out of date
16:38 XenophonF thanks - switched to docs.saltstack.com
16:39 timoguin Looks like readthedocs has the latest (i.e., develop branch)
16:39 timoguin nothing for 2014.7, and 2014.1.4 is the latest for the 2014.1 branch
16:40 ericof joined #salt
16:40 XenophonF is there any way to tell a minion, "you're in development, only pull configs from the development environment"?
16:41 BossR joined #salt
16:42 smcquay joined #salt
16:43 rojem joined #salt
16:44 bhosmer joined #salt
16:45 Deevolution XenophonF: I think if you set the "enviroment: " setting in the minion config file it will be only in that environment.
16:47 dalexander joined #salt
16:47 ze- mmm... is there a noop state?
16:48 timoguin test=True
16:48 faust joined #salt
16:48 timoguin closing thing there is atm.
16:48 to_json joined #salt
16:48 Ahlee did anything get done around cmd.run with test=True
16:49 Ahlee I haven't gone past 0.17.5, but cmd.run + test=True means the cmd.run will execute
16:50 ze- Ahlee: i don't like the cmd.run, as it is aimed at launching something.
16:51 ze- Just found test.succeed_without_changes that sound more like an empty state. :)
16:51 Marcos left #salt
16:53 wendall911 joined #salt
16:54 MrFuzz joined #salt
16:57 nitti joined #salt
16:57 lothiraldan joined #salt
17:00 ramishra joined #salt
17:01 bbnix joined #salt
17:01 nitti_ joined #salt
17:02 XenophonF Deevolution: thanks
17:03 lcavassa joined #salt
17:04 BossR joined #salt
17:04 ramishra_ joined #salt
17:05 meylor joined #salt
17:06 ze- DAMN. test state new in 2014.7 :(
17:06 diegows joined #salt
17:07 beneggett joined #salt
17:09 bhosmer_ joined #salt
17:10 wt What is the schedule for the release of 2014.7?
17:13 ekristen joined #salt
17:15 XenophonF another git question - someone (sorry I forget who) recommended having an empty master (base) branch, but i don't quite understand why
17:15 XenophonF how do you all have your branches organized?
17:15 XenophonF does anyone have anything public they'd be willing to share?
17:16 iggy wt: 2 weeks
17:16 iggy is what I've been hearing for the past 8 weeks
17:16 XenophonF i'm kind of inclined to make 'master' my development branch
17:17 XenophonF then have testing, anstaging, and production branches
17:17 XenophonF s/anstaging/staging/
17:17 wt yeah
17:18 XenophonF and then have the 'production' branch become the base environment
17:18 XenophonF so by default minions are in the base env and get the production config
17:19 XenophonF and i can selectively move minions into the other branches via a state
17:19 iggy except salt automatically maps some branches to envirinments
17:20 XenophonF it can be overridden, iggy
17:20 ekristen anyone every see the salt-master just stop being able to talk to a minion?
17:20 ekristen no errors on the minion side
17:20 iggy XenophonF: where?
17:21 ekristen no errors on the master side either?
17:21 ekristen a simple test.ping returns no results, the minion logs nothing, but a restart the minion process clears everything up
17:21 XenophonF http://docs.saltstack.com/en/latest/ref/configuration/master.html#std:conf_master-gitfs_base
17:22 XenophonF it defaults to 'master' but you can change it to any branch
17:22 chitown when writing a custom grain (python code), are "__salt__" and "__grains__" supposed to be available?
17:23 iggy that's fine for states I guess
17:23 iggy our biggest problem with git was always pillars
17:23 glyf joined #salt
17:23 eykd joined #salt
17:24 ekristen basepi: ever hear of anything like that?
17:25 basepi ekristen: strange one. Not off the top of my head.
17:25 berserk joined #salt
17:25 basepi Possibly a ZMQ version. We've been able to clear up some of these consistency issues with an upgrade to ZMQ 4
17:26 ekristen k, I’m running 2014.7.0rc5
17:27 ekristen so just trying to see if this is a one time thing, recurring, bug, etc
17:28 rojem joined #salt
17:28 beneggett joined #salt
17:29 dalexand_ joined #salt
17:30 jeffspeff I'm trying to do a file.blockreplace. here is the syntax from my init.sls and below it is the error from the state file. http://pastebin.com/kkZp18w7  what am i doing wrong?
17:31 murrdoc joined #salt
17:33 intellix joined #salt
17:34 yetAnotherZero joined #salt
17:34 ekristen basepi: I think I might have found a bug
17:35 ldlework How can I do top-file matching against the ip interfaces grain?
17:35 basepi ekristen: YAY BUGS
17:35 ldlework The grain is a map
17:38 seydu joined #salt
17:38 chitown does anyone know where __salt__, __grains__, etc... gets "put" into modules?
17:38 seydu Hi
17:38 seydu How can I install composer using salt state ?
17:40 zach pkg.install <pkgname>
17:40 Gareth morning morning
17:40 Cottser seydu: I was able to find that really quickly by searching: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.composer.html
17:41 bezeee joined #salt
17:41 ekristen basepi: well maybe not, at first I thought so, I was able to append a role to a couple of minions but all the subsequent jobs failed
17:41 ekristen I thought maybe the grains.append was screwing something up, but looks like it is a coincidence
17:41 ldlework Guys, on this page it lists how to match by IP. What is the _name_ of that kind of match? How do I match on IP *without* doing a compound match? When you do a normal Grain match you have to specify "match: grain" what do you put there when you are matching IP address?
17:43 Cottser jeffspeff: just a guess but your indents are only 1 space, that could cause problems
17:43 Cottser (afaik)
17:44 jeffspeff Cottser, I've tried with double spaces as shown in http://makina-corpus.com/blog/metier/2014/saltstack-manage-entries-in-unmanaged-files-with-file-blockreplace  but i got the same error still
17:45 Cottser jeffspeff: and what version of salt?
17:45 ldlework Anyone? :0
17:45 murrdoc what page
17:46 jeffspeff Cottser,  2014.1.10-4
17:46 ekristen basepi: I can do salt-call commands from the minion, but nothing from the master will work
17:46 Sacro ldlework: IP is a grain?
17:47 thedodd joined #salt
17:47 ldlework Sacro: the ethernet interfaces are
17:47 ldlework Sacro: but there appears to be a match type that isn't Grain
17:47 ldlework for matching the IP
17:47 ldlework if you look at the link
17:47 ldlework its denoted as @S
17:47 Cottser jeffspeff: not sure, Windows bug maybe? https://github.com/saltstack/salt/issues/16174
17:47 ldlework or S@
17:47 ldlework rather than G@
17:47 ldlework What is the /name/ of this matching?
17:47 Cottser jeffspeff: that looks like the same error right?
17:48 Sacro compound?
17:48 Sacro http://docs.saltstack.com/en/latest/topics/targeting/compound.html
17:48 ldlework Sacro: that's exactly what I'm saying
17:48 ldlework I don't want to do a compound target
17:48 jeffspeff Cottser, yes, same error. good find
17:48 ldlework I *just* want the ip
17:49 ldlework in which case what do you put for "match: ????"
17:49 ldlework for pure grain matching you do "match: grain" for compound matching you do "match: compound"
17:49 Sacro Right
17:49 ldlework it doesn't say what to put for matching on the IP
17:49 Sacro Compound?
17:49 Sacro S@127.0.0.1
17:49 murrdoc G@IP=IP
17:50 ldlework I don't want to do a compound match :(
17:50 ldlework I only want to match the ip
17:50 Sacro G@ipv4= surely?
17:50 ldlework "ipv4" isn't a grain
17:50 Sacro ldlework: why not?
17:50 ldlework Sacro: because I only want to match one thing!
17:51 Sacro sudo salt \* grains.item ipv4
17:51 Sacro then don't use and/or?
17:51 ldlework Sacro: right but it is a list
17:51 ldlework how do you match against a list?
17:51 Sacro L@ ?
17:51 ldlework what?
17:51 Sacro L@minion1,minion2,minion3
17:51 mgw Sacro  @L is for a list of minion names
17:51 ldlework jesus
17:52 Sacro 17:51 < ldlework> how do you match against a list?
17:52 ldlework Sacro: I appreciate your suggestions but it seems like I'm talking straight past you
17:52 Sacro I think you are :( sorry
17:52 ldlework Sacro: yes, "ipv4" is a -list of ip addresses-
17:52 Sacro Oh right
17:52 ldlework @L is for matching a -list of minions-
17:52 Sacro then use @S?
17:52 ldlework How do you match a grain, who's datatype is a list?
17:52 Sacro P@?
17:53 ldlework Are you guessing?
17:53 Sacro I don't see why compound with S@ip doesn't do the job
17:54 ldlework Sacro: okay, and what is the name of that kind of match
17:54 ldlework in the topfile
17:54 ldlework where you have to specify the match type
17:54 Sacro compound
17:54 ldlework So you use Compound for any match type that isn't grain, or pcre?
17:55 Sacro There are other match types IIRC, but yes, this is one of those times
17:55 ghanima hey guys question.... i want to combine salt-mine and salt roster. what i am trying to do is that the majority of my environment i can install traditional minion on hosts except for a very small subset so i have been using ssh roster to communicate with those however what i would like to do is if possible there is data stored on the servers i communicate via roster that i want to expose via salt mine
17:55 ghanima is that possible
17:55 iggy salt mine doesn't work with salt-ssh
17:56 ghanima iggy: any suggestions
17:56 iggy don't use salt-ssh
17:56 cberndt joined #salt
17:57 Ryan_Lane joined #salt
17:57 ghanima iggy; isn't there a module that allows for results to be aggregated
17:58 iggy I don't use salt-ssh, not entirely sure
17:59 ghanima iggy: this module is just executed through plain old salt
17:59 BossR joined #salt
18:02 XenophonF can i set a grain or something and use that for targeting a particular environment?
18:03 iggy XenophonF: you can target however you want in your top file
18:04 iggy also, there is a minion config setting that will restrict a minion to a particular environment
18:04 mgw XenophonF: Are you wanting to target "salt <target> somemod.func", or in top.sls?
18:05 ramishra joined #salt
18:06 XenophonF i want to have separate production, staging, testing, and development environments
18:06 XenophonF and i want to easily assign minions to each
18:06 XenophonF don't know the best way to go about it
18:07 XenophonF it seems like a bad idea to treat the base env as "production" since it trumps states in other environments
18:08 Ryan_Lane XenophonF: I use grains to specify environment
18:08 Ryan_Lane I always use base, though
18:08 Ryan_Lane I include states/pillars based on the grain
18:08 Ryan_Lane including secrets based on grains is dangerous, btw
18:09 XenophonF yeah i only put secrets in pillar
18:09 Ryan_Lane so if you decide to go that route, you should know that
18:09 Ryan_Lane well, if you have secrets in pillars and you allow access to them via grains, they are available everywhere
18:09 Ryan_Lane since any system can change its grains
18:10 Ryan_Lane I name resources by convention, though (service-environment-region-node.domain), so in my case if I used master/minion I'd protect my pillars using the hostname and it would be OK
18:10 mgw What are the utils synced by saltutil.sync_utils good for? I can't find any example uses.
18:10 ldlework While using salt-call 2014.7.0rc4 I am getting the following error while utilizing state.sls_id, https://gist.github.com/dustinlacewell/79ee285d6d1429704532
18:10 ldlework Should I file a bug?
18:11 Ryan_Lane ldlework: if there's no bug already filed, yes :)
18:11 jeffspeff Cottser, is that bug fixed in 2014.1.13 or are they waiting for 2014.7?
18:12 mgw Idlework: I just looked the code, definitely looks like a bug
18:12 n8n joined #salt
18:12 mgw well, there may be two bugs
18:13 ldlework mgw: looks like there is already an issue
18:13 ldlework https://github.com/saltstack/salt/issues/17017
18:13 mgw #1 ret is set inside a conditional
18:13 mgw ok
18:14 BossR joined #salt
18:16 eykd On Ubuntu 14.04, In 2014.7.0rc6, my salt commands are suddenly not doing anything. http://pastebin.com/kXujRdy2
18:17 eykd I accidentally had used `install_salt.sh -M git 2014.7.0rc6` to install on top of an earlier-version Ubuntu package, but it was working. It stopped working when I accidentally upgrade the Ubuntu package. I uninstalled the Ubuntu package, reinstalled w/ install_salt.sh, and it still won’t work.
18:18 Ryan_Lane hm. do they even install things in the same spot?
18:18 Ryan_Lane is there any sane way to uninstall using the install_salt.sh>
18:18 Ryan_Lane ?
18:18 eykd I think they do, which is why the upgrade broke things.
18:18 Ryan_Lane I'd try uninstalling everything, then installing a specific version
18:19 eykd Thought I did that, but perhaps I need to be more thorough.
18:19 to_json joined #salt
18:19 Ryan_Lane this is why I hate magical scripts
18:19 eykd Seriously. Though, in one way, salt itself is a very large, very magical script. ;)
18:20 bhosmer joined #salt
18:20 Ryan_Lane heh. yeah, but I know exactly what it's doing, because I write all of the stuff it runs ;)
18:20 Cottser jeffspeff: I would think the fix is part of the latest RCs of 2014.7.x but seems like it might not make it to 2014.1.x, I'm too new to know more :)
18:21 XenophonF Ryan_Lane: where/how do you set the grain that specifies the minion's environment?
18:22 Ryan_Lane XenophonF: I name my nodes by convention and I parse the hostname to define its grains: http://ryandlane.com/blog/2014/08/26/saltstack-masterless-bootstrapping/
18:22 n8n joined #salt
18:22 Deevolution Is there a way to downgrade salt on Windows without first uninstalling it?
18:23 XenophonF Ryan_Lane: thanks that's what i figured
18:23 XenophonF that's how the fine manual describes it, too
18:23 notpeter_ joined #salt
18:25 mdasilva XenophonF: i tired it both ways and found using a minion id naming format the better approach
18:25 XenophonF could i pick an environment based on a value in pillar
18:26 XenophonF unfortunately, our current naming conventions don't incorporate environment info
18:26 mdasilva i figured it would be a rare situation to have a minion part of multiple development stages
18:26 XenophonF yeah, it makes perfect sense
18:27 XenophonF maybe for myself i could go by campus ID instead of dev/test/stage/prod
18:27 XenophonF and then define new campus IDs that represent dev/test/stage
18:27 XenophonF that would fit our existing naming conventions
18:29 yes456 joined #salt
18:29 XenophonF you know, the more I think about it, the more I think matches based on pillar key values would be better for me
18:29 XenophonF i could have a key named 'role'
18:30 XenophonF and then assign that in pillar/top.sls as appropriate
18:30 XenophonF and i could change it if needed
18:30 XenophonF etc.
18:30 XenophonF hm
18:30 seydu Cottser: I have read this. But I think it is forinstalling PHP packages using composer, not for installing composer itself
18:30 Cottser seydu: look at the top two states in the example code. looks to me like they are for installing composer
18:31 XenophonF http://docs.saltstack.com/en/latest/ref/states/top.html includes an example of 'match: pillar'
18:31 XenophonF i'm going with that
18:31 XenophonF thanks everyone for talking me through this
18:32 Cottser seydu: may just need a slight tweak because it uses cmd.wait
18:32 seydu Cottser: yes. Let me rephrase my question then. How can I use this configuration to to have composer installed when I run "highstate" ?
18:34 seydu When i add composer-install in may list of packages it says this package is not found.
18:35 Cottser seydu: I would think you could just change cmd.wait to cmd.run in install-composer
18:35 Cottser seydu: and put those two states into an sls referenced from your top.sls
18:35 Cottser seydu: but I haven't tested that to see if it would work
18:35 seydu I did this
18:36 Cottser seydu: not sure what you mean by list of packages
18:36 seydu When I use pkg it works but with cmd.run or cmd.wait it does not
18:36 seydu In my environment I have to list the states.
18:37 Cottser seydu: may need to see some code to help further.
18:37 jeffspeff when using file.replace, how can i have it add an additional line of text below the line that it replaces?
18:39 BossR joined #salt
18:39 ckim joined #salt
18:39 jeffspeff someone mentioned using a new line character the other day, but i'm not familiar with yaml or that experienced with salt to know what new line character to use. the master is a linux box, the minions are windows. doi use a new character that linux will interperet or a character for windows or does yaml have a universal character of its own?
18:40 seydu base:
18:40 seydu '*':
18:40 seydu - php
18:40 seydu - php.cli
18:40 seydu - php.curl
18:40 seydu - composer
18:40 seydu - php.apc
18:40 seydu - nginx
18:41 jeffspeff seydu, pastebin
18:41 seydu Ok
18:41 SheetiS jeffspeff: newline is \n in *nix or cr+lf  (\r\n) in windows
18:42 jeffspeff SheetiS, so, "- repl: 'foo' \r\n 'foobar'" would do the trick or does it all need to be in the same single quotes?
18:42 Cottser seydu: yes
18:44 SheetiS so if you were replacing the match of 'foo' with 'foo <newline> foobar', then - repl: 'foo\r\nfoobar' would be what I would use
18:44 jeffspeff ok, thanks
18:45 lopezio hi, does anyone here know whether it's possible to run only certain types of states within a highstate? for example, if i wished to make sure that all service.running states are executed but not the rest (would make up an ideal startup state, my thought)
18:45 iggy lopezio: orchestrate (or overstate)
18:46 iggy also let's you order over multiple hosts, etc.
18:46 lopezio iggy: thx! :)
18:49 lopezio way cool, the whole thing
18:49 seydu Cottser: http://pastebin.com/5vz3ACje
18:50 Cottser seydu: ok so /srv/salt/base/composer != install-composer
18:50 Cottser seydu: your top.sls has to refer to the sls, not an individual state within
18:51 Cottser seydu: in your case your top.sls would have to have something like "- base.composer" to match what you have there
18:51 Cottser afaik anyway :)
18:52 thedodd joined #salt
18:52 Cottser seydu: and looking at it again, I think cmd.wait is fine for install-composer actually. try it that way first anyway
18:53 seydu Even if I rename install-composer to composer it does not work.
18:53 Cottser seydu: because you have 'base' in there, unless that's a convention I'm not aware of that may be your problem.
18:53 Cottser seydu: I gather php and nginx are coming from salt formulas?
18:54 perfectsine joined #salt
18:55 Cottser In a typical set up if you had "- composer" in your top.sls and it wasn't a formula it would be referring to /srv/salt/composer.sls or /srv/salt/composer/init.sls
18:55 seydu Ok I am trying it again, I might have made another mistake that made the thing not work (php comes from github.com/seydu/php-formula.git and nginx in one of my sls file , nginx/init.sls)
18:56 eykd Ryan_Lane: I figured out why nothing was working. When I reinstalled salt-master, the master key changed, and the minions are all shunning the master, fearing that he has been subverted. :)
18:56 Ryan_Lane ouch
18:56 Ryan_Lane the benefit of using packages is that it leaves files in /etc/ untouched when uninstalled
18:57 eykd Well, that was my fault, I suppose. I axed /etc/
18:57 bhosmer joined #salt
18:57 intellix joined #salt
18:58 eykd I didn’t even consider that there might be a key in there.
18:58 SheetiS hehe /etc/salt/pki is a thing
18:58 eykd Now I Know.
18:59 Ryan_Lane did you have any backups?
19:00 seydu Cottser: when I replace cmd.wait or cmd.run with pkg it works (show_highstate lists the install-composer).
19:00 eykd Ryan_Lane: Nah, but this is all early experimentation, so I only had a handful of minions. I just deleted /etc/salt/pki/minion/minion_master.pub on each one and started it up again.
19:00 thedodd joined #salt
19:00 Ryan_Lane ah, ok
19:00 seydu But it connot install it that way
19:00 Ryan_Lane good learning experience :)
19:00 eykd And NOW I’m going to take a backup. :)
19:01 nitti__ joined #salt
19:01 Cottser seydu: hmm that makes no sense to me because I still don't see how your sls is getting picked up
19:01 eykd That’s /etc/salt/pki/master/master.pem and /etc/salt/pki/master/master.pub I guess, right?
19:02 ekristen basepi: I definitely have a problem
19:02 Cottser seydu: but I'm pretty new :)
19:02 ekristen now one 4 of my minions after updating their grains, I’ve lost complete communication with them
19:02 ekristen I have to restart the minion to get it working
19:03 seydu Cottser: thank for your help. I am trying to find a way to install a package without using the OS package manager
19:05 basepi ekristen: define "upgrading their grains"
19:05 basepi er, updating
19:05 ekristen basepi: grains.append role new_role
19:06 basepi And restarting fixes the disconnect?
19:06 basepi Strange.
19:06 basepi Sounds like an issue that needs to be filed
19:06 ramishra joined #salt
19:06 micah_chatt joined #salt
19:06 ekristen basepi: the problem is that I can only randomly reproduce it
19:07 bbnix joined #salt
19:07 ekristen basepi: upstart says salt-minion is running, but all logging stopped 30 minutes ago, https://gist.github.com/ekristen/ff03c55561d0cfcf4c75 <— that was the last 3 log entries
19:07 basepi I hate those kinds of issues. I'll be interested to hear if any other commands can trigger the disconnect
19:07 basepi Or if it's just grains updates
19:07 pas joined #salt
19:07 ekristen actually it seems that my show_top ran successfully, I wonder if it is a combo
19:07 ekristen let me try on another box
19:08 ekristen because my one server was working, then I added a role, ran a show_top and then it stopped responding
19:09 meylor joined #salt
19:09 ekristen basepi: I’d be more then willing to file an issue, but I have nothing of consequence to add at the moment
19:09 basepi kk. keep watching and see if you can find any sort of a pattern
19:10 pas has anyone successfully run a state that does a usermod -ou? I have tried -unique: False and -unique: false but still getting salt.state       ][ERROR   ] These values could not be changed: {'uid
19:10 mdasilva did grain targetting in helium (rc4) change? it doesnt appear to work any more
19:10 iggy ekristen: I think if you send SIGUSR1 to a frozen salt process it dumps a full exectuion stack (which should help the devs)
19:10 ekristen iggy: thanks
19:10 ekristen iggy: where does it dump it to?
19:11 iggy log file?
19:11 ekristen kk
19:11 iggy not entirely sure
19:11 iggy never actually used it, just read about it somewhere
19:11 ekristen hrm that didn’t do it
19:11 ekristen well not to the log file
19:12 ekristen but it did kill the process
19:12 ggoZ joined #salt
19:13 ekristen so perhaps it wasn’t frozen?
19:13 ekristen hrm
19:14 ekristen I have 3 other servers I’ve tried to replicate this on but can't
19:18 ekristen question, does a minion report an event back to the salt-master when the startup states run?
19:23 mygarfield joined #salt
19:24 ekristen well on my production servers I can seem to repeat the process
19:25 ekristen but no errors anywhere
19:26 ekristen and SIGUSR1 doesn’t do anything — I don’t think the process is unresponsive, it just stops doing anything
19:30 XenophonF how would i match a Pillar value with spaces in it?
19:31 XenophonF would 'I@key:value1a value1b' work?
19:33 robawt i think you just need to double quote the string or escape the space
19:35 meylor joined #salt
19:36 XenophonF when do pillars get set?
19:36 manfred they get rendered by the master and passed to the minion
19:36 XenophonF like, can i assign a pillar key a value and then target a minion using the key, before running highstate?
19:36 manfred it gets passed in the highstate data
19:36 XenophonF ah
19:36 XenophonF ok
19:37 manfred XenophonF:  you can
19:37 manfred XenophonF:  but you might have to issue a saltutil.sync_pillar
19:37 XenophonF gotcha
19:37 mapu joined #salt
19:37 manfred depending on how long you wanna wait for them to get pushed
19:37 XenophonF yeah i have to sync the pillar first, looks like
19:37 manfred always the safe option
19:38 jdmf joined #salt
19:39 srage_ joined #salt
19:41 possibilities joined #salt
19:42 XenophonF oh it's saltutil.refresh_pillar
19:43 lowkeyliesmith joined #salt
19:45 repl1cant joined #salt
19:47 nitti joined #salt
19:47 manfred yeah that
19:47 manfred i never remember which one they are
19:47 manfred i always just do a saltutil.sync_all
19:48 tkharju joined #salt
19:48 XenophonF ok
19:49 XenophonF thanks!
19:49 XenophonF this might sound weird, but i'm super excited about setting up proper prod/state/test/dev environments
19:49 XenophonF and i should have started using gitfs sooner
19:49 XenophonF i'm really thrilled
19:50 jeffspeff I have a line a text file "TAG=Foo". If TAG is set to anythin other than "Foo" then I want to do run a file.replace command on pattern: 'TAG=XXX'   how can i go about this?
19:50 manfred XenophonF:  nice!
19:55 mygarfield I have a prod/stag/test environment, but I'm using a custom grain (environment: testing) to determine which setup ot use
19:59 XenophonF now i just need to get a handle on branching and merging Git-style, and then I'm set
20:01 berserk joined #salt
20:05 TheThing joined #salt
20:07 ramishra joined #salt
20:09 srage joined #salt
20:12 anotherZero joined #salt
20:13 TheThing joined #salt
20:18 thedodd joined #salt
20:19 stan_k can you use a renderer for commands on the salt cli?  for example:   salt 'server1*' cmd.run "echo {{ grains['os'] }}"
20:20 stan_k or better question: how can i do something like that? :)
20:20 stan_k i guess it would depend on the.. "command" (cmd.run) accepting input that it deals with. i wonder if there's some way to.. wrap it
20:20 mapu_ joined #salt
20:21 theneykov joined #salt
20:22 stan_k i guess I can    cmd.run "salt-call grains.get os".    that feels a little weird.
20:24 meylor joined #salt
20:25 moos3 stan_k why not just do salt '*' grains.get('os')
20:25 moos3 i think that will work
20:25 perfectsine joined #salt
20:25 murrdoc or salt '*' grains.get os
20:25 stan_k i'd like to do a little one-off "compare this string in a text file to that server's grain data"
20:26 Ryan_Lane hm. 2014.7 broke state_verbose
20:26 stan_k not quite sure what the best approach is
20:26 stan_k (text file on the minion)
20:26 murrdoc make a state that reads in the text file
20:26 Ryan_Lane the current version of 2014.7 branch
20:26 stan_k oh, i can just make a state.
20:27 murrdoc yeah iterate over your text fiel
20:27 eykd joined #salt
20:27 murrdoc and compare to grains
20:27 stan_k i keep forgetting how fast that is and how little structure is necessary
20:27 stan_k can i process a state file easily that's not in my file_root?
20:29 jdenning joined #salt
20:29 murrdoc salt '*' state.sls path.to.state.file
20:30 murrdoc where path.to.state.file is path/to/state/file.sls or path/to/state/file/init.sls
20:30 murrdoc thats up to you
20:30 rihannon joined #salt
20:31 stan_k oh beautiful. thank you all very much.
20:33 eykd Say I have a cmd.wait script that watches a managed git repository for changes. What’s the best way to trigger that script even if the repo hasn’t changed?
20:33 smcquay joined #salt
20:34 srage_ joined #salt
20:34 snuffeluffegus joined #salt
20:37 rihannon ext_pillar question:  I've got a DB which I want to be accessible to salt modules via the pillar interface.  There seem to be two functions __init__() and ext_pillar(), I'm confused by the docs as to which one to use for my DB query.  Since this code will return the same data to all minions, does it make sense to query from __init__(), and then just return the data in ext_pillar()?  Or are the docs saying that __init__() is called directly before
20:37 rihannon ext_pillar(), so there's really no point in using __init__()?
20:38 saravanans joined #salt
20:45 ryuhei joined #salt
20:45 ryuhei https://gist.github.com/namcois/15a1222bcd5431151515
20:45 ryuhei has anyone experience this error?
20:45 ryuhei salt-master 2014.1.11 (Hydrogen)
20:46 bhosmer joined #salt
20:47 intellix joined #salt
20:48 bhosmer_ joined #salt
20:50 XenophonF is there a way to debug pillar?
20:50 tkharju joined #salt
20:51 XenophonF for some reason my pillar keys aren't getting set properly
20:51 md5noodle Hello, anyone else encountered following error while using salt-ssh
20:51 md5noodle Traceback (most recent call last):
20:51 md5noodle File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
20:51 md5noodle self.run()
20:51 md5noodle File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
20:51 md5noodle self._target(*self._args, **self._kwargs)
20:51 md5noodle File "/usr/lib/python2.7/site-packages/salt/client/ssh/__init__.py", line 340, in handle_routine
20:51 md5noodle stdout, stderr, retcode = single.run()
20:51 md5noodle File "/usr/lib/python2.7/site-packages/salt/client/ssh/__init__.py", line 588, in run
20:51 md5noodle stdout, stderr, retcode = self.run_wfunc()
20:51 md5noodle File "/usr/lib/python2.7/site-packages/salt/client/ssh/__init__.py", line 634, in run_wfunc
20:51 md5noodle opts_pkg['grains'],
20:51 md5noodle KeyError: 'grains'
20:51 XenophonF md5noodle: please use bpaste.net or something similar
20:51 BossR joined #salt
20:51 md5noodle ah… sorry
20:52 md5noodle https://bpaste.net/show/2b67517f0e13
20:55 XenophonF omg i put my pillar stuff into the wrong directory on my master
20:55 XenophonF i put it into /srv/salt/pillar, but it's supposed to go into /srv/pillar
20:55 XenophonF duh
20:56 XenophonF i tell ya, i much prefer how the freebsd port puts everything under /usr/local/etc/salt
20:59 XenophonF left #salt
21:00 thomasmckay browsing docs, is there a mechanism to send commands to the salt-master from a different system?
21:01 thomasmckay if this is rtfm, please suggest section to read in tfm http://docs.saltstack.com/en/latest/contents.html
21:02 aparsons_ joined #salt
21:02 murrdoc thomasmckay: depends
21:03 murrdoc do you want to send comamnds to a bunch of masters ?
21:03 murrdoc then you can setup a syndic system
21:03 murrdoc or there is pepper i presume
21:03 murrdoc https://github.com/saltstack/pepper
21:04 murrdoc http://docs.saltstack.com/en/latest/topics/topology/syndic.html
21:04 thomasmckay my situation is that i cannot get salt-master working on my laptop (it never "hears" from minions). i did, however, get it running in a vm elsewhere... but i still want to run salt to minions from my laptop
21:04 baniir joined #salt
21:05 thomasmckay pepper has potential
21:06 kballou joined #salt
21:06 bhosmer joined #salt
21:07 ramishra joined #salt
21:07 thomasmckay murrdoc++ thanks
21:07 eykd Hey, I had a question earlier about cmd.wait that I’ve written up as a question on stackoverflow. I’d welcome any input there. :) http://stackoverflow.com/questions/26683420/how-can-i-manually-trigger-cmd-watch-scripts-in-salt
21:08 * thomasmckay wonders if there is karma in this channel
21:08 thomasmckay !karma murrdoc
21:08 thomasmckay well, ++ anyway ;)
21:08 murrdoc :)
21:12 jalaziz joined #salt
21:14 aparsons joined #salt
21:18 rihannon External Pillars:  When does __init__() get called? once for each minion?  Or once per salt execution?
21:20 mgw rihannon: do you mean __virtual__()?
21:20 saravana_ joined #salt
21:21 wt rihannon, the module is loaded every time salt wants to use it
21:21 wt rihannon, I filed a bug about that.
21:22 rihannon mgw: no, __init__().  http://docs.saltstack.com/en/latest/topics/development/external_pillars.html#initialization
21:22 rihannon wt: So then __init__() and gets called every time, and is immediately followed by ext_piller()?
21:22 wt not immediately
21:23 wt and git_pillar is handled separately and differently
21:24 mgw rihannon: that's what it says
21:24 mgw oh, wt says otherwise
21:24 stan_k can anyone point me to some guidance/documentation on monitoring jobs? particularly, when a job targets hundreds or thousands of minions, what are some strategies for knowing that every targeted minion actually processed the jobs, or for doing reporting on which minions had activity?
21:25 mgw stan_k: check out the returners
21:25 BossR joined #salt
21:26 stan_k i was reading about them, but that kind of implies that i always write something to deal with that data. are people developing reporting software that uses returners?
21:26 iggy that's the next thing on my list
21:26 iggy I imagine the salt enterprise web ui has some stuff built in fo rit
21:26 iggy *for it
21:27 wt mgw, I don't believe that to be the case.
21:27 wt I believe the module is reloaded every time the salt-master makes use of it
21:28 wt except for git_pillar which is different and special
21:28 wt in fact, you can't actually cache anything in memory between invocations of the ext_pillar module.
21:29 wt I have a workaround for that though.
21:29 stan_k i'm getting an uncomfortable "running blind" feeling. like if my network guy changes a firewall and breaks connectivity, it's not quickly apparent to me.
21:29 ndrei joined #salt
21:29 wt I actually pickle my data structure and save to disk.
21:29 iggy isn't that what monitoring systems are for?
21:30 wt I load it from disk and unpickle if it's under 5 minutes old.
21:30 iggy use redis
21:30 wt otherwise, I re-fetch the data
21:30 meylor joined #salt
21:31 wt iggy, are you suggesting redis to me?
21:31 ryuhei what's this version salt-minion 0.17.5
21:31 intellix joined #salt
21:31 wt ryuhei, that's really old
21:31 ryuhei hahah
21:32 ryuhei let me try again and see if it installs latest one.
21:32 wt what distro and version?
21:32 iggy ryuhei: what OS/distro/etc?
21:33 ryuhei i m on ubuntu 64bit 14.04
21:33 ryuhei salt-master --version
21:33 ryuhei salt-master 2014.1.11 (Hydrogen)
21:33 iggy there's a ppa, or use salt-bootstrap
21:33 wt that's the version you should have for minions as well
21:33 ryuhei bootstrap
21:33 wt 2014.1.13 is the lastest in that line
21:34 ryuhei i m gonna try again and see wwhich minion gets installed.
21:34 rihannon Thanks mgw and wt.
21:36 rojem joined #salt
21:37 ryuhei salt-minion 0.17.5 still
21:38 micah_chatt joined #salt
21:39 wt rihannon, what are you writing an external pillar for?
21:39 wt I'm just curious.
21:40 b1nar1 joined #salt
21:40 ryuhei oh i think i know why.. it's probably my fault
21:42 X86BSD joined #salt
21:43 mdasilva anyone know the best way to troubleshoot grain or compound minion targetting? (hellium rc4)
21:44 mdasilva not much is being shown with debug logging
21:44 Singularo joined #salt
21:44 mdasilva minion id targetting works and i can confirm the grain im using to target is present on the minion
21:45 belak left #salt
21:49 md5noodle left #salt
21:51 ryuhei ok salt-minion 2014.1.13 (Hydrogen) now
21:51 rihannon wt: In a nutshell, I'm generating a config file which needs to know IP addresses for equipment managed by another department.  That department uses a database to keep track of their equipment and IP addresses.  Right now, we query the DB every hour and write out  pillar data.  I'm hoping to get away from the cron job and get the data on demand via the external pillar interface.
21:53 ryuhei is there any way to prepare salt-minion on a snapshot that master can spin up a droplet from?
21:54 glyf joined #salt
21:55 BossR joined #salt
21:56 baniir joined #salt
21:56 TcShadowWalker joined #salt
21:58 iggy mdasilva: what are you trying?
21:58 mdasilva iggy: just simple grain or compound targetting
21:58 mdasilva i know it was working in 2014.1
21:59 mdasilva i just tried it since going to hellium rc4 and its no workie
21:59 iggy oh, so you think it's a regression in 2014.7
21:59 iggy try one of the later RCs maybe
21:59 mdasilva will do
21:59 TcShadowWalker Hey. I'm currently trying to install halite. Do i HAVE to install it on the salt master? Or can I set it up on a different host and it connects to the master?
21:59 mdasilva just though it might be a syntax change or soemthing
22:00 iggy mdasilva: no, there shouldn't be any backward compatible changes in 2014.7
22:00 iggy backward incompatible
22:00 * iggy buys new hands
22:08 SaltieOne1 joined #salt
22:08 ramishra joined #salt
22:08 aparsons joined #salt
22:09 Deevolution1 joined #salt
22:11 b1nar1 joined #salt
22:11 luckenbach joined #salt
22:11 perfectsine joined #salt
22:13 luckenbach is their a definitive way to tell if a salt job is "running"; I reviewed the soruce of the CerryPy event processer and it shows a 'state' but I never see this
22:13 luckenbach Cherry even
22:14 iggy the job runner
22:15 luckenbach is the job runner different than the data returned from /jobs endpoint?
22:16 iggy *shrug*
22:20 rojem joined #salt
22:23 bezeee joined #salt
22:24 claytron joined #salt
22:35 bhosmer joined #salt
22:40 alex-mesos joined #salt
22:46 Emantor joined #salt
22:48 linjan joined #salt
22:50 mygarfield What's the best way to sync salt servers in geographically separate regions. Should I use rsync or directly pull from my git repo over the WAN?
22:57 pdayton joined #salt
23:07 mygarfield any suggestions on how to keep salt servers in sync with each other?
23:07 giantlock joined #salt
23:07 nkuttler mygarfield: er, sync what? do you mean masters?
23:07 mygarfield yes. salt masters
23:08 mygarfield I'm thinking that I should build the 2nd salt master and just pull form the single git repo over the WAN. If there is a better way, I'm open to suggestions
23:09 ramishra joined #salt
23:10 aquinas joined #salt
23:11 TyrfingMjolnir joined #salt
23:11 b1nar1_ joined #salt
23:20 Setsuna666 joined #salt
23:21 srage joined #salt
23:34 aparsons joined #salt
23:38 meylor joined #salt
23:40 mapu joined #salt
23:43 cads joined #salt
23:48 mygarfield OK. Thanks guys. : )
23:49 srage_ joined #salt
23:55 absolute_ joined #salt

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