Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-04-06

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

All times shown according to UTC.

Time Nick Message
00:02 Linz joined #salt
00:08 gladiatr joined #salt
00:13 ndrei joined #salt
00:17 faldridge joined #salt
00:19 DaveQB joined #salt
00:20 garthk joined #salt
00:21 ewong_ joined #salt
00:25 MTecknology what does sls stand for?
00:32 AdamSewell joined #salt
00:35 garthk joined #salt
00:35 bhosmer joined #salt
00:38 delkins SaLt State
00:40 yomilk joined #salt
00:40 TyrfingMjolnir joined #salt
00:42 pydanny joined #salt
00:49 garthk joined #salt
00:51 bhosmer joined #salt
00:52 faldridge joined #salt
00:53 garthk_ joined #salt
00:54 TyrfingMjolnir joined #salt
00:56 Linz joined #salt
01:03 faldridge joined #salt
01:05 diegows joined #salt
01:21 snuffeluffegus joined #salt
01:22 mgw joined #salt
01:22 taion809 joined #salt
01:23 ckao joined #salt
01:25 gladiatr what's the correct jinja phraseology to test for the presence of a pillar variable in the pillar dict?
01:30 srage joined #salt
01:46 ilbot3 joined #salt
01:46 Topic for #salt is now Welcome to #salt | 2014.1.1 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:50 Linz joined #salt
01:50 TyrfingMjolnir joined #salt
01:53 srage_ joined #salt
02:12 mgw joined #salt
02:26 kermit joined #salt
02:34 mway joined #salt
02:42 joehillen joined #salt
02:44 Linz joined #salt
02:47 taion809 joined #salt
02:55 robinsmidsrod joined #salt
03:11 tyler-baker joined #salt
03:12 oeuftete joined #salt
03:14 pfallenop joined #salt
03:20 JonGretar joined #salt
03:38 Linz joined #salt
03:45 ipalreadytaken joined #salt
03:46 zz_Cidan joined #salt
04:07 wedgie_ joined #salt
04:20 MTecknology delkins: finally read that - thanks
04:21 joehoyle joined #salt
04:29 AdamSewell joined #salt
04:30 TyrfingMjolnir joined #salt
04:32 Linz joined #salt
04:49 jalbretsen joined #salt
05:01 sroegner_ joined #salt
05:13 rollietikes joined #salt
05:26 Linz joined #salt
05:45 travisfischer joined #salt
06:03 ravibhure joined #salt
06:21 bhosmer joined #salt
06:21 Linz joined #salt
06:32 yomilk joined #salt
06:37 viod1 joined #salt
06:50 sroegner_ joined #salt
07:14 tyler-baker left #salt
07:15 Linz joined #salt
08:09 Linz joined #salt
08:11 CeBe joined #salt
08:20 nn0101 joined #salt
08:32 easylancer joined #salt
08:39 sroegner_ joined #salt
08:43 yomilk joined #salt
08:43 srijan4 joined #salt
08:43 yomilk_ joined #salt
08:51 johtso joined #salt
08:53 easylancer Hello to all
08:56 easylancer Can anyone assist me as to why the require of http://stackoverflow.com/questions/19212157/salt-stack-vagrant-php-5-5-on-ubuntu-12-04 wouldn't resolve for me, even though I have them installed
08:57 easylancer I am using https://github.com/saltstack-formulas/php-formula to install the requires
08:59 xt joined #salt
09:00 babilen easylancer: You probably want to set "fromrepo" in there (cf. http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html )
09:01 babilen easylancer: As you are using the formula you'd have to "extend" that or simply use your own states to begin with (to make it obvious that you are installing a non-default, unsupported (?) php version on precise)
09:02 easylancer babilen: but isnt that what the answer on stackoverflow is doing?
09:02 xt joined #salt
09:03 babilen easylancer: No, I don't see any "fromrepo" in there .. let me check again.
09:03 babilen easylancer: No, it's not being used? Did you alter that paste?
09:03 Linz joined #salt
09:03 babilen s/?/!/
09:04 easylancer babilen when I run salt it actually installs php5_ppa its just not running the service because of the requires
09:06 babilen easylancer: Because that PPA doesn't contain the entire PHP stack? I am not very fond of PPAs and have no idea what packages that particular one contains, but could you provide more information about "because of the requires" ?
09:06 easylancer babilen I am installing the requires from the saltstack-formulas/php-formula repo, but its still telling me all those requires aren't installed
09:07 easylancer babilen require: -pkg: php5-mcrypt and all the others in that list
09:07 babilen easylancer: They might be uninstallable because you've installed a non-default php5 version. Could you log into a minion and show me the output of "apt-cache policy php-fpm" and "apt-cache show php-fpm" please?
09:07 babilen But then -fpm should be built from the same source package :-/
09:08 easylancer babilen -fpm is the only one that resolves correctly, all the others in that require list doesnt
09:09 babilen easylancer: Okay, then show that output for one of the others and please also paste your actual output somewhere. It's hard to work on this without actual error messages :)
09:09 easylancer babilen I am using this same ppa with Puppet and it works correctly, but somehow it just doesnt with Salt
09:09 babilen okay
09:09 easylancer babilen ok will do, gimmie a minute, booting up my VM
09:13 anuvrat joined #salt
09:21 easylancer babilen here is the output from trying to install the PPA https://gist.github.com/silentworks/18852d40a819522072f3
09:22 easylancer babilen when I run any of the apt-cache commands I get Unable to locate package php-fpm
09:22 babilen it's php5-fpm
09:23 babilen easylancer: And what is the state you use to install that? Are you sure that you include the requisites?
09:23 babilen I mean it looks as if you forgot to define/install them (and salt can't find them nor execute them before php5-fpm)
09:24 babilen And how'd you get the "executing command ..." debug output, I like that!
09:25 easylancer babilen I am calling sudo salt-call --local state.sls php_latest
09:25 easylancer my sls is called php_latest
09:25 babilen ah, okay
09:25 easylancer I also have another called php_latest.extensions where I include all the formulas from the php-formulas repo
09:26 babilen And you include all of them in php_latest? (they aren't known otherwise)
09:27 easylancer babilen no I run them before that
09:27 babilen Mind pasting your actual SLS files? It's always so much easier to work on something if you don't have to come up with the "real state" in your mind (and getting it wrong, due to wrong assumptions)
09:27 easylancer this is the extensions.sls https://gist.github.com/silentworks/10003565
09:27 babilen easylancer: Well, that won't do. You have to include them there (think of state.highstate) as you cannot refer to them in there if you don't
09:27 easylancer and this is my php.sls https://gist.github.com/silentworks/10003572
09:28 babilen yes, include the states that define php5-* in the latter one
09:29 easylancer babilen I thought the require would look on the system to see if these modules were installed, didnt realise they need to be included in the sls file
09:29 babilen Or best, simply copy the entirety of extensions in php
09:29 babilen *into
09:29 babilen easylancer: Think of it as an "import" in python. Just because it is available it isn't necessarily available in the current module/state yet.
09:30 easylancer babilen that make sense now
09:30 babilen Does it also solve the issue?
09:30 babilen :)
09:30 easylancer babilen let me try
09:33 easylancer babilen ok that seem to fix the require issue, now I am having issue with this line https://gist.github.com/silentworks/10003572#file-php-yaml-L13 https://gist.github.com/silentworks/10003621
09:33 babilen heh
09:34 easylancer babilen I just checked for that file and it does exist in that location
09:34 babilen Yes, I don't see that state anywhere in that SLS. Where do you define *that* ? You really have to include all SLS "modules" from which you want to use/require/... states
09:35 babilen It's not about the file itself, but about a state of that name. You need a "/etc/php5/fpm/pool.d/www.conf \n  file.managed: \n ..." state somewhere
09:35 easylancer babilen but isnt that just watching a file for changes?
09:36 easylancer babilen ah so the lines below which I commented out
09:36 babilen You are *always* watching or requiring states. The state might be file.managed which will have to exist on the filesystem for that state to succeed
09:36 babilen exactly
09:36 babilen Ah, right .. there it is .. commented :)
09:37 easylancer babilen the reason I commented it out is because I dont actually have a packages/php/www.conf file in my salt setup
09:37 babilen So, why do you care about it or want to watch it?
09:37 anuvrat joined #salt
09:39 easylancer babilen just copied it from StackOverflow answer
09:39 easylancer babilen great stuff, I removed it and all success now
09:40 babilen yay!
09:40 easylancer babilen but still Unable to locate package php-fpm when I run apt-cache show php-fpm
09:40 babilen php5-fpm
09:40 easylancer ah, silly me
09:40 easylancer thanks for all your help
09:40 babilen You are welcome, enjoy!
09:40 easylancer I spent so much time yesterday trying to figure this out
09:41 easylancer but now I know that states are like python import that helps alot
09:41 babilen Sometimes all it needs is either a rubber duck to explain your problem to or another pair of eyes
09:41 babilen easylancer: I am not sure if they really behave that way .. I just wanted to use an analogy, but don't rely on it too much
09:42 easylancer babilen ok
09:43 joehoyle_ joined #salt
09:48 easylancer babilen is there any reason why I would need to define some pillar data even though the config says {{ site.ssl or False }}
09:48 easylancer babilen doesn't this mean that if its not defined in my pillar data file it should resolve to False
09:48 easylancer babilen I seem to have to be setting ssl: False in my pillar data file
09:53 babilen Hmm, might want to turn that into a {% if ssl in site %}
09:53 babilen But I'll be afk for a while now. Until later! :)
09:53 easylancer afk?
09:57 Linz joined #salt
09:58 babilen "away from keyboard"
09:58 easylancer ah ok
10:21 xt left #salt
10:27 bhosmer joined #salt
10:28 sroegner_ joined #salt
10:29 viod1 joined #salt
10:43 joehoyle joined #salt
10:51 Linz joined #salt
10:53 quickdry21 joined #salt
11:03 joehoyle joined #salt
11:26 joehoyle joined #salt
11:45 Linz joined #salt
12:13 johtso joined #salt
12:17 sroegner_ joined #salt
12:19 ndrei joined #salt
12:34 Ryan_Lane joined #salt
12:38 taion809 joined #salt
12:40 Linz joined #salt
12:52 Gareth_ joined #salt
13:03 vbabiy joined #salt
13:31 sroegner_ joined #salt
13:34 Linz joined #salt
13:38 Ryan_Lane joined #salt
13:47 ndrei joined #salt
13:57 Nazzy joined #salt
13:57 xunil joined #salt
14:00 faldridge joined #salt
14:28 Linz joined #salt
14:30 faldridge joined #salt
14:38 AdamSewell joined #salt
14:38 ndrei joined #salt
14:38 gladiatr joined #salt
14:39 Ryan_Lane joined #salt
14:43 elfixit joined #salt
14:51 ajprog_laptop joined #salt
14:52 z3uS joined #salt
15:08 toddnni joined #salt
15:15 joehoyle joined #salt
15:22 Linz joined #salt
15:36 babilen I am trying to make it easy to switch between two different NFS mounts and am about to define two states that both require mount.unmounted -- I don't like this because it would cycle the mount every time the state is being run. How could I do this in such a way that it's only unmounted (and removed from /etc/fstab ) if the mount would change?
15:36 srage joined #salt
15:38 babilen I essentially want to be able to change "nfs.foo1" to "nfs.foo2" which should unmount the filesystem and remove the entries for foo1 from fstab and then add it for foo2 and mount that. (poor mans failover, drdb might be introduced at one point)
15:39 srage__ joined #salt
15:39 babilen Or would that be the automatic behaviour if I define different states for the same mountpoint?
15:39 Ryan_Lane joined #salt
15:40 babilen Lets see :-/
15:44 babilen No, that doesn't work as it does not remove the previous entry.
15:52 babilen Pity that mount.unmounted doesn't take the device argument and only unmounts it if that matches.
15:57 babilen And onlyif only exists for cmd.* ... mounts are not in grains ... hmm :-/
15:59 gladiatr babilen, how's your python?  I wrote my first couple custom grains a few days ago--it is pretty straight forward: gather data, put data into a dict in whatever organization makes sense for what you need, return dict
15:59 gladiatr <- pretty new to salt
15:59 babilen My Python is excellent
15:59 babilen I'm just not sure if this would be the best approach, but due to being fairly new to salt myself I haven't yet found a better solution
16:00 babilen If only every state would expose it's checks and actions and allow users to hook into that
16:00 gladiatr I feel ya there.
16:01 babilen If mounts were in grains I could write some jinja that includes the "unmount this" state only if it would unmount/remove the right one at least ..
16:01 babilen But then there might be a better approach to this that I just can't think of.
16:01 babilen So, how'd I go about this custom grain?
16:02 gladiatr Depends on your time frame.  I've got some deadlines for getting things automated--figure there will be time for refactoring later as my knowledge of salt matures and as features/capabilities are added/fixed/etc
16:02 gladiatr sec
16:04 babilen Another approach would probably to include some file.replace to ensure the fstab is in order and then to rely on mount.mounted to remount the filesystem if it's check fails (i.e. mtab doesn't match its expectation)
16:05 gladiatr http://pastebin.com/VW9bqypD
16:05 babilen I think I'll try that first, but I'd prefer the grain approach (if mounts were in grains by default)
16:05 gladiatr drop something like that into /srv/salt/base/_grains
16:05 babilen gladiatr: Thank you! And I have to deploy that on every minion and adapt the minion config?
16:05 gladiatr then do a salt '*' saltutil.grains_sync
16:05 babilen Ah
16:06 gladiatr actually, no.  running the grains_sync bit takes care of deploying it
16:06 gladiatr and as long as its a part of your fileserver, it'll travel with you
16:06 babilen I'm using GitFS ... does that mean that I just have to create $ENV/_grains in there to get additional grains in that environment?
16:07 gladiatr Pretty sure it'll work identically
16:07 babilen ack
16:07 gladiatr I haven't worked with gitfs yet, so I can't 100% confirm it
16:07 babilen Okay, merci -- I'll play with it and see which approach I like more.
16:08 gladiatr cool.  have fun! :)
16:08 babilen At least I have something to work on now :D
16:08 gladiatr glad I could help!
16:08 Whissi joined #salt
16:09 babilen I'd really like to treat states more like functions and be able to easily wrap/decorate them ... or at least have hooks to inject additonional logic/commands into the "default" actions
16:10 gladiatr babilen, I've seen some threads about that on the mailing list.  Though I haven't delved into it yet, you can actually express states using python which exposes more of that sort of thing in the state definitions themselves.
16:11 gladiatr might want to do some searches there--not sure if there are any answers, per se, but it is a place to start.
16:11 joehoyle joined #salt
16:12 babilen ack
16:13 twiedenbein joined #salt
16:15 TyrfingMjolnir joined #salt
16:16 Linz joined #salt
16:18 joehoyle joined #salt
16:24 johtso joined #salt
16:30 TyrfingMjolnir joined #salt
16:34 joehoyle_ joined #salt
16:44 MedicalJaneParis joined #salt
16:47 yomilk joined #salt
16:57 ndrei joined #salt
16:59 naiyte joined #salt
17:01 abe_music joined #salt
17:04 joehoyle joined #salt
17:10 diegows joined #salt
17:10 Linz joined #salt
17:28 dccc joined #salt
17:29 ndrei joined #salt
17:30 travisfischer joined #salt
17:47 joehoyle joined #salt
18:01 schristensen joined #salt
18:04 Linz joined #salt
18:27 gladiatr_ joined #salt
18:39 wedgie joined #salt
18:40 Nazca joined #salt
18:40 Nazca joined #salt
18:41 joehoyle joined #salt
18:44 joehoyle_ joined #salt
18:58 Linz joined #salt
19:05 joehoyle joined #salt
19:05 harobed joined #salt
19:06 viq Hm, I'm running salt tests on OpenBSD and seeing a lot of failures, both on 0.17.4 and 2014.1.1
19:16 taion809 joined #salt
19:30 travisfischer joined #salt
19:37 __number5__ joined #salt
19:43 mgw joined #salt
19:48 joehoyle_ joined #salt
19:49 xmj viq: openbsd has a strong track record of making tests fail because of sloppy portability
19:49 xmj (not of obsd but of other people's software :-)
19:50 viq :P
19:50 * viq is working on updating the port to 2014.1.1
19:52 srage joined #salt
19:53 travisfischer joined #salt
19:53 Linz joined #salt
19:54 mgw joined #salt
19:56 mgw joined #salt
19:56 xmj viq: don't forget to replace all long time_t's with long long time_ts!
20:02 viq huh, right now I have a problem as it tries to use /usr/local/etc and I can't find anywhere references to this
20:02 xmj viq: PREFIX/etc ?
20:03 viq I'll have to look
20:09 mgw joined #salt
20:22 Nazca joined #salt
20:27 oleg joined #salt
20:29 oleg Hello, guys
20:29 oleg http://pastebin.com/n7aZibks
20:29 oleg What the problem here?
20:31 xunil joined #salt
20:34 bhosmer joined #salt
20:39 bhosmer_ joined #salt
20:40 Shish_ joined #salt
20:40 tyler-baker_ joined #salt
20:41 wedgie_ joined #salt
20:41 kzx1 joined #salt
20:41 pviktori joined #salt
20:42 oleg__ joined #salt
20:43 oleg__ So, another question
20:43 oleg__ How to remove all files from directory extend which I listed?
20:43 tedski- joined #salt
20:43 ejo joined #salt
20:43 oleg__ And how to restart service in any of following condition: one file added or some file removed
20:43 sijis_ joined #salt
20:43 dopp_ joined #salt
20:43 oleg__ I need this for configure dnscache
20:44 JordanRi1ke joined #salt
20:44 taion809_ joined #salt
20:44 zach__ joined #salt
20:44 sroegner__ joined #salt
20:44 Valda joined #salt
20:46 magenbrot_ joined #salt
20:46 schristensen_ joined #salt
20:47 yomilk joined #salt
20:47 Linz joined #salt
20:47 djinni`_ joined #salt
20:48 viq oleg__: file.recurse?
20:48 jeffrubic joined #salt
20:49 sashka_ua joined #salt
20:49 zeroC joined #salt
20:54 srage joined #salt
20:55 grosjean joined #salt
20:55 jmreicha joined #salt
20:55 austin987 joined #salt
20:56 n0arch joined #salt
20:56 torrancew joined #salt
20:56 ckao joined #salt
20:58 bhosmer joined #salt
21:16 torrancew joined #salt
21:22 philipsd6 joined #salt
21:27 cewood joined #salt
21:34 yomilk joined #salt
21:41 Linz joined #salt
21:41 Ryan_Lane joined #salt
21:48 AdamSewell joined #salt
21:49 DaveQB joined #salt
21:53 AdamSewell I'm running salt 2014.1.0 which I understand has salt cloud built in now, but when I run salt-cloud --version, i'm shown 0.8.9. Is that correct?
22:02 travisfischer joined #salt
22:02 aleszoulek joined #salt
22:05 oz_akan_ joined #salt
22:07 oz_akan_ joined #salt
22:10 snuffeluffegus joined #salt
22:14 sashka_ua joined #salt
22:23 ajw0100 joined #salt
22:26 joehoyle joined #salt
22:33 Sypher joined #salt
22:35 Linz joined #salt
22:58 yomilk joined #salt
23:01 harobed_ joined #salt
23:05 faldridge joined #salt
23:10 harobed joined #salt
23:13 Luke joined #salt
23:18 srage joined #salt
23:20 pfallenop joined #salt
23:21 yomilk joined #salt
23:29 Linz joined #salt
23:38 interenat joined #salt
23:38 diegows joined #salt
23:43 davidone joined #salt
23:44 garthk joined #salt
23:47 jeremyBass joined #salt
23:47 jeremyBass left #salt
23:47 srage_ joined #salt
23:48 linjan joined #salt
23:49 taion809 joined #salt
23:49 homelinen joined #salt
23:57 yomilk_ joined #salt

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