Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-03-30

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

All times shown according to UTC.

Time Nick Message
00:08 rocket joined #salt
00:13 catpig joined #salt
00:26 scbunn joined #salt
00:34 catpigger joined #salt
00:39 seev_ joined #salt
00:40 catpig joined #salt
00:44 catpigger joined #salt
00:49 catpig joined #salt
00:49 pdayton joined #salt
00:51 catpigger joined #salt
00:53 JDiPierro joined #salt
00:57 furball365 joined #salt
00:57 glyf joined #salt
00:58 furball365 does anyone know the syntax to get the network address for eth1 from the salt mine?
00:58 catpig joined #salt
00:59 furball365 so far i've got "sudo '*' mine.get 'roles:server' network.interfaces pillar"
01:02 Hell_FireW joined #salt
01:04 catpigger joined #salt
01:05 jerematic joined #salt
01:10 aqua^mac joined #salt
01:18 catpigger joined #salt
01:22 active8 joined #salt
01:23 ITChap joined #salt
01:27 catpigger joined #salt
01:31 p0rkbelly joined #salt
01:32 furball365 left #salt
01:36 catpig joined #salt
01:45 rocket joined #salt
01:45 favadi joined #salt
01:48 catpigger joined #salt
01:52 favadi left #salt
01:57 Hell_FireW joined #salt
01:59 badon joined #salt
02:02 Furao joined #salt
02:04 malinoff joined #salt
02:16 Singularo joined #salt
02:18 catpiggest joined #salt
02:18 SaveTheRbtz joined #salt
02:19 cmcmacken joined #salt
02:20 aw110f joined #salt
02:23 CeBe1 joined #salt
02:24 catpigger joined #salt
02:25 p0rkbelly joined #salt
02:27 glyf joined #salt
02:28 catpiggest joined #salt
02:29 michelangelo joined #salt
02:34 catpigger joined #salt
02:38 evle joined #salt
02:38 catpiggest joined #salt
02:43 p0rkbelly joined #salt
02:44 catpig joined #salt
02:44 clintberry joined #salt
02:46 favadi joined #salt
02:48 catpigger joined #salt
02:49 Guest49195 joined #salt
02:54 jerematic joined #salt
02:56 catpigger joined #salt
02:57 ALLmightySPIFF joined #salt
02:57 chandankumar joined #salt
02:58 Hell_FireW joined #salt
02:59 catpiggest joined #salt
03:06 admgre joined #salt
03:09 p0rkbelly joined #salt
03:09 Furao joined #salt
03:13 ALLmightySPIFF joined #salt
03:24 thayne joined #salt
03:33 iromli joined #salt
03:34 ITChap joined #salt
03:39 sunkist joined #salt
03:40 p0rkbelly joined #salt
03:45 ITChap joined #salt
03:50 tkharju joined #salt
03:54 ITChap joined #salt
03:54 CaptainMagnus joined #salt
04:03 scbunn joined #salt
04:19 davidbanham Hi all. I'm attempting to get gitfs working. I have a repo that contains a file, test.sls. When I run `salt minion_name cp.list_master` however, test.sls does not appear. I have configured the repo in /etc/salt/master and there is nothing appearing in /var/log/salt/master that would indicate a problem.
04:20 davidbanham Where should I look next?
04:21 thayne joined #salt
04:23 ITChap davidbanham: if I remember well, Salt can take some time before checking the repository for changes
04:24 davidbanham ITChap: 60 seconds, according to the docs. That has well and truly elapsed.
04:24 rocket davidbanham: salt-run fileserver.update   will force it to update immediately
04:24 clintberry joined #salt
04:25 ALLmightySPIFF joined #salt
04:25 davidbanham rocket: That appeared to exit successfully, nothing in the logs. Still not showing the file on a cp.list_master though.
04:26 rocket did you check your server logs?  eg /var/log/salt/master ?
04:27 rocket I had to install gitpython before it would work etc..
04:27 davidbanham rocket: Yep, I'm looking at the logs. Nothing helpful there.
04:27 chandankumar joined #salt
04:28 davidbanham gitpython is definitely installed. When I changed the provider to pygit2 earlier I got "GitPython is installed, you may wish to set gitfs_provider to 'gitpython' in the master config file to use GitPython for gitfs support."
04:30 rocket ok .. check the caches eg do you see /var/cache/salt/master/gitfs
04:30 davidbanham Even with the log level set to debug, salt-run fileserver.update doesn't produce any output at all.
04:30 rocket it doesnt for me either
04:31 davidbanham Yep, there are files in /var/cache/salt/master/gitfs
04:31 rocket you could remove that folder and restart salt
04:31 rocket it should repopulate etc in case there was an error there
04:32 rocket I am not sure your command to test is valid either .. I have never used that cp command .. I always have just used state files
04:33 davidbanham The cache successfully repopulated on server restart.
04:33 davidbanham I'm very happy to use a different test method. That cp was just something I picked up off the mailing list.
04:34 davidbanham Ooh!
04:34 rocket did you add git to the fileserver backend?
04:34 davidbanham test.sls is now showing up in cp.list_master
04:34 davidbanham I have no idea why, but there it is.
04:34 davidbanham Maybe blowing away the cache did it.
04:34 rocket if you changed providers and didnt blow that cache it might be the reason
04:34 davidbanham Yeah, maybe.
04:35 davidbanham Well, I guess it works now? Thanks very much for the advice, rocket.
04:35 davidbanham Much appreciated.
04:40 favadi joined #salt
04:40 rocket np
04:43 jerematic joined #salt
04:49 thayne joined #salt
04:49 UberUser joined #salt
04:50 penguinpowernz joined #salt
04:51 enarciso joined #salt
04:51 UberUser hey all, I looked quite some time through the documentation and watched around 4 presentations of salt but unfortunately I have a specific use case on which my questions weren't answered and even logging closely into the documentation didn't help with my inexperienced knowledge.
04:52 bhosmer_ joined #salt
04:53 iggy davidbanham: for future reference "salt-call -l debug fileserver.update" can be quite illuminating
04:53 UberUser I have multiple applications shared across multiple dedicated servers. Those dedicated servers hold around 4-6 of those applications. The thing is that while the application's are all based on the core they are pretty different depending on the customers modifications and addons.
04:53 rocket iggy: I figured out my gitfs issues and updated the ticket .. one of my other repos didnt have a git branch ..
04:53 rocket iggy: in any case I made a suggestion to change the traceback to a log message thats more informative
04:54 iggy rocket: yeah, traceback's are bad
04:54 UberUser Now, I don't wanna use v-servers or docker to split things up and have 1 minion per instance. So is it possible to have multiple minions running on the same system each responsible for one data structure?
04:54 flebel joined #salt
04:54 iggy rocket: and (afaik) you shouldn't have to have every branch in every repo (and if so, that should be documented)
04:55 iggy UberUser: with separate config dirs, keys, cache dirs, ports, etc... yes
04:55 rocket now I have a chicken, egg question.  I want to use gitfs to handle a new formula and then define the formulas use in a sls file .. but I am getting a compile failure because the formula isnt installed yet
04:56 iggy UberUser: there is a unit test that starts a bunch of minions on a single host... might try looking there
04:57 iggy rocket: yeah, I've had issues like that before... ended up writing a minimalistic bootstrap script to get the master up on first run
04:57 UberUser iggy: ok, thanks. where do I find this unit test, googling it only brings up "writing salt tests"
04:58 iggy UberUser: minion swarm... something like that
04:58 rocket iggy: ok .. so its not just me .. I take it managing a salt-master from itself is probably bad :/
04:58 malinoff UberUser, i believe all you need to do is to start different minions using different configurations ('salt-minion -c path/to/config'). And of course you have to specify different minion IDs
04:59 UberUser found the test and thanks malinoff
05:00 iggy rocket: well, you're already using the salt-formula... so you're kind of doing that already (we do too)
05:02 penguinpowernz joined #salt
05:04 davidbanham iggy: Good tip! Thanks.
05:13 flebel joined #salt
05:16 enarciso joined #salt
05:23 kossy joined #salt
05:23 jacksontj joined #salt
05:24 peno joined #salt
05:27 aravind joined #salt
05:36 dthorman joined #salt
05:39 otter768 joined #salt
05:40 sk_0 joined #salt
05:52 scbunn joined #salt
05:55 minaguib joined #salt
05:56 tzero joined #salt
05:59 Laogeodritt joined #salt
06:02 ALLmightySPIFF joined #salt
06:03 colttt joined #salt
06:15 AndreasLutro joined #salt
06:19 rdas joined #salt
06:25 hasues joined #salt
06:27 jhauser joined #salt
06:27 dopesong joined #salt
06:29 stoogenmeyer joined #salt
06:31 jerematic joined #salt
06:37 flyboy joined #salt
06:40 loz-- joined #salt
06:40 vstoniest joined #salt
06:41 I3olle joined #salt
06:41 hebz0rl joined #salt
06:44 illern joined #salt
06:46 KermitTheFragger joined #salt
06:47 hebz0rl joined #salt
06:47 Auroch joined #salt
06:55 evle joined #salt
06:58 __gotcha joined #salt
07:01 trikke joined #salt
07:04 ALLmightySPIFF joined #salt
07:04 hojgaard joined #salt
07:08 eseyman joined #salt
07:20 losh joined #salt
07:26 gwmngilfen joined #salt
07:26 viq joined #salt
07:32 jerematic joined #salt
07:35 ajw0100 joined #salt
07:36 bluenemo joined #salt
07:39 favadi left #salt
07:39 otter768 joined #salt
07:41 scbunn joined #salt
07:42 Grokzen joined #salt
07:43 chandankumar joined #salt
07:50 cedwards joined #salt
07:56 gfa joined #salt
07:57 hemebond joined #salt
08:03 egil joined #salt
08:13 zip_kid joined #salt
08:14 ckao joined #salt
08:18 jeddi joined #salt
08:18 Romlok joined #salt
08:19 colttt joined #salt
08:20 Xevian joined #salt
08:21 berserk_ joined #salt
08:24 froztbyte hrm
08:24 froztbyte in my pillar minion targetting, can I expose just a part of some pillar data?
08:25 froztbyte usecase here is sensu TLS certs; I'd like to keep the full sensu to just the servers that need it (rabbit, api, etc), and then export the TLS certs for all clients
08:25 hemebond froztbyte: Put the TLS into a different Pillar.
08:26 hemebond Pillars can be/will be merged.
08:26 froztbyte I'm not really sure that helps
08:26 froztbyte because then I'd need to go modify the sensu formula instead of just using it unchanged?
08:26 glyf joined #salt
08:27 hemebond Why is that?
08:27 hemebond Sorry, when I said different Pillar, I just meant a different Pillar file.
08:28 hemebond http://docs.saltstack.com/en/latest/topics/pillar/#pillar-namespace-merges
08:28 froztbyte right, but how does that help? I'm using a sensu formula which is pre-structured for all the sensu components
08:28 froztbyte https://github.com/powellchristoph/sensu-formula
08:28 froztbyte the pillar basically looks like https://github.com/powellchristoph/sensu-formula/blob/master/pillar.example
08:29 lb1a joined #salt
08:29 froztbyte and https://github.com/powellchristoph/sensu-formula/blob/master/sensu/client.sls goes with that
08:29 hemebond Right, so... your Pillar should look like that when all the Pillar files have been merged together for a minion.
08:29 babilen Yes, and you want to expose different parts of your pillar, don't you?
08:29 hemebond e.g., global.sls myminion.sls
08:30 froztbyte how would I go about making a second pillar file which the minions can use, which still merges in?
08:30 hemebond global.sls contains the TLS, myminion.sls contains stuff just for that minion.
08:30 hemebond Same structure in both
08:30 babilen You simply target another pillar that shares *some* of the keys
08:31 hemebond Pillars are targeted the same way states are.
08:31 hemebond You have a top.sls in the Pillar directory
08:31 babilen https://www.refheap.com/99050 for example
08:31 froztbyte I very much don't want to go write a separate pillar per minion
08:31 dharper_ii joined #salt
08:31 froztbyte or am I misunderstanding?
08:32 babilen If combined results in your original pillar
08:32 froztbyte babilen: looking
08:32 froztbyte okay, so in that example, I target all the minions to foo?
08:32 babilen froztbyte: Well, there are various different ways. "can I expose just a part of some pillar data" has been covered with our suggestion. You have to be more specific if you want more ...
08:32 hemebond froztbyte: When I say a Pillar for the minion, I just mean a Pillar for the servers that need... whatever it is you're trying to target.
08:32 froztbyte hemebond: right
08:33 froztbyte wait, how does pillar namespacing work? is it on filename?
08:33 hemebond Namespacing?
08:33 babilen froztbyte: In my example you would target both foo and bar for the minions that you want to have the data in foo (namely server, client and rabbitmq) and likewise for bar. If you target both the minion will have access to the entire pillar
08:35 wincyj joined #salt
08:36 viq joined #salt
08:36 froztbyte what I mean is, if I have pillar/{sensu,barsu,foosu}.sl, and the first yaml entry starts with 'sensu', the topfile entry is actually to sensu.sls, barsu.sls, farsu.sls ?
08:36 babilen froztbyte: Pillars are simply Python dictionaries that are being sent to the minion and combined into a large dictionary. You decide which key/value combinations you sent to your minions. Pillars are, in the most mundane setup, typically written in YAML in a single file that is then being parsed into a Python dictionary. Targeting for pillars works much like it does for states in that you target pillar SLS files to minions
08:36 froztbyte not to the key within the pillar file?
08:37 hemebond The filename doesn't matter except to top.sls
08:37 babilen "is actually to sensu.sls" results in a parse error, could you rephrase that?
08:37 froztbyte hemebond: okay, that explains what I want to know
08:37 froztbyte thanks
08:38 * froztbyte will try it just now
08:44 favadi joined #salt
08:45 lothiraldan joined #salt
08:50 ktosiek joined #salt
08:53 zer0def joined #salt
08:54 JayFK joined #salt
08:54 TyrfingMjolnir joined #salt
08:55 N-Mi_ joined #salt
09:00 SaintAardvark left #salt
09:02 babilen pkgrepo.managed is a bit heap of fail :(
09:02 babilen *big
09:04 denys joined #salt
09:10 jrluis joined #salt
09:11 froztbyte babilen/hemebond: thanks, that cleared things up and is working just the way I want :)
09:12 hemebond *thumbsup*
09:12 hemebond Oh wait... that can mean something bad in come countries.
09:12 froztbyte haha
09:12 hemebond froztbyte: Glad I could help.
09:12 hemebond *some countries
09:13 froztbyte some of this stuff is slightly ... weird
09:13 froztbyte the salt documentation, while incredibly thorough, could perhaps benefit in a handful of places
09:13 froztbyte I've been taking notes though, so maybe I'll do a PR with an example
09:13 hemebond It sure could.
09:13 froztbyte it's all a fair breath of fresh air from puppet, though
09:14 hemebond LOL
09:14 hemebond No argument there.
09:14 hemebond I'm hoping to switch my company/team from Puppet to SaltStack this year.
09:14 froztbyte I like the hard-fail on state failure, compared to the "hey, I don't know what your template does, so I'll just go ahead and flatten this hash for you" shit you often run into in puppet
09:16 __gotcha joined #salt
09:18 eliasp hemebond: I started with Puppet here and had it running for ~7-9 months… then threw it all away and replaced it with SaltStack… got with SaltStack within a few days which took me several weeks before with Puppet ;)
09:18 hemebond eliasp: mwaaa, you're making me depressed.
09:18 hemebond I'm still worried we'll end up staying with Puppet.
09:18 eliasp … ok, partially also because of the experiences made with Puppet, but also because of "SaltStack is simply better™ "
09:20 froztbyte eliasp: I think part of that is also getting a decent idea of how/what you want in your infra
09:20 froztbyte and finding nice ways to chain things up
09:21 froztbyte question, for the ex-puppeteers, though
09:21 jerematic joined #salt
09:21 eliasp froztbyte: exactly… that's why I wrote "partially also because of the experiences made with Puppet"
09:21 froztbyte what's the salt equivalent of Defined Types?
09:21 froztbyte I heavily abused those at $oldjob, but they're quite convenient for "place this cookiecutter thing on $node"
09:22 eliasp froztbyte: including a whole SLS basically covers this
09:23 froztbyte eliasp: mm
09:23 froztbyte yeah, that'd probably work
09:23 eliasp froztbyte: it's not quite the same… you can't pass args to it… but that's where Pillars should be used
09:23 froztbyte parameterized Defined Types were super convenient
09:23 froztbyte but yeah, pillar + include would get like 90% of the way there
09:23 eliasp I see, that in some cases parameterization would be rather useful
09:23 eliasp ran into similar issues with my NFS formula before
09:24 froztbyte a common example that I had with this is, yeah, that kind of thing
09:24 eliasp froztbyte: but then again: simply write your states in Python and do the hell what you want in them ;)
09:24 froztbyte "most of these hosts are the same kind of shape, but one is slightly special"
09:24 eliasp froztbyte: the beauty of SaltStack is not being nailed down to a single DSL like in Puppet
09:24 froztbyte so what I'd do is write all the logic into the module, invoke the DT in both the special snowflake and the cattle
09:24 eliasp froztbyte: just use the language you're comfortable with
09:25 froztbyte and just call it slightly differently (extra parameter, whatever) on the special snowflake
09:25 froztbyte eliasp: yar
09:25 froztbyte well, I've spent like 2 days on this so far, I'm sure there's a lot I'll still learn
09:30 scbunn joined #salt
09:32 trikke joined #salt
09:38 bluenemo joined #salt
09:40 otter768 joined #salt
09:41 berserk joined #salt
09:51 matthew-parlette joined #salt
09:56 __gotcha1 joined #salt
10:03 refnode joined #salt
10:03 \ask joined #salt
10:06 refnode moin
10:09 Hell_Fire joined #salt
10:09 Hell_FireW joined #salt
10:19 Furao joined #salt
10:29 sl_ joined #salt
10:34 giantlock joined #salt
10:39 Schmidt Hm, after I've configured my /etc/salt/roster file with a bunch of hosts, installed the salt-ssh package (running RHEL 6) I try to run salt-ssh '*' test.ping it just gives me "No hosts found with target * of type glob". The verbose flag gave no more information
10:40 Schmidt So, what did I miss?
10:41 mindscratch joined #salt
10:41 babilen We can't say more without a look at your roster file - It looks as if the hosts you have in there don't run SSH or as if you cannot access them for some reason. You could paste a redacted version to, say, http://refheap.com
10:42 mindscratch is it possible to target a minion using multiple grains? Right now in a state file (.sls) I have:  - tgt: roles:dev  - tgt_type: grain
10:43 mindscratch I'd like to tgt based on two "roles", such as: - tgt: roles:dev and roles:db_server
10:43 hemebond mindscratch: http://docs.saltstack.com/en/latest/topics/targeting/compound.html
10:44 Schmidt babilen: This is a shortened version https://gist.github.com/lsc/abb425dc0875fc76e4fe.
10:44 mindscratch ah ok, so I could have:  - tgt: roles:dev and roles:db_server
10:46 Schmidt oh, I might have a syntax error in there.
10:46 Schmidt heh
10:46 Schmidt its passwd
10:46 Schmidt not password
10:46 Schmidt sorry
10:47 aquassaut joined #salt
10:50 \ask joined #salt
10:53 Schmidt And, I am back at square one. All password: replaced with passwd: and it gives me the same message back
10:55 bhosmer joined #salt
10:57 grrrrr &W 34
11:00 wincyj joined #salt
11:01 berserk joined #salt
11:04 denys joined #salt
11:09 tzero joined #salt
11:10 jerematic joined #salt
11:11 Schmidt So, I had invisble characters that screwed with the yaml file...
11:11 evle1 joined #salt
11:18 wincyj joined #salt
11:19 scbunn joined #salt
11:20 hemebond left #salt
11:20 peters-tx joined #salt
11:25 bhosmer joined #salt
11:27 ndrei joined #salt
11:32 masterkorp hello
11:33 bhosmer joined #salt
11:37 mindscratch so using - tgt: roles:dev and roles:db_server   didn't work, doesn't match minions, even though I have minions with these grains http://www.hastebin.com/tavifatiha.vala
11:41 otter768 joined #salt
11:46 lothiraldan joined #salt
11:48 luv joined #salt
11:49 luv hey, trying salt-ssh out here (looks very promising). I just have problems getting started - can't find docs on running salt-ssh only setup (with no 0mq-based salt)
11:50 luv I installed salt-api salt-ssh and salt-master on the master, distributed ssh keys to slaves, and set up /etc/salt/roster
11:50 luv salt-ssh '*' test.ping returns "No hosts found with target * of type glob"
11:51 Grokzen joined #salt
11:51 grrrrr luv: sudo it
11:52 luv running as root
11:52 luv -l debug helped tough :)
11:52 luv though
11:52 grrrrr another problem i had in the past was that i had used tabs instead of spaces in roster-file :)
11:52 luv [DEBUG   ] Unable to render roster file: Illegal tab character
11:52 grrrrr yes
11:52 grrrrr :))
11:52 luv grrrrr: ;-)
11:52 zip_kid Can anyone tell me if the merging mentionned here http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#branches-environments-and-top-files also applies when using plain directory based file_roots?
11:53 mens_ joined #salt
11:56 JDiPierro joined #salt
11:56 amcorreia joined #salt
12:02 _ale1_ joined #salt
12:10 mindscratch for anyone interested, after reading more and trial/error: - tgt: roles:(dev|db_server)  - tgt_type: grain_pcre
12:10 jerematic joined #salt
12:10 JayFK joined #salt
12:16 braqoon joined #salt
12:17 wincyj joined #salt
12:17 braqoon Hi, is it possible to have top.sls file composed from other sub 'top.sls' files ? can't find clear answer so far.
12:20 BtbN joined #salt
12:23 bfoxwell joined #salt
12:26 Grokzen joined #salt
12:28 egil what would be the easiest way to run a state when a jenkins-build is succesfull?
12:29 Auroch joined #salt
12:29 cmcmacken joined #salt
12:30 I3olle joined #salt
12:34 mens_ egil: check out the saltstack-plugin for jenkins
12:34 mens_ https://wiki.jenkins-ci.org/display/JENKINS/saltstack-plugin
12:42 __gotcha1 I am trying to call salt.fileserver.gitfs.envs from a custom module.
12:42 __gotcha1 I get NameError: global name '__opts__' is not defined
12:43 __gotcha1 How am I supposed to import modules to ensure that __opts__ is setup ?
12:45 numkem joined #salt
12:46 egil mens_: thanks, I'll have a look, allthough that one looks like I need to get the api running first
12:47 mens_ egil: yes, and you'll need to setup salt reactor as well
12:47 mens_ configuring halite is dead simple though
12:48 zerthimon joined #salt
12:48 egil mens_: the api will be useful anyways, so guess I should give that a go :)
12:52 subsignal joined #salt
12:54 liao joined #salt
12:57 jdesilet joined #salt
12:58 jdesilet joined #salt
12:59 lothiraldan joined #salt
13:01 JDiPierro joined #salt
13:03 jerematic joined #salt
13:05 isamoor joined #salt
13:06 vieira joined #salt
13:07 vieira Hello, how can I debug a module? When I sync_modules the machine gets the module but when I run it says that module is not available
13:07 vieira it is a virtual, the deb version is working fine :S
13:09 TyrfingMjolnir joined #salt
13:11 Romlok is there any particular reason why salt recommends using /srv/pillar/ and /srv/formulas/, rather than putting everything salty under subdirs of /srv/salt/ ?
13:13 Romlok ugh, I just noticed the plural inconsistency too (pillar / formulas)
13:15 ekristen joined #salt
13:17 pdayton joined #salt
13:18 racooper joined #salt
13:18 Tecnico1931 joined #salt
13:18 Ligthert Romlok: pillars don't get cached on minions. Stuff like clear-text or hashed passwords for example. ;)
13:19 Romlok I mean like having /src/salt/states/ as well
13:21 Romlok so pillars/formulas won't be shared with the minions, but salt-related files will be grouped on the filesystem
13:22 Ligthert They will get shared, but they shouldn't get cached.
13:23 Ligthert Take a look at /var/cache/salt/minion/files/ (on an Ubuntu machine) for example
13:23 braqoon Hi, is it possible to have top.sls file composed from other sub 'top.sls' files ? can't find clear answer so far.
13:24 Ligthert braqoon: This is kinda on my todo-list too.
13:24 braqoon Ligthert, ah, OK. Thanks for info
13:24 Romlok Ligthert: my response was poorly phrased. I didn't give it much thought because it was entirely beside my point/question
13:24 dyasny joined #salt
13:24 Romlok I meant; it's not like the /srv/ directory is specific to salt, so salt should stick to its own subdirectory of it IMO
13:25 teskew1 joined #salt
13:26 Ligthert Romlok: the salt master doesn't really care where your file_roots or your pillar_roots are stored. For file-roots I am using a git-backend for example.
13:26 Romlok Ligthert: yeah, but before I go bunging everything under /srv/salt, I wanted to know if there was a solid reason why they weren't already, in all the examples
13:28 Ligthert I have no idea why saltstack chose /srv/salt or what other people are using to be honest.
13:29 Romlok interestingly, there's *one* reference to /srv/salt/pillar/ in the "best practices" doc, but everywhere else they use /srv/pillar :/
13:30 kaptk2 joined #salt
13:30 Ligthert I cannot help wondering if this a typo of some kind. ;)
13:30 Romlok probably :(
13:35 drawsmcgraw joined #salt
13:37 wincyj joined #salt
13:38 ltsampros joined #salt
13:38 ltsampros hello
13:38 ltsampros I'm getting the following: {'test2': "[CRITICAL] Unable to import msgpack or msgpack_pure python modules\n'/bin/sh'' __virtual__ returned False"} when trying to run a raw shell command (-r) with salt-ssh
13:38 ltsampros any pointers?
13:39 isamoor I've mostly got the winrepo functionality implemented, and it works well, except for programs that don't report a version in the registry.
13:40 isamoor win_pkg._get_reg_value() fills in missing version information with "Not Found".  So I'm trying to figure out how to properly structure my application YAML files to reflect that.
13:41 isamoor Win_Pkg's Install/Remove works fine with missing version information, but I can't get the package to be recognized as installed, so I assume the state system would not function well.
13:42 otter768 joined #salt
13:43 zip_kid Can anyone tell me if the merging mentionned here http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#branches-environments-and-top-files also applies when using plain directory based file_roots?
13:45 cheus joined #salt
13:51 timoguin joined #salt
13:53 debian112 joined #salt
13:54 iggy yes (mostly)
13:55 iggy ltsampros: there's an issue open for it
13:56 linjan joined #salt
13:57 ltsampros iggy: ooo <3
13:57 ltsampros generally is there a road map for the 2015.2 release?
13:58 ltsampros I know that we are heading towards rc2 but I cannot figure out the dev cycle you are following
13:58 iggy Romlok: you are free to use whatever you want directory structure wise, just make sure your pillars don't end up under a file_roots dir or your pillars won't be very secret anymore (I believe that's why the docs are the way they are... to avoid people accidentally ending up sharing out their pillars)
13:59 iggy ltsampros: how many issues are left in that milestone? There isn't really a hard rule (and the process has changed the last 3 releases anyway)
13:59 xpen joined #salt
14:01 iggy vieira: you'll likely have to resort to setting debug logging and reading through a lot of log files (master, minion, salt-call -l debug, etc.)
14:01 vieira iggy: I found the problem to be the import rpm :(
14:02 vieira salt appears to be using python2.6 and rpm is only available on system's python2.4
14:02 vieira :(
14:02 andrew_v joined #salt
14:03 Deevolution vieira: What system are you using that's still on Python 2.4?
14:03 iggy ^
14:03 iggy ouch
14:03 vieira CentOS 5
14:03 vieira :-(
14:03 Deevolution Ah.  Indeed o uch.
14:03 Deevolution Is SCL available for CentOS 5?
14:04 Deevolution It might be possible to run Salt under and SCL version of Python.
14:04 iggy salt won't work with anything lower than py26
14:04 I3olle_ joined #salt
14:04 Deevolution Something like:http://wiki.centos.org/AdditionalResources/Repositories/SCL
14:04 speedlight but i use in centos 5 too
14:04 speedlight with 2.4.6
14:05 speedlight 2.4.3*
14:05 vieira iggy: yah I will have to change my module to not use the rpm module
14:06 vieira maybe I can cross call the yumpkg module to get what I need
14:07 vieira well probably not, now that I think of it, I already tried that first
14:07 vieira I would like to get the various kernel versions installed
14:07 vieira ordered by version
14:08 illern joined #salt
14:09 iggy __salt__['file.readdir']('/path/to/kernels') ?
14:09 mindscratch joined #salt
14:11 kindkid joined #salt
14:12 vieira iggy: I will probably just cmd.run rpm -q kernel
14:12 lothiraldan joined #salt
14:13 vieira the shitty part is comparing the versions
14:13 vieira I was using rpm.labelCompare for that
14:14 dude051 joined #salt
14:17 iggy could you use pkg.list_pkgs (it has an option versions_as_list) and just weed out everything that isn't a kernel? Does that return the data in the right order
14:18 vieira iggy: list_pkgs only returns the latest version of each package :(
14:18 vieira ohh wait
14:18 iggy even with versions_as_list=True
14:19 vieira you are right, I think
14:19 vieira :D:D:D
14:20 JDiPierro joined #salt
14:21 Brew joined #salt
14:23 cpowell joined #salt
14:26 kindkid Is there an easy way to get the result of a cmd.run into an environment variable when I'm only targeting one minion? e.g. - WHICHWHICH=$(salt $minion cmd.run "which which") …. which unfortunately yields "MINION-ID: /usr/bin/which" rather than "/usr/bin/which". I could just trim the result, but I was wondering if there was something built-in.
14:28 iggy you could play around with the --out option, but I'm pretty sure they all are going to output the minion name (you just might be able to get something that's easier to cut up)
14:29 kindkid the default is pretty easy to cut actually. thanks anyway though :)
14:30 refnode hi, could need a short help
14:31 refnode writing a mariadb formula and trying to calculate a server_id based on ip address
14:31 refnode have written a small module with a function
14:32 refnode when I try to call it in a dict from map.jinja I'll get the "/bin/bash: mariadb.server_id: command not found"
14:33 refnode tried that as 'server_id': salt['cmd.run']('mariadb.server_id'),
14:34 iggy cmd.run
14:34 eseyman left #salt
14:34 iggy tries to run a command
14:34 eseyman joined #salt
14:34 iggy you probably just want salt['mariadb.server_id']()
14:34 luv left #salt
14:37 refnode iggy, right, thx
14:38 babilen Could somebody explain the logic behind enabled and disabled in http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html#salt.states.pkgrepo.managed to me?
14:38 babilen Why do we require both and what should happen if both are set to the same value?
14:39 iggy I'm guessing one of them directly maps to yum's enabled config option (in the repo file) and one is to override that
14:40 iggy but you'd think they could be better documented (or even less oddly named)
14:43 ltsampros iggy cannot find the issue
14:45 thayne joined #salt
14:45 iggy ltsampros: not related to https://github.com/saltstack/salt/issues/21922
14:46 ltsampros iggy: I see. they are somewhat related
14:48 babilen iggy: I am not using yum at all ...
14:48 babilen I mean ... this seems to mix options from apt and yum in unsavoury ways .. I mean shouldn't one be simply the logical inverse of the other?
14:49 babilen unsavoury? I seem to be hungry :D
14:49 tkharju joined #salt
14:50 \ask joined #salt
14:54 babilen And has any of you seen a plethora of "TypeError: string indices must be integers, not str" ever since 2014.7.2 ?
14:56 tkharju joined #salt
14:56 mrchris joined #salt
14:56 chp1n left #salt
14:56 thedodd joined #salt
14:57 mrchris What's the correct way of doing this ?        1 2 3 4 5 6 7 8 9 10 11 12 /etc/apt/apt.conf:    file.managed:     - user: root     - group: root    file.blockreplace:     - marker_start: "#PROXY-START#"     - marker_end: "#PROXY-END#"     - append_if_not_found: True     - content: 'Acquire::http::Proxy "http://yourproxyaddress:proxyport";'
14:57 mrchris What's the correct way of doing this ?        http://hastebin.com/amiyisowef.sm
14:59 mrchris Sorry for that accidental paste...
14:59 Sacro Move the blockreplace into a seperate stanza
14:59 Sacro use requires/watch/listen or something
15:01 mrchris Sacro: what would the top level yaml key be for the new block?
15:04 toastedpenguin joined #salt
15:05 ndrei joined #salt
15:05 scbunn joined #salt
15:06 timoguin joined #salt
15:15 chandankumar joined #salt
15:16 dopesong_ joined #salt
15:16 zwi joined #salt
15:17 Sacro mrchris: up to you
15:18 conan_the_destro joined #salt
15:19 elfixit joined #salt
15:22 tkharju joined #salt
15:22 mrchris After running 'salt '*' state.highstate' all the states are applied and it says "Total states run:     4", but then it waits a while before giving me the prompt again.  What's it doing?
15:23 clintberry joined #salt
15:25 tkharju joined #salt
15:26 desposo joined #salt
15:30 StDiluted joined #salt
15:30 \ask joined #salt
15:31 iggy babilen: yeah, I think it's yum-isms, but good idea opening the ticket for clarification
15:31 iggy babilen: there are tons of tickets open about indices... looks like whatever change caused those got backported *wahwah*
15:32 babilen yeah :(
15:32 xpen joined #salt
15:32 iggy mrchris: make sure you don't have keys for dead hosts around
15:33 babilen I fixed the issue in https://github.com/saltstack/salt/issues/20096 but I can't really submit it without knowing what is the intended behaviour. I mean I could just pull through with my "pkgrepo.managed" means "enable it!", but it is totally unclear to me what should happen if both enabled and disabled are set to True
15:34 babilen pkgrepo.py and corresponding sections in aptpkg.py are just pure fail
15:34 tkharju joined #salt
15:38 jalbretsen joined #salt
15:39 tkharju joined #salt
15:39 \ask joined #salt
15:39 Jimlad joined #salt
15:40 _JZ_ joined #salt
15:41 capricorn_1 emil+ida
15:41 johntron joined #salt
15:41 SheetiS joined #salt
15:42 vieira hello, I cannot make the example in the documentation work
15:42 vieira http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pkg_resource.html#salt.modules.pkg_resource.sort_pkglist
15:42 vieira If I run it, the following error is returned: "TypeError encountered executing pkg_resource.sort_pkglist: list indices must be integers, not str. See debug log for more info."
15:43 vieira any ideas?
15:43 otter768 joined #salt
15:43 johntron hi. I'm wanting to download a build artifact from Jenkins (a Debian file) and install on a minion; however, the URL to the latest debian file changes with each Jenkins build. There's a REST API that includes a JSON list of build artifacts from the last successful build, but I don't know how to use this in a statefile. I need to: query REST API, then download a file based on a value in the REST response.
15:44 jcockhren johntron: I achieve the same effect slightly differently
15:44 pf_moore joined #salt
15:45 jcockhren johntron: I have a jenkins job that pushes to s3, then triggers a state run via the salt-api
15:45 babilen vieira: https://github.com/saltstack/salt/issues/21480 (among others)
15:45 iggy vieira: paste the code you're trying
15:46 ph8 joined #salt
15:46 johntron jcockhren: hmm, interesting. we're already publishing the release builds to S3, so we might be able to publish development builds as well. thanks for the idea.
15:46 hackel joined #salt
15:46 vieira I am trying exactly what is on the documentation page
15:46 vieira salt '*' pkg_resource.sort_pkglist '["3.45", "2.13"]'
15:46 jcockhren johntron: https://wiki.jenkins-ci.org/display/JENKINS/saltstack-plugin
15:47 vieira babilen: I am not sure if it is the same problem, I am not running highstate neither is my problem random
15:47 vieira it happens all the time
15:47 theologian joined #salt
15:48 babilen vieira: I consistently see it on some minions
15:48 babilen Anyway, /me is off for now
15:48 babilen (and not when running highstate, but state.sls)
15:48 babilen (also running ...)
15:48 Jimlad joined #salt
15:48 iggy vieira: did you look in the debug log?
15:49 vieira I am just running the command that is on the documentation page, it happens all the time on all minions
15:49 wincyj joined #salt
15:49 johntron jcockhren: yeah, I'm not sure that would work for me, because we're using Vagrant to provision salt on our laptops. I'm checking to see how hard it is to write custom modules.
15:50 iggy there are functions to query http and you can just parse the result (or yeah, write your own module)
15:51 vieira iggy: yes, same message with information about the offending line
15:51 jcockhren johntron: fwiw, I also use packer with jenkins
15:51 iggy johntron: there are some _very_ simple modules in salt-contrib (the gce one even uses httplib to query data from a server)
15:51 vieira iggy: line 216, in pkg_resource.py
15:51 TyrfingMjolnir joined #salt
15:52 jcockhren johntron: not directly related to deploys for us, but packer can create vaggrant boxes
15:52 iggy vieira: sounds like something you should open an issue for
15:53 jcockhren johntron: https://packer.io/docs/post-processors/vagrant.html
15:53 Jimlad joined #salt
15:53 johntron jcockhren: very cool! yeah, that will be useful! I've been setting up provisioning with vagrant/salt on a big project with lots of dependencies. being able to create a new basebox at the end of our build will speed up the provisioning.
15:53 jcockhren johntron: good luck. let everyone know if you guys come up with another workflow. I'm sure everyone here would be interested in your progress
15:54 johntron cool, will do
15:55 vieira iggy: will do
15:55 simon___ joined #salt
15:55 dopesong joined #salt
15:56 mpanetta joined #salt
15:57 simon___ Should I be able to store pillar data into a gitfs backend? I'm currently looking at something like this: https://gist.github.com/imaginator/1172cf7f0d0ba7eab332 but it doesn't seem to pickup on the pillar data
15:57 murrdoc joined #salt
15:57 mpanetta joined #salt
16:02 enarciso joined #salt
16:04 sk_0 joined #salt
16:06 rsimpkins left #salt
16:08 spookah joined #salt
16:10 badon joined #salt
16:11 robawt curious if anyone has been mucking with Runners lately?
16:11 favadi left #salt
16:11 robawt I think I've either not understood how to get all messages on the event queue or found something wrong in the documentation
16:13 vieira iggy: I just reported it. I will have to find another way of comparing versions for now :(
16:13 vieira any suggestions would be welcome :P
16:13 clintber_ joined #salt
16:14 desposo joined #salt
16:15 bhosmer joined #salt
16:17 aparsons joined #salt
16:18 \ask joined #salt
16:18 dalexander joined #salt
16:19 thayne joined #salt
16:23 Jimlad joined #salt
16:23 clintberry joined #salt
16:24 linjan joined #salt
16:27 aparsons joined #salt
16:31 Jimlad joined #salt
16:32 KyleG joined #salt
16:32 KyleG joined #salt
16:32 gladiatr joined #salt
16:33 desposo joined #salt
16:36 tkharju joined #salt
16:36 prwilson joined #salt
16:37 jessec joined #salt
16:38 Jimlad joined #salt
16:38 theologian joined #salt
16:39 TyrfingMjolnir joined #salt
16:40 JDiPierro joined #salt
16:41 j-saturne joined #salt
16:41 rocket joined #salt
16:44 markm joined #salt
16:44 drawsmcgraw joined #salt
16:44 rocket so I am getting used to saltstack.  I am wondering if anyone has any best practices on promoting states to production etc .. eg how do you test them before hand and or make sure things are merged from dev to master properly
16:45 tkharju joined #salt
16:46 dalexander joined #salt
16:52 Jimlad joined #salt
16:52 andrew_v joined #salt
16:53 sunkist joined #salt
16:54 whiteinge robawt: there's been recent work there (some 2014.7.1, some 2015.2). what are you seeing?
16:56 masterkorp Hello
16:57 robawt whiteinge: the doc says a print statement emits a message, i can't reproduce that
16:57 \ask joined #salt
16:57 robawt it's cool if i just make a jevent (i think?) but i wanted to clarify the print thing
16:57 whiteinge That sounds suspicious to me. Sec...
16:57 robawt no prob
16:57 robawt running in a VM over the weekend with 2014.7.1 installed
16:58 wicope joined #salt
16:59 whiteinge robawt: oh, i misunderstood. thought you were talking about the event-based runners work in 2015.2. there is no automatic integration with the event system in 2014.7, afaik
17:00 * whiteinge waves at masterkorp
17:00 robawt whiteinge: http://docs.saltstack.com/en/latest/ref/runners/#writing-salt-runners  so this is totally wrong?
17:00 robawt that's a bummer :(
17:00 Norbell_ joined #salt
17:00 Heartsbane whiteinge: did you see that salt request I sent you on G+ last week
17:01 TheRealBill joined #salt
17:01 elfixit joined #salt
17:01 Jimlad joined #salt
17:01 masterkorp whiteinge: hello
17:02 wendall911 joined #salt
17:03 whiteinge robawt: that's definitely referring to the changes in 2015.2
17:03 whiteinge Heartsbane: hm. no :-/
17:03 hasues joined #salt
17:03 hasues left #salt
17:04 robawt whiteinge: erg.  So I should utilize the jevent below it to send on the event bus exclusively in 2014.7.1?  this is a huge help for a small blog post i'm writing on it
17:04 TyrfingMjolnir joined #salt
17:05 ek6 joined #salt
17:06 Jimlad joined #salt
17:06 Heartsbane whiteinge: I will send you a PM
17:06 * robawt highfives Heartsbane
17:07 hackel joined #salt
17:07 rocket gah gitfs and salt environments are driving me nuts
17:08 Heartsbane robawt: thanks
17:09 Heartsbane robawt: I want you remember it is always the first 5 days after the weekend that are the hardest
17:09 robawt amen Heartsbane
17:09 robawt and all of my problems can generally be resolved through hard work and bourbon
17:10 Heartsbane Amen robawt
17:11 relidy Is there a way in my pillar top.sls to filter on grains in a range of values (e.g. 'mem_total')? I'd like to do something like, include this pillar data if the machine has <=1024MB, this one if it's >1024 and <=2048, etc.
17:11 Jimlad joined #salt
17:12 Ryan_Lane relidy: yes. pillars support grains and jinja
17:13 Ryan_Lane relidy: that said, make sure you don't filter anything security sensitive by grain
17:13 Ryan_Lane since minions can change their grains, they'd be able to get any pillars that are protected by grains
17:14 relidy Ryan_Lane: Sure, I'm aware of the security potential. I'm just trying to load some MySQL tweaks based on the amount of memory available. Was looking to have the appropriate pillar data loaded based on the grain.
17:15 Ryan_Lane it works. you can do grain matching, or you can wrap includes with jinja
17:15 Ryan_Lane check out the compound matcher. if that doesn't work for you, go with jinja
17:16 relidy The compound matcher sounds interesting. Let me see if I can find the documentation.
17:16 relidy Ryan_Lane: Thanks.
17:16 Ryan_Lane yw
17:16 Jimlad joined #salt
17:16 sk_0 relidy: http://docs.saltstack.com/en/latest/topics/targeting/compound.html
17:16 sk_0 relidy: i was just working on this
17:17 sk_0 er referencing
17:17 relidy sk_0: Thanks, reading now.
17:18 aw110f joined #salt
17:19 theologian joined #salt
17:21 whiteinge robawt: that  __jid_event__ is also 2015.2. in 2014.7 your best bet is this: https://github.com/saltstack/salt/blob/2014.7/salt/runners/queue.py#L179,L196
17:22 redzaku joined #salt
17:24 stanchan joined #salt
17:25 Jimlad joined #salt
17:25 robawt awesome, thank you whiteinge
17:25 ingwaem joined #salt
17:25 TyrfingMjolnir joined #salt
17:25 ingwaem left #salt
17:26 forrest joined #salt
17:30 ajw0100 joined #salt
17:30 ek6 joined #salt
17:31 fusionx86 joined #salt
17:34 conan_the_destro joined #salt
17:35 ahammond sanity check: watch implies require, right?
17:37 Jimlad_ joined #salt
17:37 murrdoc yaarp
17:37 iggy true
17:38 desposo joined #salt
17:38 rocket I am trying to use gitfs with environments... and running into this.
17:38 rocket Detected conflicting IDs, SLS IDs need to be globally unique.
17:38 rocket The conflicting ID is 'salt-minion' and is found in SLS 'base:salt.minion' and SLS 'dev:salt.minion'
17:39 thayne_ joined #salt
17:39 rocket any idea how I can fix it?
17:40 theologian joined #salt
17:41 forrest rocket: Are you sure each environment (and base) only include one or the other?
17:42 Jimlad joined #salt
17:44 rocket forrest: I have a base '*' and a dev '*' that matches .. :/
17:44 otter768 joined #salt
17:44 Grokzen joined #salt
17:44 stoogenmeyer joined #salt
17:44 ajw0100 joined #salt
17:44 forrest rocket: That's your problem then. What I usually do is include everything that belongs on the server regardless in base, then the extras in each environment option.
17:44 forrest Try doing that, should fix it.
17:45 rocket forrest: I am trying to setup a prod and a dev environment
17:45 rocket http://pastebin.com/d8VqYcMm
17:45 forrest rocket: You should create a base, prod, and dev environment then
17:45 forrest or 3 sections that is
17:45 forrest rocket: Or remove the stuff from dev that you know goes on every system
17:46 Gareth morning morning
17:46 dopesong_ joined #salt
17:46 forrest hey Gareth
17:46 Gareth forrest: hey.  hows it going?
17:46 forrest Gareth: Pretty good, yourself?
17:46 wicope joined #salt
17:47 Jimlad joined #salt
17:47 Gareth forrest: not too bad so far for a Monday :)
17:47 eykd joined #salt
17:47 spicyWith joined #salt
17:47 rocket ok .. the way it works is kind of goofy it seems.. I am sure my head just needs to grok it.  so all my main systems need to be put into a prod env by default correct?
17:47 forrest rocket: You don't have to, you just need to make sure base doesn't overlap with dev
17:48 forrest rocket: So if I were you, I'd just remove salt.minion, and users from dev.
17:48 forrest then see if it still conflicts
17:48 bhosmer joined #salt
17:49 forrest Gareth: Yep, monday monday monday
17:50 iggy or just stop using environments
17:50 iggy they are iffy at best
17:50 rocket iggy: how would you manage the differences without them?
17:51 TooLmaN joined #salt
17:51 sfrazer joined #salt
17:51 rocket it seemed like a good logical separation for me .. I guess I could just have a saltmaster per env as well :/
17:51 iggy we have a salt master per env
17:51 rocket and stop using the environment for that
17:51 Jimlad joined #salt
17:51 forrest rocket: Yeah I like a master per env just for security and avoiding screw ups
17:51 forrest lol I deployed to prod instead of dev, whoops!
17:51 forrest just depends on the setup I guess.
17:52 rocket makes sense
17:52 rocket so how do you guys handle pushing the deploys from dev to prod etc?
17:52 ek6 i do the same, env separation through sat-master air gap
17:52 rocket eg are you doing any testing?  is it automated?
17:52 chandankumar joined #salt
17:53 sfrazer I have a "best practices" question. If I have cron jobs that _could_ run from any server but I generally only want them running from a single server, how would you manage that in Salt?
17:53 rocket for now this is all just a lab environment for me .. working out the kinks first etc..
17:53 xpen joined #salt
17:53 forrest rocket: I'd use the salt-api if you have a master setup. Then you could trigger from whatever your test system is.
17:54 forrest sfrazer: just match via the server name in your top file.
17:54 forrest sfrazer: or a set of server names with wildcards.
17:56 iggy {{ salt['mine.get']('roles:cron', 'network.get_hostname', 'grain')|random }}
17:56 Jimlad joined #salt
17:56 sfrazer Forrest: I thought about that, but it sort of fails if I go to move the server location later. Changing the target in top wouldn't remove it from the previous server
17:56 iggy bofh
17:56 forrest sfrazer: that's true, you'd need a remove cron state that you ran on the old box
17:56 dopesong joined #salt
17:57 forrest You could always match on a piece of pillar data or something I guess
17:57 forrest so like cron_host: asfd123, then {% if salt['pillar.get'](cron_host) == salt['grains.get'](hostname) %}
17:57 Cidan so
17:58 forrest syntax might be off on that
17:58 sfrazer And we kind of have an absurd number of cron jobs. Pillar was where I was leaning but I'd thought I'd see if I was re-inventing a wheel
17:58 forrest sfrazer: Well, what about dropping them into a package?
17:58 Cidan https://www.terraform.io
17:58 Cidan ^ Salt should do this
17:58 forrest then dropping the package on via similar logic like myself or iggy are suggesting?
17:58 Cidan salt-cloud should be able to use state templates to define the infra
17:59 aphor joined #salt
17:59 Cidan makes perfect sense
17:59 Cidan (to me!)
17:59 sfrazer Forrest: not a horrible idea, but mostly these can be managed as individual files in /etc/cron.d/ so file removal/addition based on Pillar value is probably simplest
18:00 forrest sfrazer: yeah
18:01 badon joined #salt
18:02 Jimlad joined #salt
18:03 bluenemo joined #salt
18:03 bluenemo joined #salt
18:04 forrest Cidan: You can create an issue for that on the main salt repo if you want to discuss that support.
18:04 drawsmcgraw joined #salt
18:04 Cidan Ah, I likely will, more just bringing up the idea and gauging thoughts.
18:04 forrest Cidan: If the existing template stuff doesn't satisfy
18:05 forrest Cidan: You probably want to explain how it should extend/differ from http://docs.saltstack.com/en/latest/topics/cloud/map.html
18:05 denys joined #salt
18:06 Jimlad joined #salt
18:06 XenophonF joined #salt
18:11 ajw0100 joined #salt
18:11 Jimlad joined #salt
18:13 baweaver joined #salt
18:15 spicyWith joined #salt
18:15 timoguin joined #salt
18:18 lothiraldan joined #salt
18:18 Jimlad joined #salt
18:20 sfrazer Follow up question. Is there an easy way to see if a value exists in a pillar list? So if I have a pillar item named "cronjob1" and it's values were "host1 host2" is there an easy way to test the hostname grain against that?
18:21 fogrito joined #salt
18:21 badon_ joined #salt
18:21 fogrito I'm looking for guidance on how to have salt watch an entire directory for any file changes, and restart httpd when a file in that directory is modified
18:23 Jimlad joined #salt
18:23 ek6 fogrito: sounds like a perfect case for inotify beacon..of course thats 2015.2
18:24 fogrito ek6: yes, yes it does. I take it there isn't a way to do it right now?
18:26 ek6 fogrito: short of running 2015.2?  yeah i restrict my backporting to states and modules and basic bits...pulling back all of beacons into 2014.7 is not something ive had to think about let alone scope
18:26 pkirby joined #salt
18:27 murrdoc ek6:  install inotify and put a cron on the server
18:27 murrdoc to watch the dir
18:27 murrdoc and fire an an event to salt-reactor
18:27 Jimlad joined #salt
18:27 ek6 there you go fogrito...
18:28 fogrito thanks for the tips
18:28 ek6 of course I cant get custom event tags to work for me on ubuntu 14.4 so i wish you better luck then ive had
18:29 pkirby Hey all - looking for some ideas to solve this problem. I'm using a mine function to retrieve eth0 IP addresses from a specific nodegroup. That nodegroup also has a state applied to it with a managed file, templated in jinja. One of the template substitutions I need to do in this file is to make a list of all the IPs from the salt mine EXCEPT the IP of the current minion in question. Ideas?
18:29 pkirby I tried running the mine.get function through the jinja reject filter, but my version of salt doesn't seem to be running jinja 1.8 so I can't use the equalto filter
18:30 cpowell joined #salt
18:32 andrew_v joined #salt
18:32 Jimlad joined #salt
18:36 chiui joined #salt
18:40 Jimlad joined #salt
18:43 chandankumar joined #salt
18:43 kindkid left #salt
18:45 Jimlad joined #salt
18:50 Jimlad joined #salt
18:52 paha joined #salt
19:05 notnotpeter joined #salt
19:09 dude051 joined #salt
19:13 tvinson i'm working through the example to preseed minion keys using the rest_cherrypy api on salt-master, salt-api version 2014.7.1-1 on rhel7 and i'm having two weird problems. I'm able to authenticate using the /login url, and use test.ping. I get a 401 unauthorized when POSTing to /keys whether I pass credentials or pass session id. I'm also able to get the api into a state where it throws AttributeError: '_Serv
19:13 tvinson ing' object has no attribute 'session' until restarted. Any ideas?
19:15 tvinson this is with external_auth pam, the user has a list item for .*, which should give it permission to everything
19:33 dopesong joined #salt
19:40 cato_ joined #salt
19:41 cato_ Does the s3fs fileserver_backend sync the entire bucket(s) to the saltmaster?
19:41 beneggett joined #salt
19:41 cato_ I'm wondering the best way to retrieve items from S3 without syncing enormous buckets to the disk.
19:42 badon joined #salt
19:44 baweaver joined #salt
19:45 otter768 joined #salt
19:45 hackel joined #salt
19:46 dude051 joined #salt
19:52 ericof joined #salt
19:54 writtenoff joined #salt
19:58 jhauser joined #salt
19:59 yawniek joined #salt
20:01 benegget_ joined #salt
20:01 fusionx86 joined #salt
20:03 baweaver joined #salt
20:07 carnedepassaro joined #salt
20:09 losh hi, i'm using salt-ssh on a onefs (an OS based on freebsd).  I'm seeing errors on certain modules that I need to work, specifically import salt.ext.six as six
20:09 losh I was under the impression that this module was supplied by salt, why would it not be found?
20:15 [7hunderbird] joined #salt
20:24 Ryan_Lane cato_: it syncs everything I believe
20:25 Ryan_Lane I can't think of any really easy way of retreiving items
20:25 iggy Cidan: also, there are states for a lot of salt.cloud functionality in newer versions, so you aren't stuck with salt-cloud map functionality (which is severely lacking imo)
20:25 Cidan are there? I haven't explored
20:26 Cidan that's basically what I'm getting at
20:27 iggy sfrazer: {% if salt['pillar.get']('cronjob1:' ~ grains['nodename']) %}
20:29 iggy tvinson: keys are part of wheel, and that's not granted by .* (I want to say it's something like @wheel)
20:30 ek6 iggy: thats pretty slick...the pillar grain match
20:31 thayne_ joined #salt
20:31 iggy cato_: I try to avoid using large fileserver repos as the master ends up gobbling up ram... don't know if s3fs also suffers from similar problems
20:33 iggy losh: it is included in recent versions (anything that says salt.ext.six), but it still relies on some functionality from the host's python version... what python version does "onefs" have?
20:35 iggy ek6: I thought it was kind of ugly, but it was less ugly than other things I could think up
20:35 losh iggy: i ended up adding a try/except clause ImportError code to use the OS six module instead of the salt.ext.six module.  python --version Python 2.6.1
20:36 ek6 iggy: if it works its better then anything that I could think up
20:36 thayne joined #salt
20:38 iggy I don't think that version is supported
20:38 jsnl joined #salt
20:38 iggy losh: meant to ctlr+k that... it says 2.6+ is supported
20:38 giantlock joined #salt
20:38 losh iggy: *phew* i was worried there.
20:39 iggy that said, 2.6.1 is pretty early in the 2.6 releases, I wouldn't be surprised if there were bugs
20:41 iggy losh: can you try importing salt.ext.six in python on that box?
20:41 losh iggy: Unfortunately, I'm stuck with that version has I have no control over the packages on the system.  Thanks for the heas up though.
20:42 iggy yeah, I get that... just letting you know that it could be a version problem (which you would have to figure out mostly on your own and hopefully submit a fix back upstream)
20:42 losh iggy: salt isn't installed on the machine, it's the thin.tar.gz deployed as part of salt-ssh process.
20:43 iggy losh: I'm assuming that if you've made it this far, you know how to tell salt-ssh to leave behind it's tarball and you can extract that and test the import
20:43 iggy lol ^
20:47 losh iggy: :) If I'm in the /tmp/.root_xxxxx_salt directory can I run python -c 'import salt.ext.six' to test if the module loads?
20:48 iggy I _think_ so
20:48 iggy (is there a salt dir inside that one?)
20:49 losh Well, there's a six.py in that directory.  I can run python -c 'import six' which works, but python -c 'import salt.ext.six' give ImportError: No module six
20:49 iggy that could be a problem (unless salt is hacking python's loader)
20:50 iggy I sadly don't know all that much about salt-ssh
20:50 losh iggy: which is why i modified the salt modules to use a try/except.  If salt.ext.six fails to import, i just import six and there's no exception and the module appears to work.
20:51 losh iggy: If there's python loader hacking going on, it's well beyond my level of understanding.  I'm quite new to salt-ssh as well (it's been a week) ... you've been a great help thus far, thanks for your time.
20:51 tvinson iggy: yep that did it. tyvm.
20:52 iggy tvinson: excellent! what are we talking about?
20:56 dalexand_ joined #salt
20:57 tvinson iggy: pre-seeding keys, didn't spot the @wheel authorization requirement anywhere
20:58 iggy ahh, cool, glad you got it sorted
21:03 beneggett joined #salt
21:05 budman joined #salt
21:09 Vynce joined #salt
21:13 zwi joined #salt
21:19 stanchan joined #salt
21:19 ek6 joined #salt
21:20 cpowell joined #salt
21:21 fusionx8_ joined #salt
21:21 sfrazer I have a jinja-related question that comes down to me not understanding the syntax well enough, I think. I have a pillar that defines a list, then a state file that tries to pass those through to a template via a context line, but when I try to loop through the variable in the template it either comes out as one single line or one character per line.
21:21 sfrazer Gist: https://gist.github.com/anonymous/511bf8eaf22ab68ae8b8
21:24 sfrazer Also: Thanks iggy, I ended up with: {% if salt['grains.get']('host') in salt['pillar.get']('cronjob1') %}
21:25 forrest joined #salt
21:28 gibmachine joined #salt
21:29 overyander joined #salt
21:30 baweaver joined #salt
21:30 gibmachine howdy folks, I am having an issue where my pillar data won't refresh. I've tried saltutil.clear_cache and saltutil.refresh_pillar, but I keep getting the same data back. Halp plx
21:32 Darkalia joined #salt
21:32 Darkalia Hello
21:33 thayne_ joined #salt
21:34 gibmachine sup
21:35 MindDrive joined #salt
21:35 thayne joined #salt
21:38 perfectsine joined #salt
21:40 forrest gibmachine: You could try manually trashing the cache and restarting the salt master
21:40 fusionx86 joined #salt
21:43 bhosmer joined #salt
21:44 perfectsine_ joined #salt
21:44 murrdoc anyone have an example handy
21:45 Guest89 joined #salt
21:45 murrdoc of using the output of cmd.run, in a followup state
21:46 otter768 joined #salt
21:50 Cidan does anyone know if it's possible to make the cloud state apply in parallel and not serial?
21:50 Whissi joined #salt
21:50 Cidan for example, when I boot 4 new machines with cloud.profile state, it does them one at a time, in order.
21:50 Cidan where as salt-cloud -p profile -P name-01 name-02 name-03
21:50 Cidan does them in parallel
21:51 cotton joined #salt
21:53 baweaver joined #salt
21:54 Emantor joined #salt
22:02 fusionx8_ joined #salt
22:03 fusionx8_ joined #salt
22:04 mpanetta joined #salt
22:05 mpanetta joined #salt
22:08 iggy murrdoc: don't?
22:08 murrdoc u right
22:08 murrdoc making it a python grain
22:08 murrdoc and using cmdmod
22:09 iggy I hate when I spend 5 minutes looking at someone problem and they're gone... really need to start checking if people left before I look at their problems
22:09 forrest iggy: haha
22:10 MrMarv joined #salt
22:11 mosen joined #salt
22:11 murrdoc is there a salt.utils. for file exist
22:11 * murrdoc leaves room :P
22:12 iggy salt.modules.file.file_exists ?
22:12 iggy or directory_exists
22:13 murrdoc nope
22:13 murrdoc but i now where to look
22:14 iggy WFM
22:17 hemebond joined #salt
22:18 scbunn joined #salt
22:20 fusionx8_ left #salt
22:24 baweaver joined #salt
22:29 Hell_FireW joined #salt
22:32 dleedyna joined #salt
22:35 dalexander joined #salt
22:35 murrdoc iggy:  where do _grains errors go
22:36 iggy minion log
22:36 murrdoc makes sense
22:36 murrdoc thanks
22:37 andrew_v joined #salt
22:38 baweaver joined #salt
22:38 bluenemo_ joined #salt
22:39 tcotav joined #salt
22:42 andrew_v_ joined #salt
22:43 N-Mi joined #salt
22:47 aquassaut joined #salt
22:54 hellome joined #salt
22:56 MrMarv joined #salt
22:59 fusionx86 joined #salt
23:03 baweaver joined #salt
23:05 baweaver joined #salt
23:07 scbunn joined #salt
23:08 MindDrive The docs ( http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.publish.html ) don't specify, or maybe I'm missing it, but does publish.publish always return a dictionary where the keys are the hostnames that matched and the values are the results for each matching hostname?
23:11 baweaver joined #salt
23:12 mioli joined #salt
23:22 JDiPierro joined #salt
23:26 speedlight joined #salt
23:26 speedlight joined #salt
23:26 aparsons joined #salt
23:27 catpig joined #salt
23:28 murrdoc joined #salt
23:31 mioli joined #salt
23:33 speedlight joined #salt
23:33 speedlight joined #salt
23:42 mpanetta joined #salt
23:46 MindDrive Argh... the result from 'salt.client.Caller.function()' just has the output for each host that returns results, so I'll need to parse it to figure out if it succeeded or not.  It makes sense, but... ugh.
23:46 otter768 joined #salt
23:48 sunkist joined #salt
23:48 baweaver joined #salt
23:51 viq joined #salt
23:54 hemebond MindDrive: If you use verbose does it not show you failures too?
23:56 pdayton joined #salt

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