Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-10-24

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

All times shown according to UTC.

Time Nick Message
00:00 mwmnj I know the minion sets its self up by specifying the master in its config
00:00 mwmnj so presumably this "pings" the master in some way
00:00 mwmnj But after that intial connection at set up, I am unsure of what occurs
00:01 mwmnj does the minion_data_cache store some info? is the connection just kept open?
00:01 mwmnj Or does the pki_dir get new credentials? http://docs.saltstack.com/ref/configuration/master.html#pki-dir
00:01 mwmnj Just trying to demystify the "magic" thats all
00:04 pipps joined #salt
00:06 Thiggy joined #salt
00:06 mwmnj honestly: ok, so it opens a new connection for each command? Where are the minion credentials saved on the master?
00:06 honestly pki_dir should keep the minion's public key
00:08 mwmnj honestly: do you know what format that is? a different file for each minion, a single file? .slt, plain text?
00:08 honestly no
00:09 honestly salt uses ZMQ I think
00:09 honestly as bus between minions and master
00:12 UtahDave mwmnj: I just a quick minute before I have to go, but let me explain this for you
00:13 * honestly gathers around the fireplace
00:13 mwmnj UtahDave: :)
00:13 UtahDave mwmnj: In regular Salt usage each minion reaches out to the master in a zeromq pub/sub setup
00:13 UtahDave The master "publishes" a command with a target to the pub interface, and then the minions who match the target execute the command
00:14 UtahDave so  salt '*' test.ping       will cause all the connected minions to return  "True"
00:14 UtahDave In this scenario the master needs ports 4505 and 4506 open and the minions can be nat firewalled
00:15 UtahDave So if you want to know which minions are currently connected you can run a command like this:    salt '*' managed.up
00:15 UtahDave no,    salt '*' manage.up
00:15 UtahDave All those commands go over an encrypted zeromq connection
00:15 mwmnj So there is a always a persistent connection to the minions through zeromq?
00:16 UtahDave Yes, there's a lightweight heartbeat to keep the connection up
00:16 mwmnj and if a minion goes down, the salt config on the minion will reconnect it to the master when its brought back up?
00:17 UtahDave if they get disconnected the minion will try occasionally to reconnect
00:17 UtahDave yes, it will reconnect on boot
00:17 mwmnj Master has no record of the minions it is connecting to other than through zeromq?
00:18 UtahDave salt-key -L will list all the minions whose keys it has accepted
00:18 cowmix jijna question..... I have a for loop: {% for ipaddr in XXXXX %}... but i want XXXXX to be a variable in the template.. is that possible?
00:18 UtahDave The master also has a cache of info about its minions that help it to predict which minions should return for an arbritrary target
00:19 UtahDave cowmix: Yeah, look up the "set" syntax in jinja
00:19 UtahDave we recently released salt-ssh which provides an alternate scenario, as well
00:19 mwmnj UtahDave: What about the master pki-dir: http://docs.saltstack.com/ref/configuration/master.html#pki-dir
00:20 mwmnj Does it store the keys of every minion there?
00:20 UtahDave mwmnj: Yeah, salt-key basically lists the minion keys in the pki_dir
00:20 UtahDave yes, every minion key MUST exist in the minion directory in the pki_dir
00:20 mwmnj @UtahDave: ah ha
00:20 cowmix correction.. I want the name of the XXXXX variable name to be what XXXXX is set to
00:21 mwmnj UtahDave: that answers my questions perfectly, thanks!
00:21 cowmix so if XXXXX == ipList.. i want the actual template to render as {% for ipaddr in ipList  %}
00:22 cowmix so.. XXXXX is a string with the value ipList
00:26 Snow-Man joined #salt
00:27 UtahDave cowmix: I'm not sure. I really have to head home right now.
00:27 avienu joined #salt
00:27 UtahDave cowmix: if you haven't figured it out, I'll help you track it down tomorrow. Is that cool?
00:29 cowmix UtahDave: sure!
00:29 UtahDave cool. talk to you tomorrow
00:32 wkf joined #salt
00:41 mgw joined #salt
00:59 mgw joined #salt
00:59 SEJeff_work joined #salt
01:04 danielbachhuber joined #salt
01:05 cocoy joined #salt
01:10 Ryan_Lane joined #salt
01:10 redondos joined #salt
01:10 redondos joined #salt
01:10 nahamu okay, so I've built an esky build of salt (on SmartOS), but now I'm getting this error:
01:10 nahamu salt.exceptions.LoaderError: The renderer yaml_jinja is unavailable, this error is often because the needed software is unavailable
01:12 nahamu http://paste.ec/?dac9f95a3b902d07#IOIjo/+wd6//nk/AB0rDAm1upbQbckHxpXwHgmhvsaI=
01:16 Nexpro joined #salt
01:16 Sypher joined #salt
01:22 __number5__ nahamu: do you have yaml and jinja2 installed? what's the output of salt-call --versions
01:31 redondos joined #salt
01:31 redondos joined #salt
01:37 nahamu __number5__: http://paste.ec/?6458a0f1c7c2d4a9#AYDFTRtxY1bUJX9YhkbFoTMJcqNArW+KtjapM5aPAOY=
01:37 nahamu looks like they're there.
01:40 ajw0100 joined #salt
01:40 nahamu anything else I can check?
01:42 dthom91 joined #salt
01:45 __number5__ that weird
01:45 __number5__ you don't have any python files happened to name as yaml.py or jinja.py right?
01:45 nahamu I don't think so.
01:45 SEJeff_work joined #salt
01:46 redondos joined #salt
01:46 redondos joined #salt
01:46 __number5__ what's the renderers settings in your master config?
01:47 nahamu I don't have a master running yet. I was just trying to test local execution first.
01:47 nahamu the master config file is empty.
01:47 felixhummel joined #salt
01:47 nahamu I can put things in it if I need to.
01:48 __number5__ add -l debug to your grains.items call
01:49 nahamu http://paste.ec/?be1082220a37993a#Ep7NQU8NVIP9K44uUiXMYSDGQew8vs2p6pP4J3fO/hY=
01:50 nahamu looks to me like the magic the bbfreeze/esky are doing with the zip file isn't quite working...
01:51 nahamu erm, the zip file might not contain a "renderers" directory...
01:51 __number5__ /opt/salt/salt-0.17.1.solaris-2_11-i86pc_64bit/library.zip is this a real zip or just a directory?
01:52 nahamu bingo. bbfreeze/esky didn't pack in a renderers in there
01:52 nahamu real zip
01:52 __number5__ (facepalm)
01:52 nahamu now how do I get it do do that? update the FREEZER-whatver section in setup.py?
01:52 nahamu what would I put? "salt.renderers" ?
01:53 nahamu or even "salt" ?
01:54 danielbachhuber joined #salt
01:55 __number5__ sorry, I don't know how freezer/esky works
01:55 nahamu I'll bug UtahDave tomorrow.
01:56 nahamu thanks for your help.
01:56 __number5__ np
02:01 nahamu well, I did an ugly hack to jam more files into the zip, but still no love...
02:01 nahamu thanks again.
02:02 nahamu perhaps tomorrow I'll get this figured out.
02:09 brianhicks joined #salt
02:31 xl joined #salt
02:43 CheKoLyN joined #salt
02:44 druonysuse joined #salt
02:44 druonysuse joined #salt
02:44 SEJeff_work joined #salt
02:52 alunduil joined #salt
02:53 mua joined #salt
02:56 jasoncn joined #salt
02:56 jasoncn hello
02:56 bhosmer joined #salt
03:10 UtahDave joined #salt
03:14 mafrosis joined #salt
03:18 xerxas joined #salt
03:18 xl joined #salt
03:21 jalbretsen joined #salt
03:24 jergerber joined #salt
03:27 bhosmer joined #salt
03:30 jasoncn joined #salt
03:35 forrest joined #salt
03:35 HeadAIX joined #salt
03:39 taylorgumgum joined #salt
03:50 CheKoLyN joined #salt
04:00 forrest Hey UtahDave, did you guys already rebuild the docs for tonight?
04:01 UtahDave I'm not sure. I think they're set to autobuild every hour or something like that
04:01 UtahDave has something not shown up that you are expecting?
04:02 forrest No, I just put in a pull request for the halite docs (so there is at least something up on the docs website), and wasn't sure if it was worth asking about approval.
04:02 wbill joined #salt
04:02 forrest I thought you guys couldn't set them to autobuild because of the resources previously?
04:03 UtahDave I'm not sure. I think whiteinge might have gotten it working
04:03 forrest oh sweet, no worries then :P
04:05 UtahDave cool.  Thanks for working on those docs!
04:06 forrest yea np
04:06 wbill joined #salt
04:17 noob2 joined #salt
04:17 noob2 salt: i'm trying to copy/paste the scheduler stuff from: http://docs.saltstack.com/topics/jobs/schedule.html#scheduler-with-returner and i'm getting a error on highstate saying it's not formed as a list
04:18 noob2 i'm running version 16.4.1
04:18 woebtz joined #salt
04:18 UtahDave can you pastebin what you have, noob2?
04:19 noob2 UtahDave: you're amazing
04:19 noob2 i can't believe you're still monitoring the channel haha
04:19 amahon joined #salt
04:19 forrest UtahDave lives here
04:19 noob2 here's my state file called host-stats.sls: http://fpaste.org/49078/82588376/
04:19 forrest he keeps his kids in a shed in the back so he can hang out with us
04:20 noob2 lol
04:21 noob2 It throws this: The state "schedule" in sls core.host-stats is not formed as a list
04:22 UtahDave ah, so the scheduler stuff goes in your master config, noob2
04:22 noob2 oh..
04:22 noob2 it's not a state
04:22 noob2 i see
04:23 jasoncn joined #salt
04:23 noob2 sorry... i didn't read the docs closely enough
04:24 UtahDave no, that's ok.  I already yelled at noob1 earlier
04:24 noob2 haha
04:24 UtahDave :)
04:24 noob2 damn noobs :D
04:25 noob2 i'll drop it in the minion config so it gets run everywhere
04:25 xl [salt.loaded.int.module.pip][ERROR   ] Can't parse line '## FIXME: could not find svn URL in dependency_links for this package:'
04:25 noob2 time to put the minion config under salt control
04:25 UtahDave I'm having fun playing with my raspberry pi that I salted today. It's sitting back in my office still obeying all my salt commands
04:25 xl pip seems broken after I upgrade from 0.16.0 to 0.17.1, any suggestions?
04:25 noob2 sweet
04:26 noob2 my raspberry pi is a media center for us
04:27 UtahDave xl: could you open an issue on that?
04:27 UtahDave noob2: xbmc?  My daughters love when I hook up the pi to the projector
04:27 xl sure
04:28 UtahDave xl: is it the pip module?
04:28 UtahDave or state?
04:28 SEJeff_work joined #salt
04:28 xl pip state, I'm using gitfs
04:28 noob2 UtahDave: yeah raspbmc.  super easy to setup :)
04:29 UtahDave xl: I think that error may be fixed in the develop branch
04:30 UtahDave noob2: yep.  I've got a separate sdcard for that
04:30 noob2 does it work well with the projector over hdmi?
04:32 UtahDave yeah, it's awesome. Even the audio plays over hdmi on the projector
04:32 UtahDave Although the speakers on the projector are pretty mediocre
04:33 noob2 hah that's great :D
04:41 taylorgumgum joined #salt
04:44 middleman_ joined #salt
04:47 jasoncn joined #salt
04:47 forrest UtahDave, you should post your rasbpi in a toaster, and bring that with you to conferences
04:47 forrest and exclaim how salt is so lightweight a toaster can run it
04:47 UtahDave lol
04:48 UtahDave hmm.  that does get me to thinking...
04:52 UtahDave Ooh, I just realized what I'm going to do tomorrow.
04:53 UtahDave Today I hooked up a button to my pi and set it up to play a sound when the button is pushed.
04:53 UtahDave Tomorrow I'm going to set create a raspberry pi Salt module and set it up so that when the button is pushed it sends an event up to the master
04:54 UtahDave which the reactor listens for and runs a hightstate when the button is pushed
04:57 cwarner joined #salt
04:57 mafrosis lo
04:58 forrest so this is what you do between trying to burn out the toaster oven at work UtahDave? :P
04:58 forrest You can't crank the heat on too high when you're making corn dogs on those things, the heating elemental will burn the outside!
04:59 UtahDave :)
05:02 carmony my vagrant-salt-cloud code is almost finished...
05:02 UtahDave carmony: nice11
05:02 UtahDave s/nice11/nice!!
05:03 jasoncn joined #salt
05:04 pipps1 joined #salt
05:05 carmony When does a minion generate it's own keys?
05:05 UtahDave carmony: the first time the salt-minion starts up
05:05 forrest when you start the service I believe
05:05 carmony see, I wonder if I'm having an issue with that
05:07 carmony so with my freshly installed minion
05:07 carmony it hasn't registered a key yet
05:07 carmony but if I do a salt-call test.ping
05:07 carmony I see this in the log:
05:08 carmony [INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
05:08 carmony [INFO    ] Generating keys: /etc/salt/pki/minion
05:08 carmony and then if I do a salt-key -L I see it
05:09 forrest that's odd.
05:09 UtahDave carmony: in the minion's log, right?
05:09 carmony well that is outputted to std-out I think
05:09 UtahDave gah, I'm tired.
05:09 carmony or stferr
05:09 carmony stderr*
05:10 UtahDave salt-call doesn't start up the service
05:10 carmony thats really odd
05:10 carmony hmmm
05:10 mafrosis does anyone know about issues installing packages using pkg.latest ?
05:11 mafrosis I'm trying to get git latest installed from a different repo (wheezy-backports)
05:12 UtahDave what version you running, mafrosis?
05:12 mafrosis 0.17.1
05:12 mafrosis This patch looks like it's on the same road I am
05:12 mafrosis https://github.com/terminalmage/salt/commit/4ba6d8449bcb20da596a4b77deaa92beb6546278
05:12 mafrosis but I'm not installing a virtual package AFAIK
05:14 mafrosis I think I'll open a ticket and let terminalimage take a look
05:14 UtahDave cool
05:14 mafrosis this is beyond me :p
05:15 wbill left #salt
05:19 carmony huh, I think it was a race-condition
05:20 carmony my script would continue running before salt-minion had time to create a key and connect to the master
05:25 UtahDave yeah, it takes a few seconds for the minion to crunch the crypto and be ready to go
05:26 UtahDave Ha!  my first stab at Raspberry Pi module and I can already read the status of the GPIO pins
05:26 forrest Unless it's part of the toasterPi, I'm not interested UtahDave :P
05:26 UtahDave wish someone were in the office to go hold down the button
05:27 UtahDave fine, forrest, I'll hook up the toaster too.   :)
05:27 forrest sweet
05:27 forrest corndog.sls
05:27 forrest boom
05:28 jumperswitch joined #salt
05:33 carmony so I figured out my salty-vagrant issue
05:33 carmony if you install from git
05:33 carmony it will by default install 0.13.0-64-g1d31da6
05:33 jasoncn joined #salt
05:37 Furao is jenkins.saltstack.com run 0.17.1 ?
05:37 Furao because my own jenkins report error with 0.17.1 with salt.client.LocalClient
05:40 Furao I mean, I didn't had to search for it, it broke exactly when I upgraded
05:41 UtahDave Furao: do you mean is jenkins.saltstack.com testing 0.17.1?
05:41 Furao should I create an account for salt dev to my own jenkins? it found all the errors before everyone else
05:41 Furao does it use salt 0.17.1 to test salt :)
05:42 UtahDave I'm not exactly sure. I don't know if it has been updated yet
05:43 Furao UtahDave: https://gist.github.com/bclermont/acf36f70a87aa04e9df3
05:44 Furao for some reason, I developed my own jenkins base testing stuff, while you guys did the yours. and I looked at yours and so much are the same
05:45 UtahDave they're similar, huh?  cool
05:45 Furao I deleted gist
05:46 mafrosis anyone know a bug in 0.17.1 around overwriting a user's groups with user.present?
05:47 abishekk92 joined #salt
05:48 mafrosis looks like it might be an old one https://github.com/saltstack/salt/issues/2142
05:53 carlos joined #salt
05:53 justlooks joined #salt
05:55 mafrosis I'll pipe down.. Looks like that's my catchphrase atm "does anyone know a bug…"
06:00 bds joined #salt
06:01 linjan_ joined #salt
06:13 ausmarton joined #salt
06:21 mafrosis for anyone that's listening, as of 0.17.x running user.present on an existing user will wipe out their groups
06:22 mafrosis unless you add "remove_groups: false" (obviously)
06:22 mafrosis presumably it was a bug that it *didn't* wipe them out in 0.16.4
06:23 bud Hello everyone. Can someone take a look over the following state http://hastebin.com/raxubijubo.vhdl and come up with an idea why it's failing?
06:25 Ryan_Lane joined #salt
06:27 middleman_ joined #salt
06:29 justlooks hi,all how to reverse the expression value in jinja ? can i do this ? {% if ! expression %}
06:29 Furao justlooks: {% if not
06:29 Furao bud: look at dhcpd.conf line 84
06:30 justlooks Furao: thanks
06:30 bud Hey Furao, thanks for taking time to look over it. I have been looking at line 84 for a day now but I can't see a problem.
06:32 justlooks how to put a state in last?
06:32 justlooks i mean in execute order
06:34 bud On line 84 there is reverse_ip var which is composed on line 63 - https://gist.github.com/valentinbud/7132291. I have created a gist with dhcpd.conf only.
06:35 bud justlooks: from 0.17.0 state_auto_order is True. The states are executed in the order they are found in the file.
06:35 Furao justlooks: the best is to make sure everything that depends on it -require/-watch it
06:35 Furao bud: I don't know about salt 0.17.x but previous version sometimes didn't reported good line number
06:36 Furao but if it's reverse_ip that is weird
06:36 bud Ok, the fact is that the state works on another box, the difference being python-jinja2 is at version 2.7.1.
06:37 bud It doesn't work on Debian Wheezy with python-jinja2 at 2.6-1 installed from stable repository.
06:37 taylorgumgum joined #salt
06:38 justlooks my problem https://gist.github.com/justlooks/7132325
06:38 bud I found out this by mistake, my dev machine has unstable repo activated and hence python-jinja2 is installed from there and at version 2.7.1 :\.
06:39 Furao justlooks: line 32 is weird
06:40 cocoy left #salt
06:40 Furao line 12:13 indentation is bad, remove 1 space
06:40 Furao same for 15
06:40 Furao and 22
06:40 Furao oh no
06:40 Furao in fact 22 is good
06:41 Furao it's 19:21 and 23 that have a missing space
06:41 Furao line 24:29 remove one space
06:41 Furao indentation is important
06:41 justlooks Furao: have you any tool for syntax check
06:41 Furao sometime it break yaml data
06:41 Furao justlooks: 2 eyes
06:41 bud :))
06:42 Furao my brain is now optimized at this :P
06:42 Furao 30% of my time is spent review code and merge pull requests in my states repos :)
06:42 Furao well, you need to fix your indentation
06:42 justlooks Furao: i run it ,it's ok ( removed last state
06:42 Furao you started with the 2 spaces rules
06:42 Furao stick to it
06:43 Furao but line 32 don't work I'm sure
06:43 Furao and 45
06:45 Furao what are you trying to do in line 32?
06:45 Furao '~' isn't a valid operator
06:45 Furao In [2]: 'test'~'t'
06:45 Furao File "<ipython-input-2-d4ae9e10cbc7>", line 1
06:45 Furao 'test'~'t'
06:45 Furao ^
06:45 Furao SyntaxError: invalid syntax
06:46 bud justlooks: if you're a VIM'er the following might help you - https://github.com/saltstack/salt-vim
06:48 fxdgear joined #salt
06:56 Ryan_Lane joined #salt
07:02 balboah joined #salt
07:05 justlooks Furao: yes i run it on my host
07:05 jalbretsen joined #salt
07:06 justlooks Furao:  here is my run output https://gist.github.com/justlooks/7132325
07:06 justlooks bud: thanks i use vi
07:09 matanya joined #salt
07:10 redondos joined #salt
07:10 redondos joined #salt
07:14 justlooks Furao: you means this ? {% if not salt['file.file_exists'](pillar['datadir']~'/myid') %} ,i want to judge if the file not exist ,it should include the init code
07:21 Furao yes I mean this
07:22 Furao in python somestring ~ someotherstring
07:22 Furao is invalid
07:22 Furao the "~" operator don't exists
07:22 Furao oh
07:22 Furao this is jinja specific
07:22 Furao http://jinja.pocoo.org/docs/templates/#other-operators
07:24 Furao then you want this https://gist.github.com/bclermont/7132726
07:27 justlooks Furao: you are right ,this is jinja
07:33 ausmarton joined #salt
07:48 redondos joined #salt
07:50 shinylasers joined #salt
07:56 networkpadawan joined #salt
08:04 gildegoma joined #salt
08:06 abishekk92 joined #salt
08:14 summernguyen joined #salt
08:15 summernguyen Hello , I am writing a custom modules.
08:16 summernguyen I can run in the terminal:  salt '*' so6test.test
08:16 summernguyen but I don't know how to put this modules in the sls states files
08:19 hazzadous joined #salt
08:19 summernguyen http://pastebin.com/vzFeRufe
08:19 acsir joined #salt
08:19 summernguyen Here is my description
08:19 summernguyen Can anyone help me ?
08:19 summernguyen Thank you
08:25 scott_w joined #salt
08:29 Furao summernguyen: http://docs.saltstack.com/topics/tutorials/states_pt3.html#calling-salt-modules-from-templates
08:30 alekibango joined #salt
08:32 tulu joined #salt
08:33 Furao summernguyen: you mean custom STATES not custom modules
08:35 Furao summernguyen: https://github.com/bclermont/states/tree/master/states/_modules these are module and these are states https://github.com/bclermont/states/tree/master/states/_states
08:35 mike_perdide Furao: maybe he's trying to use modules commands in states files
08:35 Furao in your case you want to use module.run or write a state on top of the module
08:35 Furao mike_perdide: http://pastebin.com/vzFeRufe line 10
08:36 mike_perdide ok
08:37 malinoff joined #salt
08:37 malinoff Hi guys
08:39 Furao звать
08:40 malinoff Furao, what? :)
08:40 Furao no unicode? :)
08:40 Furao I forgot :P
08:41 Furao agh yes
08:41 Furao sorry
08:41 Furao it more здороватьcя
08:42 jasoncn joined #salt
08:43 summernguyen Hi
08:43 summernguyen I mean
08:43 summernguyen I write a custome execution modules
08:44 summernguyen call so6test , localed in /srv/salt/base/_modules/so6test.py
08:44 justlooks can i fire a event to master ,then the reactor let another box fire another event to master ,then ...... is it possible?
08:44 Furao justlooks: yes
08:44 summernguyen and I want to apply this modules to all minions using states
08:44 Furao summernguyen: module are called in .sls trough http://docs.saltstack.com/ref/states/all/salt.states.module.html#module-salt.states.module
08:45 Furao module.run (or module.wait if you want it to only run under certain condition)
08:45 justlooks summernguyen:  call module in jinja
08:45 justlooks summernguyen: let's jinja control your state in sls file
08:46 Furao justlooks: that make the module to be executed at .sls render time
08:46 Furao using module.run you can make it run in specific order
08:46 justlooks Furao: can module execute on sls file runtime?
08:46 summernguyen I don't get what jinra does in this case .
08:47 Furao {{ salt['mymod.myfunc']() }} yes
08:47 justlooks Furao:  {{ salt['mymod.myfunc']() }} this run in render time
08:47 Furao yes
08:47 malinoff Furao, звать means 'to call somebody'
08:48 Furao malinoff: yes I remember that after
08:48 Furao like hello come on here
08:48 malinoff Furao, and you can just say 'Привет' to say hello
08:48 redondos joined #salt
08:48 justlooks Furao: how can run module in sls runtime,any example?
08:49 Furao justlooks: https://github.com/bclermont/states/blob/master/states/graphite/init.sls#L202
08:51 benturner joined #salt
08:52 summernguyen in the init.sls , I change FROM so6test.test TO {{ salt['so6test.test']() }}
08:52 Furao summernguyen: that depends if you need the module to run when .sls render or at specific step
08:52 Furao such as before this, or after that
08:52 summernguyen I got the Error: Name G6Monitor111 in sls Test is not a dictionary
08:53 justlooks Furao: i understand ,thank you ,l learn a lot
08:53 Furao your module might requires some python lib
08:53 summernguyen My Module is just simple test.ping
08:54 summernguyen the problem is not inside the module
08:54 Furao summernguyen: replace that by G6Monitor111\n  so6test:\n    - test
08:54 Furao oups
08:54 Furao summernguyen: replace that by G6Monitor111:\n  so6test:\n    - test
08:54 Furao indentation is important
08:54 Furao i see in your file sometimes it's 4 spaces sometime it's 1
08:54 baffle Is there a way to depend on a service running on another host? I.e. something like "require mysql running on database server"
08:54 Furao baffle: overstate
08:55 acsir Hi all, I found that the function file.replace works only on single line. But some config (for e.g. bash.bashrc) have multiple lines options, therefore you whould need to replace/regex on multiple lines.
08:55 baffle Furao: Thanks.  Just what I was looking for.
08:55 summernguyen then I got : State so6test.test found in sls Test is unavailable
08:55 Furao summernguyen: do you have a so6test.py file in _modules ?
08:55 Furao with a def test(): function
08:56 acsir to you think could it be worth to modify the file.replace function, or to add a file.multilinereplace function?
08:56 Furao that you had saltutil.sync_modules ?
08:56 summernguyen I did sys modules
08:57 summernguyen http://pastebin.com/SrVMwrbX
08:57 summernguyen this is very simple so6test modules
08:58 Furao so you have to saltutil.sync_all or saltutil.sync_modules
08:58 Furao salt 'minionid' -d so6test
08:58 summernguyen salt '*' saltutil.sync_modules SO6_ShareSys_PS59:     - modules.so6test
08:58 summernguyen I did sync it
08:59 summernguyen salt '*' -d so6test   =>>>> so6test.test: Just a test function
08:59 summernguyen it show the doc string of the function
08:59 Furao that should work
08:59 summernguyen that's weird
09:00 Furao summernguyen: then I got : State so6test.test found in sls Test is unavailable
09:00 Furao this is still a state
09:00 Furao you have a module
09:01 Furao paste your state file
09:02 summernguyen http://pastebin.com/bVA89bjQ
09:02 summernguyen Here is the structure and state files
09:02 Furao you're still calling so6test.py as it was in _states/
09:03 Furao what you seem to try are like these: https://github.com/bclermont/states/tree/master/states/_states
09:04 Furao summernguyen: http://docs.saltstack.com/ref/states/writing.html
09:07 summernguyen I still don't understand
09:07 summernguyen http://pastebin.com/uDM0ym7n
09:08 summernguyen the Test/init.sls is in right format , I think
09:08 Furao Furao: summernguyen: http://docs.saltstack.com/ref/states/writing.html
09:08 Furao it's in good format
09:08 Furao but you're trying to call a modules like it's a states
09:11 peter joined #salt
09:12 summernguyen ahhh
09:12 summernguyen You mean
09:12 summernguyen If I have a customer modules , I must have another customer states for this modules ?
09:13 Furao they don't need to be both there
09:13 Furao but the way you invoke it they need to be in _states
09:15 summernguyen so, if I call this way ,  IfI define everything in the custom states,  I don't need the custom module, right ?
09:16 Furao not necessary
09:17 Furao if you look in https://github.com/bclermont/states/tree/master/states/_states there is states that don't have a matching module in https://github.com/bclermont/states/tree/master/states/_modules
09:18 jasoncn joined #salt
09:18 summernguyen ok
09:18 summernguyen thank you very much
09:19 Furao summernguyen: new to salt?
09:19 malinoff Furao, how are you doing?
09:20 summernguyen Furao: just 4 days
09:20 Furao tulu: see? :P
09:21 tulu I see all :(
09:21 Furao malinoff: looking for trouble :P you
09:21 tulu Furao
09:21 summernguyen I am finding a solution for around 400 servers of my company
09:21 summernguyen and I found saltstack
09:21 summernguyen that's great
09:21 malinoff summernguyen, It's not so difficult: state calls a module, module calls a python api
09:21 Furao can I hire you to train tulu while you're learning it ? :)
09:21 Furao he's in HCM too
09:21 summernguyen :D
09:21 summernguyen tulu in HCM ?
09:22 summernguyen cool
09:22 tulu summernguyen you know crazyboy
09:22 summernguyen I'm very new to Saltstack, hire me later :))
09:22 summernguyen eck
09:22 tulu i see your name familiar
09:22 summernguyen I know him
09:22 summernguyen crazyboy
09:22 tulu oh you know suto?
09:23 summernguyen yeah
09:23 tulu haha
09:23 tulu so i know you
09:23 summernguyen of course
09:23 summernguyen that's funny
09:23 malinoff Furao, just found Rundeck, and I think it's awesome
09:23 malinoff Furao, going to try that
09:23 Furao malinoff: Rundeck ?
09:24 malinoff Furao, yeah
09:24 Furao what is that
09:24 malinoff Furao, web-interface that can be integrated with salt, jenkins, puppet etc
09:24 Furao I try to stay away from puppet
09:24 malinoff Furao, me too
09:24 malinoff Furao, that's why i chose Salt
09:25 malinoff choose*
09:25 summernguyen @tulu: wait a sec, I can not reply you :D
09:25 summernguyen @tulu : don't know why
09:26 malinoff Furao, but anyway, it's cool, I don't know why the hell Halite is developing - since Rundeck can handle Salt and many other tools
09:26 Guest2511 hi guys. I could need some help with salt-ssh (0.17.1). I can't get it to find any sls when using state.sls ("No matching sls found for 'packages' in env 'base'"). does salt-ssh locate states in the usual way (master config file, file_roots)? it does find the roster file.
09:26 Furao malinoff: url?
09:26 malinoff Furao,  http://rundeck.org/
09:26 malinoff Furao, tricky, isn't it ?:)
09:26 Furao summernguyen: 400 servers, running ubuntu? centos?
09:27 flutiwinger joined #salt
09:27 summernguyen almost CentOS
09:27 malinoff summernguyen, Arch, FreeBSD ?:)
09:27 summernguyen some Windows
09:27 Furao ok, can't help you :)
09:27 summernguyen :D
09:27 Furao malinoff: too heavy for me to look at this, I'll look at that later
09:27 Furao but I pretty much implemented something that look like this
09:27 Furao but for testing
09:28 malinoff Furao, anytime you want :)
09:28 Furao using djangopypi2
09:28 malinoff Furao, uh
09:28 malinoff Django
09:28 Narven joined #salt
09:28 Furao malinoff: what django?
09:29 Furao djangopypi2 is a pypi server in django
09:29 Guest2511 anyone who has successfully used salt-ssh with state.sls?
09:29 malinoff Furao, ah
09:29 malinoff Furao, i see
09:29 summernguyen @tulu: lam sao de chat private the :D , dang dung webchat
09:29 tulu @summernguyen: Dung IRC di
09:30 malinoff Guest2511, what's the problem?
09:30 Guest2511 I can't get it to find any sls files ("No matching sls found for 'packages' in env 'base'")
09:32 malinoff Guest2511, states must work, try to verbose call salt-ssh
09:32 Guest2511 I suppose it uses the file_roots in my master config file, as regular salt does?
09:32 malinoff Guest2511, yes
09:33 tulu summernguyen: Dung IRC di
09:34 summer_nguyen joined #salt
09:34 summer_nguyen tulu
09:34 jasoncn joined #salt
09:34 tulu summer_nguyen, sao the?
09:35 abishek102 joined #salt
09:38 Guest2511 I've tried with -l debug, but I can't find a way to grep the output or send it to a log file. --log-file has no effect.
09:40 Guest2511 this is my command: salt-ssh -l debug --log-file=out.log '*' state.sls packages
09:41 Guest2511 output goes to console only
09:43 Guest2511 anyway, I can't find anything relevant in the debug output. first it says "Reading configuration from /etc/salt/master", later "No matching sls found for 'packages' in env 'base'".
09:46 malinoff Guest2511, Do you actually have packages.sls file in your base env directory?
09:46 Guest2511 I have packages/init.sls
09:47 Guest2511 I can't see anything wrong with my state tree (of course I might be overlooking something)
09:49 apsu-rgw joined #salt
09:50 Guest2511 do I maybe need a minion config file, rather than a master config file? I noticed the minion config file has file_roots too
09:53 malinoff Guest2511, no, minion can has it's own state tree, so this options describes this tree
09:55 Guest2511 I hoped salt-ssh would give me an easy way to test states before I push them to git (master uses gitfs). can you recommend any other strategy for testing states?
09:56 malinoff Guest2511, testing server, maybe?
09:57 jasoncn joined #salt
09:57 Guest2511 I already have one. idea was to push new states to testing server via salt-ssh. otherwise, you do I get them from my local dev environment/git repo to the testing server. I don't want to develop on the testing server.
09:58 Guest2511 s/you/how
10:05 Guest2511 I've searched the mailing list for tips on a good salt development/test workflow, but didn't find anything. wonder how people are doing it.
10:07 mike_perdide I personnally push to a test server, with rsync, and call my states on specific minions
10:07 carmony I guess I couldn't sleep, so time to hack on my vagrant salt-cloud stuff
10:09 Guest2511 I see. I hoped I can simplify the workflow with salt-ssh, but can't get it to work.
10:11 jasoncn salt is ready for product env?
10:14 malinoff Guest2511, do you have a master?
10:18 Guest2511 not in the dev environment
10:19 Guest2511 I once tried a similar (though not the same) state tree w/ master on the dev server, and it worked fine.
10:20 Guest2511 s/dev/test
10:23 malinoff Guest2511, so, do you have a masterless setup?
10:24 Guest2511 for development purposes yes, for production purposes, no.
10:25 Guest2511 I'm just looking for an easy way to test states before I push them to git.
10:26 mike_perdide Guest2511: so, can't you rsynch your states files to the masterless minion, then salt-ssh call your states ?
10:26 mike_perdide rsync*
10:27 Guest2511 I can, but it takes more effort. need to setup rsync etc.
10:27 xet7 joined #salt
10:27 luketheduke joined #salt
10:27 luketheduke joined #salt
10:28 mike_perdide Guest2511: so what you'd want is a command that both syncs files to the minion and calls specific states?
10:28 Guest2511 I may be misunderstanding how salt-ssh works. can't find a lot of information on how it works.
10:29 mike_perdide from the documentation, I can't see any options that would push states files from your machine to your test minion
10:29 Guest2511 I thought salt-ssh transports the state automatically
10:30 mike_perdide I think it's more of a remote salt-call
10:30 mike_perdide hum, strike that, rereading the doc right now
10:31 Guest2511 I think it's trying to find the state locally but doesn't find it
10:33 mike_perdide the doc isn't clear about that, but I'm guessing as it's aimed at using salt states on machines without any salt installed, it should be able to forward your local states to the test machine
10:33 mike_perdide have you tried using salt-ssh with a configuration file?
10:33 mike_perdide linking to the states dir?
10:37 Destro joined #salt
10:38 Guest2511 just tried, didn't make a difference
10:40 mike_perdide :/
10:45 jasoncn i mean,  can i use salt in product env?
10:49 jasoncn joined #salt
10:50 networkpadawan joined #salt
10:56 giantlock joined #salt
11:02 cron0 joined #salt
11:14 viq Is this a bug, or a case of PEBKAC? https://gist.github.com/viq/7135325
11:14 luketheduke joined #salt
11:16 chuffpdx_ joined #salt
11:17 derelm joined #salt
11:18 viq Anyone has any thoughts whether that's a bug or my mistake?
11:18 TheSojourner joined #salt
11:18 TheSojourner joined #salt
11:19 gadams_ joined #salt
11:20 ddv joined #salt
11:20 backjlack joined #salt
11:20 nliadm joined #salt
11:20 [vaelen] joined #salt
11:20 arapaho joined #salt
11:20 dpac|away joined #salt
11:20 seba joined #salt
11:20 Snow-Man joined #salt
11:20 faust joined #salt
11:21 godog joined #salt
11:21 morganfainberg joined #salt
11:21 godog joined #salt
11:22 crane joined #salt
11:25 oz_akan_ joined #salt
11:26 jcsp joined #salt
11:28 avienu joined #salt
11:33 elfixit joined #salt
11:37 Teknix joined #salt
11:38 andersb joined #salt
11:44 andersb left #salt
11:46 andersb joined #salt
11:50 srage joined #salt
11:50 networkpadawan joined #salt
11:51 pviktori joined #salt
11:55 Guest2511 starting the salt-master service on ubuntu gives me nine salt-master processes. is this normal?
12:00 andersb Looks that way. I have the same on mine.
12:01 jrdx joined #salt
12:01 Guest2511 ok, thanks. I'm asking because I'm constantly getting "Unable to bind socket, error: [Errno 98] Address already in use" when issueing a command. even after disabling the firewall and rebooting.
12:02 honestly netstat -plant
12:02 honestly to see who's bound to that address
12:02 whiskybar joined #salt
12:02 Guest2511 I doesn't tell me which port. almost nothing bound, nothing in the 5000 range
12:03 Guest2511 it's really just sshd and me :-)
12:03 honestly hum
12:04 honestly what command do you issue?
12:04 andersb Question: salt.state.module.run does not seem to work for me. Is it broekn? I get error: Module function apache.a2ensite site_name_file is not available
12:04 honestly andersb: paste your salt call
12:05 andersb honestly: http://paste2.org/3fx2scZy
12:06 andersb honestly: Gives me: http://paste2.org/LZMs4PZD
12:06 srage joined #salt
12:08 Guest2511 me? test.ping :-)
12:08 andersb honestly: Running salt 0.17.1
12:08 honestly hmm
12:08 honestly I don't think that's the right invocation andersb
12:09 andersb honestly: Yeah? Well, the doc was bad on that module. So I googled and came up with a gist: https://gist.github.com/benhosmer/3749823
12:09 anteaya joined #salt
12:10 honestly you'll have to pass the argument somehow
12:10 honestly what you're doing now can't work
12:10 honestly try something like this: http://paste2.org/19awz1PL
12:11 honestly oh, less indentation on the m_arg
12:11 honestly and maybe s/m_arg/arg/
12:11 andersb I'll give it a spin. brb
12:13 andersb Hmm, both of them failed.
12:13 honestly what error message?
12:13 honestly (yes, the docs could do with having actual useful info)
12:14 andersb honestly: http://paste2.org/9jHz8jsZ
12:14 honestly try "m_name" as well
12:14 honestly and as I said less indentation
12:14 honestly http://paste2.org/NgDG6bX2
12:14 andersb yeah, I had 2 space after -name
12:15 wkf joined #salt
12:15 andersb Hmm, m_name failed also.
12:16 andersb doc says - name, so that looks correct.
12:16 honestly http://docs.saltstack.com/ref/states/all/salt.states.module.html#salt.states.module.run
12:17 andersb Jupp
12:18 honestly maybe it should be "site" (http://paste2.org/5BVV7HOZ)
12:18 honestly :/
12:18 honestly we need an adult here
12:18 honestly wait for forrest or utahdave to show up :|
12:19 andersb Okay. Thx for the help!
12:19 honestly and then whack them in the head until whatever the fix is goes into the docs
12:21 honestly because this is silly
12:22 andersb honestly: Ha, the paste you gave worked: http://paste2.org/5BVV7HOZ
12:23 andersb You can specify your own "variable"name it seems. Just ident it at same lvl as name.
12:23 honestly yuup
12:23 andersb honestly: Nah, wait a bit.
12:23 honestly there we go
12:24 andersb honestly: Returns a true: http://paste2.org/LPC0h5AB
12:24 bud andersb: the site variable is the input for a2ensite function from apache module. I am quite sure that if you change site to another name it wouldn't work.
12:24 andersb honestly: But did not symlink it correclty. So the module was run, but with wrong parameters I am guessing.
12:25 honestly hmm
12:25 honestly andersb: did you try "m_arg" and "arg" with correct indentation?
12:25 andersb honestly: Yes.
12:25 jpadilla joined #salt
12:27 andersb honestly: Okay, - site works. So it seems it's the parametername on the module you wanna run.
12:28 honestly ah
12:29 honestly docs desperately need an example of that
12:29 andersb Jupp
12:31 bud **kwargs "Pass any arguments needed to execute the function" would need to be changed or added something to it.
12:31 bud What you guys suggest?
12:31 bud The above is from salt.states.module.run
12:32 bud honestly, andersb ping :-). We could change the docs now and issue a pull request so others don't bump into the same problem.
12:34 honestly the docs are on github?
12:34 honestly that's greatz
12:34 honestly -z
12:34 bud Yes they are :).
12:34 bhosmer joined #salt
12:36 pviktori joined #salt
12:36 bud The docs for salt.states.module are directly in the code below the function definition.
12:37 honestly oh
12:37 honestly didn't realise the docs were generated from docstrings
12:38 ktenney joined #salt
12:38 bud The docs use Sphinx.
12:39 andersb Yeah, I am familiar with Sphinx, but right now in an environment where I can't check out git...
12:39 erob joined #salt
12:40 bud Maybe a module.run topics page would be helpful for people wishing to run modules. A page on which there are examples of running modules from within states and a short explanation about how does it work.
12:40 bud What do you guys think about it?
12:42 aleszoulek joined #salt
12:42 bhosmer joined #salt
12:43 andersb A topic page would be best I am guessing. Or Examples on top of docpage like some other modules use.
12:44 erob left #salt
12:45 tyler-baker joined #salt
12:47 ipmb joined #salt
12:48 anuvrat joined #salt
12:50 srage joined #salt
12:55 brianhicks joined #salt
12:57 jeddi joined #salt
12:57 HeadAIX joined #salt
12:57 m_george left #salt
12:59 networkpadawan joined #salt
13:03 oz_akan_ joined #salt
13:03 canci joined #salt
13:05 logix812 joined #salt
13:06 logix812 using pydsl, I am include()ing a module with a single utility function. It just returns none.  However, I can include modules in the same directory (dotted path) and the come in just fine. I can also include() a non-existant file and I will get the proper error.
13:06 juicer2 joined #salt
13:06 logix812 I even copied one of the files that imports successfully replacing my utility function to see if it was just a syntax error on my part
13:07 logix812 no love
13:07 oz_akan_ joined #salt
13:08 racooper joined #salt
13:08 logix812 I do see this error though: RuntimeWarning: Parent module 'postgresql.debian' not found while handling absolute import.  I get this error even though I can include('postgresql.debian.whatever') and it will work successfully, just not my utility module
13:09 Gifflen joined #salt
13:10 logix812 Actually that error doesn't seem to matter, because I can still include another module in my debian package without incident
13:11 Brew joined #salt
13:12 wkf joined #salt
13:14 amahon joined #salt
13:19 srage joined #salt
13:25 mpanetta joined #salt
13:26 marcel joined #salt
13:26 logix812 Ok.. upon further investigation it looks like the import works the 1st time, and the subsequent calls it fails
13:27 Kholloway joined #salt
13:32 logix812 I guess... since it works once, I can just load it the first time and then just pass on the module into functions into the other modules
13:33 logix812 dunno if that load only once is expected behavior or not, it feels like a bug, but then again maybe it's the correct way to handle it
13:37 BogdanR joined #salt
13:39 bhosmer_ joined #salt
13:40 jav joined #salt
13:41 logix812 Ya, that worked. I just made an init.sls that was a #pydsl renderer, and included all of the modules I would need, including pg_utils and then just wrapped the state create in each module in a states() function and I call that function from init, passing pg_utils as an arg
13:42 mapu joined #salt
13:45 kaptk2 joined #salt
13:45 BogdanR Hello
13:45 BogdanR I just installed salt from git for the first time and I am trying to run it
13:46 BogdanR I have an error and I am not exactly sure why
13:46 BogdanR http://pastie.org/pastes/8426872/text
13:46 BogdanR Can you plese give me a hint?
13:48 mike_perdide BogdanR: your /etc/hosts file seems empty
13:49 mike_perdide or malformed, maybe
13:49 mike_perdide judging from https://github.com/saltstack/salt/blob/develop/salt/config.py#L739
13:50 Guest2511 what does it mean when I run a non-trivial state via state.sls and all I get back from my (single) minion is an empty response?
13:51 Guest2511 the state has a number of pkg.installed and file.managed
13:51 mike_perdide Guest2511: I guess, that the minion is in the desired state ? (but I'm not sure about what "non-trivial" means)
13:52 Guest2511 by non-trivial I mean that it has a number of formulas
13:52 Guest2511 I remember seeing something like "package already installed", but now I get nothing but an empty response
13:52 BogdanR mike_perdide: http://pastie.org/pastes/8426894/text
13:53 mike_perdide Guest2511: can you paste the empty response ?
13:53 Guest2511 <minion_id>:
13:54 Guest2511 even with debug logging I just get 10-15 lines of output
13:54 mike_perdide BogdanR: so I guess this is a saltstack bug probably, but if you want to workaround it, remove everything in your file except the 2 "127.0.0 ...." lines
13:54 bud BogdanR: you'
13:54 bud ve installed Salt from git, what version are you running?
13:54 mike_perdide Guest2511: are the packages installed on the minion ?
13:55 Guest2511 how do I check? (master and minion are on same machine)
13:55 BogdanR bud: the current development one
13:55 bud Try to go with a 'stable' version - 0.17.1 is the last.
13:55 mike_perdide good advice
13:55 bud The bootstrap script can install 0.17.1 from git without problems.
13:56 BogdanR bud: Bootstrap doesn't work for me since I'm not on a supposeted distro
13:56 mike_perdide Guest2511: it depends on your distro, but if you're trying to install a bunch of packages and files I guess you know what files to look for
13:56 bud What distro are you on BogdanR?
13:56 BogdanR mike_perdide: I removed all the lines with comments and now it those errors are gone
13:57 mike_perdide BogdanR: do you know how to checkout a branch/tag of a git repo?
13:57 BogdanR eys
13:57 BogdanR yes
13:57 bud Doesn't matter anyway - git clone, git checkout v0.17.1 and python setup.py install.
13:57 Guest2511 master config file (/etc/salt/master) points to directory (via file_roots) that has the states. isn't that enough?
13:57 Guest2511 and yes, the files aren't being created
13:59 mike_perdide Guest2511: are you sure the correct state is called? are you using a top.sls and state.highstate command or calling directly a state?
13:59 bhosmer joined #salt
13:59 Guest2511 I'm calling it with state.sls, so yes, the top.sls is important
13:59 Guest2511 salt '*' state.sls myState
14:00 mike_perdide hum I don't know if this is supposed to work
14:00 bud Guest2511: the top.sls doesn't matter when running state.sls.
14:01 marcel left #salt
14:01 mike_perdide Guest2511: I didn't know that module, I'm reading the documentation now
14:01 derelm_ joined #salt
14:02 mike_perdide Guest2511: I'm trying this command with bogus states and it fails silently, so yours might also fail silently
14:02 Guest2511 @bud ah yes, sorry
14:03 BogdanR bud: checked out 0.17.1 so it's stable
14:03 BogdanR I was able to add the key of my minion but now when the minion starts I get this: http://pastie.org/pastes/8426916/text
14:03 Guest2511 @mike_perdide: I noticed sth. similar. when I run with bogus state I only get a short summary (succeeded: 0 failed: 0 total: 0)
14:04 Guest2511 when I run it with an existing state, I get empty response :-(
14:04 marcel joined #salt
14:05 mike_perdide Guest2511: I have never used that module, so I'm probably not the best person to answer you. However, know that by using a top.sls you might have a better debug output
14:05 foxx joined #salt
14:05 BogdanR the master reports this in debug mode:
14:05 BogdanR http://pastie.org/pastes/8426918/text
14:05 Guest2511 can I use top.sls w/o enforcing everything (highstate)?
14:06 mike_perdide that is, configuring your master's file_roots, filling top.sls with your instructions, and calling 'salt \* state.highstate'
14:06 bud BogdanR: have you installed all prerequisites for salt?
14:06 BogdanR bud: I don't know
14:06 bud BogdanR: what OS are you running on?
14:06 BogdanR NimbleX
14:07 bud Slackware based linux distro.
14:08 bud First time I hear about it.
14:08 mike_perdide looks like you might be failing that import: "from Crypto.Cipher import AES"
14:08 bud mike_perdide: wouldn't that mean that the crypto libs are missing?
14:08 Guest2511 even when using state.highstate I only get empty response, and zero lines debug logging. something is fundamentally broken here.
14:09 mike_perdide bud: yes, that would definitely be a reason
14:09 BogdanR is that the python crypto libs or the linux libs?
14:09 mike_perdide Guest2511: can you paste your top.sls and master.cf files somewhere ?
14:09 mua joined #salt
14:10 mike_perdide BogdanR: python crypto libs for sure, I don't know how much they rely on linux libs
14:10 jav left #salt
14:11 bud BogdanR: I don't know what package manager NimbleX uses but make sure you have M2Crypto, pycrypto, PyYAML, PyZMQ, ZMQ, msgpack-python installed before using salt.
14:12 bud I see that NimbleX has the M2Crypto packed - http://packages.nimblex.net/slackware/source/l/M2Crypto/
14:12 kermit joined #salt
14:15 BogdanR but: you are very quick :)
14:15 BogdanR Ups
14:15 BogdanR bud: by bad for misspelling
14:16 BogdanR :)
14:16 BogdanR I installed pycrpto and that error is gone. I have this now: http://pastie.org/pastes/8426947/text
14:17 bud BogdanR: can you run salt --versions-report and pastie the output?
14:18 mike_perdide I think there's a japanese show where the participant has to run in a series of cardboard walls :)
14:18 Guest2511 mike_perdide: https://gist.github.com/pniederw/7dde8d1859d7a6a1c57a https://gist.github.com/pniederw/11e55ad5da83ec37db64
14:19 toastedpenguin joined #salt
14:19 BogdanR http://pastie.org/pastes/8426962/text
14:20 mike_perdide Guest2511: looks about right
14:20 mike_perdide are you positive, say, the "base" state hasn't been applied?
14:21 Linz_ joined #salt
14:22 bud BogdanR: that looks ok. Have you reinstalled Salt from the v0.17.1 branch (tag)?
14:22 BogdanR yes
14:23 aberant joined #salt
14:23 BogdanR And now, the master actually reports that authentication is accepted for the minion just before it crashes whith the above message
14:23 bud Just for the sake of it try an older version - v0.16.4.
14:23 bud Or v0.17.0.
14:24 pkimber joined #salt
14:24 BogdanR bud: sure
14:24 BogdanR OK, found the problem
14:24 Guest2511 mike_perdide: I'm positive that "packages" hasn't been applied (files aren't there). for other states it's harder to say because the machine was already configured manually.
14:25 BogdanR I didn't restart the master after installing pycrypto
14:25 BogdanR After restarting the master the minion works just fine
14:25 BogdanR I can send test.ping to it
14:25 bud BogdanR: glad you've figured it out :-).
14:25 bud Are you from .ro?
14:25 BogdanR Thanks a lot
14:25 BogdanR Yes
14:26 bud Ce fain sa vad oameni interesati de Salt de prin Ro :).
14:26 BogdanR He he. Tu de unde esti?
14:26 bud Let's go private BogdanR so we don't clutter the logs :).
14:27 BogdanR How do I do that? :)
14:27 akio /query
14:27 akio /query bud specifically
14:27 Guest2511 wait a sec, the formulas in question have wrong salt:// urls
14:27 bud Thanks akio.
14:29 mrevans joined #salt
14:29 Guest2511 didn't make a difference. do I need to restart/refresh master after changing a .sls file?
14:29 cnelsonsic joined #salt
14:29 mike_perdide Guest2511: no, calling state.highstates will read the top.sls file
14:30 Raymii joined #salt
14:31 mike_perdide Guest2511: ok, stupid question: are you sure the master configuration file is read?
14:31 Guest2511 mike_perdide: [DEBUG   ] Reading configuration from /etc/salt/master
14:31 Raymii joined #salt
14:33 mike_perdide Guest2511: and your minion is responding that it's not applying anything, or it's not responding at all?
14:33 Guest2511 all I see is:
14:33 Raymii joined #salt
14:33 Guest2511 <minion_id>:
14:33 mike_perdide what's your version of salt?
14:33 Guest2511 0.17.1
14:34 Guest2511 just double-checked for master and minion
14:34 Guest2511 my only guess is that master/minion on same node has serious problems. some weeks back I could never get it to work in vagrant/ubuntu, and now things are behaving strangely on a metal ubuntu box as well. will try with separate machines next.
14:35 honestly working fine here
14:35 teskew joined #salt
14:35 mike_perdide weird, here the 0.17.1 at least prints a summary of changes (even if there are no changes).
14:35 mike_perdide Guest2511: what about test.ping, does the minion respond?
14:35 tonthon Hi, I juste upgraded salt to 0.17.1 and I get python errors : http://pastealacon.com/33379
14:35 tonthon Any idea ?
14:35 Guest2511 yeah, that's about the only thing that works as expected
14:36 Raymii joined #salt
14:36 brimpa joined #salt
14:36 mike_perdide tonthon: from what version?
14:36 Guest2511 I really hope it's a "same node" problem, because otherwise I'm out of ideas
14:37 tonthon 0.17.1
14:37 tonthon mike_perdide: on wheezy
14:37 mike_perdide tonthon: from what salt version?
14:37 redondos joined #salt
14:37 redondos joined #salt
14:38 patrek Guest2511, on your master/minion, did you try salt-call --local
14:38 mike_perdide Guest2511: ok so it's not a communication problem, and it doesn't look like a syntax error. To me it looks more like a "didn't have to do anything" error, as if the given states were found to be true.
14:38 tonthon mike_perdide: master was previously running on 0.17.0 and minions on 0.16.4
14:38 mrevans newb question.... is there a way I can call a module in sls?  was trying to call git.status (from salt.modules.git)  but was receiving errors that the state git.status was not available.  Can I make the state available in a sls formula or will it just always conflict with state.sls?
14:39 Guest2511 mike_perdide: I'm pretty sure I previously got ample output for that. something along the lines of "package xxx already installed". that was with a two-node setup.
14:39 tonthon mrevans: try {{ salt['mymodule'] }}
14:39 Guest2511 unless the output changed dramatically in 0.17.1
14:39 tonthon like {{ salt['cmd.run'] }}
14:39 mike_perdide tonthon: this is one of the last commits on 0.17.1: https://github.com/saltstack/salt/commit/4e72e7cdcd3e1930772d035b0948f5f97a4d2d20
14:39 yojimbo joined #salt
14:39 mike_perdide (actually, it's the last one on master.py)
14:40 Guest2511 patrek: never used salt-call before. looking into it.
14:40 patrek could help you see if the result is different.
14:40 mike_perdide Guest2511: no, I don't think the changes included not informing you of changes. Did you have a go at the minion logs?
14:40 mike_perdide (the 0.17.1 changes)
14:41 mrevans tonthon:  thanks .  so I just put that in place of my state line which was git.status:   and pass the args to it normally like...  - cwd: /path/to/repo   ?
14:42 Guest2511 patrek: wow, "salt-call --local test.ping" (is that right?) suddenly gives useful output as to what's wrong. need to look at it for a minute.
14:43 mike_perdide tonthon: according to the commit, the error you're encountering means: "The minion is not who it says it is!"
14:43 tonthon mmh
14:43 mike_perdide tonthon: did you restart everything?
14:43 mike_perdide does salt-key complains in any way?
14:43 noob2 joined #salt
14:44 tonthon I've got two mininos
14:44 tonthon minions
14:44 mike_perdide I have 18
14:44 tonthon one with the key that's not accepted  : its key doesn't appear in salt-key -L
14:44 BogdanR How do I handle authentication in Halite if I don't have PAM ?
14:45 tonthon one with the key accepted : I got the "The Salt Master has cached the public key for this node ..." error
14:45 tonthon it seems the minion validation has changed or someting like that
14:45 mike_perdide tonthon: yeah, something along those lines, just regen both keys and re-accept, that might be a quick fix
14:46 tonthon don't work either
14:46 tonthon the new keys don't throw up
14:46 tulu joined #salt
14:46 mike_perdide don't show up?
14:46 noob21 joined #salt
14:47 mike_perdide keys not throwing up is normal, keys not showing is *not* normal
14:47 Raymii left #salt
14:47 VSpike Should "sudo salt-cloud -f list_nodes my-rackspace-config" work? Or am I getting this function lark all wrong?
14:48 tonthon mike_perdide: the new keys are identical to previous ones
14:48 tonthon that may cause some problems :)
14:49 Guest2511 patrek: assuming the minion caches pillar sls somewhere, it looks the cache is very outdated. it complains about a pillar I've long renamed. what can I do? restarting minion doesn't change anything.
14:50 tonthon Guest2511: did you tried saltutil.refresh_pillar ?
14:50 Guest2511 is that used together with salt-call?
14:50 tonthon no salt "host" saltutil.refresh_pillar
14:51 micah_chatt joined #salt
14:51 mike_perdide Guest2511: maybe your minion doesn't update either (pillar or file)
14:52 mike_perdide tonthon: so was your problem the fact that both minions had the same key?
14:52 Guest2511 tonthon: that returned "<minion_id>: None", but didn't change anything
14:52 tonthon mike_perdide: I don't know yet
14:52 tonthon I can't get anything work
14:53 Guest2511 mike_perdide: does the minion store the files somewhere? can I have a look?
14:53 jumperswitch joined #salt
14:53 mike_perdide Guest2511: yes, let me look
14:54 Guest2511 found it, thanks
14:54 Guest2511 it's /var/cache/salt/minion/files
14:54 Linz joined #salt
14:54 pdayton joined #salt
14:55 pdayton left #salt
14:55 tonthon "The Salt Master has rejected this minion's public key"
14:56 tonthon where does the salt master stores those keys
14:56 tonthon ?
14:56 andrewclegg I'm finding the initialization for state.highstate *really* slow (minutes), and it's these steps that take the time:
14:56 andrewclegg Caching directory '_modules/' for environment 'base'
14:56 andrewclegg Caching directory '_states/' for environment 'base'
14:56 andrewclegg etc.
14:56 andrewclegg any idea why?
14:56 jumperswitch joined #salt
14:56 UtahDave joined #salt
14:56 Guest2511 mike_perdide: yes, the minion cache is missing state files. not sure if/where it caches the pillar.
14:56 andrewclegg also _grans dir
14:57 andrewclegg and _renderers... weird thing is, most of those dirs don't even exist
14:57 andrewclegg only _modules exists. anyone seen that?
14:57 Guest2511 should /var/cache/salt/minion/files contain *all* files in the server's file root, no matter what?
14:57 jergerber joined #salt
14:58 mrevans so, trying to call the git.status module in a .sls... trying to figure out how to use salt['module'] to provide the state.  could you tell me where i am going wrong? for illustrative purposes here is a basic sls...  status66:   {{ salt['git.status'] }}:     - cwd: /home/user/projects/base
14:59 mrevans new lines and indentation are in the sls... just not the question
14:59 mike_perdide Guest2511: usually, yes
14:59 tonthon Is there a way to regen a minion key directly on the minion ?
15:00 mike_perdide tonthon: isn't it the same command we use from the master, but with salt-call ?
15:00 penguin_dan joined #salt
15:01 networkpadawan joined #salt
15:01 UtahDave tonthon: salt-key can do that.
15:01 Guest2511 "salt-call --local '*' test.ping" gives this (among other things): [CRITICAL] Pillar render error: Specified SLS 'server.dev5' in environment 'base' is not available on the salt master
15:01 Guest2511 I assume this refers to pillar's top.sls
15:02 patrek Guest2511: Probably. try salt-call --local pillar.items
15:02 micah_chatt Is it possible to run the salt client in python from a different server other than salt master?
15:02 micah_chatt I checked out the client api doc page http://docs.saltstack.com/ref/clients/index.html#client-apis
15:02 UtahDave micah_chatt: no, you'd have to use the REST api
15:03 micah_chatt UtahDave: could you point me in the direction of the docs for that?
15:03 mattmtl joined #salt
15:04 micah_chatt oh never mind, just found it
15:04 micah_chatt its a different project
15:04 UtahDave cool
15:04 Guest2511 the thing is, I've renamed `server.dev5` to `hosts.dev5` at least an hour ago, so I don't know where this comes from.
15:05 ccase joined #salt
15:06 UtahDave Guest2511: did you change the id in the minion config?
15:06 noob21 UtahDave: quick question about the salt scheduler with returner again.  i thought i had it but it's not logging
15:07 noob21 i set the mysql.* properties in the minion config file and the db = 'mysql'.  will the minion still know to log to the salt database i setup ?
15:07 noob21 it needs to use the root creds to setup things in the database and i want it to log to the salt database
15:08 Kholloway joined #salt
15:08 noob21 maybe i have it backwards and i need to leave the credentials alone in the minion and set the connection user/password in the state file for changes
15:08 swa_work joined #salt
15:08 Guest2511 patrek: that helped. it shows the default file_roots and pillar_roots, rather than the ones I configured in /etc/salt/master
15:08 bhosmer joined #salt
15:08 jalbretsen joined #salt
15:10 dthom91 joined #salt
15:11 Guest2511 ok, so I still had some outdated stuff in /srv/salt/pillar. looks like pillar_roots defined in /etc/salt/master add to the default, rather than overriding it.
15:11 UtahDave noob21: you've gone from noob2 to noob21 in just 9 hours?  wow!
15:11 noob21 yeah sorry, disconnect reconnect cycle did that
15:11 noob2 there we go :)
15:12 noob2 i must be moving up in the world as i increase my number :D
15:13 UtahDave :)  So you need the minion to connect to two different mysql databases?
15:14 VSpike Think I'm going go back to trying to use vaporize + salt instead of salt-cloud
15:14 nahamu UtahDave: okay, I truly got the esky build to work on SmartOS a few minutes ago.
15:14 noob2 yeah the minion needs to setup users, password, databases etc with the root user and the returner should log things with the salt user and database
15:14 nahamu the last thing that was tripping me up was that I had neglected to run "python setup.py bdist" before "python setup.py bdist_esky"
15:14 nahamu The doc says "you can then"
15:15 nahamu I'd love to believe that if it said "you *must* then" I might have wasted less time.
15:15 UtahDave nahamu: woot!
15:15 nahamu but either way, a combination of https://github.com/schmir/bbfreeze/commit/b796d44f7db283253965f9f92cf7e4d6dde42614 and actually following directions seems to work. :)
15:16 boltbolt joined #salt
15:16 boltbolt left #salt
15:16 oncjohnst joined #salt
15:16 nahamu If you don't do the bdist step, the eggs don't get included and things don't work.
15:16 UtahDave VSpike: have troubles with salt-cloud?
15:16 mrevans anyone have a link to a doc showing an example of using {{ salt['module'] }} in a sls formula?
15:16 andrewclegg why would copying a file in salt (from salt.states.file or e.g. a key or cached directory) cause 100% cpu use on one core the master?
15:16 UtahDave nahamu: yep
15:16 andrewclegg I think this is why I'm getting v. slow state installation
15:17 noob2 import multiprocessing for the win? :)
15:17 andrewclegg is this normal or a sign of a bug?
15:17 andrewclegg it shouldn't take several seconds to copy an *empty* directory like _returners, right?
15:17 UtahDave andrewclegg: Yeah, that's definitley not normal
15:17 andrewclegg (this even happens when the minion and the master are the same machine)
15:18 networkpadawan joined #salt
15:18 tonthon Is the /etc/salt/minion/minion_id file a new thing ?
15:18 tonthon what is its purpose ?
15:19 UtahDave tonthon: it caches the minion's id
15:19 UtahDave tonthon: so if your dns changes or something your minion name won't change on a reboot
15:19 forrest joined #salt
15:20 VSpike UtahDave: yeah, I seem to
15:20 UtahDave VSpike: which cloud provider?
15:20 VSpike Seems a bit bleeding edge for me :)
15:20 VSpike UtahDave: Rackspace
15:21 UtahDave What problems are you seeing?  I use salt cloud with rackspace all the time
15:21 VSpike can you tell me if this is a correct invocation? sudo salt-cloud -f list_nodes my-rackspace-config
15:23 BogdanR I installed Halite and I how no ideea what username and password I should use
15:23 BogdanR Keep in mind I don't have PAM
15:24 tonthon UtahDave: ok, thanks for the info
15:24 VSpike UtahDave: Because that fails with an error, but the functions aren't really documented AFAICT so I'm not sure if I'm doing that right
15:24 UtahDave VSpike: I think that looks correct.  I just tested it and I got a traceback myself
15:25 BogdanR How should I authenticate to Halite if I don't have PAM?
15:25 VSpike Also, I can't get the part to set up the salt master working. It fails with an error.
15:25 VSpike UtahDave: I think you pointed me at http://salt-cloud.readthedocs.org/en/latest/topics/releases/0.8.9.html#mapping-independent-hierarchies
15:25 VSpike Including minion: retry_dns: 5 makes it die with an error
15:26 cachedout joined #salt
15:26 VSpike For the master or a minion
15:27 UtahDave VSpike: can you pastebin your map?
15:27 VSpike Basic creation of instances works fine, but I'm struggling to see how I'd use salt-cloud to bootstrap the environment. How do I collect all the root passwords, or alternatively add one or more ssh keys to all machines?
15:28 UtahDave BogdanR: I think you can use any external authentication that Salt supports
15:29 UtahDave VSpike: Salt will let you set the root passwords to whatever you want.  You'd use the ssh_auth state to add your keys
15:29 BogdanR UtahDave: Now for salt I just run the commands in the command line of the master. How would I use something basic such as passwords from shadow?
15:31 VSpike UtahDave: http://sprunge.us/KaWj
15:31 DedePonas joined #salt
15:31 VSpike UtahDave: is that documented somewhere?
15:31 VSpike Oh wait, you get salt to do that bit rather than salt cloud?
15:31 noob2 salt returns hate me :(
15:32 UtahDave VSpike: you need to indent that make_master line 2 spaces.
15:33 VSpike Ah, so this is wrong? http://salt-cloud.readthedocs.org/en/latest/topics/releases/0.8.9.html#mapping-independent-hierarchies
15:33 andrewclegg UtahDave: when those really big file transfer pauses occur, I see this in the master logs: AES payload received with command _file_list
15:33 andrewclegg then a wait of several seconds
15:33 andrewclegg any idea?
15:34 andrewclegg meanwhile the minion sits on "caching directory" or "file.recurse" or whatever
15:34 UtahDave VSpike: no, that's correct
15:35 UtahDave VSpike: make_master: True  needs to be a config option underneath the name of the minion.  You have make_master at the same indent level of the minion
15:36 UtahDave andrewclegg: do you have a huge file_roots?  or hard links in your file_roots to elsewhere?
15:36 VSpike UtahDave: ah sorry. yes. But I confess, I quickly re-created that yml file because I'd stripped most stuff out of it for testing. This is what I pasted the day before yesterday http://sprunge.us/AVGi
15:37 andrewclegg UtahDave: file_roots is quite big -- but many of the specific directories it's trying to cache or copy are small or empty. does it re-read the whole file_roots each time?
15:37 honestly UtahDave: the module.run state needs better documentation
15:37 pipps2 joined #salt
15:37 honestly I needed half an hour to figure out how to pass arguments to it
15:37 VSpike UtahDave: Except I just did a git pull and it seems to work now after fixing that indent
15:38 andrewclegg 269818 files in my files_root!
15:38 UtahDave honestly: yes, you're right. I find it confusing, too.  I need to add some examples
15:38 honestly indeed
15:38 andrewclegg I can probably prune that, quite a lot, but I'd have thought it would just read the specific dir it needed each time... or is that not so?
15:39 UtahDave honestly: I'll do that today.
15:39 honestly UtahDave: I don't have time to figure out Sphinx and everything or I'd put in a PR myself
15:39 honestly great
15:39 UtahDave andrewclegg: I'd have to do a little code diving to see what it is doing.  I wouldn't be completely surprised if it were, though
15:40 felixhummel joined #salt
15:40 UtahDave honestly: it's actually pretty easy
15:40 andrewclegg I'll prune back and see if it helps. we use file.recurse for installing our own codebases, and there are a lot of old versions in there
15:40 honestly UtahDave: I'm sure, and some day I'll take a look at it, but today is not that day
15:41 smccarthy joined #salt
15:41 amahon joined #salt
15:41 UtahDave andrewclegg: cool.  Let me know if it's still a big issue and I'll dive into it later this afternoon
15:43 BogdanR UtahDave: I am reading documentation about eauth and it sais it's versatile but I still can't figure out how to use plain linux users without PAM
15:43 BogdanR Is there a way to do that?
15:44 BogdanR How can I authenticate if I don't have PAM or ldap?
15:44 oncjohnst joined #salt
15:45 UtahDave BogdanR: client_acl lets you auth against local system users.
15:45 UtahDave BogdanR: I'm not sure if halite can use client_acl, though
15:45 sciyoshi can someone explain what the reason was behind changing the version numbering to date-based?
15:45 mgw joined #salt
15:47 cbloss UtahDave: has anything changed with 0.17.1 with how state files call pillar variables or how if statements are formatted? after upgrading to 0.17.1 some of my states broke and am not sure why
15:47 BogdanR UtahDave: Well, I changed to client_acl in Halite and it seems it didn't do the trick
15:47 cbloss one example: http://pastebin.com/dy0tq7BW
15:47 andrewclegg UtahDave: that's definitely it, I trimmed file_roots to a fraction of the size, and it's *way* faster now
15:48 andrewclegg I'll raise a github issue
15:48 cwarner joined #salt
15:48 UtahDave cool, thanks, andrewclegg
15:48 networkpadawan left #salt
15:48 cbloss I was pointed out that my pillars are being interpreted as a string instead of a list
15:50 UtahDave cbloss: can you pastebin a sanitized example of your pillar?
15:50 cbloss UtahDave: http://pastebin.com/UYYsMyiD
15:51 cbloss the alias section is coming out as: w e b s i t e . c o m instead of website.com
15:51 cbloss as well
15:51 nahamu UtahDave: http://paste.ec/?2655393cdbce1f2f#zH2721L441O0ff1lQdkjLHi7Vw8oWOkU9yKy3JixdpE=
15:51 nahamu saltutil.update is complaining about a lack of virtualenv.
15:53 nahamu installing virtualenv with the package manager doesn't help. should a virtualenv egg be shipped inside the esky?
15:53 UtahDave cbloss: can you also pastebin an example of your sls file where you're calling the pillar variables?
15:54 cbloss yeah 1 sec
15:54 andrewclegg UtahDave: https://github.com/saltstack/salt/issues/8075 - thanks for your help!
15:54 Guest2511 after deleting the state pillar dir that wasn't even listed under pillar_roots anymore, some states are now working. for others I still get an empty response (sigh).
15:54 Guest2511 s/state/stale
15:54 UtahDave nahamu: ah, do you have an esky build for 0.17.1 hosted somewhere and have that location set up in your master config?
15:55 UtahDave thank you, andrewclegg
15:55 rgbkrk joined #salt
15:55 NV hrm who was i talking to in here the other day about salt on mips?
15:56 nahamu UtahDave: I have a build. I have it in the minion config and was trying to do it with a salt-call --local run.
15:57 UtahDave nahamu: I have no idea why it would care about  virtualenv
15:57 cbloss UtahDave: pasted the two files here: http://pastebin.com/WqRm8HH6
15:58 cowmix UtahDave: I'm preparing a few pastebins to demonstrate my issue.. I'm doing something similar to your iptables things.
15:58 cbloss all of the if php statements inside the site.sls are broken as well. for example when php: True is in the site pillar, the if php section isn't being shown
15:58 nahamu UtahDave: http://paste.ec/?5fa5876a5b1ce500#vWIu6xejT04nmZXlKZUu+ME67RQL9s4GbvBMY9T7s7g=
16:01 UtahDave nahamu: can you try saltutil.update      without a version number and see if it updates to the latest?
16:02 UtahDave cbloss: and you're on 0.17.1?
16:02 blee joined #salt
16:02 cbloss UtahDave: yeah, 0.17.1 is when this happened
16:03 cbloss i am sure i am doing something wrong
16:06 jdenning joined #salt
16:06 UtahDave cbloss: Nothing is really jumping out at me. Your files look pretty good as far as I can tell.
16:07 cowmix UtahDave: I have this pillar fragment: https://gist.github.com/cowmix/a3b331a0cb560ee76d0f
16:07 cbloss I was lucky enough to have nginx error out on the reload nginx section, otherwise my prod web server would be down right now
16:07 nahamu UtahDave: any idea how it figures out what versions are on the server?
16:07 cowmix and I'm trying to make a dynamic nginx conf file out of it here: https://gist.github.com/cowmix/ef5461a113c691748013
16:08 NV om nom nom, atlassian :D
16:09 colinbits joined #salt
16:09 cbloss UtahDave: can i downgrade back to 0.17.0 via apt? or do i have to do a git install?
16:09 cowmix UtahDave: and here's what the output should hopefully be: https://gist.github.com/cowmix/001bab875eb247489bc8
16:10 KyleG joined #salt
16:10 KyleG joined #salt
16:11 UtahDave cbloss: probably git
16:11 nahamu http://paste.ec/?5fa5876a5b1ce500#vWIu6xejT04nmZXlKZUu+ME67RQL9s4GbvBMY9T7s7g=
16:11 chjohnst_work joined #salt
16:12 nahamu (running saltutil.update without a version number gives an identical warning)
16:12 nahamu It's not a critical feature for me, but it certainly would be nice to have.
16:12 cbloss I had to reinstall my master and some minions because i had a git install and couldn't get apt to update to 0.17.1. is there any docs how to switch install sources correctly without breaking stuff?
16:13 carmony hmmm... I think I have a bug with salt-cloud. When I provision servers from a map file, it spins up all the servers fine. But when I do a -d with the map file it doesn't find any of my digital ocean servers
16:14 UtahDave carmony: would you mind opening an issue on that? I think I've run into that, too
16:15 UtahDave nahamu: I tried doing that update on some Windows minions a month or two ago and couldn't get it to work either.  It wasn't essential for what I needed either so I never spent any time on it.
16:15 cbloss UtahDave: what should my next step be to solve this problem? I am kinda lost. Should I recreate the whole state file?
16:16 nahamu UtahDave: thanks for the data point.
16:17 UtahDave cbloss: can you test on the develop branch?
16:17 cbloss yeah let me make some VMs real quick and do that. give me a little bit to get that done
16:17 UtahDave cbloss: cool. thanks
16:18 UtahDave nahamu: I need to get that working eventually, but I think it's going to be a while before I can focus on that.  :(
16:19 UtahDave cowmix: so is that not working for you?
16:19 m_george joined #salt
16:19 TheRealBill joined #salt
16:19 nahamu UtahDave: I might try getting it to shove a virtualenv egg into there and see if that fixes it, but that's about all I have time to try.
16:20 UtahDave cool
16:23 cowmix UtahDave: Nope.. does that look sort of right?
16:23 troyready joined #salt
16:25 taylorgumgum joined #salt
16:30 UtahDave cowmix: so what output are you getting?  Is the publish.publish not working or is something wrong with the jinja templating?
16:34 Damoun joined #salt
16:35 nahamu UtahDave: including the virtualenv egg doesn't seem to be enough to fix it. :(
16:35 gldnspud joined #salt
16:35 balboah joined #salt
16:35 zz_cro joined #salt
16:37 cbloss UtahDave: just to confirm, you want me to install salt via "curl -L http://bootstrap.saltstack.org | sudo sh -s -- git develop"  (-M for master)
16:37 brimpa joined #salt
16:37 carmony UtahDave:  you want to know what the problem is?
16:37 zz_cro joined #salt
16:37 carmony Digital Ocean's API is broken :P
16:37 UtahDave carmony: doh!
16:38 carmony the list_droplets api is timing out
16:38 UtahDave carmony: or is it the digital ocean salt-cloud driver?  I thought there was a key error or something
16:38 UtahDave cbloss: yep, that looks great!
16:38 carmony no, I
16:38 carmony I'm trying to call the API directly
16:38 Guest2511 I think I found the reason why my minion gives empty responses. minion log has countless occurrences of the same exception: File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2081, in _handle_iorder     state[name][s_dec].append( AttributeError: 'str' object has no attribute 'append'
16:40 carmony UtahDave:  I looked at the driver and it looks fine
16:42 carmony I just submitted a ticket to their support
16:42 m_george left #salt
16:43 taylorgumgum joined #salt
16:44 UtahDave carmony: cool, man.  That will be nice to have working
16:45 zz_cro joined #salt
16:45 carmony they've responded saying they are looking into the issue
16:46 bitz joined #salt
16:46 vDevices joined #salt
16:47 zz_cro joined #salt
16:48 cro joined #salt
16:51 vDevices Greetings Everyone! I'm trying to set up salt-cloud for the first time on a DigitalOcean master and I'm having trouble...
16:52 jcockhren vDevices: What's your question?
16:54 cowmix UtahDave:no jinja errors (anymore).. how can I test to see if publish.publish is functioning?
16:54 cbloss UtahDave: same issue with dev
16:55 vDevices RE: Salt & salt-cloud; do I need to open any specific ports on the firewall?
16:56 zz_cro joined #salt
16:57 UtahDave cowmix: you can try just printing out the results.  also, you can run it from the cli on the minion
16:57 UtahDave vDevices: The salt master needs ports 4505 and 4506 open.   that's all that's required
16:57 jcockhren vDevices: what he said^
16:59 vDevices TCP, UDP or both?
16:59 UtahDave tcp
17:00 vDevices Thanks
17:00 carmony UtahDave: they got back to me, the API is fixed
17:01 rgbkrk joined #salt
17:01 carmony though we might want to have salt-cloud throw an error instead of just silently failing
17:01 vDevices @carmony: who's API?
17:01 carmony Digital Ocean
17:01 forrest what was up with it carmony?
17:01 forrest just maintenance?
17:01 vDevices ah! I wonder if that's what my problem was!
17:01 carmony the api to get a list of droplets was timing out
17:01 carmony so it would cause salt-cloud to just spin & eventually not list those servers
17:01 UtahDave carmony: so does -d with the map work now?
17:02 carmony let me test!
17:02 cbloss UtahDave: http://pastebin.com/0JJ2bwUg
17:02 cbloss i used git to downgrade to 0.17.0 and everything works fine
17:03 carmony having salt manage your salt-cloud files is so nice, having pillar data available :)
17:03 UtahDave carmony: that's a really great way of going about that.
17:03 UtahDave cbloss: OK, that's great info.  Would you mind opening an issue regarding this?  We need to track this down and figure it out.
17:04 xmltok joined #salt
17:05 fllr joined #salt
17:06 Guest2511 turns out I had a few small syntax error in my sls, e.g. "-installed" instead of "- installed", or "pgk" instead of "pkg". I'm surprised that this doesn't give any useful error output. instead, all I get is an empty minion response and some exception in the log.
17:06 KyleG1 joined #salt
17:09 jslatts joined #salt
17:09 cro joined #salt
17:09 forrest Guest2511, yes that's a pain point.
17:10 taylorgumgum joined #salt
17:11 fllr Hey guys. I'm trying to install a library called prince using Salt, but I'm getting this error: https://gist.github.com/anonymous/fa1818721c3b7d8b2236 what gives?
17:11 jumperswitch joined #salt
17:13 UtahDave terminalmage: fllr's error above make sense to you?
17:15 terminalmage UtahDave: I'm not sure that http sources are supported
17:15 cowmix UtahDave: What's is a sample command to run on the minion to test the publish.publish connectivity?
17:15 Guest2511 forrest: to put it mildly. first time ever I want my ruby dsl back.
17:15 forrest according to the docs they are terminalmage.
17:15 terminalmage When a "sources" install is done with pkg.installed, salt caches the file using cp.cache_file
17:16 terminalmage that error suggests that the file was not cached
17:16 terminalmage or, if it was, then cp.cache_file may have a bug
17:16 terminalmage because the path to the locally cached file is used to install
17:16 UtahDave cowmix: from the minion:    salt-call publish.publish '*' network.ip_addrs eth0
17:16 terminalmage but the error there is "no such file or directory"
17:16 fllr terminalmage: I think it might have a bug because I just ran pkg -i --force-confold  /var/cache/salt/minion/extrn_files/base/www.princexml.com/download/prince_9.0-2_ubuntu12.04_amd64.deb manually and it worked.
17:19 Guest2511 it's the "-installed" vs. "- installed" that it couldn't handle at all (in terms of giving a useful error). is this something that can be improved? cost me at least half a day.
17:20 forrest Guest2511, I don't know if there is an open issue regarding errors and what data they provide.
17:21 higgs001 joined #salt
17:21 fllr Though, I'd like to have salt handle that, instead of having to do that manually =p
17:21 HeadAIX joined #salt
17:23 Guest2511 to be fair, it was this syntax glitch and (I think) a bug I discovered that kept me busy for so long. at least I learned where to look (minion log).
17:25 cbloss UtahDave: opened one up.. https://github.com/saltstack/salt/issues/8079  thanks for the help (as always)
17:26 fllr terminalmage: UtahDave: Any way I could fix that issue?
17:27 taylorgumgum joined #salt
17:29 pipps joined #salt
17:29 viq Can I in a state query data from another machine?
17:29 amckinley joined #salt
17:30 terminalmage fllr: as temporary measure, you could manually deploy that .deb somewhere on the minion, using a file.managed state, and then use a cmd.run state to install
17:30 terminalmage fllr: I'll work up a pastebin to show an example
17:30 viq say like in http://intothesaltmine.org/blog/html/2013/03/12/using_context_in_salt_states.html but get not own IP but of another machine?
17:30 fllr terminalmage: that'd work. thanks!
17:32 aberant joined #salt
17:32 druonysus joined #salt
17:32 Teknix joined #salt
17:33 TJ1980 joined #salt
17:33 higgs001_ joined #salt
17:33 terminalmage fllr: http://dpaste.com/1428241/
17:33 terminalmage fllr: please still file an issue
17:33 ctdawe joined #salt
17:33 terminalmage and include that gist
17:34 fllr terminalmage: WIll do.
17:35 terminalmage fllr: also, that source_hash may not be correct, I think that md5 may no longer be the default hash type
17:35 terminalmage but that should get you pointed in the right direction
17:39 jumperswitch_ joined #salt
17:39 fllr terminalmage: Yeah, if that doesn't work, I'd know how to fix...
17:40 fllr terminalmage: I was more worried that I wouldn't be able to install prince without salt. :)
17:40 terminalmage cool
17:40 mapu joined #salt
17:42 cbloss is it possible to downgrade salt versions via apt?
17:44 ausmarton joined #salt
17:46 mgw cbloss: I think you can downgrade to 0.16 using the saltstack/salt16 ppa
17:46 cowmix UtahDave: Ping test: https://gist.github.com/cowmix/2f135d668a478de34b5c
17:46 cbloss i'd like to go back to 0.17.0, doesnt look like it is possible though (via apt)?
17:47 cowmix UtahDave: Output: https://gist.github.com/cowmix/2f135d668a478de34b5c
17:49 jcsp joined #salt
17:53 taylorgumgum joined #salt
17:55 fllr joined #salt
17:56 teebes joined #salt
17:57 redondos joined #salt
17:59 cowmix UtahDave: oops.. here's the correct test: v
17:59 cowmix https://gist.github.com/cowmix/2f135d668a478de34b5c
18:03 samsalt joined #salt
18:03 jcsp joined #salt
18:03 oz_akan_ joined #salt
18:05 UtahDave cowmix: did you set up the peer permissions correctly for that minion?
18:05 cowmix UtahDave: at the master level?
18:06 ctdawe joined #salt
18:06 UtahDave yeah, you have to set up the master config to permit a minion to execute a publish command
18:07 rgbkrk joined #salt
18:08 oz_akan_ joined #salt
18:10 ckao joined #salt
18:11 Kholloway joined #salt
18:11 nahamu I wonder if it needs the esky egg.
18:16 josephholsten joined #salt
18:17 cowmix UtahDave: I put the perms in the /etc/salt/minion file instead of the /etc/salt/master (on the master) ..
18:17 cowmix so it DOES work!
18:17 UtahDave Ah, nice!
18:18 cowmix So... what's the best way to test for "masterless" mode.. because these calls don't work when I test under SaltyVagrant?
18:19 QauntumRiff joined #salt
18:20 UtahDave the minion's config options should be in __opt__  so I believe you could check for __opt__['file_client'] == 'local'
18:21 cowmix so in the state check for that?
18:21 UtahDave Yeah. so within jinja that would look something like {% if opt['file_client'] == 'local' %}
18:21 UtahDave I haven't tested that, but it should be something close to that.
18:22 pentabular joined #salt
18:25 nahamu it's never even making an http request.
18:27 rgbkrk joined #salt
18:34 fllr_ joined #salt
18:35 dcrouch joined #salt
18:35 fllr_ Hey guys. state.highstate updates the machines by reading all the states I have written. Is there anyway I can update only *one* state at a time manually?
18:37 bhosmer joined #salt
18:38 foxx[cleeming] joined #salt
18:38 foxx[cleeming] joined #salt
18:40 amckinley joined #salt
18:42 pentabular joined #salt
18:45 fys joined #salt
18:47 TJ1980 yes, to update one state just issue salt 'target' state.sls state-you-want
18:48 pentabular1 joined #salt
18:48 rroa joined #salt
18:49 bhosmer_ joined #salt
18:50 rroa How do I run a salt state with some specific PATH?
18:51 dthom91 joined #salt
18:51 UtahDave rroa: the salt state must exist inside your file_roots
18:52 UtahDave rroa: so if your file_roots is /srv/salt/        and you had   /srv/salt/mysql/client.sls
18:52 UtahDave then you would execute    salt \* state.sls mysql.client
18:52 rroa sorry, I mean a bin PATH, something like PATH=$PATH:/other/path state
18:53 rroa I'm trying to setup django, and the postgres library is looking for pg_config, which exists in /usr/pgsql-9.2/bin/
18:53 rroa I just started using salt a couple of days ago, I'm not sure file_roots can accomplish that
18:54 UtahDave Oh, I see. have you tried the cwd  option?   cwd=/usr/pgsql-9.2/bin
18:55 fys Any idea why '*' state.highstate doesn't work but supplying a specific host does?
18:55 fys er, wouldn't work
18:55 chjohnst_work joined #salt
18:55 dave_den rroa: right now you can't alter the PATH, except in the cmd module, IIRC. You can either alter the path in the salt init script, or follow the recommendations here: http://docs.saltstack.com/faq.html#module-x-isn-t-available-even-though-the-shell-command-it-uses-is-installed-why
18:55 fys There's no way you could know the specific reason. ;)
18:56 rroa ah, thanks. I added it to /etc/profile but that didn't work
18:57 dave_den rroa: that won't work when you start the minion as a system servicce through init. lots of people are confused by that, tho
18:57 rroa yeah, I figured as much but I guess it didn't hurt to try before asking here
18:57 dave_den indeed :)
18:59 dave_den if you're running > 0.17 and an upstart enabled system, you can set your PATH in /etc/default/salt-minion and that will work.
18:59 dave_den >= 0.17 i think
19:00 josephho_ joined #salt
19:00 dave_den for non-upstart systems I think you can set your PATH in /etc/default/salt
19:00 hazzadous joined #salt
19:01 Gareth if you define a value in a pillar file, include that pillar in all nodes.  then have the same value in a pillar specific to one host.  which takes priority?
19:02 rroa I'm running 0.17.1, I'll check it out too. Thanks, dave_den!
19:02 jrdx joined #salt
19:02 ajw0100 joined #salt
19:03 dave_den Gareth: the pillar code works like the state code for compiling, so if you're using state_auto_order, it will likely be the definition that is last
19:03 Gareth is state_auto_order on by default?
19:03 dave_den if you're not using state_auto_order, it would be random (well, techincally left up to python to decide the dict order)
19:04 dave_den but i'm just guessing. i really have no idea :D
19:04 dave_den i believe state_auto_order is default in >= 0.17
19:05 rroa I suppose there isn't a way to do this seamlessly. i.e. if I want to add the PATH through salt, I'll have to restart the minion in order for the changes to take effect.
19:05 dave_den rroa: yes, you will have to restart the minion for it to read the new path
19:06 noob2 joined #salt
19:06 Gareth dave_den: seems like it consistently picks the first definition
19:07 dave_den Gareth: that may be a coincidence. i remember in 0.16 i tried it and did not get the first definition.
19:07 pentabular joined #salt
19:12 hjubal joined #salt
19:12 hjubal joined #salt
19:12 druonysuse joined #salt
19:13 cowmix UtahDave: this is great stuff!  should I be using saltmine instead?
19:13 xt joined #salt
19:13 giantlock joined #salt
19:14 UtahDave cowmix: The Salt Mine is great if your application can deal gracefully with slightly stale data.  The salt mine data refreshes every 60 minutes, by default
19:14 Gareth dave_den: seems to base it on the alphabetic ordering of the includes.
19:14 cjh_ UtahDave: any thoughts on using etcd for the salt mine backer?
19:14 UtahDave the peer interface is live
19:15 UtahDave cjh_: I hadn't really thought about that before.  What do you think the benefits would be?
19:15 dave_den Gareth: interesting
19:16 cjh_ etcd has raft distributed consensus and you wouldn't have a slightly stale data problem
19:16 ajw0100 joined #salt
19:16 cjh_ it's also lightweight.  my etcd processes are using very little ram, maybe 10K resident
19:17 bhosmer joined #salt
19:18 bhosmer joined #salt
19:19 foxx[cleeming] joined #salt
19:19 foxx[cleeming] joined #salt
19:19 troyready joined #salt
19:20 ipmb joined #salt
19:21 UtahDave that does sound interesting, cjh_.  Tom really tries to avoid adding dependencies unless they really make sense.  If you'd like to send an email to the mailing list discussing how you think it would work best we could start the discussion there
19:21 cjh_ UtahDave: ok i'll give it some thought.  i have no idea how the salt mine works so i might be way off here
19:23 UtahDave basically you just specify a list of commands and the minions all execute them every n minutes (60 minutes, by default) and puts that in a database that can be queried later
19:24 cjh_ what's the difference between that and returners?
19:25 josephholsten joined #salt
19:25 nahamu UtahDave: auto-update probably isn't broken on SmartOS. It just seems to have certain expectations about the hosting webserver.
19:27 nahamu yeah, totally fine.
19:27 nahamu http://paste.ec/?c7b4b34482ff9268#l7TJDxghKMnEhRhIEK+DZFXZAwe5DKK63vUhk8nEiKA=
19:27 nahamu UtahDave: thanks for such great software! :)
19:27 UtahDave returners only are called when you make salt executions
19:28 josephholsten joined #salt
19:28 UtahDave nahamu: Ah, it worked!
19:28 cjh_ i see
19:28 UtahDave cjh_: also, it's really easy to query the mine for data
19:30 gildegoma joined #salt
19:30 VertigoRay joined #salt
19:30 UtahDave nahamu: Have you done any packaging for OpenCSW?
19:30 jslatts joined #salt
19:33 linjan joined #salt
19:34 chjohnst_work mhrivnak: I dont want to run pulp on ubuntu but just be able to load up debian repos/mirrors into pulp, is there a plugin for this already?  I found something on github but I wasnt sure if this was backported into mainline or not
19:34 az87c joined #salt
19:34 az87c_ joined #salt
19:35 az87c__ joined #salt
19:36 cachedout joined #salt
19:40 nahamu UtahDave: I have not.
19:40 JasonSwindle joined #salt
19:40 nahamu but there's a chance that my esky builds would work on other Solaris/illumos distros.
19:40 nahamu just not inside the package manager. :)
19:41 UtahDave bummer. the guy who originally was doing the packaging hasn't been able to for work reasons.
19:41 VertigoRay Hey guys ... got a question about managing a file (most likely with file.sed) ... I'd like to manage this file: https://github.com/gitlabhq/gitlabhq/blob/master/config/gitlab.yml.example  This is standard yml, and I'd like to set the host option, but you'll notice that there's a host option on L17 & L115.  I know I can do something like this http://pastebin.com/cER1RLJj to set both hosts
19:43 VertigoRay How do I ensure that the host setting that I'm editing is the one under the gitlab or ldap tree.  I was debating using serialize, but I don't want to build the entire file cause what if they add options in the future that I don't need to change from default.
19:43 forrest VertigoRay, is there a reason you don't just templatize the file?
19:43 JasonSwindle left #salt
19:44 VertigoRay I have it templatized now.  My logic is: what if they add more options that can stay as default.
19:44 nahamu there's something nice about the esky build living outside the package manager.
19:46 troyready joined #salt
19:47 foxx joined #salt
19:47 foxx joined #salt
19:47 UtahDave nahamu: I like it because then you're  less likely to have a system upgrade screw up one of the dependencies for Salt, which could leave you without communication to the minion.
19:48 nahamu UtahDave: indeed.
19:48 redondos joined #salt
19:48 UtahDave nahamu: but many sysadmins and packaging purist flip out when applications pack everything together like that.  :0
19:48 nahamu I think configuration management is important enough to allow it to be an exception.
19:50 nahamu it's weird how the directory changes after an update. it creates the important esky directories, but leaves the old version lingering around in the parent directory which can be confusing.
19:50 ajw0100 joined #salt
19:51 nahamu *after the *first* update
19:51 UtahDave that's interesting
19:52 nahamu It tempts me to consider running an update, cleaning the directory, then shipping the "correctly" laid out version as a tarball for initial deploys.
19:53 UtahDave yeah
19:54 nahamu oh, it's just "make a directory named "appdata", move the directory named "salt-<version>-<platform-info>" to be a subdir of "appdata"
19:55 Gareth UtahDave: any ideas about my pillar question?
19:55 felixhummel joined #salt
19:56 Brew joined #salt
19:57 Brew1 joined #salt
19:58 pentabular1 joined #salt
19:58 toastedpenguin joined #salt
20:01 UtahDave Gareth: I'm not exactly sure. I'm checking if someone else here knows.
20:01 Gareth UtahDave: thanks :)
20:01 srage joined #salt
20:02 pdayton joined #salt
20:03 pipps joined #salt
20:04 jslatts joined #salt
20:04 tyler-baker joined #salt
20:04 forrest lol basepi, yea I have been considering changing my github user, but someone else already has forrest.
20:05 basepi hehe, now that i've made the connection i'm good
20:05 basepi =)
20:05 forrest heh
20:06 taylorgumgum joined #salt
20:06 Gifflen joined #salt
20:07 druonysuse joined #salt
20:07 druonysuse joined #salt
20:07 toofer joined #salt
20:08 QauntumRiff joined #salt
20:09 Koma joined #salt
20:13 TheRealBill_away joined #salt
20:15 abe_music joined #salt
20:15 UtahDave Gareth: I'm going to have to wait for Tom to get exact answer to your question. He hasn't documented that clearly. He'll be in the office tomorrow and I should be able to get a good answer then
20:19 Gareth UtahDave: awesome.  thanks. :)
20:21 taylorgumgum joined #salt
20:27 mwillhite joined #salt
20:30 Gifflen_ joined #salt
20:31 jhulten joined #salt
20:33 spicyWith joined #salt
20:35 cowmix {% if opt['file_client'] == 'local' %} doesn't seem to be working for testing for serverless
20:36 boltbolt joined #salt
20:38 boltbolt I'm not sure if I understand the 'salt way' of doing this.
20:38 boltbolt I've got two states, db.master and db.slave.  They share some of their config, db.  Both 'include: - db'.
20:39 boltbolt In the db state, I've got a file that I'd like to paramterize.  The master should allow streaming replication, where the slave should not.
20:39 boltbolt In puppet, I can use a parameterized class to pass along 'allow_streaming_replication', which the template can then interpret and generate the config file appropriately.
20:39 boltbolt I know that I can use Pillar to set state on nodes themselves.
20:40 boltbolt But it seems silly to me to keep the config in pillar/top.sls and the states in salt/top.sls in sync.
20:40 boltbolt Am I misisng something?
20:40 boltbolt Is there a way to tie config to states, or only to machines?
20:41 ausmarton joined #salt
20:41 UtahDave boltbolt: Keep the config file in your states file_roots and templatize it
20:42 boltbolt UtahDave: Thanks, can you share an example?
20:42 mapu_ joined #salt
20:42 boltbolt I'm not totally sure what you mean.
20:42 cowmix FWIW, here's the error: https://gist.github.com/cowmix/abb38aa7fdfe6da04bf2
20:43 UtahDave boltbolt: OK, so in your states use  file.managed on that config file
20:43 boltbolt OK.
20:43 UtahDave for the option for "allow_streaming_replication" use a pillar variable that gives you the correct value depending on which type of db it is
20:44 boltbolt OK.
20:44 noob2 left #salt
20:45 boltbolt But doesn't that mean that I need to target the same machine twice, both in pillar/top.sls and salt/top.sls?
20:45 boltbolt I'll be more explicit.
20:46 boltbolt http://pastie.org/private/k9unr31zu6igpscnrbzkqq
20:46 boltbolt Say I want 'rest.dev' to be a db.master
20:46 boltbolt Does that mean setting the state in salt/top.sls and ALSO adding a config for, say, db.master in pillar?
20:47 boltbolt And then keeping those two files in sync?
20:48 isomorphic joined #salt
20:48 UtahDave boltbolt: Well, since you're classifying based on the match there, you could also not use pillar for that value, but have an if statement in the jinja based on the same matching you're doing in the top.sls.
20:48 boltbolt Is there a way to check from which state that config is included?
20:49 boltbolt Something like {% if state['db.master'] %} configure streaming replication {% endif %}
20:49 boltbolt I just want to keep the logic for setting states and the config that goes with a particular state (not a particular machine) in the same place.
20:50 ctdawe joined #salt
20:50 kula boltbolt: i might do something like this: https://gist.github.com/tlk2126/7144719
20:51 boltbolt kula: I like where this is going.
20:51 boltbolt By "Pillar stuff", what do you mean?
20:52 boltbolt Inside a Pillar file that matches for that host?
20:52 boltbolt (sorry, I'm on day two of salt here)
20:52 kula i'd put the pillar stuff in something that, at least, every db machine can access.
20:53 kula the key point is both the db slaves and the db master can have access to the very same 'Pillar stuff', because the decision in the config file is based on if the minion id appears in the db_master or db_slaves list
20:53 danielbachhuber joined #salt
20:53 boltbolt kula: Interesting, thanks.  I still need to keep a host map up to date, but it's cleaner than keeping the matching straight.
20:54 boltbolt Also, unrelated, on day two, I've gotten a lot further than I did on day two of Puppet six months ago.
20:54 seanz Any way for states.file.directory to just add g+w for mode?
20:54 boltbolt The fact that it compiles and runs so quickly means that I can actually test this stuff and iterate a lot faster.
20:55 kula boltbolt: that there is the very same feeling i had, and why i went with salt
20:55 kula you can also match on pillar data in your salt top.sls, although it's not as nice as i'd like.
20:55 cowmix UtahDave: do you using a if statement like that to test for serverless access.
20:55 cowmix ?
20:55 boltbolt kula: also, the community appears to be much less clueless / more helpful
20:56 boltbolt Keeping matching in sync with those two top.sls files seems like a huge PITA.
20:56 boltbolt And very prone to errors.
20:56 boltbolt I don't like that.
20:56 kula i really should write a matcher so that 'if the minion id is in this pillar, match'
20:57 UtahDave conference call. back in a few minutes
20:57 kula yeah, i don't really use different pillar sls files on different machines. having one pillar, where i define "these minions are in this state, these minions are in that state", matches more closely the way my brain works
21:00 cewood joined #salt
21:00 taylorgumgum joined #salt
21:02 redondos joined #salt
21:02 fragamus joined #salt
21:03 UtahDave joined #salt
21:04 Ryan_Lane joined #salt
21:08 isomorphic joined #salt
21:10 wibberwock joined #salt
21:10 pdayton left #salt
21:10 abe_music not sure if this is currently possible or not, but has anyone experimented with dynamic environments or dynamic file roots? i'm looking for a way to "sandbox" SLS such that alice can have her states and bob can have states named the same, while not having to restart the master each time a new user is needed
21:10 toofer_ joined #salt
21:11 wibberwock for multiple root directories, file overlapping is allowed but subdirectory overlapping isn't?
21:11 Ryan_Lane joined #salt
21:13 Ryan_Lane joined #salt
21:13 kula abe_music: i was doing some testing last week doing the exact thing with the gitfs backend.
21:13 c0bra joined #salt
21:13 abe_music kula: any luck? :)
21:13 kula i just made a branch for alice and configured my top.sls so that only alice picked things out of the alice environment.
21:13 kula yeah, it worked very well.
21:14 abe_music cool, thanks...i'll look into that
21:14 Ryan_Lane UtahDave: I'm seeing some bad issues with 0.17.1
21:15 Ryan_Lane prior to upgrade "salt-run manage.up | wc" returned a consistent number of around 1000
21:15 woebtz joined #salt
21:15 Ryan_Lane now it returns a random number between 400-600
21:16 Ryan_Lane I tried increasing the worker count from 25 to 50
21:16 Ryan_Lane that doesn't help
21:17 Ryan_Lane the minions showing as down actually return pings if I ping them individually or in smaller numbers
21:19 vDevices joined #salt
21:23 Corey http://cookbook.logstash.net/ We need to be there. :-)
21:26 vDevices Greetings Everyone. I'm trying to set up Salt-Cloud -- for the first time -- for my DigitalOcean account. I created the file /etc/salt/cloud.providers.d/digital_ocean.conf. In reviewing https://salt-cloud.readthedocs.org/en/latest/topics/config.html#core-configuration, I'm not clear on what all needs to go in /etc/salt/cloud
21:27 vDevices right now, all I have is: # Set the location of the salt-master
21:27 vDevices minion:
21:27 vDevices master: master.mydomain.tld
21:33 bhosmer joined #salt
21:45 vDevices Another thing that I'm confused about... If I'm going to utilize the /etc/salt/cloud.providers.d/ subdirectory... do I still need an /etc/salt/cloud.providers file?
21:47 UtahDave Ryan_Lane: Are all the minions upgraded to 0.17.1 as well?
21:47 Ryan_Lane UtahDave: yes
21:51 UtahDave Ryan_Lane: Do the calls show up in the minion's logs?  For the minions that don't return?
21:51 Ryan_Lane well, the logs are set to warning
21:51 c0bra joined #salt
21:51 Ryan_Lane on the master they are set into debug
21:51 Ryan_Lane let me see if they show up in the master log
21:51 UtahDave Ryan_Lane: If you look up the jid in the job cache do you get all 1000 minions returning?
21:51 renoirb Quick question regarding minion.d directory
21:51 Ryan_Lane oh. let me see
21:52 renoirb the comment is unclear whether they include or not all files in /etc/salt/minion.d/foo.conf
21:52 UtahDave vDevices: no, you don't need /etc/salt/cloud.providers if you're using the .d direcotory
21:52 renoirb should it be executable?
21:52 UtahDave renoirb: yes, it will include all .conf files in minion.d
21:52 renoirb Thx UtahDave
21:52 UtahDave np! renoirb
21:53 vlcn joined #salt
21:54 Ryan_Lane UtahDave: ah. it does
21:54 UtahDave They all show up?
21:55 UtahDave So for some reason it's not waiting at the CLI for all the minion return.  Does that sound right?
21:57 Ryan_Lane UtahDave: is there any way to change the default timeout?
21:57 UtahDave yeah, at the cli  -t         so salt \* test.ping -t 300
21:58 Gifflen joined #salt
21:58 pentabular joined #salt
21:59 whiskybar with the grains "roles: [webserver, database]", how do I test for roles:webserver in a jinja template? this is ugly: {% if 'webhosting' in grains.get('roles', []) %}
21:59 UtahDave vDevices: have you already looked through the DO specific example?  https://salt-cloud.readthedocs.org/en/latest/topics/config.html#digital-ocean
22:00 whiskybar I mean {% if 'webserver' in grains.get('roles', []) %} - is there a nicer way?
22:00 cjh_ is the salt-api still a thing or is that dead now?
22:00 oncjohnst joined #salt
22:01 UtahDave whiskybar: that's probably how I would do it, but I'm not a jinja expert.  Anybody else have a suggestion?
22:02 cjh_ nvm it looks like salt client api is where i should be looking
22:02 Ryan_Lane UtahDave: well, I mean the default without passing an arg ;)
22:02 UtahDave cjh_: Yeah, it's still a ting.
22:02 honestly whiskybar: I don't think there's anything prettier
22:02 Ryan_Lane UtahDave: also, prior to the upgrade salt returned all pings in < 5s, now it's taking 15s
22:03 m_george|away joined #salt
22:03 UtahDave OK, that's some good data.  Have you noticed any errors in the logs or anything?
22:03 whiskybar okay, that's also a reasonable answer :) thank you
22:03 UtahDave :) you're welcome, whiskybar.  Yeah, lots of people use the api
22:03 mafrosis joined #salt
22:04 UtahDave Ryan_Lane: Yeah, the 'timeout' config option in the master config is what you want
22:05 ctdawe joined #salt
22:05 cjh_ with the python client api is it possible to add a new machine to my top.sls match with it?
22:05 cjh_ i guess i can since it's just yaml right?
22:07 Ryan_Lane joined #salt
22:07 Ryan_Lane joined #salt
22:09 m_george left #salt
22:10 premera joined #salt
22:13 renoirb Hey guys,  regarding gitfs_remotes: I do not see references about how to declare states, pillars from gitfs
22:14 renoirb I found this https://github.com/saltstack/salt/blob/develop/salt/pillar/git_pillar.py but i'm not really proficient in Python
22:14 renoirb And http://docs.saltstack.com/topics/tutorials/gitfs.html do not talk about pillars
22:15 kermit joined #salt
22:17 spicyWith in a pillar top.sls file, how would I reference an sls file that is a few directories deep in the pillar tree?
22:17 spicyWith dot notation?
22:17 renoirb spicyWith: dot notation
22:17 renoirb but i do not think you can go that much deep
22:18 renoirb you could use salt://stateName/whatever/deep/you/might/want.txt here though
22:18 spicyWith renoirb: so something like apps.app1.django.settings wouldn't work?
22:18 renoirb But for states/pillar... i'm not sure
22:18 spicyWith I see
22:19 UtahDave Ryan_Lane: what version to you upgrade from?
22:19 rgbkrk joined #salt
22:20 druonysus joined #salt
22:20 renoirb I separate by functionality a folder, then i put the sensible default in the init.sls, otherwise I create a statename/other.sls file and call it specifically in a top 'app*': … statename.other
22:20 UtahDave renoirb: have you tested arbitrarily deep sls file directories?
22:20 UtahDave renoirb: I usually only go one directory deep, but I was under the impression you could go as deep as you wanted.
22:20 backjlack joined #salt
22:21 pdayton joined #salt
22:21 dork joined #salt
22:21 renoirb UtahDave: no. AS I said earlier: But for states/pillar... i'm not sure
22:21 renoirb no
22:22 renoirb And I thought I was conveying that I did not try it myself
22:22 josephholsten joined #salt
22:22 alekibango joined #salt
22:23 UtahDave yeah, me neither. we should test it and find out.
22:24 baoboa joined #salt
22:24 renoirb UtahDave: what is the proper gifts option to use it for pillars?
22:24 rgbkrk joined #salt
22:25 renoirb Documentation do not mention about pillars, but https://github.com/saltstack/salt/blob/develop/salt/pillar/git_pillar.py talks about it
22:25 renoirb I assume a master.d/file.conf with pillar_gitfs: and a line to a git repo would work?
22:25 renoirb (I'm running salt 0.17.0 so you know)
22:26 UtahDave renoirb: you have to use git_pillar  not gitfs
22:27 UtahDave renoirb: http://docs.saltstack.com/ref/pillar/all/salt.pillar.git_pillar.html?highlight=git%20pillar
22:28 renoirb oh!
22:28 renoirb So the config file is ext_pillar:  and it has to start by '- git:'
22:28 renoirb k
22:29 pdayton joined #salt
22:33 tyler-baker joined #salt
22:33 tyler-baker joined #salt
22:33 pipps joined #salt
22:38 renoirb UtahDave: [salt.pillar      ][CRITICAL] Specified ext_pillar interface git is unavailable
22:39 renoirb oh, fair enough: Git-based ext_pillar is enabled in configuration but could not be loaded, is GitPython installed?
22:40 gadams joined #salt
22:47 jalbretsen joined #salt
22:48 renoirb Hey, UtahDave is this still valid? http://docs.saltstack.com/topics/tutorials/gitfs.html
22:50 UtahDave renoirb: yep!
22:50 renoirb the syntax of a line, should i put 'git:' before like ext_pillar: ?
22:50 Ryan_Lane UtahDave: upgraded from 0.15.3
22:51 rroa joined #salt
22:51 renoirb giitfs_remotes: - git+ssh://.…. or - git: git+ssh://...
22:51 Ryan_Lane I also notice some reporting issues with pkg.install, it responds with ------- even though it successfully upgrades a package
22:53 renoirb got to go, ttyl ppl
22:54 BalaV joined #salt
22:55 BalaV Hello, does salt stack support creation of VPC's in AWS?
22:55 UtahDave renoirb: yeah, the entire git connection string
22:56 vymos joined #salt
22:58 BalaV left #salt
23:00 UtahDave BalaV: there's some initial alpha level support for APC, but it's not documented very well yet
23:01 UtahDave Ryan_Lane: OK, could you open an issue on this? I've got an engineer that's going to see if he can duplicate this using minion swarm.
23:01 Ryan_Lane cool. thanks. will do
23:08 Ryan_Lane UtahDave: https://github.com/saltstack/salt/issues/8087
23:10 rgbkrk joined #salt
23:12 UtahDave thanks, Ryan_Lane. We've got a couple people looking at that right now
23:12 Ryan_Lane thanks
23:13 * Ryan_Lane checks if the peer calls are faster now
23:14 Ryan_Lane :(
23:14 Ryan_Lane peer runner calls are still really slow
23:14 Ryan_Lane in fact, they may be slower
23:14 avienu joined #salt
23:15 UtahDave Ryan_Lane: Didn't you get rid of the 10baseT hub yet??
23:15 Ryan_Lane this is some bug with the peer system
23:15 Ryan_Lane if I run the runner directly on the master it returns basically immediately
23:16 Ryan_Lane if I run it via a peer it takes nearly a minute
23:16 UtahDave how many minions are running the peer at a time and how many worker_threads are you running on the master?
23:16 Ryan_Lane 1 minion
23:16 Ryan_Lane 50 threads
23:17 Ryan_Lane it's targeting a grain: deployment_target:test
23:17 UtahDave ah, ok.  Yeah, something is wrong there.  What's the peer call you're executing? I'd like to test it
23:17 Ryan_Lane there's other systems that have the deployment_target grain, but different values
23:17 Ryan_Lane A custom one
23:17 Ryan_Lane one sec, I'll show you the code, it's ultra simple
23:18 Ryan_Lane http://git.wikimedia.org/blob/operations%2Fpuppet.git/f9855ffb2be8de2a8408671d1aa45e32d403891f/modules%2Fdeployment%2Ffiles%2Frunners%2Fdeploy.py
23:18 Ryan_Lane it's also a custom module
23:18 Ryan_Lane using a custom returner
23:18 Ryan_Lane http://git.wikimedia.org/blob/operations%2Fpuppet.git/f9855ffb2be8de2a8408671d1aa45e32d403891f/modules%2Fdeployment%2Ffiles%2Fmodules%2Fdeploy.py
23:18 Ryan_Lane http://git.wikimedia.org/blob/operations%2Fpuppet.git/f9855ffb2be8de2a8408671d1aa45e32d403891f/modules%2Fdeployment%2Ffiles%2Freturners%2Fdeploy_redis.py
23:26 forrest joined #salt
23:27 * UtahDave testing......
23:28 Ryan_Lane UtahDave: so, weirdly enough, in my test environment this takes like 7 seconds per call
23:28 Ryan_Lane but it's a salt master that only has a single minion
23:28 UtahDave same 0.17.1 on master and minon?
23:28 * __number5__ thinking must be in the wrong channel because the 'puppet' keyword
23:28 Ryan_Lane yep
23:28 Ryan_Lane __number5__: I use a combination of puppet and salt
23:29 Ryan_Lane config management with puppet and remote execution, deployment, orchestration, etc with salt
23:29 Ryan_Lane we have a lot of legacy puppet code
23:29 cowmix wow... i can't figure out any good way to reliably test for masterless mode.. I'm stumped.
23:30 __number5__ I see that, manage the whole wikipedia infrastructure must be a hard job
23:30 UtahDave Ryan_Lane: have you tested if this same behavior happens when running peer calls as opposed to peer_run calls?
23:30 UtahDave cowmix: have you looked at __opt__['file_client']  ?
23:31 UtahDave __number5__: Ryan_Lane makes it look like a piece of cake!
23:31 Ryan_Lane UtahDave: well, we don't allow peer commands
23:31 UtahDave k
23:31 Ryan_Lane it would likely be difficult as we can't target that well
23:32 josephholsten joined #salt
23:33 pipps joined #salt
23:35 lemao joined #salt
23:37 pentabular joined #salt
23:37 UtahDave Ryan_Lane: ok, so    time sudo salt-call publish.runner manage.up     took this long for me just now real0m21.994s
23:37 jacksontj joined #salt
23:38 UtahDave is that in line with what you're seeing?
23:38 Ryan_Lane one sec. let me see
23:38 cowmix UtahDave: yup
23:39 cowmix https://gist.github.com/cowmix/abb38aa7fdfe6da04bf2
23:39 Fandekasp joined #salt
23:39 Ryan_Lane laner@tin:/srv/deployment/test/testrepo$ time sudo salt-call -l quiet publish.runner deploy.fetch 'test/testrepo'
23:39 Ryan_Lane real    0m40.301s
23:39 UtahDave Ryan_Lane: an on a minion running 0.16.3 it took      real     0m12.250s
23:40 Ryan_Lane hm. interestingly enough the runner on the master is taking quite a while now too
23:42 UtahDave OK, I think I'm going to have to bring Tom in on this one.  He's just getting back today from some conferences in Europe and won't be back in until tomorrow morning
23:42 Ryan_Lane root@sockpuppet:/etc/salt# time salt-run deploy.fetch 'test/testrepo'
23:42 Ryan_Lane real    0m35.536s
23:42 boltbolt joined #salt
23:42 boltbolt Hi!  What's the default for the 'order' option?
23:43 UtahDave boltbolt: in what context?  in an sls file?
23:43 boltbolt UtahDave: yep
23:43 ctdawe joined #salt
23:43 boltbolt If I specify order: 1, does that come after things that have no order specification?
23:43 Ryan_Lane root@sockpuppet:/etc/salt# time salt -G 'deployment_target:testrepo' deploy.fetch 'test/testrepo'
23:43 Ryan_Lane real    0m14.542s
23:44 UtahDave I don't think there is a default, but valid options are any integer and 'last'
23:44 boltbolt Hm.
23:44 UtahDave boltbolt: no, order: 1 means that will happen before anything else
23:44 boltbolt So, is it: anything with an integer, in that order; everything that isn't specified; everything specified "last"
23:44 boltbolt ?
23:44 UtahDave yes.
23:45 UtahDave if you have multiple things with order: 1, they'll get executed in the order they were defined
23:45 forrest 14 seconds Ryan_Lane??
23:46 forrest are you deploying to the moon?
23:46 Ryan_Lane it's not the deploy code
23:46 Ryan_Lane it's salt
23:46 Ryan_Lane root@sockpuppet:~# time salt -G 'deployment_target:testrepo' test.ping
23:46 forrest I know I've been reading what you've been saying since I joined, I'm just joking
23:47 Ryan_Lane real    0m14.574s
23:47 boltbolt Thanks, UtahDave!
23:47 UtahDave you're welcome, boltbolt
23:48 Ryan_Lane ah, right, so I'm setting a timeout of 30 seconds in the runner
23:48 Ryan_Lane if I set that to a lower time out, will the job still run?
23:48 Ryan_Lane and go into the job system?
23:48 Ryan_Lane or will anything that doesn't pick up the job just not get it?
23:48 UtahDave It should
23:49 Ryan_Lane because I could just lower the timeout to 5 seconds. I'm using returners anyway.
23:49 UtahDave Ryan_Lane: we've had a couple of issues where the new 'tok' key in some of the dicts that get passed around is causing some stacktraces.
23:49 Ryan_Lane yes, I have that too
23:50 UtahDave I wonder if internally that's happening, but being hidden
23:50 Ryan_Lane I don't know, but everything is surely much slower than before :)
23:50 Ryan_Lane when does mine data get sent back?
23:50 Ryan_Lane on some interval?
23:50 UtahDave every 60 minutes by default
23:51 Ryan_Lane well, that shouldn't be what's slowing things down, then
23:52 log0ymxm joined #salt
23:52 mgw joined #salt
23:53 Ryan_Lane hm. yeah, indeed. if I lower the timeout the peer run goes down to sane numbers
23:53 Ryan_Lane so it seems the peer run bug is solved :)
23:53 Ryan_Lane it's just a matter of normal slowness now, then
23:54 Ryan_Lane \o/ and the job also completed too, so I can set a much lower timeout. hell I wonder if I can set a 1 second timeout
23:56 Ryan_Lane laner@tin:/srv/deployment/test/testrepo$ time sudo salt-call -l quiet publish.runner deploy.fetch 'parsoid/Parsoid'
23:56 Ryan_Lane real    0m4.599s
23:56 * Ryan_Lane jumps for joy
23:56 Ryan_Lane that's to 24 minions, and all of them got the call

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