Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-02-07

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

All times shown according to UTC.

Time Nick Message
00:02 UtahDave sctsang: try   cmd.run_all        that will return a dictionary with ALL THE THINGS
00:03 Gareth cmd.run_all.  RETURN ALL THE THINGS.
00:03 sctsang thanks, I'll try that
00:03 darrend joined #salt
00:06 sctsang I was reading through the documentation and I thought run_all was to run multiple commands.
00:20 UtahDave nope
00:27 jalbretsen joined #salt
00:35 kalloc joined #salt
00:36 cachedout joined #salt
00:42 toofer joined #salt
00:51 hunter joined #salt
01:04 martoss joined #salt
01:06 martoss1 joined #salt
01:08 pass_by_value joined #salt
01:18 rlarkin anyone recall what needs to be in /etc/salt/minion to cause state.highstate to run automatically?  I'm sure I saw something some weeks back.  didn't bookmark it :/
01:19 forrest rlarkin, are you thinking of the scheduler? http://docs.saltstack.com/topics/jobs/schedule.html
01:19 toofer startup states I think?
01:19 toofer or that.
01:20 rlarkin Bam.  Thx toofer
01:22 Gifflen joined #salt
01:24 pydanny joined #salt
01:25 thayne joined #salt
01:27 alekibango_ joined #salt
01:32 stewpot joined #salt
01:32 stewpot hello all.. how does someone configure the minion to use a different salt master in the profile for that system?
01:32 AdamSewell joined #salt
01:33 stewpot at the moment I have a sed script that is called in the bootstrap but I would like to know if there is a "salt" way of changing master
01:35 kalloc joined #salt
01:41 stewpot at the moment I have a sed script that is called in the bootstrap but I would like to know if there is a "salt" way of changing master variable in the minion configuration automatically
01:44 alekibango joined #salt
01:46 Gifflen joined #salt
01:47 Ryan_Lane1 joined #salt
01:48 Ryan_Lane1 I'm having an issue with custom grains when using masterless salt
01:49 Ryan_Lane1 __salt__ seems to be loaded with something other than a set of salt module functions
01:49 Ryan_Lane1 so __sallt__['cmd.run'] returns a key error
01:50 openxmark joined #salt
01:50 Ryan_Lane1 if I assign __salt_call__ to the related functions I can do __salt_call__['cmd.run'] and it works fine
01:52 fuser joined #salt
01:52 Hefeweizen joined #salt
01:54 kainswor joined #salt
01:59 bemehow_ joined #salt
02:00 tvle joined #salt
02:03 fuser_ joined #salt
02:03 alekibango joined #salt
02:03 Ryan_Lane1 ugh. grains are limited to key: value!?
02:04 Ryan_Lane1 it's not full yaml?
02:07 martoss joined #salt
02:18 favadi joined #salt
02:21 jnials Ryan_Lane1:  I'm not the expert, but the doc's look like full yaml to me.
02:22 Furao joined #salt
02:23 dave_den Ryan_Lane: they are yaml if setting in /etc/salt/minion/grains or json if setting with grains.setval.
02:23 manfred love salt, I learned about it the first half of this week, and it is super awesome.  +1
02:24 forrest great to hear manfred!
02:25 manfred I had a couple patches earlier this week for some salt cloud stuff and the openstack driver.  You will be hearing moe from me ♥
02:25 forrest Nice!
02:26 dave_den Ryan_Lane: https://gist.github.com/dlanderson/66ecd13beca930b181d9
02:26 dave_den oh, he left
02:26 forrest dave_den, no he's still here, at least on one account
02:27 dave_den who is this guy, Michael Keaton!?
02:28 forrest lol
02:29 ravibhure joined #salt
02:31 tvle joined #salt
02:31 ajw0100 joined #salt
02:32 tvle joined #salt
02:32 druonysus joined #salt
02:33 ravibhure1 joined #salt
02:35 kalloc joined #salt
02:48 luff joined #salt
02:48 luff left #salt
02:51 yomilk_ joined #salt
02:55 xl1 joined #salt
02:56 pydanny joined #salt
02:57 zzzirk joined #salt
03:04 cweisel joined #salt
03:07 martoss joined #salt
03:10 Furao_ joined #salt
03:22 Gifflen joined #salt
03:23 _ikke_ joined #salt
03:25 zzzirk joined #salt
03:34 snuffeluffegus joined #salt
03:35 kalloc joined #salt
03:45 thayne joined #salt
03:46 forrest Does anyone in here have a moto x GSM phone?
03:58 joehh joined #salt
04:07 martoss joined #salt
04:07 AdamSewell joined #salt
04:09 vbabiy joined #salt
04:15 pdayton joined #salt
04:16 Gifflen joined #salt
04:30 malinoff joined #salt
04:35 kalloc joined #salt
04:37 clintberry joined #salt
04:37 seth joined #salt
04:39 seth i'm running 0.17.5 on debian 6.0.8 (squeeze), and i have a bunch of minion+master+syndic nodes all talking up to one master-of-masters
04:39 seth i keep getting "an extra return was detected"
04:40 seth "this could be a replay attack"
04:40 seth whenever i run any command from the master-of-masters
04:40 seth some times if i just run a ping from the master-of-masters, targetting a specific minion/master/syndic, i see the same id appear 2-3-4 times
04:41 seth anybody have any ideas?
04:44 manfred I have been trying to figure out a use case for returners... Besides just returning into a database for storage of monitor stuff.  What are yall using it for?
04:46 UtahDave joined #salt
04:48 jalbretsen joined #salt
04:53 fllr joined #salt
04:54 seth We use returners for two things: (1) if there are changes in errors in the ret, it sends us email (we add a little logic on top of the smtp returner) and (2) it writes out a file with the last-run-time, and we have nagios check that to alert us if salt hasn't been running
04:54 cachedout joined #salt
04:56 UtahDave seth: that's cool!
04:57 fllr joined #salt
04:58 seth ya, it nice way of making sure that things stay up without actually relying on anything other than nagios
04:58 tedski nice
04:58 Furao good idea (monitor check)
04:58 tedski are you using nsca for your nagios returner?
05:00 tedski is your nagios returner part of the scheduler?
05:00 tedski (can you tell i've been brainstorming this?)
05:01 seth no to first question, yes to second
05:02 seth it is very dumb -- it just writes a flat file with some summary data
05:02 tedski ahh
05:02 tedski and a nrpe call checks that, i assume
05:02 seth and nagios knows how often it is supposed to write this
05:02 seth ya
05:02 seth exactly
05:02 tedski i was thinking of doing the nsca way for even more "phone-home"
05:03 seth yeah, we don't want to have to talk out at all
05:03 jimallman joined #salt
05:03 tedski ahh, makes sense
05:03 seth anybody have any ideas on my strange replay situation that i mentioned before
05:03 seth ?
05:03 tedski not i, sorry
05:04 seth so strange...
05:04 seth ah well
05:05 seth one thing i wish (and maybe there is a ticket open for this) is that the ret had the params passed to the original function
05:05 seth my email returner fires off alerts for highstate even with test=True
05:05 forrest seth, I know there was a syndic return issue that was opened a couple days ago: https://github.com/saltstack/salt/issues/10164
05:05 forrest but it's not the same error
05:06 seth yeah, looks a little different
05:07 Ryan_Lane joined #salt
05:07 martoss joined #salt
05:07 seth i'll see if i can simplify and replicate it so i can put in a proper issue
05:16 jeremyfelt joined #salt
05:16 xmj terminalmage: ah, the one i didn't see as merged, m'bad
05:16 terminalmage xmj: ?
05:17 xmj I was replying to the last thing you sent me.
05:17 terminalmage yeah, but I didn't understand what you meant
05:17 terminalmage "the one I didn't see as merged"
05:17 terminalmage ???
05:17 terminalmage there was only one freebsd pull req that I opened yesterday
05:18 terminalmage is that the one you were asking about?
05:22 fllr joined #salt
05:24 xmj terminalmage: the one that concerns the fact when pkgnames don't exactly match portorigins
05:24 xmj yes
05:25 xmj (like in the case of salt itself; pkgname will be sth like py27-salt-0.17.4 ...
05:25 mgw joined #salt
05:25 terminalmage yeah
05:25 terminalmage so that was merged, and I cherrypicked it
05:25 terminalmage so it will be in 2014.1.0
05:26 terminalmage the ports state is still new so I'm sure it's not perfect
05:26 terminalmage but it'll work for salt
05:26 terminalmage because it'll look at the origin name
05:27 terminalmage also, the commit adds "with_origin" for pkg.list_pkgs and pkg.version
05:27 terminalmage so, salt bsdminion pkg.version py27-salt with_origin=True
05:28 terminalmage will show you the origin name
05:28 terminalmage there isn't yet a function to do the reverse, i.e. resolve origin name to the port(s) which match it
05:28 terminalmage but that can be added
05:28 terminalmage anyway, I'm heading to bed
05:32 fllr joined #salt
05:35 kalloc joined #salt
05:35 xmj nice
05:36 anuvrat joined #salt
05:36 xmj terminalmage: i like it, but typically you only ever see the origin through `pkg query` magic, does the state have a 'pkg.query' subroutine?
05:37 terminalmage states don't do that
05:37 terminalmage execution modules do
05:38 terminalmage salt/modules/freebsdports.py
05:40 jalbretsen joined #salt
05:45 pydanny joined #salt
05:48 dave_den seth: that rings a bell from an old syndic issue, but i can't recall right now
05:51 xmj terminalmage: which version of salt would that be in?
05:51 xmj terminalmage: (released already, or ... upcoming and on the git repo?)
05:54 forrest xmj, I think he went to bed
05:54 yomilk joined #salt
05:54 xmj a ok
05:57 terminalmage nah I'm still here...
05:57 terminalmage heh
05:57 xmj found the file in the develop/ repo, nice but contains scary things >:p
05:57 terminalmage the ports state and execution module, as well as completely rewritten package management, will be in 2014.1.0
05:58 terminalmage xmj: open a pull request, then
05:58 xmj L229         _write_options(name, saved_config) could use a checking if the file exists, afterwards
05:58 terminalmage that's the beauty of open source
05:58 terminalmage xmj: I am going to bed now, and I'm not going to remember this in the morning
05:59 xmj terminalmage: no worries. I know how opensource works :p
05:59 terminalmage so, you can file a pull request
05:59 terminalmage or open an issue
05:59 terminalmage and tag me with @terminalmage in the issue
06:02 cachedout joined #salt
06:03 alunduil joined #salt
06:07 martoss joined #salt
06:11 kalloc joined #salt
06:17 fragamus_ joined #salt
06:18 ndrei joined #salt
06:20 Katafalkas joined #salt
06:20 yomilk joined #salt
06:32 kermit joined #salt
06:32 fllr joined #salt
06:34 _fllr_ joined #salt
06:53 kalloc joined #salt
06:55 martoss joined #salt
07:00 martoss joined #salt
07:03 alunduil joined #salt
07:05 Katafalkas joined #salt
07:05 Katafalkas joined #salt
07:11 gammalget joined #salt
07:13 Franz__ joined #salt
07:25 Furao joined #salt
07:30 Psyke joined #salt
07:33 apergos didn't get to look at that pull request yesterday so doing it now
07:35 fllr joined #salt
07:37 dmwuw joined #salt
07:38 tomspur joined #salt
07:38 tomspur joined #salt
07:43 timc3 joined #salt
07:43 Shenril joined #salt
07:47 martoss joined #salt
07:51 martoss1 joined #salt
07:51 ndrei joined #salt
07:55 kalloc joined #salt
07:58 olitree joined #salt
08:02 anuvrat joined #salt
08:07 Kenzor joined #salt
08:17 harobed joined #salt
08:18 harobed joined #salt
08:21 kuL4_ guys is there a way to read evn variables in salt with grains from /etc/environment, like with facter?
08:23 Shenril joined #salt
08:24 Franz__ joined #salt
08:25 Franz__ joined #salt
08:25 arthurlutz joined #salt
08:25 Franz__ joined #salt
08:29 olitree left #salt
08:33 juso joined #salt
08:35 Vivi-1 Hello every one
08:35 fllr joined #salt
08:41 arthurlutz1 joined #salt
08:42 yomilk joined #salt
08:45 kossy joined #salt
08:51 giantlock_ joined #salt
08:52 miguitas joined #salt
08:53 jstadler joined #salt
08:55 driks joined #salt
08:59 kadel joined #salt
09:00 drdriks joined #salt
09:02 mike25ro hey Vivi-1
09:03 Vivi-1 is there a tea states in Salt?
09:03 Vivi-1 I need tea.
09:03 Katafalkas joined #salt
09:04 mike25ro tea?!
09:04 mike25ro like the 5 o'clock British tea?
09:04 Vivi-1 yeap
09:05 Vivi-1 mmhh, seeams saltstack.com is down for me :(
09:06 Vivi-1 http://www.isup.me/http://www.saltstack.com/
09:07 Ryan_Lane joined #salt
09:12 __number5__ joined #salt
09:24 carlos joined #salt
09:26 __number5__ joined #salt
09:28 lessismore joined #salt
09:29 mike25ro guys i am new to py ... and salt... can i use in a jinja file some py script? I want to split the string xxx.yyy.zzz and use the xxx as a jinja var. Is that possible? if someone could give me also some py code will be great
09:35 pydanny joined #salt
09:35 fllr joined #salt
09:37 fllr joined #salt
09:38 Damoun Hi, is there something to do to use formulas with masterless (vagrant) ?
09:39 baoboa joined #salt
09:50 Whissi joined #salt
09:54 Ryan_Lane joined #salt
10:03 passenger_nginx joined #salt
10:04 passenger_nginx please let me know i want to install the passenger_nginx in the salt minion using pkg. how do i pkg this passenger
10:07 giantlock__ joined #salt
10:09 apergos today's test run from head (of deployment branch) fails to get anywhere, with [salt.crypt       ][WARNING ] SaltReqTimeoutError: Waited 60 seconds
10:09 apergos is there a known dependency or fix?
10:09 elithrar joined #salt
10:11 kedo39 joined #salt
10:17 elithrar joined #salt
10:19 ckao joined #salt
10:27 TamCore joined #salt
10:27 rowleyaj joined #salt
10:29 y0j hi folks
10:29 y0j is there any way to copy whole work directory from salt master to minion and save all directory and file permissions for this directory?
10:30 y0j I've used file.recurse but it's required to set up file/dir mode, but i have very different directory and file permissions in my work directory and i want just copy it as is
10:35 fllr joined #salt
10:36 kalloc joined #salt
10:38 Simo_____ joined #salt
10:45 nginx joined #salt
10:47 nginx how to create a pkg to install passenger. i have installed nginx pkg. it doesn't works for passenger. how to do it?
10:48 Franz__ joined #salt
10:53 harobed joined #salt
10:53 harobed joined #salt
10:55 yomilk joined #salt
11:08 dansoap joined #salt
11:08 dansoap hey guys
11:08 kalloc_ joined #salt
11:09 dansoap just a (i hope) quick question:
11:10 dansoap i'm managing an elasticsearch instance via salt. when i install plugins into elasticsearch, i need to restart the service. this works all fine. however, when i want to add other things into elasticsearch (by curl'ing to the http port), it is not yet available, since it takes a while for elasticsearch to get up and running
11:11 dansoap i added a shell script to every cmd call to wait for elasticsearch to every curl request, which also works, but it's not clean
11:12 MrTango joined #salt
11:12 dansoap is there a way to let the service state wait until a specific condition is met? like can i add a cmd to a script to the service.running state to ensure it only returns when everything is up?
11:19 joehh joined #salt
11:23 nginx joined #salt
11:24 DaveQB joined #salt
11:26 ggoZ joined #salt
11:26 nginx how to create a package for passenger?
11:27 nginx i have this pkg for nginx  nginx:   pkg:     - installed   service:     - running     - require:       - pkg: nginx ~
11:27 helminthe joined #salt
11:28 malinoff Pastebin is a nice tool btw
11:28 nginx ok i paste it and let you know
11:29 nginx please refer this link http://pastebin.com/pWxzWPsE
11:31 pydanny joined #salt
11:35 fllr joined #salt
11:45 gadams999 joined #salt
11:53 zz_Cidan joined #salt
11:56 backjlack joined #salt
11:59 gadams999 left #salt
12:02 zzzirk joined #salt
12:02 ndrei joined #salt
12:13 lynxman joined #salt
12:20 favadi joined #salt
12:20 diegows joined #salt
12:27 ndrei joined #salt
12:31 harobed_ joined #salt
12:31 dansoap left #salt
12:31 harobed_ joined #salt
12:32 harobed_ joined #salt
12:35 fllr joined #salt
12:43 ndrei joined #salt
12:49 Katafalkas joined #salt
12:50 harobed_ joined #salt
12:52 ml_1 joined #salt
12:58 bhosmer_ joined #salt
12:59 saltirc joined #salt
13:01 saltirc Hi there, I was wondering if it is possible to use salt-cloud not just for creating e.g. rackspace server instances but also for creating databases or configuring new loadbalancers?
13:05 ekristen anyone know how to use salt-cloud for spot instances?
13:05 timc3 saltirc: Of course, but most of the time it expects to ssh in
13:05 timc3 saltirc: or to be able to run the salt minion on it
13:18 gnu-man1 joined #salt
13:21 jrdx joined #salt
13:23 ChoHag joined #salt
13:28 eightyeight so did i hear correctly that salt is abandoning 0mq?
13:35 fllr joined #salt
13:36 kalloc joined #salt
13:37 Psyke joined #salt
13:37 agend joined #salt
13:38 ckao joined #salt
13:39 teufl joined #salt
13:41 kalloc joined #salt
13:41 jaimed joined #salt
13:42 dcolish joined #salt
13:42 kalloc_ joined #salt
13:45 Franz__ joined #salt
13:49 jrdx eightyeight, interesting... where'd you see that? Would be interested to hear if this is true as well... and what would replace it.
13:50 gmoro joined #salt
13:51 ktenney joined #salt
13:52 ndrei joined #salt
13:53 Gifflen joined #salt
13:56 jslatts joined #salt
13:56 bhosmer_ joined #salt
14:00 yomilk joined #salt
14:03 blee joined #salt
14:04 pass_by_value joined #salt
14:05 brianhicks joined #salt
14:05 jstadler joined #salt
14:06 yota joined #salt
14:06 oz_akan_ joined #salt
14:07 gadams999 joined #salt
14:07 eightyeight i didn't read it. i heard it.
14:12 juicer2 joined #salt
14:13 tessellare joined #salt
14:13 Ahlee not abandoning, the transport layer is becoming modular
14:13 Ahlee so if you want to use something else, there will be options much like salt-ssh
14:14 oz_akan_ joined #salt
14:16 Ahlee zeromq will remain the default
14:16 eightyeight cool. is there a announcement or some documentation on this?
14:17 Ahlee It was discussed at SaltConf, I do not believe the branch the work is being done in has been merged in
14:18 zzzirk joined #salt
14:22 bhosmer_ joined #salt
14:24 racooper joined #salt
14:26 jaimed joined #salt
14:28 dwiden joined #salt
14:28 mapu joined #salt
14:30 dwiden are there plans for a salt queueing service?  I've briefly looked at Reactors and I'm not sure it will fit my needs
14:31 fllr joined #salt
14:32 tl-ml joined #salt
14:33 fllr joined #salt
14:35 _fllr_ joined #salt
14:36 cweisel joined #salt
14:36 oleksiy joined #salt
14:37 ndrei joined #salt
14:39 Ahlee dwiden: there's batching, which can execute a percentage at a time
14:40 Ahlee and once a job gets into the job-cache, it's gonna run...eventually
14:42 Ahlee but yeah, I've flirted with making a decorator in celery and using the celery scheduler to interact with salt
14:42 bhosmer_ joined #salt
14:42 dwiden what I'm really looking for is some external user says "run this job", but the job has multiple parts that occur in sequence on different machines.  So Machine A runs job 1, when that is complete Machine B runs job 2, etc
14:43 jimallman joined #salt
14:44 Gifflen joined #salt
14:45 Ahlee the good news is, is salt can support that with built ins.  The reactor system and there's a way for a minion to talk to another minion (through the master)
14:45 Ahlee i don't recall what the name of the minions-kicking-off-jobs-on-minions is
14:46 dwiden that seems like it would be very helpful, actually
14:48 Ahlee it's out there, ask again in a few
14:49 dwiden will do, thank you
14:50 Katafalkas joined #salt
14:52 quickdry21 joined #salt
14:56 kedo39 joined #salt
14:56 ndrei joined #salt
14:57 dwiden joined #salt
14:59 rantpaste joined #salt
14:59 Pate_ joined #salt
15:01 Gordonz joined #salt
15:01 Pate_ Salt fails to install an npm module with error: "AttributeError: 'str' object has no attribute 'items'"
15:02 Pate_ I have a single requirements.sls state file, containing only two states. npm: pkg.installed, and browserify: npm.installed.
15:02 MTecknology side note... holy crap php is disgusting!
15:02 Pate_ Different npm packages also fail with the same error. Guest Vagrant box is running Ubuntu 12.04 LTS.
15:03 x5257 joined #salt
15:08 Katafalkas joined #salt
15:09 giantlock joined #salt
15:10 bhosmer_ joined #salt
15:10 ndrei joined #salt
15:13 Gifflen joined #salt
15:15 iri- joined #salt
15:18 anitak joined #salt
15:20 anitak1 joined #salt
15:25 felixhummel joined #salt
15:26 jusoo joined #salt
15:28 [diecast] joined #salt
15:35 cnelsonsic joined #salt
15:36 danielbachhuber joined #salt
15:40 jergerber joined #salt
15:40 oleksiy joined #salt
15:41 wkf joined #salt
15:41 Pate_ ok, turns out I had an old version of node on my guest box, but salt does not hadle the error well.
15:41 fllr joined #salt
15:44 rlarkin sometimes when I run salt 'name' state.highstate I get the command prompt back even though it's not finished.  when I log in to the minion and run salt-call it fails because highstate is already running.  Yesterday I thought it was jenkins but now I see it just happens sometimes.
15:46 sroegner joined #salt
15:52 ipmb joined #salt
15:53 gnu-man1 joined #salt
15:53 tvle joined #salt
15:54 ndrei joined #salt
15:56 harobed joined #salt
15:57 forrest joined #salt
15:59 helderco joined #salt
16:04 pydanny joined #salt
16:05 gnu-man1 joined #salt
16:05 pdayton joined #salt
16:10 bhosmer_ joined #salt
16:11 cachedout joined #salt
16:12 giantlock joined #salt
16:13 logix812 joined #salt
16:17 jalbretsen joined #salt
16:18 blee_ joined #salt
16:19 Rory joined #salt
16:19 Rory Quick question: If I make a file /foo/bar and /foo doesn't exist, will it be created? (in a salt state file)
16:19 forrest no
16:19 cedwards Rory: it should be
16:19 forrest cedwards, really?
16:20 BRYANT__ joined #salt
16:20 cedwards ...or not? I thought so
16:20 forrest let me test it
16:21 cedwards pretty sure it does. i had it create /srv/http/domain.tld/html in my demo at saltconf
16:21 forrest oh yea it did
16:21 forrest derp, brain fail
16:21 blee joined #salt
16:21 Rory Great thanks. I expected so, otherwise what if you had about 20 levels of subdirectories?
16:21 forrest yea, not sure what I was thinking
16:22 bhosmer_ joined #salt
16:24 brianhicks joined #salt
16:27 logix812 joined #salt
16:31 morte joined #salt
16:31 oleksiy joined #salt
16:32 _fllr_ joined #salt
16:33 morty_ joined #salt
16:38 Pate_ How do I update nodejs with saltstack? nodejs: pkg.installed keeps an ancient 0.6 version on my precise64 vagrant box. Can't use n or npm, because my node is too old :\
16:39 forrest Pate_, what release is available via your package manager, and did you try pkg.latest?
16:39 dave_den Pate_: this is a widely used PPA for NodeJS on ubuntu: https://launchpad.net/~chris-lea/+archive/node.js/
16:40 Pate_ thansk, dave_den. How do I use that with Saltstack? (fyi, I'm a newb)
16:40 Vivi-1 http://docs.saltstack.com/ref/states/all/salt.states.pkg.html#salt.states.pkg.latest
16:40 dave_den just add that ppa with pkrepo.managed, then use pkg.installed like you would normally
16:40 Vivi-1 doc ref =)
16:40 dave_den pkgrepo.managed
16:43 davet joined #salt
16:43 Rory left #salt
16:46 xmltok joined #salt
16:47 alunduil joined #salt
16:50 MK_FG joined #salt
16:50 jeremyfelt joined #salt
16:52 mwmnj joined #salt
16:52 tyler-baker joined #salt
16:52 tyler-baker joined #salt
16:56 analogbyte I am trying environments for the first time (using gitfs), but I can't see any output when using env=experimental in a salt command... what am I doing wrong?
16:57 halo_wings joined #salt
17:00 synfin joined #salt
17:05 Gareth morning
17:05 Franz__ joined #salt
17:06 forrest hey Gareth
17:06 Gareth hey forrest hows it going?
17:07 forrest Pretty good, it's Friday and I'm getting over my cold which I got from work, and not the conference. How about you?
17:09 Saint-N joined #salt
17:09 Gareth forrest: Not bad :) Also glad its Friday.
17:10 justBob joined #salt
17:10 bhosmer_ joined #salt
17:10 samkottler joined #salt
17:10 forrest aww yea!
17:12 KyleG joined #salt
17:12 KyleG joined #salt
17:15 bhosmer__ joined #salt
17:18 martoss joined #salt
17:20 mr_chris scoates: I figured out how to generated pillar data with the py renderer if you're interested.
17:20 mr_chris *how to generate...
17:20 mr_chris If you haven't already.
17:21 scoates mr_chris: yeah; I've got it working. Figured out the order-of-operations/execution problem.
17:21 mr_chris scoates: Haven't encountered that yet. Could you elaborate on that? I just learned that you just have to make it return a proper dictionary.
17:22 scoates mr_chris: short version: you can't use any of the populated variables (such as __grains__) outside of a function because they're not attached to the module when it's loaded (only by the time run() is called)
17:22 mr_chris scoates: Ah.  Makes sense.
17:23 mr_chris Glad you figured it out. My use case is the need to generate number server ids based on their host name.
17:25 rlarkin Looking at outputters, not sure if that's the right place.  I want my command prompt to -not- return until state.highstate completes.  Even if it takes an hour...possible?
17:26 rlarkin I'm running state.highstate and then not knowing what happened
17:26 kalloc joined #salt
17:27 forrest rlarkin, are you talking about where the timeout drops you back to the console then you have to check the jobs?
17:28 rlarkin oh, is there a timeout?
17:28 forrest yep http://docs.saltstack.com/ref/configuration/master.html#timeout
17:28 forrest defaults to 5 seconds
17:28 kalloc joined #salt
17:29 tvle joined #salt
17:29 felixhummel joined #salt
17:30 ndrei joined #salt
17:31 hunter joined #salt
17:32 ggoZ joined #salt
17:32 [diecast] joined #salt
17:33 troyready joined #salt
17:34 iri- joined #salt
17:34 strgcloud joined #salt
17:35 scoates I'm still having a rough time with my minions caching pillar data. )-:
17:37 scoates http://paste.roguecoders.com/p/5c2117ee3ead8310698a3867b21011ab.txt <-- why None ?
17:38 UtahDave joined #salt
17:39 forrest scoates, so you're seeing that, but the pillar data isn't synced over?
17:40 scoates forrest: correct
17:40 forrest can you try to directly target a single VM and see what that returns?
17:40 forrest or is it just that one?
17:40 scoates that is just one
17:40 scoates it returns None
17:40 forrest there is pillar data for it right? :P
17:41 scoates if I restart the minion, and don't even bother to refresh pillar, I get the change on the next pillar.get
17:42 forrest interesting...
17:42 rantpaste So I'm attempting to write a cloud provider module, and I'm bumping up against character encoding issues
17:43 scoates forrest: http://paste.roguecoders.com/p/959d5bf889d25a6e0b55785381c17607.txt
17:43 rantpaste Does salt standardise on ASCII (ie should I be making sure my module outputs ASCII) or should I debug the problem in salt?
17:43 scoates (likely overshare (-; )
17:43 ndrei joined #salt
17:44 UtahDave rantpaste: I'm pretty sure everything is utf-8.
17:44 forrest scoates, what happens when you run the pillar.refresh with debug? Any output?
17:44 rantpaste Oh hey UtahDave :D
17:44 UtahDave rantpaste: hey!
17:44 scoates forrest: just the boilerplate master connecting stuff, and then None
17:44 forrest scoates, can you put the minion into debug mode, then try it again?
17:44 forrest see if anything gets logged.
17:45 scoates http://paste.roguecoders.com/p/0836e67b07606bc9bf1d8667c141614e.txt
17:45 scoates yep. tried that, but will do.
17:45 rantpaste UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 21: ordinal not in range(128) <-- UtahDave that's what I'm getting
17:45 rantpaste (My python isn't so great, so I'm not ruling out problems in my code)
17:46 rantpaste but I'll have a look at why I'm hitting that :)
17:46 scoates here's the entire output from the debug minion on refresh_pillar, forrest: http://paste.roguecoders.com/p/e018231b13f84fc339d1943c314fc1d6.txt
17:46 forrest scoates, weird
17:46 anuvrat joined #salt
17:47 scoates yeah
17:47 dlam joined #salt
17:47 scoates "never cache pillar" would be a useful setting for me (-:
17:47 Franz__ joined #salt
17:48 UtahDave rantpaste: also, redbeard2 is our main salt-cloud developer. He might have answers for you if you ask on the mailling list.  I think he's out of town this week, though
17:48 Franz__ joined #salt
17:48 rantpaste Cool
17:48 rantpaste It's okay - it's a learning process, I just didn't want to dig into it and then find out unicode just wasn't supported ;)
17:49 rantpaste On another note: 75% :(
17:49 scoates uh… is pillar refreshing simply not actually implemented? https://github.com/saltstack/salt/search?q=pillar_refresh&amp;ref=cmdform
17:49 forrest scoates, I'm not quite sure, can't look at it right now though, prod issues.
17:50 scoates oh, no. I see it now. Sourcediving.
17:52 Gordonz joined #salt
17:53 Gordonz joined #salt
17:53 rantpaste Hah, yeh - the nested outputter doesn't handle unicode
17:55 bemehow joined #salt
17:55 gnu-man1 joined #salt
17:58 bemehow_ joined #salt
17:58 tvle joined #salt
18:00 joehillen joined #salt
18:01 scoates :stare:
18:01 scoates file_client is 'local'
18:01 scoates but http://docs.saltstack.com/ref/configuration/minion.html#std:conf_minion-file_client says it defaults to remote…
18:02 zzzirk joined #salt
18:03 scoates … and even after setting it in my minion config, it thinks it's 'local'
18:04 amckinley joined #salt
18:05 scoates https://github.com/saltstack/salt/blob/5e833b93cbb7eede96d1521b2091746a6c5553d0/salt/runners/state.py#L65 ?
18:05 _jslatts joined #salt
18:06 dave_den scoates: runners always use local file client because runners are executed on the master.
18:06 scoates ah
18:07 scoates ok. that makes a bit more sense, but it doesn't solve my problem. I have a minion (probably all of them, but testing this one) caching pillar data until it's restarted.
18:08 scoates (even after a pillar_refresh and after a highstate)
18:10 dave_den scoates: saltutil.refresh_pillar always returns 'None'.
18:10 scoates I see. because it's just firing the event.
18:11 scoates dave_den: https://github.com/saltstack/salt/blob/1a0581c8fd555a1217e51b032222127a27999623/salt/pillar/__init__.py#L40 <-- seems to be switching on remote or local, but this seems to always be local… is that right?
18:12 dave_den yes, always local
18:12 scoates then why the switch in the return?
18:15 dave_den what line
18:16 jeremyBass joined #salt
18:16 analogbyte is there any way to list environments? my git branch does not seem to be recognized as env... any ideas?
18:16 scoates salt/pillar/__init__.py line 40 https://github.com/saltstack/salt/blob/develop/salt/pillar/__init__.py#L40
18:20 dave_den scoates: the minion initializes a RemotePIllar which sends a pillar request to the master. The master then initializes a Pillar with file_client set to 'local' and sort of 'pretending' to be the minion so that it then compiles the local top.sls and pillar sls files and returns the data.
18:20 Katafalkas joined #salt
18:21 scoates ok. that explains why pillar always thinks it's `local`
18:21 scoates thanks.
18:21 scoates really wish I could get my minion to refresh properly, though. /-:
18:22 dave_den it's a bit confusing because in this case the same code can actually be run in a minion and master context so that the same code can be used for both regular minions with masters and masterless minions.
18:22 alunduil joined #salt
18:22 scoates hehe
18:22 scoates indeed (-:
18:23 strgcloud heyall, any good alternatives to using the cmd state for creating idempotent, but fairly arbitrary command execution
18:23 ndrei joined #salt
18:24 dave_den scoates: when you run pillar.data on a minion you should see the results of the pillar data compilation in the debug log of the master. are you absolutely sure you are seeing the correct data in the master's debug logs?
18:24 strgcloud cmd works, but feels clunky since have to write all the tests in bash.
18:25 dave_den strgcloud: you can write scripts that handle the if/unless logic and mange them with file.managed, then you just call that script as the argument for if/unless
18:27 scoates dave_den: I'd been using pillar.get … I guess that's the wrong way to do it? pillar.item gives me an up-to-date result.
18:28 dave_den pillar.get accesses the same data. it's likely that you are trying to access non-dicts with your pillar.get argument.
18:28 dave_den in your paste you are trying to get vm:client. make sure vm is a dict and has a key 'client'
18:29 dave_den or paste your pillar.data output and we can look at it to see why pillar.get vm:client is not working.
18:29 scoates it is. and it does. it just never changes (until minion restart). will paste.
18:32 scoates dave_den: http://paste.roguecoders.com/p/d51e0a5970a457c490b80b6a9b4bc1b2.txt
18:32 scoates I can't easily give you pillar.data without some censoring surgery.
18:34 scoates (pillar.data with a restriction on the `vm` key gives the same output as pillar.item for `vm`)
18:34 logix812 joined #salt
18:35 timc3_ joined #salt
18:35 seanz joined #salt
18:35 seanz Greetings. Is there an easy way to see a script after it's filled in with pillar values?
18:36 ndrei joined #salt
18:36 seanz Something like a show_highstate call? I tried show_highstate, but that doesn't show me the resulting script - just the state block that handles the script.
18:36 ml_1 joined #salt
18:38 dave_den scoates: i was wrong. pillar.get does not fetch new pillar data.
18:39 scoates dave_den: hmm ok then. that's sort of good (-:
18:39 dave_den scoates: only pillar.data, pilar.items, and pillar.item fetch new data
18:39 scoates I can just avoid using pillar.get, I guess… I'm not sure what value stale pillar.get has…
18:39 dave_den scoates: when you use salt['pillar.get'] in a highstate it will be up-to-date because the pillar is refreshed at the beginning of a highstate run
18:40 dave_den but when you run from the command line with salt or salt-call it is not wrapped in a highstate, so it does not refresh
18:40 dave_den scoates: https://github.com/saltstack/salt/blob/develop/salt/modules/pillar.py#L99
18:40 kermit joined #salt
18:40 scoates dave_den: I thought so, but if I manually do a state.highstate, and then pillar.get, I still get stale data
18:40 dave_den scoates: and pillar.get just uses __pillar__ https://github.com/saltstack/salt/blob/develop/salt/modules/pillar.py#L39
18:44 fxhp Random question, is it possible to manually download a file from salt:// file_root?
18:44 fxhp from the minion
18:44 fxhp without running a highstate / etc
18:48 scoates is this the best way to restart a minion, still? https://github.com/saltstack/salt/issues/7997#issuecomment-30978123
18:48 jeremyBass left #salt
18:49 dave_den fxhp: yes, use the cp module. http://docs.saltstack.com/ref/modules/all/salt.modules.cp.html#salt.modules.cp.get_file
18:52 Ryan_Lane joined #salt
18:54 fxhp dave_den: perfect
18:56 seanz dave_den: Unfortunately, that doesn't fill out pillar values *within* the file.
18:56 UtahDave rantpas
18:57 djaime joined #salt
18:57 dave_den seanz: ?
18:58 dave_den seanz: oh, for your question about the template, did you try http://docs.saltstack.com/ref/modules/all/salt.modules.cp.html#salt.modules.cp.get_template  ?
18:58 seanz dave_den: I did not. Let me try it.
18:58 pydanny joined #salt
19:01 Franz___ joined #salt
19:02 jaimed joined #salt
19:02 salt_whitebelt joined #salt
19:02 windows-minion joined #salt
19:03 hunter joined #salt
19:03 windows-minion i am having a lot of issues with windows minions losing their connections to my salt-master? after a few minutes of them being up and active i will try to run something against them and get "Minion did not return".
19:03 salt_whitebelt it seem that cmd.wait actually watches the state if the state change it will run the next command. can i use it as a timer to pause the next script execution lets say for a minute before the next script run?
19:03 windows-minion any one else have this issue?
19:03 rowleyaj joined #salt
19:03 seanz salt_whitebelt: haha - that's an issue I am having with a Java process.
19:04 seanz salt_whitebelt: I first tried a sleep statement in state block.
19:04 seanz I'm looking at the reactor system now.
19:04 salt_whitebelt windows-minion: is the master and minion on same vlan with no firewall in between that you know of?
19:05 salt_whitebelt seanz: what is the sleep statement?
19:05 windows-minion the master is on the root domain and the minions are on a sub-domain
19:06 windows-minion however, this happens even with a test machine i have in the same domain as the master
19:06 seanz salt_whitebelt: bash sleep statement?
19:06 windows-minion i have opened up all communication on the firewall between the master and sub-domains
19:06 salt_whitebelt seanz: this is for windows with powershell environment
19:07 salt_whitebelt seanz: it shouldn't matter right since the bash shell execute at salt level which is linux anyway
19:08 seanz salt_whitebelt: Well, for Windows I'm sure there's a different command.
19:08 salt_whitebelt seanz: nevermind i think i know what you're talking about. sleep statement in sls file on my master rhel6 master
19:08 seanz salt_whitebelt: http://technet.microsoft.com/en-us/library/ee177002.aspx
19:08 seanz That?
19:09 seanz Start-Sleep -s <seconds>
19:09 allanparsons joined #salt
19:09 salt_whitebelt seanz: iseanz: i know i pshell there's that command, im talking about at salt level
19:09 seanz Salt doesn't offer a "wait" command that waits an arbitrary amount of time. Salt offers the "reactor" system, to react to events of your choosing (though I'm still learning it).
19:09 allanparsons anyone have good instructions for using salt-cloud within a VPC?
19:09 seanz Otherwise, you have to "shell out" to a command in your environment.
19:10 allanparsons (or, better yet, i'm looking for a way to auto-attach an ebs volume before an sls runs)
19:10 salt_whitebelt seanz: reactor
19:10 seanz salt_whitebelt: Yes, that's what I mentioned.
19:10 seanz salt_whitebelt: http://docs.saltstack.com/topics/reactor/
19:10 salt_whitebelt i'd think wait or sleep time is pretty common, i hope this gets built into the next iteration of saltstack
19:11 bhosmer_ joined #salt
19:11 salt_whitebelt windows-minion: what are the trust between the root and child domain and are they in same forest or different forest?
19:11 martoss joined #salt
19:12 iShming_ joined #salt
19:12 salt_whitebelt what is VPC?
19:12 allanparsons virtual private cloud
19:12 seanz salt_whitebelt: The reasoning for me not wanting to do something like 'sleep' is that you may not always need the same amount of sleep time, depending on your system.
19:12 seanz So maybe the amount chosen *won't* be enough somewhere, and the highstate will be broken.
19:13 windows-minion @salt_whitebelt no trusts, same domain just different subnets
19:14 salt_whitebelt VPC or public cloud as far as saltstack is concern, its current capacity is to provide configuration and application deployment on minions. it has limited ability to connect to and manage public cloud provider
19:15 allanparsons thats fine
19:15 allanparsons i'm just looking for an automated way to launch an instance (into a vpc / specific subnet), attach it to an ELB, place an entry in route53 (I'm kinda doing this now), and then attach an ebs volume
19:16 salt_whitebelt that's the reason why you have commerical player like entrastrus or eucalyptus providing orchestration management of public cloud based on openstack.
19:16 allanparsons most importantly, I want to attach an EBS volume to a subset of servers (ex: Elastic Search) and mount the vol before i run the elasticsearch state file
19:17 salt_whitebelt use powershell to manage aws instance
19:18 salt_whitebelt amazon provide the cmdlets
19:18 allanparsons we're a linux shop :)
19:18 allanparsons yeah, i could use bash
19:18 allanparsons but i'd like for everything to be maintained in the state / sls file
19:19 seanz dave_den: cp.get_template worked great. Thanks!
19:19 Saint-N i have a really simply stupid question... the init.sls in each of the states, does that have to exist for the state to be read or is it tied to the inclue so that if you call say apache.users you really only need apache/users.sls ?
19:20 seanz Saint-N: You can have either apache/users/init.sls or apache/users.sls
19:20 seanz Is that your question?
19:20 Saint-N but init isnt really needed if you never call include apache right ?
19:20 salt_whitebelt windows-minion: best thing is to make sure your windows minion has firewall disable, disable selinux on master. if problem still persist you have underlying network packet drop issue or internal packet sniffing detector is dropping port 4505 and 4506
19:21 seanz Saint-N: If you have states that reference any part of the users.sls, then you would need it included *somewhere*.
19:21 Saint-N im just curious if init.sls is the default must be there to be included or if its just there for some other reason
19:21 seanz Either the top.sls file or elsewhere.
19:21 Saint-N right no i get the include part, its the init.sls specifically im curious about
19:22 Saint-N like if i have a apache state and from there i ONLY ever include  apache.users(resulting in apache/users.sls i woulnt need to have an apache/init.sls correct?
19:22 seanz Saint-N: Are you saying if you have an apache/users folder, do you need an init.sls?
19:22 salt_whitebelt windows-minion: are you using windows minion or nix derirative?
19:22 seanz You wouldn't need init.sls in that case.
19:22 Saint-N ahh thanks
19:23 seanz Saint-N: Sho'.
19:23 Saint-N just cleaning up our salts ;)
19:23 Saint-N wanted to make sure my thought was right heh
19:23 windows-minion using windows-minion amd64 installer on windows 2012 r2 boxes
19:23 seanz Saint-N: Will you be able to test after you remove the empty init.sls?
19:23 windows-minion master is ubunut 12.04
19:24 jaimed joined #salt
19:24 iShming_ joined #salt
19:24 Saint-N oh its got stuff in it but i found no include base(ie not prog.sub format) in relation to the init
19:24 salt_whitebelt windows-minion: the agent doesn't list 2012 as having tested or supported
19:25 seanz Saint-N: Oh, so you're going to move that stuff out to somewhere else?
19:25 Saint-N ill have to double check but figured i'd ask if my reading of the docs was right
19:25 Saint-N yeah remove the stuff thats not actually needed or used and it possibly legacy
19:25 seanz Saint-N: salt 'machine' state.show_highstate is useful
19:25 salt_whitebelt windows-minion: it might work but not sure how much functionalities is affected. can you use it on w2k8
19:25 dave_den scoates:  fyi:   https://github.com/saltstack/salt/issues/10270
19:25 Saint-N ooo that will show me what the minion is checking for based on its "config" yeah?
19:26 scoates oh, nice, dave_den. I worked around it. (-: thanks, though.
19:26 seanz Saint-N: It'll show what the highstate will do.
19:26 seanz You can also do:
19:26 seanz salt '*' state.show_highstate --out yaml
19:27 seanz Prettier output.
19:27 Saint-N neat thanks
19:27 dave_den scoates: yeah, i figured you did already but that definitely is a bug that should be fixed
19:27 windows-minion unfortunately we cant use 2k8. our standard is 2k12.
19:27 seanz Saint-N: http://docs.saltstack.com/ref/states/layers.html
19:27 Saint-N slowly going through docs
19:27 windows-minion however, looking at this https://github.com/saltstack/salt/issues/6862 it looks like this issue is not just a 2012 iisue
19:27 seanz Saint-N: Oh, I get it. There's a lot there.
19:27 seanz Lots of gotchas, especially.
19:28 windows-minion i did try setting up a cronjob to run test.ping however it is not resolving the issue
19:28 Saint-N heh most of the time it's easier to just ask someone if you read a part right heh
19:28 Saint-N easier to understand/validate
19:28 seanz Saint-N: Yes, and the nice part about the way you phrased that is that you actually *read* it first. :)
19:28 JordanRinke Morning
19:28 seanz Instead of asking totally blind.
19:29 seanz Which I wonder how many times I've done</hypocrite_check>
19:29 Saint-N been on irc and in tech far to long to make that mistake :)
19:29 seanz Saint-N: Agreed on that as well. That's a quickly-unlearned trait. :)
19:30 simiomalo joined #salt
19:30 salt_whitebelt windows-minion: w2k12 firewall is even more restrictive. make sure its fully disable. try this in your laptop to test the connectivity. use vmware workstation, spin up just a master and w2k012 minion. disable selinux on your unbutu and window firewall. if that works it proves there's underlying issue on your network
19:31 n8n joined #salt
19:32 windows-minion k, will try and report back. thanks for your help!
19:32 simiomalo Does anyone know if the videos and slide decks from SaltConf 2014 have been posted anywhere?  I can't find them on the SaltConf website
19:32 scoates dave_den: commented. thanks for the heads-up
19:33 dave_den cool
19:35 zooz joined #salt
19:36 zooz joined #salt
19:36 diegows joined #salt
19:37 druonysus joined #salt
19:38 kermit joined #salt
19:41 ajw0100 joined #salt
19:42 [diecast] joined #salt
19:44 ipmb joined #salt
19:44 d1gital joined #salt
19:45 d1gital what's the best way to go about loading a SQL dumpfile into mysql from a sls?
19:45 Ahlee is there the opposite of unless?
19:46 cweisel joined #salt
19:47 forrest Ahlee, onlyif?
19:47 forrest for cmd.run at least
19:47 terminalmage joined #salt
19:48 Ahlee yep
19:48 Ahlee thanks forrest
19:48 forrest np
19:49 clearclaw Is there a way to specify an EBS volume by Volume ID in block_device_mappings?  The more I look at the sources, the more it seems like there isn't...?
19:49 Ahlee salt was easier before i started using states ;)
19:49 forrest lol
19:56 bemehow joined #salt
19:57 bemehow_ joined #salt
19:57 seanz left #salt
20:04 allanparsons @cleanclaw :(
20:04 DaveQB joined #salt
20:05 Ryan_Lane UtahDave: howdy, I was wondering if there was any update on: https://github.com/saltstack/salt/issues/5752
20:05 Ryan_Lane at minumum about a modular cert system
20:05 Ryan_Lane since I can't even do this myself if I can't extend the cert system
20:07 UtahDave Ryan_Lane: Hey, man!
20:07 Ryan_Lane howdy :)
20:07 thayne joined #salt
20:08 UtahDave Ryan_Lane: Hm. I don't know if anyone at saltstack has worked on this yet.
20:08 thayne joined #salt
20:08 Ryan_Lane I don't want to lick a cookie, but I might consider working on this
20:08 UtahDave I know it was approved, but I'm don't know that it's been assigned to anyone yet.
20:08 Ryan_Lane but I need a modular cert system for that
20:08 thayne joined #salt
20:09 UtahDave Hm. yeah.
20:10 mgw joined #salt
20:11 gnu-man1 joined #salt
20:16 misc123misc joined #salt
20:16 giantlock joined #salt
20:17 Gareth Mmm cookie.
20:17 forrest that reminds me I need to make some protein cookies this weekend
20:18 felixhummel joined #salt
20:18 toofer joined #salt
20:18 Gareth forrest: homemade clif bars?
20:18 forrest not quite, but similar
20:19 forrest no raisins though
20:19 forrest friggin clif bars, every single one has raisins for some reason
20:19 Gareth not a fan of raisins? :)
20:19 forrest I like raisins, but not in my cookies
20:19 forrest they're a waste, just simple carbs/sugars :(
20:26 felixhummel joined #salt
20:32 clintberry joined #salt
20:33 erchn joined #salt
20:34 erchn hi all, any idea when cron.env_present was introduced?
20:36 forrest erchn, looks like it is only in develop right now, but there's no version add on it
20:36 christopherl joined #salt
20:36 christopherl Does anyone have an example of using git.latest with a git oauth token?
20:36 erchn I wonder if I can just copy the latest cron.py into my _states directory to gain that functionality, and _modules I suppose
20:37 erchn I'm making the assumption, of course, that modules and states in my tree override what's built-in
20:38 patrek joined #salt
20:38 Ryan_Lane joined #salt
20:39 KyleG joined #salt
20:39 KyleG joined #salt
20:41 clearclaw joined #salt
20:42 forrest you can try, sometimes it does work
20:43 gadams999 left #salt
20:44 gnu-man1 joined #salt
20:44 martoss joined #salt
20:44 giantlock_ joined #salt
20:49 erchn thanks forrest
20:49 martoss left #salt
20:49 forrest np
20:50 pentabular joined #salt
20:54 pentabular left #salt
20:56 Gareth hm. hm. anyone if you can use wildcards in a watch?
20:58 bemehow joined #salt
21:00 dave_den Gareth: no, you cannot
21:01 dave_den Gareth: you may want to invert the dependency and use watch_in.
21:01 rojem joined #salt
21:01 Gareth dave_den: yeah. looking at watch_in now.
21:02 rojem joined #salt
21:02 dave_den well, not the dependency but inverting which states construct the watch requisite
21:02 dave_den you'll use watch_in and require_in a lot with dynamically created states
21:03 elfixit1 joined #salt
21:04 christopherl joined #salt
21:04 Gareth thanks.  I'll check those out.
21:06 dlam joined #salt
21:16 toofer joined #salt
21:16 harobed joined #salt
21:17 harobed joined #salt
21:19 alunduil joined #salt
21:26 gnu-man1 joined #salt
21:31 toofer joined #salt
21:34 salt_whitebelt joined #salt
21:35 salt_whitebelt is there a way i can use salt master to push out windows minion agent remotely to minion?
21:35 salt_whitebelt or rhel 6 minion works as well
21:36 forrest salt_whitebelt, you'd have to use salt-ssh, or you could configure salt-cloud and hook it into your provisioning system.
21:37 salt_whitebelt salt-ssh is for rhel 6 minion and salt-cloud is for what minion?
21:38 alexthegraham joined #salt
21:39 alexthegraham Can I use grains substitution inside of a config file I'm pushing to a minion? Or do I need to push the config file with a generic value and then sed in the grains data?
21:40 forrest salt_whitebelt, I think it depends on the windows image, check out: http://salt-cloud.readthedocs.org/en/latest/topics/windows.html
21:41 juicer2 joined #salt
21:41 forrest alexthegraham, you can template config files, the first example here uses jinja for the templating engine: http://docs.saltstack.com/ref/states/all/salt.states.file.html
21:41 dave_den alexthegraham: yes, just set '- template: jinja' in the config file sate args. you can then embed jinja int he config file. grains are available in the template as 'grains'
21:41 forrest hah, I win this time dave_den
21:41 dave_den next time, gadget. next tiiiime.
21:42 * dave_den strokes fuzzy cat
21:42 Kenzor joined #salt
21:42 forrest I hope you actually have a cat
21:42 ndrei joined #salt
21:43 dave_den just a dog. but she sleeps as much as any cat would
21:43 alexthegraham Slick! Thanks, guys.
21:43 forrest dave_den, fair enough
21:43 clearclaw joined #salt
21:44 rowleyaj joined #salt
21:47 smcquay joined #salt
21:49 mfournier joined #salt
21:50 snuffeluffegus joined #salt
21:55 clearclaw joined #salt
21:57 christopherl joined #salt
21:59 cstelma joined #salt
22:00 JasonSwindle joined #salt
22:01 frasergraham joined #salt
22:03 Ahlee directory.managed throwing OSError: [Errno 17] File exists
22:08 delkins using force=True?
22:08 mfournier joined #salt
22:08 giantlock joined #salt
22:09 sroegner just in case nobody has asked this before today: any leads on how far out a hydrogen rpm on epel-testing might be?
22:10 cedwards sroegner: supposed to be "soon"..
22:11 cedwards can anyone tell me what markupsafe is used for within salt? I see it mentioned in the code for thin.py
22:14 whiteinge cedwards: it's a jinja dep which is why we've required it historically. not sure what thin.py is using it for though
22:15 whiteinge thin.py is probably looking for it so that it can generate the deploy tarball that contains it (since jinja needs it)
22:15 cedwards whiteinge: just stumbled upon a markupsafe/_speedups.{c,so} in thin
22:22 giantlock joined #salt
22:23 alexthegraham Anyone messed with states.selinux or modules.selinux much?
22:23 alexthegraham When I run salt-call selinux.getenforce I get "permissive", but /etc/sysconfig/selinux has it set to "disabled".
22:24 darless joined #salt
22:24 dstanek joined #salt
22:25 alexthegraham And using "salt-call selinux.setenforce disabled" returns "Invalid mode disabled".
22:27 SEJeff_work Question
22:27 forrest alexthegraham, did you try selinux.setenforce permissive?
22:27 giantlock joined #salt
22:28 SEJeff_work if I was to want to use the builtin salt fileserver to salt /srv/salt on a syndic master
22:28 SEJeff_work how would you do the equiv of: file.managed with recurse: true on salt:///? salt:/// doesn't work
22:28 fllr joined #salt
22:29 jankowiak joined #salt
22:30 forrest alexthegraham, the selinux module only supports enforcing and permissive
22:30 forrest https://github.com/saltstack/salt/blob/develop/salt/modules/selinux.py#L85
22:30 ndrei joined #salt
22:30 kermit joined #salt
22:31 cstelma requesting comments on: https://github.com/saltstack/salt/pull/10249  -- wondering if my refactoring style is acceptable.
22:31 timc3 joined #salt
22:32 alexthegraham Thanks, forrest. Permissive and Enforcing both seem to work, but aren't the same as disabled :\
22:32 forrest alexthegraham, yea of course, but I'll take permissive over enabled if disabled isn't available :P
22:32 forrest not sure if there was a reason that wasn't added to the module/state
22:32 ifnull joined #salt
22:33 alexthegraham Definitely. I was just hoping to use the selinux modules and states rather than sed'ing "disabled" into the config file.
22:33 clintberry joined #salt
22:33 Ryan_Lane UtahDave: hey, look what I did, I finally contributed! https://github.com/saltstack/salt-contrib/pull/62
22:33 Ryan_Lane :D
22:33 clintberry left #salt
22:34 Ryan_Lane I guess my time as a leech is over
22:34 ifnull When using salt.renderers.pydsl, what is the best way to import a module that is in the same directory as the els?
22:35 UtahDave dude, that looks too cool.  Why were we not ALWAYS requesting the data in json format???   :)
22:35 forrest alexthegraham, you could make the conf a managed file, much easier
22:36 UtahDave cachedout: do you know the answer to ifnull's question?  ^^
22:36 ndrei joined #salt
22:36 cachedout ifnull: include('the_state')
22:37 cachedout Err, do you want to include a state or include a Python module?
22:37 cachedout Sorry, didn't read that closely.
22:38 alexthegraham Goot call, forrest, but that will only change on reboot (which should be done anyway, I suppose) and doesn't turn it off on a running system. Still gotta cmd.run "echo 0 > /selinux/enforce".
22:38 darless left #salt
22:39 ifnull cachedout: a python module
22:39 cachedout ifnull: OK. I don't know offhand but let me do some digging.
22:39 ifnull cachedout: thanks
22:41 forrest alexthegraham, yea it's not ideal!
22:42 bear24rw joined #salt
22:42 mgw joined #salt
22:45 mfournier joined #salt
22:46 Ryan_Lane UtahDave: I was wondering the same :)
22:46 Ryan_Lane with hiera you don't have an option, which is absurd, but facter has multiple outputs
22:46 UtahDave Ryan_Lane: whoever it was probably just didn't know about it.
22:46 Ryan_Lane yep
22:49 hunter Ryan_Lane: I know little about grains as of yet - how do we tell salt to include facter output in the grains - just have "facter" installed?
22:49 Ryan_Lane yep
22:49 Ryan_Lane with this grain, it'll add all facter facts as facter_<fact_name> grains
22:51 UtahDave hunter: that grain is in salt-contrib, so you'd have to download it and drop it in your  /srv/salt/_grains/  directory on your master and run   salt \* saltutil.sync_grains       to get it on all your minions
22:51 hunter uh
22:52 hunter I didn't know salt had a dynamic "add to the pile o grains" function.
22:52 Ryan_Lane UtahDave: btw, custom grains seem to be totally broken with masterless salt from what I can tell
22:52 hunter UtahDave: is sync_grains done automatically as part of a highstate run?
22:52 Ryan_Lane hunter: yep
22:52 SEJeff_work sync_all is, which does sync_grains
22:52 hunter Ryan_Lane: thats very disappointing (the masterless part)
22:53 Ryan_Lane __salt__ calls are broken. gives a key error for cmd.run
22:53 Ryan_Lane apparently __salt__ at that point holds other functions. things like core.<blah>
22:55 hunter I need to add N sysadmin accounts to be local on this system. Each of them needs to be in 4 local groups as well. I create the groups in a seperate SLS and know how to import and then require the groups.
22:56 hunter Is there a shortcut so that EACH account doesn't have to have require on all 4 groups?
22:57 hunter Ryan_Lane: instead of that grain incorportatng facter output would be even better to just have native grains that give the same output - I already cringe at the minion dep list without adding ruby and whatnot.
22:58 ajw0100 joined #salt
22:59 Ryan_Lane hunter: well, if you're doing puppet integration you need the compatibility
22:59 [diecast] joined #salt
22:59 Ryan_Lane for instance, if you have custom facts, you need to be able to access those custom facts without rewriting all of them
22:59 hunter Ryan_Lane: yeah - I'm trying to quit cold turkey ... :)
22:59 Ryan_Lane and the custom facts could be loaded with data from a puppet run
23:00 Ryan_Lane yeah, if you're totally ignoring puppet, then don't use the fact grain
23:00 hunter Ryan_Lane: what would be even more awesome if facter/salt/chef/ansible could all agree on these nuggets and use the same nomenclature / units for them.
23:00 hunter But now I'm just spouting random madness.
23:00 Ryan_Lane :D
23:00 Ryan_Lane well, there's still the custom fact/grain issue :)
23:01 hunter Ryan_Lane: I bet the default output of facter is 90% solution for most users.
23:01 Ryan_Lane almost definitely
23:01 hunter Any hints on my group/user question?
23:01 hunter There has to be a better way than the obvious but tedious answer.
23:02 Ryan_Lane heh. no clue there :)
23:03 davet joined #salt
23:06 fllr joined #salt
23:06 dave_den hunter: you would be DRY if you used jinja loops on the user states/groups. but if you have the groups in a separate sls and everything is hardcoded, you could just add '- require:\n    - sls: groups_sls'
23:06 kalloc joined #salt
23:06 hunter dave_den: I just did that and its sufficient
23:07 hunter dave_den: right now everything is hardcoded while I learn - jinja templates tend to cook my noodle, esp after a week like this one.
23:07 dave_den nobody likes overcooked noodles
23:08 hunter But very soon now I need to take my single instance mongodb/shockd formula and turn it into multi-instances driven from pillar
23:09 giantlock joined #salt
23:09 Ryan_Lane UtahDave: https://github.com/saltstack/salt/issues/10275
23:09 Ryan_Lane masterless salt is like a gateway drug for people
23:09 Ryan_Lane it really needs to work to be able to turn people into hardcore uses :)
23:11 fraserg__ joined #salt
23:12 UtahDave Ryan_Lane: add a    -l debug to that command.   I'm guessing you're getting a stacktrace in the background somewhere in the loader
23:14 fraserg__ i'm trying to use salt for the first time to setup a python virtualenv and i'm hitting some issues
23:14 fraserg__ I get errors running the virtualenv command
23:14 fraserg__ using the virtualenv.managed state
23:14 cachedout ifnull: OK, I got it working but I cheated a little. ;]
23:14 hunter dave_den: if you do the require; sls: group_sls do you nee the include: statement ?
23:14 dave_den Ryan_Lane: odd, the keys you list in __salt__ look like grains.
23:14 hunter dave_den: or can salt figure that out automatically.
23:14 dave_den in your github issue
23:14 cachedout ifnull: Can I msg you? The explanation is kind of long.
23:14 Ryan_Lane UtahDave: nope. only the one I posted
23:15 UtahDave Ryan_Lane: Oh, wait.  __salt__ never works inside of grains.   It's a chicken and egg problem
23:15 dave_den hunter: yes, you have to - include the state file
23:15 hunter Narks
23:16 UtahDave grains get evaluated first, then that is used for building the __salt__ dictionary
23:16 Ryan_Lane UtahDave: if I do this, it works: http://pastebin.com/q6isjRiF
23:16 Ryan_Lane I'm following the pattern used in grains in core
23:16 Veticus joined #salt
23:16 UtahDave Ryan_Lane: right, because you're mapping directly to the cmdmod module before the loader builds __salt__
23:17 clearclaw joined #salt
23:17 Ryan_Lane right, but if I use __salt__ rather than __salt_call__ it gives me that failure
23:17 UtahDave exactly.  You can't use __salt__ because it doesn't exist yet
23:18 Ryan_Lane UtahDave: this doesn't work: http://pastebin.com/Wp8VJc0j
23:18 Ryan_Lane but this is exactly what core is doing inside of grains....
23:19 UtahDave Ryan_Lane: do you have this line?      import salt.modules.cmdmod    ?
23:19 Ryan_Lane yep
23:19 Ryan_Lane __salt__ is being overridden by something
23:19 Ryan_Lane with what looks like a sec of custom grains
23:20 Ryan_Lane err. no it's being replaced with a set of grain functions
23:20 Ryan_Lane both custom and core
23:21 KyleG joined #salt
23:21 KyleG joined #salt
23:23 UtahDave Hm. I'm not sure what's going on there.
23:23 hunter Is there a "synthetic" kind of ... state? that I can use for a require statement?
23:24 hunter Basically I'm trying to add a requirement on the "/homes" directory being created
23:25 Ryan_Lane UtahDave: if I move this grain, unchanged, to /usr/lib/pymodules/python2.7/salt/grains it works perfectly
23:25 forrest hunter, do you mean using file.directory to create the directory, then requiring that?
23:25 Ryan_Lane I'm betting that this would also be fine if I was syncing the grains from the master, rather than using masterless salt
23:25 UtahDave hunter:  you can use an arbitrary string for your ID declaration for a file.directory
23:26 UtahDave Ryan_Lane: you can put your files in   /srv/salt/_grains on your minion when using masterless salt
23:26 hunter forrest: Yes - basically I decided that for each local user to require a "base_setup.sls" that A) creates the 4 needed groups and B) makes sure the /homes dir is created/ present.
23:26 Ryan_Lane UtahDave: that's where it is ;)
23:26 hunter forrest: it doesn't make any sense to me to say "This dir (owned by root) also requires these 4 other groups for no real reason"
23:27 hunter forrest: so I was looking for some synthetic kind of ... state? That I can just hang a requires on.
23:27 UtahDave ah.  :)
23:27 forrest hunter, hmm
23:27 UtahDave hunter: can you pastebin what you have?
23:27 troyready joined #salt
23:28 hunter http://pastebin.com/zBVA74Sn
23:28 hunter The comments attempt to show what I want (or think I want) - but that file unchanged WORKS and does what I need.
23:30 tedski is it possible to pass data in on the command line that is than parsed in the jinja template on the minion
23:30 tedski ?
23:31 UtahDave tedski: yeah, you can pass in pillar data at the command line
23:31 tedski oh, nice
23:31 tedski thanks
23:32 hunter The intent for this to allow http://pastebin.com/FsjyA04T
23:33 hunter Then each admin account just includes/requires the base_setup and I'm done-ish (till I implement dave_den's suggestion about templates)
23:35 hunter UtahDave: Any ideas or am I just barking mad?
23:35 gnu-man1 joined #salt
23:36 UtahDave hunter: I'm still not quite understanding what you're trying to do.
23:36 UtahDave hunter: that require should work.
23:37 hunter Yes it does - I'm just trying to figure out an appropriate place to put the require. It WORKS wired to that dir - but that dir doesn't need it. I want that base_setup to itself somehow drag in that require.
23:38 hunter I need another .... state? to have that require statement. I just can't think of an appropriate one
23:38 UtahDave have you looked at using a    require_in   ?
23:38 UtahDave it's the inverse of a   require
23:38 [diecast] joined #salt
23:39 Vye joined #salt
23:44 hunter UtahDave: what would that look like?
23:45 hunter (require_in has always seemed ... backwards to me - saying "this thing requires me" vs "I require this other thing here"
23:45 hunter )
23:47 mgw joined #salt
23:47 hunter Thanks for the help by the way.
23:49 clearclaw joined #salt
23:51 hunter Anyone have opinions on this setup: http://www.saltstat.es/posts/environment-based-clusters.html
23:56 clearclaw joined #salt

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