Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-12-17

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

All times shown according to UTC.

Time Nick Message
00:00 forresta you're running the salt master as root right ChrisCook?
00:01 whiteinge ChrisCook: inception!
00:01 frosty996 left #salt
00:01 whiteinge ChrisCook: i don't think that should cause a problem
00:01 whiteinge halite won't work until we can get salt -a working
00:01 ChrisCook yes salt master and halite are running as root
00:02 rojem joined #salt
00:02 whiteinge i take it when you authenticate to unix (without salt) it's going through pam through ldap successfully?
00:03 meteorfox joined #salt
00:05 forresta meteorfox, how'd that go?
00:06 meteorfox forresta: Hey, I think I've narrowed down the salt-cloud's parallel problem to the virtual terminal, originally salt-cloud used the class NonBlockingPopen, but they change to vt. I still don't know exactly where.
00:06 meteorfox forresta: have anybody else complained about parallel not working, since the merge?
00:07 Whissi What do I have to do to access grains from a custom grain? grains/core.py uses "grains.get" but when I do that in my custom grain I'll get an error "global name grains is not defined" but I am not sure if I need to import something...
00:07 forresta meteorfox, not that I've seen.
00:08 forresta whissi, when you write a grain, you're defining the grain info (take a look at the core grains: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py)
00:08 forresta so as far as I'm aware you can't reference a grain in your grain, could be wrong though.
00:09 Whissi forresta: See the _virtual function in core.py
00:09 Whissi In line 527 are grains.get calls
00:10 forresta whissi, oh good point, cool.
00:10 meteorfox forresta: do you know at what time does s0undt3ch usually is on? I think he might know how to help me out.
00:10 Whissi Maybe this call will fail but nobody has reported a bug yet :)
00:11 ChrisCook whiteinge:  ok.. to be sure I just created a local user / local password - same errors
00:11 forresta meteorfox, he's online right now, but it's 1 AM in Spain. I messaged him a few days ago and he never responded, so I have no idea if he's actually around this week.
00:12 schristensen it seems that file.recurse only takes a single value for source:, instead of a list like file.managed: does.
00:12 forresta shcristensen, correct
00:12 meteorfox forresta: ok, especially with the holidays and all. I think I'll open a new issue on github then
00:12 schristensen is there any way to have it behave the same as file.managed, and use a list of sources and use the first one it matches on
00:12 schristensen ?
00:12 forresta meteorfox, sounds good
00:13 meteorfox forresta: got 2 go. Thanks for your help.
00:13 forresta meteorfox, yea np, later.
00:13 zandy joined #salt
00:13 forresta schristensen, I haven't seen someone do that.
00:13 whiteinge ChrisCook: local meaning not going through ldap at all? odd. your external_auth paste from above looks good. what OS are you running and what version of salt?
00:15 ajw0100 joined #salt
00:15 schristensen forresta, I have different files in /etc/skel/ for different hosts, and I'd like to use file.recurse to deploy the entire skel/ dir based on the right match for that host
00:16 schristensen any thoughts on how to do that?
00:16 forresta shcristensen, in that case you'd want to use some kind of jinja matching
00:16 ChrisCook whiteinge:  correct using passwd/shadow for this test user.. debian wheezy , salt 17.2.2
00:17 MTecknology I'm confused. This state always executes, but the state can't be found. It's always worked before...
00:17 forresta schristensen, probably matching against specific grain data.
00:17 MTecknology ChrisCook: For a second I thought I saw KeesCook... I was excited
00:17 schristensen right, I'm already using jinja variables, but was expecting file.recurse to behave the same way as file.managed where I can provide a list of alternatves to try.
00:18 forresta schristensen, yea it doesn't have that support I don't think, I assume you tried it and it failed?
00:18 whiteinge ChrisCook: hm. this isn't a known bug that i'm aware of. will you please start the master in the foreground (salt-master -l debug), try to authenticate (salt -a pam), and pastebin the log?
00:18 schristensen forresta, yes it did.
00:18 forresta lame
00:18 watcher joined #salt
00:19 watcher Greetings!
00:19 watcher I've got a question about watch directives
00:19 watcher what's the behavior of watch when watching two requisites?
00:19 MTecknology HAH!
00:19 watcher does it wait for both I'm assuming?
00:19 MTecknology I had to use /bin/true instead of true
00:20 schristensen - source:
00:20 schristensen - salt://packages/core/files/skel.{{ grains['host'] }}
00:20 schristensen - salt://packages/core/files/skel.{{ grains['server_role'] }}
00:20 schristensen - salt://packages/core/files/skel
00:20 schristensen forresta, this is the pattern I am used to using for other files managed with files.managed, and hoping for file.recurse to do the same
00:21 schristensen but no luck
00:21 forresta ok, so could you base data using if loops in jinja? so {% if grains['server_role'] == 'asdf' }} \n file.recurse1 {% elif grains['server_role'] == 'zxcv' }} \n file.recurse2
00:21 forresta s/}}/%}
00:22 ChrisCook whiteinge:  http://pastebin.com/eP9ZqLSD
00:23 schristensen it wouldn't behave the same unless I can do a file test from jinja to see if $SALT_ROOT/packages/core/files/skel.asf exists and is a directory.
00:23 forresta watcher, based on the details here, it seems to be if either requisite changes then it will do the action: http://docs.saltstack.com/ref/states/ordering.html#the-watch-requisite
00:23 forresta second sentence under the example
00:24 forresta schristensen, gotcha
00:25 jbirdman joined #salt
00:25 forresta schristensen, doesn't seem like there is an issue open to support multiple sources for file.recurse, might be worth opening.
00:25 pass_by_value ChrisCook: I am thinking that there might be an issue where Halite is unable to be imported
00:26 pass_by_value if you start the python interpreter - python
00:26 schristensen forresta, thanks for the help.  yeah, I think I will open an issue about it.
00:26 pass_by_value and then execute - import halite
00:26 pass_by_value that import errors out?
00:26 forresta schristensen, cool, let me know what the issue is so I can keep an eye on it. I don't know if it would really be as simple as supporting multiple sources like in file.managed.
00:28 ChrisCook pass_by_value:  no it imports without complaint
00:29 pass_by_value this might not be related but you also need - max_open_files: 8192
00:30 pass_by_value in the salt master
00:30 Hefeweizen joined #salt
00:30 Jahkeup joined #salt
00:32 TheRealBill_he-1 joined #salt
00:32 quanta_ joined #salt
00:32 zandy joined #salt
00:33 bt joined #salt
00:34 pass_by_value ChrisCook it looks like we also need to have the halite section in the salt master config
00:34 schristensen forresta, Issue #9304
00:35 forresta awesome
00:35 pass_by_value http://pastebin.com/tjQsGNru
00:37 jslatts joined #salt
00:40 ChrisCook pass_by_value:  ok.. but still having the commandline salt -a pam errors
00:40 pass_by_value hmm so halite is starting but you get the -a error?
00:41 namtab joined #salt
00:45 ChrisCook should a user be in both external_auth and client_acl
00:45 forresta ChrisCook, shouldn't need to be.
00:46 pass_by_value my user is just in the external auth
00:46 ChrisCook are there other external_auth modules, then pam
00:48 ChrisCook ha! my auth.log is full of good stuff
00:48 ChrisCook Dec 16 16:47:49 salt1 unix_chkpwd[12709]: check pass; user unknown
00:48 ChrisCook Dec 16 16:47:49 salt1 unix_chkpwd[12709]: password check failed for user (ccooksalttest)
00:48 ChrisCook Dec 16 16:47:49 salt1 python: pam_unix(login:auth): authentication failure; logname= uid=109 euid=109 tty= ruser= rhost=  user=ccooksalttest
00:49 ChrisCook let me dig into the pam configs
00:50 jslatts joined #salt
00:52 cachedout joined #salt
00:52 dvl joined #salt
00:52 forresta guys I've gotta go hit the gym, can you ping me with the solution when you find it pelase?
00:52 forresta *please
00:52 jdenning joined #salt
00:53 pass_by_value sure forresta I will try and send something. If not we can sync up on IRC tomorrow
00:54 JordanRinke_afk anyone have a simple jinja snippet to find the private ip (assume 10.x whatev) of a machine and put it into a variable?
00:55 jfzhu_us Is an sls file run compiled, interpreted, and run on the master or the minion? Based on the docs for state.highstate it would appear that the minion does everything I just mentioned but I wanted to confirm
00:55 JordanRinke On the minion
00:56 JordanRinke I can confirm because I was screwing around with some rendering changes and had to look at the minion log files to see what was blowing up
00:58 JordanRinke jfzhu_us: That was for you, sorry, didn't mean it to blend together with what I was asking
00:59 bemehow joined #salt
01:02 whiteinge ChrisCook: sorry i dropped off; meatspace distractions. not much of interest in the salt logs. glad you found useful stuff in the auth log!
01:02 ChrisCook yeah I've got to head out myself.. I'll dig into pam configs tomorrow.. thanks for the help!
01:04 jfzhu_us JordanRinke: Great. Thanks
01:06 zandy joined #salt
01:08 whiteinge JordanRinke: not exactly what you're asking for but it has similar kind of filtering: http://pastebin.com/XtCKFv3b
01:08 whiteinge in this case it's filtering on the adapter ('Local') instead of the IP
01:08 smccarthy joined #salt
01:09 JordanRinke I did this: http://pastebin.com/1971V95q but it seems... improper
01:10 whiteinge does that work? i don't think the variable assignment will scope outside the for-loop (but i could be wrong)
01:11 JordanRinke I set it to nothing somewhere above it, assuming it will globally scope, I haven't tested it all yet
01:11 whiteinge i don't think that will work because i tried something similar before i resorted to that macro abomination :-P
01:12 whiteinge (though i'd love to be proved wrong :)
01:12 bhosmer joined #salt
01:13 JordanRinke I wrote a bunch of stuff all at once, working through typos and what not right now, should get a good test in a few minutes
01:15 whiteinge you may be beyond the point of this being useful, but just in case (recently added to salt):
01:15 whiteinge https://github.com/saltstack/salt/blob/develop/tests/saltsh.py
01:16 whiteinge that's what i generally use to test weird, random jinja crap :)
01:17 pass_by_value joined #salt
01:19 xmltok_ so, i have been working on being able to include a defaults.json file in my formula that will populate variables for the formula and can be overridden by a pillar with the same name as my formula
01:19 halfss joined #salt
01:20 whiteinge nice!
01:20 whiteinge post the code when you're done, please!
01:21 xmltok_ its more POC code than anything else, but i think it would be ok in a module
01:21 * whiteinge nods
01:22 whiteinge we need that kind of pattern to be more common-place in salt.
01:22 xmltok_ actually let me make it a module, do you know where i can put the module file for a local salt minion install? i tried /srv/salt/_modules
01:22 whiteinge that should work if you've got a local minion daemon running. did you run saltutil.sync_modules?
01:23 xmltok_ no let me try again
01:24 JordanRinke package repos can be defined in state files yeah? I have no idea why I am getting this: Name pkgrepo.managed in sls db.xtradb is not a dictionary
01:25 JordanRinke from http://pastebin.com/1HyW3tMd
01:25 whiteinge JordanRinke: yes. is there a colon after the name?
01:26 quanta_ joined #salt
01:26 whiteinge JordanRinke: is the top of that pastebin cut off? it's missing an id
01:27 JordanRinke bah, result of copy pasta
01:29 JordanRinke I copied the pkgrepo stuff above the id in the middle and was totally overlooking it
01:29 JordanRinke forest for the trees.
01:29 xmltok_ yeah the sync_modules worked, now i need to figure out why its not available and get some naming right, then we should be in business
01:35 JordanRinke wow, I had murdered that file chopping it together
01:36 logix812 joined #salt
01:37 quanta_ joined #salt
01:39 xmltok_ whiteinge: i got something, check this out and give me some feedback. hopefully we can get it integrated upstream if its good.  https://gist.github.com/bigkraig/7998461
01:40 JordanRinke whiteinge: looks like my hopes for a global have been dashed
01:40 whiteinge doh
01:41 whiteinge xmltok_: looking...
01:42 xmltok_ i forgot to add the source pillar in that example
01:43 xmltok_ what i'd really like it to do is source the default pillar from the name of the state file calling defaults.get, but i dont know how to find out what that name is. i tried inspect but the templating engine clouds up the stack
01:45 JordanRinke lol, closer...
01:47 JordanRinke there we go, combine the macro with a little ghetto from before, kinda the same without the filter (since I need to match the first octent specifically)
01:47 fllr joined #salt
01:48 JordanRinke had to one liner it, otherwise the macro produced every space in it: http://pastebin.com/vYgm7HEW
01:51 JordanRinke yey, 0 failed
01:51 whiteinge to cut out the whitespace you have to put dashes in *all* the opening and closing braces  {%- -%}
01:51 KyleG joined #salt
01:51 KyleG joined #salt
01:52 JordanRinke bah, today is not my greatest day
01:54 JordanRinke thx for all the help
01:54 whiteinge np :)
01:56 elfixit joined #salt
01:56 JordanRinke oh salt how I love the...
01:57 pass_by_value left #salt
01:57 JordanRinke reactor on key accept, fires off of name, sets up new node to join xtradb cluster based on fqdn and name.
01:57 whiteinge nice
01:57 * JordanRinke dances a dance of dancing
01:58 rojem joined #salt
01:58 JordanRinke now I just have to setup the config for wan replication/encryption and I can bring up geo-replicated db nodes click click. mmm tasty.
02:00 whiteinge very nice
02:01 rojem joined #salt
02:01 JordanRinke well almost, forgot to mount the mysql data drive, totally just filled my root partition with db hotness :/
02:01 xmltok_ whiteinge: what'd you think of the gist?
02:01 whiteinge (sorry, on the phone)
02:02 quanta_ joined #salt
02:05 ChrisCook joined #salt
02:08 whiteinge xmltok_: great work
02:08 whiteinge simple, good syntax
02:08 xmltok_ i can make it easier, i think
02:10 xmltok_ yeah, i can get the sls name from the stack, so you don't need to pass it in as a parameter. so if i call defaults.get('resolv:options') from my myformula.mystate.sls, it will use the pillar data for myformula:mystate:resolv:options
02:12 whiteinge interesting
02:15 jfzhu_us Is there any way to see how a templated sls will look like before actually running it?
02:15 cro joined #salt
02:18 favadi joined #salt
02:18 xmltok_ yeah, it works
02:18 xmltok_ let me update the gist
02:21 kermit joined #salt
02:21 xmltok_ update https://gist.github.com/bigkraig/7998461
02:22 xmltok_ ill open up a more formal request to get it reviewed/merged tomorrow
02:24 rojem joined #salt
02:24 xl1 joined #salt
02:25 halfss joined #salt
02:25 favadi joined #salt
02:26 rojem joined #salt
02:29 whiteinge jfzhu_us: not exactly. if you run state.show_highstate you can see the *result* of the templating as a data structure but not the yaml
02:29 whiteinge xmltok: awesome!
02:30 sroegner joined #salt
02:32 rgarcia_ joined #salt
02:35 halfss joined #salt
02:37 jfzhu_us whiteinge: Hmm that will make prototyping a little bit difficult, especially considering the weird sytnax of yaml. Is it not possible for all the other rendering options for salt such as python?
02:37 jfzhu_us whiteinge: to see the templated sls i mean
02:38 whiteinge i'm not sure about pydsl but for the others there's only show_highstate/show_sls
02:40 rojem joined #salt
02:41 jfzhu_us whiteinge: Okay thanks. It might turn out that I won't need it at the end of the day
02:41 jimallman joined #salt
02:42 whiteinge i find it doesn't bit me too often. but you're right that yaml's syntax makes templating a bit tricky for some things
02:56 ab138691 joined #salt
02:56 diegows joined #salt
02:57 ab138691 Is it possible to use groups instead of users in client_acl?
03:00 bhosmer joined #salt
03:16 jeter___ joined #salt
03:17 jeter___ has anybody tried to install salt-cloud on CentOS 6
03:18 jeter___ bah! nevermind, http://docs.saltstack.com/topics/cloud/install/index.html should probably be updated
03:19 jeter___ fail = pip install git+https://github.com/saltstack/salt-cloud.git#egg=salt_cloud
03:19 jeter___ success = pip install salt-cloud
03:19 jeter___ atleast for centos 6.5
03:20 higgs001 joined #salt
03:24 davet joined #salt
03:25 capricorn_1 joined #salt
03:31 rgarcia_ joined #salt
03:34 halfss_ joined #salt
03:37 higgs001 joined #salt
03:37 anuvrat joined #salt
03:40 jfzhu_us joined #salt
03:42 psyl0n joined #salt
03:42 jfzhu_us1 joined #salt
03:44 xinkeT joined #salt
04:01 jdenning joined #salt
04:03 cachedout joined #salt
04:41 goodwill joined #salt
04:48 bhosmer joined #salt
04:53 jcsp joined #salt
04:56 ravibhure joined #salt
05:01 Veticus joined #salt
05:01 jslatts joined #salt
05:12 pydanny joined #salt
05:14 ravibhure joined #salt
05:15 forresta Every time I build out a Salt instance for some testing I get excited because it's so easy.
05:22 goodwill joined #salt
05:27 jalbretsen joined #salt
05:31 forresta Is anyone but Corey gonna make it to this? http://cfgmgmtcamp.eu/Salt.html
05:34 halfss__ joined #salt
05:35 forresta Corey, how much did you say you could get tickets for?
05:35 y0j joined #salt
05:42 Ryan_Lane joined #salt
05:49 anuvrat joined #salt
05:56 elithrar joined #salt
06:04 munderwo joined #salt
06:05 troyready joined #salt
06:05 munderwo Hi all, I was wondering if it was possible to serve up files from the master from a web server? so instead of static files at salt:// i could do http://blah.foo?
06:07 munderwo Its mainly because in my particular use case it would be easier to have the configuration files rendered with values from a db in a web-like environment?
06:08 jcristau joined #salt
06:09 malinoff munderwo, http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.managed
06:09 malinoff source arg
06:09 munderwo sweet! I thought that might be the case, but my goggling didn't really sort it out well..
06:10 munderwo hmm.. though it says that the source_hash has to be provided for a http or ftp source?
06:11 Destro joined #salt
06:14 malinoff munderwo, yes
06:14 quanta_ joined #salt
06:15 munderwo hmm… tricky.. I'm guessing the source hash can't be a url?
06:17 malinoff munderwo, source hash is md5sum of a file you want to download
06:18 jdenning joined #salt
06:28 ajw0100 joined #salt
06:34 y0j joined #salt
06:36 djinni` joined #salt
06:37 bhosmer joined #salt
06:38 fllr joined #salt
06:40 _fllr_ joined #salt
06:40 gammalget joined #salt
06:42 druonysus joined #salt
06:42 druonysus joined #salt
06:42 Dennis_ joined #salt
06:45 middleman_ joined #salt
06:49 quanta_ joined #salt
06:56 sroegner joined #salt
06:58 indymike joined #salt
07:01 junedm joined #salt
07:01 junedm left #salt
07:02 bhosmer joined #salt
07:13 ravibhure1 joined #salt
07:24 juasiepo joined #salt
07:27 ConceitedCode joined #salt
07:31 matanya joined #salt
07:39 tzero joined #salt
07:40 fllr joined #salt
07:47 svx joined #salt
07:50 Nexpro joined #salt
07:54 toastedpenguin joined #salt
08:04 sunand joined #salt
08:04 elithrar joined #salt
08:12 harobed joined #salt
08:17 matanya joined #salt
08:22 joelwhitehouse joined #salt
08:25 bhosmer joined #salt
08:32 nocturn joined #salt
08:35 sroegner joined #salt
08:35 elsmorian joined #salt
08:39 giantlock_ joined #salt
08:40 fllr joined #salt
08:43 aleszoulek joined #salt
08:52 balboah joined #salt
09:10 quanta_ joined #salt
09:15 Ryan_Lane joined #salt
09:26 rojem joined #salt
09:30 Blask joined #salt
09:31 Iwirada joined #salt
09:36 Veticus joined #salt
09:40 fllr joined #salt
09:41 sunand joined #salt
09:46 MrTango joined #salt
09:49 JasonG_TA joined #salt
09:50 sroegner joined #salt
09:51 wonhunawks joined #salt
09:51 malinoff Mr Brew, could you please turn off your client, or turn off name switching? Blinking is very annoying
09:52 halfss__ joined #salt
09:53 bezaban it's on a 10 minute idle time too :/
09:55 juasiepo joined #salt
09:56 quanta_ left #salt
10:13 bhosmer joined #salt
10:14 MTecknology joined #salt
10:16 mortis_ help ignore :)
10:16 mortis_ in irssi that is
10:23 dvl joined #salt
10:25 kuL4 joined #salt
10:39 Kraln joined #salt
10:40 fllr joined #salt
10:41 diegows joined #salt
10:43 linjan joined #salt
10:45 psyl0n joined #salt
10:48 mikkn I'm getting this error (only) in my salt master log when trying to use a custom pillar: "Specified ext_pillar interface crt is unavailable"
10:52 mikkn ah, it's burrowed in the debug log: "2013-12-17 11:50:54,439 [salt.loader                                 ][DEBUG   ] Failed to import pillar crt, this is most likely NOT a problem"
11:07 uomobonga joined #salt
11:15 jean-phi1ippe joined #salt
11:21 jean-phi1ippe joined #salt
11:27 N-Mi joined #salt
11:27 N-Mi joined #salt
11:29 elsmorian joined #salt
11:32 carlos joined #salt
11:34 jean-phi1ippe joined #salt
11:38 esogas joined #salt
11:40 fllr joined #salt
11:46 pmrowla joined #salt
11:51 JasonG_TA joined #salt
12:02 bhosmer joined #salt
12:12 xinkeT joined #salt
12:16 bhosmer joined #salt
12:17 sunand hi. i am using salt-ssh to generate ssh keypairs in all the spawns. is there a way to copy all those public keys  to my salt-master?
12:17 _mzito___ joined #salt
12:22 Whissi joined #salt
12:24 Sheco joined #salt
12:33 Iwirada sunand: use ssh_auth (http://docs.saltstack.com/ref/states/all/salt.states.ssh_auth.html#module-salt.states.ssh_auth) and ssh_known_hosts (http://docs.saltstack.com/ref/states/all/salt.states.ssh_known_hosts.html#module-salt.states.ssh_known_hosts) ?
12:35 Iwirada sunand: nah, sorry, forget that.
12:35 Iwirada i missunderstood the question.
12:37 jslatts joined #salt
12:40 fllr joined #salt
12:40 londo_ joined #salt
12:41 sunand Iwirada: is there something like git hooks. where i can write a  script to  parse the response and get what i need?
12:41 _mzito___ joined #salt
12:42 Iwirada there is a APIClient module you can use to execute commands you would type in into your shell, if you mean something like that
12:43 xl1 left #salt
12:44 Iwirada sunand:  https://github.com/saltstack/salt/blob/develop/salt/client/api.py
12:44 Iwirada i've never used it, but heard of it, here, yesterday.
12:47 _mzito___ joined #salt
12:47 sunand okay Iwirada will check that.
12:48 Iwirada anyone has an idea how to manage network interface configurations for debian. i am looking for a workaround for the network state.
12:50 Iwirada ok, the first sentence should end with an '?' ;)
12:52 Nexpro1 joined #salt
12:56 blee joined #salt
12:58 fllr joined #salt
13:00 fllr joined #salt
13:05 Iwirada another question: http://slexy.org/view/s2nXOR6Ove how could i get rid of line 3? Deleting it doesn't seem to work. Replacing it with "    -" seems to work, but looks ugly. I want to get rid of the redundancy.
13:08 Sypher joined #salt
13:11 sunand u can write like pkg:
13:11 sunand and "   - installed"  in the next line
13:13 Whissi Can somebody help? -> http://pastebin.com/raw.php?i=4NWbuFBx ... I don't understand why targeting "roles:test*" works but "roles:bin*" not.
13:13 gadams999 joined #salt
13:14 OrbHacker joined #salt
13:15 mhayden left #salt
13:16 juicer2 joined #salt
13:17 Iwirada Whissi: have you tried to delete the '-' in test-role? maybe this can help narrow down the problem.
13:18 matanya joined #salt
13:19 cowyn joined #salt
13:21 Whissi Iwirada: Mh... I could try but I am planing to use the pillar data as list, e.g. http://pastebin.com/raw.php?i=GMVs5pvr ...
13:23 Iwirada Whissi: just try it once and check whether the '-' is causing the problem. you then might have to adapt the names
13:25 Whissi Iwirada: I changed vm2-example-intern.sls to just "roles: binhost", verfied with salt '*' pillar.items... but salt --pillar 'roles:bin*' test.ping still doesn't find a target.
13:26 Whissi Mh... what's funny: I don't get a response... but when I change the target information, e.g. --pillar 'roles:bi2n*'
13:26 Whissi Then I'll get a message telling me "no minions matched"
13:27 pengunix joined #salt
13:27 Whissi so it seems like it is matching, but why doesn't test.ping has an output?
13:28 Whissi test.ping on the id (salt 'vm2*' test.ping) works.
13:29 Iwirada Whissi: sorry, i got no clue. but shouldn't yaml files be indented by 2 spaces?
13:30 dvl joined #salt
13:30 Iwirada Whissi: http://pastebin.com/raw.php?i=GMVs5pvr only uses 1 space.
13:31 cowyn joined #salt
13:31 drawsmcgraw joined #salt
13:31 Whissi I see... but funny, that this server is working as expected.
13:31 Whissi I added another space, let us see
13:32 Whissi No I am using exactly the same file from vm8 for vm2 (I added another space)
13:33 Whissi I run `salt --pillar 'roles:test*' test.ping` but only vm8 replies... vm2 don't.
13:34 Whissi I added the same file to another server (vm5) and still only vm8 reacts on test.ping.
13:34 sunand can i use grains in salt-ssh?
13:35 sunand using them is giving salt-masters details  :(
13:39 drawsmcgraw Whissi: did you push the new pillar out to vm8 with a `saltutil.refresh_pillar` ?
13:40 Whissi drawsmcgraw: BAM! No, I didn't. Now I get a response from vm2...
13:40 Whissi Thanks!
13:41 drawsmcgraw Whissi: sure thing. I've lost a lot of time with that exact issue :)
13:42 Whissi Funny that pillar.items does show the new pillar but you still need to refresh :>
13:42 drawsmcgraw Well that's just wierd...
13:44 jslatts joined #salt
13:44 Sheco joined #salt
13:46 foxx joined #salt
13:46 ipmb joined #salt
13:53 backjlack joined #salt
13:58 svx joined #salt
13:59 mgw joined #salt
14:02 [diecast] joined #salt
14:05 brianhicks joined #salt
14:05 JasonG_TA joined #salt
14:07 oz_akan_ joined #salt
14:09 Gifflen joined #salt
14:11 juicer2 joined #salt
14:13 Tekni joined #salt
14:14 mpanetta joined #salt
14:14 goodwill joined #salt
14:15 danielbachhuber joined #salt
14:19 Gifflen joined #salt
14:24 racooper joined #salt
14:26 JasonSwindle joined #salt
14:26 kuL4 guys I'm on Debian wheezy (I'm fresh into salt) and trying to use augeas (already saw http://docs.saltstack.com/ref/states/all/salt.states.augeas.html) but salt (masterless mode) is shouting: 'State augeas.setvalue found in sls spamassassin is unavailable' and idead what should I check now?
14:26 matanya joined #salt
14:33 blee joined #salt
14:33 tdilly joined #salt
14:34 tdilly Is the saltstack website down? I haven't been able to reach it since last night
14:34 th3reverend joined #salt
14:34 kuL4 tdilly: http://docs.saltstack.com is working for me
14:34 foxx http://www.downforeveryoneorjustme.com/http://www.saltstack.com/
14:34 foxx It's just you. http://www.saltstack.com is up.
14:35 tdilly Yeah I was trying to reach "http://www.saltstack.com/"
14:35 tdilly I've tried from 2 different internet connections on 2 different machines, simply by clikcing on the link from google
14:35 tdilly but I can reach the docs so its no big deal
14:35 JasonSwindle tdilly:  What does a trace route show?
14:36 JasonSwindle That is pretty odd to not be able to reach it
14:36 tdilly Aw no it loaded and made a liar out of me :)
14:36 wkf joined #salt
14:37 tdilly If it happens again on a "real" machine I'll try traceroute, I'm on a chromebook at the moment
14:37 JasonSwindle Hmm, ok.  Ok. :)
14:40 mgw joined #salt
14:40 th3reverend left #salt
14:44 elsmorian I'm trying to use the django module to run collectstatic using the module state, is there any more documentation about what "env", "bin_env" are? I'm running django in a virtualenv, and have tried pointing these kwargs at the virtualenv location, but it can't find things that are installed in the virtualenv at the moment..
14:44 xinkeT joined #salt
14:44 pass_by_value joined #salt
14:51 minaguib joined #salt
14:52 elsmorian are the env and bin_env arguments supposed to let the module activate the virtualenv before running?
14:54 drawsmcgraw kuL4: Did you install the python augeas module?
14:55 drawsmcgraw possibly an `apt-get install python-augeas' ?
14:56 shadowfax|chc joined #salt
14:59 AdamSewell joined #salt
14:59 AdamSewell joined #salt
15:01 Ryan_Lane joined #salt
15:04 jasg75 joined #salt
15:04 JasonG_TA joined #salt
15:04 Veticus joined #salt
15:06 aaaaa joined #salt
15:09 smurray joined #salt
15:10 fishpen0 joined #salt
15:10 smurray Just fired up a salt environment for testing on my new work machine (using virtualenv), but I'm seeing exceptions on every Salt invocation (salt or salt-key in this case)
15:10 smurray Exception AttributeError: "'list' object has no attribute 'keys'" in....
15:10 smurray same error with different object each time
15:11 smurray example: http://pastebin.com/DFdJR3iJ
15:12 Iwirada anyone ever tried out the iptables state?
15:13 Iwirada i get the following for salt-call: http://slexy.org/view/s20OygeU2y what concerns me is line 109: where does this --__env__ and --__sls__ come from?
15:13 kuL4 drawsmcgraw: yes I did
15:14 drawsmcgraw kuL4: And you tried the troubleshooting technique mentioned?
15:14 drawsmcgraw salt minion-id cmd.run 'python -c "from augeas import Augeas"'
15:15 kuL4 drawsmcgraw: yep but it's complainign that no master present as I'm running masterless and I'm not familiar yet with salt internals
15:18 oz_akan_ joined #salt
15:19 jdenning joined #salt
15:21 drawsmcgraw kuL4:
15:21 drawsmcgraw Oh!
15:21 drawsmcgraw well, just run
15:21 drawsmcgraw python -c "from augeas import Augeas"     on the minion
15:21 drawsmcgraw That salt command just runs a command on the box
15:23 rojem joined #salt
15:30 elsmorian Now I'm trying to do salt-call django.collectstatic on the cmd line
15:30 elsmorian but I don't understand how to get salt to run that within my virtual env?
15:30 elsmorian I can set the settings module, and the bin_env to find the django-admin inside the virtual env
15:31 elsmorian but It complains it can't find modules that i have pip installed into the venv, and know they are there
15:33 forresta joined #salt
15:34 jbub hey, i have this strange problem on ubuntu 12.04, im running salt-minion 0.16.0-1733 and want to upgrade to 0.17.2 from the ppa, so ive added the salt ppa and i am installing it like "apt-get install salt-minion" and during the installation it is even saying "Unpacking salt-minion (from .../salt-minion_0.17.2-2precise1_all.deb) ...", but when i check the version it is still saying "0.16.0-1733", ive tried purging it, n othing helps, when i try it
15:34 jbub in fresh vm it works nicely
15:35 jbub any help greatly appreciated
15:38 bhosmer_ joined #salt
15:39 elfixit joined #salt
15:40 kuL4 drawsmcgraw: python -c "from augeas import Augeas" exits with 0 so looks ok
15:40 cachedout joined #salt
15:40 OrbHacker <jbub> did you try a test of installing package local first?
15:41 fxhp http://russell.ballestrini.net/sensu-salt/
15:41 Marion_ joined #salt
15:42 jbub OrbHacker: im installing it directly on the server, i may have misunderstood the "package local" meaning
15:42 fxhp ^ showed how I create sensu test environments with salt-stack and salt-cloud
15:44 OrbHacker <jbub> apt-get install -f (i think?)  -- localinstall
15:44 quickdry21 joined #salt
15:45 jbub OrbHacker: ah i see, im going to try that, thanks
15:45 jergerber joined #salt
15:45 j___ joined #salt
15:45 OrbHacker i use RHEL, and we use yum, and I would first have the RPM local and then call it like this: yum localinstall ./rpm-pkg
15:46 OrbHacker that will take some variables out of the mix for you and we can go from there...
15:48 davet joined #salt
15:50 dvl joined #salt
15:50 mgw joined #salt
15:52 drawsmcgraw kuL4: I got nothing at this point, then. If you can successfully import the Augeas package in Python, and Salt is still reporting it as unavailable, I'm at a loss :/
15:53 mpanetta joined #salt
15:53 cdk I'm trying to use the file.replace state to replace the pattern "localhost" in a config file with an IP that I obtain using grains['ipv4'][0]. I have file.replace: -pattern: localhost -repl: "{{ grains['ipv4'][0] }}" but this just replaces localhost with my IP address unquoted. I need it to be quoted. Is there a way to do this?
15:55 fllr joined #salt
15:55 scoates cdk: try this? -repl: '"{{ grains['ipv4'][0] }}"'
15:55 tyler-baker joined #salt
15:56 cdk Also, is it possible to modify file permissions without overwriting the file? If I use file.managed on a file that already exists (has previously been managed using file.recurse) I end up overwriting it with an empty file
15:56 scoates this is hinted at here: http://docs.saltstack.com/topics/troubleshooting/yaml_idiosyncrasies.html
15:56 kuL4 drawsmcgraw: thx for trying anyway :-)
15:56 cdk scoates: I'll try that, thanks
15:58 scoates cdk: you might be able to specify `- source: None` to change the file mode without altering the contents. the doc is ambiguous. (see salt.states.file.managed here: http://docs.saltstack.com/ref/states/all/salt.states.file.html )
16:00 andrewclegg joined #salt
16:00 scoates s/file mode/permissions/
16:01 andrewclegg does anyone know how I can write a message back to the master, from an sls file?
16:01 alunduil joined #salt
16:01 smccarthy joined #salt
16:01 andrewclegg i.e. to display on the command line when that state is applied
16:02 kaptk2 joined #salt
16:03 cdk scoates: source: None doesnt work: Unable to determine upstream hash of source file None
16:04 Veticus joined #salt
16:04 scoates cdk: I just read a bit further; try setting `replace: False` ?
16:07 cdk scoates: ahh, I think that should do it. I really should have found that myself. Thanks for the help :)
16:07 scoates sure
16:08 ckao joined #salt
16:09 kermit joined #salt
16:09 hunternet93 joined #salt
16:10 kermit joined #salt
16:11 meteorfox joined #salt
16:13 hunternet93 I'm using the Python Salt API, and I need a way to list all minions (and unaccepted keys) associated with a master. I'm guessing I need to use the Runner module, but I can't figure out how to initialize it, it requires an 'opts' argument that isn't mentioned in the documentation. What do I need to put in the 'opts' variable?
16:13 hunternet93 Reference: http://docs.saltstack.com/ref/clients/index.html#runnerclient
16:16 jalbretsen joined #salt
16:16 hunternet93 Time to hit the source, I guess...
16:16 rojem joined #salt
16:20 psyl0n joined #salt
16:25 forresta hunternet93, when you figure it out, can you make a pull request with an example for the docs? Or at least an issue stating that there needs to be more examples, as well as yours?
16:26 hunternet93 forresta: I'll open an issue, I still haven't figured it out yet though.
16:26 hunternet93 Is there a way to use external_auth with wheel or runner modules?
16:26 forresta yea I just mean when you figure it out if you can throw your example in the issue that would be great.
16:26 higgs001 joined #salt
16:26 forresta hunternet93, I have no idea.
16:27 forresta To allow access to wheel modules or runner modules the following @ syntax must be used:
16:27 forresta second example down on http://docs.saltstack.com/topics/eauth/index.html
16:27 juicer2 joined #salt
16:28 Nexpro joined #salt
16:28 vejdmn joined #salt
16:30 davet joined #salt
16:30 rojem joined #salt
16:42 j___ how do i bootstrap salt onto the box during the salt-cloud deploy? I know you can set the script in the profile but I do need to provide that script or what, any example or link would be super helpful
16:44 sunand is there a  way i can use grains in salt-ssh?
16:48 joehoyle joined #salt
16:48 mgw joined #salt
16:49 PoLuX joined #salt
16:50 abe_music joined #salt
16:52 joehoyle am I the only one that wants an "ls" module: salt \* ls "/var/www" !
16:55 meteorfox joined #salt
16:56 or1gb1u3 joined #salt
16:58 forresta joehoyle, what's wrong with cmd.run?
16:58 meteorfox hi, i have a question regarding the reactor system. Can I execute commands in the master triggered by an event? For example, I'm using salt cloud, I want minions to tell the master (through an event) to delete them. Then the master executes "salt-cloud <instance-name> -d -y"
16:58 toastedpenguin joined #salt
16:59 JasonG_TA joined #salt
16:59 scoates joehoyle: put in _modules/ls.py ; http://paste.roguecoders.com/p/1ad29fed8e4235aae2a9716dd7b3153e.txt
16:59 scoates (security risk)
17:00 joehoyle wowza, cool!
17:00 joehoyle forresta: mainly I am lazy
17:00 forresta joehoyle, fair enough
17:01 scoates -> http://paste.roguecoders.com/p/0f571642e638f1c8043af5a6084b87a0.txt
17:03 drawsmcgraw j___: In my experience, salt-cloud automatically attempts to bootstrap the newly-minted VM
17:03 forresta meteorfox, I don't know if you can interface with salt-coud directly for reactor stuff, never tried it. I guess you could use the cmd.cmd.run example here; http://docs.saltstack.com/topics/reactor/index.html#understanding-the-structure-of-reactor-formulas
17:03 avienu joined #salt
17:03 drawsmcgraw You have to explicitly say something like `--no-install` or something like that to make it *not* attempt to bootstrap
17:03 forresta and target the master server to run the command perhaps?
17:04 [diecast] joined #salt
17:04 meteorfox forresta: I see. makes sense, this is a dumb question but how do you target the master?
17:04 j___ drawsmcgraw: i've seen 2 examples in profiles, script: bootstrap-salt-minion and script: RHEL6
17:05 forresta is your master not also a minion meteorfox?
17:05 meteorfox forresta: no
17:05 j___ but if i dont need to include those, ill remove them
17:05 forresta if it isn't, I'm not quite sure if it's possible to pass a command to salt-call --local instead :\
17:05 forresta just haven't touched reactor too much
17:06 forresta there's an example a bit further down that page meteorfox
17:06 forresta he following example uses Salt's Reactor to listen for the event that is fired when the key for a new minion is accepted on the master using salt-key.
17:07 forresta looks like there they use salt-key, could you try something similar maybe but use salt/cloud?
17:08 forresta docs.saltstack.com/topics/reactor/index.html#understanding-the-structure-of-reactor-formulas
17:08 forresta that also has a reactor that uses salt cloud meteorfox, looks like it uses a state
17:09 meteorfox forresta: ok. But it seems it stills runs the state and the commands on the minions and not on the master.
17:09 forresta agreed
17:10 meteorfox forresta: what about the cloud module? I can't seem to get it working, but it looks promising
17:11 forresta still the issue there of how do you pass the command locally
17:11 forresta unless you plan on passing the target data through
17:11 KyleG joined #salt
17:11 KyleG joined #salt
17:11 troyready joined #salt
17:11 bhosmer joined #salt
17:12 forresta meteorfox, I've created https://github.com/saltstack/salt/issues/9319 for some additional details
17:12 xinkeT joined #salt
17:12 forresta hopefully the docs will get updated.
17:13 meteorfox forresta: awesome, thanks. I think I'm going to add the master as minion
17:13 forresta Man I need to try and get through some of these documentation tickets, shit is piling up...
17:13 forresta meteorfox, ok cool, I know it's not the best workaround, but it's the fastest way I can think to do it.
17:13 mpanetta forresta: You are just too busy helping people :P
17:13 forresta mpanetta, lol, I wish
17:13 forresta this 'work' thing
17:13 drawsmcgraw j___: Yeah I've never touched any of the scripts that it ships with. I just specify name and ssh-key for the profile I make, and salt-cloud uses that to SSH to the box to bootstrap it.
17:14 forresta getting in the way of doing what I want *shakes fist*
17:14 meteorfox forresta: yeah. you know this kind of functionality, can be very useful for using the master to scale out and scale in your instances. ;)
17:14 forresta meteorfox, yea
17:14 ChrisCook joined #salt
17:14 forresta ChrisCook, any luck with a fresh set of eyes this morning on your issue from last night?
17:14 mpanetta forresta: Oh man, I know how that goes
17:16 Iwirada left #salt
17:26 bhosmer_ joined #salt
17:28 hunternet93 forresta: After more digging, looks like there's completely new Python API. I'll figure it out and maybe write some docs for it.
17:28 forresta hunternet93? A new one?
17:29 forresta https://github.com/saltstack/salt-api is still the standard I thought, it's being actively developed
17:29 hunternet93 forresta: Yep, one that combines the salt, wheel, and runner modules. It was included in the Debian package as salt.client.api.APIObject.
17:30 forresta ahh ok
17:30 hunternet93 forresta: Not sure if it's actually new, but it's a lot more featureful and better-writter than the other one.
17:32 forresta fair enough
17:32 sgviking joined #salt
17:36 drawsmcgraw hunternet93: I don't even see that on Github(?)
17:36 diegows joined #salt
17:36 drawsmcgraw am I looking in the wrong place?
17:37 drawsmcgraw Do you mean salt.client.APIClient?
17:38 davet joined #salt
17:39 bhosmer joined #salt
17:40 hunternet93 drawsmcgraw: It might've been moved? It's in the file salt/client/api.py
17:40 cbloss joined #salt
17:40 hunternet93 drawsmcgraw: It's not imported by salt.client so you have to import salt.client.api
17:42 xinkeT joined #salt
17:42 dstanek joined #salt
17:42 backjlack joined #salt
17:43 hunternet93 drawsmcgraw: Also, that was supposed to be salt.client.api.APIClient, sorry.
17:45 jdenning joined #salt
17:45 th3reverend joined #salt
17:49 cdcalef joined #salt
17:51 jimallman joined #salt
17:53 JordanRinke joined #salt
17:55 jcsp joined #salt
17:55 abe_music joined #salt
17:56 ChrisCook1 joined #salt
17:57 cbloss joined #salt
17:58 simonmcc joined #salt
17:59 simonmcc joined #salt
17:59 jslatts joined #salt
17:59 Hefeweizen just glancing at cloud providers.  Are there APIs for local providers (i.e. virtualbox/vmware fusion)?
18:00 whiteinge hunternet93: the new salt.client.api.APIClient() is intended to be a unification of Salt's Python API
18:00 jcockhren Nazca__: concerning your bot (and others leveraging salt), have any ideas for event listeners?
18:00 whiteinge salt-api (the project) will switch to using it once salt-api is merged into salt-core
18:01 amckinley joined #salt
18:02 whiteinge "API" is a slightly overloaded term in salt at the moment :-P
18:02 th3reverend left #salt
18:03 whiteinge hunternet93: did you figure out how to get key management working via the python api?
18:03 jcockhren having an interactive interface for salt is awesome. but I think we all would have great benefit from it if the bots could notify us on events, watch for minion state changes etc
18:03 hunternet93 whiteinge: Not yet, I'm trying to use wheel modules but when i run one i just get the JID, no return values
18:03 scoates is there documentation on using logging within salt modules?
18:04 hunternet93 whiteinge: How do I get the return values of a JID? I tried the runner.jobs.* commands, but I just get another job ID.
18:04 whiteinge hunternet93: that is a bug in the current salt release. it's been fixed in develop and will be out in 0.17.5
18:04 xinkeT joined #salt
18:05 shinylasers joined #salt
18:05 ChrisCook joined #salt
18:05 whiteinge hunternet93: JIDs that are created via the wheel functions are not (currently) persisted to disk
18:06 hunternet93 whiteinge: Time to hit the development branch, then :D. It devel stable enough to use?
18:06 jcockhren Nazca__: I'm currently trying to iron out the difficulties. And so far, I think that there's a polling method and a webservice creation method
18:06 shinylasers joined #salt
18:06 jcockhren 1. polling: we could tell the bot to run a command every x min
18:07 whiteinge hunternet93: i wouldn't run it in production without thoroughly vetting a given SHA first. the salt team reserves the right to break develop...
18:07 cdcalef joined #salt
18:07 jcockhren 2. webservice: for it's listeners, tell the bot to create a web accessible interface then we add hooks to handle the various input forms
18:08 whiteinge hunternet93: hit me up if you have any Qs. i work with the python api frequently
18:08 hunternet93 whiteinge: I'm in semi-production now, I only have a few clients that need basic states and the occasional command.
18:09 jcockhren Nazca__: there's actually a #3 as well. it's via the logs or returners
18:09 hunternet93 whiteinge: I'm working on a simple web interface right now using web.py and jquery mobile so i might end up needing advice
18:09 whiteinge neat!
18:10 jcockhren Nazca__: usually bots can be set to watch for text that come over a stream. like commands. But in this case, we can have the bot tail logs and parse then react
18:11 hunternet93 whiteinge: I liked Halite, but it's a bit complex for the uninitiated. The app I'm making will let users run commands to control some web kiosks I'm working on.
18:12 rojem joined #salt
18:12 shinylasers joined #salt
18:13 rojem joined #salt
18:13 shinylasers joined #salt
18:14 rojem joined #salt
18:17 robawt lol @ whiteinge & breaking develop
18:17 robawt keeping it real good Sir
18:17 hunternet93 whiteinge: devel works great! writing over the debian package's install was probably a bad idea, but i got to keep the init script!
18:18 whiteinge hunternet93: sounds cool. will it be on github?
18:18 whiteinge ah, nice. glad you got it
18:18 * whiteinge avoid eye-contact with robawt in shame
18:18 hunternet93 whiteinge: probably, although my git experience doesn't got far past "git clone blah"...
18:19 robawt no shame, all love whiteinge
18:19 * whiteinge then chest-bumps robawt because he's awesome (while still avoiding eye contact)
18:19 robawt don't be mad if i mumble about chef :D
18:19 robawt we're still a salt house
18:19 whiteinge :)
18:20 whiteinge it was a fair point for sure
18:20 robawt just release a LTS and quit teasing us
18:20 robawt :D
18:20 robawt i'll buy you a beer if you do!
18:21 gadams9991 joined #salt
18:21 jcockhren a salt LTS is an AWESOME idea
18:21 jcockhren robawt is smartz
18:21 robawt jcockhren: not smart.  I'm just annoying
18:22 rgbkrk joined #salt
18:23 JordanRinke Morning
18:25 bemehow joined #salt
18:25 jkleckner joined #salt
18:25 pmrowla joined #salt
18:26 shinylasers joined #salt
18:27 * whiteinge waves
18:27 shinylasers joined #salt
18:28 gadams999 joined #salt
18:28 shinylasers joined #salt
18:28 jkleckner joined #salt
18:28 gadams9991 joined #salt
18:28 shinylasers joined #salt
18:29 Corey whiteinge: Helo.
18:29 hunternet93 Does salt devel have a way to use PAM and/or LDAP groups with external_auth?
18:29 shinylasers joined #salt
18:30 shinylasers joined #salt
18:30 Corey hunternet93: To do what, exactly?
18:30 UtahDave joined #salt
18:31 shinylasers joined #salt
18:32 xmltok joined #salt
18:32 hunternet93 Corey: So I can add new users by putting them in a group instead of editing salt's master config
18:32 jkleckner joined #salt
18:32 Vye joined #salt
18:32 shinylasers joined #salt
18:32 Corey hunternet93: Generally you either provision local users, or you set a system up to query ldap or similar. Are you doing somet third option?
18:33 faust joined #salt
18:33 shinylasers joined #salt
18:33 hunternet93 Corey: In my case, so if I need to give a new admin Salt access I can just add them to a group. I'm using external_auth with PAM, but as far as i can tell I can only allow singe users
18:33 forresta Hey Corey, did you see my message last night?
18:33 Corey forresta: I did not.
18:33 jkleckner joined #salt
18:33 forresta how much can you get those tickets to brussels for? You said you had 8 spots right?
18:34 cbloss joined #salt
18:35 Corey forresta: Haven't checked yet; I get no price breaks. :-) united.com has the pricing, I just get perks like "early boarding" and "Free upgrade to Economy Plus"
18:35 forresta ahh ok
18:35 elsmorian joined #salt
18:37 gadams9991 Howdy all. Does anyone have knowledge of the -P flag for salt-cloud (dev branch)? When trying to deploy all the ssh commands for installing the minion are failing. Regular sequnetial deployment works fine
18:37 forresta gadams9991, glad to see a second occurrence of this.
18:37 forresta gadams9991, https://github.com/saltstack/salt/issues/9318
18:38 forresta If you can comment on that with the details s0undt3ch is asking for, that would greatly help to have a second instance of the issue.
18:38 gadams9991 forresta: oh snap, talk about timing
18:38 gadams9991 will do
18:38 forresta we've actually been troubleshooting that since yesterday :\
18:39 forresta why didn't you have this problem yesterday, jeez!
18:39 gadams9991 I did. but 9 times out of 10 it's an id10t error message
18:40 jcsp joined #salt
18:43 [diecast] joined #salt
18:44 lluad joined #salt
18:45 forresta heh
18:46 mpanetta Quick question... Will salt ever support shell style globs such as 'web{1,2}a' ?
18:46 forresta It would be cool if this was resolved.
18:47 jcockhren mpanetta: that would be nice
18:47 forresta mpanetta, when they are in order, you can use 'web[1-2]a' I believe
18:47 mpanetta forresta: But no gaps?
18:47 forresta I don't know I've never tried it
18:48 forresta the examples don't show any gaps
18:48 mpanetta Well, I am about to ;)
18:48 forresta Cool, let me know
18:49 mpanetta hmm
18:49 mpanetta Is that an 0.17 thing?
18:49 mpanetta https://gist.github.com/anonymous/287ce4c877b42178a3cb
18:49 forresta if it is then the docs need to be updated to say so!
18:49 mpanetta Says could not find minions
18:49 mpanetta oops
18:50 mpanetta I left out a character heh
18:50 Corey mpanetta: Try it with double quotes instead of single quotes.
18:50 mpanetta Ok so sequential works
18:50 Corey mpanetta: With single quotes?
18:50 mpanetta Corey: and let the shell handle it?
18:50 mpanetta Corey: yes
18:50 Corey Hmm. I guess that does make sense now that I think about it...
18:51 Corey Yeah, disregard me. :-)
18:51 forresta interesting naming scheme you have there mpanetta
18:51 forresta though I like the use of dashes instead of dots
18:52 mpanetta forresta: Thanks :)  It encodes quite a bit of info in to a small space...
18:52 forresta web1-ControlQualityProcedure-HongKonG ?
18:52 mpanetta We were limited by windows in naming choices...
18:52 forresta :P
18:52 mpanetta lol
18:52 forresta yea of course.
18:53 mpanetta it is function-productenv-location
18:53 forresta ehh was kind of close :P
18:53 mpanetta :)
18:53 forresta did it work with [1,3]?
18:54 mpanetta not tried that yet.
18:55 mpanetta [1,2] works
18:55 jcsp joined #salt
18:55 forresta what happens if you skip?
18:55 mpanetta It works as well
18:55 forresta sweet
18:55 mpanetta Quite :)
18:55 forresta you gonna make a pull request to update it or should I?
18:55 mpanetta Hmm?
18:55 smccarthy2 joined #salt
18:55 forresta to update the docs
18:56 mpanetta Oh I don't have a fork yet
18:56 mpanetta Could you please?
18:56 forresta jeez such a slacker..
18:56 forresta Yea I'll make an issue and email myself on it.
18:56 mpanetta ;)
18:56 forresta otherwise I'll forget by the time I get home
18:56 pydanny joined #salt
18:56 mpanetta I'm in devops, isn't the point to be creative in slack? :P
18:57 forresta heh
18:57 KyleG I think the point is to work smarter not harder.
18:57 pydanny left #salt
18:58 mpanetta KyleG: exactly
18:59 forresta btw mpanetta, according to the docs the globbing just uses http://docs.python.org/2/library/fnmatch.html#fnmatch
19:00 mpanetta forresta: Thank you!
19:00 forresta yea np
19:00 rgbkrk joined #salt
19:01 forresta mpanetta, https://github.com/saltstack/salt/issues/9322 in the event you beat me to it before I make it home
19:02 mpanetta forresta: Ok :)
19:05 colinbits joined #salt
19:07 druonysus joined #salt
19:07 cdn_1 joined #salt
19:07 cdn_1 HI all, is it possible to run a state and set a grain value before it runs
19:07 JasonSwindle joined #salt
19:07 hunternet93 whiteinge: After getting a token using create_token(), I get the error "TokenAuthenticationError: Exception occurred when generating auth token: 'dict' object has no attribute 'startswith'" when passing the token object to run()'s dict. Am I doing something wrong?
19:09 hunternet93 cdn_1: Do you mean set the grain from the state?
19:09 cdn_1 Well I wanted to have 1 state defined but have it manipulated via a grain.  As the server could potentially be used for different purposes
19:10 cdn_1 Now that I say that out loud :) I may have to define multiple states for the Java Application Server I was trying to deploy.
19:10 cdn_1 versus just one state for the server?
19:11 forresta cdn_1, you should make things as modular as possible
19:11 elithrar joined #salt
19:12 seanz joined #salt
19:12 whiteinge hunternet93: you need to pull the token itself out of the return from create_token(). it should be a single string in the dictionary you pass to run()
19:12 kaoskitn joined #salt
19:12 seanz Greetings. Is there a known way to rsync a directory with salt other than cmd.{wait,watch} or a variant therein?
19:12 seanz whiteinge: Greetings!
19:13 whiteinge seanz!
19:13 seanz whiteinge: Happy holidays.
19:13 hunternet93 whiteinge: Ah, that makes sense.
19:13 kaoskitn HIya. I also have a question.
19:14 forresta seanz, http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.recurse won't do it for you?
19:14 kaoskitn noticing some mesage format changes since moving to 0.17.4 from 0.16.4.   Is there a changelog somewhere?  I looked in the obvious places (to me anyway) and can't find it.
19:14 forresta kaoskitn, http://docs.saltstack.com/topics/releases/0.17.4.html
19:14 forresta there are the release notes
19:15 bhosmer_ joined #salt
19:15 seanz forresta: That requires the directory to be on the master. I am populating a directory with contents on a minion and would like to copy that content somewhere else on the same minion.
19:15 forresta oh I see.
19:15 whiteinge kaoskitn: if it's not in the release notes it's a regression. will you file a bug?
19:15 whiteinge seanz: other than shelling out to rsync, no. not until this goes in: https://github.com/saltstack/salt/pull/9306
19:15 seanz forresta: I wouldn't do it this way except this is the first viable way I've found. I'm setting up a local maven repository.
19:16 forresta ahh maven
19:16 seanz whiteinge: Ah - that would do it. :)
19:16 carlos_ joined #salt
19:17 kaoskitn whiteinge:  I'll investigate further to make sure it IS a bug, and yes, I'll file one.
19:17 elithrar joined #salt
19:19 colinbits joined #salt
19:21 psyl0n joined #salt
19:24 hunternet93 whiteinge: How do I get the output of a runner module? I'm still just getting a job ID, even though I set mode to sync.
19:24 whiteinge i thought runners were working. sec, testing...
19:25 carlos joined #salt
19:26 hunternet93 whiteinge: The command I'm using is: (my APIClient object).run({'mode': 'sync', 'fun': 'runner.manage.present', 'token': user.token})
19:27 pmrowla left #salt
19:27 cdn_1 Odd question :)  If say I have an application to configure/install like apache but I have 2 different ways i'd want it configured and wanted to control when it was in ScenarioA or ScenarioB, what would be the best way to do this?
19:27 mr_chris joined #salt
19:27 hunternet93 cdn_1: Grains would be the best way to do that
19:27 xinkeT joined #salt
19:28 cdn_1 can I dynamically set the grain, or how should the grain be set to toggle back n forth
19:29 hunternet93 cdn_1: you can set grains from the salt command, from a state, or by editing the minion's /etc/salt/minion file: http://docs.saltstack.com/topics/targeting/grains.html
19:30 cdn_1 OK, so I can set a grain from command line and then call the salt state in question I guess?
19:31 hunternet93 cdn_1: yep
19:32 whiteinge hunternet93: i can reproduce. investigating...
19:33 hunternet93 whiteinge: looks like runner_sync is just a reference to runner_async
19:33 whiteinge cdn_1: grains will work fine, just as hunternet93 explained. pillar will also work and allows for more dynamic use
19:34 cdn_1 if I set a grain via the grains.setval, I assume it is lost when the minion restarts?
19:34 whiteinge no, it persists in /etc/salt/grains
19:34 cdn_1 ahh. thanks hunter93.whiteinge
19:34 cdn_1 ahh ok
19:38 cdn_1 Is there a way to get a value from a pillar (i.e.  pillar.get () ....) from a value returned from a grain?
19:39 hunternet93 cdn_1: Do you mean use pillar to get a grain?
19:40 whiteinge {{ salt['pillar.get'](salt['grains.get']('name:of:grain')) }}
19:42 hunternet93 whiteinge: looks like you could use runnerClient.cmd instead of runnerClient.master_call
19:43 hunternet93 i'll try it out
19:44 whiteinge hunternet93: if your web.py app is running directly on the master you may want to use the *Client() interfaces to salt instead of APICLient()
19:44 whiteinge http://docs.saltstack.com/ref/clients/index.html
19:44 cdn_1 Can I call that within a {% %} block of the sls definition
19:44 whiteinge er. running on the master *as root*, i mean
19:45 whiteinge cdn_1: no, it needs to be in {{ }}
19:45 hunternet93 whiteinge: I'm trying to avoid running as root for security reasons
19:45 * whiteinge nods
19:45 hunternet93 whiteinge: changing master_call to cmd made no difference
19:46 whiteinge cdn_1: sorry, yes you can. {% if salt['pillar.get']('some:boolean:here') %}{% endif %} will work
19:46 hunternet93 whiteinge: actually, i forgot to delete the .pyc, just a sec
19:47 hunternet93 whiteinge: still no change. odd.
19:50 hunternet93 whiteinge: are there any docs on the salt events? it looks like i can use get_event to wait for the command to return
19:51 whiteinge no there aren't yet
19:51 whiteinge well, they're minimal anyway: http://docs.saltstack.com/topics/event/index.html
19:53 vipul-away joined #salt
19:53 whiteinge hunternet93: when you use RunnerClient() directly do you get a JID back or something else?
19:54 hunternet93 whiteinge: i haven't tried, i had trouble initializing the object. it wanted an undocumented "opts" argument
19:55 hunternet93 whiteinge: after using get_event, i got: {'fun': 'runner.manage.present', 'jid': '20131217135233551402', 'user': 'foo', '_stamp': '2013-12-17_13:52:33.562476'}
19:56 whiteinge opts = salt.config.client_config('/etc/salt/master')
19:57 hunternet93 whiteinge: Ah. Well, I'd still like to use the new API if possible.
19:57 * whiteinge nods
19:57 whiteinge i'm still code-diving there
20:00 whiskybar joined #salt
20:03 dvl joined #salt
20:05 NV joined #salt
20:09 frosty996 joined #salt
20:22 jperras joined #salt
20:32 elsmorian joined #salt
20:36 isomorphic joined #salt
20:37 hunternet93 whiteinge: looks like the second event with the tag returned contains the job's return values
20:38 hunternet93 whiteinge: I'll use an ugly hack for now, but want me to open an issue?
20:40 whiteinge hunternet93: yes, please!
20:40 whiteinge i see where the error is and i'm working on a fix
20:41 whiteinge the person who changed the way runners are executed is *only* using the event stream so he didn't realize he broke it from the python-level
20:41 forresta Is anyone else going to saltconf that's still looking at hotel reservations? I'd rather go half and half with someone if possible.
20:45 hunternet93 whiteinge: issue https://github.com/saltstack/salt/issues/9324 opened
20:45 whiteinge ty
20:49 lyska joined #salt
20:50 Vlad_K joined #salt
20:51 kaoskitn Anyone listening?
20:52 forresta ?
20:52 forresta I hear only the silence of the IRC
20:52 jcockhren *crickets*
20:52 jcockhren kaoskitn: you have a question? ask it
20:53 kaoskitn I've discovered an issue where kwargs are being sent /received differently in 0.17.4 than they were in 0.16.4.  is this a known issue/change?
20:53 fllr joined #salt
20:53 kaoskitn this is when using salt.client.LocalClient
20:53 jcockhren yeah I'll let forresta take this one...
20:53 jcockhren I'm still on 0.17.2
20:53 kaoskitn for example.
20:53 kaoskitn >>> from salt.client import LocalClient
20:53 kaoskitn >>> client = LocalClient()
20:53 kaoskitn >>> kwargs = {'name':'foo'}
20:53 kaoskitn >>> client.cmd('kura1*', 'content.stop_job', (), kwarg=kwargs)
20:53 forresta my one box is still running 0.16.4 jcockhren :P
20:54 kaoskitn where the method has a keyword arg of name
20:54 kaoskitn result is:
20:54 kaoskitn [DEBUG   ] Command details {'tgt_type': 'glob', 'jid': '20131217205042710781', 'tgt': 'kura1*', 'ret': '', 'user': 'sudo_cari', 'arg': [{'name': 'foo', '__kwarg__': True}], 'fun': 'content.stop_job'}
20:54 kaoskitn [DEBUG   ] {'name': 'foo', '__kwarg__': True}
20:54 kaoskitn the second one is the value of name
20:55 forresta kaoskitn, that looks identical to the examples on the api page.
20:55 kaoskitn it should be just 'foo'.
20:55 kaoskitn (assuming the way to send kwargs has changed and I just didn't RTFM)
20:56 forresta only difference I see is that the docs have kwargs={ 'name': 'foo' }
20:56 psyl0n joined #salt
20:56 forresta err 'foo'}
20:56 forresta but yours looks similar
20:56 kaoskitn I've been using it for nearly a year, and then upgraded to 0.17.4 and now this is happening
20:56 kaoskitn I tried to make a generic example
20:57 kaoskitn shall I examine the code and try to find the regression and make a pull request?
20:57 cewood joined #salt
20:57 jcockhren kaoskitn: yep
20:58 kaoskitn (haven't contributed before, but why not...)
20:58 kaoskitn ok. I'll look for the solution and I'll let you guys know...
20:58 forresta kaoskitn, sounds good, your example looks fine to me :\
21:01 kaoskitn so none of you have experienced this?  Hm.
21:03 pass_by_value kaoskitn: I usually call salt.client.APIClient for any programmatic calls to salt. That one delegates the calling to LocalClient
21:03 bhosmer joined #salt
21:03 pass_by_value there are also other classes that it can delegate to, but afaik it depends on the function that is called
21:04 sdr_ joined #salt
21:05 pass_by_value I am not sure what exactly you are looking for (so APIClient may or may not be the solution), but it might be good to check :)
21:05 defunctzombie is there a way to load a templated state file (sls) but specify variables for that specific instance of the use of it?
21:08 kaoskitn pass_by_value: thanks. I'll check and see if that changes anything...
21:09 sdr_ Running 0.17.2 salt minions on Windows, and modules don't always reload. With trace logging enabled, I can see that sometimes (when they don't reload correctly), modules are copied from C:\salt\var\cache\salt\minion\files\base\_modules to C:\salt\var\cache\salt\minion\extmods\modules AFTER salt.loader has finished. Is there a way to force it to reload? Only way is to restart the minion which is not an option for us at scale. This seems
21:11 pass_by_value cool, here is an example that I have used recently http://pastebin.com/M3HdLnmF
21:12 pass_by_value the while loop needs to run in a different terminal window
21:13 frosty996 what's a good way to pass grains into a jinja template for testing purposes?
21:14 Vye frosty996: minion config file is what I use for testing.
21:14 frosty996 I was hoping to just do it in python, but I can't seem to get the grains injected
21:15 frosty996 I thought I could do something like:
21:15 frosty996 print j2_env.get_template(os.path.basename(sys.argv[1])).render( conn='300', grains['mem_total']=mem)
21:20 meteorfox joined #salt
21:24 mirko joined #salt
21:24 mirko_ joined #salt
21:25 btorch anyone here used pkg.install with force_yes ?
21:25 bhosmer joined #salt
21:26 bemehow joined #salt
21:26 btorch I've been trying "salt ... pkg.install pkgs='["swift", "swift-account"]' force_yes" and also tried force_yes=True but the minion log shows failing because there is no --force-yes
21:27 btorch this in on 0.17.2
21:27 higgs001 joined #salt
21:27 forresta btorch, what OS?
21:27 btorch ubuntu
21:27 mirko joined #salt
21:28 cwright btorch: that wasn't added until 17.4
21:28 cwright force_yes
21:28 Vye joined #salt
21:28 cwright for apt at least
21:29 forresta cwright, lame there's no note saying so in the docs
21:29 cwright i read it in the source a day or two ago
21:29 forresta yea I'm looking right now
21:30 btorch yeah one of our guys just mentioned he had to drop the new apt.py in the _modules to make it work
21:30 kaoskitn So anyone know where in the code a message is received and handed to the command on the other end?
21:31 forresta cwright, btorch, https://github.com/saltstack/salt/issues/9325
21:31 kaoskitn I'm thinking that the command being sent across the wire is fine {'tgt_type': 'glob', 'jid': '20131217205042710781', 'tgt': 'kura1*', 'ret': '', 'user': 'sudo_cari', 'arg': [{'name': 'foo', '__kwarg__': True}], 'fun': 'content.stop_job'} ...
21:32 mirko joined #salt
21:33 jcockhren kaoskitn: could you gist the initialization and usage of your LocalClient?
21:33 btorch forresta: cool
21:33 forresta btorch, cwright, if either of you guys have a copy of the repo checked out, you can just add .. versionadded:: 0.17.4 for that section.
21:34 cwright forresta: ok i'll do that
21:34 forresta cwright, awesome, here is an example if you need one: https://github.com/saltstack/salt/blob/develop/salt/states/file.py#L1884
21:35 forresta if you can just notate the issue # in your pull request it should get linked.
21:36 kaoskitn You want me to make a ticket?
21:36 cwright forresta: .. versionadded:: only applies to new functions, not new parameters to functions, right?
21:36 kaoskitn jcockhren: You want me to make a ticket?
21:37 forresta cwright, I don't know the official stance on it, but I don't see why you couldn't add it for that specific item
21:37 kaoskitn I think I found the change causing the issue....  in salt.cli.caller.py
21:37 forresta I mean, it didn't exist before 0.17.4 :P
21:37 jcockhren kaoskitn: well, I was looking into it now. I want to reproduce your results. but sure, go ahead
21:37 forresta and someone wasted time trying to make it work, so clearly that needs to be noted
21:38 cwright yes, but the install function did, I dont want the docs to make it appear that install() was added in 17.4
21:38 forresta cwright, just add it as part of the sub section
21:38 forresta for force_yes specificaly
21:38 forresta *specifically
21:38 cwright forresta: do you have an example showing that it works for that too?
21:38 cwright i dont mind doing it, i just don't want to break with convention
21:40 whiteinge .. versionadded is good for both functions, parameters, modules, whatevs.
21:40 forresta whiteinge, awesome thanks. I was just gonna say I couldn't find an example of a function and we should ask :P
21:40 forresta err for a paramater
21:40 forresta *parameter, wow I cannot spell today
21:41 whiteinge i've used that here:
21:41 whiteinge https://github.com/saltstack/salt-api/blob/develop/saltapi/netapi/rest_cherrypy/app.py#L35
21:42 forresta awesome
21:43 cwright whiteinge: thanks
21:46 kaoskitn jcockhren: https://gist.github.com/kaoskitn/8013138
21:49 mgw joined #salt
21:50 jcockhren OHOOHOHOH
21:50 bhosmer joined #salt
21:51 jcockhren forresta: eauth + salt-api is fixed in 0.17.4
21:51 cwright forresta: pull request sent: https://github.com/saltstack/salt/issues/9325
21:51 forresta cwright awesome
21:52 forresta cwright, thanks for grabbing that one, I don't have the repo pulled down at work!
21:53 cwright forresta: np
21:53 psyl0n joined #salt
21:56 lemoi joined #salt
21:56 lemoi joined #salt
22:03 carlos joined #salt
22:10 ChrisCook1 joined #salt
22:13 jcockhren oh my
22:13 jcockhren it is on
22:14 forresta ?
22:15 jcockhren eauth+salt-api works now
22:15 jcockhren adding support to my bot now
22:15 forresta cool
22:15 whiteinge did eauth break recently?
22:15 jcockhren yeah. it'll hang at auth
22:16 jcockhren not sure about "recently"
22:16 jcockhren there was a issue filed
22:16 whiteinge is that when the master is not running? or alwyas?
22:16 jcockhren always
22:16 jcockhren let me pull that thread
22:17 xmltok_ joined #salt
22:18 jcockhren ah. wait
22:18 jcockhren not the same thing
22:18 jcockhren https://github.com/saltstack/salt/issues/7762
22:18 jcockhren shoot... I still need to check on that
22:19 whiteinge ah, gotcha. ty for the link
22:20 maxleonca joined #salt
22:20 hunternet93 whiteinge: Any update on the API runner module issue?
22:20 kermit joined #salt
22:20 jfzhu_us joined #salt
22:20 maxleonca Hi guys, anyone has halite running on centos 6 with salt 0.17.2?
22:22 dwfreed it's best to ask your real question, so that we can help you better
22:23 j___ maxleonca: yes
22:23 mpanetta joined #salt
22:23 j___ centos 6.5 + salt 0.17.2
22:24 whiteinge hunternet93: not yet. i'll comment on that ticket when i have one
22:24 whiteinge testing a fix now...
22:24 hunternet93 whiteinge: OK, thanks.
22:25 maxleonca Hey J, did you run into any quiks? I followed the documentation but I just cannot get it to work, at all.
22:25 lemoi any word on this? https://github.com/saltstack/salt/issues/4597
22:25 maxleonca Obviously I'm missing/messing something.
22:25 mpanetta joined #salt
22:28 cbloss joined #salt
22:28 forresta maxleonca, what error are you getting? Is the app not loading when you visit it in a web browser or what?
22:29 maxleonca Well here is the strange part, I installed the dependencies, modify the master file, restart the salt-master service.
22:29 maxleonca and then, nothing
22:29 maxleonca the port doesn't open, no response from cherrypy, nothing
22:30 forresta if you open the python cli, can you import halite?
22:30 maxleonca there is nothing on the logs
22:30 maxleonca if I run it in debug mode,. it says that is starting port 8080 but then, nothing else
22:30 maxleonca let me try that forresta
22:31 maxleonca yes I can
22:31 [diecast] joined #salt
22:31 jfzhu_us joined #salt
22:32 maxleonca I did create the tls certs
22:32 higgs001 joined #salt
22:32 maxleonca ahh hold on, I see something in debug now.
22:32 maxleonca fopen no such file or directory
22:32 maxleonca while loding halite
22:34 hunternet93 left #salt
22:34 rgarcia_ joined #salt
22:35 maxleonca but that cannot be, can it?. fopen is part of the core of python.
22:36 smccarthy joined #salt
22:38 smccarthy joined #salt
22:39 forresta is it failing to load the actual file?
22:42 maxleonca hmmm, seems that I broke something
22:42 maxleonca the certs are no longer there
22:42 maxleonca and that is the cause of that line.
22:42 maxleonca I think
22:45 kaoskitn left #salt
22:46 maxleonca yup, that was it.
22:47 maxleonca Thanks, it always helps air your mind.
22:51 psyl0n joined #salt
22:55 forresta maxleonca, yea np
22:58 bhosmer joined #salt
22:58 psyl0n joined #salt
23:01 bemehow joined #salt
23:01 higgs001 joined #salt
23:02 ConceitedCode joined #salt
23:03 toastedpenguin joined #salt
23:05 rgarcia_ joined #salt
23:07 backjlack_ joined #salt
23:07 rojem joined #salt
23:08 psyl0n joined #salt
23:08 xt joined #salt
23:10 dstanek joined #salt
23:14 dvl joined #salt
23:14 JasonSwindle joined #salt
23:19 backjlack joined #salt
23:19 tyler_ joined #salt
23:21 alunduil joined #salt
23:24 schristensen joined #salt
23:26 rockey joined #salt
23:30 xmltok_ joined #salt
23:32 xmltok_ joined #salt
23:34 psyl0n joined #salt
23:53 xt joined #salt
23:56 bhosmer joined #salt

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