Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-05-22

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

All times shown according to UTC.

Time Nick Message
00:00 niks thank you
00:01 mikedawson joined #salt
00:01 dlam hmm i got a  'virtualenv.managed' state which installs a bazillion packages from a .pip file, is there a way to get output of what it's doing?   like there's  pip --log path/to/file
00:03 jgelb joined #salt
00:07 m_george|away joined #salt
00:22 jgelb joined #salt
00:24 pcarrier_ joined #salt
00:25 erasmas joined #salt
00:46 sibsibsib joined #salt
00:49 chapel joined #salt
01:02 joshanyan joined #salt
01:09 napperjabber joined #salt
01:09 bemehow joined #salt
01:10 krissaxton joined #salt
01:12 brianhicks joined #salt
01:25 bensix2 joined #salt
01:29 dcrouch joined #salt
01:36 aljosa joined #salt
01:38 bemehow joined #salt
01:39 teskew joined #salt
01:41 druonysus joined #salt
01:41 druonysus joined #salt
01:41 aljosa if i'm using "salt://some/path" as source in file.managed is there a way to tell it to render file as template and use pillars/grains for context?
01:44 jgelb joined #salt
01:45 jgelb_ joined #salt
01:54 UtahDave - template: jinja
01:55 UtahDave then set your variables either in your sls file under file.managed, or call {{ pillar['item'] }}  or {{ grains['item'] }} in your sls file
02:01 oz_akan joined #salt
02:02 aat joined #salt
02:20 jgelb joined #salt
02:20 aljosa joined #salt
02:20 jkleckner joined #salt
02:22 aljosa is grains.productname the best way to uniquely identify a device (like a laptop mb air or dell xps model) or is there a better way?
02:29 spudbook joined #salt
02:37 jkleckner1 joined #salt
02:51 chapel joined #salt
02:58 auser joined #salt
03:19 raydeo_ joined #salt
03:23 Katafalkas joined #salt
03:36 jaddison joined #salt
03:36 jaddison left #salt
03:45 jgelb joined #salt
04:04 wilywonka joined #salt
04:13 Sacro joined #salt
04:15 techdragon joined #salt
04:16 Katafalkas joined #salt
04:16 techdragon Anyone else had trouble with the bootstrap script on arch linux ? it keeps giving me PGP signature failures for python2-msgpack
04:17 raydeo_ joined #salt
04:17 jesusaurus s0undt3ch: any progress on https://github.com/saltstack/salt-cloud/issues/546 ?
04:18 s0undt3ch jesusaurus: nope, need to get into that realy soon
04:19 s0undt3ch jesusaurus: assigned it to me so I won't forget
04:21 jaddison joined #salt
04:23 jaddison1 joined #salt
04:23 jesusaurus s0undt3ch: thanks
04:23 s0undt3ch jesusaurus: np, sorry I haven't taken care of that already
04:24 jesusaurus its not hard to work around, but it would be nice to take advantage of the new config format
04:25 s0undt3ch jesusaurus: yeah, that's a bug that needs to be taken care of :)
04:27 Katafalkas joined #salt
04:29 sine_nitore joined #salt
04:35 efixit joined #salt
04:35 auser joined #salt
04:36 auser hey all
04:39 Furao o/
04:39 auser holla Furao
04:44 auser Furao: have you used the overstate system before?
04:48 Furao I never had a need for that
04:49 Furao because all my states include each other and -require are strict
04:49 Furao wait no
04:49 Furao it don't seem for that
04:51 Furao after reading the doc again, it confirm what I understand in first place
04:51 Furao and no, as my state -require are very strict
04:51 Furao from nothing it can install a complete web app full functional in a single sot
04:52 Furao shot
05:01 Ryan_Lane joined #salt
05:08 bhosmer joined #salt
05:08 Sacro joined #salt
05:16 auser gotcha
05:16 auser have you ever had the need to use the reactor system Furao?
05:16 auser (sorry, got up for a few minutes)
05:17 auser and the overstate system, I thought was about ensuring a highstate runs on one machine before another
05:22 Furao I only used salt for config management, the orchestration is done with humans and a custom inventory system I wrote that trigger state.highstate using salt-api
05:23 Furao but, this is something I'll have to implement in the next 1-2 months
05:23 Furao I first wanted to have bulletproof low-level states first :)
05:35 oz_akan joined #salt
05:39 berto- joined #salt
05:39 auser totally get it Furao
05:39 auser I'm trying to build that part too
05:39 auser gotcha
05:39 auser Have any examples of your salt-api integration?
05:39 auser that'd be rad to see/use
05:39 auser I haven't had a chance to use it yet
05:40 cossovich joined #salt
05:43 auser anyone here have experience using the master to populate pillar data?
05:46 ronc joined #salt
05:50 auser hey Furao, I noticed you're using nginx .fifo format, porque?
05:52 Furao because nginx access log OR error log (one of it don't support syslog logging)
05:53 auser ah
05:53 Furao and I hate separate /var/log/$daemon/log file
05:53 Furao (except for components that are used for centralized logging, such as graylog2 and elasticsearch)
05:53 Furao and logging itself can lock the nginx process the time it write on the file-system
05:54 Furao using this trick I make sure everything ends in syslog then in centralized logging
05:58 auser that's true, yep
05:58 auser I'm implementing graylog for a client now
05:59 auser for that reason
05:59 auser yep
06:12 aleszoulek joined #salt
06:13 dstanek joined #salt
06:15 ronc joined #salt
06:32 azbarcea joined #salt
06:37 drdran joined #salt
06:41 echos joined #salt
06:44 balboah joined #salt
06:56 jeddi joined #salt
07:07 Newt[cz] joined #salt
07:11 sashka_ua guys, any idea about the execution order of states in top.sls? Is it from top to down? Or just unguaranteed and we need to set order with require?
07:11 Furao sashka_ua: no guarantee, you need - require and - watch
07:12 Furao at some point, the minion create a single big sls file in memory that contains everything once all - include statements had been executed
07:14 sashka_ua Furao: so, if I have let's say, common policy, like create users, then I have compound match for centos5, centos6 to install repos, I need to make - require_in repos
07:14 sashka_ua and is the order of sls names is kept, - sls1 \n - sls2 ? Or it can be wathever without require ?
07:15 f4cl3y joined #salt
07:16 Furao you lost me when I read centos, my mental firewall blocked it
07:16 sashka_ua Furao: I have no choice :) replace it with debian 7.0 and ubuntu server
07:16 p3rror joined #salt
07:17 Furao basically, top.sls just tell the minion which state file to start with
07:17 Furao and then each of them need to resolve their own dependencies
07:17 Furao with include and require
07:17 sashka_ua then if I need to order unrelated sls's what's the best way?
07:18 sashka_ua yeah
07:18 Furao if you need to order unrelated sls and you don't have require
07:18 Furao there is overstate
07:19 Furao but for me, that's a bug
07:19 Furao in your state
07:19 middleman_ joined #salt
07:20 sashka_ua Furao: you mean, that its a mistake if I want to install nginx first and then fpm and then magento?
07:20 sashka_ua means those steps should be independent
07:20 Furao fpm can be installed without nginx?
07:20 Furao I don't think so
07:20 Furao fpm need to include nginx state
07:20 sashka_ua no way
07:20 sashka_ua it's separate piece of software
07:20 Furao ok
07:20 sashka_ua running without nginx
07:21 Furao well I'm trying to stays away very far from everything php
07:21 sashka_ua Furao: I have no choice, since I leave on this unhappy planet :)
07:21 Furao when I do optional integration between 2 states
07:21 Furao I just create a new one
07:21 Furao so if you have fpm/init.sls
07:21 Furao then you can have fpm/nginx.sls
07:21 Furao that will include both fpm and nginx
07:22 Furao and contains the logic that mix both together
07:22 sashka_ua yeah, that's better, Like webapp/nginx.sls, webapp/php.sls, webapp/mysql.sls
07:22 sashka_ua I saw you keep away from mysql :)
07:23 Furao mysql isn't a database
07:23 Furao it's a random data storage that sometimes work
07:23 carlos joined #salt
07:23 sashka_ua it is. :) just not that many people even know hot it works.
07:23 sashka_ua popularity makes bad things
07:24 Furao explains me that http://www.youtube.com/watch?v=1PoFIohBSM4
07:27 Furao if you have to add code just to work around so much shit from a pseudo-database, isn't better to just switch to a real database?
07:27 Furao it's like those who run php application in windows
07:27 Furao why so much suffering?
07:27 sashka_ua Furao: it is, but you forget that people tend to do things easier, not carying about technical debt
07:27 Furao this isn't technical debt, it's bad choice straight at the begining
07:28 Furao just comparing managing mysql vs. postgresql
07:28 Furao mysql is a mess
07:28 sashka_ua you don't need me telling advantages of postgre
07:29 sashka_ua just accept that most of people are un..., let's say stupid
07:29 sashka_ua no logic in actions
07:29 sashka_ua I don't tell Im a smart one :)
07:29 Furao well the price for that is suffering
07:30 Furao dealing with mysql
07:30 sashka_ua but choosing postgre require at least having a clue about dbs at all
07:30 Furao it's just sad that you pay the price as well
07:30 sashka_ua well, I need to go study math. ttl
07:31 Furao school? that's overrated :P
07:31 sashka_ua its seminar right now :)
07:31 sashka_ua university. Want to switch an area to pure math
07:31 sashka_ua have computers
07:31 sashka_ua hate
07:32 Furao you hate computers?
07:32 sashka_ua yeap. But have no choice for job, since it gives pretty good money
07:33 Furao I hated school that's good :) I just have high school degree, the diploma had been burn somewhere
07:33 sashka_ua Im 30y old, and had no diploma at all.
07:33 sashka_ua was like 5 times in high school
07:33 sashka_ua hate hate hate
07:33 Furao my french teacher let me pass with lower than accepted grades because he didn't wanted to see me next year
07:33 sashka_ua yeah. :) same story
07:34 sashka_ua see ya
07:34 axisys joined #salt
07:34 Furao bye!
07:34 Furao File "/usr/lib/pymodules/python2.7/salt/modules/file.py", line 313, in get_hash
07:34 Furao return salt.utils.get_hash(path, form, chunk_size)
07:34 Furao AttributeError: 'module' object has no attribute 'get_hash'
07:34 Furao wat!
07:35 Furao oh it's a half-updated salt minion
07:37 Furao running process is 0.14.0 and code on the filesystem is 0.15.1
07:37 Furao so… pkg: - latest for a salt-minion state isn't a good idea :)
07:40 basepi joined #salt
07:41 Geffy joined #salt
07:44 vaxholm joined #salt
07:46 krissaxton joined #salt
07:53 scott_w joined #salt
07:53 chapel joined #salt
08:03 middleman_ joined #salt
08:22 Ryan_Lane joined #salt
08:25 erasmas joined #salt
08:35 krak3n` joined #salt
08:38 Furao https://dl.dropboxusercontent.com/u/114233/pythong.gif
08:39 Furao hypnotic
08:41 spacedentist joined #salt
08:48 pcarrier_ joined #salt
08:53 yota joined #salt
08:59 emilis_info joined #salt
09:08 balboah how can it be that my file.symlink watch statement triggered when I have a watch on git.latest where the git state is not shown anywhere in the highstate result?
09:09 Newt[cz] joined #salt
09:14 Newt[cz] joined #salt
09:17 Nexpro joined #salt
09:18 balboah the minion debug even says " No changes made" for the git state. But it's not shown in master output and its triggering the symling :|
09:19 lesnail joined #salt
09:20 lesnail Hey everyone, I was wondering if it's possible to target nodes by grains that are an element of a list
09:20 krissaxton joined #salt
09:21 lesnail e.g. if a node has a grain named role with the values webserver and db
09:21 sashka_ua lesnail: if I got you right that would be 'enabled:service'\n - match: pillar\n - sls
09:22 sashka_ua enabled: [service, some, some2]
09:22 mirko joined #salt
09:22 sashka_ua the line above is for pillar
09:23 drdran joined #salt
09:23 lesnail so this has a elementX in listY matching semantic?
09:23 it_dude joined #salt
09:25 lesnail thanks anyway, I will try it out :)
09:29 waverider joined #salt
09:33 auser is there a way to implicitly determine if we're running on ec2 or not?
09:35 balboah set a grains in their minions?
09:35 balboah either by hand or make it ping their metadata service maybe
09:35 auser yeah, I guess that's the only way I can think of it
09:35 auser well, I have some running on ec2 and some not
09:35 auser so I want the ec2 ones to behave differently
09:36 balboah we have a "location" grains set when creating the minion
09:36 auser interesting
09:36 Newt[cz] joined #salt
09:36 auser I like that idea
09:37 multani joined #salt
09:38 multani What would be the preferred way to apply different 'file.sed' states over unrelated lines in the same file?
09:40 valberg Hi - How do I install salt-vagrant from git?
09:40 valberg I see that there is a fix for salt-call highstate returning 2, and therefore tricking vagrant into thinking something went wrong
10:04 Geffy multani: file.patch maybe if its suitably consistent, otherwise you'd probably need to have multiple file.sed states
10:05 Geffy thats only a guess, I've only been properly playing with salt for about a week
10:06 multani Geffy: yeah, I ended up with several file.sed states with different IDs
10:06 multani it's not that bad
10:08 Geffy probably no different to how you'd have to script it manually really
10:09 Bram joined #salt
10:11 Bram hello eveyone, is there a way for salt to return "real time" feedback from a module command (by using yield for example)? I'm running a long command and I'm looking for a way to have feedback during the execution of the command, not only at the end of the command. I haven't found anything like that in the available returners
10:12 pcarrier_ joined #salt
10:14 ioni what's the default behavior when duplicate keys exists in a state?
10:14 ioni both are executed, first is executed or last?
10:16 Bram if salt is using pyyaml (I think so), then the first key is ignored (just run a small test to check)
10:18 tharkun joined #salt
10:18 tharkun joined #salt
10:18 Bram ioni: http://paste.debian.net/5714/
10:19 ioni thank you
10:20 cossovich joined #salt
10:25 erasmas joined #salt
10:29 __gotcha joined #salt
10:35 mikedawson joined #salt
10:37 wunki joined #salt
10:39 wunki I have the strangest thing. Whenever I ssh with root and call the command `salt '*' state.highstate`. Everything works fine.
10:39 wunki however, when I ssh as a user and `su` to root and call the same command, I get permission denied
10:40 wunki > Failed to authenticate, is this user permitted to execute commands?
10:40 wunki and in the logs: "authentication failure of type "user" occured"
10:41 wunki anyone have a clue what could be causing this
10:44 zloidemon Hello, how to make a custom pillar module?
10:45 giantlock joined #salt
10:46 Nexpro1 joined #salt
10:47 wunki ah, figured out my problem. Didn't set the environment, needed `su -`
10:49 Furao zloidemon: check doc for ext_pillar
10:49 Furao there is few example in salt source code
10:50 zloidemon Furao: thank you. I'm looking for in sources
10:50 Furao I wrote a few it's not that hard
10:53 zloidemon Furao: I didn't find, I found only https://github.com/saltstack/salt/tree/develop/salt/pillar
10:54 Furao https://github.com/saltstack/salt/blob/develop/salt/pillar/cobbler.py
10:55 Furao there is one, even how to plug it in the master
10:58 zloidemon Furao: For example. I want add new pillar for getting info about host from mysql table. Is true way using external pillar module?
11:00 sashka_ua zloidemon: конечно :)
11:01 sashka_ua https://salt.readthedocs.org/en/latest/ref/pillar/all/index.html
11:01 zloidemon Thank you :)
11:01 sashka_ua at least you may run shell script with query to mysql via ext_yaml
11:02 Furao mysql isn't a database, it's a random data storage that often work
11:02 sashka_ua =) you hate it definitely
11:03 zloidemon Heh. I can use sqlite too.
11:03 Furao sqlite don't work well with concurrent connection what if 2 minions refresh their pillar at the same time?
11:03 sashka_ua why?
11:04 Furao http://www.sqlite.org/lockingv3.html
11:04 sashka_ua not sure why it will not work
11:04 sashka_ua this is about writing
11:04 Furao sqlite is good for embedded app (single user) or for dev
11:04 sashka_ua refresh is reading, isn't it?
11:05 Furao well the day you're going to write into it, you take risks
11:05 Furao just maintains a yaml file :)
11:06 sashka_ua I think you have much more risks with salt python daemon. Ofcourse adding sqlite doesn't add stability, but first risk is much hihger
11:06 zloidemon sashka_ua: Where is example of ussage a pilar modules? I saw only gains in documentation without ext_pillars.
11:06 sashka_ua zloidemon: I saw couple. Let me check this
11:07 Furao {{ pillars ['keyname'] }}
11:08 sashka_ua zloidemon: are you asking about piece of sls, where cmd_yaml is used?
11:09 sashka_ua there is an example on mongo page
11:09 zloidemon sashka_ua: I said about examples. I found only one now at http://docs.saltstack.com/ref/pillar/all/salt.pillar.mongo.html#module-salt.pillar.mongo but it's without using in pillars.sls and  states
11:10 sashka_ua examples of what?
11:11 sashka_ua aha
11:11 zloidemon sashka_ua: Huh. I understand now. I'm sorry about stupid questions :)
11:12 zloidemon sashka_ua: For example I use now in states {{ salt['pillar.get']('openvpn:server', 'localhost') }} I thought about salt['pillar.mysql']('openvpn:server', 'localhost')
11:13 sashka_ua I think you may use them as usuall yaml files. put let's say base:\n '*':\n - load, then in load.sls you just put ext_pillar:\n cmd_yaml:\n - command: /path/script.py {{ grains['id'] }}
11:14 Furao the output dict of ext_pillar are merged into the global pillar dict
11:14 Furao if you return {'openvpn': {'server': 'xxx'}} if will be accessible trough {{pillar['openvpn']['server'] }} or equivalent
11:15 Furao I had too, integrate a custom inventory system to install openvpn servers :P
11:15 zloidemon sashka_ua: mmm.. Is good idead with calling external script for getting data from db. But I think will better way with adding new custom module to pillars that will able to get data from db.
11:15 sashka_ua zloidemon: not sure why you can't use just {{ pillar['openvpn']['server'] }}
11:15 sashka_ua zloidemon: I don't think storing configs in db is good idea at all
11:15 Furao sashka_ua: it can be, depends on the situation
11:16 Furao well, in my case I use a REST API to get the data and not raw sql
11:16 sashka_ua Furao: yaml files are much nicer
11:16 sashka_ua Furao: same shit :)
11:16 Furao sashka_ua: I have 3 000 hosts added and removed trough various way
11:16 sashka_ua you may use REST as abstract to config storage
11:17 sashka_ua abstract of access to
11:17 Furao the guys in the factory install embed servers each of them get install with it's own key
11:17 sashka_ua Furao: I'm pretty sure this can be done in dozen ways
11:17 Furao I don't want to maintains a yaml file
11:17 sashka_ua Furao: I don't see the difference between db and yaml at all.
11:18 Furao what if data evolve automatically?
11:18 Furao without human intervention or with third party that you don't want to maintains a yaml file trough git
11:19 sashka_ua I don't suggest maintain it by handa. Just use REST to access db or files or wahtever through wrappers
11:19 sashka_ua as actually salt does with salt-api
11:20 sashka_ua doing config storing in that way you are not locked with single storage and may use a few config data providers
11:20 sashka_ua convinient for particular case
11:20 Furao one way take a data source, process data, serialize a python dict into yaml, save on the file system, then salt-master read the file, unserialize it and converted into a python dict
11:20 Furao while ext pillar return take data source, process return python dict
11:21 Furao err: while ext pillar take data source, process and return python dict
11:21 sashka_ua you skipped DB processing :)
11:21 Furao in many cases it's better to have ext pillar
11:21 sashka_ua open table data, load it to memory, scan\select, return it through the network.
11:22 Furao in my case I have a REST API, there is far more processing than a select in a table
11:22 sashka_ua that's what I'm talking about
11:23 sashka_ua so, actually it doesn't matter for you where you stora data
11:23 Furao anyway, talking straight to a db without an ORM or something else is a bad idea. you change data structure and you need to restart your salt master
11:23 jgelb joined #salt
11:23 sashka_ua not sure why?
11:24 sashka_ua change structure of pillar data?
11:24 Furao no change in sql schema
11:24 jgelb joined #salt
11:24 sashka_ua but master has no access to sql
11:24 sashka_ua it has access through some wrapper
11:25 Furao pillar run in the master
11:25 Furao not in minions
11:25 lvicks joined #salt
11:25 sashka_ua yes
11:25 Furao oh in that sense
11:26 sashka_ua changes in sql scheme is valuable drawback of storing data there
11:26 balboah there is file.absent and file.exists, but can I check that a file does not already exist without removing it?
11:26 sashka_ua while with yaml or json you are not limited by fixed structure
11:26 balboah file.symlink seems to replace my symlink even though it says it shouldn't in the docs
11:27 balboah so I want to check that it doesn't already exist
11:27 Furao balboah: salt['file.exists']("filename")
11:27 Furao if it do that, that's a bug
11:27 Furao unless you have force: True
11:27 sashka_ua or clean: True
11:28 balboah none are set
11:28 balboah I'll use that in a jinja if as a hot fix them
11:29 Furao http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.symlink clean?
11:40 tharkun joined #salt
11:40 tharkun joined #salt
11:41 krissaxton joined #salt
11:53 trbs2 joined #salt
12:01 krissaxton joined #salt
12:02 santagada joined #salt
12:08 Nexpro joined #salt
12:34 backjlack joined #salt
12:36 krissaxton joined #salt
12:39 ronc joined #salt
12:39 mirko joined #salt
12:40 mikedawson joined #salt
12:40 pcarrier_ joined #salt
12:40 krak3n` joined #salt
12:42 hazmat joined #salt
12:44 mirko joined #salt
12:48 m_george left #salt
12:54 Newt[cz] hello, i'm having problems with hiera as external pillar data source, does anyone have experience running it?
12:55 sashka_ua wich problem do you have?
12:55 oz_akan joined #salt
12:56 Newt[cz] i have hiera working fine, the command that salt produces is correct, except it does not ask for any key
12:56 Furao joined #salt
12:56 aljosa joined #salt
12:56 sashka_ua which version?\
12:56 sashka_ua of salt
12:57 Newt[cz] command salt uses: hiera -c /etc/hiera.yaml biosversion='VirtualBox' kernel='Linux'
12:57 sashka_ua I saw the bug similar to your condistions: https://github.com/saltstack/salt/issues/4544
12:57 Newt[cz] salt 15.1, hiera 1.2.1
12:58 oz_akan joined #salt
12:58 juicer2 joined #salt
12:59 Newt[cz] yes, that it is
12:59 Odd_Bloke I'm trying to store a multi-line string in a pillar (an SSH key), but the YAML pipe multi-line syntax doesn't seem to be being honoured.
12:59 Odd_Bloke Any ideas what I can do?
13:00 sashka_ua Odd_Bloke: try to generate correct yaml with python script?
13:00 Odd_Bloke sashka_ua: Not sure I understand what you mean.
13:00 Newt[cz] i was thinking how to introduce keys in the hiera pillar calls
13:00 sashka_ua Odd_Bloke: put your data into python dict and print it
13:01 Newt[cz] to use same keys as values from  the top file
13:01 sashka_ua print yaml.load(open('/srv/pillar/conf.sls'))
13:02 Newt[cz] sashka_ua: is there any way how get list of loaded states, like __grains__.items()?
13:02 sashka_ua Newt[cz]: not sure what you mean
13:02 sashka_ua loaded states?
13:03 Newt[cz] yes
13:03 sashka_ua what does it mean loaded
13:03 Newt[cz] https://github.com/saltstack/salt/blob/develop/salt/pillar/hiera.py if you could iterate over loaded states and try to look at the values in the hiera
13:05 sashka_ua salt host grains.items ?
13:06 Newt[cz] base:
13:06 Newt[cz] 'box*.newt.cz':
13:06 Newt[cz] - salt.minion
13:06 Newt[cz] - ntp
13:06 Newt[cz] 'box1.newt.cz':
13:06 Newt[cz] - ubuntu
13:06 Newt[cz] - salt.master
13:06 Newt[cz] for box1 get list [salt.minion, salt.master, ubuntu, ntp]
13:07 Newt[cz] I don't know how to name it properly, but the names of sls files to load
13:08 Newt[cz] may be __sls__?
13:09 sashka_ua when you run: "salt box1.newt.cz state.highstate" there are list of all called states
13:10 carlos_ joined #salt
13:10 sashka_ua I think sls files are compiled into one big file
13:10 Newt[cz] ntp_service:
13:10 Newt[cz] ----------
13:10 Newt[cz] __env__:
13:10 Newt[cz] base
13:10 Newt[cz] __sls__:
13:10 Newt[cz] ntp
13:10 Newt[cz] pkg:
13:10 Newt[cz] - installed
13:11 Newt[cz] it would be nice to get the list of sls used to try to query hiera
13:14 wilkystyle joined #salt
13:14 wilkystyle left #salt
13:18 timl0101 joined #salt
13:18 dcrouch joined #salt
13:19 sashka_ua тще ыгку рщц ерун фку кудфеув
13:19 sashka_ua not sure how they are related, sorry
13:20 sashka_ua hiera should be quered during pillar compilation
13:20 sashka_ua before states files are loaded at all
13:21 Odd_Bloke sashka_ua: Argh, doing a yaml.load() on the same string works fine. /o\
13:22 sashka_ua Odd_Bloke: try to load the whole file
13:23 lempa joined #salt
13:23 sashka_ua or just put dict into python script and dump it
13:23 Odd_Bloke OOOOOOOH
13:23 Odd_Bloke The problem isn't in the pillar, it's where I template in the pillar data.
13:25 sashka_ua Odd_Bloke: I saw samples of yaml multi-line text somewhere in the docs
13:25 Odd_Bloke So the problem I'm seeing is that the pillar is fine, with newlines.  Putting that in to a state, it isn't indented properly.
13:25 Odd_Bloke Jinja can fix that though.
13:26 drdran joined #salt
13:27 Kholloway joined #salt
13:27 drdran joined #salt
13:28 sashka_ua Newt[cz]: I would add print statement to heira.py and try to figure out the issue. But Hwat I see it doesn't pass command keys at all
13:29 sashka_ua Here I saw multiline text: https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.file.html#salt.states.file.append
13:30 Odd_Bloke sashka_ua: Yeah, I've sorted it now.
13:30 Odd_Bloke The data was being read in to the pillar fine, but I was using it incorrectly in my state files.
13:30 sashka_ua cool :)
13:30 napperjabber joined #salt
13:30 oz_akan hi all, is it possible to set pillar data while executing a state?
13:31 sashka_ua before executing the state?
13:31 sashka_ua why do you need this?
13:32 lesnail joined #salt
13:33 oz_akan sashka_ua: is it for me?
13:33 sashka_ua yes
13:34 oz_akan sashka_ua: I want to call a cloud api, it will return me an IP address and I want to store it in the pillar so that minions can use later on
13:36 sashka_ua you may use ext_pillar to query API and cache the result
13:36 danielbachhuber joined #salt
13:37 oz_akan sashka_ua: actually cloud API will return me a unique identifier (not an IP), if I loose it, I can't find it again easily. let me  see ext_pillar anyway
13:38 sashka_ua oz_akan: get it and store somewhere
13:38 sashka_ua put into DB or yaml or whatever
13:38 sashka_ua you may match hosts without this ID anr run API call only for them
13:39 sashka_ua you may you your own script wrapping around this API
13:40 oz_akan sashka_ua: I could write that unique identifier on a file on the minion and read later on, I wanted to know if there is an easy way to store it on the pillar, ext_pillar may work
13:42 sashka_ua oz_akan: right now I see only two ways: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.data.html and some wrapper storing data into minion pillar
13:42 sashka_ua oz_akan: the isiuest way to put it into pillar, store somewhere ID and get it through ext_pillar
13:43 sashka_ua easiest
13:43 oz_akan thanks sashka_ua, I will figure it out
13:44 sashka_ua I have not found obvious way for persistent storage of config data using salt only functions and modules
13:44 sashka_ua might be Im wrong
13:45 sashka_ua except ext_pillar :)
13:45 oz_akan :)
13:45 oz_akan sashka_ua: do you know any example code for ext_pillar?
13:46 sashka_ua here in the chat, just a bit above
13:46 sashka_ua https://salt.readthedocs.org/en/latest/ref/pillar/all/index.html
13:47 sashka_ua https://salt.readthedocs.org/en/latest/ref/pillar/all/salt.pillar.mongo.html#module-salt.pillar.mongo
13:48 sashka_ua here you go: http://paste.debian.net/5760/
13:48 oz_akan thanks a lot
13:49 jdaggett joined #salt
13:50 sibsibsib joined #salt
13:51 sibsibsib joined #salt
13:54 sibsibsib left #salt
14:00 krissaxton1 joined #salt
14:03 valberg Anyone know of any state modules that enable postgis on a postgres database?
14:04 ronc joined #salt
14:05 sashka_ua valberg: Furao should help you
14:05 valberg Furao: hi :)
14:07 valberg nvm - found something here: https://github.com/brutasse/states/blob/master/postgresql/postgis.sls
14:09 jdaggett joined #salt
14:09 jacksontj joined #salt
14:09 Furao I didn't said I'm the postgresql expert, just that mysql is a shame
14:10 Furao in worst situation, Amazon RDS is tolerable...
14:10 sashka_ua Furao: I saw postgre sls in your sls files
14:10 joehh valberg, Furao: looks like someone is doing some mind reading
14:10 brutasse valberg: that works :) however this is the "spatial template" way, with recent postgres/postgis versions you should only have to CREATE EXTENSION postgis on any existing db
14:10 Furao but yes I do use it, as I don't want to save my data in some random pseudo-database
14:10 joehh I'd been thinking about this today - thanks for finding it
14:11 brutasse valberg: at least with postgis 2
14:15 lvicks joined #salt
14:15 aljosa joined #salt
14:23 ronc joined #salt
14:28 LyndsySimon joined #salt
14:30 timl0101 joined #salt
14:32 conan_the_destro joined #salt
14:33 kaptk2 joined #salt
14:34 timl0101_ joined #salt
14:35 timl0101_ joined #salt
14:43 valberg brutasse: yeah :) I found out - and am now using the ubuntugis ppa to get postgis 2 on ubuntu 12.04
14:43 valberg :)
14:43 valberg and now I'm just doing a cmd.run: psql -d database -c 'CREATE EXTENSION postgis;'
14:49 jalbretsen joined #salt
14:50 cleeming[foxx] joined #salt
14:52 oz_akan hi all, is there a known bug with salt-cloud and using map files?
14:52 oz_akan it gives me a KeyError
14:53 UtahDave joined #salt
14:53 oz_akan I think there was a bug earlier, but I don't know if it was fixed
14:53 oz_akan I have salt-cloud 0.8.6-1raring
14:57 timl0101_ joined #salt
14:57 valberg is there any way I can enforce that a postgres user is created before a database?
14:57 sashka_ua valberg: ordering?
15:00 Odd_Bloke valberg: Require the user from the database definition.
15:00 praddy joined #salt
15:02 kho joined #salt
15:03 Furao valberg: use require
15:04 Furao valberg: https://github.com/bclermont/states/blob/master/states/graphite/init.sls#L148
15:04 praddy hey guys, I was looking at the batch mode operation of salt where it will execute commands on a bunch of nodes in batch mode. But I couldn't figure out a way to ask it to stop if a module being executed on any one of the nodes fails (returns False)
15:04 praddy how can I do that ?
15:04 sashka_ua praddy: run it one by one?
15:04 ronc joined #salt
15:05 praddy well, one could do that but doing it on a cluster of large number of nodes would become cumbersome
15:05 sashka_ua overstate, probably
15:06 sashka_ua https://salt.readthedocs.org/en/latest/ref/states/overstate.html
15:07 praddy yeah, overstate seems like a good option but I was wonder if there was a way to do it with a command like "salt \* cmd.run '<some command here>'"
15:07 jaddison joined #salt
15:07 praddy I meant "salt -b 2 \* cmd.run '<some command here>'"
15:08 sashka_ua it in there, but I have not found its good idea after some thinking
15:09 praddy why would that be?
15:10 sashka_ua do you want to run state?
15:10 sashka_ua I just not sure what you exactly nned
15:11 praddy state can be run using overstate, I want to run a simple command on shell which can exit with a non-zero exit code and I want salt to stop the batch execution as soon as it receives a non-zero exit code from any one node
15:11 JasonSwindle joined #salt
15:12 praddy hope, I am a bit clear now
15:13 sashka_ua give me a sec
15:14 __gotcha_ joined #salt
15:14 __gotcha joined #salt
15:15 praddy so a use case would be doing a rolling release of some application in a cluster, where you want to stop rolling the release as soon as one or a specified number of nodes fail to perform a successful deployment
15:15 sashka_ua Id look at event system and terminating job
15:17 krissaxton joined #salt
15:18 praddy hmm... where exactly in the salt architecture would you do that ?
15:19 praddy reactionners ?
15:19 sashka_ua A single state can have a failhard set, this means that if this individual state fails that all state execution will immediately stop.
15:19 sashka_ua https://salt.readthedocs.org/en/latest/ref/states/failhard.html
15:19 sashka_ua Global Failhard
15:20 sashka_ua that's close, but still not that you want to
15:23 praddy yeah, I would take that as a workaround - define the deployment procedure in a sls, set global failhard in the master configuration and run the deployment sls using state.sls in batch mode
15:24 teskew joined #salt
15:24 sashka_ua don't know if its safe to use global failhard
15:25 sashka_ua I'd include in deployment script or whatever event
15:25 sashka_ua then put listener on event
15:25 sashka_ua and then terminated the deployment job
15:26 sashka_ua the good question how to fall back to run script on fail
15:26 aat joined #salt
15:27 aljosa left #salt
15:27 praddy need to look at the source for how the batch mode operation is carried out, based on that a solution can be thought of
15:29 praddy what do you exactly mean by "terminate the deployment job" ? what's job here? is it a job submitted to one minion or is it the batch job itself ?
15:29 sashka_ua in salt everything is a job
15:29 sashka_ua has an ID and can be managed
15:29 sashka_ua terminated, sent some SIG or whatever
15:30 kevinbrolly joined #salt
15:30 sashka_ua job means job in terms of zeroq
15:30 sashka_ua zeromq
15:30 praddy so, "salt -b 2 \* cmd.run '<some command here>'" essentially submits a batch job to the master, which then carries it out ?
15:30 sashka_ua evertyhing is described in docs. I could not describe that better here
15:32 praddy sure, thanks for the insights
15:35 timl0101_ joined #salt
15:35 jkleckner joined #salt
15:36 jgelb qq - learning salt and salt-cloud on the fly to manage a multi-region AWS deployment.  I'm just trying to get the basics working right now -- cloud profiles and providers defined and a few machines installed and deleted
15:36 jaddison left #salt
15:37 jgelb It doesn't look like salt-cloud --list-images or --list-locations is paying any attention to the "location: " key in my provider definition
15:37 JasonSwindle Do we have any news when 0.15.2 will be out? :)
15:38 clintberry joined #salt
15:38 jgelb fwiw: salt 0.15.1, salt-cloud 0.8.8
15:39 sashka_ua JasonSwindle: any time soon :)
15:39 JasonSwindle sashka_ua: awesome!
15:39 all_the_fisch joined #salt
15:39 sashka_ua JasonSwindle: search through chat logs. Dave told about this and LinuxTag a coule days ago
15:40 JasonSwindle Neat, will do.  I feel odd not being on #Salt for a few days.
15:41 all_the_fisch hey guys, there isn't a way to use the file module to place a file if and only if another cmd.run has been actually executed. require isn't the correct thing because the file will still get placed even if the cmd.run has an unless that is true.
15:42 all_the_fisch so I have one state that runs a command which ultimately puts a file down. I want to replace that file with another file the first time cmd.run happens but not everytime I call highstate. Sorry probably as clear as mud. Maybe I'll pastebin the situation
15:43 all_the_fisch probably not approaching it the best way either
15:43 __gotcha joined #salt
15:43 __gotcha joined #salt
15:45 wilkystyle joined #salt
15:48 bhosmer joined #salt
15:49 timl0101_ joined #salt
15:51 sashka_ua all_the_fisch: probably you need watch?
15:51 all_the_fisch as in I would watch the file I want to replace once?
15:52 spudbook joined #salt
15:52 spudbook_ joined #salt
15:55 davidone joined #salt
15:55 bhosmer joined #salt
15:55 timl0101_ joined #salt
15:58 timl0101 joined #salt
16:00 it_dude joined #salt
16:04 timl0101_ joined #salt
16:05 sashka_ua for some reason my test minion got host into swapping
16:06 RichiH joined #salt
16:06 timl0101__ joined #salt
16:06 RichiH who's the guy at linuxtag who i talked to justnow?
16:07 sashka_ua RichiH: do you want to know a name?
16:07 RichiH as for the debian packaging we talked about, https://github.com/RichiH/vcsh/network shows what i meant wrt branches for debian/
16:07 RichiH sashka_ua: i don't need the name per se; i just want to make sure he gets that info
16:08 RichiH as we talked about native package vs proper branching
16:08 UtahDave RichiH: that would be either Marc or Tom
16:09 UtahDave RichiH: Neither of them are in here at the moment
16:09 koolhead17 joined #salt
16:09 koolhead17 joined #salt
16:10 sashka_ua UtahDave: I got salt-minion forked up to 100 processes and took all the RAM
16:10 krak3n` joined #salt
16:10 RichiH it's tom
16:10 jacksontj joined #salt
16:11 wilkystyle left #salt
16:11 sashka_ua UtahDave: any ideas how to debug that to fill the bug?
16:11 UtahDave RichiH: I'll forward him that link. What's your name?
16:11 UtahDave sashka_ua: what were you attempting to do then that happened?
16:12 sashka_ua UtahDave: I was writing poplicy, but it happened accidentially
16:12 sashka_ua I was writing and testin em
16:13 sashka_ua That's not for first time I see this
16:13 UtahDave sashka_ua: what version of Salt are you on?
16:13 sashka_ua OOM killer came and started shooting
16:13 sashka_ua 0.15.1 master and minion
16:14 RichiH UtahDave: richard hartmann; tell him i'm corey's owner and he will know who i am
16:15 RichiH or let's say handler; owner implies liability
16:15 UtahDave RichiH: he he   :)
16:15 UtahDave RichiH: sent
16:15 Corey Holy crap, RichiH met Tom?!
16:15 dthom91 joined #salt
16:15 Corey My worlds, they are colliding.
16:16 UtahDave Corey: I didn't know you had a handler!
16:16 Corey UtahDave: Self appointed.
16:17 Corey And yeah, I've talked to Tom about the proper way of having a debian branch, he didn't like it. It's possible I sucked at explaining it. :-)
16:18 trbs2 joined #salt
16:19 bemehow joined #salt
16:19 sashka_ua UtahDave: are you aware of any kind of such problems?
16:20 UtahDave Corey: cool. Have you talked with joehh about it?
16:20 UtahDave sashka_ua: no, I haven't seen that at all
16:20 ZenoTasedro joined #salt
16:22 jslatts joined #salt
16:22 Tekni joined #salt
16:24 sashka_ua 2013-05-22 16:22:53,902 [salt.minion                                 ][ERROR   ] Exception [Errno 5] Input/output error occurred in scheduled job
16:25 lvicks Getting an exception on get_hash() for a file in salt.  http://pastebin.com/JpbnGk8x  The log on the minion even when set to trace isn't giving me much info.  Any suggestions for a way to hunt it down?
16:27 lvicks and whats suspicious is that file, on the minion, failed to template correctly.  All the other files templated fine
16:27 lvicks hmmmmm
16:27 UtahDave sashka_ua: do you have some scheduled jobs set up?
16:27 sashka_ua UtahDave: nothing. bunch of simple sls
16:27 sashka_ua VM 2Gb of ram
16:27 sashka_ua I saw salt-minion RSS spikes up to 150M
16:28 UtahDave lvicks: can you pastebin your sls?
16:28 sashka_ua UtahDave: just have no idea what I should to collect to trace the issue
16:30 lvicks UrahDave: http://pastebin.com/pRR1jmyR
16:30 sashka_ua I saw minion skyrecketed by CPU or RAM 4-5 times already
16:31 sashka_ua on single VM
16:32 lvicks UtahDave rather
16:32 knapper_tech joined #salt
16:36 kmrhb joined #salt
16:40 rachbelaid joined #salt
16:41 necronian_ joined #salt
16:41 SpX joined #salt
16:46 gordonm joined #salt
16:50 auser joined #salt
16:51 napperjabber joined #salt
16:53 mikedawson joined #salt
16:55 LGSilva joined #salt
16:55 wilkystyle joined #salt
16:55 wilkystyle left #salt
16:56 bemehow joined #salt
16:56 LGSilva hey guys. Quick question about pillars. Why this is this causing errors while rendering the pillar data? http://pastie.org/7944139
16:57 sashka_ua what's the error?
16:57 LGSilva expected <block end>, but found '<block mapping start>'
16:57 sashka_ua this is something template related I think
16:58 auser hey all
16:59 KyleG joined #salt
16:59 Corey Hey, auser.
16:59 auser how goes Corey
17:00 aleszoulek joined #salt
17:03 lvicks Is there any standard practice for running salt-minion as non-root, but a privileged user?
17:03 lvicks I did some googling seems like some people are doing it, but I'm not sure if giving the salt-minion admin rights is enough
17:04 ZenoTasedro LGSilva: sounds like maybe a jinja block wasn't closed?
17:04 hjrnunes joined #salt
17:05 hjrnunes hi guys
17:05 hjrnunes I need some help setting salt to work on aws
17:05 hjrnunes so I have a bunch of servers on a virtual private subnetwork
17:05 hjrnunes they talk with the outside world through a NAT box
17:06 LGSilva ZenoTasedro: I'm trying to find some docs about pillar/jinja
17:06 hjrnunes I can't make the salt minion talk with master though
17:06 hjrnunes master sits outside aws, and has prots open
17:07 ZenoTasedro LGSilva: http://jinja.pocoo.org/docs/templates/ this page has some good stuff on using the jinja template language
17:07 hjrnunes I've tried to open outbound ports 4505 and 4506 on the NAT security group but I had no luck
17:08 hjrnunes does anybody have any experience with a setup like this?
17:08 bemehow_ joined #salt
17:08 druonysus joined #salt
17:08 druonysus joined #salt
17:08 ZenoTasedro LGSilva: and this page is good for an intro on pillar: http://docs.saltstack.com/topics/tutorials/pillar.html
17:09 kermit joined #salt
17:11 LGSilva thanks ZenoTasedro
17:12 Corey auser: The battle continues. :-)
17:12 auser oh yes, yet again
17:13 Corey auser: Did you see the mailing list post early this morning
17:13 Corey ?
17:13 auser no, I missed it
17:13 auser what'd it say
17:13 auser from you?
17:13 Corey auser: "How do I make the salt webpage come up? http://saltmaster:4505 isn't working."
17:14 ZenoTasedro LGSilva: no problem
17:14 auser hah
17:14 Corey I want to help the user, but... I'm really not sure I can bridge that knowledge gap.
17:14 auser love it
17:14 Corey It's like trying to explain how Salt works to my grandmother.
17:15 auser at least they're trying
17:15 ZenoTasedro you just put a lil' dash of salt on your server and you good to go
17:15 auser that's better than a lot of people, maybe
17:15 ZenoTasedro at least you're not trying to explain chef to them
17:15 danielbachhuber joined #salt
17:16 auser that's a whole hot mess
17:16 Corey auser: Absolutely.
17:19 justhamade joined #salt
17:21 aleszoulek basepi: thx for the google group response..
17:23 basepi aleszoulek: no problem.  =)
17:26 RichiH UtahDave: ta
17:26 RichiH Corey: he did
17:26 RichiH Corey: he seems to like it now
17:27 aleszoulek I'd be happy to pass the pullreq, but it seems there is some design decision needed.
17:30 Ryan_Lane joined #salt
17:42 jslatts joined #salt
17:46 lvicks_ joined #salt
17:51 Siva_ joined #salt
17:51 ZenoTasedro is there a standard or most common way of communicating with the salt master remotely? is salt-api the primary option?
17:51 dthom91 joined #salt
17:53 auser I wish I knew the salt-api better than I do...
17:53 auser anyway
17:54 ZenoTasedro I'm wanting to build a simple web interface on a box that'll communicate with the salt master to abstract applying states and some simple management things
17:55 ZenoTasedro seems like it might be easier to build a small restful interface for my specific need rather than using salt-api
17:57 Siva_ hi, when I do "npm install" of nodemon through salt states, it throws errors like  "Error installing 'nodemon': npm WARN package.json dirty@0.9.7 No repository field." But when I do "npm install nodemon" on the minion directly, it works fine. I'm not sure whether this is related to salt. But in any case, if anyone knows the solution to it, please let me know.
18:05 whiteinge ZenoTasedro: salt-api is the only method of communicating with the salt master from a machine that isn't the salt master or a salt minion
18:05 auser joined #salt
18:05 auser ZenoTasedro: yeah, how would you communicate back to salt?
18:05 auser 'cause I've been thinking about that too
18:05 whiteinge ZenoTasedro: it's pretty easy to get going. do you have any questions?
18:07 ZenoTasedro whiteinge: I don't think I have any that I haven't been able to answer from the docs so far... was curious about authentication
18:08 travisfischer joined #salt
18:08 ZenoTasedro auser: i'd end up writing something similar to what salt-api seems to do, but with just a subset of the functionality. a python web-facing service running on the salt master that uses the salt library
18:08 auser ah, then why not use salt-api?
18:08 auser out of curiosity
18:09 travisfischer Hey UtahDave , can you point me at what you were fixing with this commit: https://github.com/saltstack/salt/commit/21f3013a5a6bc08a07da6850525ac2d42d91daa3 . It broke runas for unless and onlyif and we will submit a pull request but I need to make sure I'm not undoing what you were fixing in the first place.
18:09 ZenoTasedro i've had a few things fall apart through version changes, and didn't know if i'd regret using salt-api for something important
18:09 whiteinge ZenoTasedro: what things fell apart?
18:10 ZenoTasedro now that i've upgraded to 15.1 my state files aren't fully being applied, these are bugs that're now fixed but just not part of a fully released version
18:11 ZenoTasedro so i feel a bit more worried moving forward using salt for my project in general
18:11 ZenoTasedro https://github.com/saltstack/salt/issues/4943
18:12 whiteinge that's not related to salt-api, fwiw. that is a problem however
18:12 ZenoTasedro yeah it made me feel pretty dumb for updating salt via salt :x
18:13 travisfischer UtahDave: nevermind. I found it https://github.com/saltstack/salt/issues/4980
18:13 ZenoTasedro will be testing new versions proper from now on lol
18:13 UtahDave travisfischer: There had been some changes made by someone else in another commit that was causing an exception because "shell" didn't exist. And I think there was somethng else, too
18:14 travisfischer thank you
18:16 ZenoTasedro whiteinge: i understand completely that's not a salt-api issue btw, sorry to be so bleh about it :D
18:18 whiteinge nah, i understand about getting burned. that kind of upgrade should be safe
18:18 lesnail joined #salt
18:18 sashka_ua Weird. I use user.present. After creation, ie running first time, everyt next highstate it shows me "Result: False\n Comment:   These values could not be changed: {'groups': ['web-data']}"
18:18 ZenoTasedro lol exactly!
18:18 ZenoTasedro glad to see it bites more than my own ass
18:19 ZenoTasedro sashka_ua: https://github.com/saltstack/salt/issues/4943
18:20 ZenoTasedro whiteinge: the auth backend for salt-api is configured in the salt-master's settings?
18:20 sashka_ua ZenoTasedro: hhe. thaks
18:20 UtahDave travisfischer: do you have an open bug report for that?
18:20 ZenoTasedro am i understanding that correctly?
18:20 whiteinge ZenoTasedro: yes
18:20 sashka_ua will use optional_group
18:21 ZenoTasedro sashka_ua: you're welcome
18:21 whiteinge ZenoTasedro: all salt-api config goes in the master config file
18:21 ZenoTasedro ooooo okay, i was wondering what auth functionality was in the master itself lol
18:22 sashka_ua ZenoTasedro: I worry all this stuff as well
18:22 sashka_ua salt doesnt seem to be stable at the moment
18:23 sashka_ua But we have no choice to go with
18:23 ZenoTasedro sashka_ua: 14 had been fairly stable in my usage, and fortunately they have good devs on their side, i think 15.2 will help us out a bit
18:24 sashka_ua ZenoTasedro: I hope so :) Otherwise I will be killed for choosing salt
18:25 salinator joined #salt
18:25 ZenoTasedro sashka_ua: yes, my boss tells me its the flavor of the month but i am eager to prove him wrong
18:26 basepi ZenoTasedro sashka_ua:  luckily we're moving to an RC model, so .0 releases should be more stable going forward.  =)
18:26 ZenoTasedro basepi: <3
18:26 sashka_ua ZenoTasedro: dangereous game. :)
18:27 ZenoTasedro good to hear
18:27 sashka_ua basepi: I understand everything. No claims
18:27 basepi hehe, it makes for more pain on our end for releases, but we have had some game-breaking bugs in .0 releases, which is definitely not a good thing
18:27 ZenoTasedro if it wasn't so much better than the alteratives, bugs included....
18:28 ZenoTasedro i have faith in salt!
18:28 basepi =D
18:28 sashka_ua basepi: are you aware of minion unstable behavior? I saw 4-5 times that minion worked as fork-bomb, or skyrocket CPU or RAM and crashed the server
18:28 basepi sashka_ua: first I've heard of it.  is there an issue on github?
18:28 sashka_ua basepi: had the same on 14 and on 15 as well
18:29 sashka_ua basepi: nop. I have no usefull info about this
18:29 krissaxton joined #salt
18:29 basepi sashka_ua: ya, those kinds of issues are *so* hard to track down
18:29 aat joined #salt
18:29 sashka_ua basepi: host was swapping so, I had no chance to strace it
18:30 sashka_ua there were ~100 processes of minion
18:30 sashka_ua Does it seems familiar to you" 2013-05-22 15:31:35,851 [salt.minion                                 ][ERROR   ] Exception [Errno 5] Input/output error occurred in scheduled job" ?
18:31 basepi sashka_ua: =\  Ya, that's no good.  Could I convince you to open an issue with whatever information you *can* give us?  OS, minion/master versions, that error log you just mentioned, etc?
18:31 sashka_ua basepi: of course
18:31 basepi sashka_ua: i haven't seen that particular error before.  definitely create an issue.  i'll bug Tom to look into it.  =)
18:33 sashka_ua basepi: then I saw when minion accidentially lost his mind and start logging "[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds" every 10 ms
18:33 travisfischer Should unless and onlyif commands be run with the same user and cwd as their parent command? in other words, if I have a cmd.run with a "- user: myuser" defined. is the unless command supposed to be executed as root or myuser?
18:33 sashka_ua at that was accepted and configured minion
18:34 sashka_ua basepi: had a log ~300Mb of this shit, until stopped process
18:34 sashka_ua filling aa bug
18:34 UtahDave travisfischer: I'm guessing that it should be run by the specified user.
18:35 basepi sashka_ua: that sounds like possibly a bad key, or maybe that you regenerated a key but the master still has the old key cached or something along those lines
18:36 sashka_ua basepi: did nothing. it happened just from nothing
18:36 basepi sashka_ua: you might try deleting the /etc/salt/pki directory on the minion, and then going into the master's /etc/salt/pki directory and cleaning out the entries for that minion.
18:36 sashka_ua basepi: I did that
18:36 basepi kk, then definitely create an issue with the relevant portions of the log
18:37 sashka_ua basepi: the only weird thing, minion logged those message once per ~10ms
18:37 basepi wait, milliseconds, not seconds?
18:37 basepi very odd.
18:37 sashka_ua yes
18:37 sashka_ua otherwise I'd not mention this at all
18:37 zloidemon I've written external_pillar module, but I have get CRITICAL erro when I sterted use it. What's incorrect there http://pastebin.com/JEgCnDX6 ?
18:38 sashka_ua zloidemon: did you restart master?
18:38 sashka_ua zloidemon: and I'm not sure if "extension_modules" is relevant at all
18:39 jslatts joined #salt
18:39 UtahDave zloidemon: have you read this doc? http://docs.saltstack.com/topics/development/external_pillars.html
18:39 zloidemon Yes of cource if it don't restart I can't load module
18:39 basepi sashka_ua: ya, create an issue.  can you mention @basepi on each of those issues so i get an e-mail about them?
18:39 zloidemon UtahDave: Yes. 5 mins ago
18:39 basepi our issue load is off the charts right now. =P
18:40 Ryan_Lane joined #salt
18:41 sashka_ua basepi: where I should metnion @basepi?
18:41 basepi sashka_ua: in the issue, or in a comment on the issue
18:42 sashka_ua basepi: unfortunately I closed terminal with ps of minions
18:42 sashka_ua but okay, let me fill the bug
18:46 lvicks_ UtahDave: did you get a chance to look at that error?  sorry haven't been by computer
18:51 lvicks_ Is there any way to get salt-minion to predicate it's system calls with sudo?
18:51 lvicks_ so it's got full root access but not actually root?
18:52 aat joined #salt
18:53 sashka_ua basepi: hey. I think those issue are related somehow
18:53 AviMarcus joined #salt
18:53 basepi sashka_ua: that would be good!  because more info = easier to track down.  =)
18:54 sashka_ua basepi: when minion fail to run the job under some conditions it starts to spawn processes fast
18:58 basepi right -- every job the minion runs is run in a separate, daemonized process. so if a job is blocking and never finishes, and it keeps being run over and over, it could end up with many minion processes.
18:58 basepi sashka_ua ^
18:59 sashka_ua basepi: https://github.com/saltstack/salt/issues/5199
19:00 basepi sashka_ua: awesome, i'll look at that when i get time a little later.  =)
19:01 sashka_ua basepi: okay. I think I will figure out salt internals later and will be able to nail down such stuff.
19:01 sashka_ua basepi: I was wrong about 10ms, they were logged like ~100ms
19:02 sashka_ua once per 100ms
19:02 basepi sashka_ua: good to know.  still way too fast though.  =P
19:03 JasonSwindle I see when I am a salt highstate on 0.15.1 this:
19:03 JasonSwindle http://dpaste.org/VSnFe/
19:03 felixhummel joined #salt
19:04 JasonSwindle This shows up in the logs 62 times
19:04 JasonSwindle That seems a little.....odd
19:05 sashka_ua JasonSwindle: no timings?
19:05 JasonSwindle I can provide the full salt minion log, if you wish
19:05 JasonSwindle I do have the time stamp
19:05 sashka_ua shoot
19:06 JasonSwindle one moment
19:10 JasonSwindle sashka_ua: Messaged you directly
19:10 JasonSwindle You can see it at the bottom of the log
19:10 JasonSwindle It is all with-in one second of each other.
19:11 sashka_ua basepi: look at this: http://dpaste.org/FK2cg/#L110
19:11 sashka_ua basepi: some story
19:11 sashka_ua basepi: looks like. :) at the bottom
19:11 JasonSwindle It also looks to happen two times in the log
19:12 JasonSwindle I see 267 "/run/utmp" in the log
19:13 sashka_ua JasonSwindle: this is odd, if this job should run in separate processes
19:13 sashka_ua if it runs at once, may be this just some issue with lok or config
19:13 sashka_ua 7ms between iterations - too fast for spawing
19:14 sashka_ua spawn
19:14 JasonSwindle yeah
19:14 sashka_ua JasonSwindle: might be you have some jinja loop for processes setting something?
19:15 JasonSwindle Nope, no loops.  Not even gotten that complex yet.
19:15 JasonSwindle My jinja / pillar usage is very basic.
19:15 JasonSwindle Simple stuff like "{{ pillar['dbname'] }}"
19:16 sashka_ua Might be it makes some looping per package. Have no idea
19:16 JasonSwindle My salt version report http://dpaste.org/ptWhE/
19:16 JasonSwindle using salt vagrant locked to v0.15.1 github tag
19:16 wilywonka joined #salt
19:17 JasonSwindle sashka_ua: I also see it happen right after "Executing state service.running for iptables-persistent"
19:17 zloidemon sashka_ua: UtahDave I copied cmd_yaml.py to hello_world.py and I have got same CRITICAL
19:18 JasonSwindle sashka_ua: This is the state, http://dpaste.org/JAzhk/
19:18 LyndsySimon joined #salt
19:19 JasonSwindle sashka_ua: I can take out ALL pillar / jinja if you want me to test that?
19:20 erchn joined #salt
19:22 sashka_ua JasonSwindle: not today definitely. its 22.30 in my country
19:23 sashka_ua JasonSwindle: why do you care about this?
19:23 ZenoTasedro JasonSwindle: what are you breaking?!
19:23 lesnail joined #salt
19:29 erchn hi all, anyone know of a way to define a variable in a sls file based on a match group, something like: http://dpaste.com/1195555/plain/
19:31 sashka_ua erchn: -match: pillar
19:31 sashka_ua erchn: ooor,
19:32 jgelb hey, all.. can anyone comment on the support for AWS regions in salt-cloud?  The yaml lets us set a location but it doesn't always appear to be honored
19:33 sashka_ua you need to add - match: pcre, after expression in top.sls
19:33 chuffpdx_ joined #salt
19:33 fivethre1o joined #salt
19:34 jpcw_ joined #salt
19:35 zloidemon sashka_ua: UtahDave I fixed.
19:37 cce_ joined #salt
19:37 loz_hurs1 joined #salt
19:38 retr0h_ joined #salt
19:38 sto_ joined #salt
19:38 hotbox_ joined #salt
19:38 jphall joined #salt
19:38 darrend_ joined #salt
19:38 probablyfine joined #salt
19:38 herlo_ joined #salt
19:40 JasonSwindle sashka_ua: it seems to be something that is running away.  Sorry, I was AFK.
19:40 fxhp UtahDave: travisfischer and I created a patch https://github.com/saltstack/salt/pull/5201/files
19:40 aboe joined #salt
19:41 santagada joined #salt
19:41 jbub_ joined #salt
19:42 atoponce joined #salt
19:42 KFDM joined #salt
19:43 bemehow joined #salt
19:44 codysoyland joined #salt
19:44 aboe herlo, can I ask you a question about rpm packaging?
19:46 herlo joined #salt
19:46 jslatts joined #salt
19:46 erchn sashka_ua: how does the match: pillar help?  I'm looking to have pillar variable assigned based on a previous pcre match
19:47 bhosmer joined #salt
19:47 erchn even matching with pcre (though in my example I should have had a - match: compound)
19:47 aboe left #salt
19:48 erchn I'm wondering if there's any way to either pass a variable argument from a match group or reference a previous match that resulted in the pillar being applied
19:48 bemehow_ joined #salt
19:49 timl0101 joined #salt
19:49 sashka_ua erchn: still not sure what's the issue. What d you want to achieve?
19:49 N-Mi joined #salt
19:49 N-Mi joined #salt
19:49 erchn the goal is to essentially create a variable like say "cluster" which includes all hosts that being with web*, and another for db* and another for xyz*, but not have to explicitly create those matches in a top file
19:50 mattikus` joined #salt
19:50 sashka_ua erchn: you may create per host pillar file and set there role: [web, db, whatever]
19:50 sashka_ua erchn: then match in states using - match: pillar
19:51 jaddison joined #salt
19:51 sashka_ua erchn: including host configs with {{ grains['id'] }}:\n - {{ grains['id'] }}
19:52 erchn ok, yea the goal was to create less files and have to less boilerplate
19:52 erchn maybe I'll look into doing it in python instead of yaml
19:53 sashka_ua erchn: you still need to store somwhere info about relation many-to-many about rols and hosts
19:53 sashka_ua roles
19:53 erchn not really, if all nodes have a common base name like web01, web02, then I should be able to automatically figure out that it's part of the "web" cluster
19:54 erchn we create clusters all over the place, 100s of them, and I would like to be able to trigger off of that common base
19:54 sashka_ua why don't match by hostname?
19:54 sashka_ua 'web*':\n - pillar_name
19:55 erchn I can, but it means for each cluster, go setup that match...
19:55 sashka_ua not sure why
19:55 sashka_ua aha, 100s clusters
19:55 erchn with a grain today we do something like this... "host = socket.gethostname().split('.')[0]" ; grains['cluster'] = re.sub('\d+.*', '', host)
19:56 erchn I guess I'll just stick with that grain implementation
19:56 erchn thanks for your help
19:57 cce joined #salt
19:57 bhosmer joined #salt
19:57 jaddison left #salt
20:06 mikedawson joined #salt
20:11 alekibango joined #salt
20:13 aleszoulek joined #salt
20:15 Ahlee joined #salt
20:16 Ahlee just rebuilt a host, so key mismatch, deleted the key from the salt master, restarted minion and minion is saying it's waiting for master to accept key, but I don't see the host in salt-key -L
20:20 sashka_ua did you try to regenerate the key?
20:20 Ahlee On the minion? No, how would I do that?
20:22 Ahlee well, It was regenerated when the system was reinstalled, but I believe you mean after I deleted the key that failed the initial presentation since I didn't remove from the master until post-reinstallation
20:24 auser joined #salt
20:25 Ahlee enabling open_mode allowed the key to come through, skipping Unaccepted entirely
20:25 Ahlee looking through log files
20:28 Ahlee the public keys in pending did not match. This may be an attempt to compromise the Salt cluster.
20:28 Ahlee oh bother.
20:30 JasonSwindle Is there a way to have salt generate a random password for a Salt State file?
20:30 erchn !py
20:30 JasonSwindle That is what I was thinking
20:30 JasonSwindle Just not use if there was a "Salt" way
20:31 erchn could also probably use cmd.script, slightly saltier in one way, worse in another
20:31 sashka_ua erchn: can you explain in details what you try to solve
20:31 sashka_ua erchn: I saw 100s clusters and etc
20:31 sashka_ua erchn: how do you store config data
20:32 erchn sashka_ua: using the standard salt file backend
20:32 sashka_ua erchn: means pillar
20:32 sashka_ua ?
20:33 Ahlee ok, so looks like salt-key --gen-keys $(hostname --fqdn) on a minion that presents itself as the same hostname as a pervious install but with a different key
20:33 erchn I want to define a pill arvariable to be used in salt states that defines what "cluster" a node is in, based off it's hostname, but not have to manually create pillar files for each cluster
20:33 erchn see my grain based post at 12:55
20:35 bhosmer joined #salt
20:36 justhamade joined #salt
20:37 sashka_ua erchn: but you have per cluster shared config ?
20:37 JasonSwindle erchn: Do you have more examples of !py, trying to find that in the docs...
20:39 erchn sashka_ua: not necessarily, we'll fetch certain files based on cluster name, those files might exist or might not but if they do we'd like them copied
20:40 erchn Jason: not necessarily, just you can create salt states using Python instead of Yaml or whatever other template, so it seems like the right call for that type of issue
20:41 JasonSwindle Well, I am trying to stuff it into a pillar sls file....... hmmmm
20:41 sashka_ua erchn: seems I m starting to understand
20:42 JasonSwindle erchn: maybe a good need for a module..... if you can call them with-in a salt state or pillar salt state
20:44 saurabhs joined #salt
20:45 erchn Jason: I think you could just include a pure python state, and in there do something like "pillar['password'] = genPassword()", then reference that variable in the real state file, but I'm not positive...
20:46 jdaggett joined #salt
20:46 jacksontj joined #salt
20:52 pcarrier_ joined #salt
20:52 sashka_ua erchn: I think I found how you may do this
20:52 sashka_ua let me test this
20:53 LyndsySimon joined #salt
20:54 jesusaurus anyone around who understands the mysql module? im getting a strange error: "mysql.db_check" is not available.
20:55 bhosmer joined #salt
20:55 sashka_ua jesusaurus: check the version of your salt and in which version this functino was introduced
20:57 jesusaurus sashka_ua: i can introspect the function after importing salt.modules.mysql
20:58 a1j_ is there a way to define roles via pillar?
20:58 sashka_ua a1j_: roles: [role1, role2, role3]
20:58 sashka_ua :)
20:59 sashka_ua jesusaurus: then just check if DB exists, it has acces to it and so on
20:59 sashka_ua what minion log tells about this command?
21:02 sashka_ua good night guys
21:04 lvicks_ new master setup can't locate my ext_pillar, http://pastebin.com/8Q3e9WP2 any suggestions on how I point it in the right direction?
21:04 a1j_ sashka_ua: and how to target it after that in top.sls?
21:06 a1j_ sashka_ua: can compount match answer question "if arra has this element" ?
21:09 giantlock joined #salt
21:10 jacksontj joined #salt
21:11 lvicks_ duh I put the pillar file in the python lib
21:13 lvicks_ is there a cleaner way to let salt know that there is an external pillar_ext it should load?
21:17 bemehow joined #salt
21:26 nliadm can I do logic in any matcher besides the compound one?
21:27 ZenoTasedro lvicks_: It looks like you might want to just use the normal pillar_roots rather than ext_pillar: https://salt.readthedocs.org/en/latest/ref/configuration/master.html#ext-pillar
21:27 ZenoTasedro not sure what ext_pillar is for though, have not used it
21:28 lvicks_ it's slightly diff :)  the ext_pillar is for an actual python script that salt will call to collect your pillar data for you.
21:28 lvicks_ vs pillar_roots appears to be where it looks for sls files
21:28 ZenoTasedro ahh okay sorry, i am of no use to you here :)
21:29 ZenoTasedro a !py templated sls file might work too
21:30 jslatts joined #salt
21:32 bemehow_ joined #salt
21:37 jslatts joined #salt
21:40 scallist joined #salt
21:42 auser in jinja, doesn't the loop object have a counter? loop.counter0 or something?
21:42 SEJeff_work auser, http://wsgiarea.pocoo.org/jinja/docs/loops.html#loop-variables
21:42 auser yep, just found it as I pressed enter :)
21:42 auser thanks SEJeff_work
21:42 auser http://wsgiarea.pocoo.org/jinja/docs/loops.html
21:42 SEJeff_work :)
21:42 SEJeff_work correct
21:42 auser thanks :)
21:42 sine_nitore joined #salt
21:43 bemehow joined #salt
21:44 auser can you set a user to run a service as?
21:44 dcrouch joined #salt
21:44 auser aka: https://gist.github.com/auser/a49ca46e42b597f34088
21:54 jacksontj joined #salt
21:57 herlo_ joined #salt
22:10 herlo_ joined #salt
22:10 UtahDave joined #salt
22:15 aat joined #salt
22:16 herlo joined #salt
22:27 oz_akan joined #salt
22:28 jacksontj joined #salt
22:30 ZenoTasedro auser: i assume not, since ot
22:31 ZenoTasedro **it's probably using basic arguments to initscripts
22:31 bemehow joined #salt
22:32 bemehow_ joined #salt
22:32 jslatts joined #salt
22:33 efixit joined #salt
22:33 auser yep
22:34 UtahDave Hey, anybody in here going to be at the Texas Linux Fest in Austin on the 31st?
22:35 pwf first i've heard of it, but i'm in austin so... why not :D
22:36 lvicks joined #salt
22:36 UtahDave cool!  I'm going to be teaching a half day workshop on Salt that Friday morning.
22:37 UtahDave We'll have a booth on Saturday, too
22:38 pwf awesome. i plan on getting started with salt this weekend, so i'll be sure to bring plenty of questions
22:39 UtahDave that will be great!
22:41 Corey Hmm, Debian isn't happy when I tell it to restart the salt-minion service.
22:41 Corey Using the debian.saltstack.org packages.
22:43 krissaxton joined #salt
22:45 UtahDave Here's some info on the workshop
22:45 UtahDave http://2013.texaslinuxfest.org/content/saltstack-training
22:46 ZenoTasedro i might be there with my cloud and my salt repo!
22:46 UtahDave :)  nice.  How are you going to drag your cloud into the room??
22:46 ZenoTasedro i have ssh on my phone, so you bet your ass i am
22:47 ZenoTasedro :p
22:47 jacksontj joined #salt
22:49 sine_nitore Greetings, anyone know if I can reproduce the functionlaity that allows pillar data to be set on the command line when using the client api?
22:50 sine_nitore I can't seem to find a way to set / pass that
22:50 MTecknology joined #salt
22:53 lilmansplace joined #salt
22:54 UtahDave sine_nitore: Hm. I'm not sure.
22:56 herlo joined #salt
22:57 lilmansplace So I just updated to salt 0.14.1 and ran the salt '*' state.highstate and it runs but almost seems like it's in a never ending loop.  Is the output i'm seeing normal behaviour?
22:58 lilmansplace then when I ctrl+c it says ^CExiting on Ctrl-C
22:58 lilmansplace This job's jid is:
22:58 lilmansplace 20130522165802174001
22:58 lilmansplace The minions may not have all finished running and any remaining minions will return upon completion. To look up the return data for this job later run:
22:58 lilmansplace salt-run jobs.lookup_jid 20130522165802174001
22:58 ZenoTasedro lilmansplace: it can be in my experience, if something the minion is trying to do is hanging
22:59 lilmansplace looks like a new feature of spooling the jobs
22:59 lilmansplace so with salt-run is there a way to list the current jobs?
22:59 Mokstar joined #salt
22:59 ZenoTasedro ie. i've misconfigured a git pull before which caused the salt runs to stick waiting for creds to be typed in to authenticate
23:00 Mokstar Can anybody tell me why puppet sucks and salt is awesome?
23:00 ZenoTasedro python
23:00 Mokstar (not trying to be divisive, just asking for comparison from people who ought to know)
23:00 Ivo joined #salt
23:01 ZenoTasedro lilmansplace: salt-run jobs.active
23:01 SEJeff_work Mokstar, different design principles. Speed and simplicty are features, not afterthoughts
23:01 lilmansplace ZenoTasedro: thank you
23:01 ZenoTasedro you're welcome
23:01 ZenoTasedro i gotta head out, take it easy guys
23:01 lilmansplace ciao
23:02 aat joined #salt
23:04 lilmansplace so I'll throw this one to the wind here and see if something comes back
23:04 lilmansplace salt '*' test.ping
23:05 lilmansplace causes this response over and over again in the /var/log/salt/master log file
23:05 lilmansplace [ERROR   ] An extra return was detected from minion
23:05 lilmansplace please verify the minion, this could be a replay attack
23:06 Ryan_Lane joined #salt
23:06 herlo joined #salt
23:07 druonysus joined #salt
23:07 druonysus joined #salt
23:08 jgelb joined #salt
23:09 kmrhb joined #salt
23:09 herlo joined #salt
23:11 lilmansplace It appears to be working better after a reboot of the salt-master server
23:11 timl0101 joined #salt
23:11 lilmansplace but not all of my minions are responding to a test.ping now
23:12 herlo joined #salt
23:16 conan_the_destro joined #salt
23:17 aljosa joined #salt
23:21 aljosa i can't figure out howto make salt execute a command after i've checked that file exists? so if i have sls w/ file exists part how do i exec "echo 1 > /sys/whatever"?
23:21 jslatts joined #salt
23:22 jkleckner joined #salt
23:22 jacksontj joined #salt
23:25 herlo joined #salt
23:27 sine_nitore aljosa: How about using cmd.run function and require your file exists part.
23:31 sine_nitore http://docs.saltstack.com/ref/states/ordering.html
23:31 justhamade joined #salt
23:35 aljosa sine_nitore: can i use cmd.run in sls? can't find an example for this (also, i'm just starting w/ salt so i don't really know how stuff works)
23:37 kmrhb joined #salt
23:37 bemehow joined #salt
23:37 sine_nitore aljosa: http://docs.saltstack.com/ref/states/all/salt.states.cmd.html - Examples of usage in state (sls) file.
23:40 cxz joined #salt
23:43 sine_nitore aljosa: so maybe somethign like this - http://pastebin.com/izDQySFq
23:43 sine_nitore aljosa: but it would depend I suppose on how you are checking for your file.
23:44 aljosa sine_nitore: thanks, know i understand it and can do what i wanted
23:45 aljosa know = now
23:45 sine_nitore cheers.
23:48 kmrhb joined #salt
23:54 jgelb joined #salt
23:56 dlam joined #salt
23:57 msacks joined #salt
23:57 msacks hello
23:57 aljosa if i have 'myfolder/mysls.sls' in top.sls it's not executed, if i move it in root folder it executed. how do i define path to sls in a folder?

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