Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-08-13

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

All times shown according to UTC.

Time Nick Message
00:03 aparsons joined #salt
00:03 bhosmer joined #salt
00:04 aparsons_ joined #salt
00:05 skullone hrm, having issues loading in data from a pillar into a jinja template file
00:05 DavidEzek joined #salt
00:05 skullone https://github.com/saltstack/salt/issues/7645
00:05 skullone seems to be related to that
00:06 skullone in states i can use nested pillar data, but in a jinja template, i get None
00:06 skullone ;(
00:07 vejdmn joined #salt
00:11 stevebrownlee joined #salt
00:14 manfred skullone: that doesn't work that way, you want salt['pillar.get']('top:sub')
00:14 manfred in your jinja template,
00:14 manfred if you do salt['pillar.get'] that calls the pillar.get module, where the pillar.get() is just doing a regular python .get on a dictionary
00:16 aparsons joined #salt
00:17 Damoun joined #salt
00:17 logix812 joined #salt
00:20 emotions403 joined #salt
00:22 skullone so, in my conf file, i have: key = {{ salt['pillar.get']('top:sub') }}
00:23 manfred Ryan_Lane: https://github.com/saltstack/salt/releases/tag/v2014.7.0rc1 rc1 is tagged and up on pypi
00:23 manfred skullone: and in your pillars that are assigned to the server you have
00:23 manfred top:
00:23 Ryan_Lane \o/
00:23 manfred sub: <something>
00:23 mosen yay
00:23 emotions403 left #salt
00:23 skullone manfred: correct
00:24 manfred skullone: then the above should work
00:24 manfred but pillar.get('top:sub') won't
00:24 manfred you would need
00:24 manfred pillar['top']['sub'] or pillar.get('top'
00:24 manfred pillar['top']['sub'] or pillar.get('top').get('sub') or pillar.get('top')['sub'] pillar['top'].get('sub')
00:24 manfred etc
00:24 Luke joined #salt
00:24 manfred one of those if you didn't use the salt[] module dictionary
00:25 mosen is there a big fat changelog for 2014.7?
00:26 manfred mosen: probably
00:26 manfred mosen: http://docs.saltstack.com/en/latest/topics/releases/2014.7.0.html
00:26 mosen nice
00:27 che-arne|2 joined #salt
00:31 Spark joined #salt
00:31 Spark left #salt
00:32 Ryan_Lane "For information about how to use Salt with RAET please see the tutorial: <put tutorial here>"
00:32 Ryan_Lane :D
00:32 gzcwnk joined #salt
00:33 manfred heh
00:33 gzcwnk hi i have just cloned a server and restarted teh clone as "2" but the minion still thinks its "1" how to fix that?
00:34 manfred you need to clear out the salt key on the minion and generate a new one
00:34 manfred and make sure /etc/salt/minion_id is changed
00:34 gzcwnk where is the key kept?
00:34 Ryan_Lane "These runtime modifications make it easy groups of states together, in future versions we hope to fill out the mod_aggregate system to build in more and more optimizations."
00:34 gzcwnk ta
00:34 mosen oh yeah, regarding the top level name and multiple declarations.. what's salt's behaviour for that? like a package declared multiple times
00:34 Ryan_Lane make is easy groups?
00:34 Ryan_Lane someone needs to copy-edit this :)
00:35 mosen the changelog is release candidate too!
00:35 Ryan_Lane :)
00:36 mosen I like the new global requisity stuff
00:37 dvestal joined #salt
00:38 Vye Calling salt modules in Jinja from a state is really neat... http://git.io/ej93nQ
00:39 mosen hah, nice Vye
00:40 mordonez joined #salt
00:40 agj joined #salt
00:44 helderco joined #salt
00:46 agj my custom outputters seem to be found in the local '_outputters' path during sync_outputters, but not found by salt after
00:46 agj ie - https://gist.github.com/agjohnson/9e5f44bae5ac4aca65af
00:48 agj is the discrepancy between the path names in /var/cache/salt/minion/extmods intentional?
00:50 garthk joined #salt
00:51 Ryan_Lane in a state run, if I update the virtualenv my salt is running in, how do I reload modules?
00:51 Ryan_Lane I'm doing this, but it isn't working: https://gist.github.com/ryan-lane/6d131eff9983f514e809
00:54 Nazca__ joined #salt
01:00 manfred Ryan_Lane: i don't thing reload_modules: True will work for you, i believe the modules don't get reloaded until the very end of the whole state run
01:00 manfred but I could be wrong
01:00 manfred is it working for you instead of that watch statement?
01:00 Ryan_Lane the docs imply it'll work
01:00 Ryan_Lane the watch statement definitely doesn't work
01:01 manfred cool, let me know if it does, cause I was trying it for something in the past and had trouble with it
01:01 manfred actually
01:01 manfred i think that was because what I really needed to do was restart salt, cause I had added an internal library that was checked inside a class in salt.utils.openstack
01:01 manfred so the docs might be right and it could work for you
01:03 aparsons joined #salt
01:04 Outlander joined #salt
01:05 Luke joined #salt
01:14 gavala joined #salt
01:19 bhosmer joined #salt
01:26 ramishra joined #salt
01:27 dvestal joined #salt
01:33 diegows joined #salt
01:36 unknown007 joined #salt
01:40 mordonez joined #salt
01:41 oz_akan joined #salt
01:43 modafinil_ joined #salt
01:45 crazysim joined #salt
01:45 ShibMcNe joined #salt
01:45 jalbretsen joined #salt
01:46 retr0h joined #salt
01:46 retr0h joined #salt
01:47 ramishra joined #salt
01:49 otter768 joined #salt
01:52 melinath joined #salt
01:55 dude051 joined #salt
01:58 Luke joined #salt
01:59 Luke joined #salt
02:01 DrQuest joined #salt
02:18 icebourg joined #salt
02:19 icebourg joined #salt
02:23 ajolo joined #salt
02:29 napper joined #salt
02:29 melinath joined #salt
02:49 aquinas joined #salt
02:54 possibilities joined #salt
03:00 melinath joined #salt
03:04 mordonez joined #salt
03:08 bhosmer joined #salt
03:09 Sauvin joined #salt
03:10 vbabiy joined #salt
03:11 possibilities joined #salt
03:12 bhosmer_ joined #salt
03:20 DrQuest left #salt
03:32 skullone hrm, still having trouble getting pillar data into a config template
03:39 ramishra joined #salt
03:43 thayne joined #salt
03:45 catpigger joined #salt
03:46 icebourg joined #salt
03:46 m1crofarmer joined #salt
03:47 skullone im using environment, but i can get sate data from pillars correctly, but just not pillar data into templates
03:48 manfred can you pastebin your template? you also set template: jinja in your state right?
03:48 manfred if you don't it won't render the jinja for your file.managed file
03:49 skullone its just a test file at this point, ill pastebin it
03:52 skullone http://pastebin.com/GTkY4UcD
03:53 manfred change it to
03:53 manfred key:
03:53 manfred value: something
03:53 schimmy joined #salt
03:54 possibilities joined #salt
03:54 manfred whare is your pillar top.sls file?
03:54 manfred base:
03:54 manfred '*':
03:54 manfred - sssd.sssd
03:55 orion_ joined #salt
03:55 skullone my pillar:
03:55 skullone base:
03:55 skullone '*':
03:55 skullone - core
03:55 skullone - sssdy
03:55 skullone minus the y, its a paste issue :p
03:56 manfred how are you including the sssd pillar? it is located at sssd.sssd assuming the pillar_root is pillar/base/
03:56 schimmy1 joined #salt
03:56 skullone hrm, should i rename it from sssd.sls to init.sls?
03:57 skullone im not including with any %include directive or anything
03:58 manfred no?
03:58 manfred well sure
03:58 manfred that would fix it
04:01 otter768 joined #salt
04:01 skullone seemingly not
04:01 skullone i must be missing something obvious
04:02 manfred did you change the stuff in the pillar file like I said?
04:02 manfred key:
04:02 manfred value: something
04:02 skullone yah
04:03 manfred what is the error?
04:03 skullone no error at all
04:03 manfred what gets put in the file?
04:03 skullone the file contents on the target machine is realized just as "key =" with no value
04:03 skullone no errors
04:04 manfred so it is finding the thing correctly, just not putting it in the file
04:04 manfred if you run salt-call pillar.get 'key:value' on the minion, does it work?
04:06 skullone hrm no, getting some odd output from that
04:07 skullone $ sudo salt-call pillar.get 'key:value'
04:07 skullone [INFO    ] Executing command 'iptables --help' in directory '/root'
04:07 manfred that is where your problem is
04:07 skullone [INFO    ] output: iptables v1.4.7
04:07 manfred ahh
04:07 manfred update to salt 2014.1.10, new version that fixes that problem
04:07 skullone salt-call by itself does that too
04:07 skullone ah
04:07 manfred yeah, bug that I actually caused, it was fixed in 2014.1.6, and now .10 is the newest
04:08 manfred 2014.1.5 has a lot of bugs in it
04:08 skullone :<
04:09 skullone hrm the epel mirror im on only has 2014.1.5
04:09 skullone wellp, time for pip
04:09 manfred .10 is in -testing
04:10 manfred skullone: should be .7 in epel https://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/salt.html
04:10 manfred https://dl.fedoraproject.org/pub/epel/testing/6/x86_64/repoview/salt.html
04:11 skullone is .7 suitable mostly/
04:11 skullone ?
04:12 manfred it is fine
04:12 manfred better than .5
04:12 manfred but more problems fixed in 2014.1.10
04:13 skullone ill dig into the SRPM and see about making a .10 rpm
04:13 skullone unless -testing had an rpm
04:13 skullone thought you meant pip -testing version
04:14 manfred skullone: the rpm is in -testing
04:14 skullone but yah, epel
04:14 manfred epel-testing
04:28 econnell joined #salt
04:28 skullone ok, .10 seems to be similar for me
04:28 skullone so i must be doing something wrong
04:30 skullone its just the pillar part not working, file is created fine
04:30 skullone sudo salt 'target-server' state.sls sssd
04:30 skullone is how im invoking this
04:32 manfred but can you do salt-call pillar.get key:value ?
04:32 manfred if you can't do that and get the correct value back, it won't work
04:33 manfred cat /srv/pillar/test.sls
04:33 manfred key:
04:33 manfred value: something
04:33 manfred [root@salt ~]# salt-call pillar.get key:value
04:33 manfred local:
04:33 manfred something
04:34 skullone # salt-call pillar.get 'key:value'
04:34 skullone just 'local'
04:34 skullone hrm
04:35 manfred your pillar isn't assigned correctly
04:35 m1crofarmer joined #salt
04:35 skullone i have another pillar to manage a user and password, and that works fine, assigned same way
04:36 manfred and you can pull the values with salt-call pillar.get?
04:37 manfred it really sounds like this one just isn't applied correctly
04:41 oz_akan joined #salt
04:43 skullone come to think of it, its not assigning it
04:43 skullone i had the password in the state originally, then i moved it to a pillar
04:43 skullone i cant get the password: key using salt-call
04:43 skullone just local, so something is off :p
04:48 felskrone joined #salt
04:49 ramteid joined #salt
04:50 koyd joined #salt
04:52 mosen joined #salt
04:57 bhosmer joined #salt
04:58 skullone yah, assigning pillars is odd
04:58 skullone just a basic base '*' with the two states so far
05:05 manfred you have two top.sls files, one for states and one for pillars
05:05 skullone yah, both are identical actually
05:05 skullone i have state and pillar roots setup the same
05:09 skullone is there a salt command to have salt print what it thinks what pillars it can load are?
05:11 Gareth skullone: there is a pillar module.  salt-call sys.doc pillar
05:11 manfred salt-call pillar.items
05:12 skullone from the master, can you run what it things are available to minions?
05:12 skullone thinks*
05:14 manfred salt \* pillar.itmes
05:14 manfred items*
05:15 skullone i cant seem to assign any pillar to hosts
05:15 ramishra joined #salt
05:16 skullone any *.sls file into the pillars directory doesnt seem to work
05:16 skullone so odd
05:18 manfred works here\
05:18 skullone yah, im thinking this is purely my failing at some level
05:19 manfred http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html
05:22 skullone interesting, if i turn off pillar environments, it seems to work
05:23 mosen maybe theres no base key
05:26 skullone there is
05:26 mosen so whats pillars.items show
05:27 skullone lots of pillars, but all salt default ones, none of the ones ove defined
05:27 mosen ahh right
05:28 mosen and the master has pillar_roots set?
05:28 skullone yah
05:28 mosen sorry im a newb to saltstack too :)
05:29 Cetra joined #salt
05:29 Cetra hey all, having some issues with the tomcat module
05:29 Cetra when I try to deploy a WAR
05:29 Cetra i get "missing username and password settings"
05:29 Cetra but I've definitely set it in the pillar
05:32 skullone the minion shows the pillar root correctly
05:32 skullone pillar_roots:
05:32 skullone - /srv/pillar/base
05:32 Outlander joined #salt
05:33 napper joined #salt
05:33 Cetra on the master I have:
05:33 Cetra root@ubuntu:/srv/pillar# cat top.sls  base:   '*':     - tomcat
05:33 Cetra in the tomcat file
05:33 valentinbud joined #salt
05:34 Cetra I have a lot of different arrangements
05:34 Cetra salt-call config.get tomcat-manager from the minion works
05:34 Cetra and returns values
05:36 aparsons joined #salt
05:41 aparsons joined #salt
05:41 Cetra ah nvm, I have an old package, which looks like it needs to be set from grains only
05:42 oz_akan joined #salt
05:47 Ryan_Lane joined #salt
05:49 mosen sorry havent managed tomcat from salt
05:49 raadad joined #salt
05:49 raadad hey guys
05:49 raadad salt is awesome
05:50 skullone yah, the pillar environments is whats tripping this up
05:50 raadad is anyone here?
05:50 skullone without environments, it works fine for me
05:50 raadad guys has anyone worked with OAuth
05:50 skullone definitely odd
05:54 cym3try joined #salt
05:54 mosen sorta
05:54 mosen raadad: i wrote an app on OAuthv2
05:55 mosen skullone: I have /srv/pillar but shouldnt matter that much
05:55 mosen skullone: just depends if youre using environments right?
05:57 skullone id like to use them :p
05:59 Schmidt joined #salt
06:00 colttt joined #salt
06:02 mmattioli joined #salt
06:05 skullone how do people here seperate pillars into environments, hows your directory structure laid out?
06:06 ramishra joined #salt
06:07 mosen i just have the base one at the moment sorry skullone
06:07 mosen testing a migration from puppet
06:11 harkx joined #salt
06:12 napper joined #salt
06:12 skullone manfred: figured it out
06:12 skullone i had my top file under /srv/pillar
06:12 TyrfingMjolnir joined #salt
06:12 skullone but my base: was define as /srv/pillar/base
06:13 skullone docs say top file must be in root of base environment path :p
06:13 skullone i completely missed that part
06:13 mosen hah
06:13 mosen face palm
06:13 skullone pretty much :p
06:13 skullone i knew i had to be doing something wrong
06:13 ecdhe joined #salt
06:14 skullone based on this, i think ill keep base under /srv/salt and /srv/pillar, and environments will be /srv/salt/dev, and so on
06:16 mosen I think thats the default
06:21 TyrfingMjolnir joined #salt
06:23 ramishra joined #salt
06:23 Cetra just to follow up on the tomcat issue I've had, using packages for ubuntu 12.04
06:23 Cetra If i set this in my sls file, it seems to work
06:24 Cetra # {{ salt['grains.setval']('tomcat-manager.user:','admin') }} # {{ salt['grains.setval']('tomcat-manager.user:','admin') }}
06:29 ramishra joined #salt
06:37 linjan joined #salt
06:43 oz_akan joined #salt
06:44 TyrfingMjolnir joined #salt
06:46 bhosmer joined #salt
06:49 melinath joined #salt
06:49 bhosmer_ joined #salt
06:49 MatthewsFace joined #salt
06:55 slav0nic_ joined #salt
07:02 ajw0100 joined #salt
07:04 TyrfingMjolnir joined #salt
07:07 matthiaswahl joined #salt
07:14 linjan joined #salt
07:18 ml_1 joined #salt
07:22 econnell joined #salt
07:24 oz_akan joined #salt
07:43 CatPlusPlus joined #salt
07:44 valentinbud joined #salt
07:44 TyrfingMjolnir joined #salt
07:47 TyrfingMjolnir joined #salt
07:48 alanpearce joined #salt
07:55 ramishra joined #salt
07:57 mugsie joined #salt
08:04 jhauser joined #salt
08:07 zz_Cidan joined #salt
08:21 poogles joined #salt
08:25 oz_akan joined #salt
08:33 Nazzy joined #salt
08:33 Nazzy joined #salt
08:34 goudale joined #salt
08:34 goudale Hi salt !
08:34 bhosmer joined #salt
08:36 goudale I would like to template a file with something along the line of : {% for machine in salt[](globbing_expression) %} dostuff {% endfor %}
08:36 goudale where should I look ?
08:42 mordonez joined #salt
08:43 ikarpov joined #salt
08:44 ramishra joined #salt
08:50 darkelda joined #salt
08:50 darkelda joined #salt
09:00 giantlock joined #salt
09:03 lwh joined #salt
09:11 TheThing joined #salt
09:12 aquinas joined #salt
09:20 TyrfingMjolnir joined #salt
09:21 gavala joined #salt
09:26 oz_akan joined #salt
09:27 ecdhe joined #salt
09:29 zentrung joined #salt
09:31 denstark joined #salt
09:39 jpaetzel_ joined #salt
09:49 mugsie joined #salt
09:52 ninkotech__ joined #salt
09:58 alanpearce joined #salt
09:59 TyrfingMjolnir_ joined #salt
10:00 unknown007 joined #salt
10:07 denstark joined #salt
10:07 vbabiy joined #salt
10:07 active8 joined #salt
10:07 davet joined #salt
10:07 jeddi joined #salt
10:07 AirOnSkin joined #salt
10:07 kivihtin joined #salt
10:07 andabata joined #salt
10:07 perfectsine joined #salt
10:07 jab416171 joined #salt
10:07 luckenbach joined #salt
10:07 joehh joined #salt
10:07 jeblair joined #salt
10:07 herlo joined #salt
10:07 nkuttler joined #salt
10:07 goal joined #salt
10:07 unknown007 joined #salt
10:12 Ztyx1 joined #salt
10:13 veselin joined #salt
10:17 veselin Hi all, is it currently possible to nest Pillar data in a jinja template? E.g. first "set ENV = pillar['data']['env']"  then use that inside  "pillar['data']['{{ENV }}']['othervar']"
10:19 babilen veselin: Not that I've tested it, but I guess that works
10:19 babilen Ah, it might not as the rendering might not work recursively
10:20 babilen I'd just try it! :)
10:20 Ztyx1 veselin: I'm pretty sure you'd want to do "pillar['data'][ENV]['othervar']" and you should be good to go.
10:21 veselin babilen: Ztyx1: thank you !
10:21 _r00k joined #salt
10:22 Ztyx1 Possibly off-topic but I think someone here might have an opinion; We are running a couple of vmware instances, but vmware is getting a bit too expensive down the line so I'm starting to look around for alternatives. Guest OSs are all Linux-based. Anyone who'd like to recommend a cheaper/open source virtualization platform?
10:22 babilen And yeah, that looks much better
10:23 babilen Ztyx1: I'd recommend libvirt with KVM
10:24 unknown007 joined #salt
10:24 babilen We use Xen, but are looking into switching due to some performance problems. libvirt is nice to develop against and KVM has decent performance
10:25 babilen (very specific performance problems in some rare cases, Xen is not per-se slow)
10:26 martoss joined #salt
10:28 ggoZ joined #salt
10:29 Ztyx1 babilen: Thanks for input! Will check out. Does libvirt/KVM come with any webinterface or thelike? We have a couple of less Linux:y people who sometimes might want to modify the instances…
10:29 babilen Ztyx1: What's the host OS?
10:30 Ztyx1 babilen: Host OS should preferably be Debian or Ubuntu based if possible. At least Linux.
10:30 Lomithrani joined #salt
10:30 denstark joined #salt
10:30 vbabiy joined #salt
10:30 active8 joined #salt
10:30 davet joined #salt
10:30 jeddi joined #salt
10:30 AirOnSkin joined #salt
10:30 kivihtin joined #salt
10:30 andabata joined #salt
10:30 perfectsine joined #salt
10:30 jab416171 joined #salt
10:30 luckenbach joined #salt
10:30 joehh joined #salt
10:30 jeblair joined #salt
10:30 herlo joined #salt
10:30 nkuttler joined #salt
10:30 goal joined #salt
10:30 babilen There are interfaces like http://virt-manager.org/ but I don't use it (just libvirt-bin on Debian) -- Essentially vbox in fast and !Windows !OSX. Not sure about a web interface, but then I wouldn't necessarily want to expose management of my VMs on anything that might have been written in PHP ;)
10:30 vbabiy joined #salt
10:31 Sp00n We used virt manager, its alright, its not as "nice" as some of the big boys
10:31 unknown007 joined #salt
10:31 Sp00n but it does the job
10:31 babilen https://wiki.debian.org/KVM + https://wiki.debian.org/libvirt
10:31 veselin left #salt
10:32 Ztyx1 babilen: Just curious, you using Salt Virt for libvirt?
10:33 Ztyx1 Sp00n: Thx. Will check it out.
10:33 babilen https://www.webvirtmgr.net/ comes up, but I neither know if it is good nor if it is trustworthy (they use an invalid SSL certificate, make of that what you want)
10:34 Sp00n haha cert expired in June!
10:34 Ztyx1 Lol. I guess that says something about how active the project is...
10:34 babilen Ztyx1: No, I use virsh privately. As I said: We currently use Xen and drive that with our own management software. libvirt is a nice interface and an API we found to be powerful.
10:35 Outlander joined #salt
10:35 babilen http://libvirt.org/apps.html has a nice list
10:36 Ztyx1 babilen: Oh yeah. I have a memory like a goldfish today...
10:36 TyrfingMjolnir joined #salt
10:37 babilen Either way my feeling is that KVM would not be a bad choice even though it might not the "best". It should definitely make it on the list of technologies you investigate (along with Xen I guess) and I can also tell you that you can forget about virtualbox right away.
10:38 Ztyx1 Well, Oracle owns vbox. I think that says it all...
10:38 babilen Another, but completely different, approach would be an overhaul of your infrastructure to make use of LXC containers and, yay hipster-fu!, "dockerize" your environment and do all "SAAS" stuff.
10:38 Sp00n vbox is fine but not for a proper host
10:39 babilen vbox is slow and the only advantage I could come up with was that it works on Windows, OSX and Linux
10:39 Ztyx1 babilen: Yeah, docker is not gonna happen for us. Security is of high concern here.
10:39 Sp00n cant say ive noticed any slowness
10:39 Sp00n personally
10:39 babilen But but but .. you get a .io domain and be part of the crew!
10:40 Sp00n depends on usage I guess.
10:40 babilen Sp00n: I used it primarily with vagrant as the driver and both the VM themselves and the provisioning was noticably slower than KVM. There are also independent benchmarks that confirm that.
10:40 Ztyx1 Haha! Yeah, and I get to wear red pants and giant glasses…
10:41 Sp00n k
10:41 Sp00n like i said, works fine for me
10:42 Ztyx1 Sp00n: I hear ya.
10:44 babilen There was an in-depth analysis in one of the many "system administration" magazines we get at $JOB, but I can't quite recall which.
10:45 babilen If it is important for you you can probably pursuade me to invest some time into finding the article, but I wouldn't necessarily want to do that.
10:45 berto- joined #salt
10:46 Ztyx1 babilen: nah, I'll do some research myself. Thanks though!
10:48 greyhatpython joined #salt
10:52 viq Any idea how salt will react if it had comments in non-ascii? say a state "somegrain: grains.present: - value: somevalue #non-ascii explanation of value" ?
10:52 agend joined #salt
10:58 nnion joined #salt
10:59 Ixan hmm.. how can i abort cmd.run in unless, based on a directory exists? i tried "- unless: [ -d /dir ]", but that didnt work
11:00 viq Ixan: how about unless: test -d dir
11:01 Ixan still runs the command
11:02 martoss joined #salt
11:02 berto- joined #salt
11:03 Ixan nvm, typo detected. nothing to see here, move along :)
11:03 viq :P
11:06 miqui joined #salt
11:07 berto- joined #salt
11:10 yomilk joined #salt
11:17 famaia joined #salt
11:17 famaia hi guys
11:19 famaia do you know any way to force delete/remove a job on the master that is marked as active? Sometimes, I send a job to a group of machines that if one of them is OFF the job stays there indefinitely
11:19 diegows joined #salt
11:20 Ztyx1 famaia: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.kill_job is your friend.
11:20 famaia already looked into it, but if the machine is OFF, it will not respond to that command
11:22 Ztyx1 Oh, I would only expect that to be a problem when you fire a job to the minion a couple of seconds before it shuts down. When the instance is starting up the minion should not be running the job again. Where are you seeing the job executing?
11:22 berto- joined #salt
11:27 famaia with salt-run jobs.active, on the master
11:28 famaia like this: '20140806144948810327':   Arguments:   - dir   Function: cmd.run   Returned: []   Running:   - lsd-01.labs.deec.local: 3380   Target: lsd-01*   Target-type: glob   User: root
11:29 famaia I only managed to remove those jobs, removing the minion with salt-key -d and then readding, but that looks overkill to me
11:30 Ztyx1 famaia: is it timinig out after a while?
11:33 famaia I waited more than 48h and they kept there
11:33 famaia then decided to do the salt-key -d thing
11:36 giantlock joined #salt
11:36 Ztyx1 Interesting. Possibly you could file an issue on github for it.
11:37 famaia I was thinking about that too. I just needed to be sure that there is no command to delete a job on the master marked as active
11:38 Ztyx1 Not that I know of (level: using salt extensively for ~6 months).
11:39 Ztyx1 I generally check running jobs using `salt '*' saltutil.running`.
11:39 berto- joined #salt
11:41 duncanmv joined #salt
11:42 famaia ok, nice, that is a good alternate command
11:42 famaia maybe better than the jobs.active
11:43 duncanmv when running emacs in the console, typing gets slow and I get errors "error in process sentinel: text-only frame #someid". How do I debug/trace the origin?
11:44 Ztyx1 duncanmv: How this related to salt?
11:44 famaia thank you Ztyx1 , very nice solution indeed
11:44 duncanmv argh, sorry guys, wrong channel.
11:45 duncanmv I was asking for help on salt yesterday :-)
11:45 Ztyx1 famaia: Np, however I suggest you file an issue anyway. Could bring clarification to someone else in your situation.
11:45 Ztyx1 (and I guess the salt-run variant runs faster in many cases)
11:46 famaia ok
11:47 famaia will get more data (I have no cases now, because of the salt-key -d), and then put the issue.
11:47 Ztyx1 famaia: +1
11:48 Ztyx1 duncanmv: no worries ;)
11:52 babilen Can I write pillars that read part of their data from actual files on disk? The python part of the pillar is not a problem, but I am unsure how to reference the files.
11:53 babilen (nor do I want to assume that they are actually present on the master with its special ways of dealing with Git)
11:53 jslatts joined #salt
11:54 babilen I could probably place them on the master directly though in one specific location :-/
11:55 Ztyx1 Yes, that's how I would do it… You could also maybe write a custom grains module that would read the file content on minion?
11:56 berto- joined #salt
11:57 intellix joined #salt
12:00 babilen I don't want to read it on the minion
12:01 babilen I want to distribute keys from the master to minions and it is a pain that I can't just copy/work directly on actual files but have to wrap it in YAML or include it as literals in my Python codfe
12:02 babilen So I'd much rather write a pillar in python that runs open('/path/to/{}.pub'.format(grains['id']).read() (or something along those lines) than continue this horror
12:03 babilen I guess that this would necessitate a local checkout of the git repo on the master though (or the creation/change of those keys directly on the master
12:03 babilen Hmm, that might actually work
12:04 berto- joined #salt
12:05 bhosmer joined #salt
12:07 cm_ joined #salt
12:08 Ztyx1 Ah, I see. I think there's an issue about this on Github… https://github.com/saltstack/salt/issues/13510
12:08 Ztyx1 Maybe you could implement a custom pillar?
12:09 jas-_ joined #salt
12:11 babilen Ztyx1: I essentially want to write some Python code that knows that a host called foo-something1 would find its key/ssl cert/... in /some/path/to/{keys,ssl}/foo/something{.crt,.pub,...}
12:12 babilen That would allow me and my colleagues to just dump new data in those files *without* worrying at all about any of that YAML encoding shite
12:12 bhosmer_ joined #salt
12:12 babilen And it wouldn't necessitate painfully editing files in an editor if you can just generate new files and copy them to the right place.
12:15 berto- joined #salt
12:15 Ztyx1 Yeah, I hear ya. I've had the same issue. Currently SSL certs are rolled out manually until a viable solution is found.
12:16 badon joined #salt
12:17 babilen Well, I have a bunch of pillars and use content_pillar .. it is just a pain to maintain those and my colleagues hate it. They rightfully ask: I have those files here already, why can't I just use them directly? Salt's stupid!
12:17 babilen But I guess that I have to freestyle this at the moment
12:18 hobakill joined #salt
12:21 berto- joined #salt
12:22 hobakill good morning. is there a way to have salt report back on minions that don't send a ping return? for example, i have 500 minions but i'm not sure if all 500 are pinging back because i don't want to count the "True" or do a |wc -l type of hack.
12:23 goudale joined #salt
12:24 Ztyx1 hobakill: salt-run manage.down
12:24 Ztyx1 (which is a subset of `salt-run manage.status`)
12:25 Ztyx1 (documentation for the `manage` salt runner here: http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.manage.html)
12:25 hobakill Ztyx1: thanks. i'll give it a shot. trying to figure out why my test.ping is taking like 35 seconds. it's kind of insane.
12:26 Ztyx1 hobakill: Could be that the minions are simply very tired? Swapping? I've seen cases like that for minions with a lot of IO.
12:26 berto- joined #salt
12:27 babilen For some reason I found that I sometimes have to "wake" minions before they reply fast enough with a test.ping (i.e. the first test.ping takes a long time some even time out) and a subsequent one is fast.
12:27 Ztyx1 babilen: that _could_ be the result of them being swapped out. I've "felt" that same thing.
12:28 hobakill babilen: i've experienced that as well.
12:28 babilen I would have been alerted by nagios if any of those boxes started to swap :)
12:28 hobakill Ztyx1: i don't think swapping is an issue on these guys at all. i agree with babilen - i'd be alerted
12:28 babilen (let alone that angry customers would have called support and my colleagues would ask me to "do the salt thing and rescue us")
12:29 occup4nt joined #salt
12:30 babilen I'm still not sure why that is. I mean I blame 0mq, but that doesn't really explain it
12:31 Ztyx1 Haha, I recognize that "do the salt thing"…
12:31 Ztyx1 Ok then. Swap it isn't.
12:32 Ztyx1 babilen: I'd find it really weird if ZeroMQ is to blame…
12:32 berto- joined #salt
12:32 babilen I have to blame someone/something
12:32 hobakill Ztyx1: i'n not sure what to blame but it sure is a wee annoying. anywho - thanks for the salt-run manage tip
12:32 Ztyx1 babilen: Cosmic rays!
12:33 Ztyx1 (bit flips)
12:33 Ztyx1 hobakill: no worries. Good luck.
12:33 babilen So, now for that data distribution ...
12:38 Ztyx1 babilen: one secure solution with the ssl certs would be to serve them encrypted from master and serve the encryption keys using pillar. Decryption would be done using `gpg` as a state watcher. I know it's a long shot, but to me that's the only real secure solution for safe distribution of files. I've been close to implementing it.
12:39 babilen Ztyx1: http://docs.saltstack.com/en/latest/topics/releases/2014.7.0.html#gpg-renderer
12:40 babilen I am also looking forward to the 2014.7.0 release in 2014.11 :)
12:41 valentinbud joined #salt
12:42 cpowell joined #salt
12:42 babilen Hmm, I could maybe postpone implementing this and just go the encryption/decryption route
12:42 aberdine left #salt
12:43 repl1cant joined #salt
12:43 Ztyx1 babilen: that's awesome! Did not know about that. Would probably solve my issue.
12:44 babilen That is also problematic though as it still means that I leak information to minions. (i.e. "foo has data bar even though i can't read it") -- I don't think that that would comply with our information privacy policies
12:46 Ztyx1 babilen: True. Good point.
12:46 babilen I mean one thing that I like about pillars is that minions that are not targeted just don't get to see those data in the first place.
12:46 albertid joined #salt
12:46 Ztyx1 Well, wait, you were referring to my proposed solution, right? The GPG renderer would work as it could be used on distributed pillars.
12:47 babilen yeah, no I was referring to your solution
12:47 babilen s/no//
12:47 berto- joined #salt
12:47 Ztyx1 Cause the GPG renderer looks like it would work (reading http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html).
12:49 babilen That still wouldn't allow me to read those more easily. It would be nice as it means that the git checkout would be meaningless on its own (I like that security, who knows when somebody manages to leak a git checkout?), but I would still have to do that insane YAML
12:49 albertid Hi, can I filter my pillar data before calling highstate? I want to update only a certain subset of it. Lets say my pillar defines a list of subdomains A B and C, but I want to filter it so it contains only A.
12:50 babilen computer says no
12:51 JasonSwindle joined #salt
12:52 Ztyx1 babilen: yeah. I store sensitive pillars on master only. For local (Vagrant) development I have dummy pillar fallback values checked into GIT.
12:52 Ztyx1 We are not checking in any sensitive material in GIT. Period.
12:53 babilen Yeah, pillar data doesn't leave the master
12:53 elfixit1 joined #salt
12:54 Ztyx1 babilen: I'm fine with unsensitive pillar data leaving master, though. It's just passwords, API tokens and sheit I leave out of GIT.
12:54 babilen I do use a git repo on the master for pillar data though and people are asked to edit it there. Not that I have anything in place that would prevent them from cloning it to other boxes.
12:55 berto- joined #salt
12:55 babilen Ztyx1: No, I completely agree, but I simply adopted the "this is the pillar and it lives on the master" as it is much easier to explain that to people than different policies for different data
12:56 Ztyx1 babilen: true. I've had that policy issue already.
12:56 Ztyx1 albertid: Late answer: How about you just loop over your array and have an if condition ignoring B and C? Should be doable in jinja template.
12:57 duncanmv joined #salt
12:57 babilen I don't think you can exclude data in the pillar. You can hand state.highstate a pillar, but you can only exclude states IIRC
12:59 Ztyx1 yeah, true. The only way he would be able to exclude it would be using jinja logic in pillar.sls files.
13:00 hobakill i'm curious on how people manage the keys aspect of salt. if i blow away a VM, obviously the key sticks around. is there a way to automate salt-key -d process?
13:03 bhosmer joined #salt
13:03 babilen Automating that might be tricky as salt would need some method to differentiate between a minion that is simply down or not responding and one that has genuinely been removed
13:03 hobakill for sure babilen ... so people are still manually removing the keys?
13:03 babilen "salt-run manage.down removekeys=True" might be what you are looking for, but that might remove keys you might not want to remove.
13:03 hobakill babilen: interesting. ok thanks.
13:04 babilen hobakill: I virtualise my masters in vagrant too and provision them with salt so they always die with their minions
13:04 albertid Ztyx1, thx, that would work. But can I make this if condition depend on a command line argument?
13:04 Ztyx1 albertid: no, you cannot.
13:04 babilen albertid: You could hand a pillar with that data to state.highstate maybe
13:05 berto- joined #salt
13:05 babilen (not sure if that overrides the entire pillar though)
13:05 albertid_ joined #salt
13:06 albertid_ Sorry, disconnect, anything after
13:06 albertid_ <Ztyx1> albertid: no, you cannot.
13:06 albertid_ <babilen> albertid: You could hand a pillar with that data to state.highstate maybe
13:06 albertid_ ?
13:06 kermit joined #salt
13:07 babilen albertid: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.highstate -- I am referring to "pillar="{foo: 'Foo!', bar: 'Bar!'}"" and you could, maybe, use something like: "pillar="{'do_the_a': True}""
13:08 ajprog_laptop joined #salt
13:08 albertid_ babilen, thats a good idea, but will the commandline pillar be merged with my real pillar?
13:09 babilen That I don't know -- hence my "(not sure if that overrides the entire pillar though)"
13:10 babilen It probably behaves in one of the following ways: 1. Additional data, merged last, duplicate keys override earlier ones 2. This is the entire pillar that is being used.
13:10 babilen My gut feeling is 1. but I wouldn't be too surprised to see 2.
13:10 racooper joined #salt
13:11 albertid_ babilen, thx I will check
13:12 berto- joined #salt
13:12 babilen albertid_: But then: Why don't you simply write two different states that you can target independently ?
13:13 mpanetta joined #salt
13:15 albertid_ because the states are so similar and complex => would be too much redundancy
13:15 albertid_ so I made a single state that iterates over pillar data
13:16 oz_akan joined #salt
13:16 babilen Sure, I like pillar data .. but why would you want to exclude some every now and then?
13:17 albertid_ because it takes so long to update all, I'd like to update only a single item from the pillar
13:18 albertid_ its really just about performance/usability
13:19 Ahlee_ whiteinge: thanks, I saw that last night.  Will be testing today in dev on some cent5/cent6/windows hosts
13:19 duncanmv joined #salt
13:20 stevebrownlee joined #salt
13:21 dude051 joined #salt
13:21 babilen albertid_:
13:22 berto- joined #salt
13:22 babilen Might be easier with state.sls_id, but that's not yet available. You could also exclude slow state IDs
13:22 babilen You could also refactor your SLS into multiple files so that you can call only the one that you want to change
13:25 albertid_ babilen: that is true, I could try that
13:25 babilen That feels like the better approach (in particular if you expect to do this more often)
13:29 berto- joined #salt
13:33 smcquay joined #salt
13:34 smcquay joined #salt
13:35 berto- joined #salt
13:37 ramteid joined #salt
13:39 azieger joined #salt
13:40 duncanmv joined #salt
13:40 berto- joined #salt
13:45 intellix joined #salt
13:45 rawkode joined #salt
13:47 goal when I do: salt '*' state.highstate, sometimes (especially if I haven't done anything for a while), it doesn't seem to process all minions. In a test env I have just two minions and several highstates only run on one, then suddenly start running on both
13:47 goal Any idea why this may be?
13:47 toastedpenguin joined #salt
13:47 rawkode Does anybody have experience configuring the ec2 reactor that could spare some time?
13:47 goal no errors, no mention of the missing minion in the master logs (which are set to debug)
13:50 babilen goal: Are you sure that it doesn't really process all minions ? Salt will run into a timeout, but the jobs will still be completed in the background.
13:50 babilen Or do you see this behaviour only shortly after adding a new minion?
13:51 mapu joined #salt
13:51 rawkode_ joined #salt
13:53 orion__ joined #salt
13:56 berto- joined #salt
13:56 goal babilen: No timeouts mentioned in the master logs. There was nothing returned by the interactive command for that minion. I can also see different number of returned jobs in the master log file.
13:56 occupant joined #salt
13:58 babilen Could you check "salt-run jobs.list_jobs" and then "salt-run jobs.lookup_jid $JID" for the job in question to see if it returned eventually?
13:59 thayne joined #salt
14:00 jslatts joined #salt
14:00 tk75 joined #salt
14:02 rojem joined #salt
14:02 dude051 joined #salt
14:03 badon_ joined #salt
14:03 berto- joined #salt
14:03 MTecknology 1044 states that run when state.highstate executes on this one box. That makes me fell happy.
14:04 babilen I don't nearly have that many on a single box :)
14:05 kt76 joined #salt
14:09 berto- joined #salt
14:10 wendall911 joined #salt
14:10 rawkode_ Do I need to be running salt-master, salt-api and salt-cloud to use the ec2-reactor, or just the first two?
14:11 whiteinge just the first two
14:13 dude051 joined #salt
14:14 berto- joined #salt
14:14 aquinas joined #salt
14:15 rypeck joined #salt
14:15 jaimed joined #salt
14:15 alanpear_ joined #salt
14:19 Ztyx1 left #salt
14:20 berto- joined #salt
14:20 rawkode_ I'm seeing the API being called and the master attempting to fetch the keys from Amazon SNS, but then nothing seems to happen.
14:20 to_json joined #salt
14:20 ipmb joined #salt
14:21 rawkode_ Could somebody have a quick scan of my config please? (https://gist.github.com/rawkode/fee96dbe0c6f06e4e8ae)
14:21 babilen goal: So, what did you find out?
14:23 SheetiS joined #salt
14:26 berto- joined #salt
14:26 alanpearce joined #salt
14:26 kaptk2 joined #salt
14:26 jalbretsen joined #salt
14:29 Ozack joined #salt
14:30 ajprog_laptop joined #salt
14:30 ajw0100 joined #salt
14:31 srage joined #salt
14:31 berto- joined #salt
14:32 astro_ joined #salt
14:32 astro_ i m new to salt
14:32 astro_ and configured salt master and minions
14:33 astro_ but i want salt to display custom output from salt
14:33 astro_ can anyone help me out
14:35 TyrfingMjolnir joined #salt
14:36 manfred can you elaborate on what you mean by custom output?
14:37 srage_ joined #salt
14:37 berto- joined #salt
14:38 ericof joined #salt
14:40 astro_ yes for sure , suppose i am executing a command on salt master like ---- salt '*' cmd.run uptime
14:41 rallytime joined #salt
14:41 astro_ then it shows output as  minion1: 20:05:09 up  6:02,  4 users,  load average: 0.47, 0.52, 0.55
14:41 manfred ahh
14:42 manfred you want a custom outputter
14:42 astro_ yes
14:42 manfred http://docs.saltstack.com/en/latest/ref/output/all/index.html
14:43 berto- joined #salt
14:43 manfred those are the ones salt comes with, https://github.com/saltstack/salt/tree/develop/salt/output
14:43 astro_ thanks , and may i ask one more thing
14:43 manfred write your own, then you can reference it with salt --out <whatever> '*' cmd.run uptime
14:43 manfred shoot
14:44 astro_ if i want to run the above salt command after every 2 second till it is interrupted by user
14:44 astro_ that is output is refreshed after every 2 seconds
14:44 manfred watch "salt '*' cmd.run uptime"
14:45 astro_ yeah thanks was about to say can we use watch :D
14:45 astro_ thanks for the help will be back later on if i stick at some place
14:46 viq Any idea how salt will react if it had comments in non-ascii? say a state "somegrain: grains.present: - value: somevalue #non-ascii explanation of value" ?
14:46 conan_the_destro joined #salt
14:46 rawkode Anybody able to look at my config please?
14:47 babilen viq: Given that it is Python 2 I wouldn't be too sure. But then every software should handle unicode these days .. TIAS?!
14:47 viq TIAS?
14:47 manfred viq: it should be fine
14:47 viq manfred: thank you
14:47 babilen viq: try it and see
14:48 felskrone joined #salt
14:48 conan_the_destro joined #salt
14:48 brandon joined #salt
14:48 berto- joined #salt
14:52 kballou joined #salt
14:53 icebourg joined #salt
14:54 berto- joined #salt
14:54 smcquay joined #salt
14:54 TyrfingMjolnir joined #salt
14:55 Kakwa joined #salt
14:55 smcquay joined #salt
14:59 colonD joined #salt
14:59 UtahDave joined #salt
14:59 scbunn joined #salt
14:59 berto- joined #salt
15:02 cpowell joined #salt
15:02 thayne joined #salt
15:03 smcquay joined #salt
15:03 rawkode_ joined #salt
15:03 ramishra joined #salt
15:05 berto- joined #salt
15:08 Whissi Any idea how I can debug a failing service.restart call?
15:08 dccc joined #salt
15:08 TyrfingMjolnir joined #salt
15:09 viq Whissi: if it was me I'd probably ssh to the machine, tail logs, and run 'salt-call -l debug service.restart something'
15:10 funzo joined #salt
15:10 Whissi viq: Doesn't show me the important stuff...
15:10 Whissi [INFO    ] Executing command '/etc/init.d/php-fpm restart' in directory '/root'
15:10 Whissi Is the last line I see
15:11 Whissi then it will hang
15:11 Whissi Calling "/etc/init.d/php-fpm restart" from shell works fine
15:12 Whissi (I am currently trying to find the reason for https://github.com/saltstack/salt/issues/14957)
15:12 viq Whissi: try 'ssh root@yourhost /etc/init.d/php-fpm restart' and see if it will return
15:12 Whissi AS said, it will return
15:12 viq No, not ssh and run the command, run the command as the ssh command
15:13 viq Things behave differently if they have a terminal and when they don't
15:13 Whissi I see... let me test. Good idea
15:13 manfred viq: if he is running it through zmq, it should run like a terminal or close to it using the vt library
15:13 intellix joined #salt
15:14 manfred viq: https://github.com/saltstack/salt/blob/develop/salt/utils/vt.py#L86
15:14 manfred using that
15:14 viq manfred: maybe, but I've seen scripts that would seem to exit from shell, but not do so when they were ran through other means
15:14 manfred actaully... i don't know if that is used everywhere...
15:14 manfred viq: true
15:14 Whissi viq: It is returning...:
15:14 Whissi tput: No value for $TERM and no -T specified
15:14 Whissi tput: No value for $TERM and no -T specified
15:14 Whissi * Stopping PHP FastCGI Process Manager ... [ ok ]
15:14 Whissi * Starting PHP FastCGI Process Manager ... [ ok ]
15:15 viq Whissi: and you get your command prompt after that?
15:15 Whissi yup
15:15 viq hm
15:15 manfred Whissi: what distro?
15:15 Whissi Gentoo
15:15 jslatts joined #salt
15:16 manfred Whissi: as long as the retcode is 0, it should return correctly true https://github.com/saltstack/salt/blob/develop/salt/modules/gentoo_service.py#L145
15:16 Whissi manfred: Other services works fine... just noticed this today with php-fpm for the first time
15:16 viq anyway, back to trying to figure out how to make jq show which hosts have a certain state assigned in my top.sls converted to json
15:16 pmcg joined #salt
15:17 berto- joined #salt
15:17 manfred Whissi: yeah, can you run it on the commandline and check 'echo $?' afterwards to make sure it is returning a 0?
15:17 Whissi manfred: And see the bug I linked...  the defunct'ed process when running through salt
15:17 Whissi manfred: I already checked that... returns 0
15:18 manfred then i got nothing. If it is hanging, it probably falls with this bug too https://github.com/saltstack/salt/issues/6691
15:18 sectionme joined #salt
15:18 manfred and it is backgrounding the command, and then not exiting correctly
15:19 manfred that is my guess
15:19 econnell joined #salt
15:19 Whissi But I am not calling php directly... I am calling a init script...
15:19 manfred right
15:19 manfred and the initscript is backgrounding somehow
15:19 Whissi I am wondering if I could debug more into service.restart to check the return value salt sees
15:20 manfred uhhh
15:20 manfred yes
15:20 manfred one second
15:20 manfred you will want to import log
15:20 manfred import logging
15:21 manfred log = logging.getLogger(__name__)
15:21 manfred somewhere near the top
15:21 manfred then instead of returning, log.debug the command
15:21 manfred and run with salt-call service.restart php-fpm ... on the minion
15:22 Whissi Where should I put the import...?
15:23 manfred in salt/modules/gentoo_service.py
15:23 berto- joined #salt
15:23 manfred just somewhere at the top
15:23 manfred and put the log.debug() in the def restart() function
15:28 Whissi Mhrf...  not enough.
15:28 Whissi Seems like I need to get into cmd.recode ...
15:28 Whissi +t
15:32 berto- joined #salt
15:34 ajprog_laptop joined #salt
15:36 mmattioli joined #salt
15:37 TyrfingMjolnir joined #salt
15:40 dvestal joined #salt
15:42 Whissi What's the best way to call pdb to debug cmdmod._run()? Never did this before...
15:43 manfred no idea
15:43 manfred i would just use log.debug to print out different variables
15:43 manfred if you check __virtualname__ in cmdmod.py, you will see that module is actually named cmd
15:44 manfred and _run is used inside all of them, so you can just run cmd.run_all '/etc/init.d/php-fpm restart'
15:44 manfred if it hangs i think your problem matches https://github.com/saltstack/salt/issues/6691
15:45 berto- joined #salt
15:45 napper joined #salt
15:45 P0bailey joined #salt
15:46 Whissi "salt-call -l debug cmd.run_all '/etc/init.d/php-fpm restart'" hangs, yes
15:46 zz_Cidan joined #salt
15:46 mechanicalduck joined #salt
15:47 manfred then i think you are running into the issue i just pasted where it is backgrounding the task and not actually finishing running the command
15:47 manfred it is a problem inside how the initscript is run
15:47 manfred can you give me
15:47 manfred curl -F 'f:1=<-' ix.io < /etc/init.d/php-fpm
15:48 tligda joined #salt
15:48 Shish I had the same issue with couchdb I think; got fixed upstream so salt guys closed the issue v.v --> https://github.com/saltstack/salt/issues/11228
15:50 abe_music joined #salt
15:51 berto- joined #salt
15:52 felskrone joined #salt
15:53 ml_1 joined #salt
15:55 mechanicalduck joined #salt
15:56 viq Is there a way to have salt tell me which hosts a state would be applied to?
15:56 thayne joined #salt
16:00 berto- joined #salt
16:00 martoss joined #salt
16:02 ntropy viq: you can run highstate with test=True, but its not exactly what you want
16:03 troyready joined #salt
16:04 rawkode joined #salt
16:05 m1crofarmer joined #salt
16:08 econnell i can't seem to find an example or documentation of the autosign_file syntax anywhere.  does anyone have an example?
16:08 berto- joined #salt
16:09 TyrfingMjolnir joined #salt
16:12 viq econnell: # If the autosign_file is specified, incoming keys specified in the
16:12 viq # autosign_file will be automatically accepted. This is insecure.  Regular
16:12 viq # expressions as well as globing lines are supported.
16:12 viq #autosign_file: /etc/salt/autosign.conf
16:13 viq http://docs.saltstack.com/en/latest/ref/configuration/examples.html
16:13 viq http://docs.saltstack.com/en/latest/ref/configuration/master.html#std:conf_master-autosign_file
16:14 rawkode_ joined #salt
16:16 TyrfingMjolnir joined #salt
16:16 KyleG joined #salt
16:16 KyleG joined #salt
16:17 berto- joined #salt
16:18 BobWilliams_ joined #salt
16:18 zartoosh__ joined #salt
16:19 sectionme joined #salt
16:20 BobWilliams_ Hey all. From a salt state, how do I search for nodes and insert a grain item into my sls file?
16:20 BobWilliams_ For example, search for the ip address of a server with the mysql 'role' grain, then put that in my sls
16:20 SheetiS It sounds like you want the salt mine
16:21 SheetiS http://docs.saltstack.com/en/latest/topics/mine/
16:21 BobWilliams_ riight
16:21 * BobWilliams_ goes off to rea
16:21 BobWilliams_ d
16:21 BobWilliams_ thanks!
16:23 TyrfingMjolnir joined #salt
16:23 KennethWilke joined #salt
16:25 berto- joined #salt
16:29 dramagods joined #salt
16:30 rawkode_ Can't get the ec2 reactor to work :( Gets to the runner.create command and nothing happens
16:32 aparsons joined #salt
16:32 denstark joined #salt
16:32 badon_ joined #salt
16:32 jab416171 joined #salt
16:32 viq OK, I somewhat figured out a very hackish way to figure out what machines would have a state assigned to them. I start by converting top.sls from yaml to json, then go to work on it with jq
16:33 goal joined #salt
16:33 TaiSHi joined #salt
16:33 nkuttler joined #salt
16:33 hobakill in a top.sls file is it possible to have multiple matching grains?
16:33 hobakill eg: 'host:blah*' and 'os:blah' ?
16:34 viq hobakill: complex matching, yes
16:34 viq or was it compound?
16:34 viq compound, http://docs.saltstack.com/en/latest/topics/targeting/compound.html#targeting-compound
16:34 hobakill looks like compound
16:35 hobakill thanks viq
16:36 aw110f joined #salt
16:36 berto- joined #salt
16:37 schimmy joined #salt
16:38 SheetiS joined #salt
16:38 kermit joined #salt
16:39 SheetiS hobakill: did anyone answer your question?  I think I got disconnected shortly after you asked it.
16:39 hobakill yep. compound fuN!
16:39 hobakill thanks SheetiS
16:39 valentinbud joined #salt
16:39 SheetiS glad someone helped you out :)
16:40 BobWilliams_ That salt mine example - is that going to work?
16:40 dvestal joined #salt
16:40 BobWilliams_ I tested it (except putting the for loop directly in a state file) and it doesn't seem to be)
16:41 schimmy1 joined #salt
16:41 davet joined #salt
16:41 SheetiS you minion configs all have the mine refresh interval and the mine_functions either exist in the pillar or the minion config?
16:42 pass_by_value joined #salt
16:42 berto- joined #salt
16:43 BobWilliams_ yup
16:43 BobWilliams_ mine_functions is in a pillar that's already being used for other things
16:44 BobWilliams_ and I can see it in pillar.items
16:44 slava-ort joined #salt
16:44 TyrfingMjolnir joined #salt
16:45 BobWilliams_ all the refresh intervals are set to 60, but surely it would've run once the first time it got the config?
16:46 BobWilliams_ oh damnit, I restarted the salt-minions and tnow it's working
16:46 BobWilliams_ sorry guys
16:46 martoss joined #salt
16:46 econnell viq: right… i get that part, but in the actual autosign.conf file, is it just one entry per line?
16:48 viq econnell: I believe so
16:49 SheetiS BobWilliams_: glad you got it working :)
16:49 dvestal_ joined #salt
16:51 rawkode_ The access key / secret I provide for ec2-reactor, which policies / permissions will it require?
16:51 berto- joined #salt
16:53 aparsons_ joined #salt
16:54 tcotav hey all, how do I completely reinitialize a salt-minion (I'm creating vagrantbox w/masterless salt-minion installed)
16:54 tcotav I thought it was just this: https://gist.github.com/tcotav/a42d6b530e8bfda9f5cc
16:54 tcotav but I think I missed something?
16:55 aparsons joined #salt
16:56 linjan joined #salt
16:56 aparsons_ joined #salt
16:57 aparsons joined #salt
16:58 giantlock joined #salt
16:59 berto- joined #salt
16:59 ajolo joined #salt
17:00 forrest joined #salt
17:02 melinath joined #salt
17:03 chrisjones joined #salt
17:04 berto- joined #salt
17:06 a1j joined #salt
17:07 Ryan_Lane joined #salt
17:10 berto- joined #salt
17:11 rihannon joined #salt
17:12 ajolo_ joined #salt
17:12 thayne joined #salt
17:13 logix812 joined #salt
17:14 jhulten joined #salt
17:15 rihannon I have a file.managed statement which sets a file to mode 644.  The status prints in blue (changed) on every run, but the mode bits are already correct, so why is it registering as a "change" instead of "clean"?
17:16 berto- joined #salt
17:16 diegows joined #salt
17:17 kelseelynn joined #salt
17:19 sectionme joined #salt
17:20 beneggett joined #salt
17:21 robawt rihannon: what version of salt?
17:21 berto- joined #salt
17:24 metaphore joined #salt
17:24 rihannon 2014.1.0
17:25 scbunn joined #salt
17:25 forrest rihannon, did you already run that through with -l debug to see if it shows any additional details?
17:27 bezeee joined #salt
17:27 berto- joined #salt
17:28 Linuturk how would I gather ip addresses about other hosts?
17:28 Linuturk and put them in a config file?
17:28 metaphore joined #salt
17:28 rihannon forrest: I had not, but doing so does not provide any useful info, even with -l all.
17:33 lude does anyone use salt with gentoo, and deal with pkg.installed use flag changes
17:33 berto- joined #salt
17:33 lude some of my roles, like mysql for example, adds the mysql use flag to other packages
17:33 lude i'd like to trigger a rebuild of those packages if the use flags change
17:34 bhosmer_ joined #salt
17:34 taterbase joined #salt
17:35 gothix joined #salt
17:35 gothix joined #salt
17:38 berto- joined #salt
17:39 rihannon Ah ha!  The plot thickens! looks like the mode on the file changes to 755 and is then changed back!
17:40 aparsons joined #salt
17:40 rihannon The source file is also 644, so that's not it.
17:40 Gareth morning morning
17:40 robawt question yawls: is there a time there would ever be more than one salt-minion process?
17:41 napper joined #salt
17:41 robawt curious why the init scripts check for duplicates, but the binary itself doesn't
17:41 UtahDave Gareth: morning!   Looks like I'll be down your way next week.
17:41 UtahDave robawt: Yeah, each command you send will spawn a minion process.
17:41 aparsons joined #salt
17:42 skullone rihannon: do you have that file managed twice by chance?
17:42 robawt UtahDave: you're awesome ty
17:42 UtahDave you're welcome!
17:43 robawt UtahDave: any advice on verifying salt is always running?
17:44 berto- joined #salt
17:44 aparsons joined #salt
17:44 martoss joined #salt
17:45 UtahDave on the system level or on the master level?
17:45 robawt system level
17:45 robawt many minions
17:45 beneggett i set up a monit script for that
17:46 beneggett but using monit, for other services too, so it made a lot of sense
17:46 robawt want to make sure they all are happily humming away, but stuff happens.  my knee-jerk reaction is make a systemd/upstart/possibly supervisord script but i'd like to hear the gospel
17:46 UtahDave Yeah, probably something like that.  I don't know if we have anything salt specific for that.  Maybe someone else has something they've implemented?
17:47 UtahDave back in a bit.
17:47 beneggett robawt:  salt-minion already lives in /etc/init.d upon install
17:47 robawt ok cool, just didn't want to duplicate work
17:47 beneggett robawt:  so it get's pretty straightforward from there
17:48 robawt beneggett: yes it does, but init scripts arn't smart enough to keep things running when they mysteriously die.  just didn't want to duplicate work if there's other ways
17:48 beneggett yep, hence my initial monit script comment :)
17:48 Eugene systemd is the way of the future, etc.
17:49 dvestal joined #salt
17:49 beneggett you could use monit, god, blue-pill, whatever your process manager of choice is; but as far as I know there is nothing salt specific
17:49 ksalman i am trying to install salt version 2014.1.1 on debian using the bootstrap script. It complains that "warning: Remote branch v2014.1.1 not found in upstream origin, using HEAD instead"
17:49 ksalman and installs the latest
17:49 rihannon skullone: No, it's only there once, but I did some looking around, and found that I had a file.directory: - dir_mode: 755  with recurse, but only for user and group.  Commenting out dir_mode solved the mystery, but it seems to me that dir_mode should only affect directories, and that mode shouldn't be applied recursively unless specified.
17:51 aparsons joined #salt
17:51 Gareth UtahDave: oh yeah?
17:52 ml_1 joined #salt
17:52 ksalman any idea why?
17:53 rihannon I guess I'll replace my directory recurse with a cmd.run with chmod and chown since I can get more predictable behavior.
17:53 DrQuest joined #salt
17:54 robawt rihannon: i've run into the same thing
17:54 robawt and supposedly file_mode & mode are aliases or linked or some magic but I haven't found that to be true in some states
17:58 cpowell joined #salt
17:59 ckao joined #salt
17:59 berto- joined #salt
17:59 aparsons joined #salt
18:05 poogles joined #salt
18:07 berto- joined #salt
18:07 lionel joined #salt
18:07 aparsons joined #salt
18:08 badon_ joined #salt
18:11 scoates joined #salt
18:11 dvestal joined #salt
18:17 badon_ joined #salt
18:18 berto- joined #salt
18:20 sectionme joined #salt
18:22 DrQuest left #salt
18:24 berto- joined #salt
18:25 forrest joined #salt
18:26 rglen joined #salt
18:29 berto- joined #salt
18:30 duncanmv joined #salt
18:30 capitalfellow joined #salt
18:31 chrisjones joined #salt
18:32 scoates_ joined #salt
18:32 hobakilllll joined #salt
18:33 econnell1 joined #salt
18:33 kelseelynn1 joined #salt
18:34 miqui_ joined #salt
18:35 pmcg_ joined #salt
18:35 arochett1 joined #salt
18:35 KaaK_ joined #salt
18:35 berto- joined #salt
18:36 badon_ joined #salt
18:36 ShibMcNe_ joined #salt
18:36 koyd_ joined #salt
18:37 lwh_ joined #salt
18:37 erjohnso_ joined #salt
18:38 rap424 joined #salt
18:38 nahamu_ joined #salt
18:39 aparsons joined #salt
18:40 ericof_ joined #salt
18:40 nocturn00 joined #salt
18:40 UForgotten_ joined #salt
18:40 atoponce joined #salt
18:41 berto- joined #salt
18:41 canci_ joined #salt
18:41 nocturn joined #salt
18:42 Blacklite_ joined #salt
18:42 koyd_ left #salt
18:42 trevorj joined #salt
18:43 Whissi manfred: Sorry, was afk -- Here's the runscript: http://ix.io/dSQ
18:44 Whissi I'll now compare it to a previous version because restarting was not a problem in the past.
18:45 tligda joined #salt
18:45 joehh joined #salt
18:46 mmattioli joined #salt
18:46 berto- joined #salt
18:47 urtokk joined #salt
18:47 Damoun joined #salt
18:47 workingcats joined #salt
18:48 penguin_dan joined #salt
18:48 ajolo joined #salt
18:48 chutzpah joined #salt
18:50 unknown007 joined #salt
18:50 kermit joined #salt
18:52 MatthewsFace joined #salt
18:52 berto- joined #salt
18:57 valentinbud joined #salt
18:58 Whissi manfred: I downgraded back from 5.5.15 until 5.5.10... they all have the same runscript. I know that I restarted php-fpm using salt last month.. so I definetly tested the version I used...
18:58 Whissi (but because the runscript never changed...)
18:58 Whissi It must be something else.
18:58 Whissi I'll now downgrade Python 2.7
19:00 bezeee joined #salt
19:00 jhulten joined #salt
19:03 BogdanR_ joined #salt
19:03 BogdanR_ Hello
19:03 BogdanR_ Anyone has experience with salt-cloud on AWS?
19:04 berto- joined #salt
19:04 UtahDave yep!
19:04 BogdanR_ I have this issue: http://hastebin.com/rejunubuya.vbs
19:06 BogdanR_ My profile looks like this: http://hastebin.com/mexuvatisu.sm
19:06 UtahDave BogdanR_: can you pastebin your sanitized provider config and your profile config that you're using?
19:06 aparsons joined #salt
19:06 BogdanR_ In a moment I will cleanup the provider
19:06 smcquay joined #salt
19:07 Gareth UtahDave: where abouts in the area will you be?
19:08 Whissi UtahDave: Are there any docs regarding debugging a module, cmd for example, using pdb? Don't know where to start...
19:08 UtahDave Gareth: Right by the burbank airport.
19:08 BogdanR_ UtahDave: And there is the provider: http://hastebin.com/gikimoradu.sm
19:09 berto- joined #salt
19:10 UtahDave BogdanR_: I haven't run into that issue before, but I also haven't had a need to specify the network interfaces.  It looks like from the error message that we need to split up the nic and security group into different api calls.
19:11 UtahDave BogdanR_: would you mind opening an issue for this?  And include all the info and pastes you did here?
19:11 BogdanR_ Sure. I will
19:11 BogdanR_ If I don't specify the network interfaces it tells me that it can't launch my instance outside VPC
19:12 UtahDave BogdanR_: Hm. Yeah, i'm not sure on that one.
19:12 kelseelynn1 left #salt
19:13 Whissi Never mind, "import pdb; pdb.set_trace()" will do the trick :)
19:14 UtahDave Whissi: sorry. glad you figured it out.  I know cachedout has really loved pudb for debugging, but I've only just played around with it.
19:15 berto- joined #salt
19:15 kelseelynn joined #salt
19:16 kelseelynn left #salt
19:16 aparsons joined #salt
19:17 peters-tx joined #salt
19:17 stevednd how does one use gitfs to handle runners and modules? I have /srv with the dirs modules,pillars,runners,salt. salt/ is of course the states, and gitfs is no problem, there, same with pillar/. What about runners/ and modules/ though?
19:18 mpanetta UtahDave: Quick Q, do you know of any issues with mine in 2014.1.5?  It isn't working (or works intermittently) for me...
19:18 mpanetta I can manually run it on the command line, but the formula can't find the data.
19:19 duncanmv joined #salt
19:20 BogdanR_ UtahDave: I added the issue here: https://github.com/saltstack/salt/issues/14963
19:20 BogdanR_ I suppose you guys add the labels
19:21 berto- joined #salt
19:21 beneggett joined #salt
19:21 sectionme joined #salt
19:22 duncanmv joined #salt
19:22 UtahDave BogdanR_: yeah, someone will triage it soon and label it.
19:23 UtahDave mpanetta: I'm not sure about 2014.1.5 and the mine specifically. I believe I do remember seeing a few fixes go in, but I don't know exactly.
19:23 mpanetta UtahDave: Hmm, I'm poking around in issues right now to see.
19:26 dvestal_ joined #salt
19:28 skullone how do people structure their pillar and state directories for environments?
19:29 Gareth UtahDave: Nice.  Not far from here at all.  How long as you here for?
19:30 lionel joined #salt
19:30 UtahDave Gareth: For now just next week, then a to-be-determined week in September. But we're likely to be heading down there quite frequently working with an enterprise client
19:32 berto- joined #salt
19:34 mpanetta UtahDave: Do you happen to know if the mine functions print any debugging info?  Or is all that cached on the master?
19:34 bensons_ mr salt!
19:35 valentinbud joined #salt
19:35 UtahDave mpanetta: I'm guessing your best bet would be to run the salt-master in debug mode in a terminal and see what it outputs as you run the mine commands in debug mode in another terminal
19:35 mpanetta Here is the actall error I am getting: https://gist.github.com/anonymous/f7ac2dad2454e8a018f1 However if I run 'salt -v jens1a-cco-iad mine.get 'jenkins_type:master' grains.items grain' The jenkins_pub_key is definitely in the returned data...
19:35 Gareth UtahDave: Let me know schedule and maybe we can meet up for lunch or dinner while you're out here.
19:36 mpanetta UtahDave: Ok let me try that
19:36 UtahDave mpanetta: Oh, you might not be running into a mine issue.  It looks like your jinja might be malformed
19:37 mpanetta UtahDave: Oh?
19:37 mpanetta It has worked in the past...
19:37 UtahDave Gareth: Yeah, that would be great to meet up. I'll ping you when I have a better idea of my schedule.
19:37 mpanetta UtahDave: Is there a better way of doing that, rather then running it in a loop?
19:38 berto- joined #salt
19:38 UtahDave mpanetta: so you're getting a stacktrace because you're accessing 'jenkins_pub_key' and it's not there.  I'd print out that dictionary and see if it looks like you think it should.
19:38 badon joined #salt
19:38 mpanetta UtahDave: How do I print it?
19:39 mpanetta I've been running the mine.get command manually, is that what you mean?
19:40 mpanetta I wish I could print from the state heh
19:40 UtahDave you can, just put the value in instead of the other text.
19:40 UtahDave mpanetta: what's the sanitized output of running it from the command line look like?
19:41 rihannon left #salt
19:42 melinath joined #salt
19:43 mpanetta It is empty all the sudden...
19:43 Ryan_Lane joined #salt
19:43 mmattioli joined #salt
19:43 P0bailey joined #salt
19:43 P0bailey joined #salt
19:44 mpanetta UtahDave: I get this in debug output: https://gist.github.com/anonymous/b9aebd1682f3ce5d3478
19:44 mpanetta Which is odd, because before I put the master in debug mode, I was getting data back from mine.get when I ran it manually...
19:45 ml_1 joined #salt
19:45 UtahDave mpanetta: does expr_form need to be 'grain' or 'grains'?  I'm don't recall off the top of my head
19:46 mpanetta UtahDave: grain according to the docs
19:46 UtahDave ok.
19:46 Nazca joined #salt
19:47 mpanetta If I do a grains.items on the minion that is supposed to have the jenkins_pub_key and jenkins_type, they are populated.
19:47 mpanetta Sanitized output in a sec.
19:47 berto- joined #salt
19:49 Cyphus joined #salt
19:50 mpanetta https://gist.github.com/anonymous/db32ae98609ace522ba2 <-- here ya go UtahDave
19:50 mpanetta I have no idea why it can't match that grain, it is obviously set...
19:53 mpanetta Ok I got the manual mine.get to work, I accidentally typed grains instead of grain...  Want that output?
19:53 rojem joined #salt
19:53 mpanetta It pretty much looks the same as grains.items (as one would expect)
19:54 mpanetta UtahDave: ^
19:55 UtahDave mpanetta: can you paste the cli command you used to get this: https://gist.github.com/anonymous/b9aebd1682f3ce5d3478
19:55 berto- joined #salt
19:56 mpanetta UtahDave: It was this: salt -v jens1a-cco-iad mine.get 'jenkins_type:master' grains.items grains
19:56 mpanetta I mistyped grains
19:56 mpanetta it should be grain
19:56 mpanetta I don't get that error when I run the command correctly (oops!)
19:58 UtahDave mpanetta: Try running that from the minion      salt-call mine.get 'jenkins_typ:master' grains.items grain
19:58 mpanetta I get the expected output
19:59 mpanetta Hmm
20:00 mpanetta The data looks wrong somehow though...
20:00 mpanetta Let me sanitize and paste
20:00 Nazca__ joined #salt
20:00 UtahDave k
20:00 mpanetta For some reason I see the jenkins_type key in twice...
20:00 rojem joined #salt
20:01 berto- joined #salt
20:01 mpanetta Weird, it looks like the data is in there twice, but it has missing keys the second time...
20:02 UtahDave Yeah, in https://gist.github.com/anonymous/f7ac2dad2454e8a018f1  I wonder what the "value" var looks like inside that loop
20:02 stevednd I'm trying to setup gitfs. What directory should the repos be cloned to? I can't find them in /srv which is where I indicated the mountpoint to be, and the log from salt-master -l debug doesn't seem to indicate any problems
20:04 aparsons joined #salt
20:04 beneggett joined #salt
20:05 gothix does anyone know how to install packages then remove some of them which are pulled as dependencies - I can do a yum groupiisntall then a yum remove but if i process it in states it will not remove the packeages
20:05 mpanetta https://gist.github.com/anonymous/e213c933cc89fe87d9c3 <-- It looks like the data is duplicated twice, the custom grains jenkins_pub_key and jenkins_priv_key are in the first version, but not the second.
20:05 mpanetta UtahDave: ^
20:05 mpanetta The grains were added using grains.set
20:06 SheetiS It looks to me like that is returning grains from 2 minions
20:06 kelseelynn joined #salt
20:07 UtahDave yeah, that's correct
20:07 SheetiS jenm1a-cco-iad: and jenm1a-cct-iad:
20:08 UtahDave stevednd: what version of Salt are you on?
20:08 SheetiS so the first host has the grains set, but not the second.
20:08 stevednd 2014.1.7
20:09 stevednd dammit, that's 2014.7.0 isn't it
20:09 UtahDave mpanetta: SheetiS is correct.
20:09 stevednd I really irritates me every time that the main docs that you get taken to track develop, and not the current release version
20:09 UtahDave stevednd: is that feature in 2014.1.7?
20:09 stevednd I think it comes around in 2014.7
20:10 berto- joined #salt
20:10 UtahDave stevednd: Yeah, me, too.  We're working on getting the docs to refer to the current release version
20:10 UtahDave shouldn't be too much longer.
20:12 martoss joined #salt
20:15 Striki left #salt
20:16 stevednd what's required to upgrade salt master and minions using system packages to track develop?
20:16 dvestal joined #salt
20:17 jhulten joined #salt
20:17 manfred you need to package them?
20:17 berto- joined #salt
20:19 cpowell Has anyone used the --output=yaml? It appears that the python yaml scanner does not like the output
20:20 dude051 joined #salt
20:21 KaaK_ how can I pass through pillar data when using the even reactor?
20:21 KaaK_ event*
20:21 KaaK_ frustratingly, the docs say it is possible --even a good idea-- then have no examples of it
20:22 sectionme joined #salt
20:22 ipmb_ joined #salt
20:23 berto- joined #salt
20:23 SheetiS KaaK_: I had to use a cmd.run to 'salt <target> state.sls <state> kwarg=<value>' or the like to make it work
20:24 SheetiS and force that to run on the master inside the reactor.
20:24 stevednd manfred: I need to package versions from develop myself? Isn't there a way to  switch salt over to a bootstrapped clone from develop or something?
20:24 manfred oh
20:24 SheetiS It's _really_ a bit of a mess without being able to pass the pillar per the docs.
20:24 manfred i mean... i don't know a way of switching over from it
20:26 JasonSwindle joined #salt
20:26 UtahDave stevednd: The bootstrap script will let you pick a git tag, branch or hash to install from
20:27 JasonSwindle yep, supper handy
20:27 JasonSwindle super *
20:27 UtahDave KaaK_: can you pastebin what you've tried? as well as the url you're talking about in the docs?
20:27 stevednd UtahDave: so just cmd.run the bootstrap script with develop, then uninstall the system packages?
20:27 capitalfellow Has anyone used the the tomcat formula? Since it depends on java I'm wondering whether to use either of the java formula that seem to have their own manual steps or write my own state
20:27 aparsons joined #salt
20:28 aquinas joined #salt
20:29 berto- joined #salt
20:29 napper joined #salt
20:30 UtahDave stevednd: I haven't tried doing an upgrade like that. I would test on a test vm first.
20:31 scbunn_ joined #salt
20:34 berto- joined #salt
20:39 aparsons joined #salt
20:39 rojem joined #salt
20:39 dude051 joined #salt
20:41 rap424 joined #salt
20:42 rojem joined #salt
20:42 bhosmer_ joined #salt
20:45 berto- joined #salt
20:45 mpanetta SheetiS: Oh crap, how did I mange to overlook that....
20:47 aparsons joined #salt
20:47 SheetiS mpanetta: because it spammed like 3 pages of junk into your terminal :).  I do it all the time.  I'd have probably missed that it didn't have keys on the second one because I have a habit of writing conditionals around everything. (e.g. {% if jenkins_pub_key in value %})
20:48 SheetiS so that it would have passively ignored the second one hehe.
20:48 mpanetta Ah!
20:48 mpanetta I think the 2 boxes are in different environments, I should add an AND clause to that match
20:48 mpanetta I think you can do that with mine.get...
20:49 mpanetta yep, sweet
20:49 SheetiS I think you could use a compound match
20:49 thayne joined #salt
20:50 SheetiS yeah both grain_pcre and compound work for expr_form in mine.get
20:50 mpanetta Ok cool
20:51 mpanetta Let me see if I can get this to work, heh
20:51 naquad left #salt
20:51 SheetiS Good luck!
20:52 mpanetta Thanks SheetiS :)
20:52 oz_akan joined #salt
20:52 berto- joined #salt
20:53 mpanetta SheetiS: Success!
20:54 aparsons joined #salt
20:54 mpanetta UtahDave: Thanks for the help as well :)
20:54 UtahDave you're welcome! I'm glad you and SheetiS were able to figure it out.
20:54 SheetiS mpanetta: Congrats.
20:55 mpanetta Well, I think.  It looks like it is skipping that section completely now :P
20:55 mpanetta With a copound match do I need to put G@ in frontof grains?
20:56 UtahDave yes
20:56 SheetiS mpanetta: yes
20:56 bhosmer joined #salt
20:58 mpanetta Yep, thatfixed it
20:58 mpanetta Thanks guys!
20:58 \ask joined #salt
20:59 allanliu55 joined #salt
21:00 garphy joined #salt
21:01 Ozack2 joined #salt
21:01 rlarkin there's something missing in the salt-cloud docs; in the examples there's not a header "/etc/salt/cloud.profiles.d" above the example files
21:02 rlarkin it's not clear how a provider and a profile differ.
21:02 forrest rlarkin, good catch, can you either submit a PR to fix it, or open an issue for that?
21:03 rlarkin ok
21:04 berto- joined #salt
21:04 forrest ugh the postgres state really annoys me, it can't create the user because it already exists according to the logs, but then can't create the database because the user doesn't exist!
21:04 forrest sigh
21:07 badon joined #salt
21:07 scbunn joined #salt
21:08 napper joined #salt
21:09 chrisjones joined #salt
21:09 berto- joined #salt
21:10 kt766 joined #salt
21:10 CheKoLyN joined #salt
21:10 robawt forrest++
21:10 robawt also
21:10 * robawt highfives forrest
21:10 forrest lol
21:11 kwmiebach__ joined #salt
21:11 bhosmer_ joined #salt
21:11 mechanicalduck_ joined #salt
21:12 pmcg joined #salt
21:13 msciciel joined #salt
21:13 beneggett joined #salt
21:13 Cyphus joined #salt
21:13 bencc joined #salt
21:13 jalaziz joined #salt
21:13 badon_ joined #salt
21:13 Alan_S joined #salt
21:13 Jarus joined #salt
21:14 goki joined #salt
21:14 arochette joined #salt
21:14 munhitsu_ joined #salt
21:14 scooby2 joined #salt
21:14 alekibango joined #salt
21:14 jgelens joined #salt
21:14 cb joined #salt
21:15 berto- joined #salt
21:17 kermit joined #salt
21:18 TyrfingMjolnir joined #salt
21:20 capitalfellow how can I verify formula are found when using gitfs_remotes ?
21:21 berto- joined #salt
21:21 forrest capitalfellow, should be ached.
21:21 forrest *cacehd
21:22 TyrfingMjolnir_ joined #salt
21:22 sectionme joined #salt
21:23 capitalfellow @forrest what's the cache path?
21:23 forrest /var/cache/salt
21:24 athe joined #salt
21:24 forrest you should see a gitfs dir that has a bunch of hashes
21:26 orion_ joined #salt
21:26 berto- joined #salt
21:29 capitalfellow forrest found the dir, doesn't have the formula I'm trying to reference in gitfs_remotes
21:30 forrest it doesn't have the commit hash?
21:30 forrest capitalfellow, so you forked the formula first right?
21:30 CheKoLyN joined #salt
21:30 forrest and then dropped in the gitfs URL, then restarted the service?
21:31 capitalfellow after following the osx walkthrough and had it running, I ran pip install gitpython
21:31 forrest capitalfellow, but I mean you added the URL to the master config right?
21:31 forrest and then restarted the service?
21:32 capitalfellow in /etc/salt/master I uncommented gitfs_provider: gitpython, forked the formula I wanted, and added it under gitfs_remotes:
21:32 capitalfellow forrest yep, restarted master service too
21:33 forrest capitalfellow, did you make sure to add the fileserver_backend line?
21:33 forrest capitalfellow, http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#simple-configuration
21:33 capitalfellow forrest yep fileserver_backend:
21:33 capitalfellow - git
21:33 capitalfellow - roots
21:34 forrest can you pastebin/gist your master conf?
21:34 berto- joined #salt
21:34 scbunn_ joined #salt
21:35 martoss joined #salt
21:37 BrendanGilmore joined #salt
21:41 capitalfellow forrest sure http://pastebin.com/2uychxDJ
21:41 bencc left #salt
21:42 forrest capitalfellow, can you try to comment the gitfs_provider and restart the service just to see if that does anything?
21:43 capitalfellow forrest doing that..
21:43 forrest ok
21:43 forrest also, it might be worth trying to start the master with debug logging enabled.
21:44 SpeeR joined #salt
21:45 Ryan_Lane when using requisites, is it possible to reference an id by "id: My id" rather than "cmd: My id" or "virtualenv: My id", etc?
21:45 Ryan_Lane or some other notation?
21:45 Ryan_Lane I know sls is a keyword, but that's for a full file
21:45 forrest Ryan_Lane, not as far as I'm aware
21:45 Ryan_Lane :(
21:45 manfred Ryan_Lane: i do not believe you can require a whole state id
21:46 Ryan_Lane you can, but you still need to use the module its referencing, right?
21:46 forrest yes
21:46 Ryan_Lane :'(
21:46 Ryan_Lane users find this confusing
21:46 forrest why?
21:46 capitalfellow forrest right now I'm running sudo salt-master --log-level=all so a lot is flying by. what am I looking for? On restart I reran 'sudo ls -lh /var/cache/salt/master/roots/hash/base' and do not see the tomcat formula from gitfs_remotes listed
21:46 Ryan_Lane because you need to always reference the module that's associated with it. they copy/paste listen statements from elsewhere and change the id listed
21:46 SpeeR Im trying to set an IP in a config file, so I have a ip.sls with this in it... {% set ip = grains['ip_interfaces']['eth0'][0] %}
21:47 SpeeR its not working, is there some other way to get an IP from the host?
21:47 forrest capitalfellow, look inside of /var/cache/salt/master/gitfs
21:47 Ryan_Lane so they're trying to do watches on "cmd: Ensure my virtualhost is installed" rather than "virtualenv: Ensure my virtualhost is installed"
21:47 forrest Ryan_Lane, oh because they declared virtualenv and cmd under the same ID?
21:47 forrest seems like bad ID usage to me :P
21:47 Ryan_Lane IDs are unique
21:48 Ryan_Lane so they can't
21:48 forrest I'm confused then
21:48 Ryan_Lane it's that they copied the line from elsewhere
21:48 forrest they have two UNIQUE IDs
21:48 Ryan_Lane and forgot to change the module being referenced
21:48 forrest ok
21:48 Ryan_Lane but we have a convention to always reference the ID
21:48 forrest I'm still confused
21:48 Ryan_Lane rather than the name
21:48 forrest are they using two unique IDs?
21:49 forrest what do you mean rather than the name?
21:49 capitalfellow forrest now we're gettings somewhere. there is no gitfs dir. /var/cache/salt/master/ contains ".root_key", file_lists, jobs, minions, proc, roots, tokens
21:49 Ryan_Lane one sec
21:49 forrest Ryan_Lane, ok
21:49 forrest capitalfellow, regarding the logs, I'm not sure what you'd be looking for, there should be something every minute where gitfs is trying to do the pull
21:49 dvestal joined #salt
21:50 capitalfellow forrest bingo! [ERROR   ] Git fileserver backend is enabled in configuration but could not be loaded, is GitPython installed?
21:50 forrest capitalfellow, odd...
21:50 forrest is gitpython installed? :P
21:51 capitalfellow forrest  pip install GitPython
21:51 capitalfellow Requirement already satisfied (use --upgrade to upgrade): GitPython in /opt/boxen/homebrew/lib/python2.7/site-packages
21:51 capitalfellow Cleaning up...
21:52 forrest hmm, can you try to stop, and then start the master service? I wonder if it's an issue with mac and how the directory structure is handled maybe :\
21:52 manfred sounds like it isn't in a place that salt can find it
21:52 Ryan_Lane forrest: https://gist.github.com/ryan-lane/e448dbc2a72cfe4b8ba8
21:52 forrest manfred, yea agreed
21:52 Ryan_Lane whoops
21:52 Ryan_Lane forgot to update a line
21:52 forrest oh god
21:52 forrest spaces??
21:52 Ryan_Lane updated
21:52 forrest what is wrong with you guys
21:52 stevednd capitalfellow: what version of GitPython. when I originally tried pip installing gitpython it installed an old version since the new one is an RC
21:52 ldlework joined #salt
21:52 Ryan_Lane I just wrote this example by hand
21:53 ldlework Where does the 'localhost' grain comefrom?
21:53 Ryan_Lane and yeah, we use spaces ;)
21:53 Ryan_Lane and we use 2 spaces :D
21:53 manfred ldlework: salt/grains/core.py
21:53 ldlework :(
21:53 Ryan_Lane yaml is verbose
21:53 manfred ldlework: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1098
21:53 forrest Ryan_Lane, my god
21:53 forrest Ryan_Lane, what's wrong with underscores
21:53 stevednd capitalfellow: I had to specifically do `pip install GitPython==0.3.2.RC1`
21:53 forrest Ryan_Lane, anyways
21:53 Ryan_Lane oh
21:53 Ryan_Lane I see what you mean
21:53 forrest Ryan_Lane, I'm still confused, so users are getting confused because they are lazy?
21:53 Ryan_Lane we write our states like documentation
21:53 Ryan_Lane forrest: it's not a matter of lazy
21:53 forrest yea I do as well, I just use underscores
21:54 capitalfellow stevednd my background isn't in Python. My understanding is gitpython is a library not a binary I can run with --version. How do I find the gitpython version?
21:54 Ryan_Lane it would be ideal to be able to reference the IDs using a generic key
21:54 Ryan_Lane since ids need to be unique
21:54 Ryan_Lane names don't
21:54 berto- joined #salt
21:54 Ryan_Lane so obviously it's necessary to reference the module
21:54 forrest Ryan_Lane, I don't think that's going to be possible, because the way salt does lookups, you could have both cmd.run, and virtualenv.installed under a single ID
21:54 Ryan_Lane no
21:54 Ryan_Lane IDs must be unique
21:55 forrest correct
21:55 forrest but I can have multiple different types of commands under a single ID
21:55 stevednd capitalfellow: Mine isn't either, but usually doing `pip freeze` will show me what I want
21:55 Ryan_Lane ugh. right. gross
21:55 beneggett can I run an interactive console on a minion via salt?
21:55 Ryan_Lane well, then it should trigger everything in that ID :)
21:55 beneggett like a postgres psql console, or rails console, etc?
21:56 capitalfellow stevednd then I doubly appreciate your help. Here's the output of pip freeze: GitPython==0.1.7
21:56 Ryan_Lane ok, got to run for a bit
21:56 stevednd capitalfellow: yeah, pip uninstall that, and then do the pip install I specified above forcing the RC version
21:56 forrest Ryan_Lane, yea, I guess I am still confused, in what situation would you copy paste - cmd? And why would you use the - name value from cmd.run for the cmd require (or listen_in)? instead of the ID :\
21:59 capitalfellow stevednd forrest updated GitPython and I have a /var/cache/salt/master/gitfs now!
21:59 stevednd cool
21:59 beneggett I mean, just running something like this freezes up: salt 'my-minion' cmd.run 'vi .'
21:59 beneggett so is there someway to do interactive shell type tasks ?
22:00 forrest beneggett, no you can't
22:00 beneggett thanks forrest
22:00 oz_akan joined #salt
22:00 berto- joined #salt
22:01 TyrfingMjolnir joined #salt
22:02 viq joined #salt
22:02 Ozack joined #salt
22:05 ajprog_laptop joined #salt
22:06 berto- joined #salt
22:06 forrest beneggett, np
22:06 aparsons joined #salt
22:10 vbabiy joined #salt
22:11 capitalfellow What's wrong with this top.sls ? http://pastebin.com/4CmPVMcY Now that I can verify the formula & gitfs is working I'm trying to figure out why 'sudo salt 'minion1' state.highstate' returns with tomcat not installing
22:12 logix812 joined #salt
22:12 berto- joined #salt
22:12 tkharju joined #salt
22:12 forrest capitalfellow, does it fail to compile?
22:12 forrest what does that error say?
22:13 DaveQB joined #salt
22:17 capitalfellow forrest I'm not sure I'm getting an error, the command line where I run highstate just returns back to commandline. The debug output is fetching  https://github.com/scottelundgren/tomcat-formula.git, updating fileserver cache, diff_mtime_map: the maps are the same
22:17 forrest capitalfellow, and you've confirmed the package isn't installing? Rerun the highstate, add the following options -t 60 -l debug
22:19 capitalfellow forrest jvm was git cloned from https://github.com/log0ymxm/salt-jvm.git to /srv/salt/jvm and it installed fine. I'll run your suggestion
22:19 forrest capitalfellow, ok
22:19 forrest I'm not very familiar with the tomcat formula
22:19 forrest so for all I know it has weird pillar requirements or something
22:20 capitalfellow forrest when I vagrant ssh, and look for changes that tomcat.package should make and don't find them
22:21 bezeee joined #salt
22:21 toddejohnson joined #salt
22:22 forrest capitalfellow, ok yea I'd see what the output from that highstate with the extra options is
22:23 sectionme joined #salt
22:24 SpeeR can someone tell me why this context: host: {{ salt['network.get_hostname'] }}              provides this result: <function get_hostname at 0x20de9b0>  ?
22:24 srage joined #salt
22:24 forrest that's just the instantiation
22:24 capitalfellow forrest right here: http://pastebin.com/dqnizAXp Should I copy pillar.example into /srv/pillar/tomcat.sls and reference it from /srv/pillar/top.sls before running the highstate ?
22:27 forrest capitalfellow, that might help, but a quick glance doesn't seem to make it look like you need a version specifically. Can you install tomcat from the command line
22:27 forrest or at least, will it prompt you to confirm installation
22:28 capitalfellow forrest that was my conclusion too, that the pillar data wasn't a requirement so try installing it first. how would I install tomcat via commandline via salt?
22:30 forrest capitalfellow, salt 'minion' pkg.install tomcat
22:30 forrest or whatever the actual tomcat name is
22:30 capitalfellow forrest gotcha. let me give that a shot
22:32 possibilities joined #salt
22:33 Whissi Woohoo. I found the reason for my problem.
22:33 Whissi But now the question is, is it a salt bug or not. :-)
22:33 srage_ joined #salt
22:34 Luke joined #salt
22:38 capitalfellow forrest alas http://pastebin.com/PgDmZhaH nothing useful
22:40 forrest capitalfellow, ok, so you should connect to the machine, and see what happens if you try to manually install tomcat
22:40 forrest because right now that looks to me like maybe a repo error, or something else crappy :\
22:40 duncanmv joined #salt
22:41 possibilities joined #salt
22:41 capitalfellow forrest acutally I think the pillar data is needed for the install. 'vagrant ssh' & "sudo apt-cache search tomcat' reveals the package is called 'tomcat7' and rereading the map.jinja shows a verion set by a pillar call
22:42 forrest capitalfellow, ahh alright, that would make sense then, I didn't check too closely, sorry :\
22:43 capitalfellow forrest hey, don't feel bad I feel really smart now, if I hadn't thought to confirm the name of the package after the commandline line install you suggested failed. I'm way more unstuck that I was
22:43 forrest capitalfellow, that's good at least! Once you drop in the pillar data and configure it, hopefully it will be smooth sailing
22:46 bezeee joined #salt
22:58 aparsons_ joined #salt
22:59 napper joined #salt
23:00 Ryan_Lane joined #salt
23:00 Ryan_Lane joined #salt
23:01 Ryan_Lane forrest: the docs almost always use the name field via watch from what I can tell
23:01 forrest really? I always use the ID for my watches
23:02 aparsons joined #salt
23:02 robawt +1 for using ID over name fields
23:03 forrest -name is just what I want the service/cmd to actually be :\
23:03 forrest the ID is the best, then I can say install_postgres_server
23:03 forrest or whatever
23:03 forrest makes so much more sense
23:04 robawt also sometimes the name is lost or doesn't match to existing prereqs
23:04 forrest right
23:04 forrest or it's a terrible long path or something
23:04 robawt had that happen in postgres stuff. turned out using the ID fired off the requirements, using the name did not. only tell tale is what appears as an "ordering" issue
23:04 forrest and I'd rather have my_conf than /etc/pki/salt/long/dir/name
23:06 forrest robawt, hah
23:09 redondos joined #salt
23:11 Ozack joined #salt
23:12 aparsons joined #salt
23:14 rojem joined #salt
23:19 badon_ joined #salt
23:23 dvestal joined #salt
23:24 sectionme joined #salt
23:25 rap424 joined #salt
23:26 mosen joined #salt
23:28 to_json joined #salt
23:28 srage joined #salt
23:30 aparsons_ joined #salt
23:30 mechanicalduck joined #salt
23:35 aparsons joined #salt
23:41 Lingo__ joined #salt
23:44 skyler joined #salt
23:45 skyler Hi all, I am new to Salt, and I am wondering how you push dynamic data to a minion. For example, I am using Gerrit, and I want to push an entire Gerrit project to my minion. How would I go about doing this?
23:45 aparsons joined #salt
23:46 forrest skyler, I'm not very familiar with gerrit, what does a project look like? Just a bunch of files or what?
23:46 mosen hi forrest resident helpdesk
23:46 skyler forrest: Yes, it consists of some configuration files, some database files, and some git repositories.
23:47 forrest mosen, lol, I think the help desk gets paid :P
23:47 GnuLxUsr joined #salt
23:47 forrest skyler, ok, so is this all packaged up into a single unit? Or are all the things independent?
23:47 forrest mosen, what's up?
23:48 skyler forrest: it can be all packaged up. But the part I am confused about is how you would keep a record of a most recent changes, so that if my gerrit server failed, I could rapidly provision a new one and have its database be up to date.
23:48 mosen forrest: nothing just saying hello
23:49 aparsons joined #salt
23:49 forrest mosen, oh hello then
23:50 aparsons joined #salt
23:52 mosen i feel useless now, how about a formula/jinja question: some attributes are available through the jinja map and some are non optional config attributes, part of the formula init.sls. And I think whiteinge said that only the OS switching/abstraction stuff should be in the map.jinja is that right?
23:52 forrest skyler, hmm, that would be tough, gerrit doens't do any sort of versioning I assume?
23:52 bhosmer joined #salt
23:53 forrest skyler, it might be something that you should add as part of the project itself, if there's no way to track via hashes or something like in salt
23:54 skyler For the database, I do not think so. Lets make it simpler and say that I take care of backup on my own and package everything up nicely.
23:54 conan_the_destro joined #salt
23:54 skyler Now I want to replace my Gerrit server.
23:55 ggoZ joined #salt
23:55 skyler If I have this big ball of data, I don't want to store it in any repository with Salt stuff. Would best practice just be to point Salt to a way to download the data on the host after doing the rest of the setup?
23:55 forrest mosen, yes, only OS stuff, should be in the map file
23:56 forrest skyler, take a look at http://docs.saltstack.com/en/latest/ref/configuration/master.html#fileserver-backend
23:56 bezeee joined #salt
23:56 forrest skyler, I'd say yea, store the data somewhere, and have salt pulling it from there when you build a system (internal to your network obviously)
23:59 mosen forrest: everything else in the init.sls should be a pillar.get style statement, with a default value?
23:59 aparsons joined #salt

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