Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-12-18

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

All times shown according to UTC.

Time Nick Message
00:07 JasonSwindle joined #salt
00:08 mesmer joined #salt
00:09 dvl joined #salt
00:15 seanz left #salt
00:16 jcsp joined #salt
00:20 mumblez joined #salt
00:20 micko__ joined #salt
00:23 mumblez when is v 18 coming out and what new features will it have?
00:24 jesusaurus i believe there won't be a version 0.18
00:24 jesusaurus it will be called hydrogen instead
00:24 jesusaurus as i understand it
00:25 rgarcia_ joined #salt
00:28 mumblez ty
00:30 aCodinMan joined #salt
00:31 lemoi joined #salt
00:31 lemoi joined #salt
00:33 N-Mi joined #salt
00:34 rgarcia__ joined #salt
00:51 jslatts joined #salt
00:51 bhosmer joined #salt
00:56 quickdry21 joined #salt
00:56 schristensen joined #salt
01:08 jcsp joined #salt
01:12 maj888 joined #salt
01:15 psyl0n joined #salt
01:15 pass_by_value joined #salt
01:17 halfss__ joined #salt
01:27 bhosmer joined #salt
01:28 pcurry joined #salt
01:28 brianhicks joined #salt
01:29 bhosmer_ joined #salt
01:29 chjohnst_work joined #salt
01:33 jcsp1 joined #salt
01:33 meteorfox joined #salt
01:40 smccarthy joined #salt
01:45 oz_akan_ joined #salt
01:51 bhosmer joined #salt
01:54 Nexpro joined #salt
02:13 chromak__ joined #salt
02:16 ChrisCook joined #salt
02:19 rojem joined #salt
02:21 ajw0100 joined #salt
02:22 rgarcia_ joined #salt
02:28 blee joined #salt
02:32 forresta joined #salt
02:34 fllr joined #salt
02:40 xl1 joined #salt
02:41 ConceitedCode joined #salt
02:45 fllr joined #salt
02:45 fllr joined #salt
02:53 favadi joined #salt
02:58 tomtomtomtom joined #salt
03:09 druonysus joined #salt
03:14 ChrisCook joined #salt
03:21 oz_akan_ joined #salt
03:23 BenCoinanke joined #salt
03:26 ede joined #salt
03:26 quickdry21 joined #salt
03:31 mikkn joined #salt
03:37 ajw0100 joined #salt
03:39 sunand joined #salt
03:40 allanparsons joined #salt
03:40 allanparsons hi... quick question.  i am using file.managed in an sls (source = salt://).  if that file goes missing on the host, how do I re-copy it?
03:40 allanparsons paste?
03:41 jdenning joined #salt
03:42 allanparsons - force: True doesnt seem to work :(
03:45 bhosmer joined #salt
03:50 _monokrome joined #salt
03:51 Gareth allanparsons: the file goes missing on the managed host?
03:52 allanparsons yeah
03:52 allanparsons lets say it gets accidentally deleted
03:52 Gareth salt should replace it on the next run.
03:52 allanparsons in puppet, i can use ensure: present
03:52 allanparsons and it'll replace that file
03:52 allanparsons from source
03:52 allanparsons it should
03:52 allanparsons but it does not
03:52 Gareth can you past your sls to postebin?
03:52 allanparsons link to paste bin?
03:53 Gareth http://pastebin.com/
03:53 allanparsons http://pastebin.com/GZatCC7D
03:54 mikkn joined #salt
03:54 allanparsons and, i'm simply running:  salt 'zzztest' state.highstate
03:54 terminalmage allanparsons: what is the output when you run the highstate
03:54 allanparsons State: - module     Name:      archive.tar     Function:  run         Result:    False         Comment:   The following requisites were not found:                    require:                        file: /src-salt/collectd.tar          Changes:
03:54 allanparsons oops
03:55 allanparsons sorry
03:55 allanparsons http://pastebin.com/j2S75psj
03:55 Gareth allanparsons: looks like one of your requirements isn't there.
03:55 allanparsons yeah, the file
03:55 allanparsons it's not replacing the file
03:55 Gareth oh. wait. nm.
03:55 allanparsons :)
03:56 terminalmage allanparsons: that's an archive.tar state
03:56 terminalmage your module.run state should probably be a module.wait state
03:57 allanparsons if you wanna test, change salt://... to:  http://collectd.org/files/collectd-5.4.0.tar.bz2
03:57 allanparsons regardless, that file should still get placed
03:57 terminalmage what is the output of the actual file.managed state
03:57 terminalmage allanparsons: really I asked for the output of the highstate, so that'd be best
03:57 dpac|away joined #salt
03:57 terminalmage just getting one state's output doesn't give me the whole picture
03:58 xmltok joined #salt
03:58 terminalmage hard for me to troubleshoot with only part of the picture
03:58 allanparsons 1 sec
03:59 jfzhu_us joined #salt
04:00 allanparsons here you go.... http://pastebin.com/hcqeMy7v
04:01 allanparsons ok, so i run a highstate... then delete the file... the re-run the highstate (this is what you get on that second highstate:  http://pastebin.com/hcqeMy7v)
04:01 allanparsons (i stripped out some semi-sensitive ssh info)
04:01 terminalmage you should look at using the "pkgs" argument instead of "names" for your packages
04:02 terminalmage it makes all the packages use one call to the pkg frontend
04:02 allanparsons ok.
04:02 terminalmage and logically groups them together into one state
04:02 allanparsons done on that.
04:02 allanparsons thx
04:02 terminalmage still looking, but that was one thing I noticed
04:03 allanparsons also, and not quite sure if it matters, i'm using git as the fs
04:03 allanparsons i tried a git pull on master + cycled service and then another highstate w/ the same results
04:04 terminalmage allanparsons: so, the highstate output does not contain a /src-salt/collectd.tar state
04:04 terminalmage when this happens it's sometimes due to a duplicate ID declaration
04:04 terminalmage that's the top-level declaration
04:04 allanparsons ok... lemme try renaming that file ID (/src-salt/collectd.tar)
04:04 terminalmage though, those are supposed to generate errors, or so I thought
04:04 terminalmage one sec
04:05 terminalmage ahh yes, you do have a duplicate
04:05 favadi joined #salt
04:05 terminalmage so, you don't need to give it a different name
04:05 terminalmage you can group them under the same id dec
04:05 terminalmage I'll show you an example
04:05 andyshinn` joined #salt
04:05 allanparsons i know what you mean... :)
04:05 allanparsons lemme upload
04:06 allanparsons http://pastebin.com/4NuteEq6
04:06 allanparsons like that?
04:07 terminalmage allanparsons: http://dpaste.com/1510573/
04:07 terminalmage notice I also changed that to a module.wait
04:08 allanparsons i get an error on pkgs.installed ( Too many functions declared in state "pkgs" in sls collectd)...
04:08 terminalmage this will only perform the archive.tar when the file changes
04:08 terminalmage and I'm not sure, but I think that have a watch on a state negates the need for a require, so that requore on the collectd.tar might be redundant
04:09 allanparsons ok
04:09 allanparsons :)
04:09 allanparsons also, ignore my question about pkgs
04:09 allanparsons just doubled checked docs
04:10 terminalmage yeah was going to say it's probably not using pkgs probably
04:10 terminalmage basically pkgs replaces names
04:10 allanparsons gotcha
04:10 terminalmage it's some special sauce just for pkg management
04:10 terminalmage keeps your minion from shelling out to yum/apt/whatever once for every package, speeds things up considerably
04:11 terminalmage when you have a long list of pkgs like that
04:11 terminalmage also makes the state output a bit cleaner
04:11 allanparsons hm... http://pastebin.com/a7dyUetQ
04:12 allanparsons argh
04:12 terminalmage allanparsons: try putting a space between - and pkgs?
04:12 allanparsons yeah... just did and checked in
04:12 allanparsons one sec
04:12 allanparsons stupid yaml :)
04:12 terminalmage hehe
04:13 anuvrat joined #salt
04:13 terminalmage all set, then?
04:13 allanparsons it worked
04:13 allanparsons but i got an error on module.wait
04:13 terminalmage ok
04:14 allanparsons ret: ['bzip2: (stdin) is not a bzip2 file.',
04:14 allanparsons i gotta remove the -j
04:14 allanparsons 1 sec
04:14 terminalmage collectd.tar
04:14 terminalmage yeah
04:15 terminalmage so, you'll need to delete the tarfile from the minion too
04:15 terminalmage because minion.wait only runs the module function when the state it is watching chagnes
04:15 rojem joined #salt
04:15 terminalmage *changes
04:16 terminalmage otherwise it'd run it everytime you ran the highstate
04:16 Gifflen joined #salt
04:16 allanparsons yeah... nice
04:16 allanparsons rerunning highstate
04:16 allanparsons quick question - whats the diff between lowstate and highstate?
04:16 allanparsons like, when would i need to run lowstate?
04:16 terminalmage you wouldn't
04:17 terminalmage lowstate isn't something you can run, it's just an intermediate representation of the data that is compiled into the "high" data structure, which is then executed as the "highstate"
04:18 terminalmage so, viewing the lowstate is really only useful for troubleshooting
04:18 terminalmage perhaps that should be better-documented
04:18 allanparsons :)
04:18 allanparsons woohoo!
04:18 allanparsons that untarred
04:18 terminalmage sweet!
04:18 allanparsons is there a way to compile from source?  or just run cmd.run?
04:19 terminalmage you mean a state for ./configure && make && make install?
04:19 allanparsons yea
04:19 allanparsons didnt know if there's a module for that
04:20 terminalmage I am not sure...
04:20 allanparsons ok.  i'll just cmd.run it :)
04:21 allanparsons man... thanks for your help w/ that one!
04:21 allanparsons really appreciate it!
04:21 terminalmage no problem!
04:22 terminalmage yeah I believe that cmd.run states support chaining commands, bug I am not sure
04:22 terminalmage easy enough to check
04:22 djinni` joined #salt
04:23 terminalmage yeah it should work
04:23 ravibhure joined #salt
04:23 terminalmage doing the cmd.run of ./configure && make && make install
04:23 allanparsons yeah, i've used it w/ chaining commands before
04:23 allanparsons it works
04:23 terminalmage yeah just be sure to set the cwd
04:23 allanparsons yep!
04:23 allanparsons :)
04:23 terminalmage cool
04:24 allanparsons i'd probably just cd collectd* && ....
04:24 terminalmage sure
04:24 allanparsons alright - gonna leave & finish this at home.
04:24 allanparsons thanks again for your help
04:24 terminalmage no prob, I'm going to go to, have a good one
04:25 terminalmage s/go to/go too/
04:37 ravibhure1 joined #salt
04:49 Corey So terminalmage helped "allanparsons" and then left? Where do we go from here.... now that the Salt Folk are leaving...
04:50 forresta ?
04:52 Ryan_Lane joined #salt
04:54 sunand do grains work in salt-ssh ?
04:55 Corey forresta: Not familiar with their music, I see. :-)
04:57 jfzhu_us joined #salt
05:04 forresta Corey, if you're talking about Guns n Roses, yes I'm familiar
05:04 forresta if it's someone else, I have no idea
05:07 ConceitedCode joined #salt
05:09 Gareth allan parsons project.
05:11 nocturn joined #salt
05:12 forresta ahh thanks Gareth
05:18 Corey Thank you, Gareth.
05:18 Ryan_Lane joined #salt
05:19 Bryan joined #salt
05:21 oz_akan_ joined #salt
05:26 gammalget joined #salt
05:27 synfin joined #salt
05:31 Nazca__ jcockhren: in an ideal world, returners, but could do with them being master side... might need to figure out how to extend that logic
05:31 ajw0100 joined #salt
05:34 jcockhren Nazca__: I like your approach of creating a web service for listening. a custom returner could talk to that
05:37 jcockhren if the bot to be useful I'm writing various knowledge bases. we can consider the commands as facts in the bot's world. something it doesn't question
05:38 jcockhren s/if/to make/
05:38 Nazca__ jcockhren: true, it just feels nicer if the returner fired on the master to reduce the amount of source authentication involved
05:39 jcockhren another knowledge base would be pillar
05:40 jcockhren and any other external sources od data
05:40 jcockhren s/od/of
06:04 Nazca__ joined #salt
06:14 Destro joined #salt
06:19 Ryan_Lane joined #salt
06:21 pcurry joined #salt
06:50 MK_FG joined #salt
06:57 Furao joined #salt
07:01 fllr joined #salt
07:03 fllr joined #salt
07:04 druonysus joined #salt
07:04 druonysus joined #salt
07:05 fllr joined #salt
07:06 troyready joined #salt
07:14 gadams joined #salt
07:16 favadi joined #salt
07:16 carlos joined #salt
07:19 Ryan_Lane joined #salt
07:29 Furao joined #salt
07:35 matanya joined #salt
08:00 middleman_ joined #salt
08:02 juasiepo joined #salt
08:03 fllr joined #salt
08:10 harobed joined #salt
08:11 harobed joined #salt
08:13 balboah joined #salt
08:14 giantlock_ joined #salt
08:19 Ryan_Lane joined #salt
08:20 junedm joined #salt
08:20 junedm left #salt
08:21 Ryan_Lane joined #salt
08:24 gammalget joined #salt
08:33 Iwirada joined #salt
08:40 slav0nic joined #salt
08:44 rojem joined #salt
08:54 Furao_ joined #salt
09:03 tseNkiN joined #salt
09:03 fllr joined #salt
09:12 giantlock_ joined #salt
09:12 vkurup joined #salt
09:12 agh joined #salt
09:12 funzo joined #salt
09:12 Heartsbane joined #salt
09:12 moos3 joined #salt
09:12 mfournier joined #salt
09:12 madduck joined #salt
09:12 Gareth joined #salt
09:12 scristian joined #salt
09:12 austin987 joined #salt
09:12 FL1SK joined #salt
09:12 Zuru joined #salt
09:12 apergos joined #salt
09:12 jbub joined #salt
09:12 arapaho joined #salt
09:12 akitada_ joined #salt
09:12 malinoff joined #salt
09:12 scalability-junk joined #salt
09:12 rizumu joined #salt
09:12 jrgifford joined #salt
09:12 yano joined #salt
09:12 jgelens joined #salt
09:12 elsmorian joined #salt
09:13 andyshinn` joined #salt
09:15 Heartsbane joined #salt
09:15 Heartsbane joined #salt
09:15 KoFFiE joined #salt
09:19 Ryan_Lane joined #salt
09:19 ConceitedCode joined #salt
09:20 malinoff joined #salt
09:20 malinoff joined #salt
09:21 giantlock_ joined #salt
09:21 vkurup joined #salt
09:21 agh joined #salt
09:21 funzo joined #salt
09:21 moos3 joined #salt
09:21 mfournier joined #salt
09:21 madduck joined #salt
09:21 Gareth joined #salt
09:21 scristian joined #salt
09:21 austin987 joined #salt
09:21 FL1SK joined #salt
09:21 Zuru joined #salt
09:21 apergos joined #salt
09:21 jbub joined #salt
09:21 arapaho joined #salt
09:21 akitada_ joined #salt
09:21 scalability-junk joined #salt
09:21 rizumu joined #salt
09:21 jrgifford joined #salt
09:21 jgelens joined #salt
09:29 joehoyle joined #salt
09:33 tseNkiN joined #salt
09:41 ConceitedCode joined #salt
09:42 joehoyle joined #salt
09:45 fandikurnia01 joined #salt
10:03 fllr joined #salt
10:04 juasiepo joined #salt
10:05 _fllr_ joined #salt
10:06 bhosmer joined #salt
10:07 sunand I am writing the state response to a file and trying to parse it. when i give output format as json.. response for each minion is json but  all the response together,  it is not. how can i parse it?
10:09 cowyn_ joined #salt
10:13 _ikke_ https://github.com/TheRealBill/salt/commit/5cc8142d2a98fcd4467b648e31c1af89a6eef391
10:14 _ikke_ use --static
10:17 junedm joined #salt
10:17 sunand _ikke_: i am sorry i didn't mention, I am using salt-ssh. it says it has not option --static
10:17 _ikke_ No clue then, sorry
10:19 Ryan_Lane joined #salt
10:21 ravibhure joined #salt
10:22 sunand this is the o/p i am trying to parse to fetch the keys http://pastebin.com/XedZpB2F
10:26 MrTango joined #salt
10:27 _ikke_ you can try to pip it through sed: | sed 's/\}\n/\},\n/' or something like that
10:32 sunand okay thank u _ikke_, and finally. is there a way i can write  callback for doing this instead of calling it manually?
10:34 KoFFiE well if you have to parse json on commandline you could use jq (if you can install it)
10:38 _ikke_ sunand: sed is not a good solution aparently because it's line based
10:43 JasonG_TA joined #salt
10:43 KoFFiE _ikke_: as said, use jq, the following seems to work: cat test.json | jq '.[]["cmd_|-cat /home/deploy/.ssh/id_rsa.pub_|-cat /home/deploy/.ssh/id_rsa.pub_|-run"].changes.stdout'
10:43 KoFFiE :)
10:46 junedm left #salt
10:46 krak3n` joined #salt
10:48 sunand thanks guys, will try that.
10:48 KoFFiE if you need it w/o quotes and a bit shorter: cat test.json | jq '.[][].changes.stdout' | grep -v "^null$" | sed -e 's/^"\(.*\)"$/\1/'
10:48 sunand any inputs on the callback thing?
10:49 KoFFiE don't look at me, I'm new to this thing :p
10:50 sunand hehe, nop,  i was staring at the roster on the right :)
10:53 gmoro_ joined #salt
10:56 pengunix joined #salt
10:56 helminthe joined #salt
11:00 mortis_ any idea when 0.17.4 will be in the apt-repo?
11:00 mortis_ btw topic is wrong :)
11:03 netzmonster joined #salt
11:03 fllr joined #salt
11:04 mortis_ http://ppa.launchpad.net/saltstack/salt/ubuntu/dists/precise/main/binary-amd64/Packages says 0.17.2 still
11:04 krak3n` joined #salt
11:08 netzmonster joined #salt
11:09 higgs001 joined #salt
11:15 gmoro_ joined #salt
11:17 dvl joined #salt
11:19 Ryan_Lane joined #salt
11:20 bhosmer joined #salt
11:23 bhosmer_ joined #salt
11:33 jasg75 joined #salt
11:37 JasonG_TA joined #salt
11:37 helderco joined #salt
11:39 blee joined #salt
11:47 N-Mi joined #salt
11:51 junedm joined #salt
11:55 ajw0100 joined #salt
12:00 rojem joined #salt
12:03 fllr joined #salt
12:04 ravibhure1 joined #salt
12:07 Psi-Jack What, exactly, is the difference in the standard host grains of: fqdn, id, and localhost
12:07 Psi-Jack Oh, and nodename
12:08 junedm left #salt
12:10 yota id can be different to the fqdn
12:10 yota I don't know the directives localhost and nodename
12:11 Psi-Jack id is what's able to be specifically defined in the minion config, too, and is what the salt-key is used by the node, if I understand correctly.
12:19 Ryan_Lane joined #salt
12:21 pengunix joined #salt
12:23 elfixit joined #salt
12:23 ravibhure joined #salt
12:29 gmoro_ joined #salt
12:30 jslatts joined #salt
12:32 pcurry joined #salt
12:37 harobed joined #salt
12:38 harobed joined #salt
12:38 harobed joined #salt
12:50 xl1 left #salt
13:03 fllr joined #salt
13:04 fandikurnia01 joined #salt
13:06 toastedpenguin joined #salt
13:06 mortis_ anyone know how/when the ppa is updated?
13:07 fandikurnia01 joined #salt
13:11 bhosmer joined #salt
13:12 harobed joined #salt
13:16 Whissi joined #salt
13:19 sroegner joined #salt
13:19 Ryan_Lane joined #salt
13:33 rocket joined #salt
13:35 mpanetta joined #salt
13:35 mgw joined #salt
13:37 diegows joined #salt
13:44 jslatts joined #salt
13:44 modafinil joined #salt
13:51 Destro joined #salt
13:52 pengunix joined #salt
13:53 elsmorian joined #salt
13:53 ipmb joined #salt
13:58 Furao joined #salt
13:58 psyl0n joined #salt
13:59 oz_akan_ joined #salt
14:01 brianhicks joined #salt
14:01 ossalt joined #salt
14:03 fllr joined #salt
14:03 ossalt hi all
14:04 achileuss joined #salt
14:04 ossalt which docs should I follow as a starter?
14:06 Iwirada http://docs.saltstack.com/topics/tutorials/walkthrough.html
14:10 ossalt thanks Iwirada
14:12 racooper joined #salt
14:13 bhosmer joined #salt
14:14 colinbits joined #salt
14:17 dstanek joined #salt
14:19 cdcalef joined #salt
14:24 N-Mi joined #salt
14:24 N-Mi joined #salt
14:25 pass_by_value joined #salt
14:26 pcurry joined #salt
14:28 Gifflen joined #salt
14:29 rojem joined #salt
14:30 pcurry_nomi joined #salt
14:36 bhosmer joined #salt
14:36 th3reverend joined #salt
14:37 juicer2 joined #salt
14:40 elsmorian joined #salt
14:41 dvl joined #salt
14:45 timoguin joined #salt
14:46 MTecknology joined #salt
14:46 fllr joined #salt
14:46 rocket_ joined #salt
14:47 rgbkrk joined #salt
14:48 ashtonian joined #salt
14:48 CheKoLyN joined #salt
14:48 _fllr_ joined #salt
14:59 a2r0n joined #salt
15:02 kaptk2 joined #salt
15:03 fllr joined #salt
15:05 th3reverend left #salt
15:07 backjlack joined #salt
15:08 defunctzombie is there a way to make salt runs report finished things as they are finished? without waiting for the whole thing to finish?
15:08 defunctzombie like streaming back info?
15:11 forresta joined #salt
15:15 Teknix joined #salt
15:15 harobed_ joined #salt
15:18 pass_by_value defunctzombie: state runs support that functionality
15:19 defunctzombie pass_by_value: can you elaborate?
15:19 defunctzombie pass_by_value: I typically run state.highstate
15:19 pass_by_value sure lemme get some github links
15:19 Ryan_Lane joined #salt
15:19 pass_by_value we use that in Halite to show progress bars
15:21 pass_by_value here is a pastebin I had created
15:21 pass_by_value http://pastebin.com/M3HdLnmF
15:21 JasonSwindle joined #salt
15:21 anti_lp joined #salt
15:21 pass_by_value Line number 15 is the loop that listens for events
15:22 pass_by_value once you submit state.highstate you will see event data being reported for each completed event
15:25 sroegner joined #salt
15:26 yano joined #salt
15:27 sroegner joined #salt
15:29 pass_by_value The state.highstate job can be submitted using the command line (no need to use APIClient for that).
15:29 blee_ joined #salt
15:29 svx joined #salt
15:32 vejdmn joined #salt
15:34 BRYANT__ joined #salt
15:35 yano joined #salt
15:35 Marion_ joined #salt
15:36 krak3n` thats cool, so you can just run that as a service pass_by_value
15:36 UtahDave joined #salt
15:36 aleszoulek joined #salt
15:36 davet joined #salt
15:37 mgw joined #salt
15:37 alunduil joined #salt
15:38 pass_by_value yes, I think you should be able to run it as a service and redirect your stdout and stderr
15:38 pcurry_nomi1 joined #salt
15:39 pass_by_value I have only run it from the python interpreter but that sounds like a good idea krak3n`
15:39 defunctzombie pass_by_value: yea... I would be interested in just running salt-call directly or even salt
15:40 defunctzombie pass_by_value: thank you for that script tho
15:40 pass_by_value np :) yeah I realized that you might want a "higher level" solution
15:41 tyler joined #salt
15:41 dvl joined #salt
15:42 pass_by_value what I used to do is run state.highstate using salt, and have that running in another terminal
15:43 kuL4 left #salt
15:47 ashtonian joined #salt
15:49 fllr joined #salt
15:49 rlarkin joined #salt
15:57 jmccree I'm a bit confused by environments.
15:57 jmccree Would a dev env fall back to the base environment to look for files, or..
15:57 terminalmage Corey: we have to sleep some time :)
15:58 jmccree would I setup like /srv/salt/defaults and have the dev env set to fallback to it?
16:00 cowyn_ joined #salt
16:01 kermit joined #salt
16:03 Psi-Jack What, exactly, is the difference in the standard host grains of: fqdn, id, localhost, and nodename?  I know that id can be defined in the minion conf, but how are the others treated/generated?
16:05 Psi-Jack jmccree: YEah, just about everyone is, because environments is pretty well broken.
16:07 jimallman joined #salt
16:08 dwfreed fqdn is generally a full domain name, assuming it's set properly
16:08 Psi-Jack Right. Which is the same as localhost, too, apparently. :)
16:08 Psi-Jack But, I'm asking where does it get that information, salt, specifically.
16:09 forresta Psi-Jack, take a look at the core grains file: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py
16:09 ckao joined #salt
16:09 dwfreed nodename comes from uname -a
16:09 dwfreed and is what the kernel thinks is the hostname
16:10 dwfreed localhost comes from socket.gethostname(), which I'd expect to be the same
16:10 Psi-Jack uname -n, or equivalent. :)
16:11 UtahDave Psi-Jack: How are environments broken?
16:11 seanz joined #salt
16:12 Psi-Jack UtahDave: Many... Many... Many ways.. Unfortunately. Right now, environments in pillars, for starters, is broken as per an issue I put in recently. Environments don't work in a way that logically makes any form of sense.
16:12 Psi-Jack Mostly the last part of that statement. ^
16:12 UtahDave Is that in your issue you opened?  I'd like to take a look at it.
16:13 meteorfox joined #salt
16:13 Psi-Jack I have sorta. I have one issue regarding pillars, and one regarding a feature request for environments, since I didn't know how illogical environments were being handled.
16:13 Corey terminalmage: Lies.
16:13 meteorfox joined #salt
16:14 Psi-Jack UtahDave: https://github.com/saltstack/salt/issues/9186
16:15 phil__ joined #salt
16:16 Psi-Jack UtahDave: https://github.com/saltstack/salt/issues/9262
16:17 dvl joined #salt
16:18 UtahDave thanks, Psi-Jack
16:18 Psi-Jack No proble, :)
16:18 bemehow joined #salt
16:20 phil__ Sorry to jump in with a question straight away - relative salt newbie here. Using it in production, but have some handrolled scripts for initial provisioning. I'm trying to understand the state of the world for salt & salt-cloud
16:20 phil__ My reading suggests salt-cloud has been merged into the primary salt repo
16:20 phil__ but I don't see the salt-cloud script anywhere
16:21 or1gb1u3 joined #salt
16:21 phil__ (Something about it being included in hydrogen release, which I take to mean 1.0)
16:21 UtahDave phil__: Salt Cloud has been merged into the git develop branch
16:22 chromak__ joined #salt
16:22 UtahDave If you're using  Salt 0.17.x  you'll still have to install salt cloud separately
16:22 phil__ Ah, but not master yet
16:22 phil__ Got it
16:22 phil__ Thanks! I'll start there!
16:23 UtahDave phil__: cool. let us know if you have any questions!
16:23 phil__ Thanks!
16:23 chromak__ joined #salt
16:25 JasonSwindle joined #salt
16:27 smccarthy joined #salt
16:28 bemehow_ joined #salt
16:30 chromak__ joined #salt
16:31 chromak__ joined #salt
16:33 foxx joined #salt
16:33 bhosmer joined #salt
16:37 Corey Best snarky name yet for Bitcoins: Dunning-Krugerrands.
16:38 CheKoLyN joined #salt
16:39 dwfreed Corey: lol
16:41 jesusaurus haha
16:47 rgarcia_ joined #salt
16:48 ashtonian joined #salt
16:49 pcurry_nomi joined #salt
16:50 xmltok joined #salt
16:52 phil__ hello again folks, does anyone have salt-cloud working with vpc on ec2? It looks like it's supported (https://github.com/saltstack/salt-cloud/pull/585) but theres no mention whatsoever in the documentation
16:56 KyleG joined #salt
16:56 KyleG joined #salt
16:57 cyberbob hi all, we are thinking to use salt to manage about ~300 machines in the cloud (AWS)
16:59 cyberbob I was testing some stuff and was stuck at a point, we are using customized "AMI" to create all the instances. Thus all the machines have same hostname . . is there a way to manage the names with saltstack ?
16:59 joehoyle joined #salt
17:01 UtahDave cyberbob: yeah, you can use Salt to change the hostnames
17:01 UtahDave phil__: I think vpc support is very new. I haven't used it myself yet.
17:02 Gareth 'lo
17:02 smccarthy2 joined #salt
17:03 bemehow joined #salt
17:04 dstanek joined #salt
17:04 phil__ ok... thanks... guess I'll just skip salt-cloud until it reaches master on the salt repo
17:05 scoates is there a way to supply multiple master addresses in the minion config?
17:05 dwfreed scoates: yes, just use a list
17:06 Corey dwfreed paid attention yesterday. Lovely!
17:06 dwfreed scoates: like so (\n denotes newline): masters:\n  - master1\n  - master2
17:06 Gareth Corey: he should get a cookie
17:06 dwfreed :)
17:06 scoates dwfreed: cool. will it use both of them all the time? or just the first one that works?
17:06 dwfreed err, remove the s in masters; I think it's just master
17:07 scoates yeah. it's just master
17:07 dwfreed scoates: it'll connect to both, and accept jobs from both
17:07 dwfreed useful if its link to one master goes down
17:07 scoates dwfreed: great. thanks!
17:07 scoates Planning on setting my VMs to use a local salt master if one exists, and otherwise use the production one. Sound OK?
17:07 scoates well not "if" but both
17:08 Corey IIRC you can order masters as well, there's a key for that.
17:08 dwfreed Corey: what would be the point of order? I'm not seeing it at the moment
17:09 Corey dwfreed: Ah, order_masters is part of syndic.
17:10 dwfreed yeah
17:10 dwfreed and it's not 'order' as in 'sort order', but 'order' as in 'give orders to do something'
17:11 dwfreed isn't the English language lovely?
17:12 jdenning joined #salt
17:12 ChrisCook joined #salt
17:14 cyberbob UtahDave: how can that be done. As all hosts have same hostname (as they are created from same AMI . .
17:14 omame joined #salt
17:14 scoates thanks dwfreed
17:15 UtahDave cyberbob: do they all have the same minion id?  Are you creating them with salt-cloud?
17:15 eiginn joined #salt
17:16 cyberbob no, I am not creating them with salt-cloud (as this process is already automated by our dev. team). we need to manage them . .configs/hostnames etc . .
17:16 jalbretsen joined #salt
17:17 cyberbob UtahDave: actually we will be managing a lot of stuff with saltstack . . after the machine is up/running
17:18 UtahDave cyberbob: when they come up do the minions all have the same ID?
17:18 bhosmer joined #salt
17:19 EugeneKay Cyberbob as in Pit of Azazel? Or just a coincidental nick.
17:19 cachedout joined #salt
17:20 cyberbob UtahDave: the keyname will be same .
17:20 cyberbob EugeneKay: :) if you don't like my nick . . I'll change that no offence :P
17:21 EugeneKay No no, just curious if you were somebody I used to know.
17:21 EugeneKay IRC is a small world and all
17:22 omame hello. I have a question about the python client api if I'm not interrupting an ongoing discussion
17:22 Gareth cyberbob: inspired by "The Net"?
17:22 jcockhren omame: IRC is async. interrupt as needed
17:22 jcockhren ;)
17:23 omame but netiquette is bliss ;)
17:23 jcockhren everybody stop typing. omame is about to say something!
17:23 omame so, I'm writing a module to deal with storage controllers. works just fine when invoking from the prompt
17:23 omame ha
17:24 cyberbob Gareth: yeah I have seen that movie (not a bad one)
17:24 rgarcia_ joined #salt
17:24 omame problem is when I call it from salt.client.LocalClient it has an inconsistent behavior
17:24 jcockhren gist your pre and post conditions
17:25 Psi-Jack Heh.
17:25 omame works: return {'blah': 'stuff', 'some': 'other_stuff'}
17:26 omame returns {}: info = class_instance.method_that_returns_a_dict_with_some_stuff(); return info
17:26 cyberbob UtahDave: yeah they have same ID, sorry miss understood the question . .
17:27 cyberbob so identifying them becomes really difficult . .
17:27 jcockhren omame: I'm confused
17:27 omame jcockhren: give me a minute and I'll give you a link to a paste
17:27 Psi-Jack Okay, so "hostname" returns jira, hostname -a returns "localhost.localdomain", and uname -n returns "jira".. and hostname -f was doing "localhost.localdomain", after a change to /etc/hosts is now reporting "jira" Fun fun!
17:27 troyready joined #salt
17:27 jcockhren omame: cool
17:27 Gareth cyberbob: so bad its entertaining :)
17:28 oz_akan_ joined #salt
17:28 troyready joined #salt
17:29 cyberbob Gareth: but i have something in my mind to handle that . . .
17:29 cyberbob :)
17:30 UtahDave cyberbob: on your custom ami is   /etc/salt/minion  already configuring the 'id' config option?
17:30 seubert left #salt
17:31 jcockhren omame: brb changing locations
17:31 matanya joined #salt
17:32 mwmnj joined #salt
17:33 cyberbob UtahDave: no it is not already configured. .
17:34 cyberbob I am thinking about something else, can I put all the hosts in a csv (having IP+region+hostname) as we have this infromation. use fabrick library to install minion on all hosts and add hostname information and than add those to salt-server ?
17:34 UtahDave cyberbob: OK, you're going to have to undo that.  I think your best be is to not statically set the minion's id. I think Salt will use the fqdn if the id is not set manually
17:35 EugeneKay Is this EC2 we''re talking about?
17:35 cyberbob EugeneKay: yeah that is correct . .
17:35 mesmer joined #salt
17:36 EugeneKay I would(and do) use a bit in /etc/rc.local to set the hostname based upon the EC2-provided metadata
17:36 EugeneKay The i-#### basically
17:36 psyl0n joined #salt
17:37 cyberbob EugeneKay: we use hostnames in some different way, each ec2 instance is hosting tomcat war having different name. So the instance name will be same as the name of the war . .
17:37 omame jcockhren: http://pastebin.com/raw.php?i=mv7EVUN0
17:37 EugeneKay You could just use the ami-id in your salt-minion config, then.
17:38 cyberbob UtahDave: unfortunately, FQDN would not work in case of ec2 instances (I think so)
17:38 smccarthy joined #salt
17:39 EugeneKay echo "id: $(curl http://169.254.169.254/latest/meta-data/instance-id)" >> /etc/salt/minion
17:39 EugeneKay Make sure to clean your minion keys out before saving the AMI, and have auto-accept on your master(or something), and tada.
17:41 cyberbob EugeneKay: :)
17:41 eiginn left #salt
17:42 EugeneKay You'll likely want to put the ami-id(or some other identifier of what instance type it is) into grains
17:42 omame jcockhren: oh, forgot to add the working cli paste: http://pastebin.com/raw.php?i=0DTzQ3Qr
17:42 EugeneKay Oh, and make sure to NOT autostart salt-minion service via init; do it via rc after you've made the above change. Took me a few minutes to figure out that derp myself.
17:43 bemehow joined #salt
17:44 cyberbob EugeneKay: sure I have struggled by myself with some stuff like that a few days ago but finally figured that out:)
17:44 bemehow_ joined #salt
17:45 jcsp joined #salt
17:52 lyska joined #salt
17:52 Zuru_ joined #salt
17:53 defunctzombie how do I make salt-cloud output only errors?
17:54 defunctzombie I have -l warning
17:54 defunctzombie do I also need --out quiet?
17:54 shadfc_ joined #salt
17:54 defunctzombie or will that suppress all output?
17:54 defunctzombie it also seems that the -l warning call is not respected when running state.highstate inside of salt-cloud after a machine is provisioned
17:55 shadfc_ hey guys, how do i create a new "service" for salt? I'm trying to create a graphite/carbon state and get the carbon-aggregator.py and carbon-cache.py programs running. So I got some init scripts for those, put them into /etc/init and /etc/init.d and salt recognized neither
17:57 bemehow joined #salt
17:57 defunctzombie also, waht is the best way to run salt-call to have it print only errors
17:57 cnelsonsic joined #salt
17:57 defunctzombie salt commands are really verbose by default
18:00 lyska joined #salt
18:00 abe_music joined #salt
18:05 dstanek joined #salt
18:06 Vye Hey guys, I installed an unfrozen version of 0.17 on my Win machine to debug an issue I am seeing. However, I have a new problem where the minion is getting a permissions error for a temp file. There was an issue opened and a fix added to resolve it but it seems a recent commit removed it.
18:07 rgarcia_ joined #salt
18:08 Vye I also don't see the permission issue for the frozen version of salt. I'll post the issue links here in a sec.
18:09 jdenning joined #salt
18:12 Vye permission error on minion: http://goo.gl/zhqWGL issue and PR to fix: http://goo.gl/o1ryz8 issue where fix was undone: http://goo.gl/G3ecrb
18:12 omame is there anyone else who can help me with the two pastes form above?
18:13 backjlack joined #salt
18:13 vkurup joined #salt
18:13 agh joined #salt
18:13 funzo joined #salt
18:13 moos3 joined #salt
18:13 mfournier joined #salt
18:13 madduck joined #salt
18:13 Gareth joined #salt
18:13 scristian joined #salt
18:13 austin987 joined #salt
18:13 FL1SK joined #salt
18:13 apergos joined #salt
18:13 jbub joined #salt
18:13 arapaho joined #salt
18:13 akitada_ joined #salt
18:13 scalability-junk joined #salt
18:13 rizumu joined #salt
18:13 jrgifford joined #salt
18:13 jgelens joined #salt
18:16 anuvrat joined #salt
18:17 dwfreed Vye: that's a different issue
18:18 dwfreed Vye: 1) what user is your minion running as?
18:20 bhosmer_ joined #salt
18:22 meteorfox joined #salt
18:26 sroegner joined #salt
18:27 Vye dwfreed: It is running as 'vye'. I have tried also right clicking the DOS prompt and clicking "run as administrator" then launching the minion from there. When I look at those tmp files they have a read only attribute that doesn't exist when I make my own call to tempfile.mkstemp
18:28 jcockhren omame: ok I'm back
18:29 jcockhren omame: let me ask the basic Qs
18:29 dwfreed Vye: I'm not sure what's happening, but that function could easily be refactored to not need to do that
18:30 jcockhren 1. Does the user executing the Localclient have permission to execute that module?
18:30 jcockhren also, I would suggest using kwargs for the module code
18:31 jcockhren the reason is because you want the Localclient to be able to distinguish between positional args for the salt command vs args for the function that is to be ran
18:31 jcockhren omame: ^
18:31 jcockhren Anyone else have any thoughts on this?
18:37 ubercore joined #salt
18:37 ubercore I'm thinking that file.chown isn't quite perfect for operating on symlinks. before filing bugs and a PR I wanted to check in on the intended behavior
18:38 ubercore specifically, changing ownership of an existing symlink seems to be impossible
18:38 ubercore os.lchown should be called, but if the symlink already exists, os.path.exists(path) will return True, and salt uses os.chown instead
18:39 ubercore https://github.com/saltstack/salt/blob/v0.17.4/salt/modules/file.py#L311
18:39 shadfc can someone explain this: https://github.com/saltstack/salt/blob/develop/salt/modules/service.py#L24?
18:39 shadfc trying to figure out why service isn't finding my new init scripts
18:40 ubercore shadfc: the platform-specific service module will be used
18:40 ubercore https://github.com/saltstack/salt/blob/develop/salt/modules/debian_service.py for instance
18:41 shadfc hmm, does ubuntu use debians?  Ubuntu is disabled, but I don't see a ubuntu_service.py
18:42 Vye dwfreed: suggestions? It doesn't make sense to me because when I run that code on my own it creates a r/w tmpfile. In fact when debugging that section it sometimes creates r/w tmpfiles and other times creates r/o tmpfiles that error out when M2Crypt tries to write to it. I don't mind doing the leg work.
18:42 erchn joined #salt
18:43 dwfreed Vye: I have no idea why they're becoming readonly
18:43 ubercore I think on ubuntu upstart.py would be used
18:44 ubercore don't quote me on that, though
18:44 erchn hi all, possibly quick question.  if I have a state that's installing an RPM, any ideas on how to figure out later in the sls to know what version was installed?
18:45 erchn one complication being that multiple versions can be installed, like the kernel package
18:45 Vye Should I submit an issue on github? I can't troubleshoot the original issue I'm having if I can't get a non-frozen salt minion to run on Windows.
18:47 StDiluted joined #salt
18:50 ChrisCook left #salt
18:54 druonysus joined #salt
18:54 druonysus joined #salt
18:55 dwfreed oh haha, I see an easy way to fix this
18:55 shadfc erchn: i'm a complete noob but i just ran across this: http://docs.saltstack.com/topics/tutorials/states_pt3.html#calling-salt-modules-from-templates
18:55 shadfc maybe it helps?
18:56 shadfc ubercore: it was not seeing my init scripts because they were not executable.  still not sure which service file is being used
18:57 lineman60 joined #salt
18:57 erchn shadfc: yea, I'm definitely going to end up calling a module, I've settled for just calling pkg.latest_version, instead of knowing which version installed
18:58 erchn thanks for the assistance
19:00 dstanek joined #salt
19:00 jkleckner joined #salt
19:02 kermit joined #salt
19:03 Guest85348 joined #salt
19:04 kermit joined #salt
19:04 JasonSwindle joined #salt
19:04 backjlack joined #salt
19:04 JasonSwindle joined #salt
19:07 aleszoulek joined #salt
19:08 jergerber joined #salt
19:10 DanZ joined #salt
19:10 scoates a minion's master_port corresponds to a master's ret_port, right? and do I need to do anything with the publish_port if ipc_mode is ipc?
19:12 wkf_ joined #salt
19:14 omame right, I'll fire up an email or report a bug about my problem. hopefully someone will be able to help me there
19:15 omame thanks anyway
19:15 omame left #salt
19:16 dwfreed Vye: could you try https://github.com/dwfreed/salt/tree/no-need-for-mkstemp/ ?
19:17 dwfreed it should work, but I've not looked too closely into this function, so I'm not 100% positive
19:17 Vye dwfreed: trying now
19:17 beardo__ what's the correct way to reference a loop variable in an if statement inside that loop? For example, %{ for file in ['foo','bar'] %}, how do I do {% if file == 'foo' %}?
19:21 dwfreed Vye: to ensure that it works in all cases, could you also rm the minion keys on the minion, and then start your minion?
19:21 dwfreed beardo__: just like that
19:21 dwfreed beardo__: but if your loop is that simple, you're better off just unrolling it
19:23 dstanek joined #salt
19:23 jankowiak joined #salt
19:24 Zuru joined #salt
19:25 diegows joined #salt
19:25 robbyt joined #salt
19:26 zfouts joined #salt
19:35 druonysuse joined #salt
19:37 dvl left #salt
19:38 xmltok anyone around that is familar with fileclient? i am working on a module that needs to pull down additional files from the master
19:38 toastedpenguin joined #salt
19:50 ubercore joined #salt
19:51 meteorfox joined #salt
19:54 dwfreed Vye: did it work for you?
19:56 mesmer joined #salt
19:56 [diecast] joined #salt
20:00 defunctzombie so if salt-cloud has been merged into salt repo
20:00 defunctzombie how do I install salt-cloud?
20:02 bhosmer joined #salt
20:03 forresta defunctzombie, it's only part of develop, install from pypi
20:03 forresta https://pypi.python.org/pypi/salt-cloud
20:03 defunctzombie forresta: thanks
20:03 forresta np
20:03 j__ joined #salt
20:04 ashtonian joined #salt
20:07 druonysus joined #salt
20:11 jacksontj joined #salt
20:14 Vye dwfreed: Yes, it did but there is still a problem that I don't understand. It got beyond the key file part this time but when it got to updating highstate.cache.p it failed with a permission error. I checked and sure enough the file is RO. If I delete the file it will work once, but when it tries to update it again it will fail.
20:15 dwfreed Vye: sounds like something on your system is making %TMPDIR% files readonly
20:16 Vye dwfreed: per your request, I deleted the minion keys and got this error when I started it: https://gist.github.com/Vye/dabbedc7f8aa87dba7ec
20:16 th3reverend joined #salt
20:17 th3reverend left #salt
20:22 Vye dwfreed: highstate.cache.p is located in C:\salt\var\cache\salt\minion, which is automatically created by the minion. I have been followed the win build doc here: http://docs.saltstack.com/topics/installation/windows.html which says to create C:\salt and copy the var/conf dirs from the repo.
20:22 Vye following*
20:22 dwfreed Vye: so something on your system is setting files readonly, and I don't think it's salt that's doing it
20:23 bemehow joined #salt
20:23 shadfc is there a way to target based on EC2 tags?
20:25 dwfreed Vye: and I know why it failed after you deleted your keys; you're using 0.17 mostly, but my patch was against develop, and you just grabbed the crypt.py from my branch wholesale; you may be able to fix that by adding 'keysize: 4096' to your minion config
20:26 dwfreed 0.18 will bring an option to set the size of the keys generated, so you can use something larger than 4096 if you want
20:27 Vye dwfreed: that's what it looks like, but it certainly doesn't make any sense when I run python code the exact same way, even using mkstemp and they are not RO.
20:27 beardo__ dwfreed, yeah, it doesn't seem to be matching when file == 'foo' - it's only two elements, so I'll just unroll it - thanks!
20:27 Vye dwfreed: sorry about that, forgot to mention I did that. I originally grabbed your entire repo but I was missing some 'resource' module so minion wouldn't start.
20:29 Vye dwfreed: I'll keep troubleshooting, thanks for your looking into it with me.
20:29 beardo__ doh, I just realized I did file == 'foo-bar' when the element in the list was 'foo_bar'. Now it works!
20:30 * beardo__ smacks head on table
20:31 cdn joined #salt
20:31 cdn hey guys, have a question that i've been trying to work around and I must be doing this wrong. :)
20:31 dwfreed Vye: it looks like you can apply my patch on 0.17's crypt.py
20:31 cdn Trying to load a value from a Pillar with an entry I read from a Grain, here is my scenario
20:32 dwfreed __salt__['pillar.get'](grains['some_key']) ?
20:33 cdn {% set jdk = salt['pillar.get'](salt['grains.get']('test.scenario')+'jdk.pkg') %}  {{ jdk }}:   pkg:     - installed
20:33 btorch quick question for the salt gurus here in regards to the saltconf pre-conf classes.. I'm no expert but already confortable with salt states, grains, jinja templating.. have not yet touched modules but about to. wondering if the "Advanced SaltStack States for Configuration Management" is ok for someone like me or the introduction one would be best
20:34 forresta btorch, I don't know what that class will contain, you might want to shoot an email over to the address on the site if you don't get an answer in here.
20:34 btorch cool thanks
20:34 mgw joined #salt
20:34 cdn I need to build the string for the Pillar get call
20:35 dwfreed cdn: there's a much better way to do this, and that is to set the id to jdk, and use the name setting inside the pkg to set the actual name of the pkg to install
20:35 cdn in my pillar I have different scenarios defined with say different JDKs to use
20:35 cdn ah true, how can I use it for other lookups other then pkgs
20:36 dwfreed jdk:  pkg:    - installed    -name: {{ salt['pillar.get'](grains['test.scenario'] + 'jdk.pkg') }}
20:36 dwfreed err, space after the second dash before name
20:36 dwfreed most state functions take a name argument
20:36 dwfreed and that overrides the id in the dec
20:37 dwfreed (if name isn't specified, id is used by default, in other words)
20:41 higgs001 joined #salt
20:46 cdn cool, going to giver a try now :)  thanks
20:47 pcurry_nomi joined #salt
20:47 pengunix joined #salt
20:53 oz_akan_ joined #salt
20:53 cewood joined #salt
20:54 cachedout joined #salt
20:57 elithrar_ joined #salt
21:00 shadfc ok, what am i doing wrong here? https://gist.github.com/jwineinger/8029757
21:01 forresta change your require to pkg: node_stuff
21:01 shadfc so requires point to my salt identifiers, not to actual packages?
21:01 shadfc that worked, thx
21:02 forresta shadfc, yep, salt considers those two packages as a 'part' of node_stuff, so it doesn't get that you want a specific item from within node_stuff.
21:02 * whiteinge shakes his fist at forresta's awesome
21:02 forresta and np
21:02 jacksontj joined #salt
21:02 bhosmer joined #salt
21:03 forresta whiteinge, heh, it helps when that's a common error :P
21:03 jcockhren forresta be winning all the time
21:03 forresta yessssss
21:03 forresta getting those internet points
21:04 jcockhren forresta: you mean like, https://trustcloud.com/
21:04 jcockhren haha
21:05 forresta never heard of that till today jcockhren
21:05 jcockhren you're welcome
21:06 th3reverend1 joined #salt
21:06 th3reverend1 left #salt
21:07 forresta no I'm not going to do that
21:07 forresta lol
21:07 jcockhren haha
21:07 forresta the fewer places that have my information the better
21:12 Sheco joined #salt
21:16 cdn hi dwfreed, I had an error with that grain/pillat stuff
21:17 cdn - name: {{ salt['pillar.get'](grains['test.scenario'] + 'jdk.pkg') }}
21:17 kaoskitn joined #salt
21:17 cdn gives and unknown jinja variable
21:17 cdn any ideas how I can start debugging this
21:17 kaoskitn greets.
21:18 ipmb joined #salt
21:18 kaoskitn So I have a question about timeouts.
21:19 scoates cdn: is that in a state file? or in pillar data?
21:19 cdn in state
21:20 scoates can you use {{pillar[grains['test.scenario']+'jdk.pkg']}} ?
21:20 Topic for #salt is now Welcome to #salt - SaltConf Jan 28-30, 2014! http://saltconf.com (reg deadline January 3) | 0.17.4 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers - Channel logs are available at http://irclog.perlgeek.de/salt/
21:28 smccarthy2 joined #salt
21:29 zfouts joined #salt
21:31 kaoskitn I'm using LocalClient.cmd, and I'm getting: "SaltReqTimeoutError: Waited 60 seconds", even though timeout is set to much more than that.
21:32 rlarkin joined #salt
21:32 rlarkin dang , thought I was logged in all day , then I looked at the time stamps.  gotta setup a real client
21:33 shadfc so if I'm using npm.installed on a package and I want to make sure a service waits until that is installed, is this the right syntax? "- require:  - npm: <npm pkg name>"
21:34 rocket joined #salt
21:34 rlarkin I'm unable to get salt '*' cmd.run "echo $http_proxy"  to return set.  my proxy is in profile and environment , apt-get works with salt-call and ssh but not from the salt-master
21:35 forresta shadfc, if each item in npm is a unique item, yes, if it's like your example previously (doesn't load on gist any more), then you'd have to target the top level
21:35 rocket I am trying to install salt-cloud and I am getting this error .. is it a known issue?  ImportError: No module named libcloud.compute.types
21:36 dave_den1 shadfc: no - you probably want to use 'watch' which is an implcit 'require' but can take other actions when the watched state changes. Also, watch/require references are in the form of 'module: ID_declaration'. So you want to say:  - watch:\n    - npm: your_id_declaration"
21:36 ajw0100 joined #salt
21:37 forresta dave_den, Ahh my bad, I was assuming it was doing the initial config of the service, not the restart.
21:37 forresta or reload
21:37 mgw does the returner api have a way to pass an arg from a schedule into a returner?
21:38 dave_den forresta: i just assumed heh
21:38 forresta hah
21:39 dave_den well that's my contribution to #salt today. off to do more xmas shopping. blerg
21:39 kaoskitn So I've found this issue, which appears to be the same issue I'm experiencing...  https://github.com/saltstack/salt/issues/2932 ... but that was months ago, and the issue was closed, but I'm seeing it now in 0.17.4.  Any ideas?
21:41 forresta dave_den, so you mean the internet?
21:42 dave_den heh, yeah, pretty much
21:43 dave_den kaoskitn: is your code working when running as root?
21:44 shadfc ok, how do you go about debugging? I changed my sls file and tried to apply it to a minion. All salt is doing is printing my minion's hostname and then exiting back to prompt
21:46 jacksontj joined #salt
21:46 kaoskitn dave_den:  I am running as root
21:46 shadfc log level 'garbage' and verbose option don't reveal any errors
21:47 kaoskitn dave_den: in other words: It still happens.  It's intermittent...   most of the time, it succeeds, but sometimes, it gets that 60 second timeout.
21:49 shadfc hrm, must be a YAML syntax error that is just swallowed
21:49 ajw0100 joined #salt
21:49 scoates rlarkin: looks like your local shell is capturing that $. Try this? salt '*' cmd.run "echo \$http_proxy"
21:49 scoates I don't know if cmd.run actually picks up the environment, though
21:49 kaoskitn shadfc: try running your minion directly instead of as a daemon.  use sudo salt-minion -l trace
21:50 scoates whoever decided that the proper behaviour for a minion without a keypair or minion_id is to generate them on startup: thank you.
21:50 kaoskitn shadfc (and don't forget to kill your minion daemon process first :D
21:50 cro joined #salt
21:51 kaoskitn shadfc: You can probably also check /var/log/salt/minion to see the logs from your daemon. If it's an exception, it'll be in there.
21:52 bemehow_ joined #salt
21:56 kaoskitn elo?
21:57 shadfc sorry, one of my human minions needs me
22:02 kaoskitn so no one is helping me any more it seems...  anyone else want to try?  So I've found this issue, which appears to be the same issue I'm experiencing...  https://github.com/saltstack/salt/issues/2932 ... but that was months ago, and the issue was closed, but I'm seeing it now in 0.17.4.  Any ideas?
22:03 kaoskitn I think it's a regression
22:04 lineman60__ joined #salt
22:04 higgs001 joined #salt
22:05 dccc joined #salt
22:06 xmltok joined #salt
22:06 dccc joined #salt
22:06 sgviking joined #salt
22:06 rlarkin scoates:   salt '*' cmd.run 'echo $(env)' I think this is pretty certain
22:06 rlarkin nothing in profile is there.
22:10 mpanetta Anyone here knowledgeable with the pip state?
22:11 mpanetta I can't get it to install the correct version of a package.
22:11 shadfc which package?
22:11 mpanetta falcon
22:11 shadfc which version do you want and which are you getting?
22:11 mpanetta It keeps insisting on installing 0.1.6.post3, when 0.1.7 is the latest.
22:12 bemehow joined #salt
22:13 mpanetta Here is an odd message I get as well:   Requested falcon>=0.1.7,<0.2.0 (from marconi==2013.12.18.0800), but installing version 0.1.6.post3
22:13 mpanetta This is 0.16.4 minion/master BTW
22:13 shadfc is marconi something you're explicitly installing?
22:13 mpanetta yes
22:14 mpanetta I tried to explicity install falcon but I get the same behaviour.
22:14 shadfc how are you specifying marconi?  i find no releases on pypi
22:14 mpanetta It is a git repo
22:15 mpanetta I am installing from that
22:15 shadfc its requirements.txt has this: falcon>=0.1.6,<0.1.7
22:16 mpanetta Not in the repo I have, it has falcon>=0.1.7,<0.2.0
22:16 shadfc oh, i'm looking at https://github.com/openstack/marconi
22:16 mpanetta Hence the odd requested message above
22:16 mpanetta Yeah this is a private fork
22:17 mpanetta because of that one version line lol
22:17 * mpanetta mumbles about politics
22:19 mpanetta It is a very odd response, I don't understand why it says that it knows I requested 0.1.7 or >, but installs 0.1.6 anyway.
22:19 shadfc yeah. are there any other packages specifying it as a dependency?
22:20 shadfc or are you using a private pypi index or something?
22:20 mpanetta Not that I am aware of, and I can manually upgrade the package on the command line with pip install --upgrade
22:20 mpanetta nope, public index
22:22 shadfc not sure what to tell you. my guess is that something else in the dependency chain is specifying the older version of falcon
22:22 ajw0100 joined #salt
22:24 modafinil i'm trying to use rvm in a cmd.run -- which doesn't work as you might imagine
22:24 modafinil any simple workarounds? i tried setting the shell to /bin/bash -i, but salt chokes on it
22:24 modafinil https://gist.github.com/jzellner/5c62aa8bab5e86610ec5
22:24 shadfc mpanetta: have you reviewed the pip log on the minion to see what all is happening? i think using the log = /some/path/pip.log in your salt state might get you a little more info
22:24 mpanetta let me try that
22:25 xmltok whiteinge: i just issued a pull request for that defaults code. i don't have the jinja templating but hopefully that is a trivial thing to add if its necessary
22:25 whiteinge xmltok: cool! templating is easily added.
22:27 tim__ joined #salt
22:28 fuser joined #salt
22:29 xmltok i figured it would be a 5 minute job for someone that knows how templating works or a 45 minute job for me to track it down and add it in :)
22:34 diegows joined #salt
22:34 t2 joined #salt
22:36 t2 Does anyone know when 0.17.4 rpms are going to be available via epel-testing ? cheers
22:37 higgs001 joined #salt
22:38 mpanetta shadfc: trying that log thing now.
22:41 troyready joined #salt
22:41 elfixit joined #salt
22:42 troyready joined #salt
22:43 omame joined #salt
22:43 omame jcockhren: you around?
22:44 JasonSwindle joined #salt
22:44 jcockhren omame: yep
22:45 jcockhren you would pop back up 5 min after I close those tabs from before. haha
22:45 omame sorry, my bnc went crazy and I just spotted your replies in the logs
22:45 jcockhren it's cool
22:45 mpanetta shadfc: Ok, seems like I am having a solar flares kind of day... Now it seems to be working.
22:45 jcockhren no worries
22:45 mpanetta shadfc: Thanks for the help :)
22:46 omame so, I'm running LocalClient as sudo
22:46 shadfc mpanetta: ha.  no problem
22:46 harobed_ joined #salt
22:46 jcockhren omame: yeah. you need to run localclient as the same user that salt-master is runner
22:46 jcockhren running
22:47 omame which is root
22:47 harobed_ joined #salt
22:47 jcockhren or or
22:48 jcockhren run local client under an approved user listed under the master acl
22:48 omame I'm happy to run it as root
22:50 whiteinge LocalClient() is also already set up to use eauth if you'd like to use that. just put username/password/eauth or token/eauth kwargs in the .cmd() call
22:50 jcockhren those pastes have been removed
22:50 jcockhren :(
22:51 jcockhren omame: ^
22:51 omame 1sec
22:51 dstanek joined #salt
22:51 omame I was repasting it: http://pastebin.com/8j9Ww8Ju
22:52 xmltok whiteinge: WRT a CLI example, what do you think this module should do for a CLI call? It doesn't really make sense to use it from a CLI.
22:53 omame jcockhren: ^
22:54 whiteinge xmltok: that's ok. just put a simple example of how you'd use it to return a value and how to return a value that is overridden by pillar
22:55 whiteinge even if no one will actually use it that way :)
22:58 rojem joined #salt
23:01 xmltok right now the problem is that for it to know what formula it is in it needs to inspect the stack, there is no formula & stack if its a CLI call. i suppose i can throw some logic in there to figure out if its a CLI call and make it take an additional 'formula' parameter. seems crappy
23:02 omame jcockhren: oh, and I'm running 0.17.2, both on master and minion
23:06 jcockhren omame: could you post the debug output from running the localclient command?
23:06 jcockhren run the salt-master with '-l debug'
23:07 xmltok whiteinge: yeah its not even trivial to do that, since i get the template path from the stack too. i suppose i could make it work just like pillar.get on the CLI. that would be easy enough to do but not really useful if you wanted to use the CLI to debug your defaults.get command
23:12 jfzhu_us joined #salt
23:12 omame jcockhren: good idea, but I can't see much from the output: http://pastebin.com/raw.php?i=wDXz5SKR
23:13 whiteinge xmltok: sorry, was afk. yeah, that makes sense. i didn't think about that. don't waste any time getting it to work on the CLI
23:14 whiteinge xmltok: just add explanatory docstrings for what it is and how it's used and for the CLI Example just put:  ``salt '*' state.sls <nameofsls>`` and ``salt '*' state.highstate``
23:14 whiteinge that'll make sense to the reader and the test suite won't complain :)
23:15 t2 joined #salt
23:17 * xmltok im going to make it work like pillar.get from the CLI and tell people its not the good stuff
23:17 xmltok whoa weird /me
23:17 derelm joined #salt
23:17 Wayne606 joined #salt
23:18 jcockhren omame: are the function args suppose to be text? or integters?
23:19 Wayne606 Hello...  I am having problems with salt on a cluster of vagrant nodes...  The minions connect and I accept the keys but salt '*' test.ping gives no results.  Sometimes it gives one or two minions but then they seem to drop out.  Any thoughts?
23:19 omame jcockhren: can be both: they'll end up being added to a string by format()
23:20 omame the thing is the command makes it to the minion, the minion executes the code and just returns {}
23:21 omame it works, but silently
23:21 jcockhren what does the minion debug log says?
23:21 xmltok whiteinge: check out the docstring in here https://gist.github.com/bigkraig/7998461, if you think that loosk good i'll update the pull req
23:22 Wayne606 jcockhren: usually nothing..  I just restarted both with -l debug
23:22 whiteinge xmltok: perfect. thanks for doing that
23:23 Wayne606 I do a test.ping now and I get a result
23:23 Wayne606 but...
23:24 jcockhren Wayne606: that was for omame sorry
23:24 jcockhren omame: what does the minion debug log say when the command is running?
23:25 Wayne606 I start a second minion..  I do another ping and I get the result back from that second one and not the first one.  I see stuff in the second minion debug log but not the first
23:25 omame I'm running it
23:25 omame one more second
23:25 Wayne606 no problem...  I am starting to think my problem is because of virtualbox/vagrant
23:25 jcockhren Wayne606: actually... you may be correct
23:26 jcockhren Wayne606: you know... b/c vms are files
23:26 omame jcockhren: http://pastebin.com/raw.php?i=8yQdf0V2
23:26 omame same thing
23:26 Wayne606 All the machines seem to be responsive via ssh...  But the minions are not getting the packets from the master
23:27 Wayne606 Could it be a problem with zeroMQ in that environment?
23:28 jcockhren omame: could you do the same with the get_info call?
23:28 omame sure
23:28 Marion joined #salt
23:28 jcockhren also... print out info['physical_drives'] in the debug
23:29 jcockhren I wonder what kind of responses the .delete() call is giving
23:29 jcockhren like what is in 'info'
23:29 jcockhren (before it's overwritten)
23:30 rgarcia_ joined #salt
23:31 pcurry_nomi joined #salt
23:40 kermit joined #salt
23:40 omame I can't get pdb to hook up in the salt module
23:41 omame is there a helper to print out stuff in the debug log?
23:41 jcockhren tail
23:41 jcockhren lol
23:41 anitak joined #salt
23:41 omame I'm running in foreground, I can see the log
23:41 Wayne606 Hmm...  No matter what I do I can't get more than one minion talking to the master
23:42 jcockhren ah. I see what you mean
23:42 jcockhren yeah
23:42 omame I mean, is there a logger object in salt that I can use to print out variables?
23:42 jcockhren it is.
23:42 Wayne606 I guess I will go ask in the goggle group
23:42 Wayne606 left #salt
23:43 Wayne606 joined #salt
23:43 jcockhren omame: import logging
23:43 omame ok
23:43 Sheco joined #salt
23:43 jcockhren https://github.com/saltstack/salt/blob/7aed73f5bcc5b54d1d05029c9c78438910a9ba5b/salt/utils/s3.py#L22
23:43 jcockhren and line 22
23:43 jcockhren log.debug("something")
23:44 alunduil joined #salt
23:44 capricorn_1 joined #salt
23:45 bhosmer joined #salt
23:48 modafinil why is salt not playing nicely with upstart? I have a service that ONLY exists as an upstart service, it runs on boot, if i boot the machine and run service.start (or use an sls with service.started) it starts a second copy (wtf?)
23:49 dwfreed blame upstart
23:49 dwfreed if you read the upstart module for salt, you'll see that it just uses upstart's service functionality
23:50 dwfreed I'd suggest rebooting the machine, and then checking output of service foo status
23:50 omame jcockhren: http://pastebin.com/raw.php?i=1Fc4LgTU
23:50 dwfreed to see if upstart considers it running
23:50 modafinil dwfreed: yeah i just ran what was to be a damning test (service.stop, then compare service.status with 'status foo')
23:51 modafinil turns out it is damning of upstart fuckery (both report stopped, proc still running)
23:51 modafinil upstart :/
23:51 omame and you just need to import logging; logging.debug('blah')
23:51 modafinil i want to like you so much, but you make it so hard
23:51 dwfreed right, upstart probably never considered the first one running
23:52 honestly does upstart really work with the 'service' command?
23:54 modafinil salt command yes, /usr/sbin/service no
23:55 seanz left #salt
23:56 jcockhren modafinil: so this is how you break the news to meeee?
23:56 jcockhren haha
23:57 modafinil hrmm?
23:57 jcockhren omame: dude. this is puzzling me. I'm also low on sleep
23:58 jcockhren omame: I got to eat. I'll look later tonight, b/c this my affect me as well
23:58 omame tell me about it: it's midnight over here
23:58 jcockhren laters
23:58 omame cool, I'll check out the channel tomorrow morning
23:58 omame thanks for the help

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