Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-07-23

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

All times shown according to UTC.

Time Nick Message
00:02 jdenning Hey madduck - is there any way to have reclass specify different environments in the top data?
00:03 jdenning (My state files are stored with the gitfs backend, and different branches correspond to different environments)
00:05 jdenning nevermind, just saw the TODO in the adapters/salt.py code..
00:06 jschadlick left #salt
00:21 Jahkeup_ joined #salt
00:24 oz_akan_ joined #salt
00:30 cocoy1 joined #salt
00:32 chrisgilmerproj left #salt
00:36 Jahkeup__ joined #salt
00:40 [diecast] joined #salt
00:40 [diecast] joined #salt
00:40 aranhoide joined #salt
00:43 kenbolton joined #salt
00:45 baniir joined #salt
00:47 benkay joined #salt
00:50 scalability-junk joined #salt
00:55 jrgifford_ left #salt
00:56 Jahkeup_ joined #salt
00:57 whit joined #salt
00:59 jrgifford joined #salt
01:01 Nexpro1 joined #salt
01:02 baniir i'm having an issue attempting "file.append" with multi line pillar data; the state fails to compile with errors including: "could not found expected ':'"
01:03 logix812 joined #salt
01:05 prologic joined #salt
01:05 prologic Q: Can salt run ansible playbooks? (curious)
01:05 whit joined #salt
01:06 goozbach prologic: I'd guess not as the format is different
01:06 prologic *nods*
01:07 prologic I'm a little disappointed in salt's so-called standalone mode; where it seems you have to copy over your salt config(s) to your target server, ssh in, install salt then run salt-call locally
01:11 prologic https://github.com/saltstack/salt-contrib/blob/533522a408535b16ad8ae9aa20966bd2e0dfe375/modules/ansmod.py
01:11 emocakes_ joined #salt
01:15 goozbach no manches!
01:16 whit joined #salt
01:18 andrew joined #salt
01:23 thingles joined #salt
01:27 Furao joined #salt
01:27 liuyq joined #salt
01:32 whiteinge prologic: keep an eye on the next salt release. salt is getting true standalone
01:33 prologic where you can run salt configs in an ad-hoc fashion over ssh much like ansible?
01:34 prologic and of course still have the option to move to a fully managed master <-> minion(s) environment
01:34 whiteinge yup :)
01:34 manuman joined #salt
01:35 Gifflen joined #salt
01:37 daveabq joined #salt
01:37 whit joined #salt
01:45 napperjabber joined #salt
01:49 daveabq hello. I'm trying to add a simple module such that I can call a function like this: $ salt '*' newmodule.hello  -- I'd like the hello function to simply return the string 'hello'. Following the main Salt documentation, I have added a 'modules' directory under the main 'salt' directory and created a file called new module.py containing the 'hello' function. When I try to execute the function, I get the message "newmodule.hello" is not available.
01:49 daveabq have also created the (empty) file __init__.py and synced the module with the minions via: $ salt '*' saltutil.sync_modules. Am I missing something or should this work?
01:50 berto- joined #salt
01:53 whiteinge daveabq: that directory should have an underscore in front. e.g., /srv/salt/_modules
01:53 daveabq excellent, I'll try that!
01:54 mannyt joined #salt
01:54 daveabq changed the dir name, re-ran the saltutil.sync_modules and I still get the same "newmodule.hello" is not available.
01:56 mgw joined #salt
01:57 daveabq in the /srv/salt/_modules/newmodule.py file, I've got two functions: __virtual__() that returns 'newmodule' and hello() that returns 'hello there'
01:58 daveabq is that all that's required in the module?
01:58 whit joined #salt
01:58 whiteinge yes. actually you don't *need* the __virtual__ function
01:58 whiteinge is anything output when you run sync_modules?
01:59 daveabq just the hostname -> myhostname:
02:00 daveabq nothing after that. should I see the module name?
02:00 whiteinge if the module is copied to the minion it will show up in that output
02:00 daveabq ah, so I'm missing something
02:01 daveabq I'm using this syntax: salt '*' saltutil.sync_modules
02:01 whiteinge that is correct
02:01 daveabq I also tried: salt '*' saltutil.sync_all
02:02 whiteinge it may be worth trying to restart the master...just in case. what version of salt are you on?
02:03 daveabq the output from the sync_all call shows what looks like a directory tree, without the directory names, just the |_
02:03 daveabq 0.16.0
02:04 daveabq same result after restarting salt-master
02:05 daveabq is there a verbose option while running the sync_modules?
02:08 daveabq back in a little while -- thanks for your help!
02:08 prologic left #salt
02:11 whiteinge not afaik. if you start the minion in the foreground with logging tuned up you can see which modules it's loading but if the module doesn't show up in sync_modules it's probably not getting that far
02:14 KyleG joined #salt
02:15 Gordonz joined #salt
02:19 napperjabber joined #salt
02:19 [diecast] joined #salt
02:26 retr0h joined #salt
02:26 retr0h joined #salt
02:26 bauser joined #salt
02:29 Jahkeup_ joined #salt
02:29 _monokrome joined #salt
02:30 mgw joined #salt
02:37 Lue_4911 joined #salt
02:46 StDiluted joined #salt
02:47 Lue_4911 joined #salt
02:51 oz_akan_ joined #salt
02:56 kcb joined #salt
02:57 dthom91 joined #salt
02:59 raydeo joined #salt
03:02 jaequery joined #salt
03:15 daveabq looks like I had _modules in the wrong place -- moved it to /srv/salt/common/states/_modules and everything works just fine!
03:19 avienu joined #salt
03:19 mikedawson joined #salt
03:21 daveabq is there a similar way to call arbitrary python functions from within jinja templates?
03:29 daveabq can pillars and/or salt runners be called from jinja templates?
03:30 avienu joined #salt
03:31 Gordonz joined #salt
03:57 FL1SK joined #salt
03:58 looped joined #salt
04:11 oz_akan__ joined #salt
04:16 Yulli left #salt
04:44 lazyguru joined #salt
04:45 koolhead17 joined #salt
04:45 aranhoide on state.highstate in an ubuntu machine, salt keeps warning me that debconf-utils is not installed.  is this worth installing?  what's it used for?
04:51 StDiluted it's used for setting up debian configs
04:51 StDiluted like for instance
04:51 StDiluted mysql root password
04:54 auser I'm not sure, I see it too
04:55 carmony just wanted to say... I love salt! :)
04:58 dthom91 joined #salt
05:03 Furao it's used for debconf state
05:03 Furao http://docs.saltstack.com/ref/states/all/salt.states.debconfmod.html#module-salt.states.debconfmod
05:04 carmony joined #salt
05:23 aranhoide was the 'canonical' directory for minion keys moved from /etc/salt/pki/minion/minion.(pem|pub) to /etc/salt/pki/minion.(pem|pub) at some point between 0.15.3 and 0.16.0?
05:24 aranhoide salt-cloud Debian and Ubuntu scripts write the pre-accepted key to the latter
05:24 aranhoide that's since a long time ago actually
05:35 Nexpro1 joined #salt
05:48 ProT-0-TypE joined #salt
05:49 jhauser joined #salt
05:58 dthom91 joined #salt
05:59 middleman_ joined #salt
06:35 ProT-0-TypE joined #salt
06:39 FL1SK joined #salt
06:41 ProT-0-TypE joined #salt
06:53 ProT-0-TypE joined #salt
06:58 bemehow joined #salt
07:00 UtahDave joined #salt
07:06 kstaken joined #salt
07:25 ProT-0-TypE joined #salt
07:26 kstaken joined #salt
07:27 Newt[cz] joined #salt
07:28 malinoff joined #salt
07:29 malinoff Hi all. Is there some way to install salt-minion >= 0.15 on debian 6 ?
07:29 dthom91 joined #salt
07:32 madduck malinoff: backports.
07:32 madduck http://backports.debian.org/
07:33 malinoff I have 'deb http://backports.debian.org/debian-backports/ squeeze-backports main contrib non-free' in sources.list
07:35 bemehow joined #salt
07:36 felixhummel joined #salt
07:36 kstaken joined #salt
07:37 carmony joined #salt
07:38 balboah joined #salt
07:41 felskrone joined #salt
07:45 kstaken joined #salt
07:51 scott_w joined #salt
07:53 unicoletti_ joined #salt
07:56 carlos joined #salt
07:56 zach joined #salt
07:58 carmony joined #salt
08:30 qba73 joined #salt
08:35 felixhummel joined #salt
08:36 mgw joined #salt
09:08 FL1SK joined #salt
09:11 krissaxton joined #salt
09:16 Xeago joined #salt
09:25 emocakes joined #salt
09:36 mVla joined #salt
09:36 mVla hello !
09:38 mVla Please, how can I resend key request from my minion. I emoved the key on the master and want my minion to send it again.
09:40 felskrone restart the minion :-)
09:40 lemao joined #salt
09:41 dzen remove it from your minion too, restart your minion
09:43 mVla traying
09:44 mVla hm
09:46 mVla dont work :(
09:48 mVla oh !!
09:48 mVla it does
09:49 mVla had to restart master too
09:49 mVla thanks
09:50 dzen :)
09:54 backjlack joined #salt
09:55 bemehow joined #salt
09:57 Newt[cz] joined #salt
09:59 lemmings ok, quick and stupid question... how can I run a specific sls file?
10:00 Furao_ joined #salt
10:01 lemmings nevermind... it's salt '*' state.sls core,edit.vim dev
10:24 giantlock joined #salt
10:28 david_a joined #salt
10:38 SpX joined #salt
10:43 carmony joined #salt
10:43 bemehow joined #salt
10:49 krissaxton joined #salt
10:59 cwarner joined #salt
10:59 EWDurbin joined #salt
10:59 tamentis joined #salt
10:59 s0undt3ch joined #salt
10:59 KFDM joined #salt
11:00 mordred joined #salt
11:00 dcolish joined #salt
11:04 bemehow joined #salt
11:04 blee_ joined #salt
11:04 whiskybar joined #salt
11:15 Jahkeup_ joined #salt
11:17 xinkeT joined #salt
11:21 krissaxton joined #salt
11:23 krissaxton1 joined #salt
11:24 logix812 joined #salt
11:25 jY anyone have any issue with salt-minions and forking.. we just had an issue where salt-minion was running fine on ubuntu 12.04 salt-minion 0.16 were every server had over 300 salt-minion processes running
11:28 dzen over 300 ? :o
11:30 jY yep
11:31 jY it's just a stock install too running a highline every minute
11:31 aat joined #salt
11:31 nkuttler i've seen minions with multiple minion processes running.. with different salt versions
11:32 nkuttler but i think it was always after minion updates..
11:34 aat joined #salt
11:36 aat joined #salt
11:38 jY looks like each highline run spawned a new process
11:39 kenbolton joined #salt
11:40 sciyoshi1 joined #salt
11:40 timl0101 joined #salt
11:45 yogi_ joined #salt
11:48 yogi_ joined #salt
11:50 yogi_ Hi, I have started playing around with salts stack .. It is simple and quick. I  was wondering if there is an option to replay a config back from cache when using "backup: minion"  option.
11:52 baniir joined #salt
12:07 [diecast] joined #salt
12:11 m_george|away joined #salt
12:11 FL1SK joined #salt
12:18 diegows joined #salt
12:21 lemmings howdy... can anyone give me a hint as to why I have a "The following requisites were not found" error with  "- watch:       - file: /etc/postgresql/9.1/main/*"
12:21 lemmings ?
12:21 lemmings makes no sense...
12:22 lemmings wait
12:22 lemmings found it
12:23 lemmings file declaration must be /etc/postgresql/9.1/main/* exactly
12:23 lemmings on the recurse directive
12:24 lemmings just for reference: http://pad.yohdah.com/152/134d04b8-c8fe-47d5-96bc-ae9c417fab45
12:24 lemmings in case anyone cares :D
12:26 aat joined #salt
12:28 brianhicks joined #salt
12:32 jgelens joined #salt
12:40 ipmb joined #salt
12:41 Linz joined #salt
12:43 Jahkeup_ joined #salt
12:44 anteaya joined #salt
12:47 Jahkeup__ joined #salt
12:47 juicer2 joined #salt
12:49 fredvd joined #salt
12:49 N-Mi joined #salt
12:49 N-Mi joined #salt
12:49 bemehow_ joined #salt
12:53 dthom91 joined #salt
12:55 jslatts joined #salt
13:02 sturdy joined #salt
13:05 Gifflen joined #salt
13:07 oz_akan_ joined #salt
13:07 ipmb joined #salt
13:09 whit joined #salt
13:09 jaequery joined #salt
13:11 japage joined #salt
13:12 unicoletti left #salt
13:12 japage joined #salt
13:12 Gordonz joined #salt
13:14 wilkystyle joined #salt
13:14 Kholloway joined #salt
13:19 ipmb joined #salt
13:19 KennethWilke joined #salt
13:20 KennethWilke g'morning!
13:22 milo_ joined #salt
13:23 whiskybar joined #salt
13:24 toastedpenguin joined #salt
13:25 baniir joined #salt
13:25 napperjabber joined #salt
13:29 Gordonz joined #salt
13:31 symroe joined #salt
13:31 timl0101 joined #salt
13:31 aleszoulek joined #salt
13:33 symroe Hi, I'm having problems with display_ssh_output.  I'm not getting any SSH output from "salt -G 'role:rolename' state.highstate".  I have the 'new style' config and display_ssh_output: True in my provider def in salt/cloud.
13:33 symroe Firstly, I thought it was true by default, so it's odd it's not working
13:34 symroe Second, I don't know where display_ssh_output should be, or what the value should be.  I figure listing it in providers would be ok
13:37 mgw joined #salt
13:38 Kzim hello, how do Salt target with Grains ? does it make a first connections to every nodes first ? if it's cached can't it create problem ?
13:39 KennethWilke Kzim: theres an article on that topic here: http://docs.saltstack.com/topics/targeting/grains.html
13:39 KennethWilke it'll be cached for a little bit
13:39 KennethWilke theres a way to force the update with the saltutil module
13:39 Ahlee anybody had a similar experience with salt-api (cherrypy) backed being horribly unreliable?
13:40 KennethWilke Kzim: http://docs.saltstack.com/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_grains
13:41 Kzim KennethWilke, but this is local right ? so from the master if a to a command with that target the Centos. i will still have to query al the nodes first to check which are centos then execute my command right ?
13:42 KennethWilke Kzim: i believe from the master you'll just do it like `salt -G 'os:CentOS' test.ping`
13:42 KennethWilke since grains should rarely update you shouldn't have many problems with that
13:43 Kzim KennethWilke, so you mean that the grains are sync but sync to the master as well ?
13:43 KennethWilke "It is important to remember that grains are bits of information loaded when the salt minion starts, so this information is static. This means that the information in grains is unchanging, therefore the nature of the data is static. So grains information are things like the running kernel, or the operating system."
13:43 KennethWilke says that first doc
13:44 Kzim yes but this say that those grains are on the minion
13:44 Kzim not the master right ?
13:44 KennethWilke yes, but the master communicates with the minions
13:44 Kzim yes
13:44 Kzim but to know the grains the master has to do a connection right ?
13:44 Kzim so in order to target os:Centos the master has to connect to each node to get those grains right ?
13:46 KennethWilke joined #salt
13:46 spudbook joined #salt
13:46 bostonian joined #salt
13:48 kenbolton joined #salt
13:49 KennethWilke left #salt
13:49 KennethWilke joined #salt
13:50 bostonian Is there any way to call the git.latest state and have it clone/pull the repo *without* deleting other files not in version control (e.g., 3rd party plugins)? I tried to use force: True, but it gets rid of the entire repo folder. Is there something less powerful?
13:54 emocakes joined #salt
13:57 Furao joined #salt
13:59 oz_akan_ joined #salt
14:02 _jps joined #salt
14:03 lemmings without trying to be rude, can someone help me with http://docs.saltstack.com/topics/tutorials/states_pt3.html#calling-salt-modules-from-templates? I wanted something like  {{ salt['mem_total'] / 4 }}MB on a template but I don't think this is the way...
14:03 lemmings (and sorry for interrupting the conversation)
14:04 Gifflen joined #salt
14:04 mannyt joined #salt
14:05 Corey lemmings: grains. :-)
14:05 Corey Hang on, let me get my brain out of Puppet and back into salt
14:07 lemmings salt is a vegetarian zombie... graaaaaains
14:07 wilkystyle left #salt
14:08 Corey lemmings: THAT'S MY JOKE!
14:08 oz_akan_ joined #salt
14:08 t0rrant joined #salt
14:08 Corey lemmings: grains['mem_total'], presuming mem_total is a grain.
14:10 orclev joined #salt
14:12 lemmings Corey: and it works
14:12 lemmings thanks
14:12 Corey Yay.
14:12 lemmings for info, on postgresql, shared_buffers = {{ grains['mem_total'] / 4 }}MB                        # min 128kB
14:13 lemmings and now you have a dinamically configurable shared buffer settings
14:13 Corey lemmings: Just be sure the output is in MB. :-)
14:13 lemmings like mommy always wanted
14:13 lemmings yeah, can't find the docs on shared memory
14:13 lemmings dunno if it's always B
14:13 lemmings MB
14:14 lemmings but will try this on a 2 GB machine and check
14:14 Orclev_ when using pydsl, does the top.sls need to be pydsl as well, and is the format of that documented anywhere?
14:15 Corey lemmings: Looks good.
14:16 salticus joined #salt
14:16 lemmings Corey: thanks again :D
14:17 whit joined #salt
14:18 scalability-junk lemmings: do you configure apache processcount etc. with grains dynamicly too?
14:18 Kzim well actually it's not one line it's one line per first level key ...
14:18 Kzim oops
14:23 lemmings hey Corey, want a harder one this time?
14:23 lemmings I have th following http://pad.yohdah.com/153/82454174-f4dd-41dc-9726-4897c516cfe7
14:24 John78 joined #salt
14:24 lemmings and the output always states:
14:24 lemmings The following requisites were not found
14:24 John78 left #salt
14:24 Corey lemmings: Does source: salt://{{sls_dir}} actually match?
14:24 farra if I clone a box that has the salt minion installed, what is the fastest way to get the new clone talking to the master?
14:25 kermit joined #salt
14:25 [diecast] joined #salt
14:25 jalbretsen joined #salt
14:25 lemmings scalability-junk: I'm just testing stuff, first attempt. Still, in cases where the recomended values are easy to guess based on resourses, I'd do it, yes. As a better baseline. For finetunning... well, the fine part means specific files
14:25 Corey farra: rm -rf /etc/salt/pki; service salt-minion (re)start
14:25 lemmings yeps, perfectly
14:25 erasmas joined #salt
14:25 Corey lemmings: Which resources aren't found?
14:26 farra Corey: do I need to update the id tag in /etc/salt/minion?
14:26 lemmings was working with a single file, was also working with a /* at the end (and created a * dir on the minion, so it was kinda stupid... I tried it because there was a patch on github that documented it, but it seems to have changed)
14:26 Corey farra: if you're setting one manually, presumably. :-)
14:26 lemmings (stated that watch had that syntax)
14:27 farra heh k
14:27 farra thanks for your help Corey
14:27 lemmings Corey: wait... I think I fixed it
14:27 Corey lemmings: I have to confess I don't like the file.recurse state.
14:27 lemmings if only I knew how... it's the same bloody settings!
14:28 lemmings what do you use, file directory?
14:28 lemmings (can't seem to understand the difference, really)
14:28 teskew joined #salt
14:29 Corey lemmings: I (generally) find that if I want an entire directory tree to be present on a box, that a system package is (with a few exceptions) the way to go.
14:29 Corey I'm old and crochety though.
14:30 lemmings scalability-junk: honestly, I believe that with some grains and pillar data, you can at least have a more sensible default for a lot of services. The package defaults tend to be way conservative. But I'm, just testing crap yet and performance, for linux systems here, isn't that critical.
14:30 kaptk2 joined #salt
14:31 lemmings Corey: mkes sense but it's not as fast or flexible, imho... dunno. But I'd like to hear your argument, please
14:32 scalability-junk lemmings: git deploy ftw :D
14:32 akitada joined #salt
14:33 scalability-junk lemmings: yeah I will go with some flexible defaults and then go from there
14:33 looped i have a weird issue with a test installation i have with salt. ive got a node running as salt-master and two ec2 instances running as minions
14:33 lemmings scalability-junk: look into sysctl too, most options are a direct relation to resourses there
14:33 looped between sessions, the master can't contact the minoins and i have to restart htem
14:33 looped *them
14:34 lemmings looped: sessions?
14:34 codysoyland joined #salt
14:34 looped sorry, should have clarified, ssh sessions into the master
14:34 lemmings master running as a service or in manual debug mode?
14:35 cnelsonsic joined #salt
14:35 looped as a service
14:35 Orclev_ is it possible to use overstate with a masterless minion?
14:36 looped the host is an ubuntu 13.04 dedicated host.
14:37 robinsmidsrod joined #salt
14:37 lemmings looped: try telnet master 4506
14:38 lemmings should connect
14:38 lemmings then, drop the conn to ssh
14:38 lemmings see if this changes somehow (drops this too)
14:38 looped gimme a second.
14:39 looped telnet succeeds
14:39 lemmings I have no idea what the cause may be (services aren't susceptible to hup signals, so...) but may be a good test
14:39 lemmings and the connection doesn't drop?
14:39 looped nope
14:39 lemmings this from a minion, right?
14:39 looped yeap
14:40 looped no activity in the minion log
14:40 lemmings so, if you connect via ssh now, the master can't talk to the minions?
14:40 looped so i tried salt '*' test.ping.. and i get no response
14:41 looped (from the master)
14:41 soukihei joined #salt
14:41 jakebasile left #salt
14:42 lemmings weird crap
14:43 lemmings but you can still telnet=
14:43 lemmings ?
14:46 bemehow joined #salt
14:47 Orclev_ I feel like there should be an easy way to accomplish what I'm trying to do, but so far everything I've tried has failed and the documentation on salt is too poor to allow me to figure out how to make things work... the core stuff is well documented, but I'm off in the weeds now trying to figure out how to accomplish something and the documentation is sparese to non-existant
14:47 rbstewart Orclev_: AFAIK overstates require salt-master. You could just install salt-master locally. Also https://github.com/saltstack/salt/issues/3945
14:48 rbstewart Orclev_: what are you trying to accomplish?
14:48 looped lemmings: yes. telnet is fine, but cant execute any commands from the master. restarting the minions fixes it every time
14:49 napperjabber_ joined #salt
14:49 Orclev_ essentially, I started with a jinja template that needed to run some states that query mysql, and so needed the python2-mysql package to be installed on the minion, but I can't figure out how to enforce that pre-req since it needs to be in place before the sls file is parsed
14:50 Orclev_ so far I've tried various orderings of includes, pydsl, and looked into overstate
14:51 jom joined #salt
14:51 lemmings Orclev_: doesn't require and require_in conver this case? Never used it, just read the docs, seemed to be relevant
14:51 jom hey
14:52 jom I'm currently having a problem with the ssh_auth module
14:52 lemmings looped: have no idea... ssh breaks the connection... that's kinda weird on it's own.
14:52 rbstewart lemmings: require only takes action after the template renders; which is too late if the template rendering depends on mysql.
14:52 jslusher joined #salt
14:53 jslusher any salt-cloud users in the house?
14:53 jom But the most crasiest thing is: When I edit something crucial in the sources supplied with salt, salt does not even care
14:53 jom I've installed the ubuntu-packages of salt
14:53 lemmings rbstewart: cool, thanks. So that's the overstates thing then...right?
14:54 lemmings jom: what's the output of "which salt"? are you sure you just have one version installed and are using the right one?
14:54 Orclev_ it's kind of a chicken and egg problem, I can't render the SLS without python2-mysql installed, and I can't install python2-mysql until the SLS renders
14:54 mVla bye
14:54 mVla left #salt
14:54 jom Well I use salt-call
14:55 jom the output is
14:55 jom The output is: /usr/bin/salt-call
14:55 rbstewart lemmings: yeah, overstates can run the states in stages; so state1 can install mysql; then state2 requires state1, and uses that mysql to fill in the template.
14:56 jslusher I'm getting an error when trying to delete an instance from AWS. it seems to terminate the instance and then try to retrieve the instance id to rename it, but it gets a bad request because it just terminated the instance
14:56 rbstewart vs running highstate which compiles the templating all at once and runs per requisites.
14:56 jom When I do a "$dpkg -L " I get the list of .py-files salt uses to be under /usr/share/pyshare/salt
14:56 rbstewart Orclev_: what prevents you from running the overstate as usual from the salt-master?
14:56 lemmings Orclev_: Isn't what rbstewart said what you want? You just want python2-mysql installed, right? Why would you need to render the template for that?
14:56 Orclev_ rbstewart: I don't have a master, this is a masterless minion being run from vagrant
14:57 Orclev_ lemmings: I don't want python2-mysql installed, I need it installed in order to render one of the templates
14:57 lemmings jom: ls -l /usr/bin/salt-call points to /usr/share/pyshare/salt?
14:58 rbstewart Orclev_: hmmm; well, you could just run one state and then the other by hand. See state.sls: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.state.html
14:58 lemmings Orclev_: yeah... so... can't you install mysql on stage 1 and then render the template on stage 2?
14:58 jom When I do "mv ssh_auth.py not_anymore_ssh_auth.py" in /usr/share/pyshared/salt/states, salt-stack does not complain, but I get the same output of salt-stack again
14:59 Orclev_ lemmings: what do you mean by stage 1 and stage 2? I thought highstate ran everything more or less at once?
14:59 jom lemmings: No, salt-call is by itself a python script
14:59 Corey Orclev_: I believe lemmings is referring to the "order" directive.
15:00 lemmings jom: isn't that what __init__.py is supposed to do? "All these files belong to the same module, so import * from module, regardless of name?"
15:01 jom Lemmings: Ok, I see
15:02 lemmings jom: I think, I'm not sure....
15:02 Orclev_ rbstewart: that may work, let me look into that
15:02 jom lemmings: Moved the file ssh_auth.py completely out of the source, salt still does the same thing
15:03 lazyguru joined #salt
15:03 lemmings jom: only one explanation, your machine is posessed. Listen to me. You're gonna need a young priest and an old priest. Probably a couple of 8 y.o. too, to keep them entertained.
15:04 lemmings but what exactly is the error?
15:04 jom lemmings: LOL
15:04 jom lemmings: I'm having problems to install a new ssh public key
15:05 jom lemmings: I permanently get salt claiming, that this file is already installed
15:05 jom lemmings: That is not the cse however
15:05 jom lemmings: Now I would like to see from the source where the error is
15:06 jom lemmings: And I would like to issue some debugging here and there
15:06 jom lemmings: But when I change the source code, I don't get any change in salt behavior
15:07 jom lemmings: I think there could be some .pyc-files lying around somewhere
15:07 timl0101 joined #salt
15:07 jom lemmings: which are spoling it for me
15:07 lemmings what happens if you copy the file to the target and change it a bit? does diff pick it up? You sure he's not placing the file elsewhere?
15:08 lemmings and normal debugging isn't enough?
15:08 jom how do I do normal debugging?
15:09 m_george left #salt
15:09 lemmings http://docs.saltstack.com/topics/configuration.html#running-salt says  "salt-master --log-level=debug"
15:10 lemmings (kill the daemon first. Told ya to get the priests, didn't I?)
15:10 jom lemmings: No relevant information here
15:11 jom lemmings: But wait, I'm trying python -m pdb salt-call ...
15:11 jom lemmings: And I'm on masterless mode
15:15 lemmings humm... but what exactly is the issue?
15:15 lemmings it doesn't propagate the keys?
15:19 Orclev_ well, that was promising, but that failed as well... apparently the cmd.call state can't be used from a jinja sls file
15:20 jom lemmings: The issue is: I call ssh_auth: In just the way that is described here: http://docs.saltstack.com/ref/states/all/salt.states.ssh_auth.html
15:20 jom lemmings: (entry with thatch)
15:21 jom When I do a "salt-call --local state.highstate -l debug", I get as a result "Comment:   The authorized host key ssh-key-ubuntu is already present for user ubuntu"
15:21 jom lemmings: That however is not true
15:21 rbstewart Orclev_: looking through pydsl, seems like it has what you need: https://salt.readthedocs.org/en/v0.16/ref/renderers/all/salt.renderers.pydsl.html#render-time-state-execution
15:22 Orclev_ rbstewart: I haven't been able to get pydsl to work at all, there's virtually no documentation on it and it always blows up trying to parse top.sls because I can't figure out how I need to write top.sls using pydsl
15:22 lemmings jom: what's on /home/ubuntu/.ssh ?
15:23 StDiluted joined #salt
15:24 jom lemmings: the dir is empty
15:24 rbstewart Orclev_: why do you need to apply a renderer to top.sls?
15:24 jom lemmings: and the permissions are at 700
15:25 Orclev_ rbstewart: I don't know, but when I enable pydsl it blows up on top.sls claiming it's invalidly formatted, I assumed it was because of using pydsl as top.sls ran perfectly fine using the jinja renderer
15:25 TheRealBill joined #salt
15:25 lemmings I'm beggining to get the impression most modules are kinda flakey... iptables adds one entry per run, for instance...
15:26 lemmings humm
15:26 rbstewart Orclev_: I'm intrigued. Never knew that you could apply jinja rendering to top.sls. Would you mind pasting up an example of jinja vs (nonworking) pydsl?
15:26 lemmings can you create a venv and install salt locally? I'm guessing it's be easier to debug...
15:27 johntron joined #salt
15:27 jschadlick joined #salt
15:27 devinus joined #salt
15:27 Orclev_ rbstewart: I'm not actually using jinja in top.sls, just when I have the jinja renderer enabled, everything works fine (well, except my one sls blows up because it doesn't have a pre-req it needs to render), but when I switch to pydsl, then top.sls blows up
15:29 Orclev_ always complains that it found an un-expected character ':' at the first line that starts with "base:"
15:29 devinus so, i'm using Salty Vagrant and i'm trying to figure out why my cascading file roots aren't working as intended: https://gist.github.com/devinus/001863cc5403cf80cdea
15:30 devinus from what i understand, my top.sls file should be at the root of my roots
15:30 devinus and not one in each environemtn
15:30 devinus environment*
15:30 devinus am i doing something wrong?
15:31 jom lemmings: Thanks a lot, I'm trying that
15:32 akoumjian devinus: top.sls has to be inside a file_root. ie: the default file_root is at /srv/salt, top.sls goes in /srv/salt/top.sls.  I think you need to put it in /srv/salt/base/top.sls
15:33 rbstewart Orclev_: in which files are you specifying #!pydsl?
15:34 devinus akoumjian: hem…so how am i supposed to use my "dev" environment on this minion if i want it to cascade to just using the base.sls?
15:34 Orclev_ rbstewart: can you use pydsl in individual files using that? I was just changing the renderer in minion.conf to be pydsl
15:35 devinus akoumjian: i mean base/top.sls
15:36 kenbolton joined #salt
15:37 devinus i guess i kinda of just want to know how to select an environment :(
15:37 akoumjian devinus: Not entirely sure I follow. You use your base file root to house the top.sls file. You use the top.sls to target which formulas from different environments apply to different minions
15:38 devinus akoumjian: right, so i want my base and dev environment to be mostly the same, with dev to be able to override a few states
15:39 devinus akoumjian: but i don't know how to select my dev environment from Salty Vagrant…like…how do i tell this thing that i'm in--that i WANT--the dev environment?
15:39 rbstewart Orclev_: yes. You can specify individual renderers at the top of the state files. It goes #!yaml or #!jinja|yaml, #!pydsl, etc. https://salt.readthedocs.org/en/v0.16/ref/renderers/index.html#composing-renderers
15:39 akoumjian devinus: Have a good luck at the syntax for top.sls, it does exactly what you want http://docs.saltstack.com/ref/states/top.html
15:39 devinus akoumjian; yes i've read this doc several times since yesterday :(
15:40 devinus trying to figure out what i'm missing
15:40 devinus i don't see anywhere in here what selects the environment
15:40 devinus i just feel like i'm missing something huge
15:40 Orclev_ rbstewart: ah thanks, I missed that in the documentation somehow
15:40 dthom91 joined #salt
15:40 baniir joined #salt
15:40 rbstewart Orclev_: that way you can use pydsl in one state, and jinja/yaml (the default I think) in another
15:41 akoumjian devinus: Essentially the minion has some identifier, often the minion id or a grain. This matching is what says "from this file root, apply these formulas to this minion"
15:41 Orclev_ rbstewart: yeah, going to try that setup now
15:41 conan_the_destro joined #salt
15:41 rbstewart Orclev_: it's really easy to miss stuff in the docs. I searched the complete table of contents for an example and hit 3-4 sections on renderers before finding one that *kind-of* showed the point.
15:42 devinus akoumjian: so if i'm using Salty Vagrant how do i give that "minion" an id or is there a special grain that Salty Vagrant adds?
15:42 akoumjian devinus: In this example, you are applying the global states from base. Then if your minion on your VM has a minion id which matches the glob 'webserver*dev*', it gets the webserver formula from the dev file root
15:42 akoumjian devinus: https://gist.github.com/akoumjian/649c6a4636e3059d7af5
15:43 Orclev_ rbstewart: yeah, design wise I really prefer salt to either chef or puppet, but man, the docs drive me up a wall sometimes... the documentation is very scattered, and it always feels like the examples or kind of sort of almost what you need but not quite
15:43 akoumjian devinus: You want to set your minion id in the minion config file. You can tell salty-vagrant to copy that config file to your VM
15:44 akoumjian devinus: You can also use custom grains, specifying them in the minion config or the custom grains file: http://docs.saltstack.com/topics/targeting/grains.html?highlight=custom%20grains#grains-in-the-minion-config
15:45 devinus akoumjian: so it's impossible for Salty Vagrant and a production box to share the same minion config?
15:46 akoumjian devinus: Not at all. But if they share the same minion config, and they have identical minion id's / grains, then they will match identically in the top.sls and use all the same formulas / pillar data
15:46 sciyoshi joined #salt
15:47 devinus akoumjian: well the would have identical minion id's because they share the same minion config, and they would have the same grains because they share the same minion config as well. i'm not sure of any way to differentiate them while using the same minion config
15:47 rbstewart Orclev_: I keep the complete table of contents, the modules, and the states bookmarked on a local copy of the docs. (Keeping it local makes it a bit faster.) The complete table of contents helps me stay aware of all the stuff I don't know yet.
15:47 akoumjian devinus: Salt needs some way to uniquely target dev vs production, right? That targetting happens by minion id, grains, or other attributes: http://docs.saltstack.com/topics/targeting/index.html
15:48 Gifflen joined #salt
15:48 alekibango joined #salt
15:48 akoumjian devinus: Yes, you will need different minion configs, or you will need to know the different hostnames for your dev vs production machines ahead of time (minion id's default to hostnames if not specified)
15:52 Linz joined #salt
15:53 devinus akoumjian: okay, i'll give up sharing minion config's for now. so if i wanted my minion to be called e.g. "webserver" as it's id, i'm still fuzzy on how i'd select which environment i want it to run in
15:54 devinus since i don't have any grains that would tell me i'm on a VM vs a production environment
15:54 avienu joined #salt
15:54 akoumjian devinus: There is no "run in this mode." There is only matching.
15:54 whiteinge Ahlee: i haven't heard any other reports of salt-api being flaky. anything i can do to help track it down? (and what version are you on?)
15:55 TheRealBill devinus: are your production systems VMs, or physical?
15:55 akoumjian devinus: The traditional way is to name your host something like webserver.dev and then use glob matching in your top.sls like 'webserver*dev'.
15:55 devinus TheRealBill: VMs
15:55 TheRealBill devinus: ok, so how abut IP space? Are they on different networks from an IP PoV?
15:56 devinus TheRealBill: well one is on my box as a Vagrant VM
15:56 akoumjian devinus: Alternatively use grains. Matching looks like this 'roles:webserver'  where your custom grain file has the content "roles: webserver"
15:57 Orclev_ rbstewart: using pydsl worked, I've got things running now, thanks for your help
15:57 TheRealBill devinus: you could write a custom python grain to report production vs dev by analyzing the IP.
15:57 zirpu joined #salt
15:58 akoumjian TheRealBill: I think that is a few steps beyond this. First it's important to grok how to use a very simple scheme to differentiate different environments.
15:58 devinus akoumjian: the custom grain file would have to be in /etc/salt/grains, which i would have to put there first
15:58 akoumjian This is one of those cases where salt is not opinionated, and has many ways to accomplish the same thing.
15:58 devinus akoumjian: and i would use salt for that, so it becomes a chicken-egg thing
15:59 akoumjian devinus: Correct. Or you can assign it from the master dynamically. But it shouldn't be a surprise that you need to seed the minion with some kind of information in order to differentiate it
15:59 devinus so instead of hostname i should just give my minion an id like "web server.dev"
16:00 rbstewart Orclev_: :)
16:00 akoumjian devinus: Yes, that's a good way to do it. I prefer the custom grains myself, but custom minion id is a little simpler when starting
16:00 akoumjian devinus: I have to go. Good luck
16:00 devinus akoumjian: thanks
16:01 devinus i'd love to use custom grains, but i have no idea how to do that before Salt can even do anything
16:04 BRYANT__ joined #salt
16:06 TheCodeAssassin joined #salt
16:06 TheCodeAssassin Hi guys
16:06 chrisgilmerproj joined #salt
16:06 bemehow joined #salt
16:06 TheCodeAssassin im interested in using salt-cloud for provisioning our servers
16:08 mgw joined #salt
16:09 kstaken joined #salt
16:11 mgw joined #salt
16:18 bastion2202 joined #salt
16:18 nmistry joined #salt
16:18 s4muel_ left #salt
16:19 KyleG joined #salt
16:20 rbstewart Anyone know of a salt-ish way to copy files directly from minion A to minion B?
16:22 rbstewart Right now I'm going for setting up ssh communication via ssh.recv_known_host, etc. and using cmd.run scp
16:22 devinus this may be a dumb question, but how do i simply require other states as part of my top level state?
16:22 devinus this isn't cutting it for me: https://gist.github.com/devinus/fb7237707b06233fc962
16:22 devinus i looked into requisites, but every example is just making sure the actual package on the system is installed
16:24 bastion2202 hey guys, what is the RAM requirement for the master ? I just got a OOM on it with just 30 minions (2 GB RAM)
16:24 rbstewart devinus: by top level state do you mean top.sls, or just a state that includes others?
16:24 devinus rbstewart: the latter
16:24 rbstewart devinus: do you need the included states to execute in any particular order?
16:24 StDiluted devinius: include: \n - nginx\n  - php-fpm
16:24 devinus rbstewart: yeah, the order that i defined in that gist
16:25 erasmas_ joined #salt
16:25 devinus StDiluted: ah, okay
16:26 StDiluted assuming you have a dir or els called nginx and php-fpm in /srv/salt or wherever your base is
16:26 StDiluted ugh SLS
16:26 StDiluted fuco colloquy and it's autocorrect
16:26 rbstewart devinus: unfortunately it isn't that simple (yet). include just dumps their contents into the current state without specifying an order.
16:29 rbstewart you can specify a "goal" state that requires everything in your "sub" state, and then require that in your top state.
16:30 Lue_4911 joined #salt
16:30 rbstewart the stateconf renderer will do that automagically for you; it requires some unique syntax. https://salt.readthedocs.org/en/v0.16/ref/renderers/all/salt.renderers.stateconf.html
16:31 rbstewart pydsl is another option (same dev as the one doing stateconf)
16:32 rbstewart Overstates also an option for ordering states: https://salt.readthedocs.org/en/v0.16/ref/states/overstate.html
16:40 Linz_ joined #salt
16:40 chrisgilmerproj1 joined #salt
16:40 jschadlick1 joined #salt
16:42 drawsmcgraw joined #salt
16:42 drawsmcgraw So.....
16:42 drawsmcgraw reactors
16:42 drawsmcgraw I see how to tie a Tag to a Reactor file.
16:42 drawsmcgraw But how do I drop an event onto the message bus with a specific Tag ?
16:43 blee joined #salt
16:43 UtahDave joined #salt
16:44 Ryan_Lane joined #salt
16:44 baniir joined #salt
16:48 Jahkeup_ joined #salt
16:53 whiskybar joined #salt
16:56 berto- joined #salt
16:56 felskrone joined #salt
16:57 indymike joined #salt
16:57 kstaken joined #salt
16:58 ksalman joined #salt
16:59 ksalman heya, I tried to start salt-minion and i get this error http://pastebin.com/raw.php?i=9eeVsvw2
16:59 ksalman Any idea how to fix it?
16:59 ksalman or what the problem is
16:59 sciyoshi joined #salt
17:02 dthom91 joined #salt
17:04 KyleG1 joined #salt
17:04 KyleG1 joined #salt
17:06 jshare ksalman: did you see http://docs.saltstack.com/topics/installation/rhel.html
17:06 chrisgilmerproj joined #salt
17:07 helderco joined #salt
17:10 napperjabber joined #salt
17:10 helderco Hey guys. I'm having trouble trying to use pkg.mod_repo (http://docs.saltstack.com/ref/modules/all/salt.modules.apt.html#salt.modules.apt.mod_repo) in a state file require for a package install. I want to basically add a source before installing. I can do it with `salt pkg.mod_repo 'ppa:nginx/stable'` and does what I want. But not being able to translate that to a state file.
17:11 oz_akan_ joined #salt
17:11 lemmings damn.... salt... reactors... this shit is nucler powered? Awesome! (I have nothing to contibute, I'll go away now :D)
17:11 oz_akan_ joined #salt
17:13 drawsmcgraw I got it. It's a module ----> salt '*' event.fire_master 'some message' 'myTag'
17:13 drawsmcgraw Drops an event on the bus, tagged with 'myTag'
17:14 drawsmcgraw ksalman: My first guess is that it's a problem with some certs (since M2Crypto is the last entry on the stack trace)
17:14 drawsmcgraw But since, usually, users don't mess with the certs between master & minion, I don't really know
17:15 drawsmcgraw You could try destroying the cert on the minion, restarting the minion, then seeing if the new cert gets offered to the master
17:15 drawsmcgraw or... rename/relocate the cert, rather
17:15 ksalman where can i find the certs?
17:15 drawsmcgraw No sense in destroying it
17:15 ksalman i gues i can search :P
17:15 drawsmcgraw On mine, it's
17:16 drawsmcgraw minion.pem & minion.pub are what you'll want to relocate/rename
17:16 drawsmcgraw oh, hold on...
17:16 drawsmcgraw /etc/salt/pki/minion
17:16 drawsmcgraw there we go.
17:16 ksalman thank you
17:16 ksalman i'll try it
17:16 drawsmcgraw good luck
17:16 ksalman thanks :P
17:17 shane joined #salt
17:18 Xeago joined #salt
17:19 koolhead17 joined #salt
17:19 koolhead17 joined #salt
17:19 drawsmcgraw Reactors again.... I can fire events using the 'salt' command on the master
17:20 drawsmcgraw But my minions (both Linux & Windows) seem to lack the 'salt' command
17:20 drawsmcgraw Either my Linux boxen are messed up, or the salt command is actually *not* installed as part of the minion install process
17:20 drawsmcgraw The real question here is - > How do I get a minion to fire a message?
17:22 zach gentlemen, is it possible do something like: {% if grains['host'] == 'test1' or grains['host'] == 'test2' %}
17:29 Corey drawsmcgraw: salt-call on the minions.
17:32 Ahlee whiteinge: salt-api==0.8.1, cherrypy backed (3.2.2).  I really don't know what else to say, other than while hte process is up, it's hung.  i've tried running it in screen, nohup, and daemonizing via -d and all three run for various lengths of time before ultimately not responding
17:33 Ahlee looking through what it's doing, i just can't see why it would stop since it's such a straightforward implementation
17:33 mikedawson joined #salt
17:35 StDiluted zach, you can't combine conditionals in jinja
17:35 StDiluted just went through all that last night
17:37 bastion2202 joined #salt
17:37 whiteinge Ahlee: when you have a sec, try upgrading to 0.8.2. there was a bug involving the salt-api PID file -- i don't know for sure it would cause that problem but it's possible, say, restarting the salt master could affect salt-api
17:37 whiteinge Ahlee: (if you're using the /minions URL, check the release notes first!)
17:39 whiteinge if that doesn't fix anything, i'd like to try tracing whether the salt-api process itself or the cherrypy process are both still running once salt-api becomes unresponsive
17:39 Ahlee whiteinge: thanks, i'll check the release notes and go from there
17:39 Jahkeup__ joined #salt
17:39 bastion2202 joined #salt
17:39 Ahlee right now cherrypy has recieved a bulk of the blame, thus it's slated for replacement first
17:39 Ahlee rightly or wrongly
17:40 devinus joined #salt
17:40 * whiteinge nods
17:40 drawsmcgraw Corey: Sweet! Thanks!
17:43 Ryan_Lane joined #salt
17:44 JasonSwindle joined #salt
17:44 JasonSwindle Howdy all.  I have an odd startup issue...
17:45 JasonSwindle Ubuntu 13.04, SSL: https://dpaste.de/3JMB3/
17:45 Jahkeup_ joined #salt
17:46 JasonSwindle service.running enable: True
17:46 conan_the_destro joined #salt
17:46 JasonSwindle and I see the link is in rc2/3/4/... for S20redis-server -> ../init.d/redis-server
17:46 JasonSwindle but it does not start on boot
17:47 JasonSwindle I had this same issue with Salt and NGINX not starting.
17:47 JasonSwindle I had to make an upstart script to make NGINX work.
17:49 dthom91 joined #salt
17:50 JasonSwindle UtahDave: Have you ran into this before?
17:51 auser hey all
17:51 UtahDave JasonSwindle: line 14 should be   - enable: True
17:52 UtahDave hey, auser
17:53 JasonSwindle Let me try that
17:53 JasonSwindle Should it not of errored on that?
17:54 helderco Are modules used in state files (http://docs.saltstack.com/ref/modules/), or just with the salt command?
17:54 UtahDave JasonSwindle: No, because you're basically just adding another dict key. You're allowed to add arbitrary dict keys so - enabled just becomes another one that's available.
17:55 JasonSwindle Oh…… that is awesome and bothersome to the typo-crazed
17:55 UtahDave helderco: State files only use modules to actually do work.  So yeah, states use the exact same modules as you use when you use the salt commmand on the cli
17:55 baniir joined #salt
17:56 UtahDave :)  yes, I get tripped up on that sometimes, too, JasonSwindle
17:56 helderco UtahDave: I get confused with http://docs.saltstack.com/ref/states/all/index.html and http://docs.saltstack.com/ref/modules/all/index.html
17:56 JasonSwindle UtahDave:  Are you going to be at the Salt hackathon in SATX?
17:56 UtahDave JasonSwindle: hey are you going to be at the Salt Sprint this Saturday at the castle?
17:57 JasonSwindle I think, maybe
17:57 JasonSwindle I need to apply, but I cannot Python
17:57 UtahDave JasonSwindle: yep!  I fly in to SATX late friday night.
17:57 StDiluted hey UtahDave
17:57 JasonSwindle So, I would not be able to help in ways of Python
17:57 FL1SK joined #salt
17:58 UtahDave that's ok, we'll be doing a lot of salt-related stuff.
17:58 UtahDave hey, StDiluted!
17:58 StDiluted I cannot python either but I do anyway
17:58 UtahDave helderco: This might help you keep them separate in your mind a little better: http://docs.saltstack.com/py-modindex.html
17:59 UtahDave Yeah, if you can read, then you can python!
18:01 helderco UtahDave: So, salt.modules are meant for remote execution using the salt command, and salt.states are meant for configuration management using sls files
18:02 UtahDave helderco: not exactly
18:02 UtahDave salt modules do something specific, like   pkg.install  vim   (install vim)     or service.restart apache2  (restart apache2)
18:03 UtahDave States enforce a specific state
18:03 UtahDave pkg.installed vim  (check if vim is installed and install vim if it's not)
18:03 UtahDave service.running apache2  (check if apache2 service is running and start it if it's not)
18:04 JasonSwindle UtahDave: Still no luck; link made in /etc/rc3.d to script in /etc/init.d/redis-server but not starting
18:04 UtahDave the states use the execution modules to get things done.   A state shouldn't have it's own code to install a package or start a service. The pkg state should use the pkg module to actually do anything
18:04 StDiluted UtahDave, I just sent you an email regarding the sprint this weekend. If you could see that it gets acted on, that would be great, but I know you're probably pretty busy.
18:04 helderco UtahDave: I think I get it now. Thanks :)
18:04 jslatts joined #salt
18:05 UtahDave StDiluted: Yeah, I'll make sure it gets taken care of.  Thanks a ton, StDiluted!
18:05 StDiluted No problem, UtahDave. Will we get a list of registrants before the event?
18:05 druonysus joined #salt
18:06 UtahDave StDiluted: Yes, you will.  I'll ask Rhett when he's going to send those out.
18:06 StDiluted awesome, thanks
18:07 UtahDave no, thank you!  We love the @pay is hosting a site!
18:07 JasonSwindle UtahDave:  I am perplexed…. the link is there S20redis-server -> ../init.d/redis-server …… it should work
18:08 oz_akan__ joined #salt
18:08 JasonSwindle I can start the service by hand, and that works great
18:08 JasonSwindle Hey oz_akan__
18:08 UtahDave drawsmcgraw: you'll need to use the salt-call event.fire_master   from your minions
18:08 oz_akan__ JasonSwindle: hey
18:11 UtahDave JasonSwindle: that's odd. hey, basepi, do you have any idea what's going on here?
18:11 andrew joined #salt
18:12 JasonSwindle My NGINX had the same issue as well
18:12 JasonSwindle https://dpaste.de/2mYOz/
18:12 JasonSwindle my only fix was to make my own upstart script
18:13 JasonSwindle even tho service nginx start with the supplied init.d script worked
18:13 JasonSwindle and the rc*.d links where there
18:13 UtahDave you're on ubuntu, right, JasonSwindle
18:13 UtahDave ?
18:14 JasonSwindle Correct
18:14 JasonSwindle 13.04
18:15 __number5__ joined #salt
18:15 Linz joined #salt
18:16 JasonSwindle UtahDave:  https://dpaste.de/1GkMI/
18:16 JasonSwindle The links are there....
18:16 JasonSwindle And the same for runlevel 2
18:16 JasonSwindle and I am in runlevel 2
18:19 racooper joined #salt
18:19 UtahDave JasonSwindle: tell you what, I haven't done any testing on salt on ubuntu 13.04 yet.    could you open an issue on this and I'll do some testing tonight?
18:19 UtahDave I'm teaching a Salt class today and can only get in here during breaks.
18:19 basepi UtahDave: catch me up?  do you still need my help?
18:20 UtahDave basepi: Yeah, JasonSwindle is seeing some issues with service.running on Ubuntu 13.04  both with nginx and redis-server
18:21 UtahDave basepi: do you know of any open issues regarding that?
18:21 JasonSwindle No
18:21 JasonSwindle I was thinking it was me
18:21 StDiluted i verified it working on 12.04.02 when he has the issue last week with nginx
18:21 StDiluted had*
18:24 devinus is there a way to have an empty line?
18:24 devinus oops
18:24 devinus that was vague
18:24 devinus is there a way to have an empty environment selector? https://gist.github.com/devinus/6581b98a9dcbdff10e86
18:25 JasonSwindle UtahDave:  Do you want me to put in a issue?
18:25 UtahDave JasonSwindle: Yeah, let's do that. It will help make sure we figure out what's going on.
18:25 UtahDave thanks!
18:26 JasonSwindle Issue coming up
18:26 StDiluted devinus: why would you do that?
18:26 StDiluted out of curiousity
18:26 devinus StDiluted: my dev environment uses all the same states as my base environment for now
18:26 devinus i just override my base environment with states of the same name in dev
18:26 devinus if i need to
18:26 UtahDave devinus: I would just create an empty sls file and name it that.
18:26 StDiluted i see
18:32 baniir joined #salt
18:38 felskrone joined #salt
18:39 basepi UtahDave: i do not know of any open issues of that type off the top of my head.
18:39 StDiluted did ubunutu change the init system again in 13.04?
18:39 UtahDave ok, he's opening an issue and I'll do some testing tonight after the class.
18:39 JasonSwindle UtahDave:  https://github.com/saltstack/salt/issues/6283
18:39 JasonSwindle Done, Let me know if you need more
18:40 JasonSwindle I can provide the log; but would need to remove private items out of it
18:40 drawsmcgraw UtahDave: Thanks. I fired an event from a Windows box and it resulted in a script being run on a Linux minion. Holy crap I love this stuff
18:41 mikedawson joined #salt
18:41 UtahDave JasonSwindle: that's great. Thanks, man.  I'll look at that today.
18:41 UtahDave drawsmcgraw: awesome!
18:41 JasonSwindle Great, I try to get everything at once
18:45 devinus I thought this was already implemented? https://github.com/saltstack/salt/issues/693
18:45 devinus am i wrong?
18:45 devinus i could have sworn that's what SEJeff_work was telling me to do
18:46 auser hey all, we have a new post on saltstat.es on the dependency graph, if you're interested: http://www.saltstat.es/posts/dependencygraph.html
18:46 SEJeff_work devinus, Notice the last comment from tom, "Unless you are seeing otherwise this is the behavior that is already exhibited"
18:47 devinus d'oh
18:47 JasonSwindle auser:  Awesome.  Time to add a RAX guide as well. :)
18:47 auser :) JasonSwindle…
18:47 SEJeff_work devinus, So, yes, that works as expected. I just closed that issue, thanks!
18:48 SEJeff_work devinus, https://github.com/saltstack/salt/issues/693#issuecomment-21436821
18:48 devinus okay, thanks
18:48 SEJeff_work Just a stale issue. Someone should go through several of the old issues like that one and clean them up.
18:48 auser yep, Rackspace guide coming soon
18:48 SEJeff_work auser, yay!
18:49 cowmix joined #salt
18:49 diegows joined #salt
18:49 aranhoide joined #salt
18:51 SEJeff_work UtahDave, question for you, looking at: https://github.com/saltstack/salt/issues?milestone=38&amp;page=1&amp;state=open, are there really 195 issues left for 0.17? If so, I take it that is going to be an epic release?
18:51 UtahDave :)  Aren't all of our releases epic?  lol
18:51 UtahDave I'll be back in a few.  In a class
18:51 SEJeff_work UtahDave, Seems like an especially epic one. Alrighty!
18:52 devinus is there a way to include a state from another environment?
18:52 SEJeff_work devinus, You can force the environment for the file server aka: salt://path/to/file.conf.jinja?env=dev
18:53 devinus SEJeff_work: yeah, i know about files. i'm trying to include a state tho
18:53 devinus in fact
18:53 devinus I'm including the state and then adding a managed file to it
18:54 devinus SEJeff_work: this is what i attempted: https://gist.github.com/devinus/79bceb5be8582434aab6
18:54 devinus of course it doesn't work
18:55 SEJeff_work devinus, I don't think that works. Why not keep the states the same across all envs (within reason) and just have different files depending on the env? Thats how I manage it. Much easier to conceptualize
18:58 jY anyone have an issue with 0.16 in ubuntu 12.04 randomly spawning a new subprocess each highline run
18:58 jY which for me is a minute.. it happens out of the blue to almost all minions
18:59 jY debug log is clear of stack traces.. each minion then runs another highline run every minute it seems
19:00 nmistry joined #salt
19:02 Nexpro1 joined #salt
19:03 mikedawson joined #salt
19:04 sashka_ua UtahDave: hey, good day. :) YOu have to check this out. Any place you put colon ":" inside of argument for CLI salt, it converts it to list, like "test:test" => {"test", "test"}
19:04 Gifflen_ joined #salt
19:04 sashka_ua UtahDave: try it with, lets say, file.append
19:04 sashka_ua UtahDave: salt model file.append /tmp/test "string : string"
19:04 cbloss is there a document on how to update salt? I can't seem to find it in the online docs
19:06 N-Mi joined #salt
19:06 N-Mi joined #salt
19:06 devinus SEJeff_work: how am i supposed to have the same state used in two environments that way tho?
19:06 devinus SEJeff_work: this is what happens now: https://gist.github.com/devinus/c976da688702ad28c0ed
19:07 SEJeff_work devinus, I see that as a bug
19:07 SEJeff_work However, it shouldn't be that difficult to name them slightly different
19:07 SEJeff_work devinus, I would file an issue
19:07 devinus SEJeff_work: sorry
19:08 devinus SEJeff_work: they are the same state now
19:08 devinus both in the "base" env dir
19:08 devinus i mean, it's the same file
19:08 devinus it's my base state
19:08 devinus i mean
19:08 devinus so i guess that's not allowed?
19:09 StDiluted cbloss: master first, then minions
19:10 cbloss StDiluted: Just use apt-get install (ubuntu)?
19:10 cbloss I installed via bootstrap scripts
19:10 StDiluted cbloss: that's what I did, apt-get update, apt-get upgrade
19:10 StDiluted as long as you have the salt repo
19:10 qba73 joined #salt
19:10 StDiluted ppa
19:11 Linz_ joined #salt
19:11 StDiluted i upgraded the master and then used that to upgrade the minions
19:11 cbloss i do, but I think, by default, salt ignores updates with apt-get unless specified
19:11 cbloss I have the master as a minion as well. I think I should be able to update all at same time
19:12 qba73 joined #salt
19:14 StDiluted I would do the master first
19:14 StDiluted then the minions
19:14 cbloss okay, thanks!
19:14 qba73 joined #salt
19:15 bostonian Aack! When I try to run `salt state.highstate`, I get a TypeError ("argument of type 'StrictUndefined' is not iterable") from a minion... how can I drill down to the problem?
19:16 baniir joined #salt
19:16 Linz joined #salt
19:16 bostonian Here's the full error: http://pastebin.com/dwpaCMdN
19:17 JasonSwindle Can you supply you top.sls?
19:17 JasonSwindle Something on line 63 looks to be wrong, maybe
19:18 JasonSwindle bostonian:  Ping, see above
19:18 bostonian JasonSwindle: one sec
19:20 bostonian here's my edited top.sls, sans extraneous comments (line 63 is now line 8)
19:20 bostonian http://pastebin.com/1tf8eyQU
19:21 StDiluted you're trying to nest if's?
19:21 qba73 joined #salt
19:21 bostonian StDiluted: yes
19:21 StDiluted as far as I can tell, you can't
19:21 StDiluted not with jinja
19:22 StDiluted that might be why
19:22 bostonian StDiluted: so that only a machine with grains such as   env: dev   stack: nginx,php,mysql    would install it
19:22 StDiluted yep
19:22 StDiluted I worked that issue out last night with an external grain
19:22 StDiluted err
19:22 StDiluted external pillar
19:22 bostonian StDiluted: I'll try to get rid of the nested statement
19:23 StDiluted external pillar checks the grains and sets pillars based on them
19:23 qba73 joined #salt
19:24 StDiluted jinja doesn't seem to have a way to make a multi-conditional
19:25 bostonian StDiluted: strange... I removed the outer if condition and it still doesn't work... I think it might be the {% if x in y %} checks
19:26 StDiluted try {% if grains['stack'] == php %}
19:27 bostonian hooray, that worked!
19:27 StDiluted jinja is a little different syntax than python
19:28 devinus well
19:28 devinus i'm broken. salt has broken me
19:28 qba73 joined #salt
19:28 StDiluted you can use pydsl instead of jinja, bostonian, that might give you more control
19:28 devinus is this matching twice? https://gist.github.com/devinus/103f0bfbaf2374fb4d02 is that why i'm getting duplicated salt state errors?
19:29 StDiluted yes, because you have '*' in your base env
19:29 StDiluted which matches *.vagrantup.com as well
19:29 bostonian StDiluted: good idea, I'll try that, thanks
19:30 StDiluted devinius: you're using that file_roots that was posted yesterday where you have multiple file roots in the structure so you can override, right?
19:30 devinus StDiluted: yes
19:30 kstaken joined #salt
19:30 devinus StDiluted: and because i want dev to inherit from base i'm doing that
19:30 StDiluted right
19:31 StDiluted but '*' matches all your minions
19:31 StDiluted and then '*.vagrantup.com' matches a subset of that
19:31 devinus StDiluted: well i tried this too: https://gist.github.com/devinus/d24bd4f8ebeb924a7995
19:32 kermit joined #salt
19:32 StDiluted and what did that do
19:32 kermit joined #salt
19:32 devinus StDiluted: but then it didn't even use any of the states from base
19:32 devinus so i'm not sure how the hell to do this
19:32 devinus if i have to read that damn Top State doc one more time i'm going to be put in a straight jacket
19:33 devinus StDiluted: it didn't work, let me c&p exactly what it says
19:33 devinus basically it says the state is empty tho
19:33 devinus so it doesn't even do the nginx/php-fpm/etc states from base either
19:34 StDiluted I'm in the same boat as you regarding the confusion about the environments
19:35 StDiluted they don't act as you would expect
19:35 devinus something doesn't work as advertised, because i've read every damn doc on this stuff and it still doesn't work like that
19:35 devinus exactly
19:35 StDiluted what i ended up doing is parsing tags from ec2 instances and making an external pillar to make decisions based on those tags
19:36 StDiluted so then i can manage versions and whatnot by specifying pillar data
19:36 whit joined #salt
19:36 StDiluted so like
19:36 StDiluted if env = dev and role = web, use ruby 2, else use ruby 1.9.3
19:37 StDiluted else if env = prod and role = web, use ruby 1.9.3
19:37 StDiluted etc
19:39 mannyt joined #salt
19:41 qba73 joined #salt
19:42 jpeach joined #salt
19:43 StDiluted but that doesn't sound like exactly what you're trying to do
19:44 JasonSwindle devinus:  You work on Vagrant?
19:44 devinus JasonSwindle: negative
19:44 JasonSwindle Oh ah, I saw your SLS had vagrantup.com in it
19:44 N-Mi joined #salt
19:44 N-Mi joined #salt
19:44 devinus JasonSwindle: i use Vagrant, don't work on the codebase
19:44 devinus if that's what you mean
19:45 JasonSwindle https://gist.github.com/devinus/103f0bfbaf2374fb4d02
19:45 JasonSwindle *.vagrantup.com :)
19:46 JasonSwindle I see the git username matches what is here in IRC
19:46 farra can an instance be destroyed with salt cloud?
19:48 mmilano joined #salt
19:52 N-Mi joined #salt
19:52 N-Mi joined #salt
19:52 StDiluted farra: i dont htink so
19:52 pygmael joined #salt
19:55 david_a joined #salt
19:57 druonysus joined #salt
19:57 druonysus joined #salt
19:58 napperjabber joined #salt
20:02 jschadlick joined #salt
20:04 squelch joined #salt
20:04 squelch hey, when using vagrant salt doesn't show any output, is there an option for that
20:04 N-Mi joined #salt
20:04 N-Mi joined #salt
20:05 Kholloway joined #salt
20:05 FL1SK joined #salt
20:07 devinus joined #salt
20:11 kermit joined #salt
20:14 Linz joined #salt
20:16 napperjabber joined #salt
20:16 JasonSwindle squelch:  Let me show you
20:16 Linz joined #salt
20:22 JasonSwindle squelch:  https://gist.github.com/JasonSwindle/345b3907854a5d44b03b
20:22 JasonSwindle salt.verbose
20:22 mikedawson_ joined #salt
20:23 squelch JasonSwindle: thank you!
20:24 JasonSwindle NP
20:24 mikedawson__ joined #salt
20:25 squelch also, what does refresh do? Ie pkg.installed: - refresh: true
20:26 mattt what are the preferred states to use for openstack?
20:27 giantlock joined #salt
20:29 jkleckner joined #salt
20:30 emilisto_ joined #salt
20:31 aleszoulek joined #salt
20:33 backjlack joined #salt
20:33 akoumjian Is there a way to use salt-call state.highstate and only see states which fail?
20:34 UtahDave akoumjian: there's 2 options in the master config for that. lemme find them.
20:35 UtahDave akoumjian: state_verbose and state_output
20:36 akoumjian UtahDave: Great, thank you. Can those be overridden for individual commands?
20:36 UtahDave akoumjian: No, not that I'm aware of.
20:36 racooper squelch,  I believe refresh=True tells the packaging system to reload the catalogs from the repos (i.e., apt get update)
20:36 racooper apt-get update.  gah, you'd think I don't use an ubuntu-based desktop.
20:36 akoumjian UtahDave: That's kind of silly. Might have to add that to my salt sprint task list
20:37 UtahDave sounds like a great idea!
20:37 UtahDave racooper: and squelch, that's correct.
20:37 squelch racooper: Ah that makes sense
20:38 UtahDave farra: yes, salt-cloud -d <vm name>  will destroy the vm
20:40 StDiluted ah right on
20:40 StDiluted documentation doesn't mention that. docs are pretty sparse on salt-cloud
20:41 StDiluted I have a set of 'core' states, and a set of role based states, and it seems that only the 'core' states get applied on the first highstate, and then when i run it again i get the other states. Anyone else seen this behavior?
20:42 StDiluted is it because grains get copied up during the first highstate?
20:43 StDiluted (I'm using a custom grain to define roles)
20:53 StDiluted no one?
20:53 StDiluted hehe
20:55 jalbretsen Stdiluted.  Makes sense, if the custom grain is no there to begin with, it I believe it won't be loaded when you run the highstate
20:55 wilkystyle joined #salt
20:56 StDiluted that's my thought. Wonder if I need to run a grains_sync before the highstate
20:56 jalbretsen StDiluted that is
20:56 wilkystyle left #salt
20:56 jalbretsen I set up custom grains myself, I just push em the old fashion way
20:56 StDiluted copy them up?
20:57 whit joined #salt
20:57 jalbretsen ya, I have a /etc/salt/minion.d/minion.conf file for every server
20:57 jalbretsen although I have considered moving some of my custom grain data to pillar lately
20:58 jalbretsen but ya, copy it up, restart the minion, then run salt to set up the server
20:59 StDiluted I've got grains being set via ec2 tags
20:59 StDiluted and the _grains dir is in my base file_root
20:59 jalbretsen some of the cloud people might have a better way.  I have between 50 - 60 servers that I maintain, so logging into one is a big deal
20:59 jalbretsen ya, so with cloud, I have not clue
20:59 StDiluted meh, same diff
21:01 jalbretsen bottom line, if your minion doesn't know about the grains when you you run a highstate, putting on there during the highstate won't be available until the minion is restarted
21:01 StDiluted yeah
21:01 jalbretsen or grains_sinc
21:01 jalbretsen sync
21:02 StDiluted so maybe I need to grains_sync then highstate
21:04 jalbretsen One thing I did for a while, but I broke it and have not fixed it was ..... if you are using CentOS / RHEL and kickstart, just upload a custom minion.conf file then.
21:04 jalbretsen then when the server reboots, accept the key, run highstate, done
21:05 StDiluted yeah. I've got an Amazon AMI that has the minion
21:05 jagster02 joined #salt
21:06 jalbretsen ya, I'm coming from a non-cloud environment.  I just provision simple VMs and stand alone boxes
21:06 jalbretsen but with Salt and some other things I did, I took a 4 day config and install app box to 30 minutes.  Salt FTW
21:06 jagster02 left #salt
21:07 jpeach joined #salt
21:14 dthom91 joined #salt
21:15 jY anyone have an issue with 0.16 in ubuntu 12.04 randomly spawning a new subprocess each highline run
21:15 jY debug log is clear of stack traces.. each minion then runs another highline run every minute it seems
21:17 StDiluted how can i make file.sed edits to a line that looks like: {'icingaadmin': {'alias': 'icingaadmin', 'locked': False, 'roles': ['user']}}
21:18 StDiluted I want to change 'user' to 'admin' but only for icingaadmin
21:21 squelch is there any way to make sure that apt-get update and apt-get upgrade is done before anything else without requiring it for everything
21:29 ahammond squelch you can manually run it, but I think you'd need to require it if you wanted it to happen for a given state automagically.
21:29 ahammond also, alt-get upgrade? pretty wild.
21:33 mikedawson joined #salt
21:34 squelch ok. yeah just getting frustrated with a package not updating.. maybe a bit overkill
21:34 mgw joined #salt
21:36 napperjabber joined #salt
21:36 devinus joined #salt
21:36 Linuturk joined #salt
21:37 sturdy joined #salt
21:37 Linuturk what's the preferred method for automatically having minions call highstate? Is there a good example sls that makes sure the minion is installed, updated, running, and checking for highstate?
21:40 ksalman anybody here tried running salt on rhel4?
21:41 ksalman i can compile python2.6 but I am not sure about the other depenedencies
21:42 ksalman m2crypto python-crypto python-jinja2 python-msgpack python-zmq
21:45 bemehow joined #salt
21:50 devinus joined #salt
21:51 avienu If I run state.highstate and it doesn't return a True, does that mean it barfed (probably an error in my state files)? Where do I look to see why it didn't work?
21:52 Linuturk what's the preferred method for automatically having minions call highstate? Is there a good example sls that makes sure the minion is installed, updated, running, and checking for highstate?
21:52 jeffrubic joined #salt
21:55 avienu Ah, I see. On the minion itself I can run salt-call state.highstate -l debug
21:55 Xeago joined #salt
21:56 aat joined #salt
22:00 jpeach joined #salt
22:02 spudbook joined #salt
22:07 aat joined #salt
22:09 kermit joined #salt
22:10 EugeneKay Linuturk - the docs have a bit on scheduling; that's about it AFAIK.
22:10 Tekni joined #salt
22:10 EugeneKay One of my states under services/ is salt-minion, which ensures the pkg is up-to-date and /etc/salt/minion is file.managed properly
22:13 bemehow joined #salt
22:22 Linuturk EugeneKay: so, crontab?
22:22 Linuturk seems there should be a daemon that does it
22:22 * Linuturk shrugs
22:22 druonysus joined #salt
22:22 druonysus joined #salt
22:24 UtahDave Linuturk: Salt has a scheduler
22:26 soukihei joined #salt
22:36 indymike joined #salt
22:40 cbloss does anyone use salt to control their $home/dotfiles?
22:40 cbloss or know of a good way to do so?
22:41 UtahDave cbloss: yeah, lots of people do that.  Use stick all your dotfiles in the file_roots or in gitfs and then use file.recurse to drop all the dotfiles in your home directory during a highstate
22:42 cbloss thanks. Not sure I completely understand, but I'll start digging with that and will figure it out!
22:43 cbloss I was thinking about using a hybrid between salt + something like freshshell, or holman's dotfiles
22:45 Linuturk UtahDave: http://docs.saltstack.com/topics/jobs/schedule.html UtahDave awesome
22:46 berto- joined #salt
22:46 UtahDave Linuturk: yeah, it's pretty nice.
22:46 Linuturk pkg.installed auto updates the packages too, right?
22:48 * Linuturk goes and reads the docs like a good boy
22:49 jslatts joined #salt
22:54 helderco joined #salt
22:57 Xeago joined #salt
23:01 UtahDave Linuturk: if you want to autoupdate the packages then you'll want to use      pkg.latest
23:01 aat joined #salt
23:04 kenbolton joined #salt
23:12 druonysus joined #salt
23:12 druonysus joined #salt
23:14 [diecast] joined #salt
23:18 napperjabber joined #salt
23:27 cxz joined #salt
23:34 oz_akan_ joined #salt
23:35 kenbolton joined #salt
23:36 ProT-0-TypE joined #salt
23:43 aranhoide joined #salt
23:46 chrisgilmerproj left #salt
23:49 whit joined #salt
23:52 aat joined #salt
23:53 berto- joined #salt

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