Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-06-13

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

All times shown according to UTC.

Time Nick Message
00:01 evxd jeddi: yep. i'm pretty sure that's right; you'll have to assign different profiles for each provider.
00:02 oliv_mc joined #salt
00:07 mahimahi joined #salt
00:08 cxz joined #salt
00:12 morganfainberg joined #salt
00:17 jslatts joined #salt
00:18 jeddi evxd:  yup .. reading more and more, and finding no neat answer to that.  needs some -parameter that you can pass the provider in .. rather than hardcode it to an instance description or type.   it's good how you can have multiple accounts for a provider, but weird that n:m relationship wasn't extended a bit further.  i know it's early days yet.
00:23 jeddi Now I'm seeing weirdness with a change I made to use pkgs rather than pkg - to batch up installed and purging tasks a bit faster in the jinja.   Consider http://rn0.ru/show/jC1J6wr7N6YIBnAuQh3x/ the two stanzas are from the same common.sls , and the error indicates it's using the id of the second stanza.   http://docs.saltstack.com/ref/states/all/salt.states.pkg.html indicates that 'pkgs=' is a valid parameter for purged.
00:27 logix812 joined #salt
00:49 Gwayne joined #salt
00:49 Gwayne joined #salt
00:53 jeddi evxd: {sigh} and now I've separated the two providers up, with uniquely named profiles for new instances .. when I try to create an instance on my original provider, it somehow magically uses the other provider.   perverse.
01:14 auser joined #salt
01:25 m_george|away joined #salt
01:33 aat joined #salt
01:35 oz_akan joined #salt
01:37 Corey Is there currently a supported method in pillar to store a full SSL cert?
01:37 cxz Corey: Use multiline yaml
01:39 bemehow joined #salt
01:39 kmwhite joined #salt
01:40 Nexpro joined #salt
01:40 Corey Ooh.
01:42 Corey cxz: So | is the signifier there it seems.
01:43 danielbachhuber joined #salt
01:44 cxz Yeh
01:45 cxz either that or >
01:45 cxz I always get confused which one
01:45 cxz one of them ignores whitespace prepending
01:45 Corey Testing now.
01:45 cxz cool
01:45 Corey cxz: | worked a treat.
01:45 Corey The ONLY diff is a trailing newline. NICE!
01:45 cxz Yeh cool
01:45 cxz I'm sure you can remove that
01:46 cxz Somehow
01:46 m_george left #salt
01:46 Corey cxz: Hmm, not sure where it's being introduced.
01:46 Corey Not a huge deal, but I don't like not understanding it.
01:47 cxz yeh
01:47 cxz Neither do i :P
01:47 cxz I haven't come across that however
01:47 Corey -----END CERTIFICATE-----
01:47 Corey +
01:47 Corey That stupid + at the end, grr.
01:50 logix812 joined #salt
01:50 Corey Still, hooray, finally have my postfix + dovecot config working properly.
01:51 Corey Rebuilding that from scratch would suck.
01:54 shazow joined #salt
01:55 shazow hi there, is it possible to have a file.managed and file.symlink in the same declaration? (ie. I want to create a managed file and also symlink it to a target)
01:57 oliv_mc joined #salt
02:06 tempspace Is anybody using the sentry returner with the hosted sentry at getsentry.com
02:06 shazow left #salt
02:06 shazow joined #salt
02:08 kermit joined #salt
02:10 bemehow_ joined #salt
02:12 Guest85767 joined #salt
02:17 Furao tempspace: i don't think sentry returner work in 0.15.3
02:17 Furao unless someone fixed it
02:17 Furao I should do a pull-request
02:17 tempspace I'm still on .14.1
02:17 Furao ok :)
02:18 Furao well it should work with getsentry.com
02:18 Furao I'm the author of that returner
02:18 Furao and I never tried it on getsentry.com
02:18 Furao I only run my own sentry server
02:18 tempspace Furao: thanks for your effort!
02:19 Furao if you hit any problem I got a new version of the returner that is better
02:19 Furao i improved returned data
02:23 tempspace Furao: I get The return failed for job 20130612221658738093 'sentry_return.returner' in my debug logs
02:23 tempspace trying to figure out how to debug it from there
02:24 Furao well it's probably that
02:24 tempspace My guess is the server isn't right for getsentry
02:26 Furao https://gist.github.com/bclermont/dc857c1c4abd8dd5c723
02:26 Furao I renamed it for sentry_common (as it's in my git common repo)
02:26 Furao to avoid conflict with sentry returner in salt itself
02:26 Furao I simplified code and pillar configuration
02:27 Furao I think line 55 will fail on salt < 0.15
02:27 Furao as retched had been introduced there
02:27 Furao retched -> retcode
02:28 tempspace Furao: cool, well I'll write this down and upgrade tomorrow, thanks
02:49 m_george|away joined #salt
02:51 richardjortega joined #salt
02:54 richardjortega left #salt
02:59 shazow left #salt
03:05 Guest85767 joined #salt
03:05 dthom91 joined #salt
03:18 faldridge joined #salt
03:19 faldridge so if the right way to install things in Python is to use pip, what is the best way in salt to get pip itself installed?
03:24 jesusaurus i install the system package python-pip
03:24 Furao python-pip in ubuntu 12.04 is buggy
03:24 Furao I wrote a state that install manually pip
03:24 Furao and troubleshoot it 25 times
03:24 Furao now it's stable
03:26 Furao faldridge: and it's not just for salt that pip is the right way to install things in python
03:26 Furao pip and virtualenv is the way to go
03:27 faldridge Furao: of course.  Should have used "since" not "if"
03:27 faldridge sorry.
03:27 faldridge Furao: I guess my only qualm is that stuff about the cmd state directive having trouble tracking state.
03:27 Corey Hmm, has someone gotten pkgrepo working with yum?
03:28 jesusaurus Furao: whats buggy about python-pip?
03:29 Corey AHAH!
03:29 Corey Issue found.
03:30 canci joined #salt
03:30 Nazzy joined #salt
03:30 Nazzy joined #salt
03:30 Corey And reported, wee.
03:31 Furao jesusaurus: between 1.0.0 (ubuntu precise) and 1.3.1 in https://pypi.python.org/pypi/pip/1.3.1
03:32 jesusaurus well, you could always bootstrap off of python-pip to install pip from pypi
03:32 Furao this is what my pip state do
03:33 Furao https://gist.github.com/bclermont/702f5a31d6ac29575946
03:33 Furao well it use a custom module I made (archive.extracted)
03:34 Furao I think salt 0.15 come with a new way to achieve the same
03:39 oz_akan joined #salt
03:50 clintberry joined #salt
04:04 chrism so this is a bit frustrating...   Salt is blatantly ignoring a pillar.sls file =(
04:04 chrism and i'm not sure why
04:05 chrism I keep getting Specified SLS server.sls in environment devdb is not available on the salt master
04:05 chrism it worked, I modified the top.sls to do hostname matching on the pillar files, started getting that, changed it back, still get that =\
04:08 Katafalkas joined #salt
04:17 chrism hrm, uninstalling the minion/reinstalling it fixes.
04:17 chrism cache issue it looks like
04:22 krissaxton joined #salt
04:24 chrism aah saltutil.refresh_pillar fixes
04:24 Ryan_Lane joined #salt
04:32 koolhead17 joined #salt
04:33 efixit joined #salt
04:35 krissaxton joined #salt
04:41 jalbretsen joined #salt
04:56 bemehow joined #salt
05:19 dlam joined #salt
05:30 faldridge how do you reference env vars in salt states?
05:30 faldridge as in:
05:30 faldridge $HOME/.vimrc:
05:30 faldridge - file.managed: blahblahblah
05:30 jalbretsen joined #salt
05:36 EugeneKay An env var of a user? AFAIK that's not really possible without starting a shell for the user
05:37 faldridge EugeneKay: I guess I thought it would be present if running the state.highstate as a particular user, but that makes sense.  What I really want to know is how to set dot files in a user-dependent way.
05:37 Furao faldridge: use {{ salt['user.info']('your username')['home'] }}
05:37 Furao instead
05:38 faldridge Furao: thanks!  Where are all the possible options for salt[….] documented?
05:38 Furao http://docs.saltstack.org/en/latest/ref/modules/all/index.html
05:38 Furao and bookmark this one as well http://docs.saltstack.com/ref/states/all/index.html
05:39 faldridge also, Furao: I decided to go with pkg.installed python-pip earlier.  Most of the time I'll be installing pip through virtualenv for each project, so as a bootstrapping mechanism it's fine.
05:41 faldridge Furao: interesting that user.info isn't listed in that module index.  Do you know why?
05:43 Furao check user module info function
05:43 Furao oh no yes
05:43 Furao it's a virtual module
05:43 Furao many modules implement OS specific logic
05:43 Furao but provide the same API
05:44 Furao let's say you have a module to handle users on windows, solaris, freebsd and linux
05:44 Furao each come with a def __virtual__():
05:44 Furao function that return False if they find they don't run on proper OS
05:44 Furao and the module that work on local OS return the string of the module name
05:44 Furao which in this case is "user"
05:45 faldridge yeah but I don't even see a user module, just user add.
05:45 faldridge useradd, rather
05:45 Furao http://docs.saltstack.com/ref/modules/all/salt.modules.pw_user.html#salt.modules.pw_user.info
05:45 faldridge nevermind
05:45 faldridge right on
05:46 Furao https://github.com/saltstack/salt/blob/develop/salt/modules/useradd.py#L21 https://github.com/saltstack/salt/blob/develop/salt/modules/useradd.py#L385
05:51 morganfainberg left #salt
05:51 faldridge and then how can I establish certain user names for certain environments, like dev vs prod?
05:52 morganfainberg joined #salt
05:52 faldridge Furao: and then use that computed username in the module call you posted above?
05:52 faldridge would that be pillars?
05:53 EugeneKay Something like this, in a sls file: https://gist.github.com/EugeneKay/b99b27e4eb6915f14a6f
05:54 pepper joined #salt
05:54 pepper hello all
05:55 EugeneKay And I added the matching pillar data
05:55 Furao faldridge: I do it in pillar
05:56 blast_hardcheese joined #salt
05:57 faldridge EugeneKay: cool, thanks!  I hadn't come across pillar['env'] yet.  I'm guessing that will evaluate to whatever the node matches in your pillar roots?
05:57 EugeneKay Sorry, that was a contrived example. I'm doign it a lil different
05:57 EugeneKay It'd be pillar['{{grains["env"]}}'] or so
05:58 EugeneKay It's still a bit early here
05:59 faldridge ah, my apologies!  I'm burning the midnight myself.
05:59 faldridge *midnight oil
05:59 chrism aye, it's the best time to get stuff done =)
05:59 chrism I work from home, so at night, the kids and wife are all asleep, I can bump some good music and get in the zone, so to speak
06:00 chrism I tend to move mountains at night, trip over molehills during the day
06:00 chrism lol
06:00 chrism pwd
06:00 chrism er
06:04 faldridge chrism: agreed.  I work in an open-floorplan office, so similar. ;)
06:04 pjs_ joined #salt
06:04 chrism oh man, back in Chicago I did as well...  A good set of headphones was my best friend
06:04 faldridge but not nearly as demanding.
06:04 chrism demanding in different ways =)
06:04 faldridge yeah, I've really got to get some noise canceling ones….
06:04 faldridge Just can't decide and I'm a cheapskate.:D
06:05 chrism haha
06:05 chrism fair nuff
06:05 EugeneKay I'm proud to say I've never had an office.
06:05 chrism fwiw A good set of over ear headphones will do a really good job of keeping noise out w/o the expense of noise cancellation
06:05 faldridge EugeneKay: that is pretty admirable.  I'm also too scared to work for myself.
06:05 EugeneKay About the closest I've come was a summer job at a Sears during high school, where I got an entire back room to myself.
06:06 faldridge my father-in-law ruined his life that way, so both my wife and I are a bit skiddish of that path.
06:06 echos joined #salt
06:07 EugeneKay I guess a few summers before I got roped into "interning" at the family ISP..... but that wasn't a paying job.
06:07 Kyle_ joined #salt
06:07 jasonrm joined #salt
06:07 morganfainberg joined #salt
06:07 faldridge so even reading the docs I'm not exactly sure how to lay out environments and then access the pillar data from that particular environment from a state file.  If you guys are still here in a few minutes, I'll post my attempt, assuming it doesn't work.
06:07 up_the_irons joined #salt
06:10 EugeneKay Good luck. I worked it out with a bunch of trial and error
06:11 chrism aye i'm actually on my full salt rebuild #23 at this point
06:11 chrism lol
06:12 EugeneKay I wonder how long until there's a Salt book. 1.0?
06:12 chrism but yeah i've finally gotten to a point where I can have a generic state for my app, and pillar data dictates the differences between production/staging/integeration envs, etc
06:12 chrism but the states are all agnostic of that and easily reusable all over the place
06:12 chrism took awhile to get there =P
06:13 EugeneKay I'm still working on rebuilding my infrastructure around Salt
06:13 azbarcea joined #salt
06:14 EugeneKay I have a Default config that covers stuff like users/groups, /etc/vimrc, networking; and then individual machines get additional state modules / different configs based upon their Env & Purpose
06:14 EugeneKay It works OK, but definitely room for improvement.
06:15 chrism always room for improvement =)
06:15 linjan joined #salt
06:16 EugeneKay I think the biggest thing I'm doing wrong is using file.managed to copy over generic config files, rather than writing a state module for each lil service(or using existing ones).
06:16 chrism aye
06:16 EugeneKay Buuut, I like the control that I get over the file contents(and readability)
06:16 chrism the jinja templates are key there
06:16 EugeneKay Yeah, I'm templating stuff
06:17 faldridge well, so far, this is much, much better than Chef.
06:17 chrism i just wrapped up templating out httpd/postgres configs... that took... awhile.
06:17 chrism oh yeah
06:17 chrism F chef
06:17 faldridge word.
06:17 chrism as an admin for like 15 years and not a dev, I found chef unusable
06:17 EugeneKay But I wrote a template for /etc/sysconfig/network-scripts/ifcfg-ethN, rather than use the network state module
06:17 chrism I'd get pissed after like 4-5 hours and just whip up what i needed in perl (10 mins)
06:17 chrism lol
06:17 chrism oooh
06:17 chrism i see what you mean
06:17 faldridge I think its official name should be either MFChef or #$@!Chef
06:17 chrism hahah
06:18 EugeneKay I refuse to administer anything involving Ruby
06:18 faldridge +1
06:18 EugeneKay The language is, and I'm being overly general here, only used by Rockstar Brogrammers.
06:19 EugeneKay I have not found a single Ruby app, Rails or otherwise, that did not make me want to vomit after reading the code.
06:19 chrism I work in a ruby shop
06:19 chrism =\
06:19 faldridge well to me, the problem is what happened when they took over.  They shaped the language into one that's easy to write, not easy to read, which as a Python programmer, I think is just philosophically wrong… and a pain in the ass to maintain.
06:20 faldridge haha, sorry, chrism!
06:20 chrism oh ruby is inherently nigh impossible to maintain
06:20 chrism security bugfix? BREAK ALL THE GEMS!
06:20 faldridge then why the hell would you ever want to use it?
06:20 chrism plus zero backwards compat
06:20 chrism ruby is the new PHP
06:20 chrism tbqh
06:20 faldridge python is like wiping your ass with silk in that regard, to borrow a phrase
06:20 chrism lol
06:21 EugeneKay This explains quite a bit abotu ruby, actually.
06:21 chrism man i've got a ruby app
06:21 EugeneKay So if PHP is a double-clawed hammer, what does this make Rby?
06:21 chrism responsible for around 800K/day in revenue
06:21 faldridge a double-clawed nail trimmer?
06:22 chrism and it's impossible to get it to ruby 1.9.x, so it's stuck on a language that's that's EOL'd this month
06:22 faldridge hahah, damn.  What are you going to do?
06:22 chrism that scares me
06:22 chrism firewall the shit out of it, snort sensors all over the place and pray, a lot.
06:22 chrism lol
06:22 faldridge nice.
06:22 chrism i mean there's just nothign else I can do
06:22 faldridge so is that your own app, or for a company?
06:22 EugeneKay You should have those anyway :-p
06:23 chrism our dev team is working on newer apps that are easier to work with and considerably less monolithic to replace it, but that's liek a year out
06:23 chrism oh company
06:23 chrism i dont' write ruby at all
06:23 chrism i'm perl/bash all the way
06:23 chrism lol
06:23 chrism used to handle large scale hosting operations, these guys threw a chunk of money at me to sit there and make damned sure that app never goes down
06:24 faldridge I find it easier to figure out how to do something in bash as someone who never writes than ruby, which says an awful lot given how obfuscated bash syntax is.
06:24 chrism well i think it depends what you're trying to do
06:24 faldridge step 1: drop ruby
06:24 faldridge :)
06:24 chrism basic automaton?   bash all the way.   write a blog?  rails amkes that stupidly easy
06:24 chrism but you can't do a hello world in rails w/o a Db connection
06:24 chrism it's like... what.
06:24 chrism lol
06:24 faldridge well, true, but then I would never write a blog with bash or ruby
06:24 chrism aye
06:24 faldridge hahaha
06:25 chrism i mean that literally
06:25 chrism you cannot start a rails app w/o a DB
06:25 chrism be it file based or like mysql/pgsql or something
06:25 faldridge OMG that is disgusting
06:25 chrism pmuch yeah
06:25 middleman_ joined #salt
06:26 faldridge I've heard that ruby is becoming a hacker's language for configuration, etc. - all the stuff we used to do with bash, but fuck that noise
06:26 chrism i've seen that here and there
06:26 faldridge I'm hoping to permanently convert my shop from chef to salt and kick ruby completely out the door
06:26 chrism not in my damned shop though
06:26 chrism lol
06:27 chrism man we've got these ghetto process monitors written in ruby, we did a security update, of course they all broke
06:27 chrism replaced w/ 30 lines of perl
06:27 faldridge oh man.  thank goodness you have the freedom to do that.
06:27 chrism 30 lines of perl that'll work on any box in the past 10 years with perl on it and will *never* need maint.
06:27 chrism lol
06:27 faldridge haha, right on
06:27 chrism yeah
06:28 chrism i take pride in replacing ruby w/ tiny bits of perfectly readable well documented and maintenance free perl =)
06:28 faldridge i better get back to writing these state files before I forget what the hell I was doing
06:28 chrism aye same
06:28 chrism =)
06:29 EugeneKay "readable, well-documented perl"
06:29 EugeneKay You're funny.
06:30 chrism I worked in a perl shop for like 2 years with REALLY stingy devs, none of that hacky crap
06:30 chrism and I don't perl golf =P
06:30 chrism we all got handed a copy of PBP and told "If you can't adhere to this, leave"
06:31 krissaxton joined #salt
06:34 pepper On this topic - I'm after some deployment advice. I have a bunch of repos that I want to deploy to EC2 instances. As is stands, each repo has a bash script which essentially SSH's into the instance, clones the code and builds it.
06:34 pepper I'm looking at Chef, Puppet, Fabric, Salt... but they all seem too heavy-weight.
06:34 pepper Thoughts?
06:35 chrism git repo?
06:35 chrism or svn or whatevs
06:35 pepper Yes
06:35 chrism could always just cmd.run['cd blah; git clone blah; make -j 8 all']
06:35 chrism i mean i'd break it down a bit more than that
06:36 chrism but should be trivial
06:36 faldridge yeah, I don't think salt is heavy at all, and it basically replaces Chef AND Fabric.
06:36 faldridge since it does remote execution and config management
06:37 pepper hmm. It wasn't clear to me where/how to deal with SSH credentials. Is taht easy?
06:37 faldridge and zeromq sockets, which salt uses, provide the "lightest", fastest remote execution around
06:37 faldridge afaik
06:37 chrism no real need for ssh credentials there
06:37 pepper yeah - that IS cool.
06:37 chrism oooh wait you mean for the git account?
06:37 chrism or just to exec the git clone on the remote machines?
06:38 pepper no i meant for access to the instance/minion/target
06:38 chrism just gotta install salt-minion on the remove VM first
06:38 chrism add the key to the master and go
06:38 pepper ohhh, i see
06:38 chrism after that all communications happen via the saltmaster->salt-minion setup
06:38 pepper and if one has 1000 minions then one might use another tool to automate that part?
06:39 chrism apparently that's not really necessary until like ~5k or so minions
06:39 chrism things get a bit ugly then
06:39 pepper interesting. thank you
06:39 chrism but i haven't scaled salt that big, so I can't really speak to that
06:39 pepper I'm dealing with O(10) of minions; just curious.
06:40 pepper Thanks for the advice - I'll dive deeper into Salt and see how it works out.
06:40 chrism np, it's worth the trial for sure
06:42 pepper In this space I've only ever used my own bash scripts. Once I tried Chef. But that took me a whole day to get a simple Jenkins test server up and running o.0
06:43 faldridge public server announcement: don't use Chef. ever.
06:43 chrism loool
06:43 chrism truth
06:43 faldridge for a philosophy comparison: salt: keep it stupidly simply. chef: moar powerrrrrrr!
06:44 faldridge simplicity is the mother of ease, maintainability and stability - at least
06:44 faldridge there are 15 levels of attribute overrides for Chef - and that's just the documented ones.
06:44 faldridge what. the. fuck.
06:45 pepper heh
06:45 chrism good automation to me is simple. When automation breaks (it all will eventually), it should be a fast easy fix
06:45 chrism that wasn't chef for me
06:45 chrism heh
06:45 faldridge and believe me, resolving those override levels is a nightmare - and the one that's most useful isn't even document!!
06:45 faldridge FFS
06:45 chrism haha
06:46 faldridge *documented
06:46 chrism man I had a dude I worked with that loved chef
06:46 chrism i just blueprinted our plans and said "have at it, i'm not touching that"
06:46 chrism i tried it a few times... like really got into it, but damn.
06:47 faldridge me, too, but I don't want to talk about it.
06:47 faldridge :)
06:47 chrism i want to spend my time building cool new things, not tinkering w/ an automation system =\
06:47 chrism lol
06:47 faldridge exactly
06:50 jacksontj joined #salt
06:53 pepper is it possible/easy to spawn minions, install deps, install code, execute it, kill minions? (I'm thinking minions==EC2 instances...)
06:53 pepper with one command, that is
06:54 chrism so there's some stuff you might want to look at
06:54 chrism it's the salt-cloud deal
06:54 pepper or does one need to spawn a minion, set it up, keep it alive (indefinitely) and then run your salt cmd's against it and then, one day, kill it?
06:54 chrism it apparently has hooks for ec2
06:55 chrism i haven't used it myself though, i can't really speak for it
06:55 pepper I'll look into that, thanks
06:56 pepper i saw something to that effect; was confused by saltstack.[com|org]
06:57 faldridge I've had strong recommendations from people I respect not to use salt-cloud (yet), since it is very new and immature.  Apparently it's easier to control ec2 instances with plain botto.
06:58 EugeneKay I'm a VMware guy. I use a vanilla system image+the VMware customizer wizard.
06:59 EugeneKay There's a script in rc.local that detects when hostname is no longer "vanilla", then preps the image. Changes the minion ID, generates fresh SSH+Salt keys, and restarts services.
07:00 pepper @faldridge - boto looks interesting (https://github.com/boto/boto)
07:00 EugeneKay Then I approve the minion on the master, and states handle it from there.
07:01 faldridge pepper: yeah, and then you can use salt remote execution to do whatever you need with it
07:05 ageron joined #salt
07:05 pepper chrism: If I just "cmd.run['cd blah; git clone blah; make -j 8 all']", as you say - what's the advantage over a bash script? I'm missing something.
07:10 pepper the Salt bootstrap script has a comment "LET THE BLACK MAGIC BEGIN!!!!"  :/ I can't decide if it's more amusing or discomforting.
07:13 Corey "Yes."
07:14 pepper Yes?
07:14 Corey It's amusing and discomfitting all at once.
07:15 pepper Ah, yes.
07:15 Corey pepper: And that cmd.run['cd blah; git clone blah; make -j 8 all'] sounds bloody HORRIBLE.
07:15 Corey If the directory doesn't exist you explode. If your git clone fails you explode. You forgot to cd into the git clone, you'll explode. If the make fails you'll explode. :-)
07:16 pepper Heh.
07:17 pepper Yeah... for now, at least, I'm just looking for something better than "ssh X <<EOF [git..cd...make..etc] EOF"
07:17 pepper But I don't want to spend a week configuring it either.
07:19 krissaxton joined #salt
07:20 Corey pepper: My solution to that was to toss it into a packaging system.
07:20 Corey Then just use RPMs / debs hooked into an ensure => latest in a config management system.
07:21 pepper I've heard of people doing that. Sounds good, but difficult?
07:25 Furao I did the packaging only method for 3 years and switched everything to salt
07:25 pepper And, how's that working out for you?
07:26 Furao I wish that salt existed before I found it
07:26 Furao I mean
07:26 ronc joined #salt
07:26 Furao it was the best things that happens to me in the past 1.5 years
07:27 Furao when I found about salt it was not mature enough
07:28 pepper Drowning in brine, in search of salt? :)
07:28 Corey pepper: RPM or DEB?
07:41 whiskybar joined #salt
07:44 pepper hmm.. 'salt-master' not available with bootstrap script? Need to apt-get instead?
07:47 pepper I'm off guys - thanks for the advice.
07:56 scott_w joined #salt
07:57 adotbrown joined #salt
08:01 alekibango joined #salt
08:05 Oct morning
08:05 MrCeeJ joined #salt
08:07 felixhummel joined #salt
08:09 pcarrier_ joined #salt
08:10 krissaxton joined #salt
08:18 faldridge Furao, chrism, EugeneKay: Got it!
08:18 faldridge and now I have a much more thorough understanding of many of Salt's moving parts.
08:19 faldridge Chef is all but gone now. :D
08:22 Furao great
08:22 Furao from all the reactions from everyone about Chef, I'm happy I skipped that Chef "step" and started straight with salt
08:25 Oct chef is great ;)
08:26 krak3n` joined #salt
08:26 __gotcha joined #salt
08:26 __gotcha joined #salt
08:26 Furao chef is in ruby and I have a bad feeling of the ruby ecosystem and community
08:27 Oct you can probably have a bad feeling about me, then :)
08:28 Oct now that Chef server is based around erlang, Chef is also using a log of technologies, beside Ruby to run
08:28 Furao my python sense is tingling
08:28 Oct this is probably one of its biggest weakness
08:28 * Oct trying to invoke pillar.cmd_json.ext_pillar inside a state
08:29 Furao you can't
08:29 Oct oh.
08:29 Furao pillar are executed in master not minion
08:29 Furao state execute in minions
08:29 Furao I use ext pillar, and you need to configure the master to get it for the minion
08:30 Oct this is .sls that I'd drop in /srv/pillar ?
08:30 Oct +a
08:30 Oct and does is actual "cmd_json" run on the master, only, too ?
08:30 Oct s/is/the
08:30 * Oct missing coffee
08:30 Furao pillar == master
08:30 Furao grains/states == minions
08:31 Oct ok
08:31 Furao mine == sent from minion to master
08:31 Oct So I guess I'm looking at something like cmd_json but for grains
08:32 Furao grains are rendered on minion startup
08:32 Furao well... rendered…
08:32 Furao generate
08:32 krissaxton joined #salt
08:33 faldridge Furao: yes, be glad you skipped Chef - especially if you're a Pythonista.  Their philosophy is different than ours.  We like one authoritative, simple, maintainable way to do things.  They like multiple, obfuscated, "look how cool I am!  Nobody but me is smart enough to maintain this code, LOL" ways to do things. :D
08:33 faldridge Sorry, Oct.  Just had to go there.
08:33 faldridge "they" being the Ruby community of course.
08:33 Furao faldridge: that's what I feel of ruby, ror and those complicated DSL
08:34 Furao and sometimes I feel ruby is a programming language for artists with just enough programming skill to break stuff
08:34 faldridge Furao: your python sense has not let you down, my friend.
08:34 faldridge +1
08:34 Oct Hehe
08:34 Furao when you need to get high to read your own code...
08:35 faldridge not that Ruby is used __exclusively__ by those types, but the seem to be the overwhelming majority that are shaping the language.
08:35 faldridge I like Ruby back in '07
08:35 faldridge *liked
08:35 Oct you means RoR developers
08:35 Oct insane framework for insane people
08:36 Furao back in 2005-6 I tried ruby for few months and it was so frustrating to got those errors with non-ascii characters
08:36 krissaxton1 joined #salt
08:36 faldridge Oct: true.  Rails is what brings most people to Ruby, though, unfortunately, like Django is what brings to Python initially - then they learn they've just inherited the world with Python.
08:36 faldridge import world; print world.is_mine >>> True
08:37 faldridge :D
08:37 * Oct maintains the infrastructure for a middle-size RoR website, using Chef (and fab, and soon salt?)
08:37 Oct you can throw me rocks :P
08:37 Furao fabric, the wrapper around bash? :P
08:37 Oct indeed
08:38 faldridge excellent!  With Salt, you'll be able to replace Fabric and Chef.
08:38 Oct I'm trying to use salt to replace Fabric first
08:38 faldridge ;-)
08:38 Oct because I'm quite dissatisfied with few things in fabric
08:38 Furao I just found out that there is a pycon starting today near here and one of the talk is on fabric to maintain an infrastructure. I wished I knew about that pycon before to let me do a talk on salt
08:38 faldridge that sounds like a good move
08:38 Furao to kick his ass
08:38 Oct but the learning curve for salt is very steep
08:38 faldridge Furao: haha! Next time, next time!
08:38 faldridge Oct: compared to Chef, are you kidding?
08:39 Oct compared to fabric + all the things I have to plug in salt in order to get my configuration back
08:39 Furao it's true that salt is a bit tought to start with. last year I wished I could see some examples of states.
08:40 Furao no just file.managed and pkg.installed, real life situation of complex installation
08:40 faldridge so you've got that whole "15 levels of overrides for attributes, and you only use default attributes in your cookbook if you want to override attributes for a single node, because normal on a node won't override override in a cookbook, and btw which cookbook is actually uploaded to the server right now?" thing down, huh?
08:40 Oct nope
08:40 faldridge and override on a node gets reset with each client run
08:41 faldridge ugh, it makes me sick just thinking about it.
08:41 sebgoa joined #salt
08:42 faldridge nothing personal.  Chef just has a biological effect on me.
08:42 Oct well, this attributes stuff is awful
08:42 faldridge I just learned it in a couple of hours or so from zero.  Not too bad for configuration management.
08:43 faldridge pillars are like data bags and states are like cookbooks
08:43 faldridge but much, much simpler
08:43 Oct is there a way to have only error from salt highstate runs ?
08:43 faldridge maybe that analogy helps though?
08:44 faldridge not sure what you mean, but adding "-l debug" to the end helps, just like with chef
08:44 Oct salt '*' state.highstate -l debug
08:44 Oct something like that ?
08:45 aleszoulek joined #salt
08:49 krissaxton joined #salt
08:51 krissaxton1 joined #salt
08:53 krissaxton joined #salt
08:55 krissaxton1 joined #salt
08:58 Corey Oct: Set Verbose to false in /etc/salt/minion if you're asking what I think you're asking.
08:59 mirrorbox joined #salt
09:03 faldridge Oct: yes, exactly that.
09:07 Oct faldridge: salt: error: no such option: -l :/
09:08 Oct Corey: will try :)
09:09 faldridge well, I got so excited learning Salt that I've already put in my eight hours for tomorrow.  I went from zero understanding to a running salty-vagrant dev environment that uses pretty much everything that's documented for Salt configuration management.  Thanks for your invaluable help when I got stuck Furao, chrism, and EugeneKay!  Oct: I'd say the ramp-up time at least for me was several orders of magnitude less with Salt
09:09 faldridge with Chef.
09:10 Oct That's exactly why I'm trying hard. Hope to be able to trash fab quickly and then I'll see if I migrate all my chef to salt, but this is a big work, probably
09:11 faldridge that is dash ell right?
09:11 faldridge also: make sure you're running sudo with the salt command
09:11 Oct yes
09:11 Oct I'm root
09:11 Oct :)
09:12 faldridge ah, strange.  Sorry, but I can't help you too much because I was doing everything with a masterless configuration.
09:12 Oct faldridge: np, I'll dig in the docs online
09:12 Oct not a big worry right now
09:13 faldridge tomorrow I'll check with some of my coworkers that are running in master-minion mode
09:13 faldridge if you're around, I'll check it
09:13 faldridge *in
09:15 Oct ok
09:20 faldridge I definitely recommend the whole tutorial - especially the in-depth states tutorial starting at http://docs.saltstack.com/topics/tutorials/states_pt1.html
09:21 faldridge though the remote execution tutorial is more of what you're looking for right now, once you have the basic understanding: http://docs.saltstack.com/topics/tutorials/modules.html
09:26 `3rdEden joined #salt
09:27 krissaxton joined #salt
09:34 __gotcha joined #salt
09:34 __gotcha joined #salt
09:40 alekibango joined #salt
09:51 krissaxton joined #salt
09:53 bhosmer_ joined #salt
09:56 krissaxton1 joined #salt
09:57 adotbrown joined #salt
09:58 krissaxton joined #salt
09:59 fredvd joined #salt
10:08 felskrone joined #salt
10:08 felskrone hello hello :-)
10:09 waverider joined #salt
10:25 jpcw joined #salt
10:43 JLG joined #salt
10:48 JLG Hi everybody
10:48 JLG i have a problem with higstate
10:48 JLG :(
10:48 JLG when i execute salt \* state.highstate
10:49 JLG i receive this message
10:49 krissaxton joined #salt
10:49 JLG State: -no
10:49 JLG Name: states
10:49 JLG Function: none
10:49 JLG Result: False
10:49 JLG Coment: No states found for this miniom
10:50 JLG Changes:
10:50 JLG somebody can hel me whit this please?
10:50 JLG thanks
10:51 karlp your top.sls file doesn't have anything to do?
10:51 JLG yes
10:51 JLG i have defined
10:51 JLG this
10:51 JLG base:
10:51 JLG '*':
10:52 JLG -bind9
10:52 jeremieca joined #salt
10:52 JLG -apache2
10:52 JLG some services
10:53 jeremieca £
10:53 jeremieca *£¨%+pm:olikfdsaqaESDRTFGH8J90K°*
10:53 jeremieca *£%¨PMOILDFGCVBHGFDBVHJGFDSWCXVFGA>Wqa`Qa>qaza@&ée'(§è!çà)
10:55 jeremieca -^poi!uèy§t(r'e"zaaz&&&&&@@&&azea p^)))))pppp^)^^^^p)pà)p^p^)o^-$ù``!èè!!!!!!!!!!!!!!!!!!!!!!!!çç!!!!!!!!ç!çàè!è!èè!!l:l:llml:k;,;lk,;,;,;,;,;l,;;;;;;;;;;;;;;;;;jk;;kklmpp^ù
10:55 jeremieca ----------------------------------------------------------))
10:56 krissaxton1 joined #salt
10:57 jeremieca -------------------------------------------àà))))))))))))))))))))à))à-)à))à))))))))))))))))))))))))))))))))))))))))))))ààààààà)à!çàààààààè!çàçiàçoààçà))ài!!ççççç!!èçççç&$$$$$^
10:57 jeremieca pù$`p$`$`$$$`
10:57 jeremieca `$
10:58 jeremieca oups.
10:58 jeremieca left #salt
11:03 omame- cats trying to use irc :)
11:04 omame- gents, I've heard of an lldp module but I can't find it around. can someone point me to the right direction?
11:04 Furao lldp module for salt?
11:05 omame- yep
11:05 Furao never heard of it, and nothing came out for lldp on salt-users google group
11:06 Furao and I don't see the point of using that
11:07 omame- knowing your neighbours can be helpful in some cases
11:07 Furao yes, but how it can fit in salt?
11:09 omame- we need to take decisions based on the lldp information, but I agree that ours is an edge case and not many users may be interested in such module
11:11 danielbachhuber joined #salt
11:16 oliv_mc joined #salt
11:22 giantlock joined #salt
11:46 aat joined #salt
11:47 cossovich joined #salt
11:52 cossovich hi folks... I'm using a masterless minion setup to install Apache Solr but I don't want to use a distro package, I just want to download the source.... where do I start?
11:52 mirrorbox joined #salt
11:53 mirrorbox joined #salt
11:53 tempspace Furao: you around this morning?
11:54 tempspace Furao: or not morning, wherever you may be
12:00 oliv_mc joined #salt
12:00 __gotcha joined #salt
12:00 __gotcha joined #salt
12:04 Oct Can grains be more than 1 item of depth ?
12:05 ageron joined #salt
12:07 `3rdEden joined #salt
12:08 aat joined #salt
12:09 Furao tempspace: i'm here
12:09 Furao it's 20 pm here in Malaysia
12:12 EugeneKay cossovich - build your own package.
12:12 cossovich EugeneKay: do you mean a salt package or a distro package?
12:13 EugeneKay Distro.
12:13 __gotcha joined #salt
12:13 __gotcha joined #salt
12:13 cossovich So putting in a bunch of cmd.run statements is the wrong approach?
12:13 EugeneKay Very.
12:14 cossovich Egads... now I need to learn how to build packages!
12:15 EugeneKay Take a poke at the distro's source package; it ought to have a rpmspec / whatever it is deb uses you can steal
12:15 EugeneKay If you're really lucky the solr.tar.gz will have a `make rpm` option.
12:16 cossovich Ok, I'll check it out.
12:16 cossovich EugeneKay: thanks!
12:17 MrCeeJ Hello! I am trying to use file.managed  to download a config file from our build server, but I cannot provide an MD5 hash (it is a repo) so don't know how to do it
12:18 MrCeeJ I could drop out of salt and run a wget, but it seems silly to do so
12:18 MrCeeJ is there a way to download a http serverd file without its MD5 being provided?
12:22 Furao MrCeeJ: from what I see in salt.modules.file you can't
12:22 Furao but you can write your own module that does it
12:25 tempspace Furao: How do I go about debugging the returner?
12:26 kvbik joined #salt
12:26 Furao tempspace: you tried my new returner on 0.15.3? or you mean an other returner?
12:27 tempspace Furao: New one on 0.15.3
12:28 Furao oh yes you're using it with getsentry
12:29 Furao what are in the logs?
12:29 tempspace sorry got disconnected and my buffer isn't working for some reason
12:31 jslatts joined #salt
12:34 tempspace Furao: yeah, I threw your python into the returners directory as sentry_common.py on my minion, upgraded both master and minion to 0.15.3, and it still returns The return failed for job 20130613075150574777 'sentry_common.returner'
12:36 MrCeeJ Furao: Yeah after some more searching I went with cmd.run:   -name: wget
12:36 tempspace Furao: and the sentry_dsn pillar
12:36 MrCeeJ thanks for taking a look though :)
12:37 Furao tempspace: no logs from the logger?
12:38 tempspace Furao: I'm not sure where they would be, that's all that's in my minion log with level debug
12:39 mikedawson joined #salt
12:40 jslatts joined #salt
12:41 Furao I think the returner just don't run
12:41 Furao line 38 add log.debug("I'm running!")
12:45 drawsmcgraw joined #salt
12:45 mikedawson_ joined #salt
12:46 drawsmcgraw Anybody manage to get salt to execute a Powershell script with command-line arguments?
12:46 drawsmcgraw My first crack was:
12:46 tempspace Furao: nope, doesn't seem to be executing
12:46 drawsmcgraw salt minion--04 cmd.script salt://windows/ps-scripts/gimme-args.ps1 ' -text something'
12:47 drawsmcgraw The PS script should just echo back the value for -text. I've tested the script in a normal PS session.
12:47 drawsmcgraw But when I try the salt cmd.script incantation, I don't see the text output.
12:48 Furao tempspace: do you have raven installed ?
12:48 Furao pip freeze |grep -i raven
12:48 tempspace Furao: raven==3.3.7
12:48 Furao anyway if raven isn't there it log something
12:49 drawsmcgraw Also worth noting -> Salt complains about invalid parameters if I don't start the args with a space. That is, '-text something' returns an error. ' -text something' executes.
12:50 oz_akan joined #salt
12:51 mikedawson_ joined #salt
12:52 Furao tempspace: the file, in my case, is in _returners/sentry_returner.py
12:52 Furao and I use --return sentry_common
12:53 tempspace Furao: I put mine in /usr/share/pyshared/salt/returners - does that matter?
12:53 Furao well it need to be on each minion
12:53 Furao it's not a good idea :)
12:54 oliv_mc joined #salt
12:54 sebgoa joined #salt
12:56 Oct https://groups.google.com/d/msg/salt-users/PuLsf3VB4aM/ze8tE1aClXUJ
12:57 Oct is this still the way to access nested grains ?
12:57 Guest85767 joined #salt
12:57 sebgoa joined #salt
12:57 tempspace Furao: If it's named sentry_returner.py, how does sentry_common map to it?
12:58 __gotcha joined #salt
12:58 __gotcha joined #salt
12:58 Furao check the __virtual__ function inside it
12:58 tempspace ahh there it is
13:00 sebgoa joined #salt
13:00 tempspace So my file root is /srv/salt, I made a /srv/salt/_returners , put your new file in there as sentry_returner.py and highstated the minion, does that sound right?
13:00 tempspace or is there something different to sync the returners
13:01 sebgoa joined #salt
13:03 tempspace then I execute salt 'salt*' test.ping --return sentry_common, but still get the same error and no debug log
13:03 bhosmer_ joined #salt
13:04 juicer2 joined #salt
13:04 drawsmcgraw Or maybe I'm going about it the wrong way. Maybe cmd.script is not the function I'm looking for when I want to run a Powershell script on a minion...?
13:04 elduderino joined #salt
13:12 tempspace When I run salt 'salt*' saltutil.sync_returners, it does return - returners.sentry_return
13:16 krissaxton joined #salt
13:17 tempspace Furao: Yeah, definitely not running still, removed the pillar and am not getting anything in the logs about that either
13:18 __gotcha joined #salt
13:25 jeddi is there any consensus on best practice for deploying software - in my case some one or more war files i need to build on my admin (master) and then push out.  do we just wrap shell scripts around it all, try to integrate fabric into play, or just lots of cmd.runs (back to shell scripts i guess).
13:25 wilkystyle joined #salt
13:25 wilkystyle left #salt
13:27 p3rror joined #salt
13:28 timl0101 joined #salt
13:28 racooper joined #salt
13:29 dcrouch joined #salt
13:30 tempspace jeddi: I'm still wrestling with that myself
13:30 tempspace jeddi: was thinking about making a module/state that does cap like deploy's
13:31 joehh jeddi: corey recommends wrapping the war file in a os package (deb/rpm) and using that to manage it. https://groups.google.com/d/topic/salt-users/Dkzv3qf2JrE/discussion
13:32 jescalan joined #salt
13:33 * MTecknology likes wrapping that stuff in packages...
13:34 * MTecknology used to have a package called <org_name>-system-scripts that was installed on every server. Might bring that back.
13:35 sebgoa joined #salt
13:39 EsmuPliks joined #salt
13:41 elduderino joined #salt
13:42 EsmuPliks hey guys
13:42 EsmuPliks checked the docs & logs, didn't find it
13:42 EsmuPliks is there any way to get salt to parallelize less aggressively & not restart services on all selected nodes at once?
13:43 EsmuPliks the use case currently is for an HBase cluster, which doesnt behave if I take all the regionservers down all at once
13:43 joehh Is this what you are looking for? http://docs.saltstack.com/topics/targeting/batch.html
13:43 EsmuPliks the best I've found is specifying nodegroups & then restarting them that way
13:44 EsmuPliks sure is
13:44 EsmuPliks thanks
13:55 cleeming[foxx] joined #salt
13:56 fragamus joined #salt
13:57 kho joined #salt
13:57 tempspace joined #salt
14:00 dhgbrg joined #salt
14:00 oliv_mc joined #salt
14:01 tempspace Furao: Well, now the message about not returning properly is gone, but it's still not working. Progress? :)
14:03 sarkis joined #salt
14:03 Oct can anyone see what's wrong here: http://uu.zoy.org/v/gunawo#clef=nvmhrfdfsheulete ?
14:03 Khollowa_ joined #salt
14:04 mannyt joined #salt
14:07 Furao tempspace: brb
14:08 felskrone joined #salt
14:09 lorimar joined #salt
14:10 dhgbrg joined #salt
14:11 Nexpro joined #salt
14:12 EugeneKay Yes, none of the things in that link are words.
14:13 DredTiger joined #salt
14:14 Oct indeed
14:15 aberant joined #salt
14:16 jdaggett joined #salt
14:17 terminalmage joined #salt
14:19 joehh Is git installed?
14:19 krak3n` joined #salt
14:19 joehh looking at https://github.com/saltstack/salt/blob/develop/salt/states/git.py in __virtual__
14:19 joehh return 'git' if __salt__['cmd.has_exec']('git') else False
14:19 Oct yes git is installed
14:20 joehh the line above checks to see if git is available. If it returns False, then the state will be unavailable
14:20 tempspace Furao: I see it executing now from the logger.debug line I put in, sentry_dsn is right
14:21 joehh on the path of the minion?
14:21 sarkis joined #salt
14:23 kho joined #salt
14:23 Oct well, previously today, I wrote state that would invoke git and it worked, so I guess nothing's broken
14:24 Oct ho.
14:24 elduderino joined #salt
14:24 Oct states shadowing, maybe
14:25 joehh could be - have you another state called git?
14:25 Oct the one I just spoke about :/
14:25 joehh I reckon that will be it
14:26 Oct oh thanks
14:26 Oct it's running
14:26 Newt[cz]1 joined #salt
14:28 joehh nw - you solved it yourself
14:28 aat joined #salt
14:29 jalbretsen joined #salt
14:29 mephx joined #salt
14:30 faeroe joined #salt
14:31 oliv_mc joined #salt
14:31 sarkis joined #salt
14:36 Furao tempspace: and what it does after that? any error?
14:37 tempspace Furao: no error at all
14:38 tempspace Furao: just no data in the stream
14:40 mannyt joined #salt
14:40 tempspace Furao:  I'm trying to debug the ret codes
14:41 sebgoa joined #salt
14:41 teskew joined #salt
14:45 UtahDave joined #salt
14:45 tempspace Furao: for a state that has a failure, I'm getting ret.get success 'True' retcode is '0'
14:45 tempspace so it's not firing off I believe
14:49 tempspace wonder why that's not working...
14:50 Furao well, it only send error to sentry
14:50 Furao not succes!
14:50 Furao you want every execution?
14:51 tempspace not at all
14:52 tempspace but if a highstate has a failure, isn't that considered an error?
14:52 ubercore joined #salt
14:53 Furao yes
14:53 tempspace Furao: right, so for some reason salt isn't doing that for me
14:53 Furao but a highstate contains a LOT of smaller results that some can contains success
14:54 ubercore Hi all! I'm a bit flummoxed by cmd_yaml. I'm using `wget -qO-` to grab some external yaml data. It doesn't seem to be applying any pillar data, though. I'm not sure how to tie together top.sls with the pillar data returned from cmd_yaml
14:54 Gifflen joined #salt
14:56 UtahDave You would only use pillar data in a top.sls to match on minions
14:56 tempspace Furao: right, but it seems like no matter what I do I can't get salt to consider anything an error
14:57 tempspace Furao: This is considered a success root@salt:/srv/salt/_returners# salt 'open5*' cmd.run kasdasdjkj --return sentry_common
14:57 ubercore I guess what I mean is, how is the pillar data returned to cmd_yaml applied? I calling a web service that returns valid yaml, but it never shows up in a minion's pillar data
14:57 ubercore s/I/I'm
15:05 elasticdog joined #salt
15:05 UtahDave ubercore: can you pastebin your external pillar config?
15:05 ubercore Sure, one second
15:08 tempspace Maybe I'm just confused, UtahDave might know too, if I run salt 'open5*' cmd.run kasdasdjkj --return sentry_common, shouldn't my ret.get('retcode') code be something other than 0
15:08 baniir joined #salt
15:11 ubercore UtahDave: I think I may have figured it out while getting an example together
15:11 UtahDave ah, good, ubercore
15:12 Ahlee having issues getting states to run when expected, http://pastebin.com/TTj8CMeF includes snippets of mater config, top.sls, and how i'm attempting to target with salt -N nodegroup state.highstate
15:13 UtahDave tempspace: yeah, retcode should give you the return code of the shell function you ran
15:14 ubercore UtahDave: Ok, so I think I'm in business. It brings up the question though -- can I target cmd_yaml pillar data on a grain? similar to how one would set it up in top.sls?
15:14 ivo joined #salt
15:14 ubercore Or is all external pillar data applied to all minions?
15:15 mannyt joined #salt
15:16 Guest7756 hello salt lovers!
15:16 UtahDave ubercore: the problem is that cmd_yaml is really just an example
15:16 Guest7756 is here anyone who can help me with the module "cp"
15:16 UtahDave You really really just want to create your own external pillar
15:17 UtahDave http://docs.saltstack.com/topics/development/external_pillars.html
15:17 ubercore OK. Thanks
15:17 UtahDave Guest7756: what problems are you having
15:17 UtahDave ?
15:17 UtahDave you're welcome, ubercore.
15:18 Guest7756 i'm trying to push a file from minions but i get always this error:
15:18 Guest7756 local variable 'auth' referenced before assignment
15:18 UtahDave Ahlee: your top.sls is malformed
15:18 Guest7756 even in  open mode!
15:18 UtahDave Guest7756: what version of salt are you on?
15:19 Guest7756 salt 0.15.3
15:20 UtahDave Ahlee: your top file should look more like this: http://pastebin.com/7AsVikBd
15:20 UtahDave Guest7756: What's the command you're trying to use?
15:20 Guest7756 salt '*' cp.push /path/to/file
15:24 UtahDave Guest7756: so you're trying to copy a file from the minion to the master?
15:24 Guest7756 exactly
15:24 UtahDave Guest7756: did you ad file_recv: True to your master config and restart the salt-master?
15:24 UtahDave s/ad/add
15:24 Guest7756 yes
15:25 UtahDave ok, cool.  Let me test here real quick.
15:25 Guest7756 thanks in advance
15:25 Ahlee YAML formating makes me understand why google switched to Go from Python.
15:26 chrisgilmerproj joined #salt
15:26 Tydock joined #salt
15:27 Tydock Morning everyone
15:28 Ahlee Thanks UtahDave.  Running the diff through xxd now to see space differences as I still don't see the difference, but copying and pasting yours in did allow it to run against a node
15:29 UtahDave Ahlee: I agree that yaml can be a pain sometimes, but any configuration format will require you to follow some kind of format
15:30 Ahlee yeah yeah
15:30 Ahlee :)
15:30 abyss42 joined #salt
15:30 Ahlee I absolutely must figure out whhy and how I'm coming up with the formatting I am.
15:30 UtahDave Tydock: morning!
15:31 Ahlee 99% of my issues thus far have been entirely self inflicted
15:31 Tydock I have two servers in the same nodegroup they are exactly the same but have different IP's is there a way to push the different IPs to the config file I am managing while keeping them in the same nodegroup, using pillar for other variables now...thanks
15:31 ageron joined #salt
15:32 Oct I'd like to get the sha1 of a deployed git repo and inject that in a states.cmd parameter, anyone knows how I could do that ?
15:32 UtahDave Guest7756: Hm. cp.push worked just fine for me.
15:32 Guest7756 that's strange
15:33 Guest7756 i have everything correct
15:35 UtahDave what os are you on?
15:35 Guest7756 ubuntu
15:35 Guest7756 12.04
15:35 UtahDave me, too
15:35 tempspace UtahDave: So is this a bug? http://pastebin.com/EhEnwHVK
15:36 clintberry joined #salt
15:36 UtahDave can you clone the salt repo and install over the top?   python setup.py install --force
15:36 Guest7756 i'll try
15:37 UtahDave tempspace: no, in that paste you're getting the correct response
15:37 UtahDave echo $? is referring to whether the "salt" command worked or not
15:38 UtahDave salt did indeed work in your example
15:39 tempspace UtahDave: I'm very confused then
15:39 tempspace ok, let me try this
15:39 abe_music joined #salt
15:41 efixit joined #salt
15:42 tempspace UtahDave: If I run this salt 'open5*' cmd.run kljkljklk --return sentry_common, ret.get('retcode') is 0
15:43 Gifflen joined #salt
15:44 tempspace shouldn't it be 127 there?
15:45 tempspace and ret.get('success', True) is also True
15:45 PentiumBug joined #salt
15:46 faldridge joined #salt
15:46 UtahDave tempspace: try running    salt 'open5*' cmd.run_all lkjljljljk
15:47 tempspace UtahDave: it writes that it failed with return code 127, but the actual ret.get('retcode') is 0
15:48 bemehow joined #salt
15:49 UtahDave where are you running  ret.get('retcode')  ?
15:50 tempspace in the returner function
15:53 tempspace UtahDave:  this is Furao's, I added a debug statement to line 53
15:53 jschadlick joined #salt
15:53 tempspace UtahDave: http://pastebin.com/SPVADnyc
15:54 tempspace which outputs: https://gist.github.com/anonymous/a3b76f322a37e71a823b
15:54 Furao yeah, the returner don't work in latest version of 0.15.3, so I updated it on my side to fix it. I should do a PR.
15:55 racooper before I go and break something, is this syntax correct for a statefile? http://pastebin.com/gf1rMn9u
15:56 UtahDave ok, so it looks like incorrect data is being passed into the returner, huh?
15:56 UtahDave Furao: what's your fix?
15:56 Furao https://github.com/saltstack/salt/blob/develop/salt/returners/sentry_return.py
15:57 Furao simplify and rewrite a few bit of it
15:57 m_george left #salt
15:57 UtahDave racooper: what are you trying to do?  I don't think that's quite right.  What doc or example are you following?
15:58 racooper honestly? didn't find a doc or example. trying to add a new yum repository if it doesn't exist on the minion.
15:59 UtahDave racooper: well, the pkg has no functions in it that deal with adding a repo. I'm just trying to understand why you're trying to use that state
15:59 fxdgear hey guys is there a way I can execute a salt command from a minion, to do something on a different minion?
16:00 PentiumBug Hi there!
16:00 PentiumBug (0.15.3 @ Ubuntu) I have a script (for firewall rule management) in /etc/init.d/ that has service semantics. That is, it is very convenient for me to be able to just do "service firewall start", "service firewall stop", "service firewall restart", etc. However, it does not run continuously since it is not an actual daemon. It *seems* to me that Salt considers the service as not started after running the script with "start". Is it because it scans the
16:00 PentiumBug process list?
16:00 racooper pkg.mod_repo says that "if the repo does not exist, it will be created, so long as [repo, name, baseurl] are specified".
16:00 racooper should say, yumpkg.mod_repo
16:00 UtahDave fxdgear: yeah, you'll want to use the peer interface
16:01 fxdgear UtahDave super
16:01 aberant joined #salt
16:01 * fxdgear goes digging
16:01 UtahDave PentiumBug: yes, I believe you're correct
16:01 sebgoa joined #salt
16:02 baniir i have a directory with files at /etc/nginx, but i'm getting "The following requisites were not found: watch: {'file': '/etc/nginx/*'}" when attempting state.highstate
16:02 aranhoide joined #salt
16:02 UtahDave racooper: I think what you want is the pkgrepo state:  http://docs.saltstack.com/ref/states/all/salt.states.pkgrepo.html#module-salt.states.pkgrepo
16:02 UtahDave baniir: you'll need to pastebin your sls file, but I'm guessing you don't have a state set up for /etc/nginx
16:02 racooper oh excellent.  Thanks!
16:03 UtahDave baniir: Salt doesn't look at the file system itself to check for requisites. It looks at the success/failure flag of other state declarations
16:03 tempspace baniir: That doesn't check the file system for /etc/nginx
16:03 Tydock found a post on how to template network interfaces http://cnygaard.blogspot.com/2012/11/how-to-template-eth0-address-with.html this answers my question
16:04 PentiumBug UtahDave: thanks... Is there a way to simulate or make Salt believe that "one off" scripts are like daemons running?
16:05 tempspace Tydock: I use {{ salt['network.ip_addrs']('eth0') | first }} in my jinja template
16:05 tempspace Tydock: slightly easier :)
16:06 baniir UtahDave, tempspace: thanks; my understanding was off. i'm looking into adding relevant state(s)
16:06 fxdgear UtahDave that's exactly what I wanted and more! :D thx
16:06 UtahDave PentiumBug: Hmm. well, I think you can pass in the sig of the service you're defining. Maybe you could pass in the sig of your firewall service.
16:06 tempspace UtahDave: think I should open a bug report for the retcode stuff?
16:06 UtahDave fxdgear: :)
16:07 tempspace baniir: No problem, been there
16:07 UtahDave It does seem like incorrect data is being passed in with the ret.  Furao, are you seeing that, too?
16:08 kermit joined #salt
16:08 Furao yes this is weird, last time I updated that returner I couldn
16:08 Furao 't find any cases where it failed
16:09 Furao and i added some code to cover failure such as unsupported return data format
16:09 Furao but, I think I did those tests on 0.15.2 and not 0.15.3
16:10 UtahDave tempspace: what version of salt are you on?
16:10 tempspace 0.15.3 from the debian repo
16:11 fragamus joined #salt
16:12 koolhead11|away joined #salt
16:13 jacksontj joined #salt
16:14 bemehow joined #salt
16:17 sebgoa joined #salt
16:18 longdays is there a salt module that would allow me to pull up a bash shell on a minion? I know this may sound crazy.
16:20 conan_the_destro joined #salt
16:21 jeddi you mean ssh straight to the box from the master?
16:22 jeddi a bash shell implies some interaction.
16:22 jeddi perhaps cmd.run ?
16:22 UtahDave tempspace: Yeah, I think this is a bug.  sudo salt-call cmd.run ljljlkj --return local
16:22 UtahDave also has retcode of 0
16:22 tempspace ok
16:22 UtahDave tempspace: would you mind opening an issue on this?
16:22 tempspace sure
16:23 UtahDave longdays: like jeddi said, you can just use cmd.run to execute whatever arbitrary cli command you'd like
16:23 UtahDave thanks, tempspace!
16:24 racooper UtahDave,  I'm now getting an error with pkgrepo. http://pastebin.com/Q3pu6wW4 has both the error and contents of the myrepo.sls file.
16:25 longdays UtahDave: jeddi: Thanks! I have been using cmd.run for mass changes. Really I am just being lazy and was poking around to see if I could just use salt to open a persistent ssh session vs just using the ssh tools already built :)
16:25 racooper I find various Python errors with this reported but I'm not yet familiar enough with python to apply those here
16:30 UtahDave racooper: I think it might be because it thinks your only item under comments is commented out.
16:31 jacksontj joined #salt
16:36 KyleG joined #salt
16:36 sgviking joined #salt
16:38 aberant joined #salt
16:38 racooper That's the exact format of the example in the salt.states.pkgrepo document you linked earlier. let me try it without the #
16:39 UtahDave I think I saw a bug report and then a bug fix recently for that
16:39 tempspace Does anybody have a web app for showing logs from a salt returner before I write my own?
16:39 racooper you're right, I removed the # and it worked but it didn't comment out the  comment string
16:41 jeddi longdays: i am sure that i recall bumping into something that'd give you an ssh into the remote box .. without needing to know the ip address. maybe it was something on salt-cloud.  hmm.
16:41 jlund joined #salt
16:43 PentiumBug joined #salt
16:45 racooper found the fix. https://github.com/saltstack/salt/commit/5570b4fa8a4e7d3051051ce0562e5df07c358f05
16:46 pwf joined #salt
16:47 UtahDave ah, good
16:48 bhosmer_ joined #salt
16:50 jacksontj joined #salt
16:54 laprice joined #salt
16:54 pwf joined #salt
16:55 laprice_ joined #salt
16:55 lyddonb joined #salt
16:56 pwf joined #salt
16:56 melinath joined #salt
16:57 seubert joined #salt
16:57 jphall joined #salt
16:58 bemehow joined #salt
17:10 Newt[cz] joined #salt
17:14 carlos_ joined #salt
17:16 oliv_mc joined #salt
17:19 Ryan_Lane joined #salt
17:22 [vaelen] joined #salt
17:23 xinkeT joined #salt
17:24 aberant joined #salt
17:26 X-warrior joined #salt
17:26 X-warrior Is there any program/script that generates a graph from my top.sls file? So I could debug it easier?
17:30 UtahDave X-warrior: have you tried   state.show_highstate,  state.show_sls  and related commands?
17:32 billyw joined #salt
17:33 billyw I'm trying to work out our VLAN acls for salt master/minion communication; will it require allowing new connections both ways?
17:34 faust joined #salt
17:34 billyw My dream would be allowing new connections from master to minion and only established connections from minion to master
17:35 pcarrier_ joined #salt
17:38 aranhoide joined #salt
17:38 eightyeight how do i use '*/15' in cron.present? salt isn't liking "- minute: */15"
17:38 faust joined #salt
17:38 eightyeight maybe wrap in single quotes?
17:39 aranhoide eigthyeight: what do you want to do? run something at minute 15 of every hour?   (I don't know much about cron, sorry)
17:39 UtahDave eightyeight: can you pastebin what you have so far?
17:39 eightyeight run something every 15 minutes
17:40 eightyeight command:
17:40 eightyeight cron.present:
17:40 eightyeight -user: root
17:40 aranhoide anyway you better wrap that, yes, otherwise it looks like a YAML reference
17:40 eightyeight - minute: */15
17:40 jacksontj with python state files, is there any way to pass down args/kwargs to it?
17:40 aranhoide &name and *name
17:40 aranhoide I mean, you better enclose it in quotes
17:43 eightyeight yup. single quotes ftw
17:43 UtahDave jacksontj: you'll want to use pillar for that.  You can pass in pillar data at the cli if that's what you're trying to do
17:44 jacksontj well, maybe i should explain what i'm trying to do to see if there is something else that already does what i'm trying to do
17:44 jacksontj back in the day (before requisite states) i made a runner/module combo to do deployments for a service of mine
17:45 jacksontj i want to get rid of all my custom code and go with just states
17:45 jacksontj but i have a few things which i'm not quite sure how to implement
17:45 jacksontj first off, i need to run commands before and after deployment-- which i can do with requires/requires_in stuff
17:46 jacksontj so thats good
17:46 jacksontj what i'm working on now is a quick rollback method basically
17:46 UtahDave ok. good so far
17:46 jacksontj the thing that makes my state file a bit confusing is that there are host level overrides all over creation
17:46 jacksontj so i was going to make a python state file which reads in some files and does some munging to determine which state you should have
17:47 jacksontj so i'm trying to determine the best way to do that
17:47 jacksontj i could either create an sls file per host (and avoid the py sls file)
17:47 jacksontj or stick with it, and have some sort of mapping files in salt's filesystem
17:47 jacksontj which the py renderer rips through and emits things
17:49 MTecknology You guys have any idea how I could keep a command from running unless a partition is mounted?
17:50 MTecknology a bit random, but I'm trying to work this into my states and having trouble... I want to have the salt master decrypt a drive on the minion and I want no states running on the minion until that happens
17:51 Ryan_Lane joined #salt
17:53 UtahDave jacksontj: can you pastebin an example?
17:53 jacksontj sure, let me make up some simple ones :)
17:53 mgw joined #salt
17:54 UtahDave great
17:55 Ryan_Lane1 joined #salt
17:55 Ryan_Lane joined #salt
17:56 ageron joined #salt
17:57 dthom91 joined #salt
17:58 Shea joined #salt
18:00 jacksontj UtahDave: k, here is a very overly simplistic example
18:00 jacksontj http://pastebin.com/3b5MyQj0
18:01 jacksontj basically my issue is that i have ~20+ hosts which there are usually at least 3 vairants out there (of configs and whatnot)
18:02 jacksontj so i *could* create some sls file that would work, but its fairly large (54 packages, 25 files, and a bunch of kernel params)
18:03 racooper sounds like it's time to do what I'm doing right now...standardize your hosts. I have just under 20, and it's going to be a pain.
18:03 UtahDave jacksontj: so basically you need to be able to specify that HostA has source: blah/blah, sourch_hash: blahllkjljjlkl  for it's haproxy.cfg?
18:03 jacksontj well for a bunch of things, configs and packages
18:03 jacksontj they are "test" hosts ;)
18:04 jacksontj that i think i can get through-- like i said i can use some python sls file to generate this based off range data etc.
18:04 UtahDave How are you keeping track of all these parameters right now?
18:04 jacksontj well, right now in a file in SVN-- which i want to move away from ;)
18:04 UtahDave I'm thinking that you might want to create a pillar file where you define all these
18:04 xinkeT joined #salt
18:05 UtahDave Then you could just have one definition for your haproxy.cfg in your sls file
18:06 jacksontj makes sense-- how would something like that look? and wouldn't that just make the pillar file just as messy?
18:06 jacksontj (haven't used pillar a lot ;) )
18:06 z3uS joined #salt
18:08 UtahDave jacksontj: well, with 54 packages and 25 files to manage it could get a little messy, but you have to have it somewhere.
18:08 UtahDave I guess you could keep all these variations in a database and use an external pillar, if you'd prefer to go that route
18:10 UtahDave Using pillar would allow your sls file to look more like this: http://pastebin.com/sE9AwYRs
18:12 jacksontj hmm, that does sound interesting-- although i don't really want to use a DB to do the pillar data
18:13 jacksontj for the example paste that you sent, what would the pillar file look like?
18:14 jacksontj because if the pillar file can be a YAML file or something then i could write some code to generate it :)
18:15 UtahDave jacksontj: yeah, it would be yaml.  just a sec for an example
18:16 jacksontj another random(ish) question how do you access salt modules etc within an sls file (or can you)
18:16 UtahDave jacksontj: would you prefer a separate yaml file for each minion? or one big file?
18:16 UtahDave yes, you can.
18:16 jacksontj a python sls file that is-- for example i cna't seem to figure out how to get pillar data
18:16 waverider joined #salt
18:17 UtahDave in that last paste   when I'm calling out to pillar.get, pillar.get is a Salt execution module
18:17 jacksontj UtahDave: if i do one per host, then i have to have another sls file to target right?
18:17 UtahDave nope
18:17 jacksontj ooo, lets see this file per host thing :)
18:17 jacksontj can you mcake that smae call in a python sls file?
18:17 jacksontj *make
18:17 jacksontj **same
18:17 jacksontj man, bad typing ;)
18:18 linjan joined #salt
18:19 UtahDave yeah, you can make the same calls, but I don't think you need that {{
18:19 UtahDave almost done with the example.  just another minute
18:21 jacksontj k
18:22 mikedawson joined #salt
18:23 UtahDave http://pastebin.com/WrPGmqEu
18:23 aberant joined #salt
18:24 UtahDave OK, so there are several files there
18:24 jacksontj then those files would just be yaml?
18:24 UtahDave yep
18:24 mgw joined #salt
18:24 UtahDave any type of valid yaml
18:25 jacksontj O.o this is awesome :D
18:26 juanlittledevil joined #salt
18:26 jdaggett joined #salt
18:26 jacksontj every time i want to implement something in salt, its already done and it makes me happy :D
18:27 jacksontj one last question though, once this is done i can do a controlled rollout by using batching
18:27 jacksontj but how would I make it stop if one failed?
18:27 jacksontj sounds like an overstate thing?
18:28 UtahDave yeah, that would be an overstate
18:28 JasonSwindle joined #salt
18:29 jacksontj k, let me see if i can throw together an example :)
18:29 UtahDave jacksontj: Hey, if there's any additions to the docs that would have helped with your situation, it would be awesome if you could make any suggestions
18:29 UtahDave Sure, let me know how it goes.
18:30 jacksontj yea, i'm thinking i'll write up a "how to deploy somethihng" -- more or less a walkthrough tutorial
18:31 UtahDave That would be really awesome.
18:31 UtahDave It's great to hear how people are using Salt in real world applications.
18:32 alexl joined #salt
18:34 pentabular joined #salt
18:35 eightyeight i want to change the $PATH variable in root's crontab(5). it should probably be the first line in the file. how can i add tihs?
18:35 eightyeight s/tihs/this/
18:36 felskrone joined #salt
18:36 juanlittledevil maybe file.sed?
18:36 pentabular eightyeight: yes, I think juanlittledevil is correct
18:38 eightyeight ok
18:41 UtahDave file.sed would work, but can get dicey very quickly.
18:41 eightyeight UtahDave: do you have a better suggestion?
18:41 Gifflen joined #salt
18:41 pentabular eightyeight: you might also template the file using file.managed
18:43 UtahDave yeah, I agree with pentabular. I'd lean more toward templating the file with file.managed as opposed to file.sed
18:45 mgw joined #salt
18:45 juanlittledevil would the file contain a jinja style template then?
18:46 eightyeight no. it will be static entries
18:47 juanlittledevil so you are suggesting replacing the file on the system with the one on the master.
18:49 mgw1 joined #salt
18:55 jacksontj UtahDave: fairly certain this is wrong (http://pastebin.com/RxbU3ntA)
18:56 jacksontj for this particular deployment thing i dont care what order the steps are done (in the case that ther eis haproxy + httpd+ something else)
18:56 UtahDave yeah, that's not going to work.
18:56 UtahDave Oh, wait
18:56 jacksontj i just care that you do N hosts at a time, and stop if one fails
18:56 UtahDave that's an overstate file, not a top.sls,  right?
18:56 jacksontj correct
18:56 jacksontj overstate
18:57 UtahDave ok, let me pull up the docs to make sure I steer you in the right direction
18:57 jacksontj ok :)
18:58 aat_ joined #salt
18:58 Shea May I ask for a little salt+git help? I am trying to push out some xml config files that my app needs. The xml is already in a git repo and so I would like salt to pull from that repo and manage the file.
18:58 Shea I entered some snippets of my configuration here: http://pastebin.com/Jm9xwU9k
19:00 Corey Holy crap, joehh is referring people to my crappy war-to-deb tool? :-)
19:00 jeddi Corey: is it crappy because it involves java?  or because it blows things up?
19:00 milind_ joined #salt
19:00 Corey jeddi: No, it's crappy because I wrote it in ~5 minutes. :-)
19:00 * jeddi is coincidentally, possibly, in the market for a war->deb tool.
19:00 jeddi ah.
19:01 nliadm jinja macros >_>
19:01 Corey jeddi: I don't (at the moment) work with Java, though that can always change. If you want to actually use it, I can delve into it and see what we can do. :)
19:01 jeddi Corey: how's it compare to fpm?
19:01 ZenoTasedro joined #salt
19:01 jeddi If you can remove your biases from the answer that'd be good :)
19:01 Corey jeddi: I was talking to Jordan Sissel about this in fact (he wrote FPM).
19:02 jeddi ahh - nice.
19:02 Corey jeddi: Mine's human readable, and doesn't give actual Debian folks fits.
19:02 Corey If neither of those matter to you, fpm is a decent way to go.
19:02 jeddi i thought fpm - though i've only read about it briefly, and that was a few weeks ago - handled java war distribution reasonably well?
19:02 JordanRinke joined #salt
19:02 Corey Packaging, not distribution. :-)
19:02 jeddi Corey: i'm hoping you were more tactful when you spoke with jordan!
19:03 jeddi packaging, sorry, implying subsequent ease of distribution.
19:03 Corey jeddi: That was his line, actually, not mine.
19:03 Corey We had beers in our hands at the time.
19:04 Corey jeddi: For the way I'd do war distribution, fpm versus a "proper" package doesn't matter much. I'd have whatever's creating the war (Jenkins?) spin off a separate job.
19:04 Corey jeddi: That job builds the war whichever way you like, shoves it to the repository server you've already got, and invokes http://www.sequestered.net/~cquinn/add_package_to_repo.sh or similar.
19:04 jeddi oh, i see joehh mentioned your war file packager a few hours ago - sorry i missed that reference.
19:05 Corey Yeah, that's how I got dragged into this. :-)
19:05 Corey The challenge of config management with Salt or similar is that invariably it always comes down to a discussion of best practices in a larger sense.
19:06 UtahDave jacksontj: OK, just had a short convo about some of these things with the overstate
19:06 jacksontj k
19:06 Corey "We use cmd.run to do a git checkout and then make, make install..." No no no!
19:06 UtahDave jacksontj: So your overstate should work fine.
19:06 jacksontj oh, cool :)
19:06 jeddi Corey: my knowledge of the insides of java environments is pretty minimal.  (so far that's kept me happy)    So, I'd maven build the cruft here, package it with packaging-stub, ship it, pkg.install it - is this transparent / seamless to things like tomcat?  i'm guessing thta's just the configuration at tomcat end to point to wherever these war files in your packager deploy to (i think currently we go somewhere under /opt).
19:06 jacksontj so i'd just add all the sls files that make up my app
19:07 UtahDave There's  a  - batch   option there for batching, but there's a bug with it right now.  :(
19:07 jacksontj then it'll stop progressing through the hosts if it fails on one?
19:07 jeddi oh, heck, yeah, definitely not ever going to start making and building things on production boxes.
19:07 UtahDave Yes, it will stop if any of the hosts fail
19:07 jacksontj cool! we can always fix bugs in batching ;)
19:07 raghu joined #salt
19:07 Corey jeddi: Exactly.
19:07 jacksontj harder to fix architecture ;)
19:07 UtahDave :)  yes
19:07 jeddi Corey: discussions of best practices .. could be more frequent and prevalent .. and documented in wikis .. I think :)
19:08 jacksontj k, let me get some working examples here locally
19:08 UtahDave also,  the matching in the overstate is always a compound matcher.
19:08 jacksontj if i can get the proof of concept working-- i'll do the rest of it tomorrow :)
19:08 Corey jeddi: Then either set the package to restart tomcat if needed, or have the salt state handle it. Enforce your_homegrown_pacakge as pkg.latest, then have the service watch the package.
19:08 UtahDave so if you wanted to match on a grain it would look like:   - match: G@os:Ubuntu
19:08 jeddi Corey: cool.  i'll dive into my guy's dev / build scripts .. i recall him swearing at maven periodically, and threatening to move to ant .. but then he tries that and swears some more and says how nice maven is.
19:08 Corey jeddi: Maven or Ant both work, and both are supported by Jenkins.
19:09 Corey jeddi: I was having Jenkins build the latest packages and push them to a "dev" repository that the dev enviroments hit. I'd then promote selected packages.
19:09 jeddi Corey: ack.  i'll have a read through your script here and try to get my head around it.  the versioning is .. oh, that'll be changing the control file.  easy.
19:09 jeddi Corey: this all sounds potentially blissful.
19:10 Corey jeddi: Right, it's not great magic really. :-)
19:10 jeddi Corey: something that takes me a day to sort out properly .. but saves me 15 minutes of my life every week of so .. is approved magic.
19:10 Corey jeddi: dch -i is what I use in RealDebs to change the changelog. If you've interest I can dig out what I was having Jenkins do, which was "stuff the git changelog into the debian changelog"
19:11 jeddi dch is part of dchroot package, yeah?
19:12 jeddi Corey: if you're happy to - might be worth chucking into the readme.md on your packaging-stub repo/
19:12 Corey jeddi: "Devscripts" provides dch.
19:12 jeddi taa.
19:13 Corey debchange  -  Tool  for  maintenance  of the debian/changelog file in a source package
19:13 jacksontj UtahDave: does pillar support multi level keys?
19:14 aat joined #salt
19:14 Shea I am not understanding the sat + gitfs documentation at all. I have a fileserver_backend and a gitfs_remote set up in my master script and in my init.sls I have a file.managed.
19:14 Shea I would like the file.managed to pull from the git repo. Does it work that way?
19:14 Corey jeddi: My crappy stuff got supplanted it seems: http://jenkins-debian-glue.org/
19:15 jeddi looks like i may have to consider cranking up a jenkins instance again.
19:15 Corey That's much more robust than what I built, I'd suggest that. :-)
19:16 alexl joined #salt
19:16 jeddi Corey: cool - will watch the video, feel overwhelmed, and then have a glass of wine.
19:17 UtahDave jacksontj: yes, pillars do support that
19:17 Shea I am using this documentation but it is not clear what to do after you have the repo set up. http://docs.saltstack.com/topics/tutorials/gitfs.html
19:17 jacksontj so it would be pillar.get(key1:key2)?
19:18 pentabular Shea: I think if you look in the config file there is an example of how to set a git repo as the file_roots
19:18 oz_akan joined #salt
19:20 Shea @pentabular you mean the /etc/salt/master config file? I believe that I have the gitfs set up correctly, but my problem is getting salt to distribute files from that repo
19:21 UtahDave jacksontj: yep!
19:22 pentabular Shea: iirc you would just use file.managed with salt:/<something/ as the source. *IIRC*
19:22 jacksontj saweet :)
19:23 Shea My repo looks like this: git@github.com:shealutton/junktest33.git and I am trying to pull the readme. file.managed: - source: junktest33://README.md
19:24 UtahDave Shea: once you have gitfs set up, then you just use   - source: salt://README.md
19:24 UtahDave your templates don't know anything about git.
19:24 Shea ah, I will give that a shot.
19:25 UtahDave Shea: that's assuming you have gitfs all configured correctly
19:29 waverider joined #salt
19:31 jacksontj UtahDave: hmm, seem to he having some pillar issues. If i do pillar.data i see the values i want, but if i do pillar.get KEY i get nothing
19:32 Shea I am still getting errors when I run a highstate. Sp perhaps I don't have the gitfs set correctly. The error I see on a highstate is Source file salt://README.md not found. My config is here: http://pastebin.com/B46M0mxX
19:32 UtahDave jacksontj: what's the command you're running?
19:32 jacksontj sudo salt \* pillar.data to see it
19:32 jacksontj and
19:32 jacksontj sudo salt \* pillar.get haproxy
19:32 jacksontj to get at it
19:32 jacksontj with .data i see it in the return output, with .get i get nothing :(
19:32 mgw joined #salt
19:33 UtahDave Shea:   - git://github.com/shealutton/junktest33.git
19:33 UtahDave Shea: http://docs.saltstack.com/topics/tutorials/gitfs.html?highlight=gitfs#simple-configuration
19:34 UtahDave jacksontj: that's odd.  try running   salt \* saltutil.refresh_pillar
19:34 UtahDave and then trying pillar.get again.
19:34 UtahDave what version of Salt are you on, jacksontj?
19:35 jacksontj k, that refresh did it
19:35 jacksontj i'm running 0.14 right now on my tower -- my dev build is 0.15 but i have it torn apart adding in some features :)
19:35 UtahDave Hm. that's interesting. I wonder why pillar.data worked, but pillar.get didn't.
19:38 pentabular joined #salt
19:41 jacksontj UtahDave: in pillar, if (in the example you sent) HostA-configs has a key in common with "common-values" who wins?
19:41 jacksontj seems that first one with the key wins
19:45 jschadlick joined #salt
19:45 jacksontj looks like regardless of order the defaults section wins
19:46 UtahDave Yeah, I'm not sure of the exact behavior there.  I know that one will overwrite the other.
19:46 Corey jeddi: Sorry about that, had to relocate to my favorite coworking space in the world.
19:47 jacksontj seems that the default one always overwrites regardless of order which seems odd
19:47 UtahDave it gets compiled into a big dictionary and conflicting keys will fight eachother
19:48 jacksontj yea, which is a bit annoying :/ i'd rather the order determine a winner
19:48 mgw joined #salt
19:48 jacksontj then i could put common on top then overrides farther down
19:48 jacksontj this way i have to make sure there aren't conflicts-- not impossible, just a nuisance ;)
19:50 juanlittledevil joined #salt
19:51 jeddi Corey: no problem.  i procrastinated and decided to start cooking dinner.
19:52 ProT-0-TypE joined #salt
19:53 UtahDave jacksontj: The best answer, until a way to do this in the top.sls is created, is to have the defaults be in your pillar.get calls in your sls files
19:54 jacksontj that would work, although i'd have to change the pillar AND the state file if i made a change to the defaults-- not the end of the world-- just a bit more messy
19:55 jacksontj i think i'll try to write it so that it won't have the keys in multiple files and see how that goes ;)
19:55 UtahDave That's true.
19:55 abe_music joined #salt
19:55 UtahDave cool
19:55 jacksontj i'll have to try to remember to look into making that order matter
19:58 p3rror joined #salt
19:59 aleszoulek joined #salt
20:02 jdaggett joined #salt
20:05 ageron joined #salt
20:13 alexl left #salt
20:17 jschadlick joined #salt
20:19 racooper would there be any concerns with cmd.run doing "chage -m 1 -M 180 -W 7 user" in a state file?
20:20 alexl joined #salt
20:22 jacksontj UtahDave: k, got almost all of it working, just one more bump
20:22 jacksontj with my state file (http://pastebin.com/x1LvtwnS) ir ian'r eunninf rhw oor script when there is a change to the config file
20:22 mgw joined #salt
20:25 Corey jacksontj: Chew, swallow, then speak. :-)
20:25 jacksontj lol orr by a character
20:25 KyleG off
20:25 KyleG lol
20:25 jacksontj rofl
20:25 jacksontj man bad day for typing
20:25 KyleG Switch to Dvorak and have fun
20:25 jacksontj with that state file it isn't running the oor script ^^
20:26 jacksontj looks like i need a watch_in on the file.managed?
20:27 gyovanni joined #salt
20:27 jacksontj got it ;)
20:28 jacksontj yea, added that watch_in and it works now :)
20:28 UtahDave ah, good.  I was just reading through it and was going to suggest that
20:28 sebgoa joined #salt
20:28 jacksontj just to clarify though, if i change the package version AND the file will it run both scripts twice? or just once?
20:28 jacksontj (i'm trying it)
20:29 UtahDave It should recognize that they both are watching it and just run both scripts once
20:29 jacksontj ok, i think i actually want to change how i have this watch_ in done
20:30 jacksontj i want the service to restart, not the script to run (although restart of service should run the scripts)
20:31 giantlock joined #salt
20:36 jacksontj so it looks like if i just change one of the config files for haproxy it gets restarted, and the ir script gets run, but not oor
20:36 kermit joined #salt
20:41 jacksontj UtahDave: ^
20:43 mgw joined #salt
20:45 carlos_ joined #salt
20:47 linjan joined #salt
20:48 jacksontj need a way for it to run that oor command before restarting the service
20:50 maspwr joined #salt
20:50 UtahDave hm. let me see
20:50 jacksontj if i add that watch_in on the file it works-- but that seems incorrect
20:51 UtahDave why's that?
20:51 jacksontj well the watch_in is saying if i change run this
20:51 jacksontj but if the file cahnges i don't want to run that command i want to restart the service
20:51 jacksontj and the service block should maintain the requirement of running scripts
20:52 jacksontj so by adding the watch: file to the service i'd expect it to work
20:53 UtahDave ok, so what's the order of events that you want to happen, jacksontj?
20:57 jacksontj i'd like (if there is a change to make) for the oor script to be run, then changes happen (files and packages) then the IR script
20:58 felixhummel joined #salt
21:00 jacksontj adding those watch_in's to the files works-- i just feel that that is going to get fairly confusing as it gets to be a big state file-- since the service already is set up to "watch" the file
21:03 UtahDave jacksontj: can you pastebin your latest?
21:04 efixit joined #salt
21:04 jacksontj http://pastebin.com/7SVFzj05
21:04 jacksontj i took out the second servie in there, because its not needed to repro this :)
21:04 hhtp joined #salt
21:05 jacksontj so that has the watch_in on the file
21:05 jacksontj which *works* but i think is a bit comfusing
21:05 jacksontj *confusing
21:05 jdaggett joined #salt
21:06 abe_music can someone help me diagnose this problem that just happened while deploying an ubuntu machine with salt-cloud? fluke maybe? if so, i wonder how i might be able to detect and fail gracefully - https://gist.github.com/abemusic/5777344
21:07 UtahDave jacksontj: you could change that watch_in to a watch and move it to the cmd.wait, if that's clearer for you
21:08 jacksontj oh, so i can set a watch on the remove_from_lb?
21:08 UtahDave abe_music: Hm. Not sure. That might be a packaging bug.  Can you ssh into that vm and try to run a sudo apt-get install salt    ?
21:09 abe_music UtahDave: yup, just a sec
21:09 UtahDave jacksontj: yeah,  watch and watch_in are inverses of eachother
21:09 abe_music UtahDave: oh interesting…Unable to locate package salt
21:09 jacksontj so i could set remove_from_lb's watch to haproxy, then since haproxy is already watching the file -- would it run oor before restarting if the file changed?
21:10 abe_music err, should be salt-minion, right UtahDave ? :)
21:10 abe_music UtahDave: ok that fails too, but with the error in my linked gist above
21:11 abe_music UtahDave: python-support in fact doesn't appear to be available with my configured apt repositories….that could be an issue
21:11 UtahDave abe_music: did you add the salt ppa already?
21:12 UtahDave jacksontj: yeah, I think that should work
21:12 jacksontj ok, i'll give that a shot-- i think that'd be cleaner :)
21:13 abe_music UtahDave: it's installed in /etc/apt/sources.list.d/saltstack.list
21:13 abe_music UtahDave: after an apt-get update it found it…odd. it's been working all day until just then. i'll terminate and launch the vm again via salt-cloud
21:13 UtahDave ok, weird
21:14 AviMarcus joined #salt
21:17 mgw joined #salt
21:18 JasonSwindle joined #salt
21:18 JasonSwindle left #salt
21:19 bemehow joined #salt
21:22 juicer2 Does salt '*' cp.push in epel 0.15.1 ?
21:22 juicer2 *work in epel 0.15.1
21:23 X-warrior if I want to put 2 file.directory 'actions' on the same file but with different requires... how could I achieve that?
21:25 UtahDave juicer2: Yeah, I think cp.push was added in 0.15.0
21:25 UtahDave X-warrior: can you pastebin what you've tried so far? I'm not quite understanding
21:25 sfvivek joined #salt
21:26 juicer2 UtahDave: I'm getting  http://pastebin.com/37xnMA6T
21:26 sfvivek qq, can we get a history on what all commands the minions ran over the past few days?
21:26 juicer2 UtahDave 0.15.1 from epel on master and minion
21:27 juicer2 UtahDave: and I do have file_recv: True in master config on my salt master
21:27 UtahDave sfvivek: you can query the job cache
21:27 UtahDave by default the job cache is kept around for 24 hours
21:27 X-warrior UtahDave: something like this: http://pastebin.com/Zi5BZ2Gz
21:27 UtahDave juicer2: can you try 0.15.3 in epel-testing?
21:28 UtahDave X-warrior: you can't have two file.directory's under the same ID Declaration
21:28 juicer2 UtahDave: on minion or master? both?
21:28 UtahDave juicer2: I'd recommend both
21:28 juicer2 UtahDave: k thx, will try
21:28 X-warrior UtahDave: I know, but is there anyway to achieve this behavior?
21:29 kermit joined #salt
21:29 sfvivek I don't have access to the master @UtahDave: …but I do have access to the minion host
21:29 sfvivek can I still be able to see what commands are executed on the minion @UtahDave
21:29 UtahDave X-warrior: I don't understand. You want to create a /var/lib/postgreql/9.2/ directory structure with user and group of nic and nic,  and then recreate /var/lib/postgreql/9.2/ with user and group of postgres and postgress?
21:30 X-warrior update to postgres and postgres
21:31 UtahDave X-warrior: I'm still not following you
21:31 baniir joined #salt
21:31 UtahDave sfvivek: job cache is kept on the master.
21:31 jay UtahDave: kinda got there in the end ... with hell in the middle - I'm pretty convinced cobbler.py isnt quite right
21:31 juicer2 UtahDave: upgraded minion and master to 0.15.3 from epel-testing, same error when trying cp.push
21:32 sfvivek aah okk @UtahDave…thanks, i will have someone look it for me then
21:32 UtahDave sfvivek: cool
21:32 X-warrior I'm creating /var/lib/postgresql/9.2 and I have /data/postgre, then I mount /var/lib/postgresql/9.2/main (it is a mount to /data/postgre)... after this, I install postgresql, so it data folder will be /data/postgre, and then I want to change the permissions to postgres user, so just it can use it
21:33 UtahDave juicer2:
21:34 juanlittledevil joined #salt
21:36 UtahDave X-warrior: ok, then I would use 2 different ID Declarations and have one require the other
21:36 bemehow_ joined #salt
21:36 UtahDave jay: Hm. ok.  Is it working now?
21:37 X-warrior UtahDave: but how can I have different IDS and change the permissions of a folder? there isn't a name property on file.directory, is there?
21:37 UtahDave sure there is, X-warrior
21:39 jescalan joined #salt
21:39 UtahDave http://pastebin.com/d3XRzcXGX-warrior: something like this:
21:39 jay UtahDave: http://pastebin.com/LnKJ7nSj
21:40 jay kinda ... with some brutal hacks
21:40 jescalan anyone have a solid postgres config sly?
21:40 jescalan sls*
21:40 jescalan just the basic setup stuff, creating a root user
21:41 UtahDave mgw: hey, would you mind looking at jay's pastebin?  He's been having trouble getting the ext_pillar with cobbler
21:42 felixhummel joined #salt
21:46 X-warrior UtahDave: ty, will try it
21:46 X-warrior have a good one
21:46 X-warrior going to my class now
21:46 X-warrior later
21:47 jay is this helpful ? http://pastebin.com/VwFV5xia
21:47 joehh joined #salt
21:48 jay _all_ I have done there is uncomment   - key: cobbler  and added a couple of debug print lines which I've highlighted and I get all the TypeError: unhashable type: 'dict'
21:48 maspwr joined #salt
21:49 jdaggett joined #salt
21:50 pcarrier_ joined #salt
21:50 alan_ joined #salt
21:51 alan_ joined #salt
21:51 alan__ joined #salt
21:52 alangarf joined #salt
21:54 jay useful or no ? I could do another couple of dumps if you want .. otherwise I'm gonna bail .. 15 hours on this yesterday and I'm pretty tired :|
21:55 UtahDave jay: yeah, let's continue this tomorrow. I've got some deadlines to meet this afternoon on some stuff
21:56 alangarf joined #salt
21:56 jay no worries, my hack gets my by to be honeest, I dont mind doing a few pastebins if it helps give back to the community tho
21:56 jay *gets me by
21:56 UtahDave cool, thanks, jay
21:57 alangarf Hey guys, anyone got a good example of getting salt mine to work on a minion using the pillar?
21:57 alangarf The docs mention it, and I'd rather not much with the minion config if I can avoid it
21:58 alangarf I've dug through the code a fair bit, but I can't for the life of me see where it's done
21:59 mgw UtahDave, looking now
21:59 mgw It's been awhile since I've touched it
22:00 jay I'll hover for a short while incase you want to get me  to do anything .. if ur talking about that anyhow
22:02 mgw jay: yeah, I'm looking at it
22:05 felixhummel joined #salt
22:05 godber_ joined #salt
22:05 godber_ is there any other cleanup involved in removing a salt minion other than deleting its key?
22:08 UtahDave godber_: cleanup on the master?
22:08 alangarf joined #salt
22:10 godber_ UtahDave: yeah, the minion host is toast ...
22:10 UtahDave yeah,  salt-key -d 'minionname'
22:10 godber_ what should be done on the master to remove it
22:11 godber_ ok
22:11 godber_ then any state and pillar stuff that directly addressed it
22:11 godber_ but there is no other cached state I need to worry about presumably
22:12 UtahDave well, there will probably be some cached info in /var/cache/salt/*
22:12 mgw jay: try leaving user/pass blank
22:12 mgw and use standard url scheme
22:12 UtahDave but I wouldn't worry about it.  The job cache will flush itout in 24 hours
22:12 mgw cobbler.url: http://user:pass@localhost/
22:12 godber_ yeah, great!  thanks!
22:13 mgw for that part of the problem
22:13 jay no cobbler_api on the end ?
22:13 mgw yes, cobbler_api if that's where your api leaves
22:13 mgw which is probably the case
22:14 mgw If that works, we can just drop that part of the code
22:15 jay hah .. well sort of ...
22:15 jay new pastebin incoming in a sec
22:17 clintberry joined #salt
22:18 jay http://pastebin.com/uQPNdNci
22:19 jay I'd say it blatantly just ignored my authentication
22:19 godber_ Oh, UtahDave, this is what I ended up doing yesterday with my "test for file existance" question:
22:19 godber_ https://gist.github.com/godber/5777861
22:19 mgw jay: it did. I just read some docs. That's not how cobbler auths
22:19 mgw but I think I see what needs to change now
22:19 mgw one sec
22:19 UtahDave ah, nice solution,  godber_
22:19 godber_ I ended up using cp.hash_file to test for a file
22:21 UtahDave yeah, good idea
22:23 mgw jay: onboard wifi is acting up, if I drop off, ping me later tonight or tomorrow. I do see exactly what needs to change for this part of your problem
22:24 jay okies ... can I leave you an email address if you want me to test stuff for you ?
22:25 mgw sure, PM me
22:26 mgw I'm going to send you some untested code in a minute
22:26 jay cool :)
22:27 mgw jay: https://gist.github.com/mgwilliams/1c92cdcb446dc48ba521
22:28 oliv_mc joined #salt
22:28 mgw I've no idea where I got that original code from, but the auth should work
22:28 mgw (with the code in the gist)
22:29 jay anything you want in /etc/salt/master .. I'm just pulling it down now
22:29 mgw the original — cobbler.user, cobbler.password
22:29 mgw leave key and only out for now
22:29 mgw I didn't touch that code
22:30 oliv_mc joined #salt
22:33 jay possible bearer of bad news .... http://pastebin.com/kj5KHwvM
22:33 maspwr joined #salt
22:39 fragamus auser are you here
22:39 sarkis joined #salt
22:39 mgw jay: my mistake, one second
22:40 mgw https://gist.github.com/mgwilliams/1c92cdcb446dc48ba521#file-cobbler-py-L60
22:40 pcarrier_ joined #salt
22:42 jay seemed to take the token as the minion_id I think . Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'profile not found: cNVx2P0605gOtBk3VbgpWl+r0xDj6zDfDA=='">
22:44 mgw jay: try switching them
22:48 jay heh, my thought .. kinda ... then I get http://pastebin.com/B9BjqSkP and we are able to look up a "distribution" rather than a host
22:53 mgw joined #salt
22:57 druonysus joined #salt
22:57 druonysus joined #salt
22:58 jdenning joined #salt
23:00 jdenning joined #salt
23:00 jescalan can you require postgres_user
23:00 jescalan ?
23:01 jescalan sorry i mean can you have one command depend on postgres_user
23:01 jescalan as in:
23:01 jescalan - require:
23:02 jescalan - postgres_user: root
23:05 bemehow joined #salt
23:06 jalbretsen joined #salt
23:07 salticus joined #salt
23:07 mgw only should looke like this:
23:08 kermit joined #salt
23:14 jescalan hm?
23:20 oz_akan joined #salt
23:21 jschadlick joined #salt
23:21 pcarrier_ joined #salt
23:23 bemehow_ joined #salt
23:23 bemehow joined #salt
23:31 cxz joined #salt
23:34 pentabular joined #salt
23:35 pepper joined #salt
23:36 adotbrown joined #salt
23:37 Deece joined #salt
23:37 Deece How do I get client_acl to accept a salt-call on a minion without sudo?
23:38 Deece i thought I could do the same thingas I do on the master, but the perms fail.
23:47 mirrorbox joined #salt
23:52 jslatts joined #salt
23:56 dcrouch joined #salt

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