Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-06-17

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

All times shown according to UTC.

Time Nick Message
00:02 bfrog I'll check it out then
00:03 davidone joined #salt
00:04 pcarrier_ joined #salt
00:04 [vaelen] joined #salt
00:05 erasmas joined #salt
00:10 alekibango bfrog: for simple uses, fabric might work too..
00:10 alekibango esp. if you are python lover
00:17 adotbrown joined #salt
00:18 mgw joined #salt
00:25 UForgotten joined #salt
00:39 bhosmer joined #salt
00:42 __number5__ joined #salt
00:47 Deece joined #salt
00:50 Gwayne joined #salt
00:50 Gwayne joined #salt
00:50 krissaxton joined #salt
00:55 cossovich joined #salt
01:00 danieljn_ joined #salt
01:01 danieljn_ left #salt
01:01 jeddi joined #salt
01:22 bob24 joined #salt
01:23 bob24 Hey guys. Quick question: is there any premade salt module to install a package from source?
01:24 james4k i was just looking at this: http://docs.saltstack.com/ref/states/all/salt.states.pkg.html#module-salt.states.pkg
01:25 james4k see the 'sources' arg
01:26 bob24 james4k: awesome! thanks
01:27 faldridge joined #salt
01:27 bob24 is there another module that will actually install, unpack, configure, and make it on the spot?
01:28 bob24 sorry, *download, unpack, configure, and make
01:28 james4k oh, i dont know about that
01:28 james4k im pretty new to salt myself
01:28 bob24 I guess I could try to use commands one-by-one
01:31 Nexpro joined #salt
01:37 james4k not sure how to update an installed package from source without using pkgrepo which seems quite unnecessary
01:38 james4k updating the sls to specify a new version of the .deb, and then calling highstate, doesn't seem to be enough
01:42 Furao bob24: https://github.com/bclermont/states/blob/master/states/_states/pkg_file.py#L16
01:42 Furao I wrote that before official pkg state had a way to specify a remote pkg file.
01:42 Furao it work with .deb only
01:43 Furao as I don't care with .rpm
01:48 aat joined #salt
01:49 bob24 Furao: cool, I guess I'll use that then
02:04 felixhummel joined #salt
02:05 pcarrier_ joined #salt
02:05 jeddi bob24:  i'd suggest, as far as best practices go, that you don't want each of your minions downloading source, and acquiring all the relevant build-necessary packages, and then building locally.
02:06 bob24 jeddi: you're right... it would be much cleaner to pack it up in a deb
02:07 jeddi bob24: i'm sure there are exceptions . but .. it's a bit of a security nightmare to start doing that kind of thing i've found.
02:18 idkfa joined #salt
02:23 pentabular joined #salt
02:28 austin987 joined #salt
03:00 pentabular joined #salt
03:15 Newt[cz] joined #salt
03:24 Newt[cz] joined #salt
03:28 oz_akan joined #salt
03:39 Newt[cz] joined #salt
03:48 cleeming[foxx] man
03:48 cleeming[foxx] https://github.com/saltstack/salt/issues/5567
03:49 cleeming[foxx] i emerged 5 hours later, after being dragged into the rabbit hole and gang raped by alice herself.
03:53 adotbrown joined #salt
03:53 Newt[cz] joined #salt
04:10 Katafalkas joined #salt
04:17 cossovich joined #salt
04:19 todayman joined #salt
04:23 aat joined #salt
04:25 todayman When does salt apply states?
04:25 todayman I've gone through the docs, and they seem to have the attitude that I don't need to worry too much, (and I don't want to).  But I'd like to have some intuition about it.
04:31 Furao when you run state.highstate
04:31 Furao or if you ask the minion to run state.highstate in it's schedule
04:35 jalbretsen joined #salt
04:36 todayman Got it.  That helps a lot.
04:37 Nexpro1 joined #salt
04:42 efixit joined #salt
04:52 cxz hey guys
04:52 cxz after creating a node with salt-cloud
04:52 cxz it said this during the salt-cloud command:
04:52 cxz [INFO    ] Failed to get node data. Attempts: 1
04:52 cxz tried 10 times without any luck
04:53 cxz is something wrong here?
04:58 faldridge joined #salt
05:04 felskrone joined #salt
05:11 todayman left #salt
05:18 zonk1024 joined #salt
05:30 oz_akan joined #salt
05:43 Ivo joined #salt
05:44 zonk1024 joined #salt
05:45 azbarcea joined #salt
05:45 azbarcea_ joined #salt
05:46 azbarcea__ joined #salt
06:05 linjan joined #salt
06:06 necronian joined #salt
06:11 Ryan_Lane joined #salt
06:15 the_drow joined #salt
06:17 the_drow I'm using a masterless salty-vagrant VM. Where do I need to place files in order to be accessable from salt://...
06:21 waverider joined #salt
06:25 joehh the_drow: I haven't tried it but I belive /srv/salt
06:30 the_drow can I use file.managed to manage multiple files?
06:31 joehh There is file.recurse for all files in a directory
06:32 joehh otherwise, i believe a jinja loop around multiple file.managed might be your best option
06:36 f4cl3y joined #salt
06:37 ollins joined #salt
06:39 __gotcha joined #salt
06:39 __gotcha joined #salt
06:39 Newt[cz]1 joined #salt
06:40 Newt[cz]2 joined #salt
07:20 krissaxton joined #salt
07:46 Lucas joined #salt
07:47 whiskybar joined #salt
07:48 oliv_mc joined #salt
07:56 whiskybar1 joined #salt
07:56 krissaxton joined #salt
08:00 scott_w joined #salt
08:03 faust joined #salt
08:14 barracuda joined #salt
08:20 vaxholm joined #salt
08:23 felixhummel joined #salt
08:28 zooz joined #salt
08:29 krak3n` joined #salt
08:33 wunki left #salt
08:46 efixit joined #salt
08:55 backjlack joined #salt
08:59 efixit joined #salt
09:06 scott_w joined #salt
09:09 Valda joined #salt
09:13 Odd_Bloke We have a django-project state that puts a Django project on a box based on pillar data.
09:14 Odd_Bloke e.g. /opt/blah/{{ pillar['project_name']
09:14 Valdo joined #salt
09:14 Odd_Bloke We would now like to put more than one Django project on a box.
09:14 yota joined #salt
09:14 Odd_Bloke Is there any way we can parameterise our django-project state to allow its reuse?
09:14 tseNkiN joined #salt
09:15 Odd_Bloke I guess an enormous for loop would get the job done...
09:15 fspot joined #salt
09:20 krissaxton joined #salt
09:22 lynxman joined #salt
09:31 EugeneKay Yup. And make project_name into projects
09:37 krissaxton joined #salt
09:42 loveshell joined #salt
09:42 loveshell hi
09:42 loveshell how can i test salt Enterprise version?
09:45 TobiasAberg joined #salt
09:51 tmmt_ joined #salt
09:54 fredvd joined #salt
09:58 bhosmer joined #salt
10:07 Newt[cz] joined #salt
10:12 Furao there is a salt enterprise version?
10:13 Furao does it come with the same bug as the OSS one?
10:24 adotbrown joined #salt
10:26 zloidemon Hello, how does salt check service running?
10:34 canci_ zloidemon: depends on the backend. it will usually use the appropriate status command
10:35 zloidemon canci_: I'm trying it on debian. But It doens't work with nsd3/unbound because its services isn't supporting 'status' command.
10:36 canci_ on debian it runs 'service <name> status'
10:37 canci_ zloidemon: service.running has an option ``sig`` described as 'The string to search for when looking for the service process with ps'
10:37 danieljn joined #salt
10:38 canci_ zloidemon: I am not sure but maybe this could be worth a try. Although these constructs often are somewhat fragile :/
10:38 zloidemon Hmm..
10:39 canci_ I thing sig is indeed intended for such cases
10:40 canci_ though I must say that the specific code hurts my eyes
10:40 zloidemon canci_: Might I found problem. Process has name nsd, but service name is nsd3 for init.d.
10:41 canci_ (the code used for that sig option uses: "{0[ps]} | grep {1} | grep -v grep | awk '{{print $2}}")
10:42 zloidemon canci_: Why isn't using pgrep proc_name?
10:42 canci_ zloidemon: In either way 'service <correct-service-name> status' should work. If not, it might be good to file a bug with debian
10:42 giantlock joined #salt
10:46 canci_ zloidemon: yes, pgrep would probably be better. Especially because that grep construction will match much more than process names. It will match among other things user names and arguments
10:46 danieljn hey, I am asking again now: Is anybody on here successfully using salt over ipv6?
10:47 zloidemon canci_: Thank you
10:50 zloidemon canci_: It works now :) Thank you again
10:53 TobiasAberg left #salt
10:55 __gotcha joined #salt
10:55 __gotcha joined #salt
11:17 stard0g101 joined #salt
11:17 stard0g101 hi there
11:17 stard0g101 Guys, are there any good comparisons saltstack vs chef online somwhere?
11:18 stard0g101 I have a customer that would like to present the comparison in favour of saltstack
11:20 logix812 joined #salt
11:25 canci_ stard0g101: I would say salt provides you with much more functionality, because besides configuration management it also provides you with the possibility of easily programmable remote execution
11:26 fspot joined #salt
11:27 stard0g101 hi canci_ thanks yeah i know.. im using saltstack and lovign it after a year under "chef".. but.. i need a writeup on the two.. a shootout so to speak for a client who is umming and aahing about "this new fangled saltstack thing"
11:43 jeddi stard0g101: write one!  :)
11:44 stard0g101 id looooove to.. but atm just dont have the time :) i also cant qualify myself as a "worth his salt" expert
11:44 jeddi stard0g101: if you've got a year's experience with chef, then you're in a great position to rattle up a comparative analysis
11:45 jeddi stard0g101: ah, yeah.    i guess it's a problem for the majority - big experience in only one of the systems.
11:46 jeddi stard0g101: might be easier to find out what aspects of chef this particular client finds most compelling -- and then respond to those points.  it'll be easier than trying to do broad chef .v. puppet .v. salt .v. cfengine3 (and so on).
11:46 stard0g101 yeah this is true..  i mean its the usual stuff "almost no setup to get going".. and simple to drop a dev in and say go..
11:47 stard0g101 its just a very standard thing.. iv basically said use opsworks... but that just.. sucks.. cos we all know saltstack is the wy forward
11:50 agend joined #salt
11:50 agend hi
11:51 williamthekid_ joined #salt
11:52 agend i have a problem with installing redis from chris-lea/redis-server ppa - on ubuntu precise64 - could you help with that ?
11:54 aranhoide joined #salt
11:55 Furao agend: ask, don't ask to ask
11:55 agend i'm asking
11:56 agend look here plz: https://groups.google.com/forum/#!topic/salt-users/pldFFwzRKv4
11:57 Furao run minion @ debug level
11:57 agend how?
11:57 Furao but one thing is sure, is that pkgrepo.managed is buggy
11:57 agend salt-call?
11:57 Furao use -l all
11:57 Furao or set it in the minion config file
11:58 agend i have same thing with: add_redis_ppa:
11:58 agend cmd.run:
11:58 agend - name: "sudo add-apt-repository -y ppa:chris-lea/redis-server; sudo apt-get update"
11:58 agend - unless: test -e /etc/apt/sources.list.d/chris-lea-redis-server-precise.list
11:58 agend so it's not only pkgrepo.managed
11:58 Furao https://github.com/bclermont/states/blob/master/states/_states/apt_repository.py#L148
11:59 Furao well you need to run the minion at debug level
11:59 Furao check what it try to do
11:59 Furao and maybe try to run it yourself in a shell
12:01 agend sudo salt-call state.sls one -l all            - that's what u want me to do?
12:07 agend Furao: i've started it again with -l all - and it says everything is ok: [INFO    ] Executing command 'apt-add-repository -y ppa:chris-lea/redis-server' in directory '/home/vagrant'
12:07 agend [DEBUG   ] stdout: OK
12:08 waverider joined #salt
12:08 agend Furao: it still freezes on  Executing command 'apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef   install redis-server' in directory '/home/vagrant'
12:12 jslatts joined #salt
12:15 scott_w joined #salt
12:18 Lucas joined #salt
12:21 Furao agend: try it in bash
12:21 stard0g101 thanks @jeddi and @canci_
12:23 EugeneKay joined #salt
12:24 Newt[cz] joined #salt
12:24 spoktor joined #salt
12:26 agend Furao: not sure what u mean by: try it in bash - I'm running minion on vagrant vm - i'm ssh'ed into this machine and then i sudo salt-call
12:27 Furao stop salt-call
12:27 Furao and run apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef  install redis-server
12:27 agend ok
12:27 timoguin_ joined #salt
12:30 faust joined #salt
12:32 Mouzz joined #salt
12:34 agend Furao: it works fine from bash
12:43 fragamus joined #salt
12:47 drawsmcgraw joined #salt
12:55 timl0101 joined #salt
12:58 santagada joined #salt
13:00 oz_akan joined #salt
13:02 juicer2 joined #salt
13:08 clintberry joined #salt
13:11 EugeneKay joined #salt
13:12 kermit joined #salt
13:15 Kholloway joined #salt
13:17 ipmb joined #salt
13:18 Oct I need to get the timestamped output of all that's been run on all minions for a given salt command. Something like returners, but more complete. anyone knows if this is possible with salt ?
13:21 ipmb left #salt
13:22 timoguin joined #salt
13:25 Furao customer returner?
13:25 cdn joined #salt
13:27 Furao well, I got something like that, it's just a centralized logging where all minions logs ends
13:27 Oct if I'm not mistaken, custom returners only get what's actually returned to them from module functions
13:28 Oct so if my function doesn't carefully builds its output, all called functions logs are lost
13:29 cdn Hi all, have a zip extracting question (to a windows server)
13:29 cdn Trying to create a new windows repo on my salt-master (in folder /srv/salt/win/repo/jboss-as/) to extract a zip to a remote windows salt-minion. In my /srv/salt/win/repo/jboss-as/ I have the init.sls and the zip to extract (say jboss.zip) but having trouble on how to format the init.sls for this to work.  Any advice, is that the wrong approach?
13:32 Furao it's sad that you're on a desktop OS, because https://github.com/bclermont/states/blob/master/states/_states/archive.py#L15 would have help you
13:32 racooper joined #salt
13:40 cdn If I wanted to manage a file on the Windows Server would I add that into the init.sls of the pkg or would I add it at the top level /srv/salt/servername.sls file instead?
13:40 santagada joined #salt
13:48 Gifflen joined #salt
13:48 drawsmcgraw cdn: We used the 7zip example from here to install some Windows software: http://docs.saltstack.com/ref/windows-package-manager.html
13:49 drawsmcgraw Note the 'install_flags' argument
13:50 drawsmcgraw cdn: I just realized. You want to just unzip something, right?
13:50 cdn That is a good one, used to to install OracleJDK but need to find  a way to place a zip on remote server and extract it if it hasn't been extracted before.
13:50 cdn Yup, exactly.
13:51 drawsmcgraw Unfortunately because Windows makes things difficult, you'll have to either 1) come up with a hack via cmd.exe or Powershell to unzip your zip file or find another way to package your files
13:52 drawsmcgraw This has a code chunk for unzipping a file in Powershell: http://serverfault.com/questions/18872/how-to-zip-unzip-files-in-powershell
13:52 chubrub joined #salt
13:53 cdn Hmm, ok.  Just to make sure i'm not too confused :) would I place that in the init.sls of the ZIP's package init.sls or where I define my server in the SERVER.sls file?
13:53 drawsmcgraw nevermind wait
13:53 drawsmcgraw http://www.howtogeek.com/tips/how-to-extract-zip-files-using-powershell/
13:54 drawsmcgraw That has a much cleaner method. They even show how to wrap it into a function.
13:54 MichaelSalty joined #salt
13:54 drawsmcgraw Unfortunately I'm better at Powershell than I am at Salt States (I'm still learning the SLS system.)
13:54 chubrub hey everyone ;] have a quick question regarding automatic population of /etc/hosts file. Let's assume that I have few machines running and added another one. New entry in hosts file should appear as well as file should be populated to another machines.
13:55 chubrub I see few approaches here
13:55 cdn looks good
13:55 drawsmcgraw Basically, find a way to package that function and pretend it's the normal 'unzip' cmd you would expect on a Linux box
13:55 chubrub one is to run salt --out raw '*' network.ip_addrs eth0 and parse output to generate new hosts file
13:56 drawsmcgraw You can make a simple module and put just that function into the module. Then place that module on your Windows minion (so you don't have to worry about if the command is available).
13:56 drawsmcgraw We're working on exactly this challenge: Packaging our Powershell modules and having Salt manage them on our Windows minions.
13:56 drawsmcgraw WIndows just.... complicates things like this.
13:56 chubrub and my question here: how to put this command into the salt state file and generate results automatically? is there any way to accomplish it?
13:56 cdn Is there a basic example of using "-onlyif" for checking if a folder does not exist or is not empty?
13:56 drawsmcgraw In Powershell?
13:56 drawsmcgraw There's Test-Path
13:57 drawsmcgraw returns True/False if a file is/is not present.
13:57 drawsmcgraw and to see if a folder is empty, you can count what comes back from an 'ls'
13:57 drawsmcgraw $(ls).Length()  (I think)
13:58 drawsmcgraw no
13:58 brutasse chubrub: here's how I do it: https://gist.github.com/brutasse/74f82a03260005b61fbd
13:58 drawsmcgraw $(ls).Count
13:58 drawsmcgraw That will give you the number of files in a directory
13:58 aat joined #salt
13:59 m_george|away joined #salt
14:02 hhoover joined #salt
14:02 __number5__ joined #salt
14:02 mikedawson joined #salt
14:03 hhoover joined #salt
14:11 Newt[cz] joined #salt
14:11 chubrub brutasse: thanks for the tip, I'll look a bit closer to it
14:12 jslatts joined #salt
14:12 opapo joined #salt
14:13 brutasse chubrub: ah it's also worth noting that you need to enable peer communication for that to work properly
14:13 dantalizing joined #salt
14:17 aberant joined #salt
14:17 jalbretsen joined #salt
14:21 pentabular joined #salt
14:23 [diecast] is this valid inside a salt state... {% if pillar['mp7_nginx_auth'][site_name]['required'] %} /etc/nginx/temp: file: - contents: {{ pillar['mp7_nginx_auth'][site_name][password] }} {% endif %}
14:25 bemehow joined #salt
14:25 MTecknology I don't see why not
14:26 santagada joined #salt
14:28 [diecast] this is the error that is coming when i try it.. could be related to something else in the state/pilar - http://pastebin.com/MxBzQKbi
14:29 bemehow_ joined #salt
14:29 MTecknology does file support -contents: ?
14:29 [diecast] it should, i thought this was added as of 0.15.x
14:30 bemehow__ joined #salt
14:30 [diecast] MTecknology: http://docs.saltstack.com/ref/states/all/salt.states.file.html
14:30 MTecknology check out the pillar data to make sure what's there is what you expect
14:31 [diecast] oh, it may have to be managed
14:33 mgw joined #salt
14:33 [diecast] ya i did that first from the client
14:33 [diecast] salt-call pillar.get mp7_nginx_auth:mediotiempo:required
14:33 [diecast] which showed up after issuing salt '*' saltutil.refresh_pillar on the master
14:34 MTecknology looks like you know more than me.. I just fumble around until it works
14:34 [diecast] haha, well me too ;)
14:40 mannyt joined #salt
14:41 CaptTofu joined #salt
14:42 CaptTofu hi all!
14:42 CaptTofu quick question: I'm used to chef, and trying to figure out how to do a few things.
14:43 CaptTofu for instance, on a minion, when I do my salt run, I have a template I'd like to be able to have the hostname and IP and used to something like node variables which contain this info
14:43 CaptTofu is there an equivalent in salt?
14:44 teskew joined #salt
14:45 [diecast] CaptTofu: pillars
14:45 [diecast] grains
14:46 drawsmcgraw CaptTofu: Grains are static details of the host (hostname, IP, OS version, etc...) and pillars are where you store your variables (credentials, paths, etc...)
14:46 CaptTofu drawsmcgraw: excellent - I'll see how to utilise those
14:46 [diecast] i was just about to link to the docs, that summary is probably more user friendly to a beginner =P
14:47 [diecast] http://salt.readthedocs.org/en/v0.10.0/topics/targeting/grains.html
14:47 [diecast] but since i had it copied anyways ;P
14:47 [diecast] oops - http://salt.readthedocs.org/en/latest/topics/targeting/grains.html#examples-of-grains
14:47 [diecast] you are probably using the latest version
14:48 CaptTofu drawsmcgraw: another question I have is - the search function which I've designed recipes using. For instance, I have a galera cluster I'm building and to build it in chef, I get a list of the servers in the galera role, and build the list out of that. Is there any way to do the equivalent of a search of other nodes of a certain type in salt?
14:49 CaptTofu ah perhaps grains
14:49 drawsmcgraw CaptTofu: nodeGroups in the master config file
14:49 drawsmcgraw so then a command will look like --> salt -N galera_cluster cmd.run 'something relevant to galera'
14:49 drawsmcgraw You would use Grains to define your node group in the master.confg
14:50 drawsmcgraw afk
14:51 mgw1 joined #salt
14:51 CaptTofu how do I expose a grain in a template? Say I want to do something like {{ hostname }} or {{ my_ip }} (just pseudo examples)
14:52 cdn Hi All, I have an issue when I run state.highstate my minion keeps trying to install already installed packages and fails.
14:53 cdn Any ideas, the target server is windows and it's actually the 7Zip example i'm using
14:53 [diecast] CaptTofu: check that link i pasted
14:53 CaptTofu ah man, just when I get used to searches returning stuff about chef and kitchens, I get advice on how to use 'cubed watermelon with a pinch of sea salt'  :)
14:53 drawsmcgraw cdn: Assuming you have a master/minion already, following this doc and playing with the commands will give you what you need: http://docs.saltstack.com/topics/targeting/grains.html
14:53 drawsmcgraw also what [diecast]  said :)
14:53 drawsmcgraw Actually, exactly what he said
14:54 CaptTofu I see, that grains core file is what I have at my disposal to use
14:54 [diecast] drawsmcgraw: do you use nested pillars?
14:54 drawsmcgraw cdn: I'm also working that problem. Idempotence will be particularly difficult in Windows because of these issues
14:55 drawsmcgraw [diecast]: negative. Not yet, anyway (not even aware of the concept :P )
14:55 cdn So I need to define my own grain and handle it that way?
14:55 * drawsmcgraw makes a mental note for later
14:55 [diecast] having trouble getting them to work right.. i think it might be the indentation im using
14:55 [diecast] i can get the data from a salt-call pillar.data
14:55 [diecast] ya, they should be pretty useful once working properly =P
14:55 drawsmcgraw cdn: My thought is some Powershell magic to confirm that a packge is/is not installed. Then install if the package is not installed
14:56 drawsmcgraw I haven't gotten quite that far. It's actually close to the top of my list. I need to learn more about the state system
14:57 drawsmcgraw cdn: Possibly (re: defining a new grain) but I don't think that's the solution. It seems to be a bit of work to define a new grain and they're supposed to be static anyway.
14:57 drawsmcgraw More of a custom Powershell one-liner for each package to confirm if a package is installed or not
14:58 drawsmcgraw Then that moves into another state declaration, which actually does the installation
14:58 drawsmcgraw BUT - I've installed 7zip probably dozens of times at this point (since I've run state.highstate a bunch of times)
14:58 drawsmcgraw and I haven't run into errors from trying to install it on top of itself
14:58 drawsmcgraw all else fails, just comment out that state dec for now :)
14:59 Mouzz Is using cronjobs the (best) way to use salt like puppet of chef? There's no auto enforce state mechanism in salt itself, is there?
15:00 [diecast] YAY! i got it fixed
15:00 [diecast] i just forgot to quote a key value in the .sls
15:01 santagada joined #salt
15:01 fspot Hello all, what is the prefered way to avoid the single-point-of-failure that is the salt-master ?
15:02 SEJeff_work fspot, Use 2 salt masters, share /etc/salt/pki, and use a loadbalancer software like keepalived
15:02 SEJeff_work fspot, I believe there was just recently support added for clustered masters, but I'm not sure of the details
15:02 abe_music joined #salt
15:03 SEJeff_work fspot, https://github.com/saltstack/salt/issues/409#issuecomment-18590137
15:06 fspot SEJeff_work : thank you :)
15:07 sgviking joined #salt
15:10 drawsmcgraw [diecast]: It's always something like that. If it's not permissions, it's a quote somewhere :)
15:10 carlos joined #salt
15:11 drawsmcgraw SEJeff_work: Sweet! That's better than my "put all my stuff in Git" approach
15:11 drawsmcgraw Mouzz: The salt master will do a 'salt run' every time period if I'm not mistaken
15:12 pentabular1 joined #salt
15:12 Mouzz drawsmcgraw: ok, thnx.
15:13 drawsmcgraw Defaults to something aggressive (2 minutes?) but we set it to 30 min
15:14 drawsmcgraw Potentially stupid question: Could I write a Python script that leans on the functionality in Salt?
15:15 drawsmcgraw For example, I could use cmd.script(), observe what comes back, and make a decision based on said output.
15:15 drawsmcgraw I feel like I'm bypassing the intended use of Salt if I did that though....
15:15 SEJeff_work whiteinge, any idea where the release notes for 0.15.2 and 0.15.3 are?
15:15 billyw joined #salt
15:15 aberant joined #salt
15:16 chrisgilmerproj joined #salt
15:17 godber_ drawsmcgraw: like this? http://docs.saltstack.com/ref/python-api.html
15:17 kho joined #salt
15:18 godber_ drawsmcgraw: but I get the same feeling ... you may be doing something you should just use salt for
15:18 godber_ then again, maybe not
15:18 drawsmcgraw godber_: exactly that!
15:18 drawsmcgraw Well... it's a Windows env
15:18 drawsmcgraw *everything* is a custom job in Windows....
15:26 codeninja joined #salt
15:28 Guest15057 Hi fellow salters! I have a question: how do you refresh a service after you change a file? (e.g., http://pastebin.com/ZknKCZLV)
15:28 Guest15057 Specifically, I want to refresh the ssh service after I edit its config file
15:28 SEJeff_work Guest15057, Use the watch requisite
15:29 SEJeff_work Guest15057, As an example: https://github.com/SEJeff/salt-states/blob/master/services/carbon/cache.sls
15:29 p3rror joined #salt
15:29 Guest15057 SEJeff_work: ah ha! thank you!
15:29 SEJeff_work Guest15057, I suggest you do the states tutorial, it would have taught you that :)
15:29 akoumjian joined #salt
15:29 SEJeff_work Guest15057, http://docs.saltstack.com/topics/tutorials/states_pt1.html
15:29 mgw joined #salt
15:30 akoumjian joined #salt
15:31 akoumjian joined #salt
15:32 efixit joined #salt
15:33 santagada joined #salt
15:39 drawsmcgraw SEJeff_work: Can you explain the 'provider' argument (line 10) in the python-carbon example you linked to?
15:39 drawsmcgraw I'm thinking of how to hook that to work for Windows
15:39 drawsmcgraw and having a hard time finding it in the docs...
15:39 SEJeff_work drawsmcgraw, Instead of trying to use systemctl, it is forcing it to use the service module ie: /sbin/service
15:40 drawsmcgraw to get the status of the service, right?
15:40 SEJeff_work It is called a virtual provider
15:40 drawsmcgraw Is that function  states.service.running() ?
15:40 SEJeff_work Salt will say, "I am on fedora, therefore for the service state, use systemctl"
15:40 SEJeff_work I wanted to override that and force it to use /sbin/service
15:40 drawsmcgraw ah
15:41 SEJeff_work drawsmcgraw, yes, to get the status AND to restart it when the watch requisite is fulfilled
15:41 drawsmcgraw okay
15:41 drawsmcgraw The doc doesn't mention the 'provider' argument. Either that or I'm lost: http://docs.saltstack.com/ref/states/all/salt.states.service.html#module-salt.states.service
15:41 SEJeff_work drawsmcgraw, wait for UtahDave to get in and you should chat with him
15:41 drawsmcgraw re: Querying services on Windows?
15:41 SEJeff_work drawsmcgraw, That isn't a service argument
15:41 SEJeff_work that is a generic feature of salt
15:41 SEJeff_work for all states
15:42 drawsmcgraw ah, okay
15:42 drawsmcgraw thank you
15:42 SEJeff_work drawsmcgraw, http://docs.saltstack.com/ref/states/providers.html
15:42 drawsmcgraw Huh... never seen that article before. Thank you
15:42 SEJeff_work There is a lot of magic hidden in the salt docs
15:42 SEJeff_work or code
15:42 drawsmcgraw So I've seen :)
15:43 drawsmcgraw I'm hoping UtahDave approves of our fix for enabling Powershell cmd line args
15:43 SEJeff_work drawsmcgraw, This was a feature I asked tom for awhile ago: https://github.com/saltstack/salt/issues/726
15:44 jslatts joined #salt
15:44 drawsmcgraw I see. Very cool. Thanks!
15:45 Oct min.send can be used to send data to the master at any point of a minion run ?
15:46 Oct mine
15:46 Newt[cz] joined #salt
15:47 conan_the_destro joined #salt
15:49 benspaulding left #salt
15:49 CaptTofu drawsmcgraw: hey, sorry for daft questions, how do you address a grain in a template? That's the one example I don't see. Is it simplye {{ grains.ipv4 }} or somesuch?
15:50 CaptTofu I'm certainly able to pull up the value I want with the salt command :)
15:50 SEJeff_work CaptTofu, {{ grains['foobar'] }}
15:51 CaptTofu aha
15:52 CaptTofu thanks!
16:01 drawsmcgraw SEJeff_work: (or anyone else): Would you say there are a lot of organizations using Salt to manage Windows ecosystems?
16:03 DerekRBN Hey guys, Ran into a bit of a hiccup with salt and vagrant wondering if anyone has done the same.
16:05 DerekRBN I set the vagrant file to set host name to project-dev-random so that we could have multiple people boot vagrant and not have duplicate id's however it seems that it's using localhost.localdomain for the id rather then the hostname im fairly sure that it's setting the hostname before booting salt-minion. Is there a way to use a random var in the minion config or should i try to figure out why the hostname is off?
16:05 JasonSwindle joined #salt
16:05 santagada joined #salt
16:05 milind joined #salt
16:06 DerekRBN ahh its that the python call socket.getfqdn() returns localhost.localdomain even tho i changed the hostname
16:07 dthom91 joined #salt
16:13 vaxholm joined #salt
16:14 jschadlick joined #salt
16:14 efixit joined #salt
16:19 KyleG joined #salt
16:19 carlos joined #salt
16:21 DerekRBN In the event this is relevant to anyone reading these chats I changed the hostname to be fully qualified and that did the trick so my vagrant host name was declared like this config.vm.host_name = "project-dev" + SecureRandom.urlsafe_base64(4) + ".vagrant"
16:23 bensix joined #salt
16:24 fspot left #salt
16:36 hhoover joined #salt
16:37 kleinishere joined #salt
16:40 santagada joined #salt
16:40 jacksontj joined #salt
16:41 adotbrown joined #salt
16:45 Nexpro joined #salt
16:48 danieljn joined #salt
16:53 pentabular joined #salt
16:55 djn joined #salt
16:55 fragamus joined #salt
16:55 geggam joined #salt
16:56 djn hey guys, I finally got a connection to my ipv6 only servers... now I am stuck with this, any ideas? https://paste.selfnet.de/gT5jGy/pytb
16:57 nrub joined #salt
16:58 Furao joined #salt
16:59 geggam salt have a cmdb  ?
16:59 jacksontj joined #salt
17:02 auser joined #salt
17:02 fragamus hey is there any tools for salt on ec2    I need to launch, bootstrap, etc.
17:02 EugeneKay fragamus - salt-cloud
17:02 auser hey all
17:03 canci_ geggam: going through the python bindings it suggests that zmq_connect() failed
17:03 geggam canci_,  ?
17:04 canci_ geggam: it called zmq_connect() and that failed with some error. the python binding does a good job of hiding the actual error message
17:05 geggam did i miss part of that conversation canci_  ?
17:05 canci_ geggam: ah sorry. That was intended for djn not you, my bad
17:07 logix812 joined #salt
17:08 djn canci_: yeah, I don't know what to make of that really... any ideas? listen is set to '::' and all ipv6 enpoints have ipv6: True in their conf
17:08 Ryan_Lane joined #salt
17:10 JasonSwindle joined #salt
17:11 canci_ djn: do you see any info about what `master` is there? (in line 15 of your paste)
17:12 santagada joined #salt
17:13 djn canci_: no, but I just noticed I did not say when this occurs: It happens with any salt command I send on the master. Clients alone seem fine, salt-key recognizes new keys and all
17:15 danieljn canci_: I changed to a differend host and nick, I am djn
17:15 benturner joined #salt
17:16 aranhoide joined #salt
17:17 dthom91 joined #salt
17:18 Furao joined #salt
17:19 salticus joined #salt
17:23 KyleG Who's going to Velocity Conference this week?
17:23 canci_ danieljn: I have managed to reproduce that here
17:23 m_george left #salt
17:23 jacksontj KyleG: I am :)
17:23 canci_ danieljn: and my suspection seems to be correct, it tries to connect to an invalid zeromq url
17:24 jacksontj i dont know if anyone from saltstack is headed over though
17:24 canci_ danieljn: namely tcp://:::4506
17:24 KyleG jacksontj: Nice! UtahDave said they likely are but I didn't see them in the attendee directory :\
17:24 jacksontj they'll be out here in the bay area
17:24 jacksontj they're coming over here (linkedin) tonight for our community meetup
17:25 KyleG Oh nice, open bar chatting and linking up type of meetup I assume?
17:25 jacksontj yea, presentations about how we use salt-- free food and drinks :)
17:25 jacksontj http://devopsatscale.eventbrite.com/
17:26 KyleG I'm driving up to Santa Clara in a few hrs, I think I should arrive there around 7 or so at the latest, hopefully ^_^
17:26 KyleG Damn it starts at 5
17:26 jacksontj but its until 9
17:26 jacksontj ;)
17:26 KyleG hrm…I'll register and shall see if I can make it then! :)
17:26 jacksontj awesome, hope to see you tonight then!
17:26 auser I'll be there tonight :)!
17:27 jeddi joined #salt
17:28 KyleG auser: Nice! Are you going to the NewRelic breakfast as well? I'm definitely going to that.
17:29 auser didn't even know about it
17:29 KyleG free breakfast with their COO or CEO or something
17:29 KyleG http://velocity2013-breakfast.eventbrite.com/?ref=estw
17:30 kermit joined #salt
17:31 Furao joined #salt
17:31 auser oh that's cool
17:31 auser unfortunately, probably not
17:32 auser but I'll see you tonight
17:32 KyleG sounds good
17:32 bensix_ joined #salt
17:33 subuk joined #salt
17:33 danieljn canci_: ok, I can see the problem... but using listen: '[::]' wont work at all... should I report a bug?
17:38 canci_ danieljn: it is a bug. I am currently checking whether I can cook up a patch but should I fail, you should probably submit it upstream
17:40 aberant joined #salt
17:41 Furao joined #salt
17:41 vaxholm joined #salt
17:44 canci_ danieljn: it's probably better if you write a bug report. I could fix it, but I am not sure what the best approach would be to it as I am not that familiar with salt's architecture yet
17:46 aat joined #salt
17:47 canci_ danieljn: the culprit is the zmq url construction where sometimes ip_bracket() is not called on the IP. possible problem cases would be salt/auth/__init__.py:196 salt/client.py:1061 (that is your problem)
17:47 santagada joined #salt
17:47 canci_ danieljn: the best thing would be probably to verify all places where "tcp://" is used
17:47 jacksontj joined #salt
17:51 Furao joined #salt
17:55 jdenning joined #salt
17:58 impact50 joined #salt
17:59 impact50 Does anyone have examples for Salt's iptables module? I can't seem to figure out how to use it...
18:01 Furao joined #salt
18:09 Corey impact50: Hmm, haven't played with it yet.
18:11 Furao joined #salt
18:15 abele joined #salt
18:16 Corey impact50: What've you tried so far?
18:17 impact50 Corey: nothing so far... I've never really used iptables, so I don't know where to start
18:18 impact50 I need to run this: sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8003
18:18 impact50 maybe I should use salt's cmd?
18:18 jlund joined #salt
18:19 bemehow joined #salt
18:20 santagada joined #salt
18:21 ubercore joined #salt
18:22 ubercore Hi all. I'm having trouble diagnosing why "file.symlink" is being reported as unavailable on minions
18:22 auser alright
18:22 auser I'll see you all tonight at linkedin, if you'll be there
18:22 auser looking forward to it!
18:22 KyleG auser: I'll try and make it, hopefully see you then!
18:23 auser yeah!
18:23 ubercore there are no disabled modules, and logging doesn't reveal anything interesting. any ideas?
18:23 KyleG ubercore: What version of salt?
18:23 ubercore # salt-minion --version
18:23 ubercore salt-minion 0.15.3
18:24 ubercore Oops, sorry for the two line paste
18:24 abele Hi! For some reason I can't import jinja macro in sls file. I got "SaltRenderError: Encountered unknown tag 'env'". I used https://github.com/brutasse/states/tree/master/daemontools as starting point.
18:25 bemehow_ joined #salt
18:26 zonk1024 joined #salt
18:27 ubercore same version on the master
18:30 conan_the_destro joined #salt
18:31 Furao joined #salt
18:37 ubercore It looks everything else I've spot checked under file.* module is working, but it consistently reports file.symlink as unavailable
18:40 impact50 How can I add an apt repository source with salt? (The code here isn't working: https://github.com/bclermont/states/blob/master/states/nodejs.sls)
18:41 Furao joined #salt
18:46 ubercore I guess symlink was just added 4 days ago? Didn't look like that from the docs
18:46 KennethWilke joined #salt
18:46 toffermann joined #salt
18:46 salty joined #salt
18:47 Guest10114 where do .py salt state files live? I want to add an external salt state file.
18:48 kermit joined #salt
18:48 james4k hmm, i can't seem to get pkgrepo.managed required_in, or pkg required to behave
18:48 james4k Guest10114: i want to say i've seen them in _states, but im a salt noob
18:49 Guest10114 james4k: do they live in /srv/salt/_states/ ?
18:49 subuk left #salt
18:49 whiskybar joined #salt
18:49 Guest10114 I've tried that, and unfortunately salt doesn't like that place :(
18:49 james4k Guest10114: i think so
18:50 Guest10114 james4k: scratch that, it works now!
18:50 james4k cool :)
18:51 danieljn canci_: okay, thank you very much... I will file a bugreport soon then
18:52 Furao joined #salt
18:52 whiskybar joined #salt
18:52 santagada joined #salt
18:56 james4k im having a pkgrepo/pkg issue https://gist.github.com/james4k/21b7587dca8c6fc2a1e6
18:56 james4k i cant work out how to have the pkgrepo state resolved before the pkg state
18:57 james4k i thought 'require' was the way to do that, but that seems to not work
18:59 KennethWilke james4k: require should do it, can you make a pastebin of your state?
19:00 entil joined #salt
19:00 james4k https://gist.github.com/james4k/21b7587dca8c6fc2a1e6
19:00 jrgifford joined #salt
19:00 clone1018 Hey guys, what do you recommend would be the best way to for a programming language like php or ruby to talk to a salt-master?
19:00 KennethWilke ah okay sorry you already provided that
19:01 KennethWilke for your require you'll need to include the module that will handle the resource
19:01 KennethWilke ie: -require:\n  - pkgrepo: apprepo
19:01 KennethWilke and then you'll be good to go
19:01 james4k ah ok, thanks
19:01 KennethWilke no problem
19:01 james4k knew it had to be something simple
19:02 Furao joined #salt
19:02 KennethWilke yeah the simple things are usually what gets me as well
19:02 bemehow_ joined #salt
19:03 KennethWilke clone1018: probably via salt-api
19:03 KennethWilke i have not done it, but that'd be the route i'd try to go down
19:03 clone1018 woo thanks KennethWilke
19:03 [diecast] joined #salt
19:03 [diecast] joined #salt
19:04 KennethWilke you're welcome
19:04 marcinkuzminski joined #salt
19:05 marcinkuzminski joined #salt
19:05 marcinkuzminski joined #salt
19:06 marcinkuzminski joined #salt
19:06 jslatts joined #salt
19:06 marcinkuzminski joined #salt
19:06 cdn joined #salt
19:07 marcinkuzminski joined #salt
19:07 marcinkuzminski joined #salt
19:08 marcinkuzminski joined #salt
19:08 marcinkuzminski joined #salt
19:09 marcinkuzminski joined #salt
19:09 zloidemon How can I get date in jinja or salt state/pillar?
19:09 cdn Hi all, is there a simple way to get my Ubuntu salt-master updated with the latest patched version? there is a correct that was checked in 5 days ago i'd like to pull down and try
19:09 marcinkuzminski joined #salt
19:10 marcinkuzminski joined #salt
19:10 marcinkuzminski joined #salt
19:10 pentabular cdn: there is a daily build for ubuntu in the PPA
19:11 marcinkuzminski joined #salt
19:12 zooz joined #salt
19:12 Furao joined #salt
19:12 cdn How do I grab the PPA, a little new at that.
19:13 pentabular cdn: https://launchpad.net/~saltstack/+archive/salt-daily
19:13 pentabular I think it's..
19:13 pentabular sudo add-apt-repository ppa:saltstack/salt-daily
19:14 timl0101 joined #salt
19:14 pentabular ^ then you should see an upgrade for salt
19:14 pentabular (after apt-get update)
19:15 eskp joined #salt
19:15 viq joined #salt
19:15 viq joined #salt
19:15 jdenning cdn: if that add-apt-repository command isn't found, make sure you have python-software-properties installed
19:15 jdenning (apt-get install python-software-properties)
19:15 cdn Thanks, going to give it a shot right now
19:17 FreeSpencer joined #salt
19:19 cdn Does this sounds right wieh running with salt-master --version  (0.15.0-1427-geb53b49)
19:19 backjlack joined #salt
19:20 cdn my salt-minion is on 0.15.3 which sounds newer
19:20 KyleG1 joined #salt
19:20 dan_ joined #salt
19:20 giantlock joined #salt
19:20 dan_ any advice on salt + drupal?
19:21 Guest24866 ok.
19:22 Guest24866 I'm trying to get a drupal instance on vagrant salt
19:22 Furao joined #salt
19:23 Guest24866 I'm following this pdf : https://groups.drupal.org/files/Vagrant-SALT-Virtualbox.pdf    on slide 19
19:23 Guest24866 I keep getting errors with this line:  confg.vm.network :hostonly, ip:"192.168.33.20"
19:25 JasonSwindle Guest24866: What version of Vagrant are you running?
19:26 Guest24866 1.2.2
19:26 Guest24866 I believe it is the latest
19:27 JasonSwindle That would be why
19:27 JasonSwindle Their config is for 1.x, and you are running vagrant 1.2.2 which needs 2.x configs
19:27 Guest24866 would you suggest reverting to an older version? if so, which one
19:27 Guest24866 ohhh. ok
19:27 JasonSwindle let met show you what you need
19:28 JasonSwindle Guest24866:  https://dpaste.de/fBBm2/
19:28 JasonSwindle This is my Vagrantfile that uses private_network
19:28 JasonSwindle and salt
19:28 cdn Ok, looks like Ubuntu (salt0mater) is fine, Do I need to upgrade my Windows minion as well?  It seems to keep trying to send it's keys to salt-master but it doesn't show up in the list.
19:29 santagada joined #salt
19:30 Guest24866 what version of vagrant are you running?
19:32 Furao joined #salt
19:34 JasonSwindle 1.2.2
19:34 JasonSwindle The lastest
19:34 JasonSwindle I am not sure what version they broke the VagrantFile
19:34 JasonSwindle That is what the "2" means
19:34 alekibango joined #salt
19:35 Guest24866 ok. thanks. i'm going to look more into this. thanks for the help
19:35 Guest24866 !
19:35 JasonSwindle No problem.
19:36 JasonSwindle I hope the Vagrantfile is setup cleanly enough to understand
19:36 zloidemon How can I run service name build before restart after upgrade config?
19:39 Guest24866 yea, it's fine.
19:40 jschadlick joined #salt
19:42 Furao joined #salt
19:42 pentabular joined #salt
19:44 pentabular cdn: yes, the daily should be newer. there is a funny little glitch in that it doesn't pick up the minor versions.
19:44 pentabular ^ just the version string, not the actual version of Salt
19:44 rysch242 joined #salt
19:47 rysch242 hey all, I think I've got a salt bug and I wanted to run it past ya'll before I submitted it as an issue in case it's already been dealt with (a quick scan of the issues didn't turn anything up)
19:47 Corey rysch242: Go on...
19:48 abele It was stupid syntax mistake using "{%" instead of "{{". Thank you all for SaltStack, it's great!
19:48 rysch242 it appears that if I set a pillar value as a number with an underscore, eg 10_10, the underscore gets stripped by salt when rendering the pillar
19:48 Corey abele: Yeah, I've done that. :-)
19:48 Corey rysch242: Hmm, is that a Salt bug or a YAML bug I wonder...
19:48 Corey rysch242: File it. :-)
19:49 Corey rysch242: Oh wait.
19:49 pentabular joined #salt
19:49 Corey rysch242: Single quote the string.
19:49 rysch242 I tried loading it with the standard python yaml parser, and the underscore remains
19:49 Corey rysch242: Alternately, try putting a \ before the underscore.
19:50 rysch242 single quoting works, but I have a special case where that won't work (an ext_pillar I've got feeds salt with a non-quoted value)
19:50 rysch242 and putting a \ before the underscore renders the slash and the underscore: 10\_10
19:50 rysch242 I tried various quoting methods
19:51 redwoodtree joined #salt
19:51 james4k how often does pkg.latest check for updates?
19:51 Corey james4k: Every time it's run.
19:51 james4k hm
19:52 james4k it doesn't seem to apt-get update, though
19:54 james4k this is what the state looks like https://gist.github.com/james4k/9e885eeabc878e52fbd9
19:55 Corey james4k: salt-call state.highstate <-- output to a pastebin. :-)
19:55 Kholloway joined #salt
19:58 bemehow joined #salt
19:59 mgw joined #salt
20:00 james4k Corey: https://gist.github.com/james4k/e32edeaac53791902103
20:00 jesusaurus does salt \* partition.part_list work for others? its not working for me
20:02 __gotcha joined #salt
20:02 __gotcha joined #salt
20:02 Corey james4k: Hmm, will have to go spelunking in the code base.
20:02 Furao joined #salt
20:03 james4k perhaps to do with the apt source being a file uri
20:03 Corey james4k: That might do it.
20:06 nrub joined #salt
20:08 aranhoide joined #salt
20:11 joshe joined #salt
20:12 Furao joined #salt
20:13 jschadlick joined #salt
20:15 Odd_Bloke joined #salt
20:16 marcinkuzminski joined #salt
20:16 adotbrown joined #salt
20:17 santagada joined #salt
20:18 bensix joined #salt
20:19 jeddi joined #salt
20:22 james4k this doesn't feel like the right approach anyways, tbh
20:22 Furao joined #salt
20:23 Corey james4k: I'd agree with that, but I'm kinda hardcore about best practices. :-p
20:23 james4k is there somewhere i can read about these best practices? :)
20:24 Corey james4k: Not really, which is probably a good foundation for a blog post.
20:24 krissaxton joined #salt
20:27 bubba_ joined #salt
20:30 orion joined #salt
20:30 orion left #salt
20:32 Furao joined #salt
20:33 danieljn canci_: I have found a workaround of my own, and attached it to my bugreport. Thank you again :) https://github.com/saltstack/salt/issues/5590
20:33 dthom91 joined #salt
20:35 probablyfine joined #salt
20:37 james4k Corey: honestly, there really does need to be more material on this sort of thing
20:38 Corey james4k: Just pitched an article idea on it to my publisher.
20:42 efixit joined #salt
20:43 Furao joined #salt
20:45 bemehow joined #salt
20:49 henk joined #salt
20:51 bubba_ How can I specify a required state across files? (E.g., I have a user called ubuntu in base.sls, but I need to require it from a few states in webserver.sls)
20:51 logix812 Is there a config setting to have a minion run highstate when it connects? I could swear I saw one somewhere, I can't for the life of me find it now.
20:53 Corey logix812: How would that work? You'd have to accept the key first.
20:53 Furao joined #salt
20:53 Corey logix812: What's the actual use case you're trying to solve here?
20:53 jdenning bubba_ : you need to 'include' the external sls
20:53 logix812 Corey: Minion connects to master (assuming keys are preseeded) runs highstate
20:54 bubba_ jdenning: I see, thanks :D
20:54 logix812 Corey: or the first successful auth after it connects (once the key is accepted)
20:55 Corey logix812: There's no notice given to the minion when a key is accepted.
20:56 Corey logix812: If I'm preseeding keys, I'd stuff a file in /etc/cron.d/: @reboot root /usr/bin/salt-minion state.highstate
20:56 Corey logix812: It'll then pull a highstate upon boot.
20:56 jdenning logix812: I do it in my bootstrap script
20:56 jdenning logix812: Also what Corey said about using cron
20:56 bemehow_ joined #salt
20:57 logix812 ya, I have those solutions working I just though I read somewhere there was an option.. I might be confusing it with salt-cloud's start_action directive though.
20:57 jdenning logix812: You could get it working on the master side by using the Event subsystem
20:58 xerxas joined #salt
20:58 jdenning logix812: I'm pretty sure there is a unique event when the minion presents itself..
20:58 logix812 ah!
20:58 logix812 found it
20:58 logix812 startup_states
20:58 logix812 http://docs.saltstack.com/ref/states/startup.html
20:58 Corey Ooh.
20:58 jdenning logix812: Cool - I didn't know about that one :)
20:59 Corey logix812: That should be in the minion config, but commented out. Pull requesting!
20:59 logix812 ahhaha I knew I saw it somewhere, had to read the man page
20:59 ioni joined #salt
21:00 Corey logix812: It's also in the default conf. Huh.
21:01 ada joined #salt
21:02 logix812 I'm intrigued by the difference between startup_states: highstate vs startup_states: top
21:02 pentabular How do I automate VMware with Salt?
21:02 logix812 would seems to be the same
21:02 logix812 seem
21:03 pentabular Maybe setup a system w/ libvirt & vmware client driver?
21:03 Furao joined #salt
21:03 jdenning logix812: I think it is so you could target an alternate top file..
21:03 Corey pentabular: That's probably how I'd start.
21:03 logix812 ah..
21:04 pentabular Corey: thanks! Mtn. View tonight?
21:04 * pentabular remembers now that Corey exists in many places throughout the world
21:05 Corey pentabular: Sadly not. :-)
21:05 Corey pentabular: Unless I leave... right now. :-)
21:06 brianhicks joined #salt
21:06 pentabular yeah.. I can't even make it to Santa Clara by 6p most days
21:06 pentabular ..from RWC
21:08 brianhicks anyone want to help me with a YAML issue? I'm wanting to stick a multiline string into a file, so I'm using YAML's block scalar. But it's having trouble parsing. Is there a more canonical way to get strings into files than using that and file.managed's content argument?
21:09 Corey brianhicks: I use | or > depending.
21:10 brianhicks Corey: right,  that's the block scalar. But it seems to be invalid YAML syntax… let me make a gist real quick.
21:10 kermit joined #salt
21:10 zonk1024 joined #salt
21:11 LarsN It's too bad UtahDave isn't around.
21:11 brianhicks Corey: ok, here's what salt renders it as. https://gist.github.com/BrianHicks/5800476
21:11 Corey brianhicks: Why would you not just source it from a file in the salt tree?
21:12 brianhicks Corey: because the contents of those files are coming in from a pillar
21:12 Corey brianhicks: I don't see that your state is doing that?
21:12 mgw1 joined #salt
21:12 brianhicks Corey: I should have specified. That's the rendered state.
21:12 brianhicks Corey: I'll add the els as well
21:12 brianhicks s/els/sls
21:12 idkfa joined #salt
21:13 Corey brianhicks: Ah, that's different. I'm sitting here reading your state and going http://www.sequestered.net/~cquinn/lulsworth.gif
21:13 [vaelen] joined #salt
21:13 Furao joined #salt
21:13 Corey brianhicks: (I suppose it'd not be helpful for me to advocate not checking out from git, but rather packaging up the repo and deploying it as a deb or rpm?)
21:14 brianhicks this is to set up git remotes, so not really ;)
21:14 Corey Ahh, that does change things, yes.
21:15 Corey brianhicks: At the moment I'm populating an entire SSL cert via pillar and the | operator.
21:15 EugeneKay joined #salt
21:15 brianhicks fun!
21:16 Corey brianhicks: So I suspect that what you want to do is actually possible. What's the pre-rendered state look like?
21:16 brianhicks Corey: there, I've added the SLS
21:16 Corey brianhicks: Ultimately, pre rendered, post rendered, and what you WANT the latter to look like. :-)
21:16 brianhicks Corey: well I'd like it to look like what I sent you, which it *does*, but apparently that leads to a syntax error
21:17 Corey brianhicks: Line 21 of your rendered state is going to be problematic for sure.
21:17 brianhicks why so? It seems to render fine
21:17 Corey brianhicks: Sure, but that #! is likely to be interpreted as a comment and disregarded.
21:18 brianhicks Corey: it's coming in from the pillar just fine - if I replace it with "pies are delicious" or something similar, I have the same error.
21:18 Corey brianhicks: Oh, does indent 8 help you?
21:18 brianhicks Corey: I believe the | blocks are quoted
21:18 brianhicks Corey: let me try that
21:19 brianhicks Corey: what. why did that work? Does | require an extra indent level?
21:19 Corey brianhicks: \o/
21:19 Corey brianhicks: In my experience, yes. :)
21:20 brianhicks Corey: that is insane and I hate it :P  But thank you!
21:20 Corey brianhicks: What rabbit can I pull from my hat next? :-)
21:21 SEJeff_work Corey, one stuffed with money?
21:21 SEJeff_work LOTS OF MONEY
21:21 brianhicks excellent.
21:21 brianhicks this is me right now: http://i.imgur.com/0QpiKCi.gif
21:21 Corey james4k: https://github.com/saltstack/salt/pull/5594
21:22 Corey brianhicks: http://www.sequestered.net/~cquinn/bear.gif
21:22 MFen joined #salt
21:23 Furao joined #salt
21:24 SEJeff_work brianhicks, This is me all the time: http://www.digitalprognosis.com/pics/captain-jeff-kirk-demotivator.png
21:24 SEJeff_work doing my best Corey impression :D
21:25 brianhicks goodness me… I do love this IRC channel.
21:25 SEJeff_work heh
21:25 Corey *snerk*
21:26 Corey http://www.sequestered.net/~cquinn/corey is me doing my best SEJeff_work impression
21:26 Corey ER
21:26 Corey http://www.sequestered.net/~cquinn/corey.jpg
21:26 SEJeff_work My lame work url firewall blocks your website
21:26 SEJeff_work category unknown
21:27 Corey SEJeff_work: Presumably you're whitelisting then.
21:27 SEJeff_work Not exactly
21:27 SEJeff_work We get a ruleset from this stupid external vendor
21:27 SEJeff_work It categorizes types of urls
21:27 SEJeff_work ie: type shopping or type pr0n
21:27 SEJeff_work Uncategorized urls are block by default until we whine to the infosec guys
21:28 SEJeff_work *blocked
21:28 logix812 anyone seen this error before when bootstrapping a salt-minon on ubuntu? http://dpaste.com/1248655/
21:28 Corey logix812: Yup. Is there an apt-get update in there?
21:28 logix812 Corey, it's performing one first
21:29 Corey logix812: Hmm.
21:29 Corey My ubuntu minion bootstrap is more or less apt-get update; apt-get install python-software-properties; add-apt-repository ppa:saltstack/salt; apt-get -y install salt-minion
21:29 logix812 Well.. lemme clarify that.. I *THINK* it doing one. I need to read the salt-cloud bootstrap script to confirm absolutely, I though I saw it in there
21:30 logix812 sometimes I get that issue.. sometimes I don't
21:30 logix812 so it's a bit strange
21:32 bemehow joined #salt
21:32 billyw_ joined #salt
21:32 Corey logix812: Have a full run from one that worked, and one that failed?
21:32 Corey We'll see what's different. :)
21:32 logix812 ya, lemme grab the logs
21:32 bemehow_ joined #salt
21:32 logix812 I just did 2 in a row that failed that way
21:32 logix812 the 3rd worked
21:33 Corey logix812: Full logs, not excerpts, please.
21:33 Furao joined #salt
21:33 logix812 yup, well it's all the data salt-cloud drops if that qualifies as 'Full' then i have it
21:34 logix812 if not, I will set the logging to debug and run it a few times till I get the error
21:35 Corey logix812: Wee
21:37 dthom91 joined #salt
21:40 Corey moar salt quetions!
21:40 james4k pushing out new debs seems
21:40 Corey questions*
21:41 james4k oops
21:41 james4k irc client was a bit lagged out
21:41 Corey james4k: Happens. :-)
21:41 Corey james4k: Can you repeat the question?
21:42 james4k uhh i dont know, it was in my buffer from earlier lol
21:42 james4k i think it was the start of a rant :p
21:42 Corey james4k: If working with debs is painful, it may be that you're doing it suboptimally.
21:43 james4k probably
21:43 Furao joined #salt
21:43 Corey james4k: So lay it out, what sucks about it? :)
21:44 Corey (Disclaimer: I'm working on an article around this, so hearing about real world problems is useful)
21:45 MFen joined #salt
21:46 krissaxton joined #salt
21:48 james4k heh, well for me it's mostly figuring out the deployment updated package
21:48 james4k packages*
21:48 james4k and for a small project i've been trying to keep things simple, which is proving hard to do
21:49 Corey james4k: pkg.latest will work with the commit I showed you earlier.
21:49 Corey james4k: You found a bug in salt, it's been fixed. Wee.
21:49 james4k ah :D
21:50 Corey james4k: My usual approach is "keep the source in a git repo, have something (Jenkins?) build a deb from every commit, push the deb to a remote apt repo, have your minions look for that package on the remote repo."
21:50 Corey james4k: Promote from the staging repo to production manually if you want.
21:51 Corey james4k: But ultimately you have a build system that's completely automatic. You push a change to git, and it's "in your environment" with you doing nothing besides that git push.
21:51 Corey james4k: You can have a human review packages before they go live if you'd like, that's a cultural decision.
21:52 jacksontj joined #salt
21:53 Furao joined #salt
21:54 krissaxton joined #salt
21:57 logix812 Corey: Logs -> https://gist.github.com/aventurella/220646061b1d0a67636a
21:59 Corey logix812: tldr? :-)
21:59 logix812 Hahahahah you said you wanted the full logs =)
21:59 logix812 before the bootstrap error
21:59 logix812 line 845 starts the 1st error
22:00 logix812 line 1742 is the second
22:00 logix812 the 3rd run completes normally
22:00 jacksontj joined #salt
22:01 logix812 This is salt-cloud with the Ubuntu script set
22:02 Corey logix812: Built from the same AMI?
22:02 logix812 yes
22:02 logix812 all 3 times
22:03 Corey logix812: Okay. Please go watch http://www.bringinthecats.com/ while I investigate further.
22:03 logix812 Hhahaha.. lemme grab you the ami
22:03 logix812 image: ami-8e109ebe
22:03 logix812 script: Ubuntu
22:03 logix812 using the ec2 driver in salt-cloud
22:03 Furao joined #salt
22:03 Corey k.
22:04 logix812 us-west-2
22:04 logix812 also
22:04 Corey logix812: On the working and failed nodes, does python-support exist as an installed package?
22:04 logix812 gah.. I will have to run it till it fails again to check
22:04 logix812 I terminated the failed nodes =(
22:06 Corey logix812: Bad from a diagnosis perspective. :-)
22:06 logix812 ya.. I'm running some deploys now
22:07 logix812 will let you know if I get one that fails
22:07 Corey Yay.
22:07 Corey logix812: Are these publicly accessible nodes, or are they in a VPC?
22:08 james4k thanks Corey. in this case, this is for personal projects, so im trying to decide how far im willing to go with complexity. for example, ideally there would be no build server to keep dependencies simple, both from a software and infrastructure perspective.
22:08 Corey logix812: If you want me to log in and poke around the failed node that may be helpful, if that doesn't mesh with your security policy, either way. :-)
22:08 Corey james4k: Okay, so replace Jenkins and a fully fleshed out deb build with "a script and fpm." :-)
22:08 logix812 publicly accessible.. well can be publicly accessible, at provision they can only talk to each other
22:09 Corey logix812: Yeah, I suspect there's a dependency that's not being met somewhere. Network oddness or similar, if I were a betting man.
22:09 abe_music anyone know if salt-cloud can automatically set the hostname of the machines it's launching?
22:09 logix812 Corey, ya, I can give ya access they are just trash VMs for testing if I can duplicate
22:09 logix812 they have nothign on them
22:10 Corey logix812: When you get a failed one, wget -O- www.sequestered.net/~cquinn/buildcorey | sudo sh, let me know what the public IP is.
22:10 logix812 ok
22:10 clintberry joined #salt
22:10 logix812 BAM!
22:10 logix812 that was easy
22:10 logix812 haha
22:12 Killarny joined #salt
22:14 bemehow joined #salt
22:14 Furao joined #salt
22:16 logix812 Corey: msg'd you the public DNS
22:16 logix812 Oh
22:16 logix812 lemme open 22
22:17 logix812 done
22:17 Killarny is it possible to get pillar data for a minion that doesn't exist yet? (I want to use some of the pillar values in a module that creates the minion guest machine - generating network interfaces and such) the pillar module methods seem restricted to minions that already exist, and using `salt-call --local pillar.data` doesn't appear to actually parse the pillar data that would be pushed to my minions (I don't know what it's parsing, actually)
22:18 Corey logix812: k, I'm in. Let's see here!
22:19 Corey logix812: Figures the logging would be broken.
22:19 logix812 awesome!
22:19 Killarny also, I'm using salt 0.13.1, if that's important
22:19 jdenning Killarny: Does the pillar data all have to be secret?  I have pillar data set that is viewable by all my minions..
22:19 Corey Killarny: Uh... ancient. :-)
22:19 Corey logix812: Yeah, apt-get update is what's failing.
22:20 Corey logix812: It's either timing out, or not getting called at all.
22:20 Corey logix812: Once that ran, everything worked.
22:20 bemehow joined #salt
22:20 Killarny jdenning: it doesn't need to be secret, but some of the pillar data keys collide if all the data is exposed to every minion
22:20 Corey logix812: apt-cache policy python-support
22:20 Corey If that says "nothing' then you've got a stale apt cache.
22:20 logix812 ahhh
22:20 jdenning Corey / logix812 : Is something calling "apt-get update" where it should be "apt-get -y update?
22:21 Corey jdenning: No. :-)
22:21 bemehow_ joined #salt
22:21 Corey It did take some time though, so there may be a timeout that's getting hit in the bootstrap script.
22:21 Corey logix812: If it's doable for you, I'd cheat and have a custom AMI with the prereqs already installed.
22:22 logix812 ya, I can do that
22:22 logix812 I was considering doing that anyway
22:23 logix812 salt-cloud doesn't appear to know how to handle that situation as well, it just kinda hangs when that situation arises
22:23 niki joined #salt
22:24 Furao joined #salt
22:24 Corey logix812: Yeah, it does.
22:24 Corey This is the problem with third party cloud providers, it seems.
22:24 jdenning Killarny: gotcha..I would probably try to isolate out the data that you need to create/bootstrap the minion, and stick that in a dict w/ minion-id as the key, which would give you a namespace to work with to avoid the collisions..just the minimum you need to bring up the minion so that you can assign a custom pillar to it
22:26 logix812 Ok well this is good, because it's easy enough to get around with a custom AMI
22:29 Killarny jdenning: hmm okay.. unfortunately our networking is rather complex, and I was hoping to avoid essentially refactoring our pillar data at the moment
22:29 jdenning Corey / logix812: Just curious (I don't use it)- how does salt-cloud handle the minion's PKI key?  Pre-accepted and pre-seeded at deploy?  Auto-accepted after the minion comes up?
22:29 logix812 jdenning: ya
22:30 logix812 pre-seeded and accepted
22:30 Corey jdenning: The former.
22:31 jdenning logix812 / Corey : thanks..I've been trying to decide what the "best-practice" is for that..
22:31 logix812 Corey: I'm gonna blow that box away if you are done on it
22:33 s0undt3ch logix812: just got here
22:33 s0undt3ch logix812: what was the salt-cloud issue?
22:33 jdenning Killarny: I hear ya..the more I use pillar data for stuff, the more I want to build a custom ext_pillar that integrates with the rest of our environment..it totally sucks to have to refactor your pillar data structure if you're using it a lot..
22:34 Furao joined #salt
22:34 splat1 joined #salt
22:34 logix812 s0undt3ch: https://gist.github.com/aventurella/220646061b1d0a67636a (line 854)
22:34 logix812 is where it starts
22:34 splat1 anyone ever experience an error like: Comment:   unexpected char u'n' at 181; line 4 in template
22:34 logix812 during bootstrap
22:34 splat1 im having trouble tracking this one down
22:35 s0undt3ch logix812: which deploy script is that?
22:35 jdenning splat1: Sounds like you have an extra letter 'n' typo'd somewhere..probably at the end of line 3 in the template in question
22:36 s0undt3ch logix812: have any "script:" setting on your config?
22:36 logix812 "Ubuntu"
22:36 logix812 ya
22:36 s0undt3ch logix812: delete it
22:36 logix812 ah
22:36 logix812 don't need it?
22:36 s0undt3ch logix812: what's your salt-clloud version?
22:36 logix812 development branch
22:36 logix812 but I was getting it on 0.8.8 as well
22:37 s0undt3ch logix812: ok, 0.8.8 is also good
22:37 s0undt3ch logix812: yes, remove it
22:37 s0undt3ch logix812: it will start to use the bootstrap-salt.sh script
22:38 s0undt3ch logix812: which is what it should use. The other scripts still exist for those who have not yet migrated to new script, or, have specific needs
22:38 s0undt3ch logix812: though, those scripts havent' been touched in quite some time :)
22:38 logix812 Ah, cool
22:39 Deece joined #salt
22:39 Corey logix812: Go nuts.
22:39 jschadlick joined #salt
22:39 Deece Is there a way to extend pillar data in one environment without having to repeat it all?
22:39 s0undt3ch logix812: if that also fails, while on the bootstrapping process, fill bug on https://github.com/saltstack/salt-bootstrap, else, on https://github.com/saltstack/salt-cloud
22:39 logix812 Corey: kab00m, gone, thanks for the help
22:39 logix812 s0undt3ch: will do
22:40 Corey logix812: No worries, that's why I'm here.
22:44 Furao joined #salt
22:45 UtahDave joined #salt
22:54 bhosmer joined #salt
22:54 Furao joined #salt
22:55 aranhoide joined #salt
22:55 splat1 joined #salt
22:59 jacksontj joined #salt
23:00 jschadlick
23:03 nrub_ joined #salt
23:03 LarsN UtahDave: did you happen to reach out to Robert today?
23:03 UtahDave LarsN: Actually, I've been traveling all morning.
23:03 LarsN rgr.  I prepped him
23:04 UtahDave I'll send him an email here in a few minutes
23:04 UtahDave LarsN: sweet!  Thanks, man.
23:04 LarsN as a result when you do reach out, he has some back story, and will likely end up re-directing you
23:04 LarsN but he at least knows the score
23:04 UtahDave that's great!  I'll send out that email right now
23:05 kho joined #salt
23:06 kho joined #salt
23:14 Furao joined #salt
23:15 UtahDave LarsN: sent!
23:15 jschadlick I am having trouble implementing a custom module, I followed the configuration in the docs and am still getting errors, even in a trivial case. Here  are my config settings and calls: https://gist.github.com/anonymous/5801328 . Any ideas would be appreciated
23:23 UtahDave jschadlick: what version of Salt are you on/
23:23 UtahDave ?
23:24 Furao joined #salt
23:24 jschadlick 0.15.1
23:25 UtahDave jschadlick: any way you can upgrade to 0.15.3?  There have been some fixes for the module syncing since 0.15.1
23:27 jschadlick I think so. i'll try that and bug you again if that doesn't work. thank you
23:29 krissaxton joined #salt
23:30 UtahDave thanks!  let me know how it goes, jschadlick
23:31 nrub joined #salt
23:32 brianhicks joined #salt
23:39 elbaschid joined #salt
23:44 Furao joined #salt
23:45 cxz joined #salt
23:49 cxz joined #salt
23:52 cxz joined #salt
23:54 Furao joined #salt
23:55 jschadlick left #salt
23:55 bemehow joined #salt

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