Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-08-26

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

All times shown according to UTC.

Time Nick Message
00:06 dthom91 joined #salt
00:07 pewpewarrows joined #salt
00:13 StDiluted joined #salt
00:14 alekibango joined #salt
00:15 NotreDev joined #salt
00:15 NotreDev Can someone help me understand what this means? "The Syndic interface is a special passthrough minion, it is run on a master and connects to another master, then the master that the Syndic minion is listening to can control the minions attached to the master running the syndic."
00:17 NotreDev Is the syndic the intermediate server or the root master?
00:17 NotreDev I'm imagining this as a binary tree -
00:28 SEJeff_work NotreDev, Imagine a tier of submasters
00:28 SEJeff_work You have a "master of masters"
00:28 SEJeff_work Then you can have a master (a syndic) that controls only a small subset of minions
00:29 SEJeff_work the master of masters controls the syndic as well
00:29 SEJeff_work so if you run commands on the syndic, it only executes on minions connected to it
00:29 SEJeff_work if you run commands from the master of masters, it runs commands on everything
00:29 SEJeff_work It allows a tiered setup
00:31 NotreDev Anyway to allow for multiple salt masters on one server? That is, if we have a number of properties we're trying to manage for clients?
00:31 SEJeff_work NotreDev, Sure, just on different ports
00:31 SEJeff_work It would be a bit odd and you might need to have custom configs to go to different locations
00:31 SEJeff_work I think it would be a bit odd to setup, but would totally work
00:31 NotreDev SEJeff_work: that's kinda what i was thinking
00:31 NotreDev thanks :)
00:32 SEJeff_work noprob :)
00:32 druonysus joined #salt
00:34 pewpewarrows joined #salt
00:52 LucasCozy joined #salt
00:54 krissaxton joined #salt
01:02 littleidea joined #salt
01:05 iquaba joined #salt
01:07 Jahkeup joined #salt
01:08 mgw joined #salt
01:14 kstaken joined #salt
01:15 jams_ joined #salt
01:16 Nexpro joined #salt
01:16 lsmag joined #salt
01:17 jams_ Is there a way to specify the size of the 'default' ebs attached volume in a salt-cloud profile? I know how to make additional attached volume sizes, but not the default volume..
01:18 lsmag Hello! I'm still deciding between AWS and DigitalOcean for a webservice. The only thing we really enjoy in Amazon's cloud is auto-scaling feature. A friend of mine told me that salt-cloud could solve this problem, but I found anything in the docs. Is it possible? Auto-scaling in digitalOcean with salt-cloud?
01:20 liuyq joined #salt
01:20 jams_ lsmag: look at salt's reactor system: http://docs.saltstack.com/topics/reactor/index.html
01:22 lsmag It doesn't need salt-cloud, as I see, does it?
01:22 liuyq joined #salt
01:24 kleinishere joined #salt
01:24 jams_ Looks like it is just salt-master based. You could rig up some salt-cloud trigger to create a node. I'm looking to do that next in my project, you should publish your implementation if you decide on doing it
01:27 lsmag It's just what I was looking for, I' try to make some demos and see what I achieve. Thank you!
01:27 jams_ You have a github I could check back later on?
01:28 lsmag github.com/lucassmagal
01:28 jams_ sweet! good luck
01:30 lsmag The docs about reactors are quite basic, huh?
01:30 lsmag I'm almost sure I'll have much more questions soon
01:32 jams_ hah, i'd say make an attempt and then come back here - I haven't used reactors yet. I'm at salt-master/minion/cloud with publish functions phase.
01:33 lsmag I understand. Well, thank you very much!
01:33 lsmag what's your github, btw?
01:33 Prince_Africanus joined #salt
01:34 jams_ github.com/jeremyll - kinda bare
01:35 kstaken joined #salt
01:36 lsmag so is mine
01:44 malinoff joined #salt
01:46 kleinishere joined #salt
01:53 druonysus joined #salt
01:55 krissaxton joined #salt
01:56 jams1 joined #salt
01:58 jams1 left #salt
01:58 jams1 joined #salt
02:04 LucasCozy joined #salt
02:04 iquaba left #salt
02:04 sixninetynine joined #salt
02:12 aat joined #salt
02:16 littleidea joined #salt
02:19 kstaken joined #salt
02:22 racooper joined #salt
02:24 xl1 joined #salt
02:26 jalbretsen joined #salt
02:36 whit joined #salt
02:55 krissaxton joined #salt
02:59 jeddi joined #salt
03:06 Furao joined #salt
03:07 UtahDave joined #salt
03:13 noob2 joined #salt
03:14 felixhummel joined #salt
03:15 malinoff joined #salt
03:20 noob2 left #salt
03:22 kleinishere joined #salt
03:28 danielbachhuber joined #salt
03:39 Jahkeup joined #salt
03:49 lazyguru joined #salt
03:56 krissaxton joined #salt
04:00 jimallman joined #salt
04:06 Furao joined #salt
04:20 dkubb joined #salt
04:29 dthom91 joined #salt
04:31 idkfa joined #salt
04:32 auser joined #salt
04:36 tseNkiN joined #salt
04:57 krissaxton joined #salt
05:04 malinoff_ joined #salt
05:13 kleinishere joined #salt
05:20 vmdsch joined #salt
05:39 littleidea joined #salt
05:46 matanya joined #salt
05:58 krissaxton joined #salt
06:02 agend joined #salt
06:07 dkubb joined #salt
06:20 bemehow joined #salt
06:21 dthom91 joined #salt
06:22 MrTango joined #salt
06:23 az87c joined #salt
06:23 az87c_ joined #salt
06:26 jhenrypb joined #salt
06:37 ronc joined #salt
06:37 TheCodeAssassin joined #salt
06:51 quinnat joined #salt
06:56 dthom91 joined #salt
06:58 krissaxton joined #salt
07:01 linjan_ joined #salt
07:02 balboah_ joined #salt
07:05 bemehow joined #salt
07:12 kleinishere joined #salt
07:13 qba73 joined #salt
07:17 bhosmer joined #salt
07:18 ronc joined #salt
07:21 jeddi joined #salt
07:22 vaxholm_ joined #salt
07:26 LarsN joined #salt
07:35 LarsN joined #salt
07:36 Xeago joined #salt
07:48 abele joined #salt
07:49 ml_1 joined #salt
07:58 quinnat joined #salt
07:59 krissaxton joined #salt
07:59 kvbik joined #salt
08:00 matanya joined #salt
08:00 matanya joined #salt
08:12 mike25ro joined #salt
08:14 felixhummel joined #salt
08:18 ninkotech joined #salt
08:22 auser joined #salt
08:25 carlos joined #salt
08:26 matanya joined #salt
08:27 qba73 joined #salt
08:32 Nexpro joined #salt
08:43 Spads joined #salt
08:51 matanya_ joined #salt
09:00 krissaxton joined #salt
09:09 bemehow joined #salt
09:17 kleinishere joined #salt
09:17 bemehow_ joined #salt
09:19 yota joined #salt
09:25 Katafalkas joined #salt
09:25 aleszoulek joined #salt
09:26 entil another question came to mind. if I have a postgres state and a raid1 state, what should I put in one state to bind them together? I wouldn't want the postgres state to refer to raid1, because it can be installed without raid1
09:26 entil in the worst case I can do that, but it'd be nice to keep it clean
09:30 bemehow joined #salt
09:30 aleszoulek entil: Yeah. Had the same problem... I think using order: is kindof clean. I mean, keep 0-9 orders for OS/HW provisioning, 10-19 to basic SW and above for the services...
09:30 aleszoulek Or simly keep order: 0 to raid and hi-priority stuff and without order for the rest
09:31 aleszoulek Depends on complexity
09:35 jonet joined #salt
09:36 jonet Is there any way I can create a condition in a state file that checks if a package is installed?
09:36 jonet Something like {% if 'mysql-server' in salt['pkg.list_pkgs']() %}?
09:37 entil aleszoulek: I don't understand, is that the new feature of automagically ordering?
09:37 entil aleszoulek: I'm on 0.15.3 and can't upgrade yet :/
09:37 entil so I need something with require and require_in to set the dependencies up. preferrably this would be a dummy state but I don't know if that's possible
09:37 entil come to think of it, cmd.run: ls might be enough :D
09:39 aleszoulek entil: "order: " option is there already in 0.15.3
09:40 aleszoulek So basicaly any state can have order. Order can be numeric value, "last" or missing..
09:41 aleszoulek "require" has always higher priority, but after that, first the states with numerical order are executed (sorted by the number), then states without order and after that states with "order: last"
09:42 aleszoulek entil: http://docs.saltstack.com/ref/states/ordering.html#the-order-option
09:44 entil oh ok
09:44 entil I missed that, thanks
09:55 bemehow joined #salt
09:57 aleszoulek np
09:57 entil I found a bug in my postgres state that needs to be resolved first :)
09:58 entil the default encoding is sql_ascii, probably a bug when postgres doesn't explicitly require the locale state
10:01 krissaxton joined #salt
10:13 nielsbusch joined #salt
10:24 jinnko joined #salt
10:27 whiskybar joined #salt
10:40 giantlock joined #salt
11:01 krissaxton joined #salt
11:02 sgviking joined #salt
11:11 MaxK joined #salt
11:14 logix812 joined #salt
11:18 gmoro joined #salt
11:18 qba73 joined #salt
11:22 kleinishere joined #salt
11:26 oz_akan_ joined #salt
11:38 blee_ joined #salt
11:39 mstan joined #salt
11:42 lemsto joined #salt
11:46 Xeago joined #salt
11:54 ml_11 joined #salt
11:57 aat joined #salt
12:01 jonet Could anyone point out exactly what is wrong with this state?
12:01 jonet https://gist.github.com/wolfhechel/fb0bbd44791fc5de3b5a
12:01 jonet I'm trying to generate a random mysql root password and set it before installing mysql-server in Debian
12:02 krissaxton joined #salt
12:05 carlos joined #salt
12:06 bemehow joined #salt
12:06 az87c joined #salt
12:07 az87c_ joined #salt
12:12 scofflaw joined #salt
12:12 entil afraid I can't point to an error
12:12 entil except for what it obviously says, there's a missing key
12:13 jonet Yeah but what it complains on is a completly legit syntax usage, so I don't quite get what it's all about...
12:13 entil or sorry, it's not necessarily a missing, I dunno, I never touch mysql
12:13 entil I'm screwed with raid1, it says State raid.present found in sls raid1 is unavailable, and nfi ytf
12:14 bhosmer joined #salt
12:16 gildegoma joined #salt
12:19 aat joined #salt
12:20 bemehow joined #salt
12:21 entil actually the "is unavailable" errors seem to be irrelevant O_O
12:24 waverider joined #salt
12:30 LucasCozy joined #salt
12:33 bhosmer joined #salt
12:35 aat joined #salt
12:37 austin987 joined #salt
12:37 jams1 joined #salt
12:38 mstan jonet, the error is "'dict object' has no attribute 'mysql_root_password'"
12:39 mstan the only place mysql_root_password is used is : "{{ grains['mysql_root_password'] }}
12:39 mstan and grains is just a dict
12:39 mstan so it's trying to say : "your grains do not have the  'mysql_root_password ' key"
12:39 oz_akan_ joined #salt
12:40 jonet Yeah I figured as much by now, however it should require the grain to be present, as stated in the same state file...
12:41 mstan what does "require the grain to be present" mean ? is another state using the mysql_root_password grain ?
12:42 mstan sorry, missed the require
12:43 mstan but I don't think the order of evaluation is the one you expect
12:43 jams1 Is there a way to specify the size of the 'default' ebs attached volume in a salt-cloud profile? I know how to make additional attached volume sizes, but not the default volume..
12:43 mstan since the template is first processed by jinja
12:43 TJ1980 joined #salt
12:43 mstan which calls grains['mysql_root_password'] and gives that error
12:44 jeddi i'm trying to maintain my ordering with requires / unless's .. anything that gets more complex than that warrants a .sh script that i push out and run, and/or a different tool (eg. fabric) that's geared up for deploying stuff rather than establishing and maintaining a state.
12:44 mstan before salt parses the state and checks the required grain
12:46 cron0 joined #salt
12:47 oz_akan_ joined #salt
12:48 mstan I think using grains.get('mysql_root_password') will be enough for your case, but not something I would advise
12:49 mstan 'mysql_root_password' sounds like a variable to store in a pillar
12:51 jeddi {much nodding}  passwords go into pillars.   why are you setting root mysql passwords though?
12:51 mgw joined #salt
12:54 krissaxton joined #salt
12:54 austin987 joined #salt
12:57 juicer2 joined #salt
13:00 anteaya joined #salt
13:06 Gifflen joined #salt
13:07 unicoletti_ joined #salt
13:08 entil seems like it varies a lot whether or not the "is unavailable" matters
13:09 entil now extfs.mkfs is not found, after busting my balls with partition.mkfs not working
13:09 zooz joined #salt
13:09 entil what does it even mean if something is "unavailable"?
13:10 MTecknology I have a particular minion that comes up fine and great. It connects fine. In netstat I see the connection to :4505 as ESTABLISHED, but then some extra ports pop open and it's only TIME_WAIT. Apparently one TIME_WAIT for each process that tried to run. The /var/cache/salt/minion/proc/<file>'s are all completely empty. If I try to run test.ping from the master I get that the minion didn't return,
13:10 MTecknology but I get an empty proc file, and a bit later another empty proc will be created. I never see on the master that the minion returned. Any magical thoughts about what's going on?
13:11 NotreDev joined #salt
13:11 pdayton joined #salt
13:12 MTecknology .... duh; file system used up
13:12 nielsbusch joined #salt
13:13 MTecknology 3.4GB of samba logs...
13:15 kenbolton joined #salt
13:15 bhosmer joined #salt
13:16 ninkotech_ joined #salt
13:17 jeffasinger joined #salt
13:19 xinkeT joined #salt
13:19 racooper joined #salt
13:19 StDiluted joined #salt
13:22 entil I tried setting a traceback.print_stack() and even assert 0 into the extfs module for mkfs, and none of that code gets hit, because it's "unavailable"
13:23 puppet joined #salt
13:24 entil none of this makes any sense
13:26 kleinishere joined #salt
13:27 TJ1980 joined #salt
13:29 toastedpenguin joined #salt
13:31 entil I added a debug into loader.py to see if funcs.has_key('extfs.mkfs') and now it's all fucked, sometimes it's True and more often False
13:32 TJ1980 joined #salt
13:33 entil but it's a built-in ffs
13:35 SEJeff_work entil, General python critique, not salt related. Never use has_key(), it is deprecated. Use the "in" operator ie: if 'extfs.mkfs. in funcs:
13:37 entil deprecated irl in python3 or something? works fine and I prefer how explicit it is
13:37 SEJeff_work entil, Deprecated in python3, but it is in pep8
13:37 Corey HOLY CRAP
13:37 entil but that's irrelevant as to salt screwing something up with reporting different results for whether or not the built-in function extfs.mkfs is available or not
13:37 Corey The fact that we're discussing a salt function that calls extfs.mkfs isn't horrifying to anyone else? :-)
13:37 entil and consistently dying
13:38 entil Corey: why would it be? it's kind of hard to use a device for file storage without a file system
13:38 entil soon I'll make it a cmd.wait or something because I've wasted fscking (not the executable) hours on this
13:38 Corey entil: Oh, I'm not disputing THAT any.
13:38 whit joined #salt
13:38 entil tried partition.mkfs as well, with similiar fails
13:39 Corey entil: My point is that "laying down a filesystem at the configuration management stage" strikes me as the Wrong Thing.
13:39 Corey That's a provisioning step in my world. While i can think of weird edge cases, they're not THAT common...
13:39 Corey SEJeff_work: Weigh in here, I'd appreciate your input. :-)
13:40 SEJeff_work entil, http://docs.python.org/3.1/whatsnew/3.0.html#builtins it is removed in py 3.x. Also for what it's worth, there is a micro-micro speed improvement as function calls are somewhat expensive in python
13:40 entil never tried any of the provisioning tools and I'm too busy to go there. our salt/aws setup is generally nice and deals with a lot of the provisioning stuff, it's just shit like this that randomly doesn't work that annoys me
13:40 SEJeff_work entil, What is your use case, what exactly are you trying to do? Do you mount some block device and then format it after you've got it up and running?
13:41 entil SEJeff_work: I have this raid1 state, which works, and it creates a /dev/md0 using raid.present()
13:41 SEJeff_work I tend to lean towards what Corey is saying and use a real provisioning tool like Cobbler for that, however, I don't do "cloud" stuff and am a bare metal kind of guy, so can't speak at all for cloud environments
13:41 ipmb joined #salt
13:41 SEJeff_work entil, How are your hosts provisioned? Do you not use preseed / kickstart? Do you have some ami or something?
13:41 entil I'd need a file system, for which I tried parted.mkfs(), partition.mkfs(), and extfs.mkfs() - none which were "available"
13:41 SEJeff_work entil, Lets look at the docs, have you tried that yet?
13:42 entil so I took to putting debug statements in salt's loader.py to see ytf it wouldn't be available, and it variably returns True or False and the execution fails every time
13:42 entil SEJeff_work: I have tried like crazy, eg. http://docs.saltstack.com/ref/modules/all/salt.modules.extfs.html
13:42 SEJeff_work entil, If you start the minion in debug mode, it tells you everything it loads
13:42 ggoZ joined #salt
13:42 SEJeff_work entil, Ok so that is the module
13:42 SEJeff_work modules are not the same as states
13:42 SEJeff_work You're using it in a state file, therefore you need a state
13:42 SEJeff_work Lets see if one exists
13:43 SEJeff_work entil, http://docs.saltstack.com/ref/states/all/ it does not
13:43 entil oh whoah
13:43 entil mind=blown
13:43 SEJeff_work entil, So... you can still do this
13:43 entil I thought the modules map to states
13:43 SEJeff_work Not always, no
13:43 entil yes. cmd.wait: -name: "mkfs"
13:43 SEJeff_work modules are for 1 off commands
13:44 SEJeff_work states are for enforcing a given state of a system
13:44 entil (and I sorta appreciate the hint about provisioning tools, but I really don't need to go into that. we have an ami that does a lot of that on startup)
13:44 SEJeff_work states often use modules (almost 100%) under the covers, however, they normally have their own logic above and beyond what is in a module
13:44 entil but why does the loader say sometimes True and sometimes False for whether or not 'extfs.mkfs' is in the funcs?
13:44 entil that's still confusing :)
13:45 SEJeff_work entil, Forget the loader, I don't have time to explain it's black magic
13:45 entil ok
13:45 SEJeff_work there is no extfs state
13:45 SEJeff_work there is an extfs module
13:45 entil yeah
13:45 SEJeff_work so when it is loading modules, it will be True, and when it is loading states, it will be False
13:45 entil either I make my own state or call a cmd
13:45 SEJeff_work hence your confusion
13:45 entil thanks for that
13:45 SEJeff_work entil, Actually, here is something that will also blow your mind
13:45 SEJeff_work from within a state file, you can call any arbitrary module
13:46 entil :O
13:46 SEJeff_work in a state file put this: {{ salt['cmd.run']('date > /tmp/date-wtf.txt') }}
13:46 SEJeff_work And that will do exactly what you think it will do
13:46 SEJeff_work any output that command returns to stdout will be what replaces {{ ... }}
13:46 mattmtl joined #salt
13:46 entil the raid stuff is actually in pydsl, so that would probably be __salt__['cmd.run']('mkfs.foo') yeah?
13:47 entil I only tried yaml as well, to see if that's the fail
13:47 SEJeff_work entil, yaml / pydsl / mako / etc
13:47 SEJeff_work Those are renderers
13:47 entil and I could also call __salt__['extfs.mkfs']('/dev/md0', 'ext4)
13:47 SEJeff_work they have 0 effect on what is available and not available
13:47 entil without the typo
13:47 SEJeff_work yes
13:48 entil but calling that will be what kind of a state?
13:48 p3rror joined #salt
13:48 entil I mean, in pydsl I can execute any code I want, but this makes it now impossible to require it somewhere else?
13:48 SEJeff_work entil, You could also do: cmd.run ...
13:48 entil or is there a state for "general module call"
13:48 SEJeff_work unless: [ -f /dev/md0 ]
13:49 SEJeff_work entil, You don't get it I don't think
13:49 SEJeff_work In a state file you can just do: {{ salt['cmd.run']('whoami') }}
13:49 entil yeah, cmd.run and friends are real states, that can be required, but if I wanted to call mkfs through the module, that won't be a state?
13:49 SEJeff_work that doesn't call a state
13:49 SEJeff_work that calls the cmd.run module
13:49 SEJeff_work It will be a module executed via a state file
13:49 SEJeff_work I need to go do some $real_job work though
13:50 SEJeff_work I hope this answered your questions. I've provided 2 different ways to solve your problems :)
13:50 entil ah, the {{}} thing of yours replaces content as any other rendered variable
13:50 entil so if I did {{ salt['extfs.mkfs'] }} I'd get the output into the state file
13:50 SEJeff_work entil, One last thing, try this: {% set date = salt['cmd.run']('date') %}
13:51 SEJeff_work echo {{ date }} >> /tmp/date
13:51 SEJeff_work cmd.run
13:51 SEJeff_work with a : at the end of the first line
13:51 SEJeff_work then it will be obvious
13:51 entil I think I got it now
13:51 entil I'll see how I can apply this, but most likely I'll end up doing a cmd.run state
13:51 entil or whatever cmd.wait
13:51 entil thanks
13:53 SEJeff_work np
13:53 JesseC joined #salt
13:53 littleidea joined #salt
13:55 jams1 joined #salt
13:58 kleinishere joined #salt
13:58 kaptk2 joined #salt
13:59 chortlehoort joined #salt
14:02 austin987 joined #salt
14:02 bhosmer joined #salt
14:03 goodbytes joined #salt
14:03 goodbytes Is there any way to see which salt minions are not responding?
14:04 mike25ro goodbytes: maybe you can run a salt '*' test.ping
14:04 mike25ro and see which one are responding.
14:04 goodbytes mike25ro, yeah, but it will only show those minions that are responding
14:04 mike25ro indeed...
14:05 mike25ro left #salt
14:05 goodbytes I have 39 minions, so I was hoping there was an easier way
14:06 alunduil joined #salt
14:06 bemehow joined #salt
14:07 HaxCore joined #salt
14:07 pdayton joined #salt
14:09 jams1 salt '*' test.ping -v
14:09 crashmag joined #salt
14:10 jams1 will show you nodes that fail to respond back to master
14:10 goodbytes jams1, great thanks! that was exactly what I was looking for! :)
14:10 jams1 I asked the same question months ago so =p
14:11 krissaxton joined #salt
14:11 goodbytes jams1, I've been looking for a way to check this for quite some time now. Just haven't got around to ask the question yet :)
14:12 goodbytes it's a pain comparing it to the list of keys. Especialy if i'm matching on specific grains, etc.
14:13 jams1 yaa
14:14 jams1 hows the 39 minions going? is that all in a private network or in a cloud provider?
14:15 jams1 goodbytes:*
14:15 Kholloway joined #salt
14:16 cedwards use salt-run manage.{up,down} to see which are in that state
14:16 opapo joined #salt
14:19 goodbytes jams1, currently a private network. I run a mix of Solaris and Linux hosts to support our internal infrastructure
14:20 jams1 goodbytes: cool
14:20 goodbytes jams1, have been running salt stack for about a year now. I am maintaining an internal binary solaris package of salt. Had some issues at first when porting to Solaris due to all the dependencies. But working quite well now.
14:21 krissaxton joined #salt
14:21 goodbytes jams1, have been working on implementing an Openstack infrastructure with Salt too, so it will soon be covering more nodes :)
14:22 jams1 goodbytes: cool, been using it for 6 months or so on a django site. Mostly just development vagrant. But I'm spending the next couple weeks deploying to aws and other providers using salt-cloud. Pretty fun software to play with.
14:23 jams1 goodbytes: Ya i want to get into the openstack implementation too.
14:23 goodbytes cool, I haven't tried salt-cloud yet, mostly using it from a provider perspective.
14:26 lemsto1 joined #salt
14:28 pdayton joined #salt
14:32 m_george left #salt
14:32 NotreDev joined #salt
14:33 matanya joined #salt
14:35 alunduil joined #salt
14:36 jalbretsen joined #salt
14:37 chortlehoort joined #salt
14:38 abe_music joined #salt
14:43 jacob_s joined #salt
14:43 teskew joined #salt
14:44 StDiluted joined #salt
14:44 jacob_s_ joined #salt
14:47 littleidea joined #salt
14:48 mgw joined #salt
14:51 danielbachhuber joined #salt
14:52 jpeach joined #salt
14:53 mgw joined #salt
14:53 KennethWilke joined #salt
14:54 ckao joined #salt
14:55 Jahkeup joined #salt
15:02 whit joined #salt
15:08 jacob_s_ Is the salt fileserver supported on windows minions?
15:10 lemsto joined #salt
15:13 StDiluted morning all
15:13 StDiluted dave_den are you here?
15:15 SunSparc joined #salt
15:15 StDiluted I'm having some trouble getting the right output into a text file using an event trigger. it works with a regular file.append command, but it appears that cmd.file.append expects different arguments than a file.append state.
15:18 whit joined #salt
15:21 carlos joined #salt
15:21 kstaken joined #salt
15:22 krissaxton joined #salt
15:23 forrest joined #salt
15:28 logix812 joined #salt
15:31 chrisgilmerproj joined #salt
15:32 NotreDev joined #salt
15:32 mwillhite joined #salt
15:36 unicoletti_ left #salt
15:38 devinus joined #salt
15:43 lineman60 joined #salt
15:46 UtahDave joined #salt
15:47 bhosmer joined #salt
15:50 StDiluted Anyone working with events, triggers, etc?
15:51 conan_the_destro joined #salt
15:55 StDiluted hey UtahDave
15:58 dthom91 joined #salt
16:01 kleinishere joined #salt
16:10 blee joined #salt
16:10 bemehow_ joined #salt
16:12 KyleG joined #salt
16:12 KyleG joined #salt
16:17 billh joined #salt
16:17 StDiluted sigh
16:17 [diecast] joined #salt
16:18 [diecast] i'd like to add the salt-contrib/grains/ec2_info.py module into our salt-master… do i just need to drop it in /usr/lib/pymodules/python2.7/salt/grains/ or is there more to ir?
16:18 StDiluted stick it in /srv/salt/_grains
16:19 StDiluted then saltutil.sync_grains
16:19 [diecast] ah
16:19 [diecast] that would be a handy bit to add to the README ;P
16:19 bhosmer_ joined #salt
16:21 StDiluted documentation!? ha!
16:22 krissaxton joined #salt
16:24 UtahDave StDiluted: http://docs.saltstack.com/ref/modules/index.html#modules-are-easy-to-write
16:24 renoirb hey guys, which function would take care to specify an IP address as a state?  I am on Debian based, therefore the rh_ip would not work for me
16:25 StDiluted UtahDave: ;) sarcasm, just another one of the fine services I offer. :)
16:25 [diecast] UtahDave i meant for the README in https://github.com/saltstack/salt-contrib
16:25 UtahDave ah, ok.  :)
16:25 [diecast] i see there is a section for linking at the bottom, but wasn't sure if that was for grains too
16:26 jams1 Who should I contact for salt-cloud questions? And/or where should I publish them?
16:26 UtahDave [diecast]: good point.  Would you mind adding the wording there that you think would be most clear?
16:26 mmilano joined #salt
16:26 [diecast] ok, will do
16:26 UtahDave you can ask them here or on the salt-users mailing list
16:27 jams1 I asked eariler, but never heard back. Let me repost.
16:27 jams1 Is there a way to specify the size of the 'default' ebs attached volume in a salt-cloud profile? I know how to make additional attached volume sizes, but not the default volume..
16:27 StDiluted UtahDave: maybe you know, cmd.file.append appears to work differently than a regular file.append. I can get the right text appended with '- text: |\n "This is the stuff I want in here"' however, with the '- arg:\n - /file/name/here\n - "This is the text" it won't let me use special characters in the text like the " character. Is there a way to pass the - text: | syntax to cmd.file.append as an arg?
16:29 krissaxton joined #salt
16:29 brew1 joined #salt
16:29 StDiluted for reference: https://gist.github.com/dginther/6343491
16:32 robertkeizer joined #salt
16:32 faldridge joined #salt
16:39 juanlittledevil joined #salt
16:41 UtahDave jams1: let me find out for you
16:42 jams1 UtahDave: Thanks Dave
16:44 [diecast] UtahDave PR sent for readme
16:45 [diecast] thanks
16:45 UtahDave thank you, [diecast]!
16:46 ronc joined #salt
16:46 UtahDave jams1: https://github.com/saltstack/salt-cloud/pull/121
16:46 StDiluted dave_den: are you around?
16:46 UtahDave jams1: you should be able to set that in your profile
16:51 jams1 UtahDave: I can create/attach 'additional' volumes, but not the 'default' volume, with my experimentation.
16:52 mgw joined #salt
16:56 UtahDave jams1: Hm. Would you mind opening an issue on that?
16:56 jams1 UtahDave: sure
16:58 jacksontj joined #salt
17:00 jacob_s_ Hey UtahDave, I'm trying to use the cp.get_url command on a salt-minion running on windows and I'm getting a permission denied on the folder I'm trying to download to.
17:00 bemehow joined #salt
17:00 jacob_s_ Is there some special way I can run the salt-minion service that will fix this or do I just need to mess around with windows permissions a bunch.
17:01 [diecast] you'd want to give the user running salt permission to a folder
17:01 UtahDave the salt service should be running as the system user
17:06 carmony joined #salt
17:07 dave_den StDiluted: out of office atm. will be back in ~45min
17:07 JesseC joined #salt
17:08 Ryan_Lane joined #salt
17:08 [diecast] StDiluted UtahDave so i put _grains/ from contrib into my salt_root and did a salt "hostname" saltutil.sync_grains - thought I would see the new grains return from a salt "hostname" grains.items but nothing is there
17:09 [diecast] hmm… one sec… could be this...
17:09 StDiluted thanks dave_den
17:13 efixit joined #salt
17:16 brew1 left #salt
17:16 Nobbl joined #salt
17:16 Brew- joined #salt
17:17 auser joined #salt
17:25 carlos_ joined #salt
17:29 dave_den StDiluted: back. need something?
17:30 krissaxton joined #salt
17:30 [diecast] hmm… still no ec2 data in my grains
17:31 dthom91 joined #salt
17:31 bhosmer_ joined #salt
17:32 druonysus joined #salt
17:33 aat joined #salt
17:34 devinus joined #salt
17:39 cedwards I'm having trouble getting some jinja templating to work
17:39 jacob_s_ The salt user is running as local system. I seem to only have permissions to put files inside the C:\salt\salt-0.16.3.win-amd64 folder.
17:39 cedwards can anyone offer some suggestions on this: http://dpaste.com/1357057/
17:40 krissaxton joined #salt
17:40 cedwards it's primarily the haproxy context that is returning too much. i just need the IP
17:40 mattbarto joined #salt
17:41 MTecknology state.show_highstate > ~/highstate; wc -l highstate  # 1614
17:43 MTecknology I remember when I got started with salt and half of that seemed like a lot. It doesn't seem like a lot anymore...
17:43 MTecknology and that seemed like a lot ... <200 lines
17:43 UtahDave cedwards: add .pop()
17:44 UtahDave cedwards: I have an example here: https://gist.github.com/UtahDave/5217462
17:44 UtahDave MTecknology: wow, that's cool!
17:47 cedwards UtahDave: thanks. that works
17:47 giantlock joined #salt
17:48 amin_ joined #salt
17:52 devinus joined #salt
17:56 jacksontj joined #salt
18:00 MTecknology UtahDave: What would you consider large for state.show_highstate?
18:01 MTecknology This is the one where I can plug a server in, turn it on, and in ~2hr have a server configured for that physical location. :)
18:01 balltongu_ joined #salt
18:02 UtahDave nice
18:03 littleidea joined #salt
18:04 Jahkeup joined #salt
18:04 cedwards MTecknology: what takes ~2hrs?
18:04 Kyle_ joined #salt
18:04 scofflaw_ joined #salt
18:04 MTecknology cedwards: the first state.highstate when it comes online
18:04 Micromus1 joined #salt
18:04 Kraln- joined #salt
18:04 cwarner_ joined #salt
18:04 quantumsummers|c joined #salt
18:04 quantumsummers|c joined #salt
18:05 g3cko joined #salt
18:05 morganfainberg|a joined #salt
18:06 Jahkeup_ joined #salt
18:06 jacksontj joined #salt
18:09 LucasCozy joined #salt
18:10 MTecknology cedwards: I have a reactor for the thing coming on-line. If authentication is rejected (the system has come on-line before at that center but was rebuilt), it checks the system and if ok will remove the old accepted key and ssh in to the box to tell salt-minion to restart. If attempting to authenticate and the key gets hung in unaccepted, then the minion will retry every 10 sec and I just do some
18:10 MTecknology checks to make sure it's the system that I expect and approve it. I also use the reactor to tell the minion to run state.highstate every time the system finishes authentication.
18:11 mackstick joined #salt
18:11 MTecknology There's been a lot of templating done too.
18:11 UForgotten joined #salt
18:12 auser hey all
18:16 qba73 joined #salt
18:17 faldridge joined #salt
18:19 craig_ is there an easy way to exercise the "file server" from a bunch of minions?
18:19 craig_ something simple... we already have a problem with module sync
18:20 renoirb Hey guys, I do not understand something regarding the environment
18:20 renoirb I have a vagrant VM with a '/etc/salt/master' specifying environment: dev
18:21 renoirb and I want to make different customizations in a dev tree that would mirror the normal tree
18:21 renoirb e.g. file_roots: dev: - /srv/salt-dev  - /srv/salt
18:21 renoirb (obviously in proper YAML format)
18:22 renoirb but when I do salt 'master' pillar.items with empty files in dev… I do not see the base.
18:22 renoirb hints?
18:25 UtahDave craig_: I often will just do a file.recurse on something.
18:26 druonysuse joined #salt
18:26 druonysuse joined #salt
18:29 wilkystyle joined #salt
18:29 wilkystyle SEJeff_work:
18:30 wilkystyle SEJeff: I just got a spam DM from you on twitter
18:30 wilkystyle thought you should know
18:32 vaxholm_ joined #salt
18:36 kleinishere joined #salt
18:36 ksalman how would i require a state? for example I'd like to require roles.kvm before kvmstuff is run  https://gist.github.com/ksalman/6344894
18:36 dthom91 joined #salt
18:38 auser joined #salt
18:39 littleidea joined #salt
18:41 krissaxton joined #salt
18:44 jacksontj joined #salt
18:55 linjan__ joined #salt
18:55 dave_den ksalman: just specify the function ID that you want kvmstuff to require from roles.kvm.
18:56 druonysuse joined #salt
18:56 ksalman dave_den: i was hoping i could require a state :P
18:56 ksalman but I guess i can pick one of the end funcions in roles.kvm and that'd require the rest
18:57 dave_den ksalman: you can, but it's more complicated that requiring a function from your roles.kvm file.
18:57 dave_den ksalman: look at stateconf.
18:58 dave_den hey UtahDave, you around?
18:58 whit joined #salt
18:58 MTecknology I just tried explaining salt to a windows admin. All he could do was say that seems really awesome and cool and couldn't really make sense of it.
18:59 gildegoma joined #salt
18:59 jams1 lol
18:59 jams1 *no hope*
19:00 [diecast] so i've put a new _grains in my root, added it to the master.conf, ran a state.highstate on the minion, did a saltutil.sync_grains on the master and the new grains are not showing up
19:00 [diecast] do i need to tell the minion about the grains somehow
19:01 rspectre joined #salt
19:01 rspectre Anyone have experience using the supervisord state?  Salt is saying that it successfully added a service to supervisord on a host, but clearly it hasn't.
19:03 [diecast_ joined #salt
19:08 craig_ UtahDave: thanks!
19:09 craig_ we *think* that our issues may be specific to the file server part
19:09 craig_ and, yes, we are still having problems :(
19:10 jacob_s_ UtahDave, I've been messing around with stuff. It seems like I have the correct permissions for instance if I do cmd.run 'move c:\file c:\foo\' then salt is perfectly happy to do this.
19:12 whiskybar joined #salt
19:13 jacob_s_ But when I do cp.get_url and try to download this to c:\foo\ I get a permission denied error
19:14 jacob_s_ So somehow cp.get_url is losing my permissions.
19:14 mgw1 joined #salt
19:17 jacksontj joined #salt
19:20 alekibango joined #salt
19:20 ronc joined #salt
19:26 JoAkKiNeN joined #salt
19:30 TheRealBill sounds like an REM song
19:32 dthom91 joined #salt
19:32 [diecast] joined #salt
19:32 vipul joined #salt
19:34 dthom91 joined #salt
19:35 m_george|away joined #salt
19:37 morganfainberg left #salt
19:38 morganfainberg joined #salt
19:41 NotreDev joined #salt
19:41 krissaxton joined #salt
19:43 moondawg joined #salt
19:44 wilkystyle left #salt
19:45 moondawg I am running salt-call in a localized environment, but it always hangs after it does a ps dump (salt-call --local -c /home/moondawg/ssv/etc/salt/ state.highstate -l debug)
19:45 moondawg no indication of any error in the output
19:46 Corey Ladies and gentlemen, I have joyous news. The last time I hung out with SEJeff_work, he was getting a bit tubby. But now, thanks to a direct message he just sent me on Twitter, he's let me know that Dr. Oz taught him the secret of losing weight. Let's give him a hand!
19:46 Corey (For a guy who works in infosec, he should be ashamed.)
19:47 mannyt joined #salt
19:48 KyleG The "secret" huh…$10 says it's diet and exercise. haha
19:50 p3rror joined #salt
19:52 StDiluted lol
19:52 StDiluted Green Coffee Extract and Rasberry Ketones!
19:52 renoirb I'd like to have some help regarding the state_top, and the environment config in master
19:53 renoirb oh, hi StDiluted :)
19:53 StDiluted hey renoir
19:53 StDiluted hey Dave_den, you around?
19:53 renoirb I try to make a distinction between dev and base environment, and I do not see how to make the base have a minimal amount of stuff to be overridden in dev
19:53 dave_den StDiluted: yep. what's up?
19:53 qba73 joined #salt
19:56 Jahkeup joined #salt
19:57 StDiluted dave_den: you were helping me on friday with some file.append stuff
19:57 StDiluted your example works but not for cmd.file.append
19:58 StDiluted so just wondering if you know anythign about that
19:58 dave_den i think i was. can you pastebin what you're trying to do?
19:58 StDiluted https://gist.github.com/dginther/6343491
19:58 StDiluted the 'works' example there was yours
19:58 StDiluted the one I've got above that… not work :(
19:59 ada__ joined #salt
19:59 matanya joined #salt
19:59 renoirb StDiluted:
19:59 StDiluted ?
20:00 renoirb Do you have other documentation than the current live where I could get some help to create a proper separate environment
20:00 qba73_ joined #salt
20:00 renoirb :)
20:00 bitz joined #salt
20:00 faldridge joined #salt
20:00 StDiluted I don't. I couldnt get the environments stuff working as I expected, so I gave up on it and did something different.
20:00 renoirb I am reading through all and it is still unclear to me. I might even write on the topic and contribute afterwards :)
20:00 dave_den StDiluted: i don't understand what you're trying to do with the 'not works' example. is that from one of your salt states?
20:01 renoirb So, instead i imagine i would have to use in a dev master file have a state_top: nottop.sls
20:01 renoirb ?
20:01 StDiluted dave_den: it's a reactor state
20:01 StDiluted dave_den: it takes a trigger from any minion and writes to a file on a separate machine
20:02 Ryan_Lane UtahDave, SEJeff: any ideas on the environment stuff? I haven't really looked into it too much. renoirb is working with me on the webplatform project, where we exclusively use salt
20:02 renoirb The essential would be for me to make a lean as possible way to divert both environment
20:03 StDiluted renoirb: it was very unclear to me as well. Auser has done some good stuff with it. http://saltstat.es
20:03 kleinishere joined #salt
20:03 renoirb the only way I see if environment do not make me override the base, would be to use 'state_top: dev.sls' where I copy top.sls… but with specifics to dev
20:03 UtahDave so usually your environments are assigned by your top.sls
20:04 dave_den StDiluted: you need to pass your args as a dict in args
20:04 qba73 joined #salt
20:04 renoirb oh StDiluted I haven't found that, thanks!  I probably mistaken it to http://saltstarters.org/
20:05 StDiluted dave_den: what would that look like?
20:05 renoirb dave_den: I guess so 'salt 'deployment*' state.sls hello env=dev'
20:05 renoirb but as I said, i have a different master, that vagrant puts for me, and I use the 'environment: dev' configuration
20:05 dave_den or rather:   - arg:\n    - name: /etc/check_mk/conf.d/wato/vpc_west_stack/hosts.tst\n    - text: |\n        "all_hosts += ["{{ data['id'] }}|cmk-agent|prod|site:west-vpc|lan|tcp|wato|/" + FOLDER_PATH + "/","
20:06 StDiluted hm, I will try that
20:06 KyleG ahhh, check_mk. I <3 check_mk
20:06 KyleG monitor all the things!
20:07 dave_den i'm anbout to murder virtualenv. anyone have salt running from a virtualenv?
20:08 UtahDave dave_den: whiteinge runs salt from virtualenv
20:09 SpX joined #salt
20:09 MTecknology I have some minions that take a very very long time to run state.highstate. Is there any possible way to tell salt (master) to wait for a job to be returned regardless of how long it takes for that to finish? Sort of.... master "ping: are you still working?", minion: "pong, yup, still trying my hardest", master: ok, I'll keep waiting
20:09 UtahDave renoirb: have you set your file_roots?
20:10 mattbarto joined #salt
20:10 renoirb UtahDave: sure :)
20:10 druonysuse joined #salt
20:10 druonysuse joined #salt
20:10 renoirb wait a sec, i'm creating a gist for it UtahDave
20:10 UtahDave cool
20:11 MTecknology also- is there any way to see currentely running processes on a minion? Something better than    salt '*' cmd.run 'ls /var/cache/salt/minion/proc/' and mentally ignoring only one proc (the cmd.run).
20:11 MTecknology s/./?/
20:12 StDiluted dave_den: 2013-08-26 20:12:04,824 [salt.minion      ][WARNING ] TypeError encountered executing file.append: coercing to Unicode: need string or buffer, dict found. See debug log for more info.  Possibly a missing arguments issue:  ArgSpec(args=['path'], varargs='args', keywords=None, defaults=None)
20:13 dave_den StDiluted: post your reactor again
20:13 UtahDave MTecknology: yes, you can
20:14 StDiluted dave_den: https://gist.github.com/dginther/6346103
20:14 p3rror joined #salt
20:16 qba73 joined #salt
20:16 dave_den ah, it's like when passing from the cli
20:16 matanya joined #salt
20:16 StDiluted yeah I know this is just a syntax thing, but it's frustrating as hell
20:17 Thiggy joined #salt
20:17 dave_den so probably: - arg:\n    - name=/etc/check_mk/conf.d/wato/vpc_west_stack/hosts.tst\n    - |text="all_hosts += ["{{ data['id'] }}|cmk-agent|prod|site:west-vpc|lan|tcp|wato|/" + FOLDER_PATH + "/","
20:18 dave_den try it on the command line with 'salt'
20:20 MTecknology I'd really love to see a fancy web interface to manage package updates
20:20 renoirb StDiluted, dave_den, UtahDave, Ryan_Lane: My gist https://gist.github.com/renoirb/6346165
20:22 renoirb So far, when I use 'state_top: vagrant.sls' seems better than 'environment: dev'
20:22 dave_den whiteinge: you around? need salt+virtualenv help
20:24 matanya joined #salt
20:25 devinus joined #salt
20:31 renoirb MTecknology: I think we need to have an api first, so we can make a web frontend… like we can do with OpenStack nova and horizon
20:32 Jahkeup UtahDave: hey sorry I didn't get back to you a couple of nights ago. I'm a side tracked a bit for the next week or so, but I ping you again when I can get around to working on that keystone module again.
20:33 jacksontj joined #salt
20:34 kleinishere joined #salt
20:35 toastedpenguin joined #salt
20:36 mr_chris If it possible to use Jinja line statements in Salt? http://jinja.pocoo.org/docs/templates/#line-statements
20:36 [diecast] joined #salt
20:36 UtahDave renoirb: OK, I see what the problem is.
20:37 UtahDave renoirb: when you use "environment: dev" in your minion config, that forces the minion to ONLY look in the dev file roots. It completely ignores the base environenment.
20:37 whiteinge dave_den: hi
20:37 KyleG1 joined #salt
20:39 dave_den whiteinge: i think i figured it out. my virtualenv rage is subsiding.
20:40 mr_chris Really what I'm asking is how do I make multiline jinja templates without required {% %} on every single line?
20:40 mr_chris *without requiring
20:40 whiteinge dave_den: :D
20:41 kenbolton joined #salt
20:42 renoirb UtahDave: really?
20:42 krissaxton joined #salt
20:42 derelm joined #salt
20:42 renoirb UtahDave: but I put *-dev first, I assume if I call something and doesn't exist it would get the non -dev
20:42 TheCodeAssassin joined #salt
20:43 renoirb https://gist.github.com/renoirb/6346165#file-etc-master-L9
20:43 UtahDave Oh, you're right. It should cascade down through those directories looking for the sls
20:44 renoirb I try to make the config as generic as possible, in prod, ill only have salt and salt-webapps… and the config would only have a hostname change… but will probably even then: I'll make use of the default option so we only source control the salt-webapps, salt, and pillars for prod
20:44 renoirb But as for the options, when I change the option, reload salt-master service and try to see pillar.items
20:45 renoirb with option environment:dev
20:45 NotreDev joined #salt
20:45 renoirb the pillars are much different.
20:45 renoirb should I copy both top.sls files?
20:45 UtahDave renoirb: for your pillar, have you run   salt \* saltutil.refresh_pillar   ?
20:45 renoirb as in the top.sls file in base and base-dev to be copy-paste?
20:45 renoirb UtahDave: i did
20:46 UtahDave ok, I'd recommend only having one top.sls
20:47 StDiluted aarggghhh, seriously this cmd.file.append thing is pissing me off
20:47 mgw1 For some reason I thought test=true would give me a diffof a templated file (or the content of a new file)
20:48 renoirb UtahDave:  I agree :)
20:49 mgw1 Isn't test=true supposed to do that? It is indeed running in test mode, but my "changes" are nothing for the file
20:50 renoirb Look that UtahDave
20:50 renoirb file_roots:
20:50 renoirb ----------
20:50 renoirb base:
20:50 renoirb - /srv/pillar
20:50 renoirb i wonder how file_roots: could be flipped to list pillars
20:51 mgw1 it appears it just doesn't show the content for a new file. I added an empty file and it did what I expected.
20:51 UtahDave mgw1: Hm.  try running it in debug mode.   -l debug
20:52 UtahDave renoirb: ok.
20:52 chrisgilmerproj left #salt
20:53 jesusaurus im getting an AttributeError when installing from develop :(
20:53 jesusaurus https://gist.github.com/jesusaurus/61fca3beb07e930956f6
20:54 krissaxton joined #salt
20:54 UtahDave jesusaurus: crud. when was the last time you pulled?
20:54 jesusaurus i just did
20:55 UtahDave yep, I'm getting it, too.
20:55 UtahDave I know which commit broke it, too.
20:55 Corey Yay!
20:55 forrest It was your late Saturday night work UtahDave
20:55 Corey Revert?
20:56 UtahDave jesusaurus: would you mind opening an issue on that? I'll get someone on that.
20:56 forrest I don't mean that factually, it's facetious
20:57 jesusaurus UtahDave: sure thing
20:57 UtahDave lol.  sorry, I didn't see your joke there, forrest.  :)
21:02 SEJeff_work Corey, I don't work in infosec arse :P
21:02 SEJeff_work Corey, And I do have twitter login verification enabled now, so hopefully less spam
21:02 Corey SEJeff_work: Well no, not after getting your Twitter account compromised I'm sure you don't. :-D
21:02 dthom91 joined #salt
21:03 Corey SEJeff_work: Snark at your expense aside, any idea how it happened?
21:03 [diecast] if i put a new _grains/object.py I should be able to see its response in salt 'hostname*' grains.items without doing anything special right?
21:03 conan_the_destro joined #salt
21:06 forrest Oh it doesn't matter, I just didn't want people to think I was serious
21:06 forrest realized afterwards someone might
21:07 blee_ joined #salt
21:07 UtahDave [diecast]: you have to run  salt '<minion>' saltutil.sync_grains  first
21:07 [diecast] i've done that
21:07 UtahDave forrest: :)
21:07 [diecast] i also ran a highstate on the minion
21:07 UtahDave [diecast]: Hm. that should work, then.
21:08 UtahDave [diecast]: try running your minion in the cli in debug mode to see if you're getting a stacktrace or error
21:08 [diecast] i also tried running the ec2_info.py script directly on the minion and it worked
21:08 [diecast] ok, good idea
21:10 mahimahi joined #salt
21:12 [diecast] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
21:13 UtahDave hm. odd
21:15 mgw1 UtahDave: debug doesn't provide anything useful. It's not a big deal, I just thought I'd be getting a diff for a missing file
21:16 UtahDave yeah, me, too
21:16 renoirb UtahDave: oh, i see here (http://www.saltstat.es/posts/environment-based-clusters.html)   that I should copy over elements
21:16 mahimahi How do you do float expressions in pillar? {{ int(grains.mem_total * 0.2) }} fails due to 0.2  If I use 2 instead of 0.2 it works properly
21:17 mgw1 UtahDave: let me upgrade to latest develop, perhaps there is/was a bug
21:17 [diecast] mahimahi thats a jinja thing most likely
21:17 UtahDave mgw1: wait on that
21:17 UtahDave there's a bug in develop
21:18 UtahDave s0undt3ch: you around?
21:18 mgw1 UtahDave: thanks — you caught me just in time
21:18 mgw1 What's the bug in develop? Maybe I can step back a couple commits
21:19 renoirb Because when i look at my top.sls file in https://gist.github.com/renoirb/6346165#file-top-sls-L1  I thought that when in dev, it would consider base anyway
21:19 UtahDave https://github.com/saltstack/salt/issues/6906
21:20 UtahDave you're not referencing your dev environment in your top.sls
21:21 [diecast] UtahDave do i need to add _grains anywhere on the minion? i only put _grains in the root for master
21:21 [diecast] in the conf i mean
21:21 renoirb UtahDave: sure. But in master I am
21:22 UtahDave [diecast]: no, you don't.
21:22 faldridge joined #salt
21:22 UtahDave renoirb: I'm confused.  What are you referencing in master?
21:22 renoirb UtahDave: so, as I understand it, I should have 'base' [… something …] 'dev': […. same something AND differences … ]
21:22 renoirb in: https://gist.github.com/renoirb/6346165#file-top-sls-L1
21:22 renoirb #file-etc-master-L6
21:23 whit joined #salt
21:23 UtahDave renoirb: right, but you're not referencing the dev environment in the top.sls there.   only   base:
21:24 renoirb UtahDave: so… I have to have 'dev' with the same line as 'base' then?
21:24 TheCodeAssassin hey UtahDave, you were right it were the require statements that were messed up ;) btw
21:25 UtahDave renoirb: yeah. that's how your top.sls defines which environments to match.
21:25 UtahDave TheCodeAssassin: Ah, good!  did you get that working?
21:25 TheCodeAssassin well yes and no
21:25 * robawt highfives UtahDave
21:25 TheCodeAssassin yes it works, but still gives some weird errors, psoted in the mailing list
21:25 * UtahDave highfives back!
21:25 alunduil joined #salt
21:25 UtahDave cool
21:25 renoirb oh, ok. I thought that…
21:26 renoirb uhm.  yeah right, base is not dev
21:26 renoirb gosh!
21:26 renoirb Can we 'include' from an other environment, like we can do with a state?
21:26 oz_akan_ joined #salt
21:27 jesusaurus people using gitfs, what do you think about this: https://github.com/jesusaurus/salt/commit/dfe58ee19b9a9b3c9f6260e3233b8b929b0812ed
21:27 littleidea joined #salt
21:28 joehoyle joined #salt
21:28 krissaxton joined #salt
21:30 joehoyle Hey, I am running minions with two masters, when I create a new minion and run the salt-minion for the first time, it gets to one master, pings it with it;s key, and then just waits to be accecped, once I do that it them moves to the second master - this seems a bit "silly" as if one master is inaccessible it will brake new minions coming up
21:30 kaptk2 jesusaurus: +1 I like it
21:30 UtahDave renoirb: yeah, you can. Let me find the syntax for you.
21:30 renoirb … sorry for that. I wish I could differentiate what is when for what :/
21:33 TheCodeAssassin UtahDave: when you load highstate for a server, aren't the results logged locally on the minion?
21:33 TheCodeAssassin i can't find my debug information anywhere to backtrack why it gives an error
21:33 UtahDave yeah, in the job cache
21:35 UtahDave renoirb: from within an sls you can include an sls from another environment: http://docs.saltstack.com/ref/states/include.html#include
21:35 UtahDave joehoyle: would you mind opening an issue on that?
21:36 joehoyle UtahDave: sure thing
21:36 UtahDave thanks!
21:36 renoirb oh, UtahDave, so I would have to copy over again but with prepending - base: http
21:36 renoirb not as good then for DRY on that level then
21:36 renoirb i'll do that then, thanks!! :)
21:37 renoirb I thought the top.sls would have a '*':   (at the root to say ALL environment)
21:37 renoirb but it did not work
21:37 UtahDave renoirb: no, just create an empty sls file with   include:\n  - base: http
21:37 renoirb oh! good!
21:37 renoirb that' would make it explicit, and the file will be there if i need to make differences.
21:37 renoirb fair enough, thanks again!
21:37 jacksontj joined #salt
21:38 UtahDave renoirb: also, the minion can match items in both the base and the dev environment
21:39 renoirb brb
21:39 renoirb thx UtahDave ttyl
21:40 UtahDave you're welcome.
21:40 [diecast] UtahDave always in the details….. i put /srv/salt/_grains in /etc/salt/master
21:40 kermit joined #salt
21:40 [diecast] it's actually sitting in /srv/_grains
21:40 UtahDave ah, yeah.
21:40 [diecast] =P
21:40 [diecast] probably should have ran salt-master in debug too
21:41 [diecast] but, user error, so no worry
21:44 mr_chris How do I make multiline jinja templates without requiring {% %} on every single line?
21:44 [diecast] you dont need that on every line
21:44 [diecast] do you mean multiple lines of jinja code?
21:45 mr_chris Yes.
21:45 [diecast] hmm, as far as i know it is needed for each line of code
21:45 joehoyle UtahDave: Ok, created https://github.com/saltstack/salt/issues/6908
21:45 mr_chris Right. That's why I'm asking.
21:45 mr_chris I know that Jinja itself can do it http://jinja.pocoo.org/docs/templates/#line-statements
21:45 [diecast] maybe jinja/pocoo chan is better (unless someone can answer) =P
21:45 UtahDave joehoyle: thanks!
21:45 mr_chris I just don't know how in the context of salt.
21:45 joehoyle np
21:46 mr_chris Maybe.
21:46 UtahDave mr_chris: you might ask on the mailing list or whiteinge
21:46 [diecast] mr_chris i dont see where multi-line jinja code is done in that example
21:47 mr_chris [diecast], You're right. They still have something on each line. It just looks nicer, then.
21:47 mr_chris My mistake.
21:47 [diecast] im quite sure it is needed for parsing
21:47 mr_chris UtahDave, whiteinge?
21:47 [diecast] i've never seen multi-line jinja code in all my years as a pylons/pyramid dev =P
21:48 [diecast] i think mako was capable of it though
21:48 whiteinge mr_chris: what are you trying to do?
21:48 mr_chris Oh, I didn't realize the whiteinge was a user name here.
21:48 dthom91 joined #salt
21:49 mr_chris Trying to make my jinja templates look nicer but not having to have {% %} at the beginning and end of each line.
21:49 mr_chris I know that this is possible.
21:49 mr_chris http://jinja.pocoo.org/docs/templates/#line-statements
21:49 mr_chris But I'm not sure how with salt.
21:49 [diecast] but we just clarified it is not possible =)
21:50 mr_chris [diecast], We did as far as multiline Jinja code is concerned. But we didn't not rule out line statements.
21:50 [diecast] ah
21:50 mr_chris I'll take what I can get at this point.
21:51 mr_chris [diecast], Thanks for clearing me up on that.
21:52 [diecast] good luck
22:04 CheKoLyN joined #salt
22:04 forrest what's wrong with {% %}
22:04 forrest better than the ruby templating with <- ->
22:10 mr_chris forrest, nothing really. But as shown in http://jinja.pocoo.org/docs/templates/#line-statements it could be a single character just at the beginning of each line.
22:11 cubicool joined #salt
22:11 cubicool Hey everyone, can I get use Salt with Python3?
22:13 UtahDave Not quite yet. There's still a dependency on m2crypto which doesn't have python3 support yet.  We're working towards python3 support, but we're not there yet.
22:16 mr_chris The only thing that needs to be done is to pass "line_statement_prefix" to Jinja through salt. I'm guessing it would have to be a little lower level than at https://github.com/saltstack/salt/blob/develop/salt/renderers/jinja.py?
22:16 druonysuse the documentation on how to configure nodegroups is a little lite... I do not see where it says to configure/define them. I have looked in /etc/salt/minion and I don't see anything in there that would suggest that they are defined like grains. Does this mean they should be defined in state files?
22:16 dthom91 joined #salt
22:16 UtahDave druonysuse: you specify nodegroups in the master config
22:16 druonysuse I see
22:17 druonysuse UtahDave: always the last place you look eh ;)
22:17 druonysuse UtahDave: Thanks
22:17 UtahDave mr_chris: I think you can pass in a kwarg
22:18 mr_chris OK. So I would need to make it as a custom renderer.
22:19 mr_chris Thanks for the tip.
22:19 mr_chris If I get it going, I'll share how I did it.
22:23 UtahDave thanks!
22:23 littleidea joined #salt
22:34 krissaxton joined #salt
22:36 vipul joined #salt
22:37 oz_akan_ joined #salt
22:40 devinus joined #salt
22:44 s0undt3ch UtahDave: briefly :)
22:44 krissaxton joined #salt
22:45 s0undt3ch UtahDave: what's up?
22:49 UtahDave nah, just the setup.py issue we've already chatted about
22:50 ipmb joined #salt
22:55 dthom91 joined #salt
22:57 s0undt3ch UtahDave: k, having a look at in to see if 10 mins do it, if not, in ~9 hours
22:57 UtahDave that's cool! Thanks, s0undt3ch
22:58 s0undt3ch UtahDave: yeah, I was too fast on that one ;)
23:06 littleidea joined #salt
23:08 mgw1 Can file.managed template files use jinja's "extends" feature?
23:08 mgw1 I'm thinking from what I know of how the module works that it would cause problems.
23:08 mgw1 (i.e., not work)
23:09 cubicool left #salt
23:16 lazyguru joined #salt
23:17 kleinishere joined #salt
23:20 cmthornton joined #salt
23:23 mgw joined #salt
23:24 felixhummel joined #salt
23:25 mgw joined #salt
23:29 ipmb joined #salt
23:34 EnTeQuAk joined #salt
23:36 TheCodeAssassin joined #salt
23:37 cewood joined #salt
23:38 dthom91 joined #salt
23:45 krissaxton joined #salt
23:50 ninkotech joined #salt
23:52 NotreDev joined #salt
23:58 auser joined #salt

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