Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-09

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

All times shown according to UTC.

Time Nick Message
00:02 faldridge joined #salt
00:04 ahammond whiteinge so, I should put that in a file under /srv/salt/????
00:05 ahammond uh /srv/salt/_states
00:06 manfred /quit
00:06 manfred ...
00:08 smcquay joined #salt
00:09 Darnoth joined #salt
00:11 Sypher joined #salt
00:11 jslatts joined #salt
00:11 tvs_ joined #salt
00:12 tvs_ I have a problem, salt-cloud is not installing minion during deployment .. I'm deploying a freebsd instance on Amazon, the instance is created but the salt package is not installed
00:13 tvs_ and I got no errors of any type
00:18 Joseph_ joined #salt
00:19 Joseph_ hi all, i am trying to use the network state module  http://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html#salt.states.network.managed
00:19 Joseph_ In the given example, they have a "require_reboot". Is that supposed to restart the NIC?
00:23 Ryan_Lane whiteinge: so, we turn states into an ordered dict and run them in order, but it seems we don't return the results in order?
00:23 Ryan_Lane is that some limitation of the yaml output?
00:29 hachaboob joined #salt
00:32 redondos joined #salt
00:33 hachaboob Hi. Is it possible to use cmd.wait with a stateful script with source: salt:// ?
00:37 jslatts joined #salt
00:39 vbabiy joined #salt
00:41 KyleG1 joined #salt
00:43 yaru22_ joined #salt
00:43 hachaboob I want to run the script only if the state of a file has changed
00:44 bemehow_ joined #salt
00:45 hachaboob Sorry
00:45 hachaboob I found wait_script...
00:47 elfixit1 joined #salt
00:48 jcsp joined #salt
00:49 ninkotech_ joined #salt
00:51 leventyalcin joined #salt
00:58 yaru22_ joined #salt
01:00 Joseph_ in a SLS, is there a way to say that a given component may only apply to a specific minion or can this only be done on a per file basis?
01:04 oz_akan_ joined #salt
01:06 bemehow joined #salt
01:06 seblu joined #salt
01:10 bemehow_ joined #salt
01:12 yaru22_ joined #salt
01:13 nkuttler Joseph_: sure, you probably want to check the grains
01:13 yaru22__ joined #salt
01:15 Joseph_ well i am not sure that will work. ....I want to use the network state module to assign an IP address to a sepcific nic given the nic's mac address
01:15 Joseph_ enumerating each mac address with a jinjia template if seems nasty to me
01:16 Joseph_ currently the best idea i have is to define all the mac addresses to IP addr as pillar data
01:16 Joseph_ but i was wondering if there was a cleaner way to do this
01:19 ninkotech_ joined #salt
01:21 ninkotech__ joined #salt
01:25 xzarth_ joined #salt
01:27 Luke_ joined #salt
01:31 faldridge joined #salt
01:33 ninkotech__ joined #salt
01:34 schimmy joined #salt
01:34 sroegner joined #salt
01:39 fejjerai joined #salt
01:39 schimmy1 joined #salt
01:45 ninkotech_ joined #salt
01:50 logix812 joined #salt
01:50 ninkotech__ joined #salt
01:51 leventyalcin joined #salt
01:54 Luke_ joined #salt
01:55 ninkotech_ joined #salt
01:58 krufy joined #salt
02:02 redondos joined #salt
02:02 redondos joined #salt
02:03 bhosmer joined #salt
02:07 ninkotech_ joined #salt
02:07 Shenril joined #salt
02:13 ninkotech_ joined #salt
02:14 yaru22 joined #salt
02:20 feiming joined #salt
02:21 ravibhure joined #salt
02:21 orbit_darren joined #salt
02:23 whiteinge ahammond: that file goes in /srv/salt/_modules
02:24 whiteinge once it's there you can sync it to minions with salt '*' saltutil.sync_modules
02:24 whiteinge then you can use it from your states (like in the example)
02:25 Shish joined #salt
02:26 whiteinge Ryan_Lane: almost. requisites are evaluated at runtime so they will affect the order that things are run
02:27 whiteinge (assuming i understood your question correctly)
02:27 whiteinge the running dict that is returned at the end of a state run does display the order that everything was ran
02:31 schimmy joined #salt
02:35 ninkotech_ joined #salt
02:36 schimmy joined #salt
02:40 yaru22_ joined #salt
02:40 ninkotech_ joined #salt
02:42 yaru22_ joined #salt
02:47 Luke_ joined #salt
02:48 saurabhs joined #salt
02:49 ipalreadytaken joined #salt
02:51 leventyalcin joined #salt
02:51 faldridge joined #salt
03:03 catpigger joined #salt
03:04 ninkotech__ joined #salt
03:04 redondos joined #salt
03:06 zirpubolci joined #salt
03:07 yaru22_ joined #salt
03:13 \ask joined #salt
03:27 cruatta joined #salt
03:34 frasergraham joined #salt
03:35 sroegner joined #salt
03:41 Networkn3rd joined #salt
03:45 busted joined #salt
03:50 druonysuse joined #salt
03:50 druonysuse joined #salt
03:51 leventyalcin joined #salt
03:55 kermit joined #salt
04:03 n8n joined #salt
04:06 ckao joined #salt
04:07 acu joined #salt
04:07 l0x3py joined #salt
04:14 smcquay joined #salt
04:16 mateoconfeugo joined #salt
04:16 stephas joined #salt
04:17 steveoliver joined #salt
04:19 mgw joined #salt
04:26 schimmy joined #salt
04:30 schimmy1 joined #salt
04:38 z3uS topic is wrong
04:38 z3uS 1.4 is latest
04:38 z3uS http://docs.saltstack.com/en/latest/topics/releases/2014.1.4.html
04:38 z3uS pssh
04:38 z3uS :P
04:39 * z3uS nudges basepi
04:48 stephas joined #salt
04:51 leventyalcin joined #salt
04:53 feiming joined #salt
04:56 anuvrat joined #salt
04:56 AdamSewell_ joined #salt
04:57 ravibhure joined #salt
04:59 njs126 joined #salt
05:06 jY is there a way to set a var in a sls file to be used in a jinja template?
05:12 ghartz joined #salt
05:16 druonysuse joined #salt
05:16 druonysuse joined #salt
05:18 druonysus joined #salt
05:18 druonysus joined #salt
05:23 bhosmer joined #salt
05:27 steveoliver joined #salt
05:28 cruatta joined #salt
05:35 picker joined #salt
05:36 sroegner joined #salt
05:36 gildegoma joined #salt
05:46 CeBe joined #salt
05:49 schimmy joined #salt
05:51 leventyalcin joined #salt
05:53 schimmy1 joined #salt
06:01 Ryan_Lane joined #salt
06:06 frasergraham joined #salt
06:08 frasergraham joined #salt
06:10 frasergr_ joined #salt
06:11 fraserg__ joined #salt
06:12 frasergraham joined #salt
06:14 fraserg__ joined #salt
06:14 ramteid joined #salt
06:16 frasergraham joined #salt
06:18 frasergr_ joined #salt
06:19 fraserg__ joined #salt
06:21 fraser___ joined #salt
06:22 frasergraham joined #salt
06:24 frasergraham joined #salt
06:26 ajw0100 joined #salt
06:26 frasergr_ joined #salt
06:28 nrgaway joined #salt
06:28 fraserg__ joined #salt
06:30 frasergraham joined #salt
06:30 briner joined #salt
06:31 frasergraham joined #salt
06:33 frasergraham joined #salt
06:33 jnials joined #salt
06:36 mateoconfeugo joined #salt
06:36 newduck joined #salt
06:36 frasergr_ joined #salt
06:38 fraserg__ joined #salt
06:39 fraser___ joined #salt
06:40 newduck Hi, facing some problem in salt setup - need help
06:40 bitmand newduck: just ask :)
06:41 newduck somehow the builtin git commands are not working for windows minion
06:41 frasergraham joined #salt
06:41 sverrest joined #salt
06:41 newduck have configured salt master and windows minion, Installed git on windows and am Able to use git commands into the cmd line successfully
06:42 newduck but same git command not working via salt cmd.run
06:43 frasergraham joined #salt
06:44 frasergraham joined #salt
06:45 frasergr_ joined #salt
06:45 bitmand sorry, I don't know anything about windows minions :(
06:45 newduck oh,
06:46 bitmand I'd recommend trying to ask again in 6-12 hours - there isn't much activity in here at this time of day :)
06:46 newduck oh thanks, I'm completely new to this irc kind of thing
06:46 frasergraham joined #salt
06:47 newduck and this is my first interaction
06:48 newduck anyways bitmand: thanks for your suggestion
06:48 newduck will try after sometime
06:48 frasergraham joined #salt
06:48 bitmand newduck: we communicated, so that's a success  right there :)
06:49 bitmand There is a lot of helpful people on this channel, but I suspect most of them are non-eu people and asleep at the moment :)
06:50 ajw0100 joined #salt
06:50 newduck oh that's great,
06:50 newduck feeling nice chatting with people willing to help
06:50 newduck :)
06:51 frasergraham joined #salt
06:51 leventyalcin joined #salt
06:52 frasergraham joined #salt
06:52 ramteid newduck: in errors in the logs? do you use full path to git?
06:53 ramteid newduck: s/in/any/
06:53 newduck anyways, do you have any idea to this error AttributeError: 'module' object has no attribute 'chown'
06:53 leventyalcin joined #salt
06:53 newduck it is working if I use the full path to git
06:53 frasergr_ joined #salt
06:54 ramteid newduck: well, then that's the solution isn't it?
06:54 thehaven_ joined #salt
06:54 newduck but I can use the chown command
06:55 ramteid newduck: can't help you there I'm afraid... :(
06:55 frasergraham joined #salt
06:56 newduck Okay
06:56 newduck Okay
06:56 rcsheets_ joined #salt
06:57 devx_ joined #salt
06:57 frasergraham joined #salt
06:57 slav0nic joined #salt
06:57 slav0nic joined #salt
06:57 cedwards joined #salt
06:57 cedwards joined #salt
06:59 premera joined #salt
06:59 frasergraham joined #salt
07:00 mfournier joined #salt
07:00 TyrfingMjolnir joined #salt
07:01 frasergraham joined #salt
07:02 frasergr_ joined #salt
07:03 scristian joined #salt
07:04 it_dude joined #salt
07:04 frasergr_ joined #salt
07:05 frasergr_ joined #salt
07:05 harobed_ joined #salt
07:06 harobed_ joined #salt
07:06 frasergr_ joined #salt
07:07 harobed_ joined #salt
07:08 frasergr_ joined #salt
07:09 frasergraham joined #salt
07:10 harobed_ joined #salt
07:11 frasergr_ joined #salt
07:12 malinoff joined #salt
07:12 frasergraham joined #salt
07:14 frasergr_ joined #salt
07:15 fraserg__ joined #salt
07:16 martoss joined #salt
07:17 fraser___ joined #salt
07:18 frasergraham joined #salt
07:20 frasergraham joined #salt
07:20 sfello joined #salt
07:21 Kenzor joined #salt
07:21 frasergraham joined #salt
07:24 frasergraham joined #salt
07:31 siciliansun joined #salt
07:32 babilen joined #salt
07:34 _ale_ joined #salt
07:34 martoss1 joined #salt
07:35 ndrei joined #salt
07:37 sroegner joined #salt
07:37 mortis anyone know of any active dashboard(ish) projects for salt other than halite? i feel like im in need of a better overview of when minions last ran, what version they are on and so forth .. something like puppetdb or maybe foreman, i dunno
07:42 epcim joined #salt
07:45 epcim_ joined #salt
07:46 babilen mortis: halite is the only (maintained) web frontend I've heard of in relation to salt
07:50 mortis babilen: yeah, same here, but i heard rumors of possible foreman-integration
07:56 Etch joined #salt
07:59 _ale_ mortis, oh that'd be awesome!
07:59 _ale_ (re foreman integration)
07:59 siciliansun left #salt
07:59 _ale_ lemme ask the guys at foreman :)
08:00 mortis _ale_: :D ..well foreman has an api of sorts, so it shouldn't be all that difficult to include salt
08:01 _ale_ true :)
08:05 darkelda joined #salt
08:05 darkelda joined #salt
08:11 _ale_ right, one of the guys said "they like'd it" - but dont have anyone working on it atm ... so I guess it just needs a couple volunteers :)
08:11 _ale_ mortis, ^^^
08:11 _ale_ so any volunteers :) ?
08:11 mortis maaaaaaaaaaaaaaybeeeeee
08:12 Guest46832 joined #salt
08:13 _ale_ :D
08:13 _ale_ it'll be a lot of work, i know :) .. but worth it!
08:14 jakubek can I create some dependencies in state files? when im executing state.sls haproxy I know that i need also stunnel. i know that I can execut haproxy,stunnel but it will be nice to create some hint in haproxy state that some state is needed
08:16 drogoh joined #salt
08:18 totte joined #salt
08:24 totte joined #salt
08:24 ghartz joined #salt
08:25 frasergraham joined #salt
08:28 epcim_ joined #salt
08:31 mortis jakubek: service: - running?
08:31 mortis http://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html
08:36 N-Mi joined #salt
08:36 N-Mi joined #salt
08:36 _ale_ mortis, i think he means a dependency on another state
08:36 faldridge joined #salt
08:40 topochan joined #salt
08:43 epcim_ joined #salt
08:46 jakubek mortis: i was thinking aboiut include :-)
08:46 jakubek mortis: to create chain of states
08:47 MrTango joined #salt
08:51 anuvrat joined #salt
08:51 orbit_darren joined #salt
08:51 jnials joined #salt
09:02 sfello joined #salt
09:03 Teknix joined #salt
09:10 xintron left #salt
09:11 ndrei joined #salt
09:17 jeddi joined #salt
09:24 sfello joined #salt
09:25 babilen How often are salt/presence/present or salt/presence/change fired?
09:25 babilen (cf. http://docs.saltstack.com/en/latest/topics/event/master_events.html -- which says "Fired on a set schedule.")
09:26 frasergraham joined #salt
09:30 cruatta joined #salt
09:37 sroegner joined #salt
09:51 it_dude joined #salt
09:54 Etch joined #salt
09:56 uestra joined #salt
10:03 malinoff joined #salt
10:08 graingert joined #salt
10:08 graingert I want to create a directory, extract a Zip file of javascript and css from the web, then set the permissions as read only
10:08 uestra joined #salt
10:15 graingert ah worked it out
10:16 graingert I create the folder root:root in 755, 644 dir and file modes
10:16 graingert then extract the zip
10:21 andrein joined #salt
10:27 frasergraham joined #salt
10:34 jeddi graingert: if you're pushing the files over, can't you just host the extracted contents on your salt master?
10:34 jeddi six of one, probably.
10:35 graingert jeddi: the zip is hosted on Jenkins
10:35 graingert jeddi: which is the only box us lowly developers can write to
10:36 sealibor_ joined #salt
10:37 it_dude joined #salt
10:50 sealibor_ joined #salt
10:50 ndrei joined #salt
10:55 workingcats joined #salt
11:03 sealibor_ joined #salt
11:05 bhosmer joined #salt
11:07 AlcariTheMad joined #salt
11:08 opapo joined #salt
11:09 cast joined #salt
11:09 ekristen joined #salt
11:10 Flusher joined #salt
11:13 io__ joined #salt
11:13 io__ hi all
11:15 uestra joined #salt
11:18 jnials joined #salt
11:21 sealibor_ joined #salt
11:25 engblom With latest release of salt trying this: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.locale.html
11:25 jrdx joined #salt
11:26 engblom I get this: Comment: State locale.present found in sls locales is unavailable
11:27 frasergraham joined #salt
11:29 jcsp joined #salt
11:31 cruatta joined #salt
11:32 anuvrat joined #salt
11:32 gildegoma joined #salt
11:34 cast two questions, is it possible to have the mount state call mount -o remount? second, i notice the mount module has a remount capability
11:34 cast i could do an explicit exec, though that seems a bit nasty
11:35 cast second question, why all the [seemingly?] functionality and code duplication between salt states and salt modules?
11:36 cast i've hit cases where i want some functionality in the state, but only find it in the equivilent module
11:37 malinoff cast, I can answer the second one - modules are about "execute this", but states are about "ensure that". Of course some functionality will differ
11:38 sroegner joined #salt
11:38 topochan joined #salt
11:39 uestra joined #salt
11:39 malinoff If you want to execute a module from a state, use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#module-salt.states.module
11:40 cast interesting, thanks :)
11:41 io__ left #salt
11:43 epcim1 joined #salt
11:44 d3vz3r0 joined #salt
11:51 to_json joined #salt
11:52 ipmb joined #salt
11:59 epcim joined #salt
12:00 it_dude joined #salt
12:05 faldridge joined #salt
12:06 sgviking joined #salt
12:08 darkelda joined #salt
12:08 darkelda joined #salt
12:09 bastion1704 joined #salt
12:11 orbit_darren joined #salt
12:13 orbit_darren joined #salt
12:17 londo joined #salt
12:18 briner hello, Is there a way to split by file the configuation of pillars. Something like what is used with xxxx.d directory
12:19 briner I'm
12:20 uestra joined #salt
12:21 Acid_Scorpion joined #salt
12:22 ndrei joined #salt
12:22 nkuttler briner: sure, isn't that mentioned in the pillar docs? just use the top.sls file
12:23 briner nkuttler, I was thinking more of saying that inside /srv/pillar/users/{joe,tom,...}
12:23 briner and that their
12:24 briner will be a init.sls inside /srv/pillar/users telling that it should use all the file inside this directory : joe.sls, tom.sls ...
12:24 nkuttler hm, no idea
12:25 nkuttler pretty sure you could write a module to do it though if it's not built-in
12:26 nkuttler or maybe you can do it with jinja..
12:26 briner may I write in a top.sls "  users/*"
12:26 briner but in that case I have to have a way to loop upon the filename inside a directory
12:27 anuvrat joined #salt
12:28 ph8 joined #salt
12:28 frasergraham joined #salt
12:42 cast really liking ben cane's saltconf talk. if only i could convince the team to use it as a guidence for decisions
12:44 nkuttler the high availability one?
12:44 jslatts joined #salt
12:44 cast aye
12:45 DenkBret1l link?
12:47 war2 joined #salt
12:49 nkuttler https://www.youtube.com/watch?v=R1bEEzwYeqk
12:53 logix812 joined #salt
12:55 Darnoth joined #salt
12:56 uestra joined #salt
12:56 swa joined #salt
12:57 jaycedars joined #salt
12:58 mprymek joined #salt
13:02 jeffrubic joined #salt
13:04 resmike joined #salt
13:07 bram__ joined #salt
13:08 theneykov joined #salt
13:10 obimod joined #salt
13:10 racooper joined #salt
13:10 btorch is there a way to place a small pause on salt when running commands ?like I want to reload a service and I do -b 1, but I would also like to tell salt to only start the next batch in like 10s
13:12 viq btorch: how about a cmd.run sleep 10, it requiring previous states, and further states requiring that?
13:12 viq Oh, uhm, next batch
13:12 btorch i tried sleep before but is only good on the box running it
13:15 viq I'm not sure it's been thought of before (as reflected in code.features)
13:16 viq btorch: you could write a state that restarts service and waits...
13:16 cast how does one move a - watch: - file: ... in a service definition to the file definition instead? [ sort of like notify on file resources in puppet ]
13:16 viq so instead of "salt \* -b 1 service.restart nginx" you'd do "salt \* -b 1 state.sls restart_nginx_and_wait"
13:17 viq cast: watch_in
13:17 cast ahh, thanks :)
13:18 btorch viq: hmm but I thought the state will run on the minion side
13:19 colinbits joined #salt
13:19 viq btorch: yes, but you can add a 10 second wait after (or before) restarting service, and the next minion will run only when previous finished it's run
13:20 vbabiy joined #salt
13:20 faldridge joined #salt
13:21 btorch viq: I've done this before which seems to be what you mean or not :) cmd.run 'service nginx reload ; wait 15'
13:22 viq wait? I don't know that command
13:22 viq I know sleep
13:23 ajprog_laptop joined #salt
13:23 btorch usisorry sleep
13:23 viq Then yeah, that's one way to do it.
13:25 jeffasinger joined #salt
13:26 theo-slc joined #salt
13:28 viq http://paste.openstack.org/show/79726/ - something like that maybe
13:28 btorch I need to check it out on a staging environment. I don't think it helps. I think it only delays the output back to salt. I checked both servers I tried it on right now and the services on both seems to have reloaded at the same time and been running for the same time
13:29 frasergraham joined #salt
13:30 viq hm
13:30 mpanetta joined #salt
13:30 * viq continues trying to figure out why on some openvz containers salt-minion does not try to connect to master
13:32 cruatta joined #salt
13:33 briner I'm not able to use jinja in pillar
13:33 viq huh? I use jinja in my pillars
13:33 war3 joined #salt
13:34 briner could you give me an url where I can have a look
13:34 Ryan_Lane joined #salt
13:34 viq https://github.com/viq/cm-lab-salt/blob/master/salt/roots/pillar/router.sls
13:35 briner I have a : users.sls defining users:joe, users:tom and so on, and have a group of user telling that user_group sysadmin has joe and tom in their group. I try to say in my sls:
13:35 briner tusers:
13:35 briner {% for user in pillar['lunidebrepos1.unige.ch']['known_users'] %}
13:35 briner - {{ user }}
13:35 briner {% endfor %}
13:35 jaimed joined #salt
13:35 viq briner: some pastebin
13:36 viq aaah, you're trying to use pillar in pillar. That won't work
13:36 briner ahh
13:36 briner ok..
13:36 uestra joined #salt
13:37 war2 joined #salt
13:37 briner viq, so how do you use jinja in pillar
13:37 viq briner: like so for example https://github.com/viq/cm-lab-salt/blob/master/salt/roots/pillar/collectd.sls
13:38 viq or https://github.com/viq/cm-lab-salt/blob/master/salt/roots/pillar/router.sls
13:38 briner oh I see
13:39 sroegner joined #salt
13:39 briner viq, so this http://docs.saltstack.com/en/latest/topics/pillar/#pillar-get-function is for use in state and not in pillar
13:39 ndrei joined #salt
13:40 wincus joined #salt
13:40 briner viq, thanks for this precious help, I was getting a bit stuck
13:40 viq briner: when pillars are compiled, _all_ of them are compiled at the same time, so when you try to reach a pillar from a pillar you get undefined
13:40 viq AKA chicken and egg problem
13:40 briner logical
13:41 briner :)
13:42 jcsp joined #salt
13:45 viq briner: you possibly could use jinja maps for something, and jinja variables. But you can't use pillar values inside of pillars.
13:46 cast next question...any suggestions of a tool like serverspec to confirm that server states are as desired in the configuration? could use serverspec though if there's something, possibly written in !ruby, that the python centric salt community has latched onto...
13:47 GradysGhost joined #salt
13:47 viq cast: there's kitchen-salt (in ruby) that you could use to test your stuff before pushing it into production
13:47 jnials joined #salt
13:47 viq cast: http://www.slideshare.net/m_richardson/serverspec-and-sensu-testing-and-monitoring-collide could possibly be adapted to salt
13:48 viq But no, I don't think such a pattern emerged yet.
13:48 albertid joined #salt
13:48 faldridge joined #salt
13:49 cast mmm, i do think such functionality should merge into monitoring
13:49 viq It's a shame that https://github.com/lincolnloop/salmon died - it seemed to be going in an interesting direction
13:50 viq cast: yeah, and monitoring is a solved problem. Not.
13:50 viq ;)
13:50 uestra joined #salt
13:50 cast i've been using short lived VM instances controlled via buildbot, with custom python functionality tests, to make sure each configuration component is setting up its respective part of functionality...in a way that functions. aka unit testing!
13:51 cast but while doing it, it sure felt like i was writing a crappy monitoring system
13:51 BigBear joined #salt
13:51 viq cast: sounds like you're doing what kitchen-salt does
13:52 albertid Hi, can I have a template sls for a project, and then instanciate it multiple times on the same minion with different instance parameters/pillars?
13:52 viq albertid: only if you make the IDs be parametrized
13:53 viq ...I'm not sure actually
13:53 jnials joined #salt
13:53 viq More like you have a my_custom_stuff.sls that takes data from pillars or whatever, and loops over them
13:54 CeBe joined #salt
13:54 viq For example creating N vhosts for your webserver
13:54 viq Where you don't call each time "create me X vhost", you tell it "create me vhosts, and the list of them with parameters for them you'll find in this pillar"
13:54 n8n joined #salt
13:55 cast i setup this thing around 2 or 3 years ago when we started using puppet. but its aged, and i'm finding salt much more compelling, so am keen to redo the whole infrastructure in a nicer way, leveraging other peoples work. kitchen-salt [and test kitchen] looks interesting
13:56 viq cast: yeah, I guess not enough of NIH / ruby pain for anyone to try and reinvent the wheel in python ;)
13:56 nkuttler btw, which backup solutions do you guys use? i'm thinking about automating app install from backups
13:56 viq Same with serverspec I guess
13:56 jnials joined #salt
13:56 albertid viq, yea something like this, but still I don't know how this parameterizing of a .sls would look like. Say I have a vhost.sls and want to have it for "x" "y" "z".
13:57 viq albertid: brace yourself ;) https://github.com/jesusaurus/hpcs-salt-state/blob/master/apt/sample.pillar plus https://raw.githubusercontent.com/jesusaurus/hpcs-salt-state/master/apt/repo/distro
13:57 nkuttler albertid: several ways to do this
13:58 cast nkuttler: the the app, or app data?
13:58 nkuttler albertid: essential grains + pillars
13:58 viq nkuttler: "app install from backup" ?
13:58 nkuttler cast: app data only
13:58 sroegner joined #salt
13:58 nkuttler like, pulling the sql dumps
13:58 [diecast] joined #salt
13:59 cast nkuttler: ive been pondering how to automatically repopulate my app data, small amount of times i've done it, its been using mercurial - which is obviously only good for very specific datasets [small files]
13:59 albertid viq, nkuttler: thx, I'll try to get into it
13:59 nkuttler cast: yeah
13:59 nkuttler i think i'll just have to look into scripting it
14:00 viq cast: I heard there recently-ish was a presentation by facebook about scaling mercurial, as it deals better with data than git
14:00 viq but that's an unrelated sidenote ;)
14:01 viq But there's rsync, there's file.recurse, there's cmd.wait....
14:01 war3 joined #salt
14:01 viq I still find the idea sexy of what I heard twitter does to distribute app updates between their servers - they use bittorrent
14:02 viq But that makes sense if you have a farm of machines
14:02 timoguin apparently facebook does that too
14:02 viq Though could possibly make sense even in upper single digits
14:03 njs126 joined #salt
14:05 cast viq: just read the fb post, cool stuff :)
14:05 viq I heard it discussed, haven't actually read it myself
14:05 cast normally git gets all the glory due to being written by linus
14:06 timoguin oh cool. didn't know fb used mercurial
14:06 timoguin i just saw a twitter post by them recently about how their git repo is like 50GB
14:06 timoguin i wouldn't want to do that in mercurial
14:06 timoguin ... or git
14:06 cpowell joined #salt
14:06 cast blogpost suggests they used to use git, but moved to hg for this huge repo
14:07 cast [and patched/extended hg along the way to achieve their ends]
14:07 Etch joined #salt
14:09 oz_akan_ joined #salt
14:09 GradysGhost joined #salt
14:10 MTecknology HAHAHA!!!!  May  8 11:34:25 salt kernel: [584036.219637] TCP: Possible SYN flooding on port 4506. Sending cookies.  Check SNMP counters.
14:10 krichardson joined #salt
14:11 viq heh :P
14:14 fxhp joined #salt
14:17 dannyboy joined #salt
14:18 topochan joined #salt
14:18 cachedout joined #salt
14:18 dannyboy Hi everyone, is it possible to use regex in the salt command when selecting what servers to send a command to?
14:19 dannyboy for example maybe I have a server called proxy345-abc1
14:19 fxhp dannyboy: http://docs.saltstack.com/en/latest/topics/targeting/
14:20 dannyboy great thanks
14:20 fxhp welcome.
14:23 jperras joined #salt
14:23 vejdmn joined #salt
14:24 jeremyBass1 joined #salt
14:25 viq Riiight. So I may have found a common denominator in those OpenVZ container minions that don't attempt to connect to my salt master. The host is running debian 5 (lenny)
14:25 AnswerGuy joined #salt
14:25 viq But the containers have debian 6, which is supposed to be supported. So, WTF
14:26 nkuttler viq: lenny? is there even a salt packaged for that?
14:27 viq nkuttler: no, there isn't. But I'm trying to install salt in containers on it, which run squeeze, and salt _is_ packaged for it
14:27 oeuftete joined #salt
14:27 viq And it starts in the containers. But generates _no_ packets towards the master
14:28 stevednd Is there any way to flatten a list of lists in a jinja template?
14:28 jnials joined #salt
14:28 nkuttler viq: oh, i see
14:28 Heggan joined #salt
14:31 mattmtl joined #salt
14:32 sfello joined #salt
14:33 manfred stevednd: |join() ?
14:34 manfred join can be used to make a list into a string
14:34 manfred stevednd: http://jinja.pocoo.org/docs/templates/#builtin-filters
14:34 stevednd manfred: the join filter only seems to join the first level of list items
14:34 albertid What can I do to use the same source git repository for two target directories with git.latest? Right now Salt tells me about "Conflicting ID".
14:35 manfred stevednd: might want the map filter , or map + join
14:35 stevednd so from [['abc'],['123']]|join(', ') I end up with ['abc'], ['123']
14:36 manfred ahh
14:36 manfred hrm...
14:36 stevednd I thought about using map('first')|join in this instance, but the version of jinja we're using doesn't support it
14:37 manfred lame
14:37 quickdry21 joined #salt
14:37 stevednd I was hoping to stick with jinja, but the best I can come up with is install mako, which allows python in it
14:37 alunduil joined #salt
14:37 manfred stevednd: you could grab a variable, and then append to it through two for loops, then join that
14:38 stevednd can you add to a list in jinja?
14:38 manfred {% do navigation.append('a string') %}
14:39 manfred http://jinja.pocoo.org/docs/templates/#expression-statement
14:40 manfred {% for item in list %}\n{% do newlist.append(line) %}\n{% endfor %}
14:40 manfred or nest for loops
14:40 stevednd yeah, I guess that will work, seems so much more roundabout
14:41 CaptTofu joined #salt
14:41 rcsheets_ joined #salt
14:41 manfred if you could do list comprehension in jinja, that would be the ideal way i guess?
14:41 manfred ¯\(°_o)/¯
14:43 mateoconfeugo joined #salt
14:43 junster Hi, I have created a ext_pillar module that pulls data from a database.
14:43 junster Is there a built-in way to share this data between all the salt-master threads?
14:44 junster Or do I need to create my own caching setup.
14:47 rcsheets_ joined #salt
14:47 munhitsu_ joined #salt
14:47 mihait joined #salt
14:48 stevednd is it preferable to manage python modules through pip, or to use system packages?
14:48 ghartz with system packages you can have old version
14:48 fxhp stevednd - it depends.  Most of my Python deployments use virtualenvs
14:48 workingcats stevednd, system packages
14:48 fxhp stevednd: so I use pip
14:49 workingcats unless you have good reason to abandon distro support and updates
14:49 stevednd do distros do anything special to the modules?
14:49 workingcats the same things they do with everything
14:49 workingcats check that they work with the other versions of things
14:50 workingcats provide security updates independent of upstream if necessary etc
14:50 fxhp workingcats: but the upstream is typically pypi, which is what pip uses.
14:50 stevednd I don't develop anything in python, I only use it for salt. Right now we're running ubuntu 10.04 on the majority of our systems, so the packages are a bit dated
14:50 Stephen_ joined #salt
14:50 workingcats fxhp, no, upstream is a person or group of people
14:50 workingcats pypi is a website..
14:51 fxhp stevednd: then use the system packages, for sure.
14:51 workingcats stevednd, if you wanna update your systems then update them, but updating only the python modules might cause you lots of headaches. it shouldn't, of course, but it might
14:51 fxhp workingcats: most people who maintain upstream python packages, use pypi to distribute it.
14:51 workingcats fxhp, yes but its still a website not an upstream
14:52 workingcats sourceforge isnt upstream either, its a place that many upstreams use
14:52 * fxhp nods
14:52 [diecast] joined #salt
14:53 zirpubolci joined #salt
14:53 tessellare joined #salt
14:55 Stephen_ Hi.  I'm new to SaltStack and I'm trying to understand states.  Is there a way to ensure that only the packages I want are installed?  How can ensure that my minions are not running old or unwanted packages?
14:56 stevednd so it's best for me to just suck it up, and deal with the version of jinja that comes with 10.04?
14:57 ajolo joined #salt
14:57 colinbit_ joined #salt
14:58 stephas joined #salt
14:58 DenkBret1l stephas: it is best to plan the upgrade soonest :-)
14:59 pydanny joined #salt
15:01 bitmand Stephen_: Have a look at: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
15:01 siciliansun1 joined #salt
15:01 bitmand Stephen_: there is pkg.removed to make sure a pkg is not installed - and options to specify versions
15:02 gothix_ joined #salt
15:03 Stephen_ bitmand: Thank you.  I'll read that.  Do you know if you need to make a blacklist of all packages I want to ensure aren't installed?  Or is it possible to just whitelist the ones I want?
15:04 xmj moin
15:04 xmj where/how does salt 'host' grains.items get the fqdn from?
15:05 Etch joined #salt
15:05 bitmand Stephen_: it's not really black/whitelist - you have to tell the state if a package should be installed or not installed specifically.
15:05 manfred xmj: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1064
15:05 bitmand ( not entirely sure if my answer is what you are looking for though )
15:05 manfred xmj: in salt/grains/core.py
15:06 Stephen_ bitmand:  Okay.  Thank you very much for the help.
15:07 xmj salt/utils/network.py has it, thanks manfred
15:07 Etch joined #salt
15:07 bitmand Stephen_: no problem :)
15:07 danielbachhuber joined #salt
15:08 Etch joined #salt
15:10 ndrei joined #salt
15:11 junster When writing ext_pillar modules, is there a standard way to share data between the threads, or should I just use /dev/shm?
15:13 conan_the_destro joined #salt
15:15 siciliansun1 left #salt
15:15 Rog_ joined #salt
15:15 obimod joined #salt
15:16 mgw joined #salt
15:16 jaycedars joined #salt
15:18 novastar2 joined #salt
15:18 ajw0100 joined #salt
15:19 Rog_ How do I change the default installation directory when installing salt agent on Windows servers to something other than c:\salt?
15:19 timoguin Rog_: i think it is baked into the installer
15:21 Ryan_Lane joined #salt
15:22 frasergraham joined #salt
15:22 svs joined #salt
15:23 colinbits joined #salt
15:26 Rog_ How do I find out what the option is?
15:26 ipalreadytaken joined #salt
15:27 jimklo joined #salt
15:28 Rog_ Or are you saying that it can't be changed during install?   If so, can it be changed after installation?
15:30 timoguin Rog_: i don't think you can change it using the EXE installer. you'd have to build your own from source
15:31 timoguin i could be wrong. ping UtahDave when he gets in here or ask the mailing list
15:32 jnials joined #salt
15:33 cruatta joined #salt
15:35 it_dude joined #salt
15:35 abe_music joined #salt
15:36 Psi-Jack_ joined #salt
15:37 mpanetta_ joined #salt
15:37 Ryan_Lane joined #salt
15:40 war2 joined #salt
15:40 schimmy joined #salt
15:41 jimklo joined #salt
15:41 tligda joined #salt
15:41 jimklo joined #salt
15:43 wendall911 joined #salt
15:45 BrendanGilmore joined #salt
15:46 ajw0100 joined #salt
15:47 AdamSewell joined #salt
15:48 mateoconfeugo joined #salt
15:49 meteorfox joined #salt
15:52 pdayton joined #salt
15:55 MTecknology I wanted to share this with you guys. https://gist.github.com/MTecknology/560509f5253cf50e28cb
15:56 KyleG joined #salt
15:56 KyleG joined #salt
15:58 tyler-baker joined #salt
15:58 gildegoma joined #salt
15:59 colinbits joined #salt
15:59 dannyboy joined #salt
16:01 dannyboy hey guys, I was in earlier and I'm attempting to use regex to match a range of minions. I've checked my regex with multiple regex matchers and it *should* work... But alas it does not.
16:01 dannyboy salt '\bproxy(23[2-9]|2[4-9][0-9]|3[0-9]{2}|4[0-6][0-9]|47[0-2])\-*\b' test.ping
16:01 MTecknology I'm using that two pick two of all available syndic servers to pin a minion to so it's pseudo load balanced and will be writing a formula to edit the config files and restart the minion process if it changes.
16:02 dannyboy So it should match proxy232-abc - proxy472-abc
16:03 dannyboy the problem lies somewhere with the range but I can't seem to debug it
16:03 kh4z joined #salt
16:05 MTecknology dannyboy: default matching is only globbing
16:05 ramteid joined #salt
16:05 MTecknology dannyboy: salt --pcre 'regex'
16:05 viq dannyboy: maybe try with a simpler one and see if that works, and go from there?
16:06 dannyboy yup worked first time!
16:07 dannyboy thanks guys!
16:07 KennethWilke joined #salt
16:09 quanta_ joined #salt
16:11 redondos joined #salt
16:11 redondos joined #salt
16:12 quanta_ In a reactor.sls file, assuming that I have something like `{%- set project_name = data['data']['name'] %}`, how can I get the pillar data which has key is the value of project_name variable?
16:13 quanta_ I have tried `tgt: {{ pillar[project_name] }}` but looks like it didn't work
16:13 quanta_ SaltRenderError: Undefined jinja variable; line 378 in template
16:14 abe_music anyone encounter this while using salt-cloud? Failed to spawn the VT. Error: out of pty devices
16:14 KennethWilke quanta_: it'll just be project_name
16:14 abe_music https://gist.github.com/abemusic/315e85cfedc7342390aa
16:15 KennethWilke the set jinja keyword adds that variable to the jinja context, rather than within the pillar stuff
16:15 KennethWilke tgt: {{ project_name }}
16:15 ipmb joined #salt
16:16 quanta_ KennethWilke: no
16:17 Linuturk joined #salt
16:17 KennethWilke quanta_: no what? lol
16:17 quanta_ KennethWilke: for e.g: my pillar file looks like:
16:17 quanta_ python:
16:17 kballou joined #salt
16:17 quanta_ deploy_master:
16:17 schmutz joined #salt
16:17 quanta_ python:
16:17 quanta_ deploy_master:
16:17 quanta_ minionid: MacBook-Pro.local
16:18 rupsky___ joined #salt
16:18 quanta_ the value of project_name variable is "python"
16:19 quanta_ then how can I get "MacBook-Pro.local"
16:19 KennethWilke then that would be in `tgt: {{ pillar[project_name]['deploy_master']['minionid'] }}`
16:20 KennethWilke or  `tgt: {{ pillar[project_name].deploy_master.minionid }}`
16:20 quanta_ KennethWilke: tried that but as I said it didn't work:     tmp_data.get('data', 'Unknown render error in jinja renderer')
16:20 quanta_ SaltRenderError: Undefined jinja variable; line 378 in template
16:20 joehillen joined #salt
16:23 smcquay joined #salt
16:23 KennethWilke quanta_: what is tmp_data?
16:23 colinbits joined #salt
16:23 KennethWilke quanta_: can you gist or pastebin some of the files you're having this problem with?
16:23 ChrisC1 joined #salt
16:24 forrest joined #salt
16:25 Whissi joined #salt
16:25 sealibor_ joined #salt
16:25 mgw joined #salt
16:27 BigBear Hi there, a newbie question. How do I find out why one of my windows minions dos not respond to "test.ping"? (newly added - and rebooted - just to make sure) the master is being resolved by dns and network level ping works? is there a loglevel (or a logfile) I can raise or look at  on either the master or minion to get more info? the key has shown up and I accpeted it. but no response to ping.
16:28 cruatta joined #salt
16:28 ChrisC1 Turn on debugging: http://docs.saltstack.com/en/latest/topics/troubleshooting/
16:28 ChrisC1 Also firewall?
16:28 quanta_ KennethWilke: please wait a few minutes
16:29 schimmy joined #salt
16:29 KennethWilke quanta_: alrighty
16:29 Amanda joined #salt
16:30 busted joined #salt
16:30 Ryan_Lane joined #salt
16:30 yusuket joined #salt
16:31 bemehow joined #salt
16:33 schimmy1 joined #salt
16:34 pfallenop joined #salt
16:35 ChrisC1 How would I go about only having a file be managed if the containing directory exists?
16:36 ChrisC1 Something like file.managed unless !stat /directory
16:36 cyprusre joined #salt
16:37 jcockhren abe_music: yo!
16:37 jcockhren abe_music: how's it going?
16:37 abe_music hey jcockhren, how goes it?
16:37 war2 joined #salt
16:37 nkuttler sigh. is there a good workaround for {% include %} that have include: IDs? i need to avoid duplicates..
16:37 abe_music jcockhren: pretty good except for our PTY woes :)
16:37 jnials joined #salt
16:37 abe_music how about you?
16:38 jcockhren https://github.com/saltstack/salt/issues/12641 is a blocker for https://github.com/saltstack/salt/pull/12620
16:38 jcockhren abe_music: ^
16:38 tligda I'm doing a 'salt-call publish.publish <other_minion> cmd.run_all' and it's taking 48 seconds to finish. If I run the command locally on the other minion, it's done in 25 ms! Why is salt-call taking so long? Is there anything I can do to speed it up?
16:39 jcockhren I gotta roll back to 0.17.5. Lost all my salt reporting when upgrading
16:39 tligda The same cmd.run_all from the master takes 451 ms.
16:40 tligda Where is the extra 47 seconds going for salt-call? Can I do something about it?
16:40 abe_music jcockhren: yuck....at least it's flagged as high severity :)
16:40 KennethWilke ChrisC1: hmmm i can think of one way for that, but not sure if it's optimal
16:41 ChrisC1 KennethWilke it seems like something simple that should be possible
16:41 abe_music jcockhren: cool stuff with the elasticsearch returner.....probably a silly question, but what's your use-case for it?
16:41 abe_music just archiving in general, running reports, etc?
16:41 tligda I'm running 2014.1.3 everywhere.
16:41 KennethWilke ChrisC1, maybe you could do a cmd.run with an 'onlyif' that does the test, and have the manage thing as a prereq of the cmd.run
16:41 abe_music jcockhren: here's our problem we're seeing: https://github.com/saltstack/salt/issues/10404
16:42 ChrisC1 KennethWilke that's a great idea, let me try it out
16:42 KennethWilke ChrisC1, not 100% sure that'll work, but it might!
16:45 vbabiy joined #salt
16:46 tligda My problem is not limited to a single minion. It is happening on all 30 minions the same.
16:46 tligda It's also not limited to one command. I've tried a variety of commands and they are the same.
16:48 jcockhren abe_music: I guess "reporting" is a technical term for most, I forget. My use case is more like monitoring performance of salt
16:48 tligda I guess a GitHub issue may be the best way to go.
16:48 abe_music jcockhren: like seeing if there are latency issues, tracking performance of commands over time, etc?
16:49 jcockhren performance for me, means frequency, measuring failed jobs (and why)
16:49 jcockhren yep
16:49 abe_music gotcha, yeah that makes a lot of sense....
16:49 jcockhren Combined with kibana it's the business
16:49 abe_music does elasticsearch give you some utilities to help with that sort of thing?
16:50 abe_music jcockhren: oh, kibana...nice. i haven't seen this yet
16:50 abe_music very slick looking
16:50 jcockhren customizable dashboard.
16:51 timoguin kibana is a beauty
16:51 abe_music timoguin: yeah i'm seeing that....*makes not to try this out*
16:51 quanta_ KennethWilke: sorry for late reply, here's the deploy.sls: https://gist.github.com/59e98afd748e60250b46
16:51 timoguin abe_music: check out the logstash standalone installer
16:51 timoguin it has logstash, elasticsearch, and kibana embedded into a single jar
16:52 timoguin trying it out is really quick, and the tutorials step you through it nicely
16:52 quanta_ KennethWilke: and the pillar: https://gist.github.com/d298c244e10b0832114f
16:52 abe_music timoguin: that's awesome, thanks for pointing that out
16:52 abe_music was probably about to start installing things manually ahah
16:52 timoguin oh, and elasticsearch hired all the devs, and they now support them commercially
16:52 viq jcockhren: so the elasticsearch returner is for use with kibana? I am trying to use the logstash zeromq logger for that
16:53 timoguin viq: you mean the logstash logger that's distributed with salt?
16:53 ChrisC1 KennethWilke: you have experience with onlyif?
16:53 viq timoguin: yeah
16:53 ChrisC1 Does it need to explicitly return "True"?
16:53 timoguin viq: i think the logger isn't as robust
16:53 KennethWilke ChrisC1, nah that'll be based on the exit code of the thingy you run
16:53 viq timoguin: how so?
16:53 timoguin returners have some limitations too. i'd like to get an elasticsearch/redis backend for salt-eventsd
16:54 KennethWilke so if the program returns the normal 0 exit code it's True
16:54 KennethWilke non-zero is false
16:54 ChrisC1 hmmm
16:54 ChrisC1 so
16:54 ChrisC1 stat 'directory' probably wouldn't work as an argument
16:54 KennethWilke it'd return true if the directory exists
16:54 ChrisC1 cool
16:54 ChrisC1 alright
16:54 ChrisC1 i'll return back with results!
16:54 viq timoguin: also I'm pondering how to log from salt from machines that are outside my network. I'd rather not expose direct access to ES port
16:54 quanta_ KennethWilke: and the debug log: https://gist.github.com/quantonganh/d5326d2e5eeecc977cdf
16:54 KennethWilke or if you need the opposite you can use unless
16:55 timoguin viq: i'm not sure if the logger includes all the events that come across the event bus
16:55 viq hmm
16:55 timoguin the preferred way to distribute a logstash setup is with a queueing system like redis
16:55 KennethWilke quanta_: hmm, that all looks okay to me, I don't think i'm familiar enough with reactor to know what to suggest there
16:55 sarlalian left #salt
16:55 viq Well, to be honest I'm only beginning my adventure with logs, I'm not even sure what I'm not seeing yet ;)
16:56 AlcariTheMad joined #salt
16:56 viq timoguin: yeah, I right now have encrypted syslog -> LS -> redis -> LS -> ES
16:56 jcockhren viq: actually, I started using the logger. the issue for me was they of information sent
16:56 quanta_ KennethWilke: actually, it's not related to reactor much at all
16:56 viq jcockhren: oh?
16:56 jcockhren salt logs aren't the same as results from a salt call
16:57 jcockhren I didn't need everything in logs/salt
16:57 viq mhmm
16:58 jcockhren To get everything from salt logs, I just tail the salt logs
16:58 jcockhren (to logstash). done
16:58 quanta_ KennethWilke: it's something like: how can I pass a variable as a pillar key in a sls file?
16:58 anuvrat joined #salt
17:00 mpoole hey, so i'm trying to generate dynamically N redis configs
17:00 stephas joined #salt
17:01 war2 joined #salt
17:01 mpoole so say I want to have a pillar that says redis servers: 4
17:01 BrendanGilmore joined #salt
17:01 mpoole and generate 3 redis configs from the same file on different ports, with different pids (specified in redis.conf)
17:02 mpoole whats the best way to do that? or should I just write 3 redis config files and do it all statically
17:03 UtahDave joined #salt
17:06 viq kiorky: do you know if there's any chance of your tls: support subjectAltName ending up in 2014.1 tree? ;)
17:07 stephas joined #salt
17:08 viq jcockhren / timoguin : are you running logstash? Did you configure it via salt?
17:09 timoguin viq: I've only ran it in testing environments.
17:09 forrest mpoole, why not take a look at: http://jinja.pocoo.org/docs/templates/#range
17:09 viq Ah
17:09 timoguin I have a state written for it, but it's not very robust
17:09 viq I'm trying to figure out a good way to run multiple (well, two) instances of it on one box
17:09 viq timoguin: oh?
17:10 ChrisC1 KennethWilke: waaayyyyy easier than i thought
17:11 ChrisC1 no need for onlyif
17:11 KennethWilke ChrisC1, yay! did you find a nice way?
17:11 ChrisC1 just take a named cmd.run - stat /etc/directory
17:11 ChrisC1 and make the file.managed a requisite
17:11 ChrisC1 if it can't stat the directory it just returns
17:11 ChrisC1 Comment: One or more requisite failed
17:12 KennethWilke that works
17:12 ChrisC1 its sloppy
17:12 ChrisC1 but in lieu of no built-in parameters i'll take it
17:12 stephas joined #salt
17:17 stephas joined #salt
17:19 sfello joined #salt
17:22 [diecast] joined #salt
17:22 cyprusre joined #salt
17:24 acidrainfall joined #salt
17:26 druonysus joined #salt
17:26 druonysus joined #salt
17:27 druonysus joined #salt
17:27 druonysus joined #salt
17:28 BigBear joined #salt
17:29 wendall911 joined #salt
17:31 fragamus joined #salt
17:33 mgarfias joined #salt
17:34 nkuttler ok. four hours of refactoring later i'm beginning to be kinda happy..
17:34 wendall911 joined #salt
17:35 dangra joined #salt
17:35 it_dude joined #salt
17:35 kermit joined #salt
17:36 resmike joined #salt
17:38 cpowell joined #salt
17:39 wendall911 joined #salt
17:47 war2 joined #salt
17:52 st_iron joined #salt
17:53 war2 joined #salt
17:55 elfixit joined #salt
17:55 bhosmer joined #salt
17:59 fejjerai joined #salt
18:02 bhosmer joined #salt
18:03 quanta_ I'm wondering that: is it possible to use pillar in a reactor sls file?
18:03 BigBear joined #salt
18:04 quanta_ a very simple line like `{% set target = salt['pillar.get']('python:deploy_master:target', '/Users/quanta/tmp/python') %}` causes the error "SaltRenderError: Undefined jinja variable; line 5 in template"
18:04 quanta_ $ sudo salt MacBook-Pro.local pillar.get python:deploy_master:target
18:04 quanta_ MacBook-Pro.local:
18:04 quanta_ /Users/quanta/tmp/python
18:04 jY you have to send the pillar data over
18:05 quanta_ jY: could you please elaborate further?
18:05 jY http://docs.saltstack.com/en/latest/topics/reactor/
18:05 jY that explains it
18:05 jY - kwarg:
18:05 jY pillar:
18:07 happytux joined #salt
18:11 Theo-SLC joined #salt
18:12 quanta_ jY: looks like the example in the doc is slightly different than my case
18:12 happytux joined #salt
18:12 mgw joined #salt
18:17 anuvrat joined #salt
18:17 ahammond in jinja, I'd like to keep track of how many times I've iterated through a loop after the loop has been rendered. Is that possible?
18:19 bhosmer joined #salt
18:21 tdillio joined #salt
18:22 jaycedars joined #salt
18:23 diegows joined #salt
18:23 it_dude joined #salt
18:25 Luke_ joined #salt
18:30 travisfischer joined #salt
18:37 andredieb joined #salt
18:38 kmshultz joined #salt
18:41 nrgaway joined #salt
18:41 Theo-SLC Does anybody have grain module ec2_tags.py working with IAM roles?
18:43 krichardson ahammond: is this what you're after, http://jinja.pocoo.org/docs/templates/#list-of-control-structures?
18:44 ahammond I think I'll take a different approach. This one is sucking. :)
18:47 cheus joined #salt
18:50 krichardson ahammond: do you have a gist with the suckiness you're encountering?
18:52 ahammond krichardson already moved on. brief version is "how do I know how many times a loop executed outside the context of the loop". I think the easiest solution would be to sneak a counter inside an array and increment it using do, but... fugly and I have a better approach that doesn't depend on that.
18:54 jcockhren viq: sorry. stepped away for lunch,
18:54 fivethreeo joined #salt
18:55 jcockhren viq: but yes. I have logstash configured via salt
18:55 jcockhren nothing fancy I don;t think
18:55 krichardson ahammond: i figured you were running against context related issues. i've resorted to the nasty array length solution myself. would love to see your better approach.
18:55 ninkotech__ joined #salt
18:56 jcockhren just leverages a deb in s3 and installs it with the config
18:56 fivethreeo If i start a job from the master with a long timeout then bring up a vm with a minion, will that minion receive the job?
18:57 mattmtl LocalClient is not thread safe?
18:58 rupsky___ joined #salt
18:58 jcockhren viq: for log fowarding I've tried fluent and beaver
18:59 jcockhren moved to logstash-forwarder (formally lumberjack) a couple months ago
18:59 chrisjones joined #salt
19:00 ahammond krichardson, my solution was to change design to not require that information. So... kinda lame, but... effective.
19:01 ipmb joined #salt
19:03 LBJ_6 joined #salt
19:03 LBJ_6 how to list grains of specific minion?
19:04 TheRealBill joined #salt
19:05 cheus LBJ_6: salt '[name_of_minion]' grains.items
19:05 LBJ_6 if I only want specific grains from a specific minion?
19:06 Joseph_ joined #salt
19:06 Joseph_ is there a way to use glob matching in a jinja if condition?
19:06 cheus Yes. Read up on "targeting" in the docs. It's all about the target.
19:07 timoguin actually you can't use patterns in jinja conditionals. there is a match module that can be used though
19:07 cheus Joseph_, There's a "match" module in salt. I don't know the exact syntax but if you're trying to target... as timoguin said
19:08 bhosmer joined #salt
19:08 Joseph_ i am actually trying to set a different value in a particular component in a SLS
19:08 Joseph_ it wasnt' clear to me if a match was acceptable in that context
19:10 Joseph_ @timoguin i don't see a match state module though
19:10 UtahDave joined #salt
19:10 Joseph_ i basically want to say if the minion id matches this glob then set this grain value on the minion
19:11 Joseph_ i thought i'd have to do that with jinja template
19:11 timoguin Joseph_: there isn't a state. you can call the module directly within a jinja conditional
19:11 LBJ_6 salt ‘*’ grains.items   for list all the grains on the all the minions
19:12 oz_akan_ joined #salt
19:12 LBJ_6 i just want to know the grain saltversion on the minion ‘web01-p90’ and
19:12 LBJ_6 what the command should look like?
19:13 Joseph_ salt '*' grains.get saltversion
19:14 quanta_ How can I get the pillar data from Python code?
19:16 Joseph_ @quanta_ do you mean you want look at the python code that generates pillar data or you want to obtain all the pillar data from a node?
19:16 timoguin quanta_: the dunder dicts: http://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
19:19 quanta_ Joseph_: I mean the second
19:20 Joseph_ salt  <minionid> pillar.items
19:20 KyleG is there a way to disable the ability to use highstate? I firmly believe highstate is evil and I want to prevent accidents.
19:21 fivethreeo If i start a job from the master with a long timeout then bring up a vm with a minion, will that minion receive the job?
19:21 kermit joined #salt
19:21 Joseph_ kyleG:  http://docs.saltstack.com/en/latest/ref/configuration/minion.html#disable-modules
19:21 ghartz joined #salt
19:22 quanta_ timoguin: looks like it is not available in Python code
19:23 quanta_ Joseph_: so, I have to call it with something like `cmd.run`? Is there a better way?
19:23 KyleG Joseph_: Do you have to disable state entirely though? I still use state.sls
19:23 KyleG Or can you put state.highstate in the disable_modules list
19:23 KyleG I'm going to try it
19:23 timoguin quanta_: what are you trying to do in Python? a custom module or what?
19:24 quanta_ timoguin: a web service that fires an event to master
19:26 Joseph_ quanta_: are you trying to get the data via the command line or in a SLS?
19:26 quanta_ timoguin: GitLab —> webhook —> Salt events —> reactor —> state.single —> git pull/checkout
19:26 timoguin quanta_: http://docs.saltstack.com/en/latest/ref/clients/index.html
19:26 quanta_ Joseph_: in .py file
19:26 timoguin you should be able to import what you need
19:27 Joseph_ ohhh
19:27 Joseph_ gotcha
19:35 it_dude joined #salt
19:35 pydanny joined #salt
19:36 xuru joined #salt
19:38 xuru Hi guys, I'm trying to bring up a percona cluster (http://alturl.com/ny7m7).  The first node in the cluster needs to run with "/etc/init.d/mysql bootstrap-pxc" only the first time.  The others in the cluster need to run only after the first does.
19:39 eliasp is there a way to enforce a saltenv 'globally'? I want to run this:
19:39 eliasp salt MN1221-C0001 cmd.run 'c:\salt\salt-call.exe -c c:\salt\conf -l debug pkg.upgrade_available microsoft.office saltenv="win_repo-version-bug"'
19:39 eliasp but the result is "The following keyword arguments are not valid: saltenv=win_repo-version-bug" … so is there a way to enforce the saltenv for the whole 'salt-call' execution?
19:39 xuru Any ideas on how I might coordinate that?
19:40 timoguin xuru: you want the orchestrate runner: http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#orchestrate-runner
19:41 xuru timoguin: Yeah, I looked at that.  Do we have any examples somewhere?  It's hard to find out what you can put in that.
19:41 timoguin i don't know of any good examples offhand
19:42 UtahDave xuru: also, you could set a flag to indicate when the bootstrap-pxc script has been run. The flag could be a grain or even a file
19:42 rupsky____ joined #salt
19:43 xuru UtahDave: That's what I was thinking.  Some kind of semaphore across nodes.  Would I have to use that with salt mine then?
19:43 UtahDave xuru: Yeah, the mine might work.
19:44 xuru K, I'm already using that to gather the IPs for the different nodes in the cluster
19:46 xuru unrelated question…  I'm using salt-cloud (GCE) to get my instances created, but it seems there is a gap where you have to do some manual things.  i.e. ssh to the box and checkout the states/pillar/etc and modify the master.
19:46 xuru Is there a way to tell salt-cloud the master configuration?
19:46 xuru and perhaps use gitfs
19:47 rupsky____ joined #salt
19:47 pydanny joined #salt
19:49 schmutz joined #salt
19:49 UtahDave xuru: so you're spinning up a new Salt Master on GCE?
19:49 xuru yep
19:50 xuru salt server to maintain the db cluster
19:51 xuru I use the "make_master: True" option, but it would be nice to have some way to specify the master config file to put on it.
19:51 JordanRinke Morning
19:52 UtahDave Long night, JordanRinke?  :)
19:56 cheus grains.filter_by, does it take a 'default' parameter from the dictionary and as an kwarg? The docs would seem to indicate as such.
19:57 xuru UtahDave: actually you can just put configuration information in the cloud profile can't you?  I'll have to try adding the gitfs stuff in there and see what happens.
19:57 UtahDave xuru: you could have your new master be a minion to your current master.  Then use that minion to push everything
19:57 UtahDave I think so
19:57 it_dude joined #salt
19:58 [diecast] joined #salt
19:58 xuru I'm already doing it for minions to assign the master
19:58 * xuru face palms
19:58 xuru it would be kind of cool to bring everything up with one command
19:59 jcockhren xuru: soon
20:00 xuru oh?
20:00 xuru kind of looks like you guys are moving that way with the orchestration runners and overstate stuff
20:01 jcockhren it'll be a group effort, but I think we (as in many of the folks here) are working to make it a reality sooner rather than later
20:01 * timoguin nods
20:01 timoguin i want to be able to bootstrap my entire infra with a single click
20:02 xuru awesome
20:02 jcockhren my goal is to have my infra self correcting.
20:02 timoguin same
20:03 xuru yeah, that is something I was thinking about myself
20:03 jcockhren defining what that really means is the trick
20:03 jimklo joined #salt
20:03 timoguin yuhp, so much is possible.
20:03 xuru in my case, the percona db cluster…  If one node goes down, spin up a new one, and just delete the old instance
20:04 jcockhren good. look at the dev around the reactors
20:04 xuru will do
20:04 jcockhren though, I've been thinking how far we can push the formula system to work around some of the bugs and/or shortcomings we encounter
20:05 jrdx joined #salt
20:05 jeffasinger joined #salt
20:05 mgarfias i haven't looked at the reactor system yet.  would it be possible to note a DC outage and spin up a new one?
20:05 xuru yeah, compared to Chefs cookbooks, they seem more primitive in a lot of ways.
20:06 mgarfias and more hooks into the non-host cloud stuff (vpc, dns, etc) would be awesome
20:06 jcockhren that way we give the salt team and community time to fix/add things and we still have our things work
20:06 mgarfias sux having to maintain two sets of stuff - one for hosts, one for infra
20:07 jcockhren xuru: in some ways yes. but in others, formulas are the bomb. especially once this is done: https://github.com/saltstack/salt/issues/12511
20:09 steve___ joined #salt
20:09 xuru interesting
20:09 jcockhren mgarfias: not alone. salt can't do that out the box. But the entry points of salt are powerful enough to make that happen
20:09 rocket joined #salt
20:11 steve___ hi.  im new to salt and im having some trouble with the sls file.  im getting stuck on some syntax for the state declaration
20:11 Joseph_ joined #salt
20:11 jcockhren !help state files
20:11 wm-bot4 I'm a documentation bot. To control me, please use #salt-bot to avoid channel spam. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
20:11 Joseph_ I want to use the grain state module to delete a grain that's been set /etc/salt/grains
20:11 Joseph_ http://salt.readthedocs.org/en/v2014.1.1/ref/states/all/salt.states.grains.html?highlight=grains#module-salt.states.grains
20:11 Joseph_ however i can't seem to do that
20:11 mgarfias so if you were to build out the cloud hosts, would you use vagrant, or salt-cloud?
20:11 Joseph_ any idea why?
20:12 mgarfias i'm using vagrant for dev
20:12 mgarfias but need to get to work on my test env
20:12 eliasp steve___: if you're worried about the correct syntax: http://yamllint.com/ is helpful
20:12 xuru mgarfias: salt-cloud is pretty awesome
20:12 jcockhren mgarfias: I (and timoguin) use https://github.com/simonmcc/kitchen-salt for testing
20:13 jY steve___: pastebin it
20:13 jcockhren mgarfias: I use salt-cloud
20:13 mgarfias i should indicate that by 'test' i really mean a qa/staging env for my devs
20:13 mgarfias also will do a prod env once thats done so that everything from dev on up is the same
20:13 steve___ jY: okay.  ill do that. thx
20:14 jcockhren mgarfias: ah. ok. I use vagrant for local things. the salt provisioner is included in vagrant
20:14 mgarfias yep
20:14 mgarfias its had me bashing my head against the wall all week
20:14 mgarfias but works for dev
20:15 mgarfias except for my mysql state not completely installing the mysql pkg and not starting it up
20:15 rocket is anyone else running salt with freebsd 9?
20:15 jcockhren mgarfias: handwritten or from the formulas?
20:16 mgarfias hacked up
20:16 mgarfias started with the formulas then changed to fit what we need
20:16 mgarfias i think at this point its mostly handwritten though
20:16 jcockhren I don't use any formulas yet.
20:16 jcockhren (other than the silly one I wrote)
20:17 stephas joined #salt
20:17 steve___ jY: i am trying to run two commands, but i'm not sure what im doing wrong.  here is the paste: http://pastebin.com/qH5y1LK2
20:20 smcquay joined #salt
20:20 timoguin steve___: i dont' think you can declare the same function name twice like that
20:20 jY steve___: better doing this
20:20 jY http://stackoverflow.com/questions/19640829/how-can-i-execute-multiple-commands-using-salttack
20:21 timoguin are you getting an error?
20:22 XenophonF joined #salt
20:22 bemehow_ joined #salt
20:22 steve___ jY: thank you. so you can't list multiple of the same commands?
20:23 nineteeneightd joined #salt
20:24 Joseph_ what's the best way to handle assignment and management of minion roles?
20:24 mgw joined #salt
20:24 lilmatt joined #salt
20:24 Joseph_ i can always just set them via the command line but i'd rather drive this via a configuration file
20:25 timoguin Joseph_: a pillar or grain value tends to be the most popular.
20:25 LBJ_6 joined #salt
20:26 timoguin you can assign them via pillar based on targetting rules
20:26 Joseph_ i have no problem setting the role in a pillar or grain...i prefer grain actually
20:26 Joseph_ my question is about role assignment and maintenance
20:26 stevednd does anyone have any experience with the pip.installed state?
20:26 Joseph_ i'd much rather define the roles in a configuration file and then have salt set the roles in each minion for me
20:26 UtahDave left #salt
20:27 Joseph_ but in order to do that seems to require a large number of SLS files or complicated jinja template logic
20:27 stevednd using pip.install in module form works just fine, as does installing via pip manually on my minions, but I can't use pip.installed in a state, because I believe it can't import pip.req
20:27 xuru joined #salt
20:28 redondos joined #salt
20:28 redondos joined #salt
20:28 nineteeneightd joined #salt
20:29 jimklo joined #salt
20:29 timoguin Joseph_: i guess it depends on how many roles you have. maybe pulling pillar from an external source would be better for your use case.
20:32 Joseph_ I am not sure how much that helps. I in essence wnat to be able to say...here's a file, this file has N roles. Each role applies to the following nodes AND the node shall not have any roles except what's enumerated in this configuration file.
20:33 Joseph_ i know there are a couple of ways to do it but it doesnt seem to scale well past one or two roles
20:33 Joseph_ io would basically have SLS file for each role and then use matching in the top.sls
20:34 mgw Joseph_: I use reclass for this, although I'm trying to find better ways of doing it
20:35 fragamus joined #salt
20:36 Joseph_ ah...yea that seems like you using a bazooka for a job that only requires a gun
20:37 Joseph_ seems like overkill
20:39 wendall911 joined #salt
20:39 MindDrive joined #salt
20:40 UtahDave joined #salt
20:40 Joseph_ <mgw>: I am not finding a lot of documentation on reclass....got any good pointers on basic usage?
20:41 viq jcockhren: logstash-forwarder doesn't solve my problems, as it doesn't quite compile on BSDs. Also I want FQDN in my logs, which most default syslog engines can't do.
20:42 XenophonF left #salt
20:42 madduck Joseph_: if you find the time, maybe you can file an issue against reclass with some ideas of what you would like to see on reclass.pantsfullofunix.net…
20:42 viq jcockhren: do you by any chance run multiple of logstash instances on single host?
20:42 Joseph_ <madduck>: sure i am happy to do that....for all i know it does it already and the documentation is just really poor.
20:43 Joseph_ I think its really important that salts role assignment and management be extremely easy, intuituive and just works out of the box
20:43 Joseph_ i am not really seeing that right now
20:45 jcockhren viq: try the binary of logstash-forwarder. no runtime dependencies (outside of libc)
20:45 kula i think the big issue with role assignment and management is that everyone has slightly different ideas of how those should be done.
20:46 viq jcockhren: yes, but it still needs to be compiled for a specific plaform, doesn't it?
20:46 it_dude joined #salt
20:47 jcockhren ah. I see your comment on the issue for the forwarder
20:47 jcockhren :(
20:47 kermit joined #salt
20:48 jcockhren I haven't done any work on the BSDs to verify whether or not those tools work.
20:49 jcockhren outside of that, I run a single logstash instance on a decent sized instance
20:49 viq jcockhren: also, again, I would like FQDN in my logs, and that works with stock syslog only on CentOS; on debian, FreeBSD, OpenBSD to get that I need to replace syslog daemon anyway, so I may as well chose one that can ship over TLS
20:49 redondos joined #salt
20:49 redondos joined #salt
20:50 viq jcockhren: do you have separate shipper and indexer processes with a buffer in between them?
20:51 bemehow joined #salt
20:52 madduck Joseph_: then maybe reclass isn't the tool you are looking for?
20:53 madduck I mean, I am sorry that to is unclear to you. It is so obvious to me that I find it hard to document it more. But I am happy to learn! ;)
20:53 jcockhren buffer? no. shipper and indexer are on different hosts all together. for my cases, a host dedicated to logstash handles the load from all the things
20:53 jcockhren viq: ^
20:54 timoguin jcockhren: do you know what happens if the indexer taps out its resources? do new log lines continue getting shipped, or does it queue them host-side?
20:54 timoguin basically wondering if things can go to shit real fast without a queueing system
20:54 viq jcockhren: hm, ok. I'm running on a single machine two logstash processes: "shipper" that just receives logs and pushes them to redis, and "indexer" that grabs them from redis, processes and pushes to ES
20:55 jcockhren timoguin: queues them locally
20:55 viq timoguin: usually with that you do have some sort of queue. Redis, RabbitMQ are the most popular I guess
20:55 timoguin very nice
20:55 jcockhren timoguin: it depends a lot on your forwarder
20:56 faldridg_ joined #salt
20:56 jcockhren I had trouble with tons of child processes spawning and logs not getting to logstash when I was using beaver
20:57 timoguin but logstash-forwarder handles them more intelligently?
20:58 zirpubolci joined #salt
20:58 bhosmer joined #salt
20:58 jcockhren I haven't had as many issues with dropped connections to logstash, wildly spawning processes, etc
20:59 viq I'm currently using syslog-ng and rsyslog to ship TLS syslog to logstash
20:59 jcockhren I mainly wanted hosts to be responsible to getting their logs to LS
20:59 jcockhren for*
21:00 viq I guess logstash-forwarder makes sense for that - AFAIK it caches messages if it can't communicate with the receiver
21:01 viq But, as mentioned, I'd like to have FQDN in my logs, so I may as well use the syslog to ship them
21:03 googolhash joined #salt
21:04 jcockhren what I did for beaver was that I had the ini file jinja templated
21:04 jcockhren when deployed somewhere, have it set the hostname sent to LS
21:05 eriko joined #salt
21:05 viq oh, you can do that?
21:06 jcockhren any text file can be templated and used with the file.managed state in salt
21:06 babilen Oh, pity .. I had hoped that .4 would contain the fix for #12286 -- who do I have to bribe?
21:06 viq no, i mean set the host name that will be passed to LS
21:07 eliasp babilen: just throw the fixed file into _states and it will be picked up as extmod
21:07 jcsp joined #salt
21:08 babilen eliasp: Oh, *very* nice .. that goes in my salt notes file.
21:09 dopp joined #salt
21:09 eliasp babilen: see http://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
21:09 babilen ta!
21:10 jcockhren viq: you mean the hostname of the host (who's logs you want)?
21:10 viq jcockhren: yeah
21:10 jcockhren yeah. for me. the host knows it's FQDN
21:10 faldridge joined #salt
21:11 viq and you'll see it in kibana even though the logs themselves only have short name?
21:11 layer3switch joined #salt
21:12 fivethreeo During orchestration I bring up two vms how can I make the next step not be started before the vms have connected to the master?
21:12 layer3switch1 joined #salt
21:12 jcockhren https://salt.readthedocs.org/en/latest/ref/configuration/minion.html?highlight=master%20config#append-domain
21:12 jcockhren viq: ^
21:13 mgarfias i so coudl have used that two days ago
21:13 viq jcockhren: that doesn't help if all that ends up in say /var/log/messages is host1 instead of host1.test.example.com
21:14 viq or does it?
21:15 jcockhren yeah. given you're using rsyslog, it won't help you.
21:15 jcockhren with beaver, it's tailing the logs. so it can insert what you want
21:15 jcockhren fluent does the same
21:15 viq Well, actually rsyslog on centos can be convinced to log FQDN. But not on debian, and BSD syslog doesn't either
21:15 jcockhren I didn't know that ^
21:16 mgw joined #salt
21:16 viq jcockhren: oh, i spent like a week or two bashing my head against that and ranting to anyone who'd listen :P
21:17 viq jcockhren: also, fun fact: on centos (epel) syslog-ng is compiled without support for TLS, and on FreeBSD the default packages for rsyslog are compiled without TLS support
21:17 viq On OpenBSD both have that and should work, though rsyslog is in an ancient version
21:18 viq jcockhren: also, when I tried (couple weeks ago), for debian there were three available rsyslog repositories: 7-devel, 8-devel and 8-stable. And 8-stable didn't install because of missing packages.
21:18 viq Dependencies I mean
21:20 bhosmer joined #salt
21:20 jcockhren heh
21:21 viq And that's the abbreviated version of my adventures with syslog ;)
21:24 toastedpenguin1 joined #salt
21:25 jrdx Anyone else having issues with the latest EPEL Salt not adding members to groups, on CentOS06 running 2014.1.3 http://pastebin.com/gKvHHxVS
21:25 googolhash joined #salt
21:27 aw110f joined #salt
21:30 quanta_ joined #salt
21:30 n8n joined #salt
21:31 faldridge joined #salt
21:36 rupsky_____ joined #salt
21:37 rupsky______ joined #salt
21:37 fragamus joined #salt
21:38 rupsky_______ joined #salt
21:39 fragamus joined #salt
21:40 fragamus joined #salt
21:42 conan_the_destro joined #salt
21:43 fragamus joined #salt
21:43 fragamus joined #salt
21:44 xuru left #salt
21:47 fragamus joined #salt
21:52 cheus joined #salt
22:00 pydanny joined #salt
22:00 kermit joined #salt
22:02 bemehow joined #salt
22:03 alunduil joined #salt
22:06 Shish joined #salt
22:07 jcsp joined #salt
22:07 frasergraham joined #salt
22:09 layer3switch joined #salt
22:13 homelinen joined #salt
22:19 to_json joined #salt
22:20 troyready joined #salt
22:21 ccase joined #salt
22:23 troyreadyy joined #salt
22:31 quanta_ joined #salt
22:32 ashw7n joined #salt
22:33 ashw7n getting started with salt, in few hours i was able to setup something to deploy bunch of vms on our internal openstack cloud...
22:33 ashw7n with salt-cloud ie.
22:34 [diecast] joined #salt
22:34 ashw7n the only issue I have is that all the new vms have minions setup properly, but master is not
22:34 ashw7n any pointers on what is needed for that
22:35 UtahDave ashw7n: so you're spinning up a new master as well?
22:35 ashw7n yes
22:35 UtahDave are you using a salt-cloud map?
22:36 ashw7n yes
22:36 ashw7n krylov_salt_master:   - test-salt-master:         make_master: True krylov_ubuntu_medium:   - test-minion-1
22:36 ashw7n oops, formatting got lost
22:36 UtahDave What do you mean by the master not being properly set up?  Is the vm being created?  Is the salt-master service not running?
22:37 ashw7n ahh sorry, the VMs are all coming up fine, salt minion is also present in the vm, except for the master process
22:37 ashw7n http://pastebin.com/gpPXn6Nk
22:37 ashw7n has the map
22:39 UtahDave is krylov_salt_master  the profile name?
22:39 UtahDave also, what version of Salt are you running?
22:40 picker joined #salt
22:40 ghartz joined #salt
22:41 ashw7n salt 2014.1.3
22:41 ashw7n salt-cloud 2014.1.3
22:42 ashw7n yes
22:42 UtahDave hm.  try updating your bootstrap    salt-cloud -u
22:42 ashw7n okay
22:43 ashw7n the vms are ubuntu 14, would that be of any consequence?
22:44 UtahDave it's possible.  you might try ubuntu 12.04 and see if that works better.  It's possible there's some edge cases we haven't tested for on Ubuntu 14.04
22:46 layer3switch joined #salt
22:46 meteorfo_ joined #salt
22:46 ashw7n okay, so what runs on the vm is /etc/salt/cloud.deploy.d/bootstrap-salt.sh right
22:47 UtahDave yes, I believe so.   salt-cloud -u    will update your bootstrap script to the latest.  Sometimes that fixes some problems.
22:48 ashw7n okay, giving it a shot
22:48 schmutz joined #salt
22:52 oz_akan_ joined #salt
22:56 uestra joined #salt
22:57 dlindquist joined #salt
22:57 oz_akan_ joined #salt
22:57 KyleG joined #salt
22:57 KyleG joined #salt
22:58 oz_akan__ joined #salt
23:00 ashw7n UtahDave: no luck :(
23:01 UtahDave Hm.  I just recently done that, but using the develop branch.  Let me do some testing here
23:01 ashw7n is there any logs on the vms that I can check
23:02 UtahDave have you looked in /var/log/salt   ?
23:03 [diecast] joined #salt
23:04 ashw7n_ joined #salt
23:05 ashw7n that just has the minion log
23:05 Joseph_ joined #salt
23:08 ajprog_laptop joined #salt
23:13 frasergraham joined #salt
23:19 joehh1 UtahDave: re the salt-cloud on ubuntu 14 (trusty) I haven't heard any success (or faliure) of using salt-cloud so I wouldn't rule out a packaging bug
23:19 UtahDave joehh1: I've used it already on 14, but there might be some edge cases still
23:22 frasergraham joined #salt
23:23 fivethreeo Anyone got a formula for setting up openstack?
23:24 frasergraham joined #salt
23:26 LBJ_6 joined #salt
23:29 redondos joined #salt
23:32 layer3switch joined #salt
23:37 viq fivethreeo: there's https://github.com/saltstack-formulas/openstack-standalone-formula
23:37 smcquay joined #salt
23:38 viq there's also https://github.com/CSSCorp/openstack-automation
23:42 fivethreeo The last one seems promising, wonder if it works on one server.
23:43 Shish joined #salt
23:44 Joseph_ joined #salt
23:44 [diecast] joined #salt
23:45 Joseph_ hi all when i target minions by pillar data that i set, nothing is ever returned to me
23:45 Joseph_ salt -l debug -C 'I@roles:compute' test.ping
23:45 Joseph_ however if i do a target via the master pillar data then it works fine
23:45 Joseph_ it does NOT say that no minion matched the target
23:45 Joseph_ it just doesn't return anything
23:46 viq Joseph_: how did you assign the pillars to minions?
23:46 viq Those that you're targeting by I mean
23:47 joehh1 UtahDave: good to hear!
23:47 Joseph_ err....i think i just did it in a fairly common manner. I defined a top.sls for the pillar and that in turn pointed to one of the pillar sls that id efined
23:47 Joseph_ that pillar file contained variable whose value is a list of one or more items
23:48 Joseph_ if i do a pillar.item roles
23:48 Joseph_ that works fine
23:48 viq Joseph_: and if you try against one of the minions that you assigned this to 'salt minion pillar.get roles' do you get anything?
23:48 Joseph_ i can see the pillar data that i am setting
23:48 Joseph_ you mean salt-call?
23:48 Joseph_ hyes this works
23:48 Joseph_ salt-call pillar.get roles
23:49 viq no, I mean salt, target the minion specifically that you set the pillars for
23:49 viq from the master
23:49 Joseph_ oh yes that works as well
23:49 viq Also, try maybe 'salt -v -I roles:compute test.ping'
23:50 Joseph_ I don't believe that syntax is valid
23:50 viq http://salt.readthedocs.org/en/latest/topics/pillar/index.html
23:50 Joseph_ oh wait
23:50 Joseph_ just a second
23:50 viq http://salt.readthedocs.org/en/latest/topics/pillar/index.html#targeting-with-pillar
23:50 Joseph_ nope that didn't work either
23:50 Joseph_ :)
23:51 Joseph_ salt -v -I 'roles:compute' test.ping
23:51 Joseph_ tried that and again same result...which was nothing
23:52 viq Sorry, no idea
23:52 Joseph_ okay thanks for the help anyway
23:52 Joseph_ i just wanted to make sure this wasn't user error on my part
23:55 Joseph_ sigh and it turns out it was caching
23:55 Joseph_ alt '*' saltutil.refresh_pillar
23:55 Joseph_ after that eveyrthing is working fine
23:55 Joseph_ :)
23:55 echos left #salt
23:56 frasergr_ joined #salt
23:56 LBJ_6 joined #salt
23:59 n8n joined #salt

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