Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-06-03

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

All times shown according to UTC.

Time Nick Message
00:02 Llamachka88 joined #salt
00:03 cedwards joined #salt
00:03 Llamachka88 left #salt
00:03 cedwards joined #salt
00:08 baweaver|work joined #salt
00:10 bfoxwell joined #salt
00:13 mpanetta joined #salt
00:13 baoboa joined #salt
00:14 mpanetta joined #salt
00:18 MatthewsFace joined #salt
00:18 dkrae joined #salt
00:18 murrdoc joined #salt
00:19 mosen yo murrdoc
00:24 NIXOYE joined #salt
00:25 smcquay joined #salt
00:30 zz_ashmckenzie joined #salt
00:32 MindDrive Good f-ing grief, how the HELL does one set the place gitfs checks out its files to?  I thought 'gitfs_mountpoint' was it, but apparently not.
00:34 geekatcmu joined #salt
00:34 geekatcmu left #salt
00:35 badon joined #salt
00:39 iggy you can't
00:39 iggy it's always in /var/cache/salt/master/gitfs (or wherever)
00:40 iggy and realistically, gitfs doesn't actually checkout the files
00:40 iggy it accesses the object directly
00:41 MindDrive Well, that's completely and utterly useless for me, then, unless somehow the minions magically know how to grab things from it.
00:41 baweaver_ joined #salt
00:41 MindDrive (I was going to use it to keep my Salt custom modules up-to-date, but apparently that's not going to work.)
00:41 iggy of course they do
00:41 iggy the minions pull from the master's fileserver
00:42 iggy the master aggregates all of your configured backends into one big namespace
00:45 MindDrive So does this mean with gitfs set up, I don't need to manually (or through something like reactor, unless I want faster responses) synchronize the custom modules?
00:46 iggy (the modules in) your git tree will be synced once a minute
00:46 timoguin Eh? Does sync_all run on a schedule by default now?
00:46 iggy then the minions pull them down every time you run sync_modules or highstate
00:46 timoguin yea
00:46 timoguin disregards me
00:46 iggy yeah, sorry, my first sentence was referring to how often the master syncs the gitfs backend
00:47 ek6 or sync_all   which i prefer since it grabs custom states as well
00:47 iggy sure, sync_all works too
00:47 MindDrive My root directory in the Git repo was '_modules' (which is what I had under /srv/salt when I was doing this more manually), is that still correct?
00:49 baweaver_ joined #salt
00:49 iggy so your repo has a directory called _modules or it has no directory at all?
00:49 MindDrive The former.
00:49 iggy then you should be good
00:51 MindDrive Okay, now to remove the old directory and see if this still works... thanks.
00:51 iggy salt-run -l debug fileserver.update
00:51 iggy salt-call cp.list_master
00:51 iggy those will be your friends
00:57 MindDrive Okay, it worked.  Now to clean up the mess of a config in Puppet to get these changes in place (no, don't ask about Puppet, very long story).
01:01 ageorgop joined #salt
01:03 iggy this is a judgement free zone
01:03 iggy not really... we've all deemed you unfit to carry on
01:11 murrdoc1 joined #salt
01:11 hasues joined #salt
01:11 hasues left #salt
01:12 pdayton joined #salt
01:13 jalaziz joined #salt
01:14 jespada joined #salt
01:16 murrdoc joined #salt
01:17 sunkist joined #salt
01:22 druonysus joined #salt
01:23 murrdoc joined #salt
01:28 druonysus joined #salt
01:29 N-Mi joined #salt
01:29 N-Mi joined #salt
01:30 david_an111 joined #salt
01:35 al joined #salt
01:35 beauby joined #salt
01:41 yexingok joined #salt
01:45 murrdoc joined #salt
01:48 MindDrive Heh... short version: already have a massive infrastructure in place for Puppet for configuration, switching would take months of man-hours from multiple people.  For orchestration, however, we dumped MCollective and are trying to get Salt fully into place.
01:49 MindDrive Hurm... does gitfs also populate /var/cache/salt/minion/files/base?  I removed the _modules directory there and it repopulated itself even though nothing's left in /srv/salt...
01:52 dustywusty joined #salt
01:54 MindDrive (Will check in tomorrow)
01:54 otter768 joined #salt
02:01 iggy MindDrive: yes, that all comes from the master fileserver (which in your case now includes _modules via gitfs)
02:02 iggy MindDrive: so the master doesn't checkout the git tree, but the minion still ends up with a "checked out" copy
02:06 viq joined #salt
02:07 murrdoc1 joined #salt
02:08 beauby joined #salt
02:09 murrdoc joined #salt
02:13 dannycast joined #salt
02:14 dannycast left #salt
02:14 dannycast joined #salt
02:14 dannycast left #salt
02:16 rocket joined #salt
02:17 salty_to_the_cor joined #salt
02:17 salty_to_the_cor is there anyway i can use file.recurse to copy directory/files not in salt roots
02:21 __number5__ TIL: if s3 file link have a permission issue, salt will put "Access Denied" xml as the file and give you an checksum mismatched error :(
02:35 iggy that's like the 3rd person to ask that in the last couple days
02:35 iggy salty_to_the_cor: sadly, no
02:35 salty_to_the_cor if i use file.copy, source dosent need to be in file roots, but in case of file.recurse it seems
02:35 salty_to_the_cor any reason such a technical distinction was made? iggy:
02:36 iggy no clue
02:36 salty_to_the_cor or is there any other way to go past this?
02:36 iggy just cmd.run
02:37 salty_to_the_cor ah! thanks!
02:38 penguinpowernz joined #salt
02:38 salty_to_the_cor also do u know of any way to check the response code of an url? like say using wget etc? i dont want to usee check module
02:39 iggy for what?
02:39 iggy there's states.http.query
02:41 salty_to_the_cor i have a case only if a url is up do somehting
02:42 salty_to_the_cor ah thanks, states.http.query works for me
02:43 dustywusty Does anyone have much experience with the salt event stack? I'm having some trouble catching an event on a minion, sent from the master, in a python script .. and I'm not even sure this is a valid use case ;o
02:44 iggy dustywusty: minions don't process events, only the master does
02:44 iggy (for now)
02:44 dustywusty that's kind of what i figured :<
02:45 iggy the master can have the minions do things based on the event on the master though
02:45 dustywusty yeah, i'm really happy with how the reactor system works
02:46 iggy at the conference they said at some point the minions will be able to react to events too
02:46 iggy doesn't actually help you now though
02:46 dustywusty but what would be amazing is if i could take advantage of the event system on my app servers to do things like, have a minion service event that something occurred and have other minions react to it
02:46 dustywusty that's good to hear though iggy :)
02:48 beauby joined #salt
02:52 NIXOYE joined #salt
03:04 scarcry joined #salt
03:09 beauby joined #salt
03:12 Aidin joined #salt
03:15 clintberry joined #salt
03:16 bin_005 joined #salt
03:21 ajw0100 joined #salt
03:26 pannon joined #salt
03:27 pannon is there a delay option in salt for restarting services after config change?
03:28 pannon tried salt -b but need something more sophisticated
03:32 favadi joined #salt
03:32 evle joined #salt
03:43 seev you could modify the RC script and insert a sleep
03:46 joeto1 joined #salt
03:47 desposo joined #salt
03:48 desposo1 joined #salt
03:54 favadi joined #salt
03:55 otter768 joined #salt
04:23 iggy the docs suggest at
04:24 ek6 i just use at...and it works..for what it is
04:28 linjan joined #salt
04:40 res0nat0r joined #salt
04:41 res0nat0r joined #salt
04:44 cruatta joined #salt
04:47 cruatta joined #salt
04:48 cruatta_ joined #salt
04:49 ramteid joined #salt
04:53 timoguin_ joined #salt
05:05 cruatta joined #salt
05:05 catpigger joined #salt
05:07 pdayton joined #salt
05:27 p66kumar joined #salt
05:28 stephanbuys joined #salt
05:28 baoboa joined #salt
05:31 evidence joined #salt
05:35 TOoSmOotH joined #salt
05:41 ramaseshan joined #salt
05:41 rdas joined #salt
05:45 pdayton joined #salt
05:46 TyrfingMjolnir joined #salt
05:56 otter768 joined #salt
05:57 AndreasLutro joined #salt
05:58 epcim_ joined #salt
06:10 colttt joined #salt
06:10 Amit___ joined #salt
06:11 golodhrim joined #salt
06:11 Amit___ Is there any way minion can automatically sync up with states files /returners on master
06:13 Amit___ I know we can achieve it by saltutil.sync_all from Master but what if minions are still not up and are trying to authenticate.
06:19 flyboy joined #salt
06:19 impi joined #salt
06:20 bluenemo joined #salt
06:22 ggoZ joined #salt
06:23 KermitTheFragger joined #salt
06:31 the_lalelu Amit___: maybe you  want to take a look at the reactor part of saltstack? there you can act on several events (like minion register, minion authenticate, etc pp)
06:32 the_lalelu Amit___: http://docs.saltstack.com/en/latest/topics/reactor/
06:33 favadi joined #salt
06:33 Amit___ the_lalelu: Thanks. I will check this one but can't we use salt-call command on minion to get the states once salt minion is ready.
06:37 Amit___ the_lalelu: salt-call event.send 'foo' '{overstate: refresh}'
06:42 joeto joined #salt
06:46 p66kumar joined #salt
06:49 pdayton joined #salt
06:49 binocvlar joined #salt
06:59 scoates_ joined #salt
07:01 ITChap joined #salt
07:02 kawa2014 joined #salt
07:10 arount joined #salt
07:11 Guest86132 left #salt
07:23 jeanneret joined #salt
07:25 jeanneret Hi I try to configure a syndic server but I got the error "Failed to persiste the updated schedule" I configure only the name of the masterofmaster and the ret port and the order_master on the masterofmaster
07:25 jeanneret Is it another things to configure? thanks in advance
07:26 stephanbuys joined #salt
07:27 linjan joined #salt
07:28 supersheep joined #salt
07:28 babilen jeanneret: I don't necessarily see how that error is related to your syndic setup, but: Can you write to <<configdir>>/minion.d/_schedule.conf as the user salt runs as? Which user does salt run as? *When* do you get that error?
07:30 jeanneret I got this error when I run the command salt-syndic
07:30 jeanneret I dont have a minion.d directory
07:31 eseyman joined #salt
07:34 iwishiwerearobot joined #salt
07:37 cberndt joined #salt
07:47 jeanneret The relation of the syndic and the master doesn't work
07:50 babilen Well, the fact that you don't have that directory would explain why it cannot write to a file there. I don't think that that is related to the inability to use syndic though. Are you starting it in debug mode?
07:50 babilen How do you test if that connection works?
07:56 stephanbuys left #salt
07:57 otter768 joined #salt
08:02 c10b10 joined #salt
08:03 c10b10 joined #salt
08:06 julez joined #salt
08:08 julez joined #salt
08:15 Grokzen joined #salt
08:16 DjDeaf joined #salt
08:17 DjDeaf Hi, Is it a best practive to have a really long sls?
08:17 DjDeaf around 200 lines.
08:17 DjDeaf and let's say 20 states
08:18 dustywusty joined #salt
08:20 AndreasLutro it depends, if you want to you can split those up and use includes
08:21 DjDeaf I don't mind really, it can stay long - just wondered if that's how you do things be common practices
08:22 AndreasLutro I don't think short state files should be an end goal, it's probably fine
08:25 stephanbuys joined #salt
08:26 dr4Ke joined #salt
08:28 s_kunk joined #salt
08:29 slav0nic joined #salt
08:29 s_kunk joined #salt
08:30 s_kunk joined #salt
08:30 linjan joined #salt
08:30 VSpike Has anyone tried building AWS Route53 private hosted zones for internal DNS using salt mine? Know of any examples online?
08:32 DjDeaf why not use cloudformation alond with salt?
08:34 VSpike DjDeaf: I was wondering about that
08:36 markm joined #salt
08:37 iwishiwerearobot joined #salt
08:37 VSpike How does that work? And how well does it work? I've mostly done phase 1 of salt ... building states to configure servers. Now taking tentative steps beyond that .. using mine data instead of static data in pillar. Using salt-cloud to spin up boxes. But its rudimentary stuff on the journey to fully automated orchestration.
08:38 CeBe joined #salt
08:38 VSpike I haven't quite figured out where all the pieces fit together at that level, specifically around AWS .. things like building VPC automatically, setting up route 53, etc. Could script it with CLI, could try to do it with salt, or could try to use cloudformation
08:38 DjDeaf And what information do you need to get from salt?
08:38 VSpike And probably other ways
08:38 VSpike But haven't had a chance to look into it in depth yet
08:39 DjDeaf You can use salt to build the cloudformation JSON and deploy it
08:39 DjDeaf but rely on CF, it's there for a reason.
08:39 VSpike Oh, that's neat.
08:39 DjDeaf I've never done it, but it should be exactly what you need
08:39 VSpike When you create machines with CF, how do you get salt to bootstrap and configure them without manual intervention?
08:39 DjDeaf (via salt i mean)
08:40 DjDeaf CF is a big JSON which define all of your env, including instances, elbs, vpc, whatever.
08:40 VSpike yep
08:40 DjDeaf Use salt to create it using the data you need, and just cmd.run the command
08:40 DjDeaf the command = aws tool for create CF
08:41 DjDeaf that's how you autromatre it
08:41 VSpike But once the instances are created, you need to get a salt minion on them, add they keys and call a highstate
08:41 VSpike Something salt-cloud can do completely
08:42 julez joined #salt
08:43 oravirt joined #salt
08:50 jeanneret I got the same bug : https://github.com/saltstack/salt/issues/23233#event-314205784 but there is no answer can anyone help me please? On the master of master I got the computer that is connected on my syndic but I got minion dit not return when I try a ping
08:50 stephanbuys joined #salt
08:58 bin_005 joined #salt
09:02 sgargan joined #salt
09:02 bin_005 joined #salt
09:03 stephanbuys joined #salt
09:08 ksj I'm looking for an option in file.recurse that would only copy the file if it doesn't exist, not if it's changed. I can't see anything. Does such a thing not exist?
09:09 c10b10 joined #salt
09:09 arount joined #salt
09:10 arount Hi, I would like create a state that loop in specific folders, extract data in folder, compute it and output a formated config file (for nagios)
09:11 arount What is the simply and sexy way to do it ?
09:11 arount babilen: (hey, you see ? XY probleme ? I learn my lesson huh !)
09:14 kawa2014 joined #salt
09:19 stevednd joined #salt
09:23 markm_ joined #salt
09:28 sk_0 joined #salt
09:29 Hazelesque If I want to find all the python virtualenvs on my minions, and then for each, check the version of requests installed in each
09:29 Hazelesque what's the "saltiest" way to do that?
09:30 Hazelesque my unixy gut instinct is to use "salt '*
09:31 Hazelesque my unixy gut instinct is to use: salt '*' cmd.run "find / -type f -wholename '.*/bin/activate'"
09:31 Hazelesque but maybe from a python script on the salt-master, using the client API
09:32 Hazelesque and then chop the last two components off, and then ask each minion what's in it's virtualenv using the execution module command pip.list?
09:32 Hazelesque but is there a better way?
09:33 Hazelesque can I "chain" commands with salt, to make a second command use the result(s) of the first?
09:33 Hazelesque can I have, idk, the "salt mine" keep track of all virtualenvs on every system, and then use that for this query?
09:34 penguinpowernz joined #salt
09:38 TheHelmsMan joined #salt
09:40 penguinpowernz joined #salt
09:41 TheHelmsMan left #salt
09:43 p66kumar joined #salt
09:44 fredvd joined #salt
09:53 supersheep joined #salt
09:54 VSpike joined #salt
09:58 otter768 joined #salt
10:03 N-Mi joined #salt
10:03 N-Mi joined #salt
10:04 Auroch joined #salt
10:07 kawa2014 joined #salt
10:09 c10b10 joined #salt
10:16 Jimlad joined #salt
10:19 julez joined #salt
10:21 akafred I am running "2014.7.6" but still getting an error that should be fixed - according to https://github.com/saltstack/salt/issues/20921 Any ideas how that can happen? salt --version says  2014.7.6 (Helium) ...
10:26 fl0w0lf joined #salt
10:27 AndreasLutro akafred: can you put the exact error you're getting on a gist/pastebin?
10:27 akafred Will do
10:32 giantlock joined #salt
10:33 fl0w0lf Hello!
10:33 fl0w0lf I want to add ferm rules conditionally of packages I have installed (e.g. apache, opening ports 80 and 443)
10:33 fl0w0lf I'm using (https://github.com/bechtoldt/saltstack-ferm-formula)
10:33 fl0w0lf what is the 'salt way' to do that?
10:33 fl0w0lf would I add files to put into /etc/ferm/conf.d into the apache.sls or should I do it in another way?
10:33 akafred AndreasLutro: https://gist.github.com/akafred/4d25fde90cb119b14d53
10:36 ctolsen joined #salt
10:37 epcim_ joined #salt
10:37 AndreasLutro akafred: I think you're supposed to do - name: busybox - tag: latest
10:38 AndreasLutro though the tag: latest is the default, so you can omit it
10:39 akafred Ah. It worked on 2014.7.0 ... but I can rewrite. (yeah I know that latest is default, but it doesnt work with mysql:5.6.21 either).
10:40 Hazelesque hrm....
10:40 AndreasLutro it's possible that what you did worked because of the bug that was fixed
10:40 Hazelesque so I'm managing to use a cmd.run job to do a "find"
10:40 Hazelesque but then I'm generating a bunch of pip.list jobs
10:41 Hazelesque one per (minion, virtualenv_path) pair
10:41 Hazelesque and of course each one has a different jid
10:42 akafred AndreasLutro: Works. Excellent. Tusen takk ;-)
10:42 Hazelesque and all the built in functions in salt.client.LocalClient are based on the assumption that I'll be looking to asynchronously get results as each minion returns them... **for one JID**
10:42 AndreasLutro værsågod :D
10:42 Hazelesque afaict
10:42 Hazelesque I'm trying to avoid just copypasting half of salt/client/__init__.py and hacking it to take lists of jids >_>
10:42 Hazelesque any good suggestions?
10:43 Hazelesque is there a "right way" to asyncronously get results for lots of JIDs?
10:43 Hazelesque should I be writing a custom module so that I don't have to a different job specification per (minion, virtualenv_path)?
10:43 Hazelesque and thus get to have one JID?
10:50 ctolsen I'm trying to set up remote login through the cherrypy rest api. I can log in with the credentials as a local user, and by using salt -a. However, the rest api complains that "Configuration for external_auth could not be read" with a 500 error
10:50 ctolsen If I use wrong credentials it gives me a 401 as expected.
10:50 ctolsen What could be wrong here?
10:50 bluenemo joined #salt
10:50 bluenemo joined #salt
10:55 ndrei joined #salt
10:55 unixlike_vnm joined #salt
10:55 unixlike_vnm Hi there !
10:55 unixlike_vnm i just trying to add new repository to opensuse via python console
10:58 unixlike_vnm i am using this command
10:58 unixlike_vnm local.run_job("5d2d8ba617d6","pkg.mod_repo", {'opensuse_11227': {'keeppackages': False, 'name': 'opensuse_11227', 'mirrorlist': 'http://download.opensuse.org/distribution/12.3/repo/oss/', 'url': 'http://download.opensuse.org/distribution/12.3/repo/oss/' , 'baseurl': 'http://download.opensuse.org/distribution/12.3/repo/oss/'  , 'enabled': True, 'ali
10:58 unixlike_vnm as': 'opensuse_11227', 'gpgcheck': True, 'type': 'yast2', 'autorefresh': True}})
11:00 sgargan joined #salt
11:00 unixlike_vnm new repository is creating after this command but repository file does not contain baseurl/url/mirrolist entry
11:10 stevednd joined #salt
11:10 c10b10 joined #salt
11:10 linjan joined #salt
11:12 ponpanderer joined #salt
11:13 c10b10 joined #salt
11:16 Nazzy wow ... I've received some odd spam on IRC, but I think this is the first time someone has sent me a PM asking me to convert to a religion
11:17 AndreasLutro :D
11:18 Nazzy I wonder if this is where proselyting religions are heading... instead of people like the JWs and LDSs going door to door trying to convert us, they'll start going skype to skype or blog to blog
11:20 Nazzy (for avoidance of doubt, I have no issue with either group or their representatives; I quite like talking to the door to door peeps as long as they're not "aggressive" in their approach)
11:34 donmichelangelo joined #salt
11:35 sgargan joined #salt
11:44 rvankleeck joined #salt
11:45 Pulp joined #salt
11:51 ggoZ joined #salt
11:59 otter768 joined #salt
12:04 yawniek whats the best way to distribute ssh private keys via pillars?
12:06 dRiN joined #salt
12:14 arount Viewed in doc: "Salt is born of the purest of parents: the sun and the sea.". Hum .. ok
12:21 rubenb Well, leave seawater in the sun and all that remains is salt.
12:23 sgargan joined #salt
12:27 tmclaugh[work] joined #salt
12:31 unixlike_vnm joined #salt
12:38 supersheep joined #salt
12:42 ajw0100 joined #salt
12:42 dexter91x joined #salt
12:44 c10b10 joined #salt
12:44 dexter91x is there any way to access the master configuration while running a custom module ? , lets say i set a value of api_key on salt master stored in /etc/salt/master.d/api_keys.conf (because i don't to store it on minion for a better security), can the custom module get its value from master configuration ?
12:49 Heartsbane joined #salt
12:51 bhosmer joined #salt
12:52 primechuck joined #salt
12:53 dexter91x .
12:53 primechu_ joined #salt
12:54 pdayton joined #salt
12:57 sgargan joined #salt
12:58 c10b10 joined #salt
13:00 cedwards joined #salt
13:02 sgargan should it be possible to reference pillar data from one pillar in another pillar?
13:02 malinoff sgargan, nope
13:02 totte joined #salt
13:02 sgargan is there are reason?
13:03 AndreasLutro sgargan: works for me
13:03 AndreasLutro order in top.sls matters, obviously
13:03 sgargan do you have any problems with the order of how they are resolved?
13:03 AndreasLutro nope, the order seems to always be the one I specify in top.sls
13:04 AndreasLutro I think it's fairly recent though, it didn't work in 2014.7
13:04 sgargan i have a pillar i define all my ports in, I ref these in other pillars, the ports pillar is before the other pillars in the top file
13:04 julez joined #salt
13:05 sgargan running with 2015.5
13:06 jeremyr joined #salt
13:06 sgargan AndreasLutro: do you use the array syntax or the get syntax?
13:07 AndreasLutro now that I think about it I remember having this conversation before and realizing I don't actually use pillar data in pillars
13:09 AndreasLutro yeah sorry I lied :(
13:10 dexter91x can i access remote master configuration inside a custom module when i run it?
13:12 drawsmcgraw dexter91x: I'm nearly certain there are some salt calls for grabbing the master config.... one second
13:12 malinoff sgargan, https://github.com/saltstack/salt/issues/6955
13:13 fredvd joined #salt
13:13 sgargan thanks malinoff i was just reading that ;)
13:15 dexter91x drawsmcgraw: if you mean salt.config.master_config() i think it retreive the default , but not what i have inside /etc/salt/master.d/
13:16 drawsmcgraw dexter91x: Ah, that's probably what I was thinking of... Though anything inside master.d should be rolled into the Master's config, right?
13:16 drawsmcgraw Stupid question -> your files inside /etc/salt/master.d/ end in '.conf', yeah?
13:17 racooper joined #salt
13:19 cpowell joined #salt
13:20 drawsmcgraw joined #salt
13:20 dexter91x drawsmcgraw: yes , can a custom module run a salt-run on master then store the result in a variable ?, my case is a bit complicated as i don't wanna store an api key on the minion for security reason
13:21 drawsmcgraw dexter91x: I think the answer is "Yes, somehow"
13:22 drawsmcgraw Would the Salt Mine be a good place for that?
13:22 drawsmcgraw The data stays on the master, BUT, as I understand it, any minion can access the mine.
13:22 drawsmcgraw Also, I'm assuming you're not comfortable with using Pillar for similar reasons?
13:23 ITChap joined #salt
13:25 huddy joined #salt
13:28 dexter91x yes pillars also cached on the minion
13:29 dexter91x joined #salt
13:29 _JZ_ joined #salt
13:29 dexter91x what about peer communication ? i haven't used it but will it store something on the minion ? if not i may be able to make every minion run it on him self and store the result if this could be possible
13:30 elfixit joined #salt
13:31 drawsmcgraw That'd be interesting.... Where each minion just pulls the api key off of the minion that lives on the master, via peer comms?
13:31 drawsmcgraw I'm not very familiar with the peer communication. But... if it stores the api key on the minion anyway, isn't that about the same result as using Pillar?
13:32 drawsmcgraw As I understand it, salt-mine calls are not cached (though I could be wrong)
13:32 drawsmcgraw The minion running on the master could have access to the api key, store it in the salt-mine, and any other minion that needs that api key can pull it out of the salt-mine.
13:32 elfixit joined #salt
13:34 dexter91x in other words: if i want to check if a minion is listed on my digital ocean droplets, so i want the minion to ask the master am i listed? then master says "Yes" or "No", then the custom module will continue the execution after storing the answer , then i should see a result says : minion1: I am not listed on digital ocean
13:35 sgargan joined #salt
13:38 s0lar hi guys, anyone know if from 2015.5.1, salt-minions have a child process started as well? looks like two processes in ps -ef, it didn't do that before I upgraded
13:38 drawsmcgraw So if I understand correctly -> You have a situation with *lots* of droplets-with-minions on DO. You want a given droplet to know if it belongs to your account before taking further action.
13:38 drawsmcgraw That about right?
13:39 dexter91x yes , and i don't want to store the api key on minion to be more secured
13:40 impi_ joined #salt
13:40 drawsmcgraw And the way for a minion to know if it belongs to your account, is to query the DO api, correct?
13:40 dexter91x yes
13:41 drawsmcgraw Taking a different angle of attack... would it be feasible to store a list of minions that belongs to you somewhere? Say, Pillar?
13:41 drawsmcgraw Then the question turns into "Am I in this list of droplets?"
13:41 drawsmcgraw Especially if you're using salt-cloud... I can imagine something automatically updating that list of droplets
13:42 dexter91x ummmm
13:42 saifi joined #salt
13:42 drawsmcgraw Or a scheduled job on the Master. The master can query the api, fetch a list of droplets, then store that list <somewhere. Either the Mine, Pillar, or somewhere else.
13:42 drawsmcgraw And now that you're no longer having to distribute sensitive data, you're free to use things like Pillar, etc...
13:43 dexter91x :D
13:43 drawsmcgraw Just throwing out ideas. Might not be what you're after
13:44 sgargan malinoff: is it possible to combine pillar variables in a single pillar file? foo_home: blah conf_dir: conf foo_conf: {{pillar[‘foo_home’]}}/{{pillar[‘conf_dir’]}}
13:44 sgargan i’d hope that foo_conf would be blah/conf
13:45 perfectsine joined #salt
13:46 dexter91x will it looks more secure.. but maybe instead of generating a list , i could add the result as a pillar ?
13:46 malinoff sgargan, no, refer to the issue i pointed above
13:46 dexter91x as a grain item* sorry
13:47 drawsmcgraw dexter91x: Sure. Whatever's the easiest/simplest mechanism for your case.
13:47 rdas joined #salt
13:49 dexter91x thanks for the help (Y)
13:49 TyrfingMjolnir joined #salt
13:49 sgargan malinoff: is there a best practice for overriding pillar data? how do you avoid duplicating data?
13:49 penguinp1wernz joined #salt
13:50 drawsmcgraw Glad to help. Good luck!
13:54 drawsmcgraw So... on 2015.5.0, all new minion installations have a file, /etc/salt/minion.d/_schedule.conf
13:54 drawsmcgraw It only has one entry (__mine_interval update), but... I wasn't expecting to see that file
13:54 drawsmcgraw Anyone else seen such a thing or did I automate something and forget that I did it?
13:55 hasues joined #salt
13:55 pdayton joined #salt
13:56 hasues left #salt
13:58 julez joined #salt
13:59 permalac joined #salt
14:00 otter768 joined #salt
14:01 peters-tx joined #salt
14:03 unixlike_vnm hi there again !
14:03 DjDeaf How can i watch a cmd.run in sls?
14:03 unixlike_vnm could someone fix this string in /salt/modules/zypper.py
14:03 unixlike_vnm base_url = _urlparse(repo_meta['baseurl'])
14:04 unixlike_vnm i suppose that it should contain get
14:05 andrew_v joined #salt
14:05 yidhra_ joined #salt
14:06 drawsmcgraw unixlike_vnm: Is it giving you some problems? You may get a little better traction with an issue and/or PR on Github
14:06 unixlike_vnm no . there no problem for me
14:07 unixlike_vnm i just notified about this issue
14:07 mohae joined #salt
14:07 drawsmcgraw I see. Yeah, unchecked dictionary reference just makes you a little nervous? :)
14:08 unixlike_vnm ))))
14:10 yidhra_ joined #salt
14:14 numkem_ joined #salt
14:15 jdesilet joined #salt
14:18 p66kumar joined #salt
14:20 rdxc joined #salt
14:22 smcquay joined #salt
14:22 yidhra_ joined #salt
14:24 pdayton joined #salt
14:27 rdxc joined #salt
14:34 yidhra_ joined #salt
14:34 lothiraldan joined #salt
14:36 sunkist joined #salt
14:36 favadi joined #salt
14:38 Brew joined #salt
14:45 pdayton joined #salt
14:47 yidhra_ joined #salt
14:49 murrdoc joined #salt
14:49 rojem joined #salt
14:50 lothiraldan joined #salt
14:50 c10b10 joined #salt
14:51 debian112 joined #salt
14:52 yidhra__ joined #salt
14:52 irctc066 joined #salt
14:54 giantlock joined #salt
14:57 amcorreia joined #salt
14:59 peters-tx Quick question--what is everyone using for password management
14:59 peters-tx I'm ridiculously tired of "Password Safe on a Windows Server, RDP in to fiddle with it, /me stabs eyes"
15:03 pdayton1 joined #salt
15:05 dfinn joined #salt
15:06 schuckles joined #salt
15:06 rm_jorge joined #salt
15:06 colttt joined #salt
15:06 LtLefse for personal stuff I use LastPass
15:12 Twiglet We have LastPass enterprise
15:12 Twiglet I think I'd go mad without it
15:14 schuckles joined #salt
15:14 sgargan joined #salt
15:18 yidhra__ joined #salt
15:25 pix9_ joined #salt
15:30 dave_den joined #salt
15:31 schuckles joined #salt
15:32 pix9_ I need little help with salt stack.
15:32 pix9_ I am trying to understand the flow of pushing the config files.
15:32 pix9_ http://docs.saltstack.com/en/latest/ref/cli/salt-cp.html
15:33 pix9_ I am reffering to above link.
15:33 pix9_ but I am not able to get what exactly it is talking about.
15:33 pix9_ I mean I am confused on where do I need to start.
15:34 pix9_ http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html
15:34 pix9_ I am also reffering above link.
15:34 clintberry joined #salt
15:36 pix9_ wait
15:38 pix9_ lol
15:38 pix9_ that was simple task
15:38 pix9_ ok now let me explain my confusion.
15:40 pix9_ I was confused by "salt '*' cp.cache_dir salt://path/to/dir"  with "salt-cp '*' local-file.txt /remote-minion-dir "
15:41 pix9_ so now I have confusion if we have salt-cp to copy file to remote minions, then why do we have cp module?
15:42 ksj I'm looking for an option in file.recurse that would only copy the file if it doesn't exist, not if it's changed. I can't see anything. Does such a thing not exist?
15:42 ndrei joined #salt
15:46 coval3nce joined #salt
15:47 coval3nce Anyone know if there is a way to use “ip:port” combos for multiple salt masters in the multimaster list of masters?
15:48 yidhra_ joined #salt
15:49 Opti98 joined #salt
15:52 Viper233 joined #salt
15:53 lothiraldan joined #salt
16:01 otter768 joined #salt
16:03 mpanetta joined #salt
16:04 Brew1 joined #salt
16:07 emaninpa joined #salt
16:07 supersheep joined #salt
16:08 iggy pix9_: cp modules is for pulling from master, salt-cp is for pushing to master
16:08 iggy ksj: not for file.recurse I think, file.managed does
16:09 sk_0 joined #salt
16:10 ndrei joined #salt
16:11 iggy pix9_: err, I guess salt-cp can be used from the master too, but I think it's intended purpose is to copy from minion to minion
16:11 pix9_ thanks for your feedback iggy
16:12 pix9_ I was confuesd byt the explaination from http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html
16:12 pix9_ while I was trying to copy file from master to minions
16:12 iggy also the cp module does a lot more than just copy files around (list the master, etc.)
16:13 iggy fwiw, I've never used the cp module to actually copy files around
16:13 pix9_ yes I am trying to figure out how to use cp module of salt stack
16:13 pix9_ first questions arises is purpose of build that cp module while salt-cp is already available.
16:13 ksj iggy: thanks. not the answer I was hoping for, but thanks anyway!
16:13 desposo joined #salt
16:14 desposo1 joined #salt
16:14 pix9_ there might be a possiblity that cp module existed salt-cp is simplified version of same.
16:15 aparsons joined #salt
16:15 iggy if I were to guess salt-cp existed before the module and once they had the module, they didn't need to go about adding a ton of functionality to salt-cp
16:15 pix9_ ohh cool
16:16 pix9_ makes sense.
16:16 iggy you'll find a few things like that
16:16 iggy someone had a really good idea and started off implementing it one way
16:17 aparsons joined #salt
16:17 iggy someone came in behind them and found a more clever way of handling it as an existing tool
16:17 sdm24 joined #salt
16:17 pix9_ lol I struggled almost for week to make my copy work then accidently landed on salt-cp page.
16:18 iggy that seems like a long time
16:18 pix9_ well I think You've helped me even last time iggy.
16:19 pix9_ well I don't give my entire day for that.
16:19 pix9_ it's like some time every day whenever I get time.
16:19 iggy that's one of the other things you'll learn about SaltStack
16:19 iggy there are multiple ways to do a lot of things
16:19 iggy do what works best for you
16:20 pix9_ yes job's getting really  tiering.
16:20 iggy (that is something I struggled with when I first started with salt)
16:20 pix9_ yes I had hard time when I started with linux
16:20 pix9_ very first step was like compiling kernel itselfe :P
16:20 iggy I was used to tools that told me I needed to change my workflow to fit them not tools that said work how you want, we can probably do that
16:21 pix9_ struggled for 2 months with that to make it work :P
16:22 pix9_ that was like 18-20 hrs day continuously trying to compile. and rebooting system :P
16:22 pix9_ lol got carriedaway with old fun days!!
16:23 pix9_ btw iggy
16:23 writtenoff joined #salt
16:23 pix9_ I am trying to introduce salt stack in my work environment.
16:24 ageorgop joined #salt
16:24 pix9_ not able to get clue if it is really fisible.
16:24 pix9_ I can see few places where I can directly use it.
16:25 arount joined #salt
16:25 pix9_ but will that make complete use of salt ?
16:25 pix9_ how good would be salt if I were to execute interactive jobs across few systems at same time.
16:26 pix9_ we are using cssh as of now.
16:26 Edgan joined #salt
16:27 aparsons joined #salt
16:27 KyleG joined #salt
16:27 KyleG joined #salt
16:28 whytewolf interactive jobs? got an example case?
16:29 cpowell_ joined #salt
16:30 spookah joined #salt
16:31 spookah joined #salt
16:34 schuckles joined #salt
16:34 iggy pix9_: salt is quite good at remote command execution
16:34 sdm24 Personally, I have to explain to all my coworkers how to add new servers to the correct "service" pillars and how to use salt to configure new VMS, etc
16:34 sdm24 and some of them still don't use it
16:34 iggy but it's strength (to me) lies in it's state systems
16:38 sk_0 joined #salt
16:39 c10b10 joined #salt
16:40 whytewolf it seems every time i dig deeper into salt i find stronger and stronger tools. remote execution, states, orechnstration, reactors, events, ect.
16:40 sijis joined #salt
16:42 sgargan if i have two commands in a state file, is it possible to use the output from one as input to another
16:44 iggy sgargan: not really, do you have an example?
16:44 sgargan e.g. if one entry called a rest service that returned json, would I be able to use that json in a subsequent entry?
16:45 whytewolf sgargan: commands as in cmd.run? like in one you would 'somecommand | tee /tmp/tempfile' and the other you could do 'cat /tmp/tmpfile | othercommand; rm /tmp/tmpfile'
16:46 iggy you can't
16:46 sgargan really what I’m looking for is something like ansible’s register
16:46 iggy you can do something like {% set var = salt['cmd.run']('some-script-that-only-outputs-var.sh') %}
16:46 iggy or other salt modules
16:47 sgargan thanks iggy, i’ll play around with that
16:48 iggy {% set var2 = salt['http.query']('http://someapi.url') %}
16:48 murrdoc joined #salt
16:48 iggy depending on what exactly you are trying, it might be better to write a custom module/state
16:49 sporkd2 joined #salt
16:49 murrdoc yes
16:49 murrdoc #ssceapproved
16:49 sgargan these may work for me thanks!
16:49 pix9_ salt has some cool things loaded in it.
16:50 pix9_ I am yet to reach point where I would like pump in my custom tools.
16:51 anotherZero joined #salt
16:57 pix9_ can someone please explain how this caching works in cp modules?
16:59 iggy the code is pretty easy to read
16:59 iggy for the most part, it should be transparent
17:00 jalbretsen joined #salt
17:02 sgargan joined #salt
17:02 murrdoc cp file to cache dir, calculate md5, store next to file
17:02 murrdoc next run compare md5 with whats on the minion, if different copy new fiel
17:02 wendall911 joined #salt
17:04 supersheep joined #salt
17:05 pix9_ hmm
17:05 iggy pix9_: what exactly are you trying to do?
17:06 forrest joined #salt
17:08 cruatta joined #salt
17:09 cruatta joined #salt
17:10 pix9_ iggy I am trying to understand why one would have created all this caching stuff if one can simply move files around with salt-cp
17:10 pix9_ I am not able to understand why someone has created caching thing where can I effectively use.
17:11 cruatta_ joined #salt
17:12 iggy well, the cache is what it says it is... a cache (for commonly use files)
17:12 pix9_ what murrdoc said now can simply be achived by  using salt "*" cp.hash_file /path/to/file
17:12 pix9_ it directly gives me output of the hash
17:13 iggy you wouldn't want to copy a potentially large file from the master every time when it maybe doesn't change often
17:13 pix9_ I don't need to cache file for that.
17:13 sandah joined #salt
17:15 pix9_ so is it like fille --> cache = salt://file ( new logical path globally accessable)
17:15 pix9_ now I compare salt://file /local/file
17:15 sdm24 the cache (generally) isn't in the salt directory
17:15 pix9_ hmm
17:16 pix9_ I am not able to see application of caching files.
17:16 iggy what are you trying to achieve... what is your end game?
17:16 pix9_ and directories aswell.
17:17 sdm24 At one point I had the cache point to salt://, because I was copying SSH keys from minions to the master, and wanted to use those keys in other states, but what I ended up doing was having a minion version of the state to cp the keys to master, and a master version to move those keys to salt://
17:17 iggy the cache is more for the state system than anything
17:17 john5223 joined #salt
17:17 pix9_ end game is to understand why caching? where do I use it?
17:17 iggy that is not your end game
17:18 iggy you will almost never use the cache directly, it's primarily for the state system
17:18 bluenemo joined #salt
17:18 sdm24 for me, I have some installers that I need to put on the minions. With the cache, they only need to copy the installer over once and can run the cache version to install the program
17:18 bluenemo joined #salt
17:18 iggy i.e. so every time you run a highstate it doesn't copy gigs of files from the master
17:19 sdm24 then the cache gets cleared, the installer is deleted, but since the service is running, it doesn't need to copy over the installer
17:19 pix9_ hmm
17:19 pix9_ making lil sense.
17:20 pix9_ eg I want to copy 1 gig of setup files over like 100 minions
17:20 pix9_ tar ball let's assume
17:20 pix9_ I cache them
17:20 pix9_ and push to minions.
17:20 pix9_ is that correct?
17:20 sdm24 they get cached when you push them to minions
17:21 pix9_ hmm cached on minion or master?
17:21 pix9_ I believe minions.
17:21 iggy minion
17:21 sdm24 but instead of having the minions  read that 1 gb file from the master, taking time over the network, they read their local cache
17:21 pix9_ hmm
17:22 pix9_ lol but I will be pushing data from master.
17:22 sdm24 but only once
17:22 bmac joined #salt
17:22 pix9_ to get cached it has to be read at some time from master.
17:22 sdm24 then the minion cache will be read every other time, which the minions read faster then data from the master
17:23 pix9_ so 100 minions reads file from master
17:23 whytewolf pix9_: say you sent 1 gig of files in a directory over, then a little later you change 1 file in that directory and decide to push it again. the second time is when the cache is used when it keeps everything from being updated except that 1 file
17:23 pix9_ that makes 100 reads on master.
17:23 pix9_ ok
17:25 pix9_ whythewolf: that sounds like rsync of directory.
17:26 pix9_ does it mean it will just take incremental part of cached file next time i push it again.
17:26 whytewolf I don't know if salt does deltas.
17:28 mdupont joined #salt
17:28 whytewolf honestly I have never used salt-cp I have always used modules.file and states.file for keeping the files how i want them
17:29 iggy which is why I keep asking what the actual goal is
17:29 supersheep joined #salt
17:30 iggy because I've never used salt-cp or salt cp.*
17:30 theologian joined #salt
17:30 baweaver joined #salt
17:30 iggy well, I use cp.list_master a lot, but not the actual file copying parts of salt.modules.cp
17:31 whytewolf cp.list_master is great for troubleshooting :P
17:32 sdm24 wow I just learned about cp.list_master
17:32 sdm24 that is awesome
17:34 sdm24 thanks for pointing that out
17:35 sdm24 ooh it even points out minion_fs stuff!
17:40 pix91 joined #salt
17:41 pix91 hmm
17:41 pix91 sorry had disconnection last time
17:41 pix91 pix9_ here
17:44 tmclaugh[work] joined #salt
17:44 arount joined #salt
17:44 pix91 hope I haven't missed anything said about caching :D
17:46 whytewolf pix91: only wondering why you are digging so deep into it at this point. since it isn't something that gets used very often
17:46 UtahDave joined #salt
17:47 pix91 whytewolf I have't used it before.
17:47 pix91 and I not able to see any application.
17:47 iggy neither have I, and I've been using salt for close to 2 years now
17:47 pix91 or advantage of that feature.
17:47 whytewolf you have never used cacheing in anything before?
17:48 pix91 nop
17:48 iggy there are lots of features of salt that a lot of people don't use on a daily basis
17:48 pix91 but since someone has created that thing there must be definately some advantage of that feature.
17:48 iggy if it doesn't look useful, skip it
17:48 whytewolf pix91: it exists because it is a backend tool
17:48 whytewolf used by salt for salt things
17:48 pix91 hmmm
17:49 pix91 virus of curiocity is not gonna let me sleep or move ahead I guess. :P
17:49 pix91 lol
17:50 ageorgop joined #salt
17:51 Ahlee what are we griping about?
17:51 whytewolf pix91: modules.cp is there so that when salt copies files through any means. it has a cache. so it doens't have to copy the same files all the time.
17:51 pix91 caching files/dir in cp module Ahlee
17:52 iggy move on to something else, we are bored talking about this subject
17:52 Ahlee caching as in the files get copied to /var/cache/salt/minion/ (by default?
17:52 pix91 to me technical diffrence between copying files and caching files is copy == file from hdd --->dest; caching == file from ram ---> dest;
17:53 pix91 lol
17:53 pix91 iggy sorry to bore you.
17:53 pix91 I will try to find some thing over internet.
17:53 irctc240 joined #salt
17:53 whytewolf pix91: i can give a counter example of cacheing that is file based. [any web broswer stores it's cache in files]
17:53 sirtaj left #salt
17:54 pix91 yes
17:54 whytewolf same thing
17:54 alemeno214 joined #salt
17:54 Ahlee Want to talk about salt's shitty grain caching of minons-not-quite-responding-but-not-quite-down? ;)
17:54 pix91 that is local on my pc
17:54 aw110f joined #salt
17:55 alemeno214 So just seeing if anyone has messed around with this yet. Has anyone here used Hashicorp's Vault as a store for pillar items?
17:55 alemeno214 I know there is no official plugin right now
17:55 pix91 hmm makes somewhat sense about what whytewolf said, not verry clear tho. but new direction it seems.
17:55 iggy alemeno214: no, but some of us have talked about it
17:55 iggy not seeing the forest for the trees
17:56 alemeno214 ah okay, what was the consensus?
17:56 iggy "we like the idea, we'll put it on the TODO list"
17:56 iggy sadly, not near the top
17:56 pix91 can I roughly conclude that in not so good network I can use caching features to save time and Bandwidth?
17:57 whytewolf i think the only list longer then that todo list is santas name list
17:57 iggy it should be fairly easy to write an ext_pillar to do it
17:57 aw110f_ joined #salt
17:57 alemeno214 ah sort of the same situation here
17:57 whytewolf pix91: you are using the cache. even if you don't know you are
17:57 iggy I want to see what other modules they come up with
17:58 alemeno214 same here, see how things shape up in the next 6 months
17:58 pix91 whythewolf yes I know that.
17:58 iggy the postgres one seems cool, but at the same time... most of that functionality is built-in to postgres, so it's not like it was probably real hard to write that
17:59 * whytewolf perks. postgres pillar store?
18:00 murrdoc joined #salt
18:00 slav0nic joined #salt
18:00 Ahlee ext_pillar is stupid simple once you have it configured
18:01 Ahlee I now pull pillar values from zookeeper, mssql, redis, and a sqlite db
18:01 Ahlee really need to kill that sqlite db
18:02 otter768 joined #salt
18:03 baweaver joined #salt
18:04 gladiatr joined #salt
18:04 cpowell joined #salt
18:04 julez joined #salt
18:08 iggy whytewolf: vault pillar store (and vault has a postgres module)
18:10 whytewolf i will need to check that out
18:14 pix91 joined #salt
18:16 aw110f joined #salt
18:17 sgargan joined #salt
18:21 yidhra_ joined #salt
18:21 aw110f_ joined #salt
18:25 c10b10 joined #salt
18:25 ajw0100 joined #salt
18:26 Ryan_Lane basepi: do you know if there was a memory leak with the state module and opts?
18:26 perfectsine joined #salt
18:26 bin_005 joined #salt
18:26 Ryan_Lane and if it's been fixed
18:27 Ryan_Lane we're using the salt caller api with a frequent loop and see that when state goes to do a deep copy of opts that we have a leak and eventually hit a maximum recursion depth
18:27 Ryan_Lane specifically our caller is calling state.sls
18:29 mario64 joined #salt
18:29 mario64 hey guys I have a question regarding user.present and windows minions
18:30 mario64 how do you define a user group with spaces in your sls file, like Remote Desktop Users?
18:31 mario64 writing the group name just like that does not add the user to that group
18:31 babilen -name: 'Remote Desktop Users'
18:31 basepi Ryan_Lane: not that I know of... I asked Dave and he's not aware of one either. I guess file an issue?
18:31 babilen - name: that is
18:31 dave____ joined #salt
18:31 mario64 @babilen I have tried that and didn't work. Getting These values could not be changed: {'groups': ['Remote Desktop Users']}
18:32 vkuusk joined #salt
18:33 mario64 looking at the windows minion debug output I get INFO    ] Executing command 'net localgroup Remote Desktop Users salt /add' in directory 'C:\\Users\\Administrator' ERROR   ] Command 'net localgroup Remote Desktop Users salt /add' failed with return code: 2 ERROR   ] output: System error 1376 has occurred.
18:33 mario64 is that a know issue?
18:33 ranomore joined #salt
18:33 MindDrive @Iggy: Thanks for the answer regarding gitfs last night.
18:33 druonysus joined #salt
18:33 druonysus joined #salt
18:33 arount joined #salt
18:35 mario64 it works just perfect if the group name does not have space characters
18:35 iggy mario64: try - name: 'Remote\ Desktop\ Users'
18:36 iggy or maybe - name: 'Remote\\ Desktop\\ Users'
18:36 mtward joined #salt
18:37 mario64 @iggy I tried that and got this on the debug [INFO    ] Executing command 'net localgroup Remote\\ Desktop\\ Users salt /add' in directory 'C:\\Users\\Administrator'  [ERROR   ] Command 'net localgroup Remote\\ Desktop\\ Users salt /add' failed with return code: 1
18:38 Ryan_Lane basepi: ok. just wante to check. I'm going to reproduce
18:38 Ryan_Lane didnt want to investigate something if it had already been solved in a newer release :D
18:38 mario64 I'm using salt 2015.5.0 on both master and minion
18:39 iggy mario64: maybe '"Remote Desktop Users"'
18:39 yidhra_ joined #salt
18:40 stanchan joined #salt
18:40 mario64 @ iggy I got this output now [INFO    ] Executing command 'net localgroup "Remote Desktop Users" salt /add' in directory 'C:\\Users\\Administrator' [ERROR   ] Command 'net localgroup "Remote Desktop Users" salt /add' failed with return code: 1 [ERROR   ] output: The syntax of this command is:  NET LOCALGROUP [groupname [/COMMENT:"text"]] [/DOMAIN]               groupname {/ADD [/COMMENT:"text"] | /DELETE}  [/DOMAIN]               grou
18:40 iggy no clue really, I've never had a Windows minion
18:40 perfectsine joined #salt
18:41 mario64 @iggy it only happens if the group names has spaces. Administrator and Users groups work just fine. I'm using Windows 2012 R2 if that helps
18:42 babilen mario64: What would a command look like that succeeds if you run it manually?
18:42 vkuusk1 joined #salt
18:42 yidhra_ joined #salt
18:42 babilen And: Spaces in group names are just fugly
18:42 mario64 @ babilen, let me give it a shot....
18:42 Tahm joined #salt
18:43 mario64 @ babilen, yes... I know, hate dealing with windows, but I'm stuck with that here at work :)
18:44 mario64 @ babilen, I just ran net localgroup "Remote Desktop Users" salt /add on the console and worked perfect
18:44 babilen (just fyi: you don't need the @ in IRC, this isn't twatter)
18:44 murrdoc joined #salt
18:44 mario64 sorry, my bad, not a social network savy lol
18:44 babilen mario64: Okay, could you give iggy's suggestion to use '"Remote Desktop Users"' a try?
18:44 mario64 yes, hold a sec....
18:46 mario64 babilen: I got this output with that change on my sls:  [INFO    ] Executing command 'net localgroup "Remote Desktop Users" salt /add' in directory 'C:\\Users\\Administrator' [ERROR   ] Command 'net localgroup "Remote Desktop Users" salt /add' failed with return code: 1 [ERROR   ] output: The syntax of this command is:  NET LOCALGROUP [groupname [/COMMENT:"text"]] [/DOMAIN]               groupname {/ADD [/COMMENT:"text"] | /DELETE}  [
18:46 yidhra_ joined #salt
18:46 babilen ... those commands as the same
18:47 mario64 yes, I'm clueless what's going on
18:47 iggy can you try with the single \ before the spaces (instead of two which is the only thing I saw you paste an error for)
18:47 yidhra_ joined #salt
18:47 babilen escape all the things!
18:48 impi joined #salt
18:48 mario64 like this iggy? Remote\ Desktop\ Users
18:48 iggy yes
18:48 mario64 ok, hold a sec
18:49 perfectsine joined #salt
18:49 asoc Is there a way that I can get the the nodename of all minions with certain grains so that I can use them in arguments for a local.cmd.run in a reactor sls?
18:50 mario64 this is the output: [INFO    ] Executing command 'net localgroup Remote\\ Desktop\\ Users salt /add' in directory 'C:\\Users\\Administrator'  [ERROR   ] Command 'net localgroup Remote\\ Desktop\\ Users salt /add' failed with return code: 1 [ERROR   ] output: The syntax of this command is:  NET LOCALGROUP [groupname [/COMMENT:"text"]] [/DOMAIN]               groupname {/ADD [/COMMENT:"text"] | /DELETE}  [/DOMAIN]               groupnam
18:50 forrest Windows, not even once iggy
18:51 iggy mario64: it still shows \\ (vs \) is that something you added or salt/windows added?
18:52 whytewolf windows the krokodil of the operating system world.
18:52 mario64 my sls looks like this:  - Remote\ Desktop\ Users
18:52 iggy okay, I got nothing then
18:52 iggy take spaces out of group names
18:53 mario64 I was trying to use the default remote desktop group from windows but I guess I have to createone with no spaces and assign that permission to it
18:54 mario64 should I enter a bug in Salt for this?
18:56 yidhra_ joined #salt
18:56 bin_005 joined #salt
18:57 ranomore asoc here's a possibility: http://stackoverflow.com/questions/17158665/how-to-get-a-list-of-all-salt-minions-in-a-template
18:57 murrdoc joined #salt
18:58 iggy asoc: that's what the mine is for
18:59 linjan joined #salt
18:59 bhosmer joined #salt
18:59 bhosmer__ joined #salt
18:59 pix91 left #salt
18:59 ajw0100 joined #salt
19:00 sgargan joined #salt
19:01 ranomore what's a 'configuration profile'? Been trying to get smtp.send_msg to work with one and I'm missing something. https://gist.github.com/daveneeley/c9aeeb8b28a0e608d54f
19:02 Ryan_Lane basepi: seems the master opts and being injected into the minion opts each time
19:03 Brew joined #salt
19:03 big_area joined #salt
19:04 tmclaugh[work] joined #salt
19:04 Ryan_Lane but inside of themselves
19:04 Ryan_Lane this is 2014.7. I guess I should check 2015.5
19:04 whytewolf ranomore: do you have that smtp setup as a minion pillar or a minion config?
19:04 Brew joined #salt
19:05 druonysus joined #salt
19:05 iggy Ryan_Lane: 21015.5 defaults to not publishing master opts (something to watch out for)
19:06 hybridpollo joined #salt
19:06 ranomore whytewolf: master config
19:06 dendazen joined #salt
19:06 iggy I think that needs to be in the pillar or minion config
19:07 Ryan_Lane yep. we don't need master opts :)
19:07 Ryan_Lane we don't even have a master
19:07 Ryan_Lane is there any way to disable them in 2014.7?
19:08 mario64 ok guys, I'll deal with working with windows groups with no spaces. Thanks a lot for the help
19:09 Ryan_Lane mario64: sorry we can't be of more help
19:09 Ryan_Lane a lot of us here probably aren't using windows :(
19:09 mario64 no problem at all :) See you
19:09 whytewolf mario64: good luck. sorry about the windows.
19:09 iggy Ryan_Lane: don't think so, I think that was added in 2015.5 (along with the default changing)
19:10 Ryan_Lane gotcha
19:10 ranomore iggy: the trace log says it's including the configuration from the master, maybe it's lying
19:11 iggy if so, it's called pillar_opts
19:11 sdm24 joined #salt
19:11 whytewolf ranomore: your trace is on the master. try it as salt-call on the minion and see if you get the same result
19:12 iggy ranomore: no, the output is saying it read that file because it exists.... that doesn't mean that's where it's supposed to be
19:12 sgargan joined #salt
19:13 Ryan_Lane yep. I don't get the leak in 2015.5
19:13 Ryan_Lane of course that's probably because it doesn't include the master opts
19:13 Ryan_Lane I bet the bug is still there
19:13 iggy enable the option and check (As it seems like you have a pretty good reproducer)
19:14 pdayton joined #salt
19:15 Ryan_Lane I can't find the option :(
19:15 Ryan_Lane pillar_opts ?
19:15 iggy si
19:15 iggy "Starting in this version of salt, pillar_opts defaults to False instead of True. "
19:16 iggy that kind of says to me that the option existed before
19:16 Ryan_Lane doesn't seem like it changes anything
19:17 Ryan_Lane I don't see master opts, even with that option
19:17 Ryan_Lane of course, I'm not using a master, so I'd kind of expect that
19:17 iggy so it's independent of that option, but appears to be fixed in 2015.5
19:18 Ryan_Lane well, that option doesn't seem to do anything for me
19:18 Ryan_Lane I'm going to try that option with a value of false in the older version
19:18 ranomore Thanks for the tips. Now to figure out why it returns false, and maybe a PR for the doc, which says you can put that config on the master
19:21 iggy ranomore: I imagine that's if you have pillar_opts: True (which used to be the default)
19:21 iggy so the docs just need to be updated to reflect the new default
19:21 ranomore iggy: I was wondering if that played in
19:22 basepi Ryan_Lane: always a good idea to check. Just keep in mind I don't have my finger on the pulse of all of salt like I used to when I was doing triage almost full-time. =)
19:22 basepi So for all I know there might have been an issues that's been fixed. xD
19:23 ranomore iggy: 2015.5.0 master conf file says pillar_opts: True is still the default
19:23 iggy ranomore: it's not
19:23 iggy and no it doesn't
19:23 iggy https://github.com/saltstack/salt/blob/v2015.5.0/conf/master#L528
19:23 Ryan_Lane basepi: heh. I think it was fixed without knowing there was a bug
19:24 basepi Certainly very possible. Wouldn't be the first time. =)
19:24 iggy "huh, that looks weird, better fix that before anybody notices"
19:25 Ryan_Lane well, it's specifically due to the sanity of not include master opts
19:25 Ryan_Lane that option does exist in 2014.7
19:25 Ryan_Lane and I think it fixes my issue
19:26 Ryan_Lane it does
19:26 iggy one problem down
19:26 Grokzen joined #salt
19:26 Ryan_Lane now, that said. I bet this is still a problem with master/minion when pillar_opts is set to true
19:27 Ryan_Lane and you're using the salt caller api, and aren't reloading the caller each run :D
19:27 Ryan_Lane I know. an unlikely bug
19:28 peters-tx LtLefse, Twiglet Thanks for the info on the Password management; I'll check into those.
19:30 LtLefse peters-tx: you're welcome. I'll fully refund my consulting fee if lastpass gets hacked and loses all your passwords ;)
19:30 druonysuse joined #salt
19:32 subsignal joined #salt
19:33 aparsons joined #salt
19:34 paha joined #salt
19:35 supersheep joined #salt
19:39 ranomore joined #salt
19:43 sunkist joined #salt
19:47 peters-tx LtLefse, Haha, not to worry
19:48 rdutch joined #salt
19:48 ranomore iggy: well, how about that.
19:49 pdayton1 joined #salt
19:50 peters-tx Something strange happened to my master within the past 24 hours... emitting these types of messages -- http://fpaste.org/228592/33361021/
19:51 peters-tx Just now starting to look into the issues list
19:53 iggy peters-tx: kill services, clear cache, start services?
19:53 asoc ranomore, iggy: thanks guys the mine looks like it will do what I need. Always something else to learn! :)
19:54 iggy next up! reactor or beacons or scheduler or orchestration or ....
19:56 peters-tx iggy, Not sure quite yet, still checking :)
19:56 joshin joined #salt
19:57 asoc iggy: reactor scheduler and orchestration are all this same task as well! plus this is the first real thing I have done with salt so there has been LOTS of learning
20:01 rnts joined #salt
20:02 p66kumar joined #salt
20:03 otter768 joined #salt
20:03 pdayton joined #salt
20:04 Brew joined #salt
20:05 druonysuse joined #salt
20:05 druonysuse joined #salt
20:07 pdayton joined #salt
20:08 big_area joined #salt
20:09 peters-tx iggy, I have "keep_jobs: 24" set... Could that cause problems?
20:09 arount joined #salt
20:11 iggy peters-tx: only if you have a ton of jobs
20:12 peters-tx iggy, Yah, I don't think I do.  Hmm.
20:13 peters-tx iggy, Although I'm trying to DU the /var/cache/salt/master/jobs directory and it is tumbling down the rabbit hole infinitely
20:13 iggy (i.e. if you write a custom module that gets called by every reactor event and generates a job that counts as a reactor event and you end up recursively calling yourself over and over until you run out of inodes)
20:13 iggy not that I've ever done that or anything
20:14 iggy try df -i
20:14 c10b10 joined #salt
20:14 peters-tx iggy, Not running any custom reactor stuffs
20:14 peters-tx iggy, Yah, DF shows 44GB avail so it's pretty free-n-clear there
20:15 iggy df -i
20:15 iggy specifically
20:15 peters-tx Right free inodes?
20:15 peters-tx I was looking into that :)
20:15 iggy inodes, yes
20:15 peters-tx iggy, Total 4136960, free 1903677 .. %54 in use
20:15 peters-tx Doesn't seem so bad
20:16 iggy you should be fine with that
20:16 iggy it's fairly safe to blow away the cache dir though
20:17 iggy so that's usually one of the first things I blow away when I'm having weird issues
20:17 yidhra_ joined #salt
20:18 peters-tx iggy, Yah, perhaps something odd happened there.  AFAIK this is the first this has happened.. disk usage showed to have started ramping UPWARDS starting Tuesday morning..  Disk became unusable suddenly according to logs this morning from like 1:00am to 5:00am, and then recovered
20:19 peters-tx iggy, It's like something suddenly grabbed that 44GB and then let go after 4 hours
20:20 iggy I doubt that was Salt
20:20 iggy the job cache is all tiny files
20:20 iggy you're more likely to run out of inodes than actual space
20:23 peters-tx iggy, Hmm, yah, going to look into SAR and see if it logged # of inodes.. perhaps it did
20:23 forrest joined #salt
20:27 peters-tx iggy, SAR is logging the # of inodes in USE by the system (not filesystems) and that, at least, really doesn't seem odd
20:28 peters-tx iggy, It is, however, a VM, so we're bugging the VMware admins about it too
20:28 peters-tx ..No telling
20:32 baweaver joined #salt
20:32 yidhra_ joined #salt
20:40 ajw0100_ joined #salt
20:41 theologian joined #salt
20:46 supersheep joined #salt
20:50 pdayton joined #salt
20:51 quantumriff joined #salt
20:53 spookah joined #salt
20:53 quantumriff I have about a hundred minions using zeromq, and its working well, but I have a handful in remote locations were I don't always have any ports besides SSH opened up.  I would like to try salt-ssh, but can I just somehow let the salt-master know which minions to use zeromq, and which to use ssh? or do I need a whole duplicate setup?
20:53 quantumriff sorry, all the documentation on salt-ssh seems to be when you want no zeromq.. I want a mix of it
20:54 DammitJim joined #salt
20:54 baweaver joined #salt
20:54 aurynn quantumriff, you can
20:54 UtahDave salt-ssh still isn't integrated tightly into Salt itself yet.  So you'd need to set up your salt-ssh roster with the servers you want to use salt-ssh with
20:54 aurynn as UtahDave daid
20:54 aurynn said
20:55 quantumriff sorry I have only had a little bit here and there to look into it, between fighting fires.. Not sure what to to google..  oh, roster :)
20:55 pdayton joined #salt
20:55 pdayton joined #salt
20:56 gladiatr joined #salt
20:57 pdayton joined #salt
20:59 pdayton joined #salt
21:00 Heartsbane UtahDave: anytime in the near to immediate future that You/Shane/Keith can do sushi
21:00 quantumriff so when I define my minions in a roster file, do I still use the same top.sls as everything else? or do I need to setup a whole new base then?
21:00 * Heartsbane is off to a meeting, shoot me a PM.
21:00 UtahDave Heartsbane: I'll find a time and let you know
21:01 UtahDave quantumriff: No, you can still use the same top.sls and execution modules and states and everything
21:02 quantumriff but I need to manage two commands then? Ie, "sudo salt -v '*' state.highstate" and "salt-ssh '*' state.highstate" or something along those lines?
21:02 catpig joined #salt
21:03 pdayton joined #salt
21:03 UtahDave quantumriff: Yeah, you do, unfortunately.  We have some plans to make them all work together seamlessy
21:03 quantumriff UtahDave: okay, thanks for the info..
21:03 UtahDave you're welcome!
21:05 sunkist1 joined #salt
21:05 bin_005_b joined #salt
21:08 cberndt joined #salt
21:09 amcorreia joined #salt
21:10 sunkist joined #salt
21:10 rdutch left #salt
21:14 c10b10 joined #salt
21:16 dave_den joined #salt
21:17 yidhra_ joined #salt
21:18 Gareth \o
21:18 ndrei joined #salt
21:18 pdayton joined #salt
21:19 baweaver joined #salt
21:20 virusuy joined #salt
21:20 yidhra_ joined #salt
21:21 skarn joined #salt
21:21 hax404 joined #salt
21:21 racooper joined #salt
21:24 enarciso joined #salt
21:25 hax404 joined #salt
21:27 hax404 joined #salt
21:28 conan_the_destro joined #salt
21:29 mikaelhm joined #salt
21:29 Thiggy joined #salt
21:30 hax404 joined #salt
21:30 yidhra_ joined #salt
21:33 hax404 joined #salt
21:34 bin_005_b_m joined #salt
21:35 mgw joined #salt
21:36 mgw when SLSs are processed by jinja, is the OrderedDict  representer active (https://github.com/saltstack/salt/blob/develop/salt/utils/jinja.py)?
21:36 ajw0100 joined #salt
21:39 bin_005_b_m_c joined #salt
21:42 julez joined #salt
21:42 yidhra_ joined #salt
21:43 Ryan_Lane can this PR be merged? https://github.com/saltstack/salt/pull/23620 I have a blog post waiting on it :D
21:43 Ryan_Lane well, a few blog posts waiting on it
21:45 Dev0n joined #salt
21:45 rap424 joined #salt
21:46 baweaver joined #salt
21:48 yidhra_ joined #salt
21:49 xnaveira joined #salt
21:50 vkuusk joined #salt
21:52 MindDrive Strange... some of my Salt masters are populating /var/cache/salt/minion/files/base/_modules with changes to the repo gitfs is pointing to, and some aren't.
21:52 MindDrive (Even with a salt-master restart)
21:55 MindDrive Logs on the dev masters (which have debug logging on) aren't showing anything failing... ideas?
21:55 iggy mgw: you can't count on it, I think it depends whether the underlying Python supports it
21:55 c10b10 joined #salt
21:56 iggy MindDrive: do the master's show _modules in cp.list_master?
21:56 MindDrive Iggy: Yes.
21:56 sgargan joined #salt
21:57 bin_005 joined #salt
21:58 MindDrive The /var/cache/salt/master/gitfs directories are updating correctly, just not the /var/cache/salt/minion/files ones, and only on some of the servers, not all.
21:59 MindDrive 'salt-run fileserver.file_list' is also showing the right information on all masters.
21:59 * MindDrive is confuzzled
22:00 MindDrive And one of the masters just fixed itself... *thunk*
22:02 sgargan joined #salt
22:02 onewheelskyward joined #salt
22:04 otter768 joined #salt
22:04 giantlock joined #salt
22:04 sarlalian joined #salt
22:04 bin_005 joined #salt
22:04 iggy salt '*' saltutil.sync_all ?
22:05 MindDrive Now this is disconcerting: "Guessing ID. The id can be explicitly in set /etc/salt/minion" - I have 'id:' set in that file.
22:05 MindDrive :q
22:05 MindDrive Whoops.
22:06 MindDrive Another system just fixed itself.  One left, running the 'sync_all' on it now.
22:07 fxhp joined #salt
22:07 iggy they don't sync automatically
22:07 iggy so you have to do something to make them sync (sync_all, highstate, etc.)
22:08 MindDrive I was just about to ask that. :)  All look good now, thanks.  Looks like I have gitfs working as expected, though right now with the current schedule configuration it can take up to an hour for some minions to see updates, unfortunately.
22:09 iggy schedule a sync_all
22:10 iggy we don't change module code very often, so I just have a reactor set up to run a sync_all whenever a new minion comes online
22:10 iggy kills 2 birds... periodically make sure modules are updated and make sure new minions get our grains/states/modules/etc
22:11 murrdoc joined #salt
22:12 pcn What are salt users doing for testing out their states?
22:12 iggy crossing fingers
22:13 iggy some formulas use various tools to do unit tests
22:13 MindDrive Iggy: Should the sync_all be run on all minions, or just the Salt masters (which are also minions, of course)?
22:13 iggy MindDrive: on everything
22:13 murrdoc1 joined #salt
22:14 MindDrive I already have a .conf file to do a sync_modules on everything (along with a refresh_modules), I guess I could change that to sync_all...
22:15 evilrob joined #salt
22:15 iggy a .conf file?
22:16 MindDrive I used the 'include minion.d/*.conf' in my master file and have a /etc/salt/minion.d/module_sync.conf to ensure changes for the modules stay up to date (every 30 minutes).
22:16 iggy so you have a scheduled job setup to sync them
22:17 iggy check the logs to make sure it's actually running
22:18 pcn iggy: any examples of formulas where the testing is particularly well thought out and implemented?
22:18 iggy lol
22:18 ranomore joined #salt
22:18 iggy sorry, no, I don't actually test any of my changes to the formulas, so I can't really speak to thata
22:19 theologian joined #salt
22:20 MindDrive Oh crap... I put a post-receive hook into place to use reactor to refresh gitfs on push (as per http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#refreshing-gitfs-upon-push ) and forgot to enable the damn hook in Stash. :-/
22:20 primechuck joined #salt
22:23 spookah joined #salt
22:28 pdayton joined #salt
22:32 mosen joined #salt
22:33 MindDrive Hmm, I spoke too soon.  Removing a file from the Git repo did not remove it from gitfs on the machines, even with a sync_all.
22:33 mgw joined #salt
22:33 IanVorn joined #salt
22:33 baweaver joined #salt
22:34 iggy 2 things....
22:34 iggy always check cp.list_master
22:34 iggy gitfs is on the master, not on the minions
22:35 ajw0100 joined #salt
22:36 MindDrive cp.list_master is showing the correct output.
22:36 MindDrive But the removed file still exists in /var/cache/salt/master/gitfs/refs/base/_modules and /var/cache/salt/minion/files/base/_modules
22:37 joehh joined #salt
22:43 sgargan what is the easiest way to test a mine is functioning as expected?
22:43 sgargan is there something that can be issued via the salt command to quickly test?
22:44 baweaver joined #salt
22:45 hypnosb joined #salt
22:49 iggy MindDrive: and you did a salt-run fileserver.update?
22:50 iggy sgargan: salt-call mine.get ...
22:52 garthk What's the Salt equivalent of Puppet exported resources for Nagios management? How do state files declare that something should be monitored, causing the right NRPE configuration on the minion and the right Nagios configuration entries on the Nagios server?
22:52 MindDrive Iggy: That, with a saltuil.sync_all removed it from the /var/cache/salt/master/gitfs/refs/base/_modules directory, but not the /var/cache/salt/minion/files/base/_modules directory.
22:52 iggy keep trying?
22:53 iggy I don't know, I can't say that I've ever removed files, only modified
22:53 iggy garthk: I know nothing about puppet (I actually do, but for the sake of argument...), what does a puppet exported resource do?
22:54 mosen garthk: salt mine is rougghly similar
22:54 iggy garthk: kind of sounds like mine might be what you want, but without more info...
22:55 garthk iggy: oh, god… ok, so you @@ something in a physical resource to declare that something'll be needed, then someone else gathers the @@s and outputs configuration accordingly. Kinda. It has been a long while.
22:57 sgargan thanks iggy
22:57 mosen garthk: it's less automated in a sense.. you can assign information to collect on certain minions, and then you can grab that info on another minion
22:57 mosen garthk: but it won't write the state/parameters for you
22:57 p66kumar joined #salt
22:58 alexanderilyin joined #salt
22:58 hypnosb joined #salt
22:58 garthk mosen: np
22:58 alexanderilyin Hi there. I have a question about sbd http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.sdb.html#salt.modules.sdb.get
22:58 c10b10 joined #salt
22:59 alexanderilyin I want to store some data in it and use during highstate
22:59 alexanderilyin but looks like it works in some strange way
23:00 mosen garthk: like in nagios you could have salt mine collect the IP addresses of certain minions, and then on the server you can get a list of IP addresses to monitor, for example.. but you have to write a state that uses those IP's in a template or loops through and makes a state for each
23:00 alexanderilyin when I call sdb.get it just returns URI
23:00 alexanderilyin $ sudo salt-call --local --id lorem-ipsum sdb.get sdb://some-profile/foo
23:00 alexanderilyin local:
23:00 alexanderilyin sdb://some-profile/foo
23:00 alexanderilyin but I expect that it will fail
23:00 alexanderilyin at least because some-profile is not configured
23:01 MindDrive Iggy: Thanks for the help you were able to give.  I'm going to try to poke my contact at SaltStack to see if he can assist.
23:13 sygibson joined #salt
23:14 sygibson hi all - I'm new to writing salt states, and am currently working on a modified salt ceph deployment state - using Pillar data and Jinja templates - I'm looking for a pointer/advice on how to make some alterations to the Jinja templating
23:14 sygibson is this a good place to ask ... ?
23:14 druonysus joined #salt
23:15 iggy alexanderilyin: nobody really knows how sdb works yet, might try the mailing list
23:15 alexanderilyin iggy: thx
23:15 iggy sygibson: go for it (although I'm about to head, but hopefully someone will help out)
23:16 sgargan iggy: would it be possible to match against 2 grains? foo:bar and baz:inga
23:16 sgargan is this the purpose of compound?
23:16 iggy sgargan: yes, a compound match can do that
23:16 sgargan thanks
23:16 iggy 'G@foo:bar and G@baz:inga'
23:16 sygibson thx - the question is probably pretty basic - currently there is a global Pillar definithion with two statements "cluster_network" and "private_network" - the Jinja template injests this to build the ceph.conf
23:17 sygibson I simply need to figure out the best way to dynamically populate this with data for the current nodes Network (CIDR block) for the two interfaces in question
23:17 sygibson I could add static data in the Pillar for each node - but that's ... error prone and problematic  ...
23:18 sygibson grains appears to not contain the data necessary on a minion network - it only shows IP address of interfaces - no subnet/cidr declarations, etc ...
23:18 iggy there are functions in salt.modules.network that do cidr matching and interface lookup
23:18 sygibson ultimately, I'd like the Jinja template to pull in the minions "eth0" and "eth3" interfaces CIDR block and populate that in the ceph.conf file, that's the end goal
23:19 sygibson right, but how do I use that in a jinja template when it's compile ?
23:22 whytewolf {% subnets salt['network.subnets']().items() %} or something close to that
23:23 asoc is there a difference with how I would need to use salt['mine.get'] in jinja templating with a state sls file vs a reactor sls file?
23:24 asoc I have the same jinja templating in a reactor sls and a state sls and it doesn't seem to grab anything with the reactor and with the state it works perfectly
23:25 dingo can i have multiple --out outputter's per salt-call?
23:28 sygibson whytewolf: thx - question - this is basic understanding issue on my part - but is the Jinja template rendered on the minion side; and then this is populated - or does it render on the master side, and then is pushed to the minion ?
23:28 dingo sygibson: client
23:28 dingo minion, rather
23:28 sygibson :-) (minion being the client) - thx
23:29 sygibson ok - so, I'm assuming from this statement/info then; any salt.modules.* is available within the context of the Jinja templating - and when rendered on the client side, is populated with information from the client salt minion
23:29 sygibson (just want to clarify that I understand this correctly ... :-) )
23:30 whytewolf that is correct. [although i am sure i had some syntax errors in what i tossed together]
23:30 sygibson understood - perfect - this helps immensely !!
23:31 dingo the salt.modules.* code is on the client, executed on client, etc.
23:31 dingo good luck
23:31 dingo anyone want to stab at mine? multiple salt-call --out formats and files? possible?
23:31 dingo wouldn't it be great to get a yaml log as well as the pretty-printed colored version :)
23:33 sygibson dingo: I haven't seen the ability to specify multiple outputters - but I do use a single outputter and a simple " | tee -a " or similar construct to send data to a second source -- if your first source is a parsable source (eg YAML or JSON) you can use something like "jq" (hideous, but ...)
23:35 druonysuse joined #salt
23:36 dingo sure, i've used yaml exclusively for a while
23:36 dingo but i recently added during a provision to tail -f the currently tee'd output
23:37 dingo but even with --force-color, on a success state, it won't print the nice final summary, only on error state
23:37 dingo and then my provisioner shows the yaml, for the result: lines i care about and the order the states ran
23:37 dingo i just want the pretty one for fun, nothing special
23:37 dingo i think that's --out highstate or --out pprint
23:38 dingo but if i did that, i'd lose muh yaml
23:39 sygibson would accessing the resulting job run in the cache work for you in this case?  assuming you have job cache enabled ...
23:40 dingo ahh, perhaps, query the last run? i haven't done that in some time
23:40 sygibson you can output the stuff you want (the pretty) to console, and a back end process/something/script/etc injests the job cache output results for you in a non pretty for
23:40 sygibson (form)
23:41 dingo is that possible? what kind of command?
23:41 rvankleeck joined #salt
23:41 rvankleeck joined #salt
23:41 dingo via 'salt' somehow?
23:41 whytewolf salt-run
23:42 whytewolf http://docs.saltstack.com/en/latest/topics/jobs/
23:43 dingo hmm, not using that, but i could work it in eventually, thanks
23:45 baweaver joined #salt
23:46 bluenemo joined #salt
23:46 bluenemo joined #salt
23:51 sygibson ok - so I think I have what I need - but I need a lil help with syntax - the "network.subnets" returns a dict of multiple subnets - and I want to pull the first two out - I have:
23:51 shadowsun joined #salt
23:51 sygibson public network = {{ salt['network.subnets'] }}
23:52 sygibson but I need to reference the first and second elements of the dict - something like:  network.subnets[0]   ??
23:52 sygibson -vs- the second one:  network.subnets[1]
23:53 sygibson I don't think that syntax is correct ...
23:54 aqua^c joined #salt
23:54 sygibson I did find the salt docs reference for this:  http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions
23:55 whytewolf i know about .first for the first element, not sure about the second one though
23:55 whytewolf python is not my strongest lang.
23:57 salty joined #salt
23:57 sygibson :-) I'm neither a programmer, nor a python programmer - just trying to hack through this !
23:57 salty has anyone tried to use beacons with multimaster?
23:58 whytewolf not sure if this would work but salt['networks.subnets'].keys()[0]
23:59 juanito gday guys, dont know if a lot of you guys been using docker with salt but i'm having a bit of an issue here. if i top a container through the docker module and start it again it lost the portbindins for some reasons.
23:59 juanito even if i can still see it doing a docker inspect when its stopped
23:59 sybix joined #salt
23:59 juanito when it starts up again it doesnt bind any port of the docker host

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