Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2012-11-19

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

All times shown according to UTC.

Time Nick Message
00:00 mmoya joined #salt
00:04 jhauser_ joined #salt
00:47 ska joined #salt
01:01 szaydel joined #salt
01:07 dedis11 joined #salt
01:16 mmoya joined #salt
01:22 __number5__ joined #salt
01:38 ceptor joined #salt
01:43 Sypher|NL joined #salt
01:44 bgnx joined #salt
01:58 szaydel joined #salt
02:05 Sypher|NL joined #salt
02:40 Ivo joined #salt
03:25 e1ch1 joined #salt
03:28 cnelsonsic joined #salt
03:48 cnelsonsic joined #salt
04:07 __number5__ joined #salt
04:19 cnelsonsic joined #salt
04:21 Ryan_Lane1 joined #salt
04:34 yumike joined #salt
04:35 szaydel joined #salt
04:51 Ryan_Lane joined #salt
05:06 cnelsonsic joined #salt
05:42 poRz joined #salt
06:00 jhauser joined #salt
06:45 e1ch1 joined #salt
07:14 drdran joined #salt
07:16 jugimaster joined #salt
07:29 drdran_ joined #salt
07:45 drdran joined #salt
07:48 MrTango joined #salt
07:58 kesor joined #salt
07:58 middleman_ joined #salt
08:00 kesor can someone point me to some list of good/bad things about salt? i'm writing a comparison of salt/chef/puppet/cfengine and there is just very little information about salt available.
08:02 balboah joined #salt
08:03 oliv_mc joined #salt
08:04 oliv_mc joined #salt
08:05 sorenso joined #salt
08:06 unicoletti_ joined #salt
08:16 tim|mint joined #salt
08:32 mmoya joined #salt
08:33 aranhoide joined #salt
08:35 aranhoide I'm trying to run salt in masterless mode using "salt-call state.highstate" and I get this error: "Master hostname: salt not found. Retrying in 30 seconds"
08:35 aranhoide same config used to work a couple weeks ago
08:36 aranhoide nothing changed on my end really, only perhaps salt version (I'm bootstrapping EC2 to test, so salt gets installed anew from the ppa)
08:36 aranhoide (that's Ubuntu, btw)
08:39 aranhoide salt-call --version says 0.10.5
08:40 masm joined #salt
08:47 aranhoide solved this one; it seems 0.10.5 needs "master: localhost" in the minion config
08:51 aranhoide now salt fails to run a .sls with the #!py renderer
08:52 aranhoide even just a def run(): return {} fails with
08:52 aranhoide local:
08:52 aranhoide Data failed to compile:
08:52 aranhoide ----------
08:52 aranhoide Rendering SLS masterless.forced-apply-config failed, render error:
08:52 aranhoide coercing to Unicode: need string or buffer, cStringIO.StringI found
09:01 scott_w joined #salt
09:14 balboah I would like to know how to downgrade to .4 again using the ppa
09:22 balboah can you run a specific state without it having to be in the top file? or do you always have to do state.highstate
09:25 ronc joined #salt
09:37 drdran joined #salt
09:50 krak3n` joined #salt
09:53 yota joined #salt
10:01 drdran joined #salt
10:20 fredvd joined #salt
10:28 Valdo joined #salt
10:33 lightyear joined #salt
10:40 zooz joined #salt
10:49 lightyear left #salt
10:51 Sypher|NL joined #salt
11:34 ceptor joined #salt
11:37 Furao balboah: by nature an apt repo can't have 2 version of the same package
11:39 webwurst joined #salt
11:43 fredvd joined #salt
11:57 balboah Furao: I see. so the apt version selector would only apply to when you have several repos
11:58 Furao yes
11:58 balboah I should probably try to clone it and use my own ppa
11:58 Furao I the next few hours I need to write a state that install a single .deb file
11:58 Furao downloaded from http or salt itself
11:59 Furao I the -> In the
11:59 Furao and I will write a state that add a ppa and add the key
11:59 Furao either one of those can be usefull
12:03 Victor once you start creating modules for states, like eg: tomcat, on top.sls how should i call tomcat module? like tomcat.init? it's not clear for me from the tutorial
12:05 Furao Victor: there is already a tomcat module
12:05 Furao ah you mean state file
12:05 Furao under top.sls namespace
12:06 Furao look at github.com/salt/salt-states for relatively simple examples
12:06 Victor 404
12:07 Victor and i don't mean just a new file, but a new directory with a few state files
12:07 Victor eg:
12:07 Victor http://docs.saltstack.org/en/latest/topics/tutorials/starting_states.html
12:07 Victor lists an ssh dir with a few files + apache dir with a few files
12:08 Victor how do i use them from top.sls? if i add just the name of the directory "ssh" or "apache" it doesn't work
12:08 Victor should i use ssh.init or apache.init or am i doing something wrong?
12:09 Furao Victor:  bad url I just gave it from memory: https://github.com/saltstack/salt-states
12:09 Furao it's like in python
12:10 Furao you never really call a class __init__ function
12:10 Furao so if you want to call ssh/init.sls
12:10 Furao you just call ssh
12:10 Furao but if you have like me, ssh/server.sls
12:10 Furao you call ssh.server
12:11 Victor that's what i thought but it didn't work for me, i'm surely doing something stupid, i'll look at it more in depth
12:11 Victor thx a lot!
12:11 Victor :)
12:12 Furao maybe the salt file is invalid
12:12 Furao run the minion and server in debug
12:22 s0lar joined #salt
12:23 s0lar hi ppl.. which version of ZeroMQ is recommended atm? is ZeroMQ 3 stable with Salt 0.10.5?
12:28 jhauser_ joined #salt
12:29 oliv_mc joined #salt
12:32 ska joined #salt
12:41 ggoZ joined #salt
12:46 szaydel joined #salt
12:49 Furao zmq3 is supposed to be faster, but salt support for it is new
12:54 s0lar Furao: I guess it's better to stay with 2.2.0.1 for now
12:54 s0lar or 2.2.0
12:55 Victor i still can't figure out what i'm doing wrong
12:55 Victor http://pastebin.com/DK9yA0X9
12:55 Victor this is the tomcat dir with it's contents
12:56 Victor from minion in debug module it goes to check the tomcat/init.sls
12:56 Victor but does nothing to install the packages
12:56 Victor :?
13:01 unicoletti Victor: does openjdk get installed?
13:04 unicoletti I suspect tomcat/ and tomcat/tomcat.sls collide
13:04 unicoletti try renaming tomcat/tomcat.sls in tomcat/apachetomcat.sls (and modify the include accordingly)
13:08 Victor unicoletti: nothing gets done
13:08 Victor let me try
13:10 krak3n` hmm, since upgrading to the latest version of salt my states written in python seem to no longer run, get this: coercing to Unicode: need string or buffer, cStringIO.StringI found :'(
13:11 Victor unicoletti: no luck
13:12 Victor [INFO    ] Fetching file 'salt://tomcat.sls'
13:12 Victor [INFO    ] Fetching file 'salt://tomcat/init.sls'
13:12 Victor [DEBUG   ] Jinja search path: '/var/cache/salt/files/base'
13:12 Victor [INFO    ] Returning information for job: 20121119131100743218
13:12 Victor that's all it does from the minion
13:12 Victor Comment:   No states found for this minion
13:12 Victor and this is how i'm calling it: salt '*' state.highstate
13:12 Victor so it should work (no grains, or ifs anywhere)
13:13 unicoletti do you have a toplevel tomcat.sls file too?
13:13 Victor nope
13:13 Victor i had it before, not removed it, not sure if maybe it could be cached somwhere on the minion
13:14 Victor *removed it
13:15 unicoletti there is a typo in openjdk.sls: the id read opendjk (note jd got swapped in dj)
13:16 unicoletti I would try putting all the definitions in one file and see if it works
13:16 unicoletti and then  proceed to split them
13:16 unicoletti it should ease the debugging process
13:19 Victor unicoletti: true, fixed, but still: No states found for this minion
13:19 Victor let me try putting everything into init and see what happens
13:22 Victor unicoletti: on the same file seems to work
13:22 unicoletti all right then it's an issue with include
13:22 unicoletti I have never used them though
13:23 Victor the include seems simple and right, but as this is the first time i try to do it might be wrong for unknown reasons
13:25 unicoletti try the fully qualified state path:
13:25 unicoletti include tomcat.openjdk
13:25 unicoletti like in this example: http://docs.saltstack.org/en/latest/topics/tutorials/starting_states.html#extending-included-sls-data
13:27 Furao Victor: do you have a /tomcat.sls ?
13:27 Victor unicoletti: that way it works, thx a lot!
13:27 Victor Furao: no, i don't
13:28 unicoletti awesome!
13:28 Furao your tomcat/init.sls must include tomcat.openjdk
13:28 Victor what's the best place to file a bug report to improve the documentation and/or error reporting?
13:28 Furao and not openjdk
13:30 ska joined #salt
13:30 ska joined #salt
13:30 Victor github seems the place, i'll file a bug report, thx!
13:30 Furao ah sorry unicoletti I did read the whole thing before reply
13:30 unicoletti Furao: np
13:51 colinbits joined #salt
14:00 colinbits joined #salt
14:02 masm joined #salt
14:10 aranhoide joined #salt
14:12 jugimaster joined #salt
14:13 lightyear joined #salt
14:30 dk01 joined #salt
14:38 cnelsonsic joined #salt
14:42 fredvd joined #salt
14:58 jalbretsen joined #salt
14:59 rhyselsmore joined #salt
15:04 taotetek joined #salt
15:07 kaptk2 joined #salt
15:08 jschroeder_ joined #salt
15:09 SEJeff_work joined #salt
15:11 mdennis6 joined #salt
15:21 FOCer joined #salt
15:31 UtahDave joined #salt
15:33 redbeard2 joined #salt
15:36 cnelsonsic joined #salt
16:01 carmony joined #salt
16:07 s0undt3ch UtahDave: I made a commit yesterday with your name in it :)
16:08 UtahDave :)  You finally finished your SuperMan module?
16:08 johnthedebs joined #salt
16:08 s0undt3ch UtahDave: nah, I'm even smarter! https://github.com/s0undt3ch/salt/commit/e44aa0acf3a0d33f6466cbe940f1ec45145b11e1
16:09 UtahDave Oh, ha. Yes, I did see that one come through.  Funny
16:10 s0undt3ch UtahDave: yeah, same mistake, go figure
16:10 UtahDave he he.
16:10 s0undt3ch that's actually stupid :)
16:10 s0undt3ch UtahDave: the superman module is getting close :)
16:10 SEJeff_work s0undt3ch, Ha! Reminds me of: https://github.com/saltstack/salt/commit/2a8b4de0f44793555341d0f85a4bbef5355f41cf
16:11 UtahDave just don't delete your stashes this time. ;)
16:11 UtahDave nice, SEJeff_work!
16:12 s0undt3ch UtahDave: it's not stashed, it's commited, and it's now about 90 commits apart
16:12 s0undt3ch a bunch of merges in there of course
16:14 ronc joined #salt
16:15 aranhoide joined #salt
16:16 aranhoide is it a known issue that first crontab entry that gets added with cron.present goes above the comment that salt uses to mark its own entries?
16:16 aranhoide as a result, it is added again (this time under the comment) next time you run salt
16:17 aranhoide should I report this, or am I getting something wrong?
16:18 UtahDave aranhoide: that sounds like a bug.  Do you mind creating an issue describing it on github? make sure to include the version of salt you're using
16:19 aranhoide will do, thanks.  btw, it's 0.10.5
16:22 UtahDave thanks!
16:24 unicoletti left #salt
16:26 Furao hmmm weird I can't call state.high from a custom state
16:26 Furao in the doc it says that state.high is here mostly for test
16:26 Furao but can I use it seriously?
16:29 marcinkuzminski joined #salt
16:32 Furao UtahDave: is that legal? https://gist.github.com/4111647
16:32 UtahDave Furao: let me look
16:32 Furao look what it does when I run it: https://gist.github.com/4111647#gistcomment-602789
16:34 avidal_ joined #salt
16:34 aranhoide added: https://github.com/saltstack/salt/issues/2638
16:34 fredvd joined #salt
16:34 UtahDave thanks, aranhoide
16:37 UtahDave Furao: still looking.  Just a quick note... Tom prefers .format()
16:37 Furao ok
16:38 Furao I basically just craft a data for salt.modules.state.high and run it
16:39 kuffs is the python renderer not enough?
16:41 Furao kuffs: I want to reuse in many places simultaneously it not just include and extend
16:41 Furao I had a version that did not used state.high
16:42 stevetodd joined #salt
16:43 Furao and this state is something few others here might be interested into
16:43 Furao UtahDave: I updated to use format() instead
16:44 UtahDave Furao: Generally, states use modules to make things happen.
16:44 Furao Yes I know
16:44 Furao I wrote a rabbitmq_cluster and rabbitmq_plugins states + modules this weekend
16:44 ttgb joined #salt
16:45 UtahDave Is there a good technical reason to use high data instead of an apt_repository module?
16:45 UtahDave because we could then abstract that out to have support for yum, etc
16:46 kuffs I have a couple pkg repo macros I wrote
16:46 kuffs the two platforms are too different imo
16:47 kuffs and it's not like package repos share the same url for both platforms
16:47 kuffs so you can't pretend that 'pkg.repo' http://epel.fedora.org is gonna be valid on ubuntu
16:47 kuffs or even 10gen's repo
16:47 Furao well maybe I can use python renderer
16:48 UtahDave good point
16:48 kuffs yeah, 'url' is the only semantic shared between the two platforms. and the urls will never be the same
16:48 Furao In fact I never reused the same state.sls file and extends it multiple time, except for watch
16:49 kuffs so I wrote two macros and just acknowledged that I would need to do platform detection in the template
16:49 kuffs Furao: watch_in is easier than doing the awkward extend
16:50 Furao but if in my single state file I want to add 3 repo, can I using this?
16:52 kuffs what is your mechanism for defining repos?
16:52 drdran joined #salt
16:53 kuffs UtahDave: is there somewhere I can post my pkg_repo stuff? I feel like it will give someone a leg up on a repo state if they want to tackle it.
16:53 UtahDave Send a pull req to salt-contrib.  That's a great spot for things like that.
16:55 kuffs Furao: so the way I do it is, I have two jinja macros I wrote that do repo state defintions - one for ubuntu and one for rhel. Since I don't want to be redefining 10gen in every sls I need it in, I write a 10gen.sls that is an instantiation of the macro I wrote. Then when I need 10gen repo for a given package, I just include: pkg_repo.10gen.
17:01 avidal joined #salt
17:01 avidal joined #salt
17:07 dcrouch joined #salt
17:10 bensix2 joined #salt
17:12 yumike joined #salt
17:17 Furao UtahDave: but even if it's not the best thing… state.high should be callable, right?
17:17 Furao __salt__ is not in the namespace
17:23 SEJeff_work Furao, __salt__ is attached to the namespace via the module loader
17:23 SEJeff_work It is a bit unconventional, but it actually is added to the namespace of every module
17:25 SEJeff_work Furao, See here: https://github.com/saltstack/salt/blob/develop/salt/loader.py#L394 and here: https://github.com/saltstack/salt/blob/develop/salt/loader.py#L542
17:26 Furao SEJeff_work: yes, I already read it, I figured everything else using the source-code
17:26 Furao but, in my case, it fail, because in my state I call salts.modules.state.high
17:26 SEJeff_work Oh you import it directly don't you?
17:27 SEJeff_work You can do like I did in the grains/core.py when I wanted to remove the 5-6 instances of directly using the subprocess module
17:27 SEJeff_work https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L33
17:30 Furao yes I imported it
17:30 Furao ahhhhhh
17:30 Furao yes
17:30 Furao I understand
17:32 Furao not it's not that
17:32 Furao it's even worst
17:32 Furao NameError: global name '__salt__' is not defined
17:33 SEJeff_work Yes, you have to create a "fake" __salt__ dictionary object
17:33 Furao ok, let me try
17:33 SEJeff_work And the loader code will update it with the rest of the functions it has found if there is an existing one
17:33 Furao I'm doing 15 things simultaneously :(
17:33 SEJeff_work Basically you need to copy the concept I did in the grains and it should work. Make sense?
17:34 Furao I tought it failed during the import
17:34 SEJeff_work You'll have to make that module not fail on import
17:34 SEJeff_work by faking the __salt__ object
17:35 SEJeff_work If you can't do that, you'll need to refactor things until you can.
17:35 SEJeff_work Might be worth posting on the mailinglist to get some input from more salt upstream peeps
17:35 SEJeff_work But thats how you can solve your problem.
17:37 Furao the problem is because the exception is raised in the module I imported
17:38 Furao great
17:38 Furao I just used __salt__ instead of import
17:39 Furao too much python not enough salt
17:39 Furao not used to that
17:45 marcinkuzminski joined #salt
18:05 jcooley joined #salt
18:05 Furao UtahDave: this work https://gist.github.com/4111647
18:05 Furao SEJeff_work: I was trying to do something crazy like this: https://gist.github.com/4111647
18:06 greghaynes joined #salt
18:07 pentabular joined #salt
18:08 yumike joined #salt
18:13 chutzpah joined #salt
18:19 jcooley joined #salt
18:21 szaydel joined #salt
18:22 whiteinge s0lar: still looking for me?
18:22 s0lar whiteinge: got the salt-api up n running now :) some errors in the docs
18:23 whiteinge s0lar: glad you got it running. i'm all ears about the errors
18:26 ronc joined #salt
18:28 wendall911 joined #salt
18:32 jplewi joined #salt
18:33 p424n0id joined #salt
18:35 p424n0id hi guys i'm pretty new to salt and was testing a custom installation (copy source files to minion and compile) what is the proper approach for the directory copying procedure?
18:36 UtahDave Furao: great! glad you were able to get it working. Sorry, I've been in a meeting for the last little bit.
18:36 p424n0id the custom installation is on a minion (forgot to add =P)
18:37 Furao UtahDave: no problem. should I do a PR on salt-contrib for this? or because I call craft this state within a state and call state.high is bad?
18:37 UtahDave p424n0id: you can use file.recurse to copy down a directory structure
18:37 UtahDave Do a PR on salt-contrib.  It's a very interesting idea.
18:38 p424n0id UtahDave: thanks
18:38 UtahDave p424n0id: any time.
18:51 Furao I can't have more than 1 pull request
18:51 Furao UtahDave: I have an other module + state I will PR when this one is processed
18:52 kuffs p424n0id: there are also states for git and svn if you're deploying a project
18:52 p424n0id kuffs: it's not the case but thanks for the info, that'll be the next step ;-)
18:54 SEJeff_work Furao, I really like the idea (and the good code helps!), but would it make sense to make this a more generic 'repository' module?
18:54 SEJeff_work ie: apt for debian-ish and yum for redhat-ish and zypper/rug for suse-ish?
18:55 kuffs I don't think so
18:55 kuffs the only semantic the repository implentations share with each other is a name and a url
18:55 Furao in my case the name is made automatically
18:55 Furao it's url + bunch of other stuff
18:56 Furao I don't even know if there is a concept of PGP key with RH and Suse
18:56 kuffs furthermore, the urls between platforms are always going to be different, even in the case of a common repo provider like 10gen
18:56 SEJeff_work Furao, There most certainly is with rpm
18:56 SEJeff_work Furao, Either way, for the suse stuff, we can make it accept kwargs, so at worst, we'll ignore that bit
18:57 SEJeff_work kuffs, But conceptually, a repository is a package repository for the local package manager
18:57 SEJeff_work It isn't as though you'll have zypper repositories on RHEL
18:57 SEJeff_work Or apt repositories on SLES
18:57 kuffs I guess one still does the same platform detection and name mangling with something as trivial as packages themselves
18:57 SEJeff_work Even if you do... you can use the virtual provider to force it in the states
18:58 SEJeff_work pkg is a virtual module
18:58 kuffs right
18:58 Furao and in my state I also have a shortcut for Ubuntu PPA , a very often used source of additional repositories
18:58 kuffs I was agreeing with you
18:58 SEJeff_work that is rpm on rpm-based systems, dpkg on debian-ish systems, etc
18:58 SEJeff_work kuffs, gotcha
18:58 SEJeff_work Furao, Sure, no reason not to add that to the apt repository one. I see no reason with additions
18:58 SEJeff_work Furao, There is a bug open for this, let me try to dig it up
18:59 SEJeff_work Furao, FYI: https://github.com/saltstack/salt/issues/356
19:02 marcinkuzminski joined #salt
19:03 s0lar whiteinge: one thing that I ran into was that I couldn't disable the SSL part.. had to comment it out in rest_cherrypy, could you post a full salt-master config that works? this is what I need to have, http://pastebin.com/y3dNSPWn, doesn't seem right to me but it works..
19:03 Ryan_Lane joined #salt
19:03 s0lar i believe secret isnt needed anymore
19:04 s0lar whiteinge: both saltapi and rest_cherrypy seems to be needed, when starting the server it looks for .start function
19:14 Ryan_Lane joined #salt
19:14 colinbits joined #salt
19:20 szaydel joined #salt
19:20 teskew joined #salt
19:28 whiteinge s0lar: the 'saltapi' config block shouldn't be needed
19:29 whiteinge the debug setting under rest_cherrypy should toggle whether it uses/looks for ssl certs
19:30 s0lar whiteinge: you're right, it works without saltapi, it was needed for rest_flask..
19:30 s0lar whiteinge: let me see if I can get SSL workingn with debug=true
19:30 s0lar whiteinge: if debug is true then ssl isns't needed ?
19:30 s0lar since it's for testing
19:31 whiteinge debug: true bypasses ssl entirely
19:31 whiteinge it starts the development server instead of the production-ready server
19:31 s0lar whiteinge: works :)
19:31 whiteinge woot :)
19:32 s0lar my fault, I checked out youre code to early and got the rest_flask stuff into site-packages
19:32 s0lar tried with the new config settings
19:32 s0lar of course it didnt work
19:35 s0lar whiteinge: Ive been thinking about developing a GUI in PHP, thats what we mostly use here.. do you think its possible to connect through PHP to your API?
19:36 xt s0lar: just take the opportunity to learn python
19:37 s0lar xt: well, we dont want to start from scratch.. so if we can it would be better to use something like Drupal , with a custom module..
19:37 s0lar xt: if not, then perhaps use something like Plone/Zope which is python.. but I didnt try it
19:38 s0lar or Django, but thats seems more of a framework than CMS...
19:38 xt that's true
19:39 xt I don't know the state of the salt-API-stuff, but surely any language will do just fine. Including PHP for using that part
19:39 s0lar most of our developers are LAMP guys , with PHP in P :)
19:39 xt but developing in python might be benificial, for integrating closer
19:40 s0lar true
19:41 s0lar we still need the flexibility of building a dynamic GUI without too much coding, for rapid development
19:41 whiteinge s0lar: PHP can connect to the REST api just fine
19:41 s0lar whiteinge: thats good to hear :)
19:41 jcooley joined #salt
19:41 whiteinge ah, xt said that
19:42 whiteinge the cherrypy REST API will talk yaml and json
19:42 whiteinge right now. and others are easy to add (if there's a need)
19:44 s0lar whiteinge: something like this? http://forums.sugarcrm.com/f148/php-rest-api-corrected-example-66280/
19:44 s0lar or http://return-true.com/2010/02/connecting-to-twitter-api-using-php/
19:45 mnemonikk joined #salt
19:46 issackelly joined #salt
19:47 FOCer joined #salt
19:49 whiteinge s0lar: yes, largely. so long as you can set http headers in the request it will work
19:49 s0lar nice :)
19:49 s0lar have to try it!
19:50 whiteinge hit me up if you have Qs
19:50 s0lar about the authentication, do I need to do that in Debug mode?
19:50 whiteinge yes
19:51 whiteinge auth through pam (or whatever eauth has been configured) is required, just the ssl is not
19:51 poli joined #salt
19:51 yumike joined #salt
19:51 s0lar whiteinge: I just ran curl with the test.ping command, it returns true.. I didn't authenticate
19:52 whiteinge o_O
19:52 s0lar ah
19:52 s0lar hmm
19:52 s0lar it sets a cookie
19:52 s0lar maybe Its cached
19:53 s0lar I did authenticate via the web form in Firefox
19:54 whiteinge CLI curl shouldn't keep/use the cookie unless you ask it to
19:54 s0lar ok
19:54 whiteinge do you have a ~/.curlrc or anything?
19:55 s0lar its empty
19:55 s0lar if I remove the -H X-Auth-Token it says "please login"
19:55 whiteinge ah, excellent
19:56 carmony joined #salt
19:56 s0lar but I can set the token to anything, and then I get in
19:58 whiteinge s0lar: yikes. verified
19:58 s0lar :D
19:59 whiteinge ah, i forgot to look up that value in the session table
20:01 poli Hi all. My setup is: a box with salt-master running as a non privileged user (as described on the documentation) and a django application that is started using supervisord+gunicorn, by a non privileged user (actually, supervisord runs as root, but the app is configured to run as a non privileged user). The problem: I'm not able to run salt commands using LocalClient, I get this error: "Failed to authenticate, is this user permitted to execute commands?"
20:02 UtahDave poli: have you set up client_acl?  https://salt.readthedocs.org/en/latest/ref/clientacl.html?highlight=client_acl
20:04 poli Hmmm... that seems to be missing...
20:04 s0lar whiteinge: testing login from CLI, using: curl -si localhost:8080/login -H "Accept: application/json" -d username='test' -d password='test' -d eauth='pam', I get the response: This resource resides temporarily at <a href='http://localhost:8080/'>, and if I POST to that URL it says { "status": "401 Unauthorized",  "message": "Please log in" }
20:04 poli UtahDave: Thanks
20:05 UtahDave no problem! Let me know if you have any problems getting that running.
20:05 dk01 joined #salt
20:07 whiteinge s0lar: once you authenticate successfully it returns the 302 redirect. you'll want to hang on to the X-Auth-Token from that reponse and use it in subsequent requests
20:07 s0lar btw, another problem I ran into today.. the master is totally dead and no minions return.. I know this is issue is being worked on. But is there any steps I could take to help you debug? I mean if theres a step-by-step guide to get debug info out of Salt
20:07 s0lar whiteinge:  I see!
20:09 s0lar I looks like this issue: https://github.com/saltstack/salt/issues/891, and several other posts about it. I am running 0.10.5 as of today
20:13 sorenso joined #salt
20:13 s0lar whiteinge: I see it, the Auth token is outputted on the 302 :) good I found it isn't needed atm.. he
20:13 whiteinge haha
20:13 whiteinge veery good
20:14 whiteinge thank you for finding that
20:14 s0lar np =)
20:14 whiteinge i need to add to the docs how salt itself should be configured to use with the api
20:14 s0lar I'm trying to get a remote debugger installed, pyCharm..
20:14 s0lar yep
20:16 s0lar I'll submit some docs on the PHP stuff if I get it working..
20:16 s0lar could be handy
20:16 whiteinge yes, thank you
20:18 alekibango joined #salt
20:19 dkehn redbeard2, have time for a few questions
20:20 s0lar whiteinge: another question, if I want to run cmd.run, it says run() takes at least 1 argument (0 given), where do I put the argument?
20:20 redbeard2 dkehn: by all means
20:21 s0lar whiteinge: something like curl -si http://localhost:8080 -H "Accept: application/x-yaml" -H "X-Auth-Token: xxx" -d client=local -d tgt='*' -d fun='cmd.run' -d "ls"
20:22 whiteinge s0lar: that last arg should be  -d arg="ls"
20:23 s0lar whiteinge: ok.. works almost.. http://pastebin.com/xJKgkffF
20:24 s0lar salt '*' cmd.run ls works
20:24 dk01 joined #salt
20:27 whiteinge ah. it's interpreting the value in arg as a list
20:28 jenner joined #salt
20:29 whiteinge tracing the call to find where...
20:29 s0lar whiteinge: what IDE are you using? I'm trying to setup a clean environment to do some debugging that could help
20:30 whiteinge i'm just using Vim
20:30 s0lar ah :)
20:31 s0lar I did a step debug in Salt-API using http://www.jetbrains.com/pycharm/, works really great..
20:31 s0lar now I'm trying to get it to debug on a remote server.. not that trivial
20:32 whiteinge still, that's cool
20:33 s0lar it helps
20:33 s0lar I'm no python developer, but I can read ;)
20:33 zooz_ joined #salt
20:33 whiteinge i see where the bug is
20:33 s0lar nice
20:35 s0lar enough testing for today I think.. I'll be here tomorrow to test latest GIT version if you need
20:35 dk01 joined #salt
20:35 mrpull1 joined #salt
20:35 whiteinge s0lar: awesome. thanks for the feedback today. i'll have this fixed shortly
20:36 s0lar whiteinge: np.. great! I'll have a look tomorrow.. later!
20:40 mtou_ joined #salt
20:40 kesor_ joined #salt
20:41 kesor_ are there ways to extend salt states with additional commands, like puppet parametized classes, or even like chef's libraries?
20:42 kuffs pillar is the way to do that
20:42 kuffs though you can still incorporate module calls into your templates if you wish
20:43 kuffs http://salt.readthedocs.org/en/latest/topics/pillar/index.html
20:44 mtou_ Hi all. I upgraded my 0.10.1 (from git) to 0.10.4, integrated all new minion & master config values, configured "state_verbose: False" in both, restarted master&minions, and... still all /green/ states show up. Read IRC logs and forum history and can't find where I do something wrong. (I liked the old behaviour)
20:44 eightyeight joined #salt
20:46 dk01 joined #salt
20:46 mrpull1 Is there any place I can download RHEL 5 RPMS of older versions?  The repos appear to only have the most recent.
20:51 UtahDave mtou_: what are you trying to accomplish? Only see failed states?
20:52 UtahDave mrpull: you might send an email to the mailing list about old RPMs. Our packagers would know about that.
20:52 mtou_ UtahDave: yes
20:53 mtou_ UtahDave: see changed  AND failed states
20:53 mtou_ UtahDave: "no green... only blue and red"
20:53 jcooley joined #salt
20:54 blast_hardcheese whiteinge: ping
20:54 UtahDave Hm. If setting state_verbose: False still shows green states, then that's a bug.  Let me try here real quick
20:54 issackelly joined #salt
20:55 mtou_ in fact, the oher new option "state_output: terse" doesn't work either, I still have the full verbose list
20:56 UtahDave mtou_: I just tested state_verbose: False and it worked for me.
20:56 mtou_ in 0.10.4 (tag in github) ?
20:56 kesor_ joined #salt
20:56 UtahDave 0.10.5
20:57 UtahDave what's the output of  salt --versions-report   ?
20:58 mtou_ #)salt --versions-report
20:58 mtou_ Salt: 0.10.4
20:58 mtou_ Python: 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
20:58 mtou_ Jinja2: 2.6
20:58 mtou_ M2Crypto: 0.21.1
20:58 mtou_ msgpack-python: 0.2.2
20:58 mtou_ msgpack-pure: not installed
20:58 mtou_ pycrypto: 2.6
20:58 mtou_ PyYAML: 3.10
20:58 mtou_ PyZMQ: 2.2.0.1
20:58 mtou_ I'm on debian squeeze
20:58 UtahDave what os?
20:59 UtahDave Hm. Can you upgrade to 0.10.5?
20:59 mtou_ I tried upgrading to 0.10.5 but some states failed with a pkg.version error as in https://github.com/saltstack/salt/issues/2111
21:00 carmony joined #salt
21:01 UtahDave joined #salt
21:01 UtahDave sorry, laptop froze up
21:02 mtou_ in fact, "salt-call grains.items |grep '^os'" gave me the lowercase debian as https://github.com/saltstack/salt/issues/2111#issuecomment-9029016 but with the new osfullname. And it broke all my "{% if grains['os'] == 'Debian' %}" so gave up until next release
21:02 mtou_ ^^when I ran 0.10.5
21:06 mtou_ if it helps, the master and minions are openvz machines, and I get the "dmidecode and pciutils" logging on minions since I didn't install those.
21:06 UtahDave can you test this on the latest git?
21:07 mtou_ develop branch ? already tried 1hour ago, same odd behaviour
21:07 jplewi joined #salt
21:08 UtahDave really? Hm, must be an issue on debian squeeze.  Can you open an issue on Github for this? Be sure to specify your os and salt version.
21:11 whiteinge blast_hardcheese: !
21:11 whiteinge hiya! :)
21:12 blast_hardcheese :)
21:12 blast_hardcheese Just wanted to say great git talks
21:12 blast_hardcheese thanks for those
21:12 blast_hardcheese You might consider putting a link to the vim wikia page that describes how to set up and use your diffconflicts tool in the video notes
21:13 whiteinge ah, cool :)
21:13 whiteinge good suggestion
21:15 whiteinge added :)
21:15 blast_hardcheese Great explanations though; I'm already the git person at work, but seeing you walk through some stuff clarified some stuff I knew intuitively, but hadn't actually solidified
21:16 mtou_ UtahDave: I juste retried develop branch. same behaviour... lowercase os grains. So I can't test state_verbose and state_output
21:28 echohead joined #salt
21:28 UtahDave mtou_: that's really odd.
21:28 mtou_ UtahDave: figured how to finaly make it work (the state_* configuration) in 0.10.4
21:29 mtou_ it is installed from git clone, and launched via supervisor daemon in a virtualenv (don't recall with tutorial I followed)
21:30 echohead hi all.  i'm working on a system where i need ot be able to transfer the responsibilities of a salt-master to a new salt-master, and having all of the existing minions point there.  is there an existing mechanism for this?
21:30 echohead if not, would it make sense to add a module which reconfigures a minion to point to a new master, and bounce the minion?
21:30 mtou_ if I highstate a minion from outside the virtualenv (i.e. I didn't source /srv/virtualenv/bin/activate), state_verbose and state_output don't apply. If I activate the virtualenv, I get the expected behaviour
21:31 UtahDave mtou_: that makes sense. I didn't realize you were using a virtualenv
21:31 mtou_ I didn't recall either. I probably blindly followed a tutorial somewhere and got on with it. I'm not familiar with python
21:31 UtahDave echohead: You could try using the file module to change the hostname or ip of the master in the minion configs and then restart the  minion service.  I haven't tried that myself, so I'd test that first.
21:32 echohead UtahDave: thanks. i'll check that out.  are there any other things i would want to change besides the master ip/hostname and possibly the master pubkey?
21:33 mtou_ UtahDave: thanks for the support on this one
21:34 UtahDave Oh, yeah, you'll have to delete or change the master pubkey. forgot about that.
21:34 UtahDave mtou_: anytime.
21:34 mtou_ UtahDave: I'll investigate the lowercase os grains in >= 0.10.5 when i get some sleep
21:36 UtahDave ok
21:38 __number5__ joined #salt
21:40 mtou_ left #salt
21:59 backseat joined #salt
22:09 eightyeight joined #salt
22:17 eightyeight sorry for the recent noise
22:32 eightyeight joined #salt
22:34 mrpull left #salt
22:37 AndChat|317009 joined #salt
22:38 AndChat-317009 joined #salt
22:47 mage_ joined #salt
22:47 mage_ hello
22:49 mage_ this may be a stupid question (I'm new to Salt), but: is there any documents comparing Salt and Puppet ?
22:51 mage_ also, I'm running FreeBSD, is the support as good as Linux ?
22:54 UtahDave FreeBSD support is pretty great!
22:56 mage_ nice..!
22:58 mage_ if I understood well Salt is a mix between Puppet and Fabric ?
22:58 UtahDave that's true if mixing Puppet and Fabric results in AWESOME!!!    :)  he he
23:00 mage_ it .. should be (:
23:06 UtahDave mage_: We don't have a document comparing Salt and Puppet, per se, but you're encouraged to check out our documentation.
23:06 UtahDave docs.saltstack.org
23:07 mage_ I'm on .. :)
23:21 poli joined #salt
23:29 MK_FG joined #salt
23:30 aranhoide joined #salt
23:35 aranhoide left #salt
23:50 pentabular joined #salt

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