Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-02-24

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

All times shown according to UTC.

Time Nick Message
00:02 gattie joined #salt
00:02 hal58th2 You do the same thing with pillar, ie {% if pillar['somepillar'] is defined -%} or {% if pillar['somepillar'] == 'somepillardata' -%}
00:02 SamYaple hal58th2: ok I currently use that in some areas. I was having trouble figuring out if I could register arbitrary grains (and if they are persistent?)
00:03 SamYaple oh you have already answered
00:03 hasues joined #salt
00:03 SamYaple ok let me play with that a bit
00:04 hal58th2 Sure, good luck
00:04 SamYaple thanks hal58th2! As always this community is quick to answer (and with examples nonetheless!). Keep on keeping on guys.
00:05 hasues left #salt
00:05 hal58th2 We try. stevednd, I don't think so. I don't think you can run any low level commands as something other than root/admin
00:05 hasues joined #salt
00:06 hasues left #salt
00:06 hal58th2 stevednd I would just do a cmd.wait and restart the service that way with a su.
00:06 stevednd hal58th2: I'm doing it from the command line for some administration
00:06 iggy SamYaple: you are better off thinking of salt states in terms of how you want something to look, not what you want to run to get it to look that way (works great in my perfect world...)
00:06 stevednd that's what I'm probably going to end up doing though
00:08 bhosmer_ joined #salt
00:08 SamYaple iggy: I am actually ok with looking at it like that. And if I have to do something initially as a one time bootstrap, I am ok with that. But some things (especially clusters relying on quorums) can't be kicked fresh in the state I want it to look like
00:08 johtso joined #salt
00:08 iggy SamYaple: for instance in this case, you'd just setup the database unless it was already setup (according to some command in the unless: requisite of the state)
00:09 hal58th2 Hey iggy, I can't find your presentation. What's it called again and what day?
00:09 iggy I'm thursday at 10:30 I think
00:09 hal58th2 k
00:10 iggy 10:$5
00:10 MaliutaLap joined #salt
00:11 iggy 10:45
00:11 iggy learn to type
00:13 SamYaple so iggy if i understand this correctly, I would do an "unless: bootstrapped" on the bootstrap state. And set a grain value for bootstrap in that state?
00:13 iggy unless takes a shell command to run
00:14 hal58th2 Heh. Well unfortunately your talk is pretty much the exact opposite of what we do at my work. I might have to go to Ryan Lane's presentation instead.
00:14 SamYaple iggy: sure, but the logic of that statement is good?
00:14 Ryan_Lane well, yeah, everyone should go to my talk ;)
00:14 iggy so something like... unless: mysql "describe some_table_that_only_exists_after_bootstrap"
00:14 iggy or whatever
00:14 hal58th2 Hehe. Why hello Ryan
00:15 iggy is that who's at the same time as me?
00:15 hal58th2 Ryan's got a few talks, dominating the agenda
00:15 Ryan_Lane I have 2 :)
00:16 bhosmer_ joined #salt
00:16 Ryan_Lane I'd also like to lead a sprint during the sprint time
00:16 Ryan_Lane for AWS modules
00:16 hal58th2 Thought I saw more. Must be my headache
00:17 Singularo joined #salt
00:17 hal58th2 I wish the sprint time was Thursday night and not during the dinner/entertainment. Not that I am any sort of developer.
00:18 iggy if they go in order, I should be at the same time as nmadhok or white inge... which should pretty much assure an empty room for me
00:18 iggy just the way I like it
00:21 MTecknology iggy: you should already have an email with a time in it..
00:21 iggy I do... and I said it was Thursday at 10:45
00:22 aurynn well, I can package my OWN thin dir, and use the thin_dir setting in the roster to use that instead
00:22 * MTecknology is Wednesday @ 11:45
00:22 desposo joined #salt
00:22 aurynn and it works
00:24 clintber_ joined #salt
00:35 spookah joined #salt
00:41 aurynn ah hah
00:41 aurynn if I generate a thin build manually, salt-ssh will use it by default
00:41 aurynn that's useful
00:42 baweaver joined #salt
00:42 itru joined #salt
00:43 itru why can service not be restarted when the watched managed file is has been changed?
00:43 itru so I get in logs: Comment: File /config updated
00:44 itru but a service which has:
00:44 itru - watch:
00:44 itru -file: /config
00:44 itru does not restart
00:44 itru or reload
00:46 hal58th2 itru, looks correct. Mind posting the full two states with some garbage data?
00:47 MTecknology using dpaste.com or something (not pasting here)
00:48 itru http://pastebin.com/67cdm0Ze
00:49 robawt itru: you need a space before 'file' and after '-'
00:50 itru hmm?
00:50 itru #15?
00:51 itru line 15?
00:51 whytewolf robawt: not the issue. the pastebin has the space
00:53 MugginsM joined #salt
00:53 itru when I run this state without editing a config file, buildmaster service state is yellow (not changed)
00:53 subsignal joined #salt
00:53 itru but if I do some changes to config file and run the state - it is blue….
00:53 itru both changed file and service
00:54 whytewolf that sounds like it is trying to restart it
00:54 itru but silently fails
00:54 MugginsO joined #salt
00:54 hal58th2 itru, ahhh isn't that what is supposed to happen?
00:55 itru it supposed not to fail :)
00:55 hal58th2 What is failing specifically?
00:55 whytewolf it sounds like the command to reload it is returning that it passed a reload with out fail.
00:56 itru oh, now I get it… checked debug, it runs /sbin/service buildmaster status
00:56 itru and this stupid service doen’t support “status”
00:56 hal58th2 heh debug is a wonderful thing
00:56 itru yep
00:57 hal58th2 Yes I use the "sig" option when the service does not support status or when status always returns true, even when the service is not running. (I'm looking at you acivemq).
00:58 whytewolf ahh yeah i had an issue simallar to that with the sysstat package in centos. the service for it would delete the pid file after it starts. and status alwasy returned failed no matter what
00:58 itru hal58th2: wow thanks, that’s what I need
01:00 lpmulligan joined #salt
01:00 hal58th2 Welcome itru :)
01:01 nitti joined #salt
01:02 TTimo joined #salt
01:04 jaloren joined #salt
01:04 jaloren Hi all, try installing saltstack on CentOS 6.5
01:04 jaloren Seems like package dependency issue
01:05 jaloren https://gist.github.com/jaloren/6c81d373db859fce0e0a
01:05 jaloren Its bombing out trying to install PyYAML...weird thing is that PyYAML is already installed on my system.
01:06 jaloren I am installing from the epel repo as documented here: http://docs.saltstack.com/en/latest/topics/installation/rhel.html
01:07 aron_kexp_ joined #salt
01:07 iggy jaloren: look at the issue tracker... someone else reported that the other day and I told them to file a ticket
01:11 baweaver joined #salt
01:12 rogst joined #salt
01:12 jaloren joined #salt
01:12 jaloren oh joy...package dependency hell
01:13 jaloren once i switched to an updates repo with pyyaml all is well
01:13 iggy did you find an issue for it?
01:13 jaloren https://github.com/saltstack/salt/issues/19646
01:14 jaloren yep...which was closed as not a bug
01:14 jaloren and its not really a salt issue  so fair enough
01:14 jaloren looks like PyYAML is now in the base centos updates directory and so EPEL removed it from their repo
01:17 iggy I subscribed to the bug so the next time someone asks about it...
01:18 aqua^mac joined #salt
01:19 ValF joined #salt
01:19 jaloren You could just tell people to replace their os repo file with this https://gist.github.com/jaloren/276fec3c889cf65716bb
01:19 jaloren it specifically points to the updated 6.6 centos repos
01:19 jaloren then yum clean all
01:19 jaloren and you should be set
01:21 jaloren i added a comment to the issue basically saying that
01:23 kevops joined #salt
01:23 kevops hey room
01:23 kevops strugling to understand highstate
01:24 aurynn highstate == refresh pillars & apply states specified in top.sls
01:24 otter768 joined #salt
01:25 kevops is there an example file any where - my deployment is relatively simple eg clients server
01:25 aron_kexp joined #salt
01:28 badon joined #salt
01:33 hal58th2 kevops scroll down to Highstate and the top.sls file https://blog.talpor.com/2014/07/saltstack-beginners-tutorial/
01:36 Ryan_Lane joined #salt
01:37 MTecknology My memory isn't working... How do you have a cmd state run only if another state changed?
01:38 aurynn cmd.wait
01:38 aurynn with a -watch:
01:38 kevops thanks hal58th2 for the resource
01:38 MTecknology thanks!
01:39 hal58th2 welcome kevops
01:39 shaggy_surfer joined #salt
01:42 otter768 joined #salt
01:48 nitti joined #salt
01:58 hal58th joined #salt
01:58 murrdoc joined #salt
01:58 Furao joined #salt
01:58 murrdoc joined #salt
02:03 baweaver joined #salt
02:06 Singularo joined #salt
02:07 fishdust joined #salt
02:10 michelangelo joined #salt
02:13 favadi joined #salt
02:20 cberndt joined #salt
02:24 evle joined #salt
02:25 dude051 joined #salt
02:27 jhauser_ joined #salt
02:34 TTimo joined #salt
02:35 MatthewsFace joined #salt
02:39 badon joined #salt
02:41 neekz0r joined #salt
02:47 ilbot3 joined #salt
02:47 Topic for #salt is now Welcome to #salt | SaltConf 2015 is Mar 3-5! http://saltconf.com | 2014.7.2 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/
02:50 zie joined #salt
02:54 badon_ joined #salt
02:56 cberndt joined #salt
03:02 Terminus_ hello. is there a way i can assign a variable which i can reuse throughout an sls file? or even a dict that will give me the equivalent of { 'wan0': { 'ip': 1.1.1.42, 'gw': 1.1.1.1 }, ... }
03:03 Terminus_ oh wait. i should go read about pillars.
03:06 iggy Terminus_: how are you trying to set that?
03:06 micko- joined #salt
03:10 Terminus_ iggy: that's exactly what i'm asking. i just want the data to be available for a bunch of templates i might need. pillars seem to be the ticket.
03:10 clintberry joined #salt
03:10 iggy I guess it depends how often that data changes
03:11 iggy I mean you don't want to edit a bunch of files every time you spin up a new server (unless you really don't do it all that often)
03:11 iggy but if it's fairly static and/or predictable data, should be fine
03:12 Terminus_ iggy: the primary concern i have right now is that i'm doing tests so the values will change once i put it into production and i don't want to do exactly what you said, edit a bunch of files. so i just want to edit a few variables which should change everything once it's production ready.
03:12 Terminus_ in this particular instance, my production ip addresses are different from my test ip addresses.
03:13 shaggy_surfer joined #salt
03:13 iggy where do these IPs come from?
03:14 Terminus_ iggy: and you're making me facepalm since i should be able to just grab them from grains. >_<
03:15 iggy if they are already assigned, yes, they'll be in grains
03:15 iggy salt-call -g
03:16 MTecknology joined #salt
03:16 Terminus_ iggy: yeah, that's the chicken and egg problem. on first install, they won't be assigned so i guess i can't exactly configure via grains.
03:17 fishdust joined #salt
03:18 iggy so now we're back to how do they get assigned?
03:18 Terminus_ iggy: yep. i think i just want a consistent source of data on the master side.
03:20 iggy are they assigned by dhcp or some other mechanism?
03:20 Terminus_ iggy: nope. they're all static.
03:21 Terminus_ iggy: the configuration i'm making right now is the gateway/dhcp/kitchen_sink box.
03:21 Terminus_ so from a complete shutdown, this is the first thing i start to get the network up and running before everything else.
03:22 badon_ joined #salt
03:22 iggy do you normally set them manually? Do you have them in some sort of database?
03:23 subsignal joined #salt
03:24 Terminus_ iggy: nope. the way it is right now, i config the network just enough to get it to contact the master and then all config is loaded from there, including network.
03:24 hasues joined #salt
03:24 hasues left #salt
03:25 iggy Ouch. Sounds painful... Well, then yeah... hand editing them is probably your best bet
03:25 iggy You might be able to get fancy with some loops, variables, or macros in jinja
03:25 Terminus_ not really painful. i've already got them, i just want a single source of data.
03:25 iggy but it sounds like this might be enough of an improvement over your current setup...
03:26 aurynn well that's odd.
03:26 Terminus_ iggy: that's why i'm asking because i was gonna use jinja to specify everything.
03:26 Terminus_ my initial question was just how to assign and expose a data structure to an sls file, if it's even possible.
03:26 Terminus_ pillar seems kinda flat.
03:26 iggy if you ever get fancy and load the data into a database of some type, you can probably use an ext_pillar to grab it all out
03:27 iggy you can use the map pattern (see most formulas for examples)
03:28 Terminus_ iggy: that's gonna be unlikely. i'm not operating at a scale big enough to warrant a DB.
03:28 iggy although it might be easier to just write them out in a yaml file (whether that's in your states or pillars is up to you)
03:28 Terminus_ i just need a file that says foo = { 'bar': 42, 'x': [ 1, 2, 3 ], ...}
03:30 Furao joined #salt
03:31 Terminus_ iggy: yeah, i asked the question because earlier i was thinking i can just put them all in defaults for file.managed and then i realized that i'll be using the same data over and over across multiple states and i want that to be consistent.
03:31 iggy you really want it to be json?
03:31 pdayton joined #salt
03:32 Terminus_ iggy: doesn't need to be json. i'm just using that notation since salt is written in python and i figured using python notation for what i want will be easier to understand in this channel.
03:32 Terminus_ iggy: the format is not important. the structure is.
03:34 iggy yeah, you can use import_yaml or import_json to load that from yaml or json formats
03:34 TTimo joined #salt
03:34 Terminus_ iggy: i'll take a look at that. i'm inclined to just use import_yaml since everything's already in yaml.
03:34 iggy or use pillars (which buys you a certain amount of templating with jinja)
03:35 dude051 joined #salt
03:36 Terminus_ iggy: that's what i said earlier. =P
03:36 iggy lies!
03:37 dthorman joined #salt
03:38 iggy nah, I thought you said pillars seemed kind of flat (not really sure what you meant, but it sounded bad)
04:00 subsignal joined #salt
04:04 subsignal joined #salt
04:05 dl_nz joined #salt
04:05 dabb joined #salt
04:06 Ryan_Lane joined #salt
04:10 otter768 joined #salt
04:10 paha joined #salt
04:15 paha joined #salt
04:32 andrew_v joined #salt
04:42 lpmulligan joined #salt
04:54 eagles0513875_ joined #salt
05:05 aparsons joined #salt
05:07 jpaetzel joined #salt
05:10 aparsons joined #salt
05:18 sieve joined #salt
05:22 malinoff joined #salt
05:24 kermit joined #salt
05:26 aparsons joined #salt
05:26 TTimo joined #salt
05:31 aparsons joined #salt
05:33 felskrone joined #salt
05:37 aparsons_ joined #salt
05:43 aparsons joined #salt
05:44 ramteid joined #salt
05:45 pdayton joined #salt
06:11 otter768 joined #salt
06:30 stoogenmeyer__ joined #salt
06:34 I3olle joined #salt
06:57 pacopablo is there a way to test to see if a gitfs backend is working?
07:00 saffe joined #salt
07:01 Furao joined #salt
07:10 harkx joined #salt
07:15 hojgaard joined #salt
07:15 AndreasLutro joined #salt
07:16 toanju joined #salt
07:19 colttt joined #salt
07:23 linjan joined #salt
07:26 markm joined #salt
07:28 TTimo joined #salt
07:30 Auroch joined #salt
07:34 Terminus_ is there a way to access pillar data directly from managed files or do i have to specify each variable using the defaults parameter?
07:35 AndreasLutro Terminus_: if you run them through a templating engine you can do {{ salt['pillar.get'](...) }} or just {{ pillar['foo']['bar'] )
07:36 KermitTheFragger joined #salt
07:38 flyboy joined #salt
07:38 Auroch joined #salt
07:39 clintberry joined #salt
07:39 Auroch joined #salt
07:39 Terminus_ AndreasLutro: yeah, i'm using jinja. so inside my foo.txt i can just do {{ pillar['foo'] }}?
07:40 AndreasLutro yep, though I'd recommend using pillar.get instead
07:40 AndreasLutro salt['pillar.get']('nested:item', 'default')
07:41 Terminus_ AndreasLutro: yeah i was looking at pillar.get earlier. thanks.
07:41 huleboer joined #salt
07:41 Auroch joined #salt
07:42 Terminus_ AndreasLutro: this makes it easier. specifying defaults is getting unwieldly. XD
07:43 Terminus_ AndreasLutro: also, the documentation for file.managed says that template defaults to jinja but i find that i have to explicitly specify template: jinja or else it won't render. what's up with that?
07:45 AndreasLutro salt.states.file.managed(name, [...], template=None, [...]
07:45 Terminus_ AndreasLutro: sorry. i confused append with managed. append defaults to jinja while managed defaults to None.
07:45 AndreasLutro is what I see
07:45 AndreasLutro yeah :)
07:46 Terminus_ seems like it would be less confusing if you require both to be explicit. XD
07:46 Furao joined #salt
07:46 AndreasLutro I agree
07:47 Terminus_ now i wonder if it's a good idea to generate if statements using combinations from a pillar list variable of arbitrary length. XD
07:49 dRiN joined #salt
07:50 Terminus_ AndreasLutro: i can't call arbitrary python functions from inside a managed file with jinja, can i?
07:55 mikkn joined #salt
07:55 trikke joined #salt
07:55 rattng thanks for sorting the jinja defaults out, it's been in my head for quite some time but never got around to digging into it
07:55 rattng i had forgotten i needed to look into it
07:58 Terminus_ rattng: you've been putting pillar values in defaults as well?
07:59 rattng i've been mixing unfortunately :P
07:59 rattng trying to find what is right for our setup
08:00 hebz0rl joined #salt
08:00 rattng it seems to differ :P
08:02 Terminus_ hehe. i've been making stuff up as i go along. been using pillar for only a few days.
08:02 Terminus_ s/pillar/saltstack/
08:03 dunz0r I've got minions that take over a minute to respond to test.ping, where should I start looking? The minions and the master are both on the internet but on different subnets if that matter
08:04 AndreasLutro Terminus_: not as far as I know. you can call arbitrary modules - {{ salt['cmd.run']('curl -sS http://example.com/myfile') }} will print that file's contents, for example
08:04 AndreasLutro Terminus_: if you need something like that I think you hvae to make custom salt modules
08:04 dunz0r It seems to apply to all minions that are on the internet. Minions on the internal subnets answer fast.
08:05 Terminus_ AndreasLutro: thanks. the former sounds unwieldly and the latter too complicated. guess i'll have to give up on my idea of generating multiple lines of code from a combination of a list of arbitrary length.
08:06 dunz0r I see the machine authing against the master in the masters log... but it takes so long to return an answer that the cli just times out
08:06 alanpearce joined #salt
08:06 dunz0r Even though I've set the timeout to be 60 seconds
08:11 eseyman joined #salt
08:11 lb1a joined #salt
08:11 otter768 joined #salt
08:18 chiui joined #salt
08:19 slafs joined #salt
08:19 slafs left #salt
08:19 TyrfingMjolnir joined #salt
08:19 intellix joined #salt
08:27 Furao joined #salt
08:32 wincyj joined #salt
08:46 kawa2014 joined #salt
08:48 zer0def joined #salt
08:52 andygrunwald joined #salt
08:53 huddy joined #salt
08:56 zugzwang joined #salt
09:01 sieve joined #salt
09:02 N-Mi_ joined #salt
09:08 Singularo joined #salt
09:10 andygrunwald joined #salt
09:12 wedgie joined #salt
09:16 stoogenmeyer_ joined #salt
09:21 karimb joined #salt
09:21 sieve joined #salt
09:26 Xevian joined #salt
09:27 karimb joined #salt
09:36 markm joined #salt
09:37 linjan joined #salt
09:39 andygrunwald joined #salt
09:40 JlRd joined #salt
09:43 paulm- joined #salt
09:46 saffe joined #salt
09:46 TyrfingMjolnir joined #salt
09:47 paulm-- joined #salt
09:55 TyrfingMjolnir_ joined #salt
09:58 jespada joined #salt
10:08 TyrfingMjolnir_ joined #salt
10:08 intellix joined #salt
10:12 otter768 joined #salt
10:13 andygrunwald joined #salt
10:17 andygrunwald Hey, good morning. my goal is to get an overview about which software if installed on which server in which version. My first idea is to write custom grains and deploy this via salt to the minions like this one to identify the redis version: https://gist.github.com/andygrunwald/8b43429b66fbff8f7863 ... Does salt support a better way to do this (without calling "salt call .... cmd")? Or do you think this is a good useless for grains? The disadvantage w
10:17 andygrunwald ould be that we got various grains which are quite the same like the redis one i posted.
10:18 cberndt joined #salt
10:19 bluenemo joined #salt
10:19 bluenemo joined #salt
10:22 dkrae joined #salt
10:30 TTimo joined #salt
10:35 toanju joined #salt
10:39 bluedzen joined #salt
10:39 bluedzen hello
10:47 kaushal joined #salt
10:47 kaushal Hi
10:47 bluedzen is there a way to view the final state rendered after applying the jinja template ?
10:48 Furao before yes by running minion at debug log level
10:49 Furao minion will show rendered .sls before apply
10:49 Furao oh file.managed? maybe yes, i don’t remember anymore
10:53 giantlock joined #salt
10:56 robothands joined #salt
10:57 dkrae joined #salt
11:03 babilen bluedzen: Show it where/when? You will, naturally, find the final state after rendering on your minion, so why don't you look there?
11:04 evle joined #salt
11:05 amcorreia joined #salt
11:07 babilen http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.get_template ? Not sure what it is you want to see rendered though
11:07 babilen http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_sls ?
11:12 badon joined #salt
11:15 robothands hi, I'm having an issue using 'unless' with file.recurse...it doesnt appear to work, the unless requisite is just ignored
11:15 robothands config / state runs: http://hastebin.com/pizujezafa.sm
11:17 babilen robothands: First, you don't care about "ls", but if a file is there. Use "test -f ...." for that
11:17 Emantor joined #salt
11:17 Number6 joined #salt
11:17 robothands it doesnt matter what the requisite is
11:17 Number6 Hey folks, does anyone have a tutorial on how to set up Salt-minion on OSX via brew?
11:18 robothands if I use test -f, whatever, it does nothing and still stats every file in the file.recurse directory whent the state is run
11:18 Number6 Like, do I copy the vanilla config file to /etc/salt/minion ?
11:19 babilen robothands: Yes, I wasn't implying that "ls" is the reason for the behaviour you find problematic, but simply wanted to point out that "test -f .." is a test I find superior to the one you used.
11:20 robothands babilen: yes, I understand that, I only changed it from test -x to ls as it is a simpler test, thought it might work
11:20 robothands I will change it back if anyone has any suggestions why the unless statement is actually not working
11:20 robothands which it should....its a global requisite right...
11:21 babilen robothands: Which version of salt are you using on the master and minion?
11:21 crane joined #salt
11:21 robothands master: 2014.7
11:21 robothands minion: 0.17.5 according to dpkg
11:21 babilen ugh
11:22 babilen You really want to upgrade your minion(s) in that case
11:23 robothands I am using the latest from Ubuntu 1404 repo
11:23 babilen http://docs.saltstack.com/en/latest/topics/installation/ubuntu.html
11:23 robothands ty, will check that
11:23 babilen (you want the package from the saltstack PPA)
11:24 babilen I'm not sure if 2015.2 has been uploaded to the PPA, but make sure that your master will be upgraded too so that its version is at least as recent as the one on your minions
11:25 robothands thanks
11:25 robothands do you know where I can find the versions of each listed? kind of hard to understand what versions go together if you havent been working with salt long...
11:27 johtso joined #salt
11:28 elfixit joined #salt
11:30 bhosmer joined #salt
11:31 babilen robothands: You want 2014.7.2 on both master and minion (or 2015.2.0 if that has been uploaded) ... A newer master can work with older minions to a certain extent, but not the other way round. 2014.7 and 0.17.5 is too large a gap.
11:31 andygrunwald Hey, good morning. my goal is to get an overview about which software if installed on which server in which version. My first idea is to write custom grains and deploy this via salt to the minions like this one to identify the redis version: https://gist.github.com/andygrunwald/8b43429b66fbff8f7863 ... Does salt support a better way to do this (without calling "salt call .... cmd")? Or do you think this is a good useless for grains? The disadvantage w
11:31 andygrunwald ould be that we got various grains which are quite the same like the redis one i posted.
11:32 babilen andygrunwald: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.list_pkgs
11:32 CeBe joined #salt
11:37 andygrunwald babilen, thanks for this recommendations. I will try it
11:40 diegows joined #salt
11:42 stylica joined #salt
11:43 stylica joined #salt
11:47 linjan joined #salt
11:52 crashmag joined #salt
11:54 robothands babilen: the upgrade fixed the issue with unless
11:54 robothands nice one
11:55 analogbyte andygrunwald: the solution babilen posted will only work for software installed via apt... your solution seems one way to go, but you could also use the salt mine to gather this data. that would propably be simpler, but not as convenient as having the data in grains
11:56 andygrunwald analogbyte, you are right. but what is "salt mine"?
11:56 babilen andygrunwald: What do you really want? We can suggest something all day long, but without knowing what you want to achieve, these suggestions will all be misleading
11:57 linjan joined #salt
11:58 analogbyte andygrunwald: http://docs.saltstack.com/en/latest/topics/mine/ , it gathers (mines) data and makes it available to all minions
11:58 andygrunwald We got a big infrastructure with various versions of one software (e.g. php). Very inconsistent. I want to create an overview which versions are running on which server that we can make them consistent. We ar just starting with salt and want to get an ovierview first.
11:58 babilen I mean: How does "list_pkgs" differ from what you want?
11:58 andygrunwald thats my goal.
11:58 babilen "salt '*' pkg.version php5"
11:58 andygrunwald So: I got servers, i don`t know which software is running in which version on which server.
11:58 andygrunwald Some are via apt, some self compiled.
11:59 andygrunwald Very bad situation.
11:59 babilen self compiled will *always* be problematic
12:00 vegardx Doesn't have to be. You can complie and build your own packages and have it easily maintainable.
12:02 babilen "build your own packages" != "self compiled"
12:02 andygrunwald We are switching to an own package repository.
12:02 andygrunwald But first we need an overview ;)
12:02 andygrunwald This will be used in future as well.
12:03 babilen I mean the difference is probably better characterised as "under control of the package manager" vs "manually installed using tools such as make, setup.py, ..."
12:03 andygrunwald But thanks for the recommendations. I will have a deeper look at salt mine, list_kgs and custom grains. Maybe a mix is a good thing. Because some packages are from a packet repository, some self compiled.
12:04 babilen andygrunwald: How would you deal with self compiled software? You have some random versions installed into /usr, /usr/local, ~foo/bin and whatnot. Which is *the* installed versions and how do you find them all?
12:05 vegardx babilen: What do you think those packages contain?
12:05 babilen Some people might have been saner than others and used tools such as stow or virtualenv or ..., but then. You can never track everything down if you don't adhere to some specific standard (and essentially start to reinvent some of the functionality the package manager provides already)
12:07 andygrunwald babilen, the pragmatic solution would be to just ensure that the software is installed into $PATH and can be find via `which`. Of course. This is not a 100% solution, but covers most of the topics.
12:07 babilen vegardx: files, what else? As soon as you install a package it is under the control of the package manager. This, naturally, allows you to use the functionality of the package manager to deal it. It does not matter who actually compiled the package. What matters is that you don't have random people running "./configure, make, make install" and installing self-compiled software all over the place
12:07 andygrunwald "You can never track everything down if you don't adhere to some specific standard ..:" True, and i think with a combination you will cover many areas, but not all. Bat thats a start. Thanks to all!
12:08 vegardx babilen: My point was that you can easily maintain "self-compiled" programs. A package is just the output from a compile. Nothing more, nothing less.
12:09 mdasilva joined #salt
12:09 andygrunwald babilen, vegardx analogbyte Thanks for suggestions. I will go to lunch now :) Cu later
12:09 martoss joined #salt
12:09 martoss left #salt
12:10 babilen vegardx: Yes, which is why I elaborated on which aspect of "self-compiled" programs I find problematic. It, naturally, isn't a problem per-se that programs are self-compiled, but rather that they aren't being managed with a package manager (BSD and Gentoo people would have long gone insane if that were the case (assuming they haven't, but that's a different topic))
12:10 vegardx babilen: I'm starting to think we're agreeing, but from different points of reference. :)
12:10 babilen I compile programs locally and manage them with stow and a strict versioning scheme in /usr/loca/stow/$SOFTWARE/$VERSION, but that way it is predictable again and easy to deal with
12:10 badon joined #salt
12:11 babilen vegardx: I get that quite often. :)
12:13 otter768 joined #salt
12:15 toanju joined #salt
12:19 scottpgallagher joined #salt
12:19 Number6 Do minions need to be configured for a grain type - e.g. mailserver - or can I do that on the master? I've looked at nodegroups, which also works as all I want is a list of minions that I know are of certain types of machines
12:21 babilen Number6: grains are minion local (which also makes them a bad choice for groups and, in particular, for decisions involving sensitive data)
12:22 Number6 babilen: Yeah, I kinda figured that. Lists work for me, so I'm happy out :-)
12:22 babilen You could keep "groups" / "roles" ... in pillars as well (even external pillars such as databases)
12:22 babilen nodegroups are a perfectly viable solution ... the only downside with them is that you still have to restart the master when you change the groups
12:23 babilen (that will change eventually IIRC)
12:23 hobakill joined #salt
12:23 Number6 I'm not overly concerned about restarting the master when I change the nodegroups, tbh. That's only a minor thing
12:24 babilen Even better. It could pose a major problem for other setups with many minions and constantly changing groups though
12:25 Number6 I started playing with Salt about an hour ago - already I'm impressed that I have 2 OSX machines in groups and can run arbitary shell commands on them... Batched commands make me so happy you have no idea
12:26 babilen http://docs.saltstack.com/en/latest/ref/modules/all/index.html#all-salt-modules for all your interactive needs
12:32 TTimo joined #salt
12:38 bluedzen babilen: I was looking for state.show_sls
12:38 bluedzen thanks anyway
12:40 babilen bluedzen: Yes, that is one of the functions I linked to earlier
12:44 bluedzen thanks :)
12:44 JlRd joined #salt
12:50 bhosmer joined #salt
12:53 mndo joined #salt
13:09 stoogenmeyer__ joined #salt
13:13 bhosmer joined #salt
13:13 wincus joined #salt
13:13 andygrunwald joined #salt
13:14 lpmulligan joined #salt
13:15 I3olle_ joined #salt
13:20 kaushal_ joined #salt
13:36 pdayton joined #salt
13:38 Number6 I'd like to have listed minions download a file from the salt server and put it in a specific location on the minions disk... I've read through the pillar docs, but I'm none the wiser on how to do this.
13:39 jY its a if statement
13:40 jY https://gist.github.com/mzupan/dc1d5e64814d953e1649
13:40 jY along the lines of that
13:41 TTimo joined #salt
13:42 Number6 Ahh. /path/to/file in on minion disk. where does the salt://FOO.txt reside on the server's disk? /srv/pillar/foo.txt ?
13:43 jY no its in the formula of the state file
13:43 jY if my fomula is like ssh/init.sls i might have a dir called files in there so ssh/files/sshd_config
13:43 jY so - source: salt://ssh/fiiles/sshd_config
13:44 jY salt:// starts at the file_root that you set in your master config
13:45 teogop joined #salt
13:46 Furao joined #salt
13:46 Number6 ahh, ok, that makes sense
13:46 Number6 ty
13:47 sieve joined #salt
13:48 bluedzen left #salt
13:51 subsignal joined #salt
13:54 subsignal joined #salt
14:00 jeremyr joined #salt
14:05 JDiPierro joined #salt
14:06 bluenemo joined #salt
14:06 bluenemo joined #salt
14:08 lpmulligan joined #salt
14:10 nitti joined #salt
14:11 paulm- joined #salt
14:14 otter768 joined #salt
14:14 paulm-- joined #salt
14:16 racooper joined #salt
14:16 sieve joined #salt
14:20 dyasny joined #salt
14:22 andygrunwald Hey, where does a salt master persist "salt '*' grains.append key val" ?
14:22 manfred in the /etc/grains.d file iirc?
14:23 mapu joined #salt
14:23 manfred hrm, maybe not
14:23 andygrunwald /usr/local/etc/salt/grains on freebsd
14:23 andygrunwald Thanks!
14:23 manfred ahh yes it does ok :)
14:24 manfred it appends it to the grains={} and then writes it out in the setval function https://github.com/saltstack/salt/blob/develop/salt/modules/grains.py#L193
14:25 scoates joined #salt
14:29 monkey66 joined #salt
14:32 linjan joined #salt
14:37 scottpgallagher joined #salt
14:37 monkey66 left #salt
14:39 dude051 joined #salt
14:40 dyasny joined #salt
14:44 clintberry joined #salt
14:47 sieve joined #salt
14:53 linjan joined #salt
14:58 JDiPierro joined #salt
14:59 perfectsine joined #salt
15:05 stoogenmeyer_ joined #salt
15:06 mpanetta joined #salt
15:08 bhosmer__ joined #salt
15:09 elfixit joined #salt
15:12 rojem joined #salt
15:13 aasdf joined #salt
15:18 linjan joined #salt
15:19 Number6 ok, I'm still stuck on deploying a file minion side. Does anyone have a sample I can use?
15:21 sieve joined #salt
15:23 mpanetta joined #salt
15:24 mpanetta joined #salt
15:28 jhauser joined #salt
15:29 Ligthert For these guys using BitBucket as a gitfs backend, http://status.bitbucket.org/
15:29 Ligthert They are having some trouble. So things might be shot...
15:31 bluenemo_ joined #salt
15:31 primechuck joined #salt
15:32 bhosmer_ joined #salt
15:35 pdayton joined #salt
15:35 debian112 joined #salt
15:39 clintberry joined #salt
15:45 douglassssssssss joined #salt
15:45 trikke joined #salt
15:48 douglassssssssss joined #salt
15:49 douglassssssssss joined #salt
15:49 conan_the_destro joined #salt
15:51 monkey661 joined #salt
15:52 jalbretsen joined #salt
15:52 _prime_ joined #salt
15:55 smcquay joined #salt
15:55 pdayton joined #salt
15:57 _JZ_ joined #salt
15:58 agrunwald_ joined #salt
15:58 perfectsine joined #salt
16:00 Andre-B joined #salt
16:01 clintberry joined #salt
16:03 Number6 Doh! I wasn't calling state.highstate!
16:04 mdasilva joined #salt
16:05 ghanima joined #salt
16:15 otter768 joined #salt
16:16 _ether_ joined #salt
16:17 dave_den joined #salt
16:19 conan_the_destro joined #salt
16:21 mdasilva joined #salt
16:22 bhosmer_ joined #salt
16:24 giantlock joined #salt
16:27 theologian joined #salt
16:34 StDiluted joined #salt
16:34 GabLeRoux joined #salt
16:35 The joined #salt
16:36 kaushal joined #salt
16:36 mapu joined #salt
16:37 hebz0rl joined #salt
16:37 che-arne joined #salt
16:38 The hi all :) anyone want to have some fun answering my question? I'm kinda stuck :/
16:40 Deevolution The: Did you ask a question?
16:42 The not yet ;) OK, so I have this custom module that parses through udev info. I want to use it to fill some grains. But the grains can't access the code of course because the module isn't loaded in yet.
16:42 The So I tried inserting it as a custom _util
16:42 The but now I can't find it anywhere
16:42 ajw0100 joined #salt
16:43 evilrob joined #salt
16:43 The NICK The_Loeki
16:44 Deevolution The: I do something somewhat similar.  We have a bunch of custom Python modules that are installed and are used by our grains (and modules).
16:44 The awesome :D so how do you load/use the functions inside grains?
16:45 The Or have you just created them as pure Python modules?
16:45 Deevolution The: The later.
16:45 Herdic joined #salt
16:45 Deevolution You generally have to either restart your minion post install, or do a reload (haven't played with this yet, but on my todo list) prior to them being available in the salt-environment.
16:46 Deevolution We have states that ensure the modules are installed, and handle restarting the minions post installation.
16:46 Deevolution Grains work fine using them directly then.
16:46 Herdic Just found Salt, wondering if updates to the master are instantly sent to the correct minions or if there is some delayed polling process?
16:47 The Well, that's exactly what I'm trying to prevent :) The module is just ~100 SLOC or something, so having to completely scaffold a state system around Python modules just for that is kind of a bummer :/ And the custom _utils?
16:49 Deevolution The: I haven't played with using _utils, so can't really comment on that.
16:49 Deevolution The: we're using the Python code involved for more then just salt, so it was easy for us to just leverage the existing code.
16:49 rypeck joined #salt
16:50 sieve joined #salt
16:50 Deevolution Herdic:  State updates would only be applied when the state is applied.  There are ways to set it up so it happens when changes are made, but that's a configuration decision.
16:51 andrew_v joined #salt
16:52 The Herdic: The master is in constant communication with all minions that are connected though the 0MQ bus, but as Deevolution says, nothing happens until you say so
16:54 Herdic The: Can it be setup to receive an update whenever something changes?
16:55 iggy there are examples in the docs how to do that
16:56 iggy whether it's a good idea or not is really up to your needs
16:56 Herdic I was looking through the docs and have not found anything related to this yet, if anyone could point me in the right direction it would be great
16:58 The Herdic: as iggy says, there are a lot of options documented; there's a scheduler (http://docs.saltstack.com/en/latest/topics/jobs/schedule.html), the Reactor system (http://docs.saltstack.com/en/latest/topics/reactor/), the latest RC adds Beacons (http://docs.saltstack.com/en/latest/topics/releases/2015.2.0.html#beacons)
16:59 The The Reactor system is for 'Events' / 'Triggers', the Beacons are for bringing external events into the Reactor (if I understand correctly)
16:59 scottpgallagher joined #salt
16:59 Herdic The: Thanks, I'll read up
17:00 The also, you could tie states to stuff that's in the Mine http://docs.saltstack.com/en/latest/topics/mine/
17:00 The But that would be less event-driven, more data-driven as you call states / orchestrations
17:01 tligda joined #salt
17:05 andygrunwald joined #salt
17:05 abeach joined #salt
17:07 tligda1 joined #salt
17:10 hasues joined #salt
17:10 hasues left #salt
17:10 numkem joined #salt
17:13 aparsons joined #salt
17:14 davet joined #salt
17:16 numkem joined #salt
17:21 KyleG joined #salt
17:21 KyleG joined #salt
17:22 andygrunwald joined #salt
17:23 abeach Hello, what is the way to install a package but not upgrade any other packages in Apt/ubuntu.  For example, if python 2.7.3 is installed and I want to install virtualenv, how do I prevent python  from being upgrade to the latest python ?  Do I just need to add "hold" a pkgs.installed  for python, even though I don't want to install python in the formula for virtualenv ?
17:24 iggy that's more of a package manager setting than something to do with salt
17:25 sdm24 joined #salt
17:26 numkem joined #salt
17:26 trevorj When I send salt-minion an HUP, it just freaking dies?
17:26 trevorj Really?
17:26 trevorj Now every one of my minions are dead after a config change and a 'reload salt-minion', blah
17:27 abeach thank you iggy
17:27 madisonmay joined #salt
17:27 madisonmay Hi there!  Just wondering if there's any way to generate salt-keys via the python client API?
17:28 sdm24 Hello. I am new to salt, having been playing around with it for about 2 weeks. I am trying to write a state .sls that will take the output of a shell command (specifically dig +short *example.com*) as a jinja variable, that can then be added into a template. Does anyone have any ideas how to accomplish this?
17:30 aparsons joined #salt
17:31 beneggett joined #salt
17:31 The http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dig.html
17:31 sdm24 oh perfect thank you
17:31 numkem joined #salt
17:32 stevednd can salt bootstrap install a specific revision? I'm getting an error that it's not matching
17:33 iggy from git, yes
17:33 rvankleeck joined #salt
17:33 rvankleeck joined #salt
17:33 rvankleeck is there a way to use nodegroups in external_auth and client_acl?
17:33 stevednd iggy: do you know the syntax? I can clone from a branch just fine, but not a revision or a tag
17:34 linjan joined #salt
17:34 iggy git 2015.2  <-- pulls the latest from the 2015.2 branch
17:35 stevednd yeah, that works just fine
17:35 iggy git v2014.1.10  <-- pulls the 2014.1.10 tagged release
17:35 stevednd I want to pin a specific revision
17:36 stevednd maybe I need the whole revision and not the short form
17:37 iggy the v is the important part of pulling a tag
17:39 smcquay joined #salt
17:41 stevednd is the value that appears at the end of the salt line in --versions-report not an actual git hash?
17:41 stevednd I tried finding that hash on github, and it doesn't seem to exist
17:43 baweaver joined #salt
17:44 TaiSHi Would logrotate management for nginx-formula be a good improvement?
17:44 phx really, application local logging doesn't make sense, just use syslog
17:45 KyleG splunk all the things
17:45 phx and since we have rf5424, the 2K cap is lifted, so java stuff can also shit itself into syslog
17:45 desposo joined #salt
17:46 Ryan_Lane joined #salt
17:49 beneggett joined #salt
17:50 sieve joined #salt
17:50 TheoSLC joined #salt
17:51 TheoSLC Is there a way to get salt to use systemd instead of sysvinit
17:51 TheoSLC ?
17:52 elfixit joined #salt
17:53 TheoSLC found it.  - provider: systemd
17:53 matthew-parlette joined #salt
17:54 iggy stevednd: take off the g
17:54 stevednd has anyone found iptables.append state to be broken in 2014.7.2? On a new minion I just created it is attempting to call iptables with `--fun append`, and iptables complains it knows nothing about --fun(HAR)
17:55 stevednd reverting to 2014.7.1 and things work fine
17:57 shaggy_surfer joined #salt
17:59 SheetiS joined #salt
18:00 stevednd iggy: that worked. which makes sense since g isn't hex, should probably pay attention to my copy/pasting
18:01 cwyse Hey guys, I'm trying to start salt-api with the rest_tornado module.  It fails immediately looking for the concurrent module.  I've tried pip and yum to find it but nothing.  Anyone see anything similar to this, that might know what I'm missing?
18:02 rojem joined #salt
18:02 Brew joined #salt
18:04 beneggett joined #salt
18:06 smcquay joined #salt
18:09 intellix joined #salt
18:13 MatthewsFace joined #salt
18:15 smcquay joined #salt
18:16 evilrob joined #salt
18:16 otter768 joined #salt
18:20 shaggy_surfer joined #salt
18:21 beneggett joined #salt
18:26 baweaver joined #salt
18:26 kermit joined #salt
18:27 kelt65 joined #salt
18:27 kelt65 {% if "abc" in services or "cde" in services or  %}
18:27 kelt65 sorry
18:28 kelt65 How does one make a jinja conditional like that more efficient ?
18:28 kelt65 {% if "abc" in services or "cde" in services or  "fgh" in services %} etc.
18:28 douglassssssssss joined #salt
18:31 forrest joined #salt
18:32 beneggett joined #salt
18:34 druonysus joined #salt
18:35 druonysus joined #salt
18:35 ajw0100 joined #salt
18:36 lpmulligan joined #salt
18:40 TheoSLC joined #salt
18:40 douglassssssssss joined #salt
18:43 jhauser joined #salt
18:44 nkuttler kelt65: i think jinja lets you set variables, so just make an array? #pocoo for jinja support iirc
18:44 nkuttler maybe it even supports if (foo, bar, baz) in quoo, no idea
18:45 TaiSHi forrest: ping :P
18:45 forrest sup
18:45 forrest TaiSHi: ^
18:46 TaiSHi nm, you?
18:46 forrest It's morning here
18:46 forrest so work
18:46 TaiSHi Roughly 4 pm here
18:46 TaiSHi Same
18:46 forrest What's going on?
18:46 TaiSHi I had an idea for nginx-formula
18:47 forrest okay
18:47 TaiSHi Don't know if it might be useful or not, but might be managing nginx's logrotate config file worth it?
18:49 forrest I'm okay with it as long as it goes into a unique state within the nginx formula
18:51 robawt wuddup forrest
18:51 forrest hey roba
18:51 forrest hey robawt
18:51 forrest swappin them windows
18:52 TaiSHi forrest: it would
18:52 andrew_v joined #salt
18:52 forrest TaiSHi: That sounds good to me then. I'm usually pretty laid back about adding stuff as long as it is associated with the formula and doesn't already exist elsewhere and cause a conflict.
18:53 forrest But yeah, manage nginx stuff in the nginx formula, sounds like a plan to me!
18:53 TaiSHi I'll check if there is a logrotate formula
18:53 TaiSHi I might be repeating something already done
19:01 clintber_ joined #salt
19:01 debian112 left #salt
19:04 sdm24 joined #salt
19:06 ahammond what is .buildbot-patchedprogram and why do my checkouts keep looking for it?
19:07 ahammond whoops, wrong channel.
19:08 jtang joined #salt
19:11 TaiSHi forrest: something like that exists already :( https://github.com/saltstack-formulas/logrotate-formula
19:12 GabLeRoux joined #salt
19:13 forrest TaiSHi: Yeah I've seen that before, were you planning on managing it similarly? I was figuring you were planning to extend or something
19:13 forrest or use logrotate.d
19:14 TaiSHi I was planning on logrotate.d, it has a default config but weekly and delayed compress. I had issues recently that forced me to daily/compress
19:15 bhosmer joined #salt
19:15 forrest so what's wrong with dropping it into logrotate.d? I guess I am confused.
19:16 forrest Or at least, confused as to why the logrotate formula creates a problem
19:17 TaiSHi Oh, I mean, it can be managed through another formula, I feel like I would be re-inventing the wheel needlessly
19:17 ckao joined #salt
19:19 forrest TaiSHi: Hmm, I don't think that's the case. This is a logrotate file that is unique to nginx, and associated solely with nginx
19:19 iggy you guys realize in just 2 short months we can finally tell people using ubuntu 10.04 to get stuffed?
19:19 forrest TaiSHi: I think it would be worse to impose the whole logrotate-formula on a person just to have nginx configured for logrotate.
19:21 hasues joined #salt
19:21 bash1245_ joined #salt
19:22 iggy usually distro packages will go ahead and throw a config file in /etc/logrotate.d/ just in case the user has logrotate installed
19:22 hasues left #salt
19:23 ilbot3 joined #salt
19:23 Topic for #salt is now Welcome to #salt | SaltConf 2015 is Mar 3-5! http://saltconf.com | 2014.7.2 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/
19:24 iggy my point was A. it might already be done by the distro B. When the distro packages handle it, it's handled by the individual packages (not by the logrotate package)
19:25 TaiSHi iggy: it is done by the distro, my idea is to customize it through the formula
19:26 andrew_v joined #salt
19:26 theologian joined #salt
19:27 jdesilet joined #salt
19:30 Brew joined #salt
19:31 TTimo joined #salt
19:31 Brew joined #salt
19:38 SheetiS joined #salt
19:41 amcorreia Hi, right now i'm using Salt to make a deploy of a php application, but i don't have a web interface for this. I wondering if have a web interface to integrate on Salt. I want something similar to buildmaster or deployhq, but using salt. Any idea?
19:43 iggy not knowing what either of those is... there are a few options for salt web ui's... halite (probably abandoned), saltpad, SaltStack Enterprise Dashboard, and a few others
19:44 amcorreia thx, i will check those tools
19:45 Ryan_Lane amcorreia: another option is to just make the salt calls via a normal deploy tool
19:45 Ryan_Lane either through salt-api or through peer calls or through events
19:46 amcorreia Ryan_Lane, right now i'm using a irc bot..
19:46 amcorreia but i need a web interface
19:46 Ryan_Lane well, you could allow the bot to make peer calls or salt-api calls
19:46 Ryan_Lane jenkins is an option
19:46 Ryan_Lane with the deploy pipeline plugin
19:47 amcorreia seems good, and this plugins knows if deploy is on testing environment or production?
19:48 Nazca joined #salt
19:49 andrew_v joined #salt
19:53 Nazca__ joined #salt
19:59 spookah joined #salt
20:08 perfectsine joined #salt
20:09 jhauser joined #salt
20:11 MugginsM joined #salt
20:15 TheoSLC joined #salt
20:17 otter768 joined #salt
20:18 schlueter joined #salt
20:19 warpaint joined #salt
20:20 joehoyle joined #salt
20:21 debian112 joined #salt
20:22 joehoyle once a patch is backported to 2014.7, how does installing that work? Is the update rolled out to the deb packages etc?
20:23 bhosmer joined #salt
20:26 TTimo joined #salt
20:26 bhosmer__ joined #salt
20:30 iggy I hate having to fix my own problems...
20:30 iggy joehoyle: it'll be in the next release (which I wouldn't expect till probably mid-late march
20:31 linjan joined #salt
20:31 joehoyle iggy: wouldn't that be 2015.2 then though?
20:31 iggy there should be another 2014.7.x release (after 2015.2 is out)
20:33 joehoyle ahh ok I see
20:33 joehoyle iggy: thanks!
20:34 iggy take everything I say with a grain of... salt
20:34 iggy I'm not a dev, so I have no sort of inside info
20:36 druonysuse joined #salt
20:36 druonysuse joined #salt
20:38 Gareth ahoy hoy.
20:39 JDiPierro joined #salt
20:40 joehoyle iggy: good all the same :)
20:41 andygrunwald joined #salt
20:41 robawt wuddup Gareth
20:41 * robawt highfives Gareth
20:41 josephleon joined #salt
20:43 Gareth robawt: hey hey.
20:43 baweaver joined #salt
20:48 viq joined #salt
20:51 msheiny joined #salt
20:52 sdm24 Hello everyone. Is it possible to use shell command outputs as variables in state .sls files? Specifically, I want to use dig +short (example.com) to get the IP address of a server, and use that value in a state file. I have also tried saving the command output as a file and importing/loading the file using jinja, but I got errors when I tried that
20:52 aurynn sdm24, no, it's not
20:52 TyrfingMjolnir joined #salt
20:52 sdm24 darn ok
20:53 kiorky sdm24: you can, via exec mods
20:53 josephleon joined #salt
20:53 Bateau_ joined #salt
20:53 sdm24 thank you. Could you show me in the right direction for that? I have been working with salt only for a week
20:54 kiorky sdm24: 2min (time to sketch you the two files)
20:54 sdm24 Ok thank you very much
20:55 kiorky sdm24: be sure, on the other hand, to understand where your states a re compiled (master/masterless, so either on master or minion, or local if masterless)
20:55 sdm24 I am running everything on a master, and then using "salt 'minionname' state.sls (statename)"
20:56 darien sdm24: if all you want is a hostname lookup, you can probably use socket.gethostbyname() to do the lookup as well (if you want to incorporate Python into your templates)
20:56 mdasilva joined #salt
20:56 iggy sdm24: look at salt mine
20:57 kiorky sdm24: pastebinit  /srv/salt/_modules/mymod.py
20:57 kiorky http://paste.ubuntu.com/10395874/
20:57 kiorky sdm24: so you can create a module like that
20:57 sdm24 I have tried that but it was getting errors
20:57 kiorky sdm24: then use this sls:
20:57 kiorky pastebinit  /srv/salt/a.sls
20:57 kiorky http://paste.ubuntu.com/10395878/
20:57 sdm24 not the code, I ahve tried minions
20:57 sdm24 thank you for the code
20:58 sdm24 err salt mine on the minions I mean
20:58 baweaver joined #salt
20:58 kiorky sdm24: so here i "echo" it, but you can set a variable with {% set myvar = salt['mymod.dig']() %}
20:59 iggy well, (unknown) errors aside, mine is the mechanism you want to look at for getting info about other minions
20:59 sdm24 The issue is that we are setting up new VMs with dhcp addresses, and we want to configure them with static addresses
21:00 sdm24 and we want to set the IPs different than the default dhcp ones
21:01 hemphill joined #salt
21:01 sdm24 so that there is a static DNS IP from vmware (our client for VMs) for each server
21:01 kiorky sdm24: arrnage your self for doing it with a limited --local salt-call when doing it to be sure not to loose connexion)
21:01 sdm24 so I run the script on the minion?
21:02 kiorky sdm24: your sls are already running on a minion, i do not follow you
21:02 sdm24 with the --local salt-call do I run the shell command on the minion
21:02 sdm24 sorry I misspoke
21:03 kiorky sdm24: but if you are touching low level network stack, you may have better to launch a salt-call --local on the minion (masterless) to reconfigure you network stack.
21:03 sdm24 ok
21:04 kiorky sdm24: the saltcall must be launched on the minion, yes, not on the master itself
21:04 beneggett joined #salt
21:04 sdm24 I guess my end-game idea would be to have virtual machine templates that have salt-minion installed and the config file pointing already to the master, and a minion.d/local.conf file set to the minion hostname
21:05 sdm24 so then all you had to do was log on to the master, accept the key, and run the network setup state
21:05 sdm24 but if it should be done from the minion, that is ok
21:06 kiorky sdm24: the problem with network reconfiguration is that you have an high risk of network failure which will break your minion/master channel communication line ;)
21:06 sdm24 yeah I did a few times while troubleshooting
21:06 sdm24 Thank you so much for your help
21:06 eXistenZNL joined #salt
21:07 sdm24 hopefully you won't hear from me complaining in the next few hours
21:07 josephleon joined #salt
21:07 kiorky sdm24: that s whyh i had suggest you that when the minion is connected with old conf, you prepare it to run your local reconfiguration job, master job stops or hold here, then you exec your local reconfiguration minion job, then when the minion is reconnected with new conf, you can keep on whatever is left to do.
21:08 sdm24 Ok
21:08 sdm24 That makes sense
21:08 eXistenZNL joined #salt
21:09 moped joined #salt
21:09 sdm24 Should I just save that sls file on the template, so that whenever a new minion is created it has the file?
21:11 kiorky sdm24: you should read about masterless, if you are running masterless, the saltminion will be a mix of a master and a minion, and so yes, all must be local, including the minimum fileroot, pillar & modules neccessary to execute your sls
21:11 sdm24 Ok thank you for your help
21:11 economoum joined #salt
21:11 economoum hey all
21:11 sdm24 sorry if my questions seems obvious, I just want to be 100% sure
21:11 economoum i'm running into some difficulty with salt-formula
21:12 kiorky sdm24: no problem, i m just giving you the right keywords for your related and next searchs.
21:12 economoum there's a render error in formulas.jinja
21:12 economoum not sure why
21:12 iggy economoum: paste as much as you can
21:13 economoum http://paste.debian.net/156574/
21:13 economoum let me post the pillar, too
21:14 economoum http://paste.debian.net/156575/
21:15 TheoSLC joined #salt
21:15 economoum i'm using a fork of saltstack-formulas/salt-formula, but i just did a git fetch/merge/push to grab any recent changes, and i'm still getting the render error
21:16 economoum but just in case, here's my fork of salt-formula for reference
21:16 economoum https://github.com/ibrsp/salt-formula/blob/master/pillar.example
21:16 economoum er
21:16 economoum you know what i mean
21:17 economoum iggy, i gotta run to the doctor but i'll be back on, and i'll check the irclogs too in case any one can clue me into what i'm doing wrong
21:17 kiorky economoum: search for a string with '[}'
21:18 kiorky economoum: search for a string with '{}'
21:18 economoum OK
21:18 kiorky this sounds like the formula you are using
21:18 druonysuse joined #salt
21:18 kiorky is not py26 firendly
21:18 economoum ah
21:18 druonysuse joined #salt
21:18 economoum crap
21:18 kiorky (in py26 you need index)
21:18 rgarcia_ joined #salt
21:18 kiorky ({0})
21:18 economoum i'm currently using amazon linux to host the salt master
21:18 economoum so py26
21:18 iggy that is some convoluted code
21:19 economoum not sure if i can upgrade to python 2.7
21:19 kiorky economoum: in /var/cache/salt/minion/files/base/salt/formulas.jinja replace {} by {0}
21:19 kiorky and you are done;
21:19 economoum gotcha thanks
21:19 kiorky **
21:19 economoum ok brb
21:19 economoum left #salt
21:19 hemphill Hello all. I am trying to set grain values from a master using the grains.setval command. The commands seem to be taking a fairly long time(1-3 minutes) to return. After they return the salt-minion seems to go away for 2-3 minutes. When the minion returns the new grains exist. Does anyone have any idea of what could be causing these slowdowns?
21:21 bluenemo joined #salt
21:22 Brew joined #salt
21:23 hemphill These hosts are all running an amazon EC2 instances with amazon's linux, the ports all seem to be open and everything is snappy for all  commands up until you try to interact with a grain.
21:23 diegows joined #salt
21:25 SheetiS hemphill: what salt version are you using?  I was not able to reproduce in my test environment (I use all ec2/aws) with 2014.7.1
21:26 hemphill 2014.7.1 as well
21:27 hemphill It seems long enough for something to be timing out but everything seems to be correct.
21:27 SheetiS https://bpaste.net/show/42d9d7afd288
21:27 SheetiS That's the timing I get
21:28 edrocks joined #salt
21:28 prwilson_ joined #salt
21:30 Ahlee hemphill: are you targeting minions directly, or targeting via a grain/pillar?
21:30 stylica joined #salt
21:30 hemphill targeting directly
21:30 Ahlee strange.  I've seen similar behavior when targeting via grains with minions offline/unavailable
21:31 Ahlee but never when targeting directly
21:31 ghanima joined #salt
21:31 hemphill timing a new attempt real0m41.997s user0m0.604s sys0m0.060s
21:31 iggy someone needs to work on their merges being git bisectable... ffs, just spent 2 hours tracking a (pretty major imo) bug down
21:31 beneggett joined #salt
21:32 bhosmer_ joined #salt
21:32 hemphill Sorry Ahlee I am using a grain target, I am still new to this, using something like : time salt 'EPR-LB-PF-OPS-1' grains.setval roles [haproxy]
21:32 kwatoko joined #salt
21:35 lpmulligan joined #salt
21:38 rgarcia_ joined #salt
21:39 andygrunwald joined #salt
21:40 Ahlee without specifying -G (grain match) you're using glob matching, which is what i referred to above as 'directly'
21:40 Ahlee can you launch a minion with -l debug and see what's happening?  Also salt -l debug 'EPR...' grains.setval foo bar, should give you some idea of where it's hanging, at least
21:41 hal58th joined #salt
21:41 druonysus joined #salt
21:41 druonysus joined #salt
21:43 hemphill I'll try that. thanks
21:48 smcquay joined #salt
21:49 andygrunwald joined #salt
21:51 josephleon joined #salt
21:52 druonysuse joined #salt
21:52 druonysuse joined #salt
21:52 karimb joined #salt
21:53 andrew_v joined #salt
21:53 zer0def joined #salt
21:56 andygrunwald joined #salt
21:57 peters-tx joined #salt
21:57 schlueter joined #salt
22:00 nitti joined #salt
22:02 jalaziz_ joined #salt
22:03 beneggett joined #salt
22:07 hemphill left #salt
22:07 pkirby joined #salt
22:08 hybridpollo joined #salt
22:09 rojem joined #salt
22:14 pdayton joined #salt
22:17 darien so lately, I've been getting a lot of 'Minion did not return' from a subset of servers when I do state.highstate on *, but the highstate actually runs, and I can run those servers individually
22:17 darien I'm also running 0.17.5 should I just upgrade and try again?
22:18 otter768 joined #salt
22:18 Ahlee darien: sounds like your highstate is taking longer than the CLI's timeout
22:18 Ahlee and probably yes to upgrading (though i'm also standing firm on 0.17.5)
22:18 aquinas joined #salt
22:18 darien Ahlee: 8 seconds, seems okay?
22:18 darien when I run highstate on * it times out after a LOT longer
22:20 iggy upgrade and possibly up the timeout (mine is 30 seconds because GCE's networking sucks donkey balls)
22:21 darien iggy: if I run an individual minion which has timed out before, it finishes properly in 8s; if I run a full highstate on everything, it fails some of them after 1m43s
22:21 darien but the rest all finish within about 8s
22:21 darien if I upgrade, should I upgrade the master first or the minions?
22:22 iggy I think you'll have to upgrade in stages (if you are trying to do a rolling upgrade)
22:22 iggy and master first
22:22 darien thankfully we don't have SO MANY servers that I can't recover if salt goes offline
22:22 iggy like you'll have to go 0.17 -> 2014.1 -> 2014.7 -> 2015.2 (when it's out)
22:22 darien hmm
22:23 darien so master to 2014.1, minions to 2014.1, master to 2014.7, minions to 2014.7 ?
22:24 mosen joined #salt
22:24 giantlock joined #salt
22:27 shaggy_surfer joined #salt
22:27 iggy that's what I'd do
22:28 iggy I think if you tried to jump straight to 2014.7, you'd  have issues
22:28 josephleon joined #salt
22:31 jacksontj iggy: yt?
22:31 iggy jacksontj: yes
22:31 jacksontj for issue 19658, i can't seem to repro your issue
22:31 jacksontj custom grains work fine for me...
22:31 jacksontj i just made one which always returns something
22:31 jacksontj on develop at least
22:32 jacksontj oh, your problem is during orchestrate though..
22:32 jacksontj if you run salt-call grains.get GRAIN_NAME is it there?
22:32 iggy yes
22:32 iggy it is not there in pillars
22:32 jacksontj ?
22:32 iggy I had a pretty short reproducer in the bug report
22:33 nesv joined #salt
22:33 jacksontj let me pull that down-- but onlyin orchestrate you see the probme?
22:33 jacksontj *problem
22:33 iggy no, I see it on the command line
22:34 jacksontj i get a traceback from that gce module
22:34 iggy grains.get shows it, pillar.get of something with a grain variable in it doesn't
22:34 jacksontj hmm, i guess I have to set something else?
22:35 Singularo joined #salt
22:35 iggy are you on GCE? It queries GCE metadata servers
22:35 jacksontj i guess not since i'm not sure what that is ;)
22:35 jacksontj but if you make a simple custom grain do you see the same problem?
22:35 jacksontj (just trying to come up with a smaller case to repro locally)
22:36 jacksontj so, its not available in "an orchestrate runner we use", how do you access grain values in your runner?
22:38 iggy if I change the ocsenv grain to "def gce_proj_metadata():\n    return {'ocsenv': 'dev'}" (about as simple of a custom grain as you can get) it fails similarly
22:38 iggy it isn't available in orchestrate, but I also found it's not available in pillars
22:38 iggy the pillar one seemed easier to reproduce
22:38 jacksontj k, so let me try the pillars things
22:38 jacksontj yea
22:41 jacksontj hmm, and you say this worked before? do you have a version that it worked?
22:42 iggy yes... just before that first commit that is mentioned in the git bisect log
22:42 iggy v2014.7.0rc1 is where I started bisecting
22:43 forrest joined #salt
22:43 jacksontj k, i can repro-- let me dig in some ;)
22:45 iggy I think you should be good, but I pasted the grain file and the "correct" output to the bug
22:46 mpanetta joined #salt
22:47 mpanetta joined #salt
22:50 bhosmer_ joined #salt
22:51 rgarcia_ joined #salt
22:52 baweaver joined #salt
22:54 _JZ_ joined #salt
22:54 toddnni joined #salt
22:56 kermit joined #salt
22:56 prwilson joined #salt
22:58 spookah joined #salt
23:00 druonysus joined #salt
23:00 druonysus joined #salt
23:00 eightyeight joined #salt
23:04 ghanima joined #salt
23:08 rojem joined #salt
23:11 jacksontj iggy: got it ;)
23:11 jacksontj you say this affects 2015.2 right?
23:11 iggy good, hopefully it gets into 2015.2
23:11 iggy yes
23:12 jacksontj k, let me open the PR ;)
23:12 jacksontj actually, let me see about a test case real quick
23:12 jacksontj this seems like a feature-- so it should have one ;)
23:13 jacksontj hmm, nothing seems to test the master _pillar func :/
23:13 iggy shocking...
23:14 jacksontj well, the unit tests for pillar cover *most* everything
23:14 jacksontj except this specific magic ;)
23:18 jacksontj iggy: https://github.com/saltstack/salt/pull/21001
23:18 Singularo joined #salt
23:18 jacksontj basically they were modifying a bunch of globals in the _pillar call (which is *magic*)
23:18 Singularo joined #salt
23:18 jacksontj but since the underlying object changed it all broke
23:18 jacksontj so, this new way lets the loader class deal with it-- which is *much* cleaner
23:18 jacksontj *and* works :
23:18 jacksontj )
23:19 bhosmer joined #salt
23:19 bhosmer joined #salt
23:19 jacksontj iggy: i'm not sure how orchestrate gets the grains... if it uses a similar mechanism then its fine-- but it might still need some fixing
23:20 jacksontj where you using the *regular* orchestrate stuff?
23:20 jacksontj the issue sounds like you had a custom one?
23:20 iggy custom grain in my orchestrate sls files
23:20 lpmulligan joined #salt
23:21 aparsons joined #salt
23:21 jacksontj do you have something set up to test that patch for the orchestrate case?
23:22 druonysus joined #salt
23:22 p0rkbelly joined #salt
23:22 jacksontj err.. has orchestrate ever worked?
23:22 jacksontj i don't see how it could....
23:23 jacksontj in its current incarnation at least
23:26 iggy It did at one point, I don't know when exactly it broke
23:26 iggy (it was broken before this was
23:26 jacksontj i just don't quite see how it would work... but i haven't really messed with this orchestrate stuff
23:27 jacksontj iggy: do you have an sls for an orchestrate that you expect to work?
23:27 andrew_v joined #salt
23:27 jacksontj from looking at the code I don't see how that ever worked, since the main SLS is master-wide
23:27 jacksontj not for a specific minion
23:28 iggy I do
23:28 jacksontj most i think you can do in an orchestrate file is to targeting with a grain
23:29 iggy I use that ocsenv grain all over the place
23:29 iggy we actually have 3 totally different clouds (each with it's own master) but they share a common state and pillar repo
23:30 iggy If that's not expected to work, A. document it as such B. I can work around it
23:31 jacksontj Well, i don't see anywhere in there that says you have access to salt (the global) or anything similar, so if you do we *might* be able to get it to work ;)
23:32 druonysus joined #salt
23:34 shoemonkey joined #salt
23:34 primechuck joined #salt
23:37 druonysus joined #salt
23:37 druonysus joined #salt
23:38 _JZ_ joined #salt
23:39 pacopablo anyone know how salt handles authentication to a git repository used as a pillar source?
23:40 subsignal joined #salt
23:42 druonysus joined #salt
23:43 douglassssssssss joined #salt
23:43 theologian joined #salt
23:46 druonysuse joined #salt
23:46 druonysuse joined #salt
23:51 nesv left #salt
23:51 iggy pacopablo: depends what gitfs backend you are using... with gitpython you have to setup keys
23:55 pacopablo pygit2
23:56 pacopablo I have a repo working as a fileserver backend for states
23:56 johtso joined #salt
23:56 pacopablo created another repos for pillars
23:56 MugginsM joined #salt
23:56 kanaka_ joined #salt
23:57 pacopablo do I have to specify that repo as a fileserver backend first? and then put it in ext_pillar ?
23:58 kanaka__ joined #salt

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