Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-07-01

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

All times shown according to UTC.

Time Nick Message
00:00 bruce-one joined #salt
00:02 javl left #salt
00:19 Jahkeup_ joined #salt
00:21 adotbrown joined #salt
00:24 jbunting joined #salt
00:33 bruce-one joined #salt
00:39 jessep joined #salt
00:41 bruce-one joined #salt
00:43 bruce-one Hi :-) I've been doing a bit of playing around with Salt and am really liking it, but the one area I have questions around is how to manage testing...
00:43 bruce-one Is there anything similar to Chef's test-kitchen for salt?
00:45 bruce-one Or, how do you guys manage your testing with Salt? :-)
00:46 EugeneKay I test in production. Saves on infrastructure costs.
00:49 * robawt waits for EugeneKay to say they're joking
00:50 EugeneKay You'll be waiting a while.
00:50 bruce-one joined #salt
00:51 rfgarcia bruce-one: not the answer you're looking for, but we "test" our salt states by provisioning dev VMs with (basically) the same states we deploy to production
00:51 renoirb_ joined #salt
00:52 EugeneKay When I'm creating a new statefile to manage a service I "test" it on the machine it will apply to, but I don't actually point the service(Mail, web, whatever) at it until I think it works.
00:53 rfgarcia basically it sounds like smoke testing is the only option
00:54 spy604 joined #salt
00:54 EugeneKay You could build a mirror of the infrastructure(with a test domain), but it quickly becomes expensive to keep doubles of everything online.
00:55 EugeneKay Salting things piece-by-piece until it's all salty works well, and spreads the downtime pain around a bit.
00:56 EugeneKay Ideally, things will only break when you change them, so don't make changes until it works! (how circular)
00:56 bruce-one joined #salt
00:59 kleinishere joined #salt
01:02 bruce-one joined #salt
01:02 bruce-on1 joined #salt
01:03 bruce-on1 Apparently my connection's pretty terrible :-(
01:04 bruce-on1 We're kind of looking for/at a BDD type approach to build a new environment for some pre-existing software
01:04 Gwayne joined #salt
01:05 bruce-on1 I'd wondered about just manually managing a cucumber-nagios (or similar) set of tests and just manually pointing them at a test env, but was wondering if anyone had anything that's as clean as test-kitchen (seems) :-)
01:09 jessep joined #salt
01:10 afx_hero joined #salt
01:10 afx_hero joined #salt
01:11 afx_hero left #salt
01:12 bruce-one joined #salt
01:15 mgw joined #salt
01:15 luminous bruce-one: I vcurrently test with test=True in production beforre testing like crazy during dev on vms
01:15 luminous we're all consenting adults here, sso to speak
01:17 luminous I don't just randomly update my master/minions, every step of the way must not be a surprise
01:18 luminous that said.. there are a few users with some total awesome test frameworks that test to ensure what you've deployed through salt is correct as you intended. for example, that foo package was installed and bar file was deployed, which basically is a confirmation that salt's results were correct
01:19 bruce-on1 yeah, that kind of thing is I think what I'm looking for...
01:19 bruce-on1 But... I'm not sure how "necessary" it is...
01:21 luminous how disciplined is the team?
01:21 bruce-on1 We're trying to BDD/TDD an env and I think it seems like a really managable workflow with salt, just the actual testing bit seems less well integrated/managed
01:21 luminous how would you test the test framework?
01:21 bruce-on1 quite good
01:23 bruce-on1 The manager (and project in general) has been burnt by undiciplined teams in the past, so is pushing the "quality" line pretty aggressively
01:23 luminous got someone who can QA?
01:24 luminous or maybe what you need are more focused on app-level integration tests
01:24 cxz --test=debug
01:24 luminous that confirm that salt did what it was supposed to
01:24 cxz --test=true
01:24 cxz something like that
01:24 bruce-on1 luminous: That's what I'm wondering too...
01:24 luminous eg, if you are deploying webapps that need things like databases.. your tests need to vconfirm connnectivity and that sort of thinmg
01:25 luminous that's
01:25 luminous that's all specific to your individual needse
01:26 bruce-on1 I hear you; test-kitchen looks to manage building an environment and then run a test suite against said environment all in one step...
01:27 bruce-on1 Whilst I wonder about salt-ing a test environment and then pointing a test suite at the same environment and pressing "go"...
01:28 bruce-on1 But it would need/benefit from something that can hook into the same environment config as Salt - eg to know which tests to run against which boxes
01:29 luminous so that's a set of states and some cloud profiles/maps for salt-cloyud
01:29 bruce-on1 (from a high level, I'm trying to avoid using Chef and want to use salt instead, but for the workflow we're looking at test kitchen seems fairly holy-grail-ish :-s )
01:30 luminous would probably take a fedw days to string it all together, provided you have the other states all ready
01:30 luminous it sounds pretty but likely nothing special
01:30 luminous but i know little about chef
01:30 luminous otherf than I don't want to touch it
01:31 bruce-on1 no... part of why I was wondering whether anyone else had tried anything similar :-)
01:31 Nexpro joined #salt
01:31 bruce-on1 :-p seconded - it never looks very clean...
01:32 LyndsySimon joined #salt
01:32 bruce-on1 do you know, can salt-cloud be used against something like Vagrant? - ie something that's very cheap to spin up and then reset
01:36 liuyq joined #salt
01:37 mgw joined #salt
01:37 liuyq joined #salt
01:39 bluemoon joined #salt
01:42 bruce-one joined #salt
01:46 Gifflen joined #salt
01:51 bluemoon joined #salt
02:02 StDiluted joined #salt
02:02 bruce-one joined #salt
02:04 raydeo joined #salt
02:11 bruce-one joined #salt
02:13 elbaschid joined #salt
02:13 mgw joined #salt
02:17 idkfa joined #salt
02:18 elbaschid hello everyone
02:19 elbaschid is anyone out there who can tell me if it is in general possible to provide custom modules in a _modules directory in gitfs
02:19 elbaschid ?
02:20 elbaschid I've tried it and salt 'master' sys.sync_modules doesn't work.
02:20 elbaschid So i am wondering if I am doing things wrong or if its not meant to work.
02:20 fxhp Good question
02:21 bluemoon joined #salt
02:21 fxhp I didn't implement git as a salt file_store because it didn't support shs
02:21 fxhp ssh*
02:24 elbaschid so that means I can only pull in states using gitfs and not modules?
02:26 baniir joined #salt
02:26 zonk1024 joined #salt
02:28 bruce-one joined #salt
02:32 jkleckner joined #salt
02:32 renoirb joined #salt
02:34 mgw joined #salt
02:38 shiznit joined #salt
02:40 bruce-one joined #salt
02:50 renoirb_ joined #salt
02:59 raydeo joined #salt
03:03 bluemoon joined #salt
03:07 zonk1024 joined #salt
03:08 bruce-one joined #salt
03:08 luminous bruce-on1: that is exactly the point to salty-vagrante
03:08 adotbrown joined #salt
03:24 Furao joined #salt
03:28 bruce-one joined #salt
03:31 alazylearner joined #salt
03:35 rfgarcia joined #salt
03:36 StDiluted evening all
03:36 rfgarcia_ joined #salt
03:38 Psi-Jack in jinja, how would I do a command-separated list of values in an array?
03:41 bruce-one joined #salt
03:41 Psi-Jack {{ servers|join(', ') }}  perhaps? Where servers is the list of values?
03:49 bruce-one joined #salt
03:50 jaequery joined #salt
03:50 afx_hero joined #salt
03:51 oz_akan_ joined #salt
03:52 Psi-Jack Hmmm, that didn't work..
03:52 Psi-Jack TypeError: do_list() takes exactly 1 argument (2 given)
03:52 renoirb_ joined #salt
03:54 Psi-Jack oh, oops. Did |list. instead of |join :)
04:03 rglauser joined #salt
04:09 bruce-one joined #salt
04:10 jaequery joined #salt
04:10 bluemoon joined #salt
04:11 zonk1024 joined #salt
04:19 zonk1024 joined #salt
04:33 multireal joined #salt
04:37 shiznit joined #salt
04:39 renoirb Quick question, do masterless salt minion actually can use gitfs_remotes
04:39 renoirb ?
04:42 clint_ joined #salt
04:43 clint_ Afternoon :)
04:43 mgw joined #salt
04:44 clint_ I am trying out Salt Stack and liking it a lot so far.  But one thing thats not clear to me is how to use some of the modlues inside a state file.
04:45 kleinishere joined #salt
04:45 clint_ this works
04:45 clint_ mypkgs:   pkg.installed:     - pkgs:       - screen       - pax       - dmidecode
04:47 clint_ But I then thought I could do something like yumpkg.upgrade: below mypkgs:
04:47 clint_ But this fails, any pointers to what I'm missing ?
04:48 bruce-one joined #salt
04:50 clint_ I know that the following works from the cmd line salt '*' pkg.upgrade'
04:53 Gwayne joined #salt
04:53 Gwayne joined #salt
04:58 Gifflen joined #salt
05:00 wahahajun joined #salt
05:00 zonk1024 joined #salt
05:00 wahahajun hello.
05:01 wahahajun is there someone ever used Salt requisite
05:04 wahahajun hello, can anyone hear me?
05:04 bruce-one joined #salt
05:05 wahahajun here is my sls file.  compile well.  http://rn0.ru/show/1H7CfnrOEJY6KC4908Rz/
05:05 wahahajun the first state JDK run well . but the second state can not run..
05:06 wahahajun if i delete the "- require:     - pkg: JDK"  the both state can run well. .
05:06 bluemoon joined #salt
05:07 elbaschid renoirb: I have tried that myself and didn't have any luck.
05:07 wahahajun so i think maybe " - require" not be used rightly..
05:08 elbaschid so I don't think this works right now, but it could as well be me not configuring it right ;)
05:08 elbaschid I am not as much of an expert as other people here
05:10 wahahajun me too. so let's try do deal with more poblem.. and discuss with each other...may be other person met the same problem too..
05:10 spy604 is there a salt master bootable iso or vm apliance
05:11 wahahajun yes . salt mster in ubuntu os  and salt minion in windows..
05:12 spy604 sorry i'm a newb
05:13 spy604 is there a free community version
05:13 wahahajun um....i may have the same quesiton in future..
05:13 elbaschid wahahajun: your SLS looks right to me
05:13 elbaschid what's the error you get?
05:14 bruce-one joined #salt
05:15 wahahajun got no error. just the first state JDK run well. the second Set_Path don't run..
05:15 wahahajun if i delete the "- require:     - pkg: JDK"  the both state can run well. .
05:18 wahahajun So i want to know how to use "- require" rightly.  the JDK  have been installed why the set_path can be executed.....
05:18 cxz so who currently has the highest amount of nodes with saltstack?
05:18 wahahajun sorry.  the JDK  have been installed why the set_path can be be executed.....
05:18 cxz what are some of the larger figures we are seeing?
05:20 elbaschid wahahajun: I am not sure what the problem could be. What'
05:20 elbaschid s the command you are running?
05:21 wahahajun salt '*' state.sls win.repo.jdk.jdk
05:22 wahahajun jdk is the name of sls file
05:23 rglauser joined #salt
05:23 elbaschid can you add the output of that when run with the 'require' instruction to your code snippet?
05:24 wahahajun sorry. i don understand. now starter..how to add the output...
05:26 elbaschid what's the output when you run the command?
05:28 wahahajun nothing....
05:29 wahahajun but if i delete the "- require "  i can get the output like
05:30 wahahajun http://rn0.ru/show/57nhmYLuFIroSCuOc2z6/
05:31 zonk1024 joined #salt
05:31 bruce-one joined #salt
05:31 elbaschid can you run the command on one of the minions using 'salt-call -l debug state.sls win.repo.jdk.jdk' and see if you get any errors or more detailed output?
05:31 wahahajun ok.i try
05:37 wahahajun slat-call : command not found
05:37 Furao slut-call works for me
05:37 Furao hookers are coming
05:37 shiznit joined #salt
05:37 wahahajun ??
05:38 Furao slat-call : command not found
05:38 Furao you said
05:38 Furao it's salt-call
05:38 wahahajun salt-call: command not found
05:39 wahahajun i made a mistake
05:39 Furao apt-get install salt-minion
05:41 wahahajun yes , i didn't install minion on local server. just master.
05:41 bruce-one joined #salt
05:42 cxz actually i believe 'salt' provides it?
05:44 bluemoon joined #salt
05:45 mgw Is anybody using the virt module?
05:45 wahahajun the local minion is in ubuntu Os but the remote server is in Windows OS.
05:46 mgw I've updated qemu_nbd module to successfully mount images on Ubuntu, but am hoping someone can test the patch against RH/CentOS.
05:46 bruce-one joined #salt
05:47 Furao salt-call is in the minion
05:48 Furao dpkg -S `which salt-call`
05:48 Furao salt-minion: /usr/bin/salt-call
05:48 linuxdingding3 joined #salt
05:52 nrub joined #salt
05:52 linuxdingding3 left #salt
05:53 bruce-one joined #salt
05:56 linuxdingding3 joined #salt
05:58 twiedenbein I guess what I'm looking
05:59 jaequery joined #salt
06:01 wahahajun @<elbaschid>  i get result when i try to run  'salt-call -l debug state.sls win.repo.jdk.jdk'
06:03 wahahajun http://rn0.ru/show/jM4Uap4P4X9cdRwJVqlB/
06:05 elbaschid it looks like the JDK package cannot be found/installed. As a result, because the setx command requires it, Set_Path fails as well
06:07 elbaschid It looks like you are running Window which I don't know anything about in terms of how pkg works
06:07 elbaschid i'd check if a package JDK is available and if you have used the correct name in your SLS
06:07 elbaschid the package name might be case-sensitive
06:08 wahahajun o. in window minion it real have successfully install the JDK.
06:10 wahahajun (1) i add a init.sls file to locate the jdk.install.exe (2) i use $ salt-run winrepo.genrepo     $ salt ’*’ pkg.refresh_db (3)  in jdk.sls file use   JDK:  pkg.installed
06:10 ollins joined #salt
06:11 wahahajun here is guids http://docs.saltstack.com/ref/windows-package-manager.html#generate-repo-cache-file
06:13 wahahajun how can  i  run the command in windos minion "'salt-call -l debug state.sls win.repo.jdk.jdk "..  I'm not famiar with slat-call method...
06:14 elbaschid I'd assume you can just run it in a windows console but I am really the wrong person to talk to about windows, I don't have any experience with that
06:15 elbaschid Sorry
06:15 wahahajun ok
06:16 wahahajun i will try in other method but still thank very much
06:17 kevinbrolly joined #salt
06:18 carlos joined #salt
06:26 cxz what is the coolest thing that anyone has seen with salt so far
06:28 jeddi no ruby!
06:30 kleinishere joined #salt
06:31 elbaschid no problem, sorry I couldn't be more helpful
06:35 kleinish_ joined #salt
06:35 carlos joined #salt
06:37 drdran joined #salt
06:37 Newt[cz] joined #salt
06:38 shiznit joined #salt
06:39 cxz that's terrible jeddi
06:54 jeddi cxz: i'm awake 3 hours before a normal person should be.  that's my excuse.
06:58 middleman_ joined #salt
06:58 kleinishere joined #salt
07:01 bluemoon joined #salt
07:02 adotbrown joined #salt
07:11 p3rror joined #salt
07:13 azbarcea joined #salt
07:14 adotbrown joined #salt
07:14 Ryan_Lane joined #salt
07:16 Lucas_- joined #salt
07:18 favadi joined #salt
07:23 Ryan_Lane joined #salt
07:26 balboah joined #salt
07:26 jpcw joined #salt
07:31 vaxholm joined #salt
07:39 shiznit joined #salt
07:43 backjlack joined #salt
07:47 Xeago joined #salt
07:49 mirrorbox joined #salt
07:52 Gifflen_ joined #salt
07:55 zonk1024 joined #salt
08:00 kleinishere joined #salt
08:04 felixhummel joined #salt
08:05 scott_w joined #salt
08:06 wahahajun new problem for sls file:  too many functions declared in state "file" in sls win.repo.ant.ant
08:08 zonk1024 joined #salt
08:09 wahahajun resoved : there is a  space in "source salt://win/repo..."
08:10 wahahajun many error are caused by such space.  be carefll
08:13 Mouzz joined #salt
08:20 krak3n` joined #salt
08:28 adotbrown joined #salt
08:31 tomas_ joined #salt
08:37 wahahajun can someone tell me how to set the file_roots for fileServer
08:38 kadel /msg NickServ identify heslo
08:38 kadel left #salt
08:38 wahahajun what's its defaut value
08:39 shiznit joined #salt
08:39 wahahajun here is my sls file  http://rn0.ru/show/VZwwg2YeUR5DmJ4hdcSb/
08:40 wahahajun i get nothing even error info..
08:40 nkuttler wahahajun: well check your master config
08:40 kadel joined #salt
08:40 wahahajun ok.thanks
08:43 wahahajun need retsart the master to make it effect?
08:49 wahahajun still get nothing for sls file http://rn0.ru/show/VZwwg2YeUR5DmJ4hdcSb/
08:50 wahahajun when i run command:              salt 'win7_minion1" state.sls win.repo.ant.ant
08:50 wahahajun if i need to config the minion client?
08:53 oliv_mc joined #salt
08:54 whiskybar joined #salt
09:08 craig joined #salt
09:17 oliv_mc joined #salt
09:23 krak3n` joined #salt
09:24 drdran hi, I'm startign using salt, I have some consideration, is possible to run salt-minion without root privileges?
09:24 krak3n` joined #salt
09:25 Furao drdran: why?
09:25 drdran The user that run salt, must have the possibility to do sudo?
09:25 Furao you want to manage what with the minion?
09:25 Furao painfully, yes
09:26 drdran I'm startign to impement a netwirk, I've readed about to impelment salt-master withou a unprivileged user, but not for the minion
09:26 Furao sudo is good to prevent human errors. but for a minion, if you automate error, sudo won't help you prevent them
09:27 Furao well not really prevent human errors, limits damage
09:27 drdran Furao: thanx so you suggest to have satl-master->root and salt-minion->root in a production enviroment?
09:27 Furao unless they fixed that in 0.16
09:27 Furao even running a salt-master as non-root is tricky
09:27 Furao but as the minion manage the OS and configs
09:28 Furao it must run as root
09:28 drdran Furao: thanx for the information
09:28 Furao all OS changes aren't all done trough a command
09:28 Furao many are python code
09:28 Furao you can run sudo on a python function
09:28 Furao can'T
09:30 drdran Furao: thanx so much, i'm newbe in salt and I hope to not stress much more with stupid questions :D
09:32 Jason-AVST joined #salt
09:40 shiznit joined #salt
09:49 jeddi drdran: judging from the number of poeple in here getting stuck with trying to make salt work as non-root .. i'd say that it's a lot more pain than you (probably) want.   you can always come back later to your configuration and try to make it run as non-root.  but Furao's right - there's not many compelling reasons to try to run it as non-root.
09:50 henk Not even the master can be run as non-root?
09:57 Corey To my understanding only the master CAN be run as non-root.
09:57 Corey Remember, non-root users can't install packages, start services, create users, etc.
09:59 henk In my understanding of system administration, the master SHOULD be run as non-root … I’m asking because of "Furao | even running a salt-master as non-root is tricky"
09:59 henk What’s tricky about it?
10:01 valberg joined #salt
10:04 kleinishere joined #salt
10:05 zooz joined #salt
10:09 krak3n`_ joined #salt
10:09 krak3n` joined #salt
10:10 szwed joined #salt
10:18 wahahajun file server in salt still not support tht windows minion?
10:18 wahahajun when i use it. i always get error http://rn0.ru/show/0tLnBPRVQiXeeWvUAo6n/
10:21 Furao henk: many reported problem running salt-master as non-root
10:22 Gifflen joined #salt
10:22 Furao google site:http://irclog.perlgeek.de/salt/ master non-root
10:23 balltongu joined #salt
10:24 henk Furao: Thanks, that’s not good :-/
10:27 whiskybar joined #salt
10:28 bhosmer joined #salt
10:28 pnl joined #salt
10:38 p3rror joined #salt
10:40 shiznit joined #salt
10:42 Lucas_- joined #salt
10:47 oz_akan_ joined #salt
10:48 diegows joined #salt
10:55 oz_akan_ joined #salt
11:09 jbunting joined #salt
11:12 ranl joined #salt
11:19 hazzadous joined #salt
11:23 carlos_ joined #salt
11:24 Newt[cz] joined #salt
11:41 shiznit joined #salt
11:51 whiskybar joined #salt
12:01 kenbolton joined #salt
12:05 carlos joined #salt
12:09 jetblack joined #salt
12:12 aleszoulek joined #salt
12:16 Jahkeup_ joined #salt
12:27 blee_ joined #salt
12:32 DerekRBN joined #salt
12:37 bhosmer joined #salt
12:37 adotbrown joined #salt
12:42 yidhra joined #salt
12:44 juicer2 joined #salt
12:45 efixit joined #salt
12:53 swa i need to specify a value with accented characters in a pillar e.g. "domain: - sébastien.be".. what's the correct syntax to get around YAML ascii limitations ? I've tried a couple with no success
12:53 jslatts joined #salt
12:54 shiznit joined #salt
12:55 Xeago joined #salt
12:57 Furao_ joined #salt
12:59 whit joined #salt
12:59 efixit joined #salt
12:59 bhosmer_ joined #salt
13:00 techdragon joined #salt
13:04 Gifflen joined #salt
13:04 Kholloway joined #salt
13:05 whit joined #salt
13:06 isomorphic joined #salt
13:10 desmondmorris joined #salt
13:10 desmondmorris left #salt
13:15 cnelsonsic joined #salt
13:23 racooper joined #salt
13:24 bhosmer joined #salt
13:25 bhosmer_ joined #salt
13:27 copelco joined #salt
13:27 mgw joined #salt
13:29 bhosmer joined #salt
13:31 nrub joined #salt
13:35 linjan joined #salt
13:36 shadowfax|chc joined #salt
13:36 bhosmer_ joined #salt
13:41 madduck can I use -I (pillar) targetting and test for occurrence of a string in a list?
13:41 madduck i.e. assume I have a pillar foo and it has a key bar whose value is a list, and I want to target all hosts that have 'quux' in foo['bar']
13:53 lemao joined #salt
13:53 abe_music joined #salt
13:53 bhosmer joined #salt
14:00 cnelsonsic left #salt
14:01 salty007 joined #salt
14:01 salty007 helo, anyone build their own centos rpms from salt git source?
14:04 JasonSwindle joined #salt
14:09 kula salty007: i think i did once, ages ago
14:10 kenbolton joined #salt
14:13 bhosmer joined #salt
14:14 jalbretsen joined #salt
14:15 salty007 could you try to remember what the steps were?
14:15 efixit joined #salt
14:15 anteaya joined #salt
14:15 salty007 I'm more familiar with debian :P
14:15 rglauser joined #salt
14:16 lemao joined #salt
14:16 salty007 do I just cmake; make rpm or...?
14:17 salty007 or since salt is python, do I even need to cmake...? bah, debian was easy - chroot debian/rules binary; done.
14:23 jpadilla joined #salt
14:25 opapo joined #salt
14:26 nrub joined #salt
14:26 jbunting joined #salt
14:27 toastedpenguin joined #salt
14:28 toastedpenguin when I run salt '*-cn.*' test.ping it matches all hosts with -cn. in their name, but when I use it in an init.sls file as so: {% if grains['host'] == '*-cn.*' %} none of the hosts are matched
14:29 Shish "==" is a literal exact match (I don't know how to to easy globbing in a template...)
14:29 kula if i remember properly, salty007, i just downloaded the SRPM from epel, made a few changes (i think i needed a newer version than was currently in epel at the time), and used rpmbuild to build a new rpm
14:30 UtahDave joined #salt
14:31 salty007 ok, ANY ideas how to build a functional rpm (with man pages etc)  from github salt source?
14:32 toastedpenguin so maybe I have to create a pillar instead in order to use globbing?
14:33 teskew joined #salt
14:34 alazylearner joined #salt
14:34 kula salty007: there is a salt.spec file in pkg/rpm. that, and reading up on the rpmbuild process, will get you an rpm.
14:35 whit joined #salt
14:36 jacksontj joined #salt
14:40 baniir joined #salt
14:40 whit_ joined #salt
14:42 Jahkeup__ joined #salt
14:42 nrub_ joined #salt
14:52 awatertree joined #salt
15:00 rglauser joined #salt
15:01 swa i'm trying to achieve something like this : {% for vhost in pillar['apache-vhost']['{{ grains['nodename'] }}'] %} but it doesn't work.. Any idea ?
15:03 __gotcha joined #salt
15:03 __gotcha joined #salt
15:04 jacksontj_ joined #salt
15:06 Furao swa: don't mix jinja markup in jinja markup
15:07 Furao it's not shitty php :P
15:07 Furao {% for vhost in pillar['apache-vhost'][grains['nodename']] %}
15:07 krak3n` joined #salt
15:08 krak3n`_ joined #salt
15:08 jaequery joined #salt
15:08 swa Furao: thanks :-) sorry noob here, i'm trying to figure things out by trial and error mostly
15:09 redbeard2 joined #salt
15:13 teskew anyone know when we can expect the 16.0 release in the ubuntu repo?
15:14 kaptk2 joined #salt
15:15 StDiluted joined #salt
15:19 twinshadow joined #salt
15:20 jbunting joined #salt
15:21 chrisgilmerproj joined #salt
15:21 chesty joined #salt
15:24 racooper So...why are my selinux states not applying? http://pastebin.com/mP3cFGAk
15:29 nrub joined #salt
15:31 jschadlick joined #salt
15:33 waverider joined #salt
15:34 carlos joined #salt
15:37 sijis joined #salt
15:37 efixit joined #salt
15:37 kenbolton joined #salt
15:38 jaequery joined #salt
15:44 LarsN would  somone take a quick look at http://pastebin.com/h0CeGEf1 and tell me if this is a valid use of jinja if statements in an sls
15:44 LarsN namely is it acceptable to nest if statements?
15:44 Furao line 5 {#
15:44 Furao is wrong it's {%
15:44 LarsN stupid typos.
15:45 LarsN but otherwise the nested ifs are acceptable?
15:45 Furao not sure about the depth of indentation
15:45 UtahDave LarsN: I think it's fine to nest them.  Just be careful to not get too crazy with them so they don't get too confusing
15:45 Furao as there is no context
15:45 LarsN UtahDave: rgr.
15:46 LarsN UtahDave: we've gone back and forth on how to handle this complex beast we're now trying to shoehorn salt into.
15:47 LarsN UtahDave: version 1.2 will be a lot better as we're looking to simplify code, and start using Jinja for a single "config" file rather than custom scripts per region.az
15:47 LarsN but yeah, in general it's a mess. :)
15:47 terminalmage joined #salt
15:48 krak3n` joined #salt
15:48 UtahDave LarsN: Here's one thing you may want to consider
15:49 UtahDave You might want to abstract all those nests into a pillar, and then have your templated configs just have a simple {{ salt['pillar.get]('myitem', 'default-value') }}
15:49 teskew UtahDave: who manages the packaging for ubuntu? do we have an ETA on when 16 will be in the repo? i'm still struggling with my salt-cloud dependency and don't want to upgrade outside of the repo
15:50 UtahDave teskew: 0.16.0 will hopefully be ready and in the repos tomorrow evening.
15:50 UtahDave LarsN: Does that make sense?
15:51 teskew thanks UtahDave
15:51 StDiluted joined #salt
15:52 balltongu joined #salt
15:53 kenbolton joined #salt
15:54 UtahDave you're welcome, teskew
15:55 kleinishere joined #salt
15:57 jkleckner joined #salt
16:01 LarsN UtahDave: admittedly I really should sit down and read about pillar
16:01 LarsN currently it's a pandora's box I haven't opened.
16:01 LarsN UtahDave: I'll put that on my reading list for tomorrow.
16:03 tomeff_ joined #salt
16:07 akoumjian SEJeff_work: Just saw you contributed to graphite. Does this mean you might have an example salt formula to set it up? :-)
16:07 Gifflen joined #salt
16:07 jschadlick how do I go about using the schedule_returner returner option? I can't find any documentation on it aside from the fact that it exists
16:08 krak3n` joined #salt
16:08 Gifflen joined #salt
16:11 opapo joined #salt
16:11 dave_den joined #salt
16:13 toastedpenguin can you define sources for files in a pillar config file?
16:14 teskew akoumjian: i have a graphite salt state somewhere
16:15 UtahDave toastedpenguin: do you mean to specify the path to the file in pillar, or to have pillar provide the contents of a file for distribution
16:15 UtahDave ?
16:15 akoumjian teskew: If you wouldn't might pasting it somewhere, it would be greatly appreciated. For such a popular project, they have a complicated install process
16:16 toastedpenguin UtahDave: specify a path to a file, so if for instance the hostname contains *-cn.* use this file, if it contains *-ls.* then use another file etc.
16:16 toastedpenguin I was trying to do this in a template
16:17 toastedpenguin but globbing didn't seem to work
16:17 toastedpenguin maybe my method was the fault, but I wasnt even sure if I should be using a template or a pillar with what I am trying to do
16:18 UtahDave toastedpenguin: yeah, you can definitely do that.  I was just trying to clarify because we have an open ticket to allow, for example, to have the value of the pillar be the contents of a file, such as a public key or something
16:18 UtahDave toastedpenguin: your matching is probably off, or something
16:19 toastedpenguin can do it within a template you mean?
16:19 teskew akoumjian: i'll throw it up on github. it's written more specifically towards centos/red hat, but easy to change.
16:19 akoumjian teskew: That's fine. I'm sure it won't be too much of a switch from debian/ubuntu
16:19 toastedpenguin UtahDave: this is an example of what I was trying to do: {% if grains['host'] == '*-cn.*' %}
16:20 toastedpenguin http://fpaste.org/22156/37269561/ for a full list of my init.sls file
16:21 jaequery joined #salt
16:21 UtahDave toastedpenguin: Yeah, I don't think you can match it that way.
16:22 UtahDave toastedpenguin: let me put together an example
16:23 UtahDave toastedpenguin: So do you want to have that if tree in your sls file or in your pillar?
16:23 KyleG joined #salt
16:24 toastedpenguin UtahDave: being a noob I am not sure what is the most flexible
16:25 toastedpenguin I setup the pillar example for packages and see the power of using pillar, but wasn't sure how to apply the same logic for this sort of setup
16:26 UtahDave toastedpenguin: basically the == comparison  isn't going to allow you to match like that.
16:27 UtahDave you could try   {% if '-cn.' in grains['host'] %}
16:27 teskew akoumjian: https://github.com/tateeskew/salt-states/tree/master/graphite
16:28 dthom91 joined #salt
16:29 akoumjian teskew: Absolutely brilliant, thank you.
16:29 teskew that should provision a standalone graphite server fully.
16:29 bhosmer joined #salt
16:29 akoumjian teskew: Would you mind adding your states repo to saltstarters.org?
16:30 toastedpenguin UtahDave: ok I'll give that a try
16:30 teskew no, i don't mind. i've got a lot of other ones that i've never found on saltstarters.org, either. i've just been lazy and not pushed them up to my github.
16:31 teskew okay, added to saltstarters.org
16:31 nliadm does the batch runner always have the specified number running?
16:32 jdenning joined #salt
16:32 akoumjian teskew: the site only indexes the readme into search, so updating that will get it to show up better. once added to the index, it will pull in changes on a regular basis
16:32 nliadm if I run '-b 3' is there always 3 minions running the command, or can it sit waiting on one slow minion?
16:32 teskew okay, i'll add the states which are contained in the repo to the readme
16:34 karlp nliadm: pretty sure the docs explicitly answer that.
16:35 nliadm I thought so, but it seems to not work that way
16:35 Jahkeup_ joined #salt
16:35 baniir joined #salt
16:38 nliadm it seems like it runs on 3 minions and waits for them to all come back
16:38 toastedpenguin UtahDave: getting errors using the changes: http://fpaste.org/22163/96721137/
16:38 nliadm not spawning another run as they return, as the docs suggest
16:40 LarsN Is this a bug with grains, or am I doing it wrong?  http://pastebin.com/RmMLQWzc
16:40 teskew akoumjian: if you "genericize" those states for graphite any more than they already are, feel free to shoot me a pull request.
16:41 UtahDave LarsN: try    salt 'LarsTesting"  grains.item checks
16:42 dave_den nliadm: when i run batches it does seem to wait for slow minions
16:42 kermit joined #salt
16:42 LarsN root@nocutilities-dev-salt-server:/srv/salt#  salt 'LarsTesting"  grains.item checks
16:42 LarsN >
16:42 LarsN which I had to ^C out
16:42 UtahDave LarsN: what version of Salt are you on?
16:42 whit joined #salt
16:43 LarsN salt 0.15.3
16:43 UtahDave LarsN: try restarting your minion. There was a bug where grains weren't available right away. I'm not sure if that fix made it into 0.15.3
16:44 LarsN oh, that's right
16:44 LarsN let me do the grains.sync thing.
16:44 UtahDave toastedpenguin: you have to remove the extra "if"  after your "elif"
16:44 LarsN I'm especially dumb on mondays
16:44 jessep joined #salt
16:45 toastedpenguin I am blind....I need new glasses...thx for pointing it out
16:47 karlp LarsN: wasn't that just because you had ' vs " ?
16:47 JasonSwindle joined #salt
16:47 toastedpenguin ok errors gone (no thanks to my 20/20 vision) but it doesn't look like a match occured, it still used the default
16:49 LarsN karlp: yes, although grains.items still doesn't show any value in "checks" or "categories"
16:49 LarsN the categories has only one value .
16:50 UtahDave toastedpenguin: can you pastebin the output of    salt <a minion name> grains.item host
16:51 toastedpenguin ok saw the issue, host grain doesnt contain the domain name so there is no '.' after the cn
16:51 toastedpenguin removed that '.' and it matched
16:51 alazylearner joined #salt
16:52 mgw UtahDave: do you know what might be in place for auto accepting keys generated by img.seed? I've been putting in some pull reqs for virt related stuff, but don't want to duplicate effort or go about this the wrong way.
16:52 mgw img.seed is called by virt.init (if requested), on the hypervisor
16:53 UtahDave mgw: I haven't worked on that code myself, but I'm pretty sure that virt generates the keys and places them in the correct locations.
16:53 LarsN UtahDave: http://pastebin.com/WMEAhggJ
16:54 mgw UtahDave: there's a todo in img.seed to add functionality for the master to accept the generated key
16:55 UtahDave mgw: Oh, really?  Hmm. So is it not accepting the key?
16:58 mgw UtahDave: no, it doesn't
16:59 mgw UtahDave: https://github.com/saltstack/salt/blob/develop/salt/modules/img.py#L75
17:00 jkleckner joined #salt
17:00 UtahDave mgw: OK, just got schooled a little on that
17:00 akoumjian No idea why, but provisioning a new VM with salt 15.3 on Ubuntu Precise is failing spectacularly today. Oddly, nothing has changed.
17:00 UtahDave So, you're obviously right. That has not been implemented yet.
17:01 UtahDave akoumjian: how are you provisioning it?
17:01 akoumjian UtahDave: salty-vagrant plugin.
17:01 akoumjian UtahDave: actually I think I just figured it out
17:01 UtahDave akoumjian: ok
17:01 akoumjian UtahDave: :-D PEBCAK
17:03 mgw UtahDave: https://github.com/saltstack/salt/issues/5844
17:03 * LarsN tries rebooting the whole instance
17:05 jimallman joined #salt
17:05 mgw joined #salt
17:06 kenbolton joined #salt
17:06 x_or joined #salt
17:07 LarsN no love with getting my grains set.
17:07 LarsN what's fun is the grains that are set by salt-cloud at instance creation, work fine.
17:07 UtahDave LarsN: testing some stuff with that here
17:07 toastedpenguin UtahDave: thanks for the help its working now
17:07 x_or I just installed that latest salt using the bootstrap link. I am trying to test the connection with "salt '*' test.ping" but it says the command is not found.
17:07 LarsN UtahDave: rgr, thanks.
17:07 LarsN let me look at the code we're using to set the grains at creation time.
17:07 x_or I do see the salt-minion command. Any idea why the salt command is missing? Is salt-call the same?
17:08 UtahDave toastedpenguin: cool!
17:08 LarsN UtahDave: looks like the ones we're setting in cloud.profiles are being applied.
17:09 bluemoon joined #salt
17:10 jacksontj joined #salt
17:12 davisamo joined #salt
17:13 davisamo left #salt
17:14 davisamo joined #salt
17:16 bluemoon joined #salt
17:17 LarsN UtahDave: if I edit /etc/salt/minion and then saltutil.sync_all that works
17:17 LarsN although that's sub-optimal
17:17 UtahDave that's odd.
17:19 LarsN for now, that at least lets me test my MOTD building state file.
17:19 LarsN :)
17:21 jessep joined #salt
17:21 whit joined #salt
17:27 UtahDave LarsN: This worked for me:  salt 'minion-name' grains.setval checks "['my1', 'my2']"
17:28 milind joined #salt
17:28 afx_hero joined #salt
17:28 afx_hero joined #salt
17:30 bluemoon joined #salt
17:31 jaequery joined #salt
17:31 tpe11etier joined #salt
17:36 littleidea joined #salt
17:41 dthom91 joined #salt
17:41 LarsN UtahDave: so the use of double quotes outside, and single quotes inside?
17:41 LarsN alrighty, I'll give that a shot.
17:41 LarsN Thanks.
17:41 jschadlick joined #salt
17:41 aboe joined #salt
17:42 TheRealBill_ joined #salt
17:42 fragamus joined #salt
17:43 UtahDave cool
17:52 bhosmer joined #salt
17:55 jaequery joined #salt
18:02 mgw to use custom modules, does module_dirs need to be specified on every minion in addition to the master?
18:02 mgw and then sync run?
18:03 karlp mgw: nope, just put them in the right salt /_modules dir and sync, no need to reconfigure the minions
18:03 mgw karlp: thanks
18:03 mgw and will modules with the same name as a bulit in override the built in?
18:05 karlp no idea on that myself,
18:05 UtahDave mgw: yes, it should override the builtin
18:07 whit joined #salt
18:08 TheRealBill_ so, strategy question. I'm building up a set of states for  nutcracker/redis clusters. On each physical node will run a variable number of redis instances (X/CPU on the node). The nutcacker  config will live on all of the nodes in a cluster and needs to know about each nodename/port pair for every node in the cluster.
18:09 TheRealBill_ would it be better to store the information about what nodes are in a cluster in, say pillar, and use node-to-node communication to get the list for each node, or store all of it combined into Pillar in some fashion?
18:11 jacksontj joined #salt
18:11 nliadm http://docs.saltstack.com/topics/targeting/batch.html <- this seems to describe batching differently than how it actually works
18:13 nliadm in actuality, it seems like a list of nodes it generated, sliced up into batches, then the function is run on a batch, waiting for all of them to return until kicking off the next batch.
18:14 nliadm the docs make it sounds like there's a queue built, a number of "runners" allocated, that grab minions out of the queue as functions finish
18:16 TheRealBill_ that sounds like my reading of it as well. how are you demonstrating/confirming the way it is working?
18:16 nliadm I'm cooking up a test case right now
18:17 TheRealBill_ nice
18:17 nliadm here:
18:18 nliadm salt -b 10 \* cmd.run 'echo `hostname` | grep f >/dev/null 2>&1 && sleep 120'
18:19 nliadm it'll turn through minions fast, until a group has a host with 'f' in the hostname (or whatever) and the whole group waits for the sleeping minions
18:20 nliadm the docs read like it should keep running
18:21 TheRealBill_ i agree
18:21 TheRealBill_ how many hosts overall and how many satisfy the sleep  condition?
18:23 balltongu joined #salt
18:23 nliadm the glob I used matched ~300, and roughly 20 have an 'f' in the name
18:23 nliadm but when it hits one, it make the whole group wait
18:24 TheRealBill_ it could be an appearance thing, however, on the  salt command output. I think wrapping that command in a script which records it's timestamp or returns the timestamp it was initiated would give better insight. If the CLI is waiting but the processing is still happening (due to synchronizing output) the above test wouldn't differentiate that.
18:25 nliadm true
18:26 nliadm I'd have to peek at the source to see which it is
18:29 TheRealBill_ something like "date > /tmp/test &&  {hostname | grep f  1>/dev/null 2>&1 && sleep 120 } && date >> /tmp/test" as the command followed by a cat of the tempfile might do it. (bash syntax  not verified :) )
18:30 nliadm TheRealBill_: good call
18:31 berto- joined #salt
18:31 alazylearner joined #salt
18:35 bluemoon joined #salt
18:35 DerekRBN Anyone have any ideas on why sometimes when i call highstate i get output but sometimes not but cmd.run always returns?
18:37 TheRealBill_ is there a noticable delay when you don't get the output compared to when you do?
18:37 littleidea joined #salt
18:37 TheRealBill_ I've noticed I get no output when the node doesn't respond instead of an error. you could try verbose mode to see if that happens.
18:38 Jahkeup__ joined #salt
18:38 waverider joined #salt
18:38 hazzadous joined #salt
18:39 jaequery joined #salt
18:39 DerekRBN it just comes back with nothing at all even tho i could have 3-12 nodes that were just called. The odd thing is that it runs and it does go to the highstate however it just does not produce output
18:39 DerekRBN ive noticed that if i run it 2-3 times it will usually spit it out at me once
18:40 TheRealBill_ try running with verbose enabled on the command line, it might tell you what is going on.
18:42 DerekRBN will do
18:42 jschadlick Has anyone gotten scheduling working with returners? I seem to be having trouble doing so.
18:43 p3rror joined #salt
18:43 nliadm https://github.com/saltstack/salt/issues/5848
18:44 akoumjian teskew: Is there one sls file you assign to install the whole graphite stack, should I install each individually (graphite-web, supervisor, etc)
18:45 DeepThoughts joined #salt
18:45 zonk1024 joined #salt
18:49 tpe11etier joined #salt
18:55 bhosmer joined #salt
18:55 whit joined #salt
18:57 waverider joined #salt
19:00 rglauser joined #salt
19:00 LarsN UtahDave: I figured out my "grains" problem
19:00 UtahDave LarsN: Ah, what was going on?
19:00 LarsN UtahDave: it's a fun one, and "might" qualify as a bug, I'm not sure.
19:01 LarsN so if you set a grain via cloud.profiles (even if the value is '')
19:01 LarsN it gets written to /etc/salt/minion on the new instance
19:01 LarsN aparently you can't set grains via the grains.setval that are defined in the minion config.
19:01 LarsN at least that's what appears to be the case.
19:02 UtahDave Ah, yeah. We ran into that the other day with someone.
19:02 UtahDave Have you found a bug on that?
19:03 LarsN I haven't looked yet.
19:03 LarsN Checking now.
19:03 LarsN think that would go under salt, or under salt-cloud
19:04 UtahDave salt
19:05 logix812 joined #salt
19:06 LarsN rgr, looking now.
19:06 LarsN thanks.
19:06 UtahDave you're welcome
19:06 diegows joined #salt
19:06 mgw Here's a quandary. When img.seed does a highstate in a chroot, it shouldn't start any services. How would you (UtahDave or anyone) think this should be handled?
19:07 nliadm mgw: a dummy service module?
19:08 mgw nliadm: interesting iea
19:08 mgw but I'm not sure how that would be implemented practically
19:08 nliadm not sure how you'd detect you're in a chroot
19:08 nliadm yeah
19:10 jefimenko joined #salt
19:10 UtahDave mgw: what if you have a specific sls that make sure all services are stopped?  I'm not sure how you could completely stop a debian-based system from starting services at install time.
19:10 mgw UtahDave: that might work — don't include it in top, but call it with state.sls within chrot
19:11 mgw I'm a little concerned about services trying to start (since top says they should be) that could conflict with the hyper's ports
19:12 UtahDave mgw: right.  You can also specify a custom top file   with  state.top  startup-top
19:12 UtahDave (startup-top.sls is just an dumb example name I came up with)
19:12 mgw UtahDave: good point, that might be helpful
19:13 mgw I might just make a preseed.top and run that instead of the usual highstate
19:13 UtahDave cool
19:13 mgw but it will still need the 'stop all services' sls
19:15 whiskybar joined #salt
19:15 UtahDave mgw: I wonder if there is a flag in apt to not start the service at install time
19:15 LarsN bug filed since I did't see one that was similar.
19:15 UtahDave LarsN: Thanks!
19:15 HaxCore joined #salt
19:16 waverider_ joined #salt
19:16 mgw I thought about just issuing "kill -TERM −1" before exiting the chroot
19:16 UtahDave mgw: Oh, so it's ok to start the service if Salt just shuts it down right away?
19:17 mgw UtahDave: I'd prefer not, but that's better than leaving it running
19:17 waverider_ joined #salt
19:17 zooz joined #salt
19:17 mgw which will prevent umount from unmounting the image
19:17 UtahDave gotcha
19:18 UtahDave mgw: I'm looking at this SO thread. http://serverfault.com/a/347985/6419
19:19 bosszaru joined #salt
19:19 abe_music UtahDave: any idea how to get rid of this warning? https://gist.github.com/abemusic/5903635
19:20 waverider_ left #salt
19:20 UtahDave abe_music: ah, that's aggravating.  Are you running 0.15.90?
19:20 abe_music running the dev branch
19:21 UtahDave Yeah, I think that will be fixed once we release 0.16.0.  The RC name we chose didn't quite work out.  :)
19:21 abe_music salt = 0.15.90
19:21 abe_music UtahDave: ah ok…i didn't know if i could resolve it with some git magic or not…tried the tags recommendation with no luck
19:21 mgw UtahDave: yeah, i was just looking at the rc stuff. that might work
19:22 auser joined #salt
19:22 auser hey all
19:22 auser UtahDave: hey man
19:22 StDiluted hey auser
19:23 auser hey StDiluted
19:23 StDiluted UtahDave, is AWS VPC stuff in the pipeline?
19:24 UtahDave hey, auser!
19:25 bosszaru first day on salt - how do I go about troubleshooting the following http://pastebin.com/6Y8qcJD6 - is it a versioning issue?
19:25 UtahDave StDiluted: It's on the todo list, I believe, but I'm not sure if work has started on it yet.
19:25 dave_den UtahDave and mgw - shouldn't image.seed just inject the salt installation and the minion config? the execution of highstate should be done within the context of the image being booted from the actual virtualization used
19:25 StDiluted UtahDave: I see.
19:26 dave_den (jumping in without having read the entire backlog here - sorry if i'm out of line :)
19:26 UtahDave nah, that's ok, dave_den  :)
19:27 UtahDave StDiluted: looks like the dev who was working on it is out for another couple weeks.
19:27 pweo joined #salt
19:27 dave_den any state executed should be in the context of the minion running, not as what the minion of the image will be once booted, at least IMO.
19:27 UtahDave bosszaru: can you pastebin your sls file that triggered that error?
19:28 StDiluted UtahDave: ah, ok. Well, that's good information. For now I'm planning to use packer to make AMIs to get started but it would be awesome to have native VPC support in Salt.
19:28 rcassidy joined #salt
19:28 UtahDave StDiluted: I agree!
19:28 bauser joined #salt
19:29 chadhs joined #salt
19:29 mgw UtahDave: unfortunately, that doesn't work for at least some services (tested with mysql-server)
19:30 mgw dave_den: well, i'm dealing with a chicken and egg issue that's been lurking. I need to customize certain aspects of the system before first boot.
19:30 mgw e.g., hostname
19:30 UtahDave mgw: Hm. I wonder if we can find a debian pro who might be able to help.  Corey, do you have any idea how to do that?
19:31 mgw I could isolate these into a subset of states, and that might be the best option.
19:31 mgw To just do the minimum setup
19:31 bosszaru UtahDave: is that key some include that is missing?  if you had to guess, I'm not sure how the config works yet and it's huge
19:32 Corey UtahDave: To do what, exactly?
19:32 UtahDave Corey: cause apt to install a package without starting its service automatically at install time.
19:33 efixit joined #salt
19:33 jacksontj joined #salt
19:34 Corey UtahDave: There's a way, but it's ugly as sin, let me dig it out.
19:34 Corey UtahDave: http://askubuntu.com/questions/74061/install-packages-without-starting-background-processes-and-services
19:34 UtahDave hm.
19:35 kaptk2 joined #salt
19:35 JasonSwindle UtahDave: I have an idea.  After a highstate….. salt needs to list the number of states ran, number of passed, and number of failed.
19:35 dave_den mgw: i currently do complete bootstrap and seeding by automated installs using e.g. for centos kickstart configs. it takes me from blank virtual machine image to customized install including preseeding my minion config and setting anything else before actual first boot of the image
19:36 JasonSwindle Scrolling thru the list of true | false is no fun
19:36 jaequery joined #salt
19:36 UtahDave JasonSwindle: That's a really cool idea.
19:37 UtahDave I bet we could do that in an outputter.
19:37 zooz joined #salt
19:37 JasonSwindle My highstate output is getting longer and longer, and more complex.  So, it is like hunt for the false failed state now.
19:38 UtahDave JasonSwindle: that's cool.
19:38 StDiluted yeah, agree, and I like to use mosh (mosh.mit.edu) and it doesn't support scroll back so it would be awesome to get a summary at the end.
19:38 JasonSwindle Something simple, verbose and at the bottom.
19:38 UtahDave JasonSwindle: Also, have you looked at the the two options in the master config regarding that?
19:38 JasonSwindle Total States: 103
19:38 bhosmer joined #salt
19:38 JasonSwindle True: 100
19:39 JasonSwindle False: 3
19:39 JasonSwindle Or whatever
19:40 TheRealBill_ Perhaps a CLI option for the summary. And I'd suggest the summary list what states failed. Otherwise you're still scrolling through it looking for failed ones if you get them, to figure out what failed.
19:40 HaxCore joined #salt
19:42 mgw corey: LOL. That's awesome in a horrible way.
19:42 teskew akoumjian: here's my top.sls portion for graphite: https://gist.github.com/tateeskew/5903892
19:42 Corey mgw: yeah, isn't that great?
19:42 Corey mgw: Blame Debian. :-)
19:42 akoumjian teskew: nice, thanks
19:43 mgw yeah, if there weren't so many init systems
19:43 mgw it might be a little easier
19:43 Corey mgw: And I'm sure that there's ABSOLUTELY NO WAY that implementing that particular workaround could EVER result in a problem, right?
19:45 mgw corey: certainly not!
19:47 bosszaru UtahDave: just set a basic file and now I see "No states found" and it appears that someone killed the /srv/salt-states directory.  Is there a way to regenerate?
19:47 mgw Corey, UtahDave: A magic pillar value would work, but I'm thinking it's too ugly
19:47 mgw __dont_run_services__
19:47 Corey mgw: Sure, but how're you going to get dpkg to respect that?
19:47 mgw which would make the service module stop/not start services
19:48 mgw corey: at least salt would stop them
19:49 Corey mgw: If there were a case where I seriously did not want the service to start, I'd probably roll my own package.
19:49 mgw anyway, I'm just going to do the preseed run on the essential element
19:49 mgw s
19:49 mgw (hostname, networking)
19:49 mgw and skip installing any packages until after first boot
19:49 UtahDave mgw: good idea
19:50 Corey mgw: Oh, this is for preseed?
19:50 Corey mgw: That actually becomes a lot easier.
19:50 mgw corey: yeah
19:50 UtahDave bosszaru: I'm confused. How did you get your files in /srv/salt  in the first place?
19:50 Corey It's not running the system that's installing during installtime.
19:50 mgw This was in regard to running salt-call inside a chroot
19:50 Corey mgw: So just follow it up with an update-rc.d command.
19:50 Corey Ahhh.
19:50 bosszaru UtahDave: previous gentleman, who disappeared
19:51 StDiluted I had some stuff in /srv/pillar but have deleted it, and when i call state.highstate, I still am getting errors about it not being available. Is there a cache I need to clear or something?
19:51 mgw I was looking at update-rc.d, but it didn't seem to work
19:51 mgw how would I make it work, corey?
19:51 UtahDave bosszaru: Hm. The files in /srv/salt are files that you put there. There isn't really a way to regenerate them.
19:51 bosszaru but the salt-states?
19:52 Corey mgw: update-rc.d servicename disable works.
19:52 UtahDave bosszaru: I'm not sure what you mean.  That must be a custom directory
19:52 mgw StDiluted, try: salt * saltutils.referesh_pillar
19:53 bosszaru "No states found for this minion" then isn't related to some directory?
19:53 StDiluted "saltutils.refresh_pillar" is not available.
19:53 bosszaru sorry I'm a newb and appreciate the thelp
19:53 StDiluted saltutil.refresh_pillar worked though ;)
19:54 dhgbrg joined #salt
19:54 UtahDave bosszaru: that's ok.  What that means is that your top.sls file isn't matching your minion to any sls files.  Or maybe your /srv/salt/top.sls doesn't exist
19:54 jschadlick joined #salt
19:54 StDiluted Thanks mgw!
19:54 mgw StDiluted: sorry about the typo, glad you figured it out
19:54 StDiluted mgw: no worries. checked man pages ;)
19:58 bosszaru UtahDave: thanks!
19:58 UtahDave bosszaru: did you get it working?
19:59 chrism So i'd like to match two different hostname schemas in my top.sls, like an "or" statement... is something like that possible?
19:59 chrism i.e. appname.staging.domain.com AND web*.appname.domain.com
19:59 UtahDave chrism: Yeah, you'll want to use a "compound" matcher
19:59 mnemonikk joined #salt
20:00 chrism aah cool, looking now
20:01 chrism oh nice, there's even an "and" operator
20:01 chrism yay!  tnx again UtahDave!
20:01 UtahDave you're welcome, chrism
20:01 littleidea joined #salt
20:02 bosszaru UtahDave: no,  http://pastebin.com/wHv4DeAp is the simplified config that does not work
20:03 UtahDave bosszaru: I wonder if global is a reserved word.   What's the full path of your  global/users/init.sls?
20:04 bosszaru UtahDave: /srv/salt/global/users/init.sls  I was told that this had been working at some time
20:04 UtahDave bosszaru: OK, let me modify your paste and try something similar.
20:05 bosszaru UtahDave:  thanks!
20:05 UtahDave bosszaru: Try this: http://pastebin.com/GexyhgxN
20:08 bosszaru UtahDave: that seemed to not fail, but it looks like there are tons of those in the config by environment
20:09 StDiluted left #salt
20:09 StDiluted joined #salt
20:09 aleszoulek joined #salt
20:10 bosszaru what's it called when there are blocks besides base, like that, so I can google it up to figure out what he was trying to do.
20:11 UtahDave bosszaru: "base"  is the default "environment"   Each item on that same 0 level indent is an "environment"
20:11 dthom91 joined #salt
20:12 bosszaru envrionments are set on the minions that are calling in?
20:12 p3rror joined #salt
20:13 x_or joined #salt
20:13 UtahDave bosszaru: You can match on environments right in the top.sls.  You can also anchor a minion to only look in a specific environment in the minion's config file.
20:22 bosszaru UtahDave: that's the ticket.  the environemtn was not defined in /etc/salt/master
20:22 * bosszaru wishes to now find two people  1) person who set this up   2) UtahDave for his beverage/meal of choice
20:22 StDiluted heh
20:23 mikedawson joined #salt
20:23 jessep joined #salt
20:27 UtahDave bosszaru: :)  Glad you got it figured out.
20:32 jschadlick I am having an issue trying getting a returner to work within a schedule. I can run something like: sudo salt-call status.loadavg --return=local with no problems. but when I try to use a returner within a minion's schedule I get the  message: [INFO    ] Job status.loadavg using invalid returner: local Ignoring.
20:33 bosszaru UtahDave:  thanks for the help!
20:36 carlos joined #salt
20:42 berto- joined #salt
20:44 carlos_ joined #salt
20:44 jbunting joined #salt
20:46 oliv_mc joined #salt
20:49 UtahDave jschadlick: can you pastebin your config?
20:49 jschadlick yeah, sec
20:52 toastedpenguin total noob question, but how does the salt master check for file changes, how often and how is this specified?
20:53 toastedpenguin been doing everything by hand so far and realized I didn't know how the stuff I am implementing will stay persistent
20:54 jschadlick UtahDave: https://gist.github.com/anonymous/5904547
20:55 UtahDave jschadlick: what version of Salt are you on?
20:55 jschadlick 0.15.3
20:56 UtahDave toastedpenguin: the master and minions only check for file changes when you tell them to.  Either by a push from the master or a pull from the minion or if it's scheduled somehow
20:56 UtahDave jschadlick: ok, thanks
20:56 toastedpenguin UtahDave:  is there a recommened method to schedule checks?
20:57 toastedpenguin and/or plans for an automated scheduler?
20:57 toastedpenguin firs tthing that comes to mind is using cron and setting up a high.state every 5-10 min for all minions
20:58 UtahDave jschadlick: It looks like this bug might be related: https://github.com/saltstack/salt/issues/4102
20:58 jlund joined #salt
20:58 tempspace If I have a server named server7-ny.mydomain.com, why doesn't a pillar of 'open*.mydomain.com' match it?
20:58 UtahDave jschadlick: and this was the fix: https://github.com/saltstack/salt/commit/827ee0ddb3010c14caca6ba48d066130caa96412
20:58 rglauser joined #salt
20:58 EugeneKay tempspace - because that's not how wildcards work?
20:58 UtahDave toastedpenguin: there is an internal Salt scheduler, but you can use cron, too
20:59 toastedpenguin ok I will investigate, thanks for the info
20:59 TheRealBill_ using salt.client.RemoteClient , if a highstate command runs w/o error on a minion, is it supposed to return empty?
21:00 TheRealBill_ (python API to be clear)
21:00 jschadlick UtahDave: I'll try to add the .returner and see if it works, thanks
21:01 toastedpenguin when using service statement -running -require -pkg, how should it be handled when the service name isn't identical to the package name?
21:01 UtahDave jschadlick: ok.  Have you tried another returner?
21:01 tempspace EugeneKay: Actually, it does work that way, just figured it out
21:01 toastedpenguin e.g package ntp uses ntpd for the service
21:02 tempspace I had a server that was matching multiple wildcards so it was only taking one of the pillar files
21:02 UtahDave toastedpenguin: you'll need to add the  - name: <actual service name>
21:02 jschadlick @UtahDave: yeah, I have tried with the carbon returner and a modified carbon returner I made (both of which work outside of the scheduler)
21:02 oliv_mc joined #salt
21:02 UtahDave jschadlick: did those work?
21:03 toastedpenguin UtahDave: so under -require instead of pkg use name?
21:03 toastedpenguin or use both
21:03 jschadlick @UtahDave: no, they get the same invalid error that local does
21:04 jschadlick @UtahDave, I tried to add the .returner to the schedule and got these errors: https://gist.github.com/anonymous/5904604
21:04 UtahDave jschadlick: OK, can you open an issue on that? With all the details you have?  We want to get this fixed today.
21:04 jschadlick @UtahDave: Sure thing! thanks for the help
21:04 toastedpenguin nvrmind, its under - require....
21:08 jaequery joined #salt
21:08 morganfainberg left #salt
21:10 bhosmer joined #salt
21:10 UtahDave jschadlick: we're looking at it right now
21:12 f4cl3y joined #salt
21:13 UtahDave jschadlick: where are you seeing this stacktrace?
21:15 jschadlick @UtahDave: when starting up a minion with a local.returner in the schedule
21:15 UtahDave jschadlick: did you start it in debug mode?
21:16 UtahDave jschadlick: we think we found it and the fix.  This should make it into 0.16.0, which is expected to be released tomorrow evening
21:16 jschadlick UtahDave: umm, I think? I just started it non-daemonized with full debugging on
21:17 juicer2 left #salt
21:17 jschadlick UtahDave: awesome! thanks for all the work you all are doing! what was the underlying issue?
21:18 austin987 joined #salt
21:19 ahammond UtahDave:  I'm seeing weirdness around the publish.publish results again. I have 45 hosts, and am getting about 43 responding to the calls.
21:19 UtahDave really?  What version of Salt are you on?
21:20 ahammond 0.15.3 I think.
21:20 ahammond let me double check.
21:20 ahammond UtahDave: yup. 15.3 across the board.
21:23 UtahDave ahammond: and they all respond to normal queries from the master, right?
21:24 ahammond UtahDave:  I can check, but yes, I think I haven't seen any problems there.
21:25 UtahDave ahammond: master is 0.15.3 as well?
21:25 rglauser joined #salt
21:26 ahammond UtahDave: I just ran 50 calls each of network.ip_addrs and grains.items datacenter (the two calls published by my hosts state) and they all had exactly 45 replies.
21:26 UtahDave ahammond: I think that's fixed in the Release candidate.
21:26 ahammond UtahDave: that's what --versions-report says. :)
21:26 ahammond Oooooh, an RC? exciting!
21:27 UtahDave 0.15.90 is the release candidate.  We made the publish.publish more asynchronous. There was one part of it that wasn't, and that was causing the returns from some minions to be missed.
21:27 ahammond UtahDave: I bet that's what's biting me.
21:28 UtahDave jschadlick: Fixed!
21:28 aranhoide joined #salt
21:28 UtahDave jschadlick: https://github.com/saltstack/salt/commit/b7dc9c2684d00adbcef84d7617456ad422a68572
21:28 ahammond UtahDave: any idea when the RC will get released?
21:28 UtahDave ahammond: it's out right now.   0.16.0 will probably be available tomorrow evening.
21:28 JasonSwindle publish.publish.publish.publish.publish.publish
21:29 ahammond UtahDave: I'll plan on updating Wednesday then. :)
21:29 jslatts joined #salt
21:30 UtahDave cool.
21:30 UtahDave service JasonSwindle restart
21:30 jschadlick UtahDave: thanks so much!
21:30 JasonSwindle That did it. :)
21:30 UtahDave jschadlick: you're welcome!  Thanks for helping us track that down!
21:30 UtahDave JasonSwindle: :)
21:32 jaequery joined #salt
21:32 TheRealBill_ so, using salt.client.LocalClient in a test setup I have two nodes. If I run state.highstate, one returns nothing (not even it's name is in the results), and the other returns the system errors (which is expected). Is this expected behaviour, when a highstate run has no errors it doesn't return anything? If I run it via the salt command on the CL it behaves as expected.
21:37 UtahDave TheRealBill_: what's the exact command you're running with LocalClient?
21:38 TheRealBill_ lc.cmd('*','state.highstate')
21:39 TheRealBill_ test.ping works fine, returning both nodes.
21:40 UtahDave TheRealBill_: try using cmd_iter()   or cmd_cli()
21:40 UtahDave cmd() won't wait for all the returns. So if your highstate will take longer than 5 or 10 seconds (or whatever the exact timeout is) It won't receive it.
21:41 TheRealBill_ UtahDave: ahh, was wondering about that and looking for something to validate that suspicion
21:41 UtahDave Yeah, the docs could use a little clarification and explanation in that area.
21:42 TheRealBill_ it would be good if the results showed a timeout instead of just dropping the nodes that didn't respond fast enough.
21:43 TheRealBill_ does the command on the minion still continue or is it killed at the timeout?
21:43 bhosmer joined #salt
21:44 UtahDave TheRealBill_: The command continues on the minion.  The master just isn't waiting to receive and display the response
21:44 UtahDave cmd.iter() and cmd.cli will wait, I believe
21:44 efixit1 joined #salt
21:44 TheRealBill_ iter worked
21:44 UtahDave cool!
21:45 JasonSwindle Go TheRealBill_
21:46 zooz joined #salt
21:47 TheRealBill_ so it seems that in general anytime a minion doesn't respond in the given window, it isn't present in the output. This is a bit of a problem, IMO, as it means to ensure a group of minions did as expected, I'd have to skip using patterns which result in multiple nodes and specify them manually to cross-check for results. It seems better for salt to include the timeout/didn't respond status in the results. Is there something I am missing here?
21:48 bluemoon joined #salt
21:54 UtahDave TheRealBill_: doesn't cmd.iter() wait?
21:56 renoirb joined #salt
21:56 TheRealBill_ UtahDave: it does, but I am talking about in general, and more often (so far) using the salt CLI Tool. for example, if a minion doesn't respond to test.ping, I simply don't see that minion in the output. In my mind, I should see the minion id in the output telling me it timed out or otherwise didn't respond. These type of errors are silent, in other words.
21:57 TheRealBill_ If I enable  verbose output on the CLI, it does tell me the node didn't respond, so I know the data is in there somewhere. ;)
21:58 UtahDave Yeah, the master will use data in the minion grains cache to predict which minions it things should be returning.  Hence the extra data in verbose mode.
21:58 morganfainberg joined #salt
22:00 TheRealBill_ excellent, now if we took that data and did something like minion.name: { 'responded': False }  it would let you know a minion it expected to respond did not.
22:03 UtahDave that's what -v is for.
22:03 bhosmer joined #salt
22:04 TheRealBill_ so if you want to know which hosts responded and which didn't you have to use verbose mode all the time, then?
22:06 UtahDave I THINK so.  I don't use the LocalClient much.  Let me do some investigation
22:06 UtahDave the main problem is that the master doesn't always know which minions should return. Depending on what you're targeting
22:06 TheRealBill_ I'm referring not just to LocalClient but the salt CLI tool.
22:07 TheRealBill_ (though for all I know the CLI Tool uses LocalClient)
22:08 ckrough joined #salt
22:08 dahunter3 joined #salt
22:10 zooz joined #salt
22:11 dahunter3 All right, I've gotten pretty darn far in one day messing with Salt. Very impressive. I've got another high level type question: How do you guys go about managing multiple data centers. Like, how do I store the value of the master database for each datacenter so I can access it in SLS files etc?
22:12 f4cl3y joined #salt
22:13 UtahDave dahunter3: There's a few ways to do that.
22:14 dahunter3 UtahDave: What are the best practices?
22:14 UtahDave So probably the best way to do this, dahunter3, is to keep that info in your pillar.
22:15 UtahDave Then set a custom grain telling each minion which datacenter they are in, and they'll get the correct master database depending on where they are
22:16 StDiluted and setting custom grains is done in the minion file, yeah?
22:16 dahunter3 UtahDave: Okay, cool. I was on the right track then, I was thinking pillar might be the answer. I figured the hardest part would be setting a variable name that would be different in each datacenter … like uniquely discovered based on first 3 octets of IP or something?
22:17 StDiluted so would that be something you would set using salt?
22:17 UtahDave StDiluted: you can set custom grains in the minion's config, in a grains file on the minion, by creating a custom grains python file that resolves the grain, and also by using salt '<minion name> grains.setval datacenter NYC
22:18 UtahDave dahunter3: Yeah, you could easily write a custom grain that would evaluate the grain by the IP address
22:21 TheRealBill_ so on a related note. I have a redis sls which instantiates a variable number of redis instances based on CPU count. These will be part of a larger cluster which will be over multiple nodes. To get it all working I need to to create a nutcracker config file which needs to know all the instances on each node in the cluster. So the question is: is it better to enable node to node communication and have the minion check the other nodes for their name/por
22:21 TheRealBill_ pairs or have the state file update pillar with that information?
22:21 Jahkeup_ joined #salt
22:21 UtahDave TheRealBill_: It depends on how recent you need the data
22:22 dahunter3 TheRealBill: I don't know much of anything at this point, but seems to me the pillar would be better as then if you have other SLSs like monitoring then they would know which machines to monitor
22:22 UtahDave If you use the peer interface, then you get the data back according to what's on your infrastructure RIGHT NOW.
22:22 renoirb joined #salt
22:23 UtahDave If you use the Salt Mine, then you get the data back according to the last time the mine was run. Which I think runs every 30 minutes, by default.  Maybe 60 minutes
22:23 TheRealBill_ UtahDave:  so perhaps store what nodes are in a cluster in pillar, then use peer interface for current list?
22:23 UtahDave TheRealBill_: Also, it depends on how dynamic you want everything to be. If you're taking a very hands on approach and know exactly how many machines should be there and their names, then pillar works very well
22:24 UtahDave TheRealBill_: Whereas if you're in a very dynamic environment, then the peer interface (publish.publish) is probably what you want
22:25 dthom91 joined #salt
22:27 TheRealBill_ UtahDave: hmmm. well I know how many nodes there re *now*. but that is just for the first cluster. I expect more clusters with varying nodes. The catch, I think, is that once the first node is brought up, I want the second node to not have to wait for Mine to run to know about the other node, and same for reconfiguring of the initial node.
22:27 TheRealBill_ So it looks like pillar for "nodes in the cluster" and peer publishing for the details.
22:28 UtahDave TheRealBill_: So you're going to manually keep the pillar updated with node information?
22:29 TheRealBill_ I was thinking it would be updated it when the state ran. While it is conceivable I may want to change it dynamically in the future, I don't see worrying about it now.
22:29 TheRealBill_ though I wonder if a static grain on the minion would handle it better.
22:29 UtahDave yeah, pillar doesn't update dynamically, unless you're using an external pillar that you're updating dynamically
22:31 bluemoon joined #salt
22:32 ingwaem joined #salt
22:34 ingwaem Greetings Salty pals…quick question if I may…when using the salt api and calling /jobs or using jobs.list_jobs, I get a list of jobs that have been executed…as the day progresses this list grows and grows (as expected) and everything works well…however, there are times when I'm debugging that it would be nice to clear out all jobs and start again…much like it does when it housecleans every 24 hours…is there a way to manually kick off the cleanup
22:34 ingwaem process so that I can have a clean list of jobs when needed?
22:34 chrism has anyone noticed oddities w/ rebooting the salt-master and breaking salt-minion communications?
22:35 ingwaem chrism, yes, if you restart the master and minions are connected they will be temporally disconnected…they "should" reconnect though after several seconds once it's back up…you seeing something different?
22:36 chrism Yeah, longer delay, I haven't ruledout them reconnecting just yet though
22:36 chrism 3 mins so far, unable to run a salt \* test.ping
22:36 chrism this is in 15.3, btw
22:37 chrism Centos 6.x on everything
22:37 fivethreeo joined #salt
22:37 chrism aah there we go
22:38 chrism looks like it takes ~5 mins or so to come back
22:39 chrism I am noticing a bit of weirdness from salt \* test.ping though, 25 hosts and it runs through them all really fast and then just hangs there for like 15+ seconds
22:39 chrism they all respond within like 2 seconds though
22:39 chrism i'll mess with that tomorrow though
22:41 UtahDave ingwaem: Yeah, you can clear the job cache. I'm not sure if there is a function for that, but you can just delete the job cache, which I think is in   /var/cache/salt/master/jobs/
22:42 UtahDave chrism: Are there some minions in salt-key -L  that don't appear when you run the test.ping?
22:42 ingwaem thanks UtahDave :) I'll check it out…don't mind about specific functions just a location…whoohoo
22:43 UtahDave cool, ingwaem!
22:44 fxhp "http://russell.ballestrini.net/add-a-custom-header-to-all-salt-managed-files-using-pillar-and-jinja-templates/
22:44 rberger joined #salt
22:44 fxhp erm suffixed the link with a "
22:46 UtahDave pretty cool, fxhp!
22:47 jaequery joined #salt
22:47 * fxhp nods
22:50 kermit joined #salt
22:54 jeddi fxhp: that is quite nice - i'm liberally applying these comments on allt he files that my colleague might accidentally try to edit locally ... wonder if tehre's a neat way to deal with non-# comments (I'm thinking the vim configuration files mostly here - which use " for comment)
22:55 fxhp Its also a basic example of how to "parameterize" configuration files
22:55 fxhp jeddi: yeah I was thinking about htat
22:56 jeddi fxhp: i think everything else i'm commenting all accepts the #.    though bash scripts get confused if you prefix it with comments (ie. it needs the magic #!).   hmm .. i'm going to fiddle with this now - thanks for the idea.
22:57 fxhp Yeah jeddi you may place the jinja substitution anywhere in the managed file
22:57 fxhp so below the #! hashbang is not too difficult
22:58 rberger Hi there, we were told that there is a way to use Saltstack to drive Chef. But I can't find any references to that. Any pointers?
22:59 * robawt highfives fxhp
23:00 UtahDave rberger: One way to do that is if you're running chef standalone then you can have salt execute the chef commands
23:01 jeddi fxhp: it's on my list to play with!   at the moment i'm trying (failing) to work out a decent way of parameterising a stack of ugly state sls cruft for implementing mysql_grants  .. i think i need about 3 loops, and can't work out a good pillar structure to give me the data.
23:02 rberger UtahDave: Yes, that is what I assume, but we had talked to John Hall at DevOpsDays where he said there were examples or docs somewhere on how to do that? I'm looking to do a quick spike to see how well that works. I'm interested in using Saltstack for simple orchestration of existing infrastructure designs that have chef cookbooks already.
23:02 fxhp jeddi: yeah I don't think pillar in its current state is a holy grail
23:02 rberger So I'm looking for some examples or other docs
23:03 fxhp jeddi: it is enough like a python dict to be useful, but missing key elements that make a dict useful, like updating
23:03 StDiluted rberger: check http://saltstarters.org/
23:03 UtahDave rberger: I'm not exactly sure what docs he was mentioning.  But it could be something as simple as this:    salt \* cmd.run <execute chef command>
23:04 rberger StDiluted: quick search for chef on salt starters.org doesn't find anything. Googling only finds comparisons of Chef and Salt :-)
23:04 fxhp rberger: I would advise against using salt's remote execution to change the state of a minion (salt managed host)
23:04 StDiluted ah. ok. Yeah, I didn't know if there was one there, just seems to be the broadest base of examples I've found
23:05 rberger UtahDave: Ok, I'll give a stab at that. But if anyone knows of any other pointers, please let me know
23:05 fxhp rberger: what in particular are you having trouble with?
23:05 StDiluted why would you do that? just to avoid converting chef recipes into salt states?
23:05 rfgarcia joined #salt
23:05 rberger fxhp: I was hoping there would be some example that I can use as the basis of a experimental spike to try out Salt as an orchestration layer on top of chef.
23:06 rberger We're not at a point where we want to convert to salt. But use its ability to describe and provision a cluster with the existing configuration management of chef.
23:06 fxhp I don't know chef but I assume you could deploy chef "manifest" with salt
23:07 rberger If we can't do that easily or with enough "value" then we'll not be using Salt for this project.
23:07 jeddi fxhp: i have what appears to be the need to do overlapping rather than hierarchial looping .. i'mr eally stuck trying to find *any* suitable pattern, let alone just one in pillar.  i'm sorely tempted to bite the bullet and try to write / learn enough python to do it.
23:08 StDiluted I guess you could use salt to deploy chef recipes and execute chef-solo, eliminating the chef server or hosted chef and enabling you to use chef-solo to manage more than a few machines easily?
23:08 fxhp jeddi: bummer, I also hit a few patterns that I could not solve with the current pillar implementation
23:08 fxhp (so I just have not solved them at all)
23:08 jeddi fxhp: how did you end up solving them, can i ask?  raw python, ugly state files, dump a script out there and execute it?
23:08 jeddi ah - option (d) :)
23:08 jeddi rberger: why are you trying to mingle salt and chef can i ask?
23:08 fivethreeo joined #salt
23:09 jeddi rberger: would you intend to maintain both concurrently for the forseeable, or is this a migration prerequisite?
23:09 austin987 joined #salt
23:09 jeddi rberger: perhaps fabric might be appropriate - though not sure if i'm misunderstanding the nature of an orchestration layer.   isn't chef designed to provide that?
23:12 rberger jeddi: Chef doesn't do any orchestration. It deals with "nodes" or instances, so I wanted to see if I could use the cluster level abilities of Saltstack to orchestrate the provisioning and ongoing chef-client runs
23:12 jacksontj joined #salt
23:13 rberger jeddi: We're assuming we would stick with the dual nature for at least the near future and if we we're "blown away" by Salt we would consider migrating fully later.
23:14 rberger I'm about to give up though if there isn't an example. It was just an idea after talking to John Hall who made it seem like there were examples of doing this.
23:14 UtahDave rberger: If you want to batch 10% updates at a time.   salt \* -b 10% cmd.run <chef-solo>
23:14 jimallman joined #salt
23:15 UtahDave rberger: or you could use the overstate to make sure certain parts of your infrastructure succesfully update before other executions happen.
23:15 UtahDave rberger: You may want to ask John Hall which examples he was talking about
23:16 jeddi rberger: okay, that sounds reasonable.  my chef experience is pretty minimal.  i think trying to get two similar products working well together, especially where one is quite new, and neither are really geared up to 'share the parenting' as it were, probably doesn't put either product in a good light :)
23:16 TheRealBill_ rberger: it sounds like you are just wanting to use salt for the remote execution management, is that a correct assessment?
23:16 rberger UtahDave: Yeah, those and the ability to "describe and provision" a cluster, are the kind of features I was interested in using and are things Chef doesn't do at all.
23:17 rberger The project we have was originally a pure Chef project and I was going to write a simple "orchestration" script that could take a cluster description and use chef
23:18 rberger Chef's knife command to provision the servers. But then I heard more about Salt and its ability to manage clusters AND to at least run chef-client on the machines
23:18 UtahDave rberger: You can use salt-cloud to create a "map" which describes what server vms should be created and then which configs should be applied to them
23:19 ninkotech joined #salt
23:19 ruimarinho joined #salt
23:19 UtahDave rberger: I'd recommend going through a few of the tutorials on docs.saltstack.com and read some of the docs on salt-cloud here: http://salt-cloud.readthedocs.org/en/latest/
23:19 rberger Ok, thanks for the help. I'll take a look at that site. I have to go to take care of some unrelated stuff, but if anyone hears of any concrete examples of using Chef with Salt let me know here or at rberger@opscale.com
23:20 ruimarinho hello, is there any way to have a definition break if the previous definition it depends on did not execute (due to an "unless" property)?
23:24 ruimarinho basically I only want to run a command (make) unless the binary hasn't been compiled yet, but the symlink states still run even if make does not execute
23:26 jaequery joined #salt
23:28 TheRealBill_ ruimarinho: I'm not sure I follow the logic you wrote there.
23:28 cxz joined #salt
23:29 ruimarinho TheRealBill_, http://pastebin.com/SSXUrv5w
23:30 ruimarinho I was expecting that if nodejs-src 'unless' clause returned false, nodejs-make would not execute
23:31 ruimarinho turns out I need to duplicate the 'unless' clause on both definitions, which looks suspicious to me.. so I'm likely doing something wrong
23:31 TheRealBill_ nope, they are two different states, you would need to put the logic in each state.
23:32 ajw0100 joined #salt
23:32 TheRealBill_ the catch is to remember the sls state is a data structure, not a sequential script.
23:32 ruimarinho correct, but wouldn't the 'watch' module monitor, in some way, the execution of the previous script?
23:33 oz_akan_ joined #salt
23:33 ruimarinho I just wasn't expecting the duplicate clause - is there any better way of achieving this?
23:35 TheRealBill_ I may be incorrect  but  I think watch doesn't watch states.
23:35 TheRealBill_ You might be able to use mod_watch as documented at http://docs.saltstack.com/ref/states/ordering.html but I've not tried it yet.
23:36 ruimarinho yep, I read that article before attempting to reach irc support
23:36 ruimarinho alright, I'll look into better alternatives.. maybe someone has been in the same situation before - thanks
23:37 alekibango joined #salt
23:37 TheRealBill_ I believe states don't have a return value that is compatible with a watch statement. Consider a state that changes many things. Perhaps you only care about one part of it working. thus, you could either set a variable into pillar, use a grain to check version, or duplicate the logic.
23:41 ruimarinho right.. there is a stateful property I can set but I believe that's only for situations where you need the returned data
23:42 jeddi ruimarinho: can you turn the state's require: or unless: into a check for the presence of a file, for example?
23:42 ruimarinho yes..I can test the binary's presence
23:42 jeddi oh - ou're saying the binary is present, but faulty?
23:43 ruimarinho present and working :) I want to skip all the 'sequential' (I know this is a bad word in this context) steps if the binary is present
23:43 jeddi oh.  then just check if the file exists?   maybe i'm missing something.
23:43 StDiluted joined #salt
23:43 jeddi ruimarinho:  -unless: ls /path/to/binary
23:44 ruimarinho right, but as TheRealBill_ was saying, each step is stateless, so in this particular case, nodejs-make will still execute even if nodejs-src detects the binary file presence
23:44 ruimarinho did I understand it correctly?
23:45 bensix joined #salt
23:45 ruimarinho so the solution I have for now is to duplicate the 'unless' clause for each step
23:45 jeddi ah .. yeah, okay.   you've got separate identifiers / stanzas for the sequence.  gotcha.    if that's a bit messy can you wrap the build script up into a .sh (or similar), ship it out, and just run that 'unless: ...'
23:45 ruimarinho ah, nice ideia
23:45 ruimarinho *idea
23:46 jeddi ruimarinho: it might be a few lines less code, and a bit more readable .. even if it's a two-step process (ship & execute).
23:46 TheRealBill_ you know, make won't rebuild the binary unless there have been changes to the source files.
23:46 ruimarinho it's a bit more like a black box, since I won't have any feedback of what's going on inside the script though
23:46 jeddi at that point you could even put the unless into the shell script.  but ..   6 of 1, i guess.
23:46 jeddi this is why you make things locally, package them, and then install the packaegs using salt :)
23:47 TheRealBill_ ^^
23:47 jeddi apart from: security, dev cruft on all your prod boxes, complexity of deploys, . . .
23:47 ruimarinho actually, that's a very valuable feedback
23:47 ninkotech joined #salt
23:48 jeddi i'm a very big fan of (other people) producing deb files that i then install.   it's only two lines of salt :)
23:48 ruimarinho within the simplicity of the pkg module..
23:48 jeddi that's the one.
23:48 ruimarinho yep
23:48 jeddi fpm is the typically recommended way in these parts.
23:49 jeddi ruimarinho: https://github.com/jordansissel/fpm if you haven't heard of it before.
23:49 ruimarinho I was googling it ;)
23:49 jeddi it doesn't typically pop up high on the search results, unfortunately.
23:49 ruimarinho nice, thanks for the share
23:49 ruimarinho looks exactly what I need
23:50 ruimarinho then provisioning through salt://?
23:50 jeddi hey - i'm just a very slow bot that propagates links to other people's hard work.
23:50 ruimarinho eheh
23:51 jeddi ruimarinho:  yeah - so package it, ship it, pkg.it .. you get versioning this way, somewhat easier qa, cleaner config management descriptions.
23:51 ruimarinho seriously.. it has been a pleasure to work with Salt (I come from Puppet...)
23:52 jeddi oh, goodness, all that case-sensitivity and ruby and dsl .. no wonder.  :)
23:53 ruimarinho exactly!
23:53 jeddi though i never grokked hiera enough to know how it compares to pillar.
23:53 ruimarinho funny, fpm's example has an example for nodejs
23:54 jeddi almost everyone that ever talks about deploying software uses nodejs *or* wordpress.
23:54 TheRealBill_ must be a common problem, then. ;)
23:54 jeddi one day i'll write a blog post that talks about deploying them at the same time.  SEO FTW.
23:55 ruimarinho eheh
23:56 Asphyxiated|Dk joined #salt
23:56 ruimarinho by the way, quick question - probably in the past apt repository management did not allow the use of "require", only "require_in"
23:56 ruimarinho at the least the current documentation still indicates that
23:57 jaequery joined #salt
23:57 jeddi where you are reading that?
23:57 ruimarinho second, let me see if I can recover my search
23:57 ruimarinho A more involved example involves pulling from a custom repository. Note that the pkgrepo has a require_in clause. This is necessary and can not be replaced by a require clause in the pkg.
23:57 ruimarinho http://docs.saltstack.com/ref/states/all/salt.states.pkg.html
23:57 jeddi i haven't done much with apt repos via salt.
23:58 ruimarinho I'll probably submit a PR and see what's the feedback there, unless I'm missing something obvious
23:58 jeddi ruimarinho:  consider http://docs.saltstack.com/ref/states/all/salt.states.pkgrepo.html?highlight=pkgrepo%20module#salt.states.pkgrepo
23:59 jschadlick left #salt
23:59 jeddi ruimarinho: way down the bottom.
23:59 jeddi ruimarinho:  often if the states doc isn't that insightful, look up the module behind it .. they seem to be documented more verbosely.
23:59 ruimarinho ahhhh, this explains a lot :)
23:59 ruimarinho thanks

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