Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-12-11

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

All times shown according to UTC.

Time Nick Message
00:05 pipps_ joined #salt
00:05 jkleckner joined #salt
00:10 bhosmer joined #salt
00:23 pipps joined #salt
00:33 sroegner joined #salt
00:39 bhosmer_ joined #salt
00:49 pipps_ joined #salt
00:50 pipps__ joined #salt
00:54 dvl joined #salt
00:55 Gifflen joined #salt
00:55 dvl Is there a module / tool for ensuring a given configuration file contains a specified key=value pair?  I'm thinking /etc/rc.conf (but other files too).
01:00 EugeneKay file.managed usually. see also file.regex (I think it is )
01:01 Morty_ joined #salt
01:04 zandy joined #salt
01:06 higgs001 joined #salt
01:06 Gifflen joined #salt
01:10 fllr joined #salt
01:14 Sypher joined #salt
01:16 cachedout joined #salt
01:23 redondos joined #salt
01:30 Marion joined #salt
01:32 z3uS joined #salt
01:33 jfzhu_us joined #salt
01:37 jfzhu_us I see the following string in a salt state's file "salt://" and I am not sure what that is defined as nor what the proper name for this variable. Is there a name for this variable and how do I print it?
01:38 halfss joined #salt
01:38 dvl jfzhu_us: I think that's the salt data directory... but I'm a novice
01:40 Corey It is indeed.
01:40 Corey The transport mechanism is the salt file server.
01:40 jalbretsen joined #salt
01:43 jfzhu_us Is there a command I can run to print outs it value on the master or would I just have to look in the salt master's configuration file?
01:43 Corey jfzhu_us: Unless you've changed it, it's /srv/salt
01:45 jfzhu_us Is there any command that can print out the master's configuration settings or will I just have to start memorizing the default settings?
01:45 jfzhu_us Something akin to puppet's puppet --configprint modulepath?
01:45 Corey jfzhu_us: Good question. Offhand I'm not sure.
01:46 oz_akan_ joined #salt
01:54 lineman60 joined #salt
01:54 pass_by_value joined #salt
01:55 zfouts joined #salt
01:58 dave_den Psi-Jack: your issue is that you are targeting all minions with "roles:test" into base, prod, and dev. it just doesn't make sense to me.
02:06 fandikurnia01 joined #salt
02:13 ertac joined #salt
02:14 jacksontj joined #salt
02:17 erchn joined #salt
02:18 nmistry joined #salt
02:21 juicer2 joined #salt
02:28 fllr joined #salt
02:29 lpmulligan joined #salt
02:30 Gifflen joined #salt
02:32 AdamSewell joined #salt
02:33 sroegner joined #salt
02:37 ajw0100 joined #salt
02:40 bhosmer joined #salt
02:41 AdamSewell joined #salt
02:46 Marion joined #salt
02:49 davet joined #salt
02:52 mgw joined #salt
02:53 Ryan_Lane joined #salt
02:54 dvl left #salt
02:55 forresta joined #salt
02:57 Psi-Jack dave_den: heh, well, like I said, the idea is that anything in dev overrides what's in prod, in hiearichal order. That would be the ideal method anyway. if something exists in dev that's also in prod, use what's in dev, else, fallback to prod, else, fallback to base, else, there's something wrong.
02:58 pass_by_value joined #salt
03:02 dave_den Psi-Jack: i am not sure i am stating my point clearly, or we are just missing eachother's viewpoint  :)
03:02 dave_den i set up a replica of your setup
03:03 dave_den to try to be more clear on how it works, which makes sense to me
03:03 dave_den let me gist it
03:03 dave_den sec
03:04 * Psi-Jack smiles.
03:05 lpmulligan joined #salt
03:06 Psi-Jack yeah. The overall idea of it is, I want to target a smaller subset of servers, hence roles:test or soon to be environment:test, so apply development salt states to.. dev, in this case, being on developmental salt to eventually become production salt states.
03:06 xl1 left #salt
03:06 Gifflen joined #salt
03:07 Psi-Jack If i did it any other way, I would have to jump through hoops every time to target a server, exclude a state from the same server in different environments for every change coming in, which then does not work out to be a flawless test since that has to be changed, yet again, once actually moved to the production environment to remove those checks again.
03:07 lpmulligan joined #salt
03:09 xl1 joined #salt
03:09 xl1 left #salt
03:13 lpmulligan joined #salt
03:13 dave_den Psi-Jack: https://gist.github.com/dlanderson/aa3ee1456c2f39dea443
03:14 nmistry joined #salt
03:14 dave_den what you are doing when to target the same grain in base/prod/dev is telling salt that those minions with that grains belong to all of those environments
03:15 dave_den the namespacing for top/highstate compilation is not distinguished by env.sate_file_path, only state_file_path
03:16 Psi-Jack hmm
03:16 dave_den so as you can see in my gist, when you have a dynamic ID declaration that changes based on the env, it's no problem because the state is compiled and intepreted as kinka based on the env, which chages the ID declaration name
03:16 Psi-Jack So, there's literally no way to actually do what I wanted, yet it does it with pillars just the way I want it? heh
03:16 dave_den but when you have a static ID declataion in multiple environments, it will clash because salt compiles the entire highstate data into one dict
03:17 dave_den Psi-Jack: like i said about pillars eariler, pillars act differently in that when salt sees duplicate pillar entris it will just overwrite the one it already has, so no problem.
03:18 shinylasers joined #salt
03:19 Psi-Jack Kinda crazy that salt can't do this though. I mean, how does one maintain hundreds of servers with salt if thye can't even properly test their states before pushing them out? That's what the idea this is all for. maintaining and ammending existing states for improvement or changes needed to continue, while maintaining a scheduled routine that keeps all servers up-to-date with the master.
03:20 Psi-Jack I know puppet can do it, as I've done it.
03:21 dave_den Psi-Jack: people do it with gitfs
03:21 forresta or file_roots
03:21 Psi-Jack That doesn't really solve anything, it's the same thing as file_roots, but different storage medium.
03:22 forresta do you not write your states, check into git, pull from git to develop, test, pull to test, test, then pull to prod and apply?
03:22 Psi-Jack That's what I'd like to do, but things in develop don't override what's in prod/.
03:23 forresta so you use file_roots
03:23 forresta one for each env
03:23 Psi-Jack Same problem. Exactly.
03:23 dave_den Psi-Jack: not really. using gitfs you can forget about the 'fallthrough' issue you are concerned about
03:23 forresta how is that a problem?
03:23 Psi-Jack dave_den: How so?
03:24 forresta you want to run the states against develop without running them in prod, but you don't want to set up targeting in your top.sls?
03:24 Psi-Jack forresta: file_roots is the method I started with which if you target the some set of hosts with the same states but different environment, dev having a more up-to-date one while in development, so you can make changes safely, deploy to a small set of servers, test, before moving it back to prod.
03:25 Ryan_Lane joined #salt
03:25 dave_den Psi-Jack: your git branch has everything you need in your environment.
03:25 xl1 joined #salt
03:26 dave_den what you are trying to accomplish is not very natural - you want minions to be cool with being in 2 or more environments without any logic to help them understand the context
03:26 Psi-Jack dave_den: i still don't get it. base's top.sls rules over all.
03:26 Psi-Jack Which is master in gitfs.
03:27 dave_den have you noticed that salt doesn't use a master branch?
03:27 dave_den kinda against the grain, but there's no rule that you need a mster branch
03:27 Psi-Jack dave_den: I just want what the docs actually says is supposed to be happening in file_roots. It searches the environment for the file/state in order as defined, and uses the one that matches first.
03:28 dave_den Psi-Jack: it is!  :)
03:28 dave_den but you are telling it to search *3* times, each with different file paths!
03:28 Psi-Jack hmm
03:28 dave_den so it matches 3 of the sat.tag.sls files
03:28 dave_den once in base, once in dev, once in prod
03:28 Psi-Jack Well, base, no. but prod and dev, yes.
03:29 dave_den you have the order of paths different for all three env
03:29 dave_den so in each env it really does stop at the first salt.tag.sls
03:29 Psi-Jack Right, because I don't want servers in prod to pull from dev. :)
03:29 dave_den naturally. :) nobody would
03:30 sgviking joined #salt
03:30 Psi-Jack The problem I'm trying to solve overall is, we use our qa servers for salt testing, which uses prod states for combined installations, smaller subsets of what's in prod by a huge amount. but, I want to target some or all of the qa boxes for salt dev states to test new changes before putting it to prod to be widely deployed.
03:31 Psi-Jack Hence, the whole, dev->prod->base concept.
03:31 dave_den Psi-Jack: the only way i can recommend is using gitfs.
03:32 Psi-Jack gitfs would basically just be a matter of cloning everything in prod to a new environment/branch, making the changes needed to it, commit it, checkout master, edit top.sls to target a the specific server to use the new state, exclude it from the other environment... Etc.
03:33 dave_den you don't need a master branch
03:33 dave_den you can have just prod and dev.
03:33 Psi-Jack What, with each their own top.sls?
03:34 dave_den if you want, yes
03:34 Psi-Jack but, that stil wouldn't actually resolve anything that I can see. Not really.
03:34 Psi-Jack Same problems would still exist, they would just be more obfuscated in git branches. :)
03:35 Corey This is the same concept as puppet environments.
03:35 forresta Corey, I thought you were on vacation?
03:35 Psi-Jack puppet environments are easier, actually, they actually do have hierarchy.
03:35 Corey forresta: Got back today.
03:35 forresta ahh nice, have a good time?
03:37 pass_by_value1 joined #salt
03:39 Corey forresta: A blast, actually.
03:39 forresta nice
03:46 davet joined #salt
03:49 dave_den Psi-Jack: imagine:  set up a git repo. make the prod branch a copy of your prod states as you have them now. now make a new branch 'dev' from 'prod'. they are identical right now. nothing exists in prod that does not exist in dev. problem of 'fallback if state doesn't exist' is solved. since you are using the same master for dev and prod, in your top.sls you will target your minions for each environment with 'myenv:prod' or 'myenv:dev'. m
03:49 Gifflen joined #salt
03:51 Psi-Jack dave_den: yeaah... I get all that. And that's literally about the same issue with file_roots, same problem, just slightly different. I have qa boxes that also belong in a testing role that both will involve the same state used, and so, state conflicts will remain.
03:51 dave_den yes - don't do that.
03:51 dave_den :)
03:51 Psi-Jack Unless we have a 100% completely dedicated testing box for 100% of every test case scenario, we're pretty much screwed.
03:53 dave_den when you target based on grains you can simply switch the minion to myenv:test to test your dev states
03:53 dave_den when you want to put it back into prod, set the myenv grain to prod.
03:53 Psi-Jack Yeah. we actually manage our grains from salt too. LOL
03:54 Gifflen_ joined #salt
03:56 dave_den i'm not aware of an approach that could be more simple - sorry.   the file_roots approach you are trying to do just forces you to do what gitfs already does for you
03:56 dave_den time for bed - good luck!
03:56 Psi-Jack Thanks.
03:56 alunduil joined #salt
03:58 favadi joined #salt
04:03 * Gareth waves
04:04 favadi joined #salt
04:06 Teknix joined #salt
04:07 Corey Gareth!
04:10 jacksontj joined #salt
04:14 BenCoinanke joined #salt
04:15 jalbretsen joined #salt
04:16 Psi-Jack heh, yeah, this gitfs is definitely not changing anything.
04:18 fllr joined #salt
04:22 dstanek_afk joined #salt
04:23 copelco__ joined #salt
04:23 dave_den1 joined #salt
04:25 vkurup joined #salt
04:25 favadi joined #salt
04:26 Heartsbane joined #salt
04:26 jschairb joined #salt
04:27 crane joined #salt
04:28 \ask joined #salt
04:29 cewood joined #salt
04:30 z3uS joined #salt
04:30 copelco__ joined #salt
04:31 crashmag joined #salt
04:31 crashmag joined #salt
04:32 jalbretsen joined #salt
04:33 throwanexception joined #salt
04:34 sroegner joined #salt
04:35 mgw anybody looking for full time sysadmin/devops work, please PM me
04:37 dstanek_afk joined #salt
04:39 Gareth Corey: hey :)  how was your trip?
04:41 bhosmer joined #salt
04:49 frosty996 left #salt
05:06 pass_by_value1 left #salt
05:06 anuvrat joined #salt
05:24 alunduil joined #salt
05:35 elfixit joined #salt
05:40 Gifflen joined #salt
05:41 cewood joined #salt
05:42 cewood joined #salt
05:44 ckao joined #salt
05:46 forresta hey jesusaurus, you around?
05:46 jesusaurus forresta: hey, whats up?
05:47 forresta I'm putting together a doc page that is a list of salt projects, you mind if I put https://github.com/jesusaurus/hpcs-salt-state on there?
05:49 jesusaurus sure, but im actually in the process of breaking it out into multiple repos
05:49 cewood joined #salt
05:51 forresta well, you can just make a pull request to update the docs when you do that then :P
05:51 forresta I only have a couple repos on that there I'm actively aware of, I need to remember to spam the IRC tomorrow.
05:51 jesusaurus whats the doc page? where can i update it as i go through my modules?
05:51 forresta I'm just writing it now
05:51 forresta https://github.com/saltstack/salt/issues/9120
05:51 forresta that's the issue I made, it's just gonna be topics/salt_projects
05:51 forresta *.html
05:51 forresta or rst if you're looking at the repo
05:51 forresta but preferably it's projects that are using Salt as opposed to single modules.
05:52 forresta because I know that's what I always want to see starting out, is examples of working projects, and Puppet never had that.
05:52 jesusaurus cool, i'll try to remember to update the rst as i go
05:52 forresta awesome, if you don't just let me know and I'll do it, doesn't take long.
06:00 forresta jesusaurus, looks like cachedout already took care of my merge request, so that doc is in the repo now
06:04 juice joined #salt
06:05 jesusaurus cool
06:07 vipul joined #salt
06:07 nmistry joined #salt
06:14 nmistry joined #salt
06:20 sinh_ joined #salt
06:22 redondos joined #salt
06:23 cachedout joined #salt
06:28 nmistry joined #salt
06:30 sirtaj joined #salt
06:35 sroegner joined #salt
06:35 dvogt joined #salt
06:41 Katafalkas joined #salt
06:42 bhosmer joined #salt
06:56 nmistry joined #salt
06:57 schristensen joined #salt
07:05 matanya joined #salt
07:06 fllr joined #salt
07:10 Katafalkas joined #salt
07:19 Destro joined #salt
07:19 Destro left #salt
07:25 psyl0n joined #salt
07:26 bhosmer joined #salt
07:39 higgs001 joined #salt
07:45 juasiepo joined #salt
07:52 agh Hello, is there any RPM expert here ?
07:53 agh I've a problem with Salt-minion EPEL RPM package
07:53 agh I've, on a system, a soft who needs pyCrypto to be installed via pip
07:54 agh then, when I install salt-minion from EPEL, pyCrypto is required as a dependancy, from EPEL too.
07:55 agh The issue is that pyCrypto from pip is conflicting with pyCrypto from EPEL
07:55 agh do you have any solution ?
07:57 malinoff agh, can yum remove pyCrypto that installed from pip, install salt and install pyCrypto from pip after that?
07:59 agh malinoff: mmm... that's an idea. I have to check. But it will break my app for some times (and I can't have downtime :/)
07:59 malinoff agh, you should use virtualenvs for your custom applications :)
08:00 agh malinoff: in prod ? :|
08:00 malinoff agh, yes
08:01 malinoff Simple to move an application, simple to upgrade dependencies, simple to shadow packages from the system
08:03 balboah joined #salt
08:04 ntt_ joined #salt
08:07 Corey agh: malinoff is correct.
08:07 alunduil joined #salt
08:07 Corey Depending upon system python for custom apps is... ill advised, if you need anything even slightly non-standard.
08:07 fllr joined #salt
08:08 agh malinoff: Corey: ok. Thanks for your help
08:08 Corey Also, asking for "experts" is probably one of the worst ways to request help. Ask your real question, it tends to flow better. :-)
08:08 agh :)
08:09 malinoff Yeah. I'm not an expert :) I'm 21 year old Russian guy
08:13 Corey I also find that actual experts don't tend to think of themselves as experts, much less self identify that way.
08:20 slav0nic joined #salt
08:24 MrTango joined #salt
08:24 giantlock_ joined #salt
08:26 ntt_ Hi. I'd like to use this function -> http://docs.saltstack.com/ref/modules/all/salt.modules.file.html#salt.modules.file.replace . How can i use file.replace in an .sls file?
08:27 malinoff ntt_, State id:
08:27 malinoff module.run:
08:27 malinoff - name: file.replace
08:27 malinoff - # other args
08:27 malinoff http://docs.saltstack.com/ref/states/all/salt.states.module.html?highlight=module.run#salt.states.module.run
08:29 malinoff But it's much better to use the state: http://docs.saltstack.com/ref/states/all/salt.states.file.html?highlight=states.file#salt.states.file.replace
08:29 junedm joined #salt
08:30 ntt_ yes.... but i don't know how to use in an .sls file....
08:30 ntt_ it is a syntax problem
08:32 malinoff ntt_, http://pastebin.com/RwgWRrxN
08:32 ntt_ malinoff: really thank you
08:33 malinoff I think, you should read this: http://docs.saltstack.com/topics/tutorials/starting_states.html
08:33 malinoff And this: http://docs.saltstack.com/topics/tutorials/states_pt1.html
08:34 ntt_ Stateid: was a completely new line for me
08:36 malinoff ntt_, Well, in salt, you can write something else in this line, and if you are not specifying `name` argument, salt will take this 'Stateid' as `name` argument AND as state id
08:36 sroegner joined #salt
08:36 malinoff Please, read walkthrough :)
08:36 ntt_ ok malinoff. thank you
08:37 malinoff ntt_, my pleasure :)
08:43 bhosmer joined #salt
08:45 favadi I have a problem with pkgrepo.managed on ubuntu 12.04
08:45 malinoff favadi, salt --version ?
08:45 favadi http://pastebin.com/Hw0U4jmP
08:45 favadi 0.17.2-2precise1
08:46 favadi when salt-call, salt stack return stderr: E: There are problems and -y was used without --force-yes salt stack
08:46 malinoff favadi, there is a bug in pkgrepo.managed in v0.17.2
08:46 favadi and apt-key -l show that salt stack do not import the key
08:46 malinoff Rollback to 0.17.1 or wait for 0.17.3(4)
08:47 Katafalk_ joined #salt
08:48 favadi malinoff, ok, I will search on github issue page
08:48 Katafal__ joined #salt
08:48 malinoff https://github.com/saltstack/salt/issues/8904
08:49 redondos joined #salt
08:56 junedm left #salt
08:57 favadi malinoff, thanks for
08:57 favadi your help
08:57 malinoff favadi, no problem :)
08:57 * favadi off to write a cmd.run walkaround
08:59 harobed_ joined #salt
09:03 malinoff favadi, try this: http://docs.saltstack.com/ref/modules/all/salt.modules.apt.html?highlight=modules.apt#salt.modules.apt.mod_repo
09:05 Katafalkas joined #salt
09:12 ntt_ malinoff: i'm using file.replace state, but replacing doesn't work...
09:12 ntt_ i have
09:12 ntt_ - pattern: ^my_ip=*
09:12 ntt_ - repl: my_ip=192.168.155.155
09:13 ntt_ i'd like to replace the entire string that starts with my_ip=...
09:13 Katafalkas joined #salt
09:13 ntt_ but i have a string concatenation. Result is my_ip=192.168.155.155192.168.1.130    (where 192.168.1.130 is the old value of my_ip)
09:14 malinoff I'm not sure your regex is correct. Try ^my_ip=.*
09:14 _ikke_ ntt_: that pattern means, match anything that starts with my_ip=, where the = can occur 0 or more times
09:14 malinoff ntt_, http://gskinner.com/RegExr/
09:15 ntt_ thank you (_ikke_ and malinoff). this is a stupid mistake, sorry
09:15 fivethre1o joined #salt
09:15 malinoff ntt_, Errors in regex are not stupid :)
09:17 junedm1 joined #salt
09:20 junedm1 left #salt
09:22 redondos joined #salt
09:22 redondos joined #salt
09:26 favadi joined #salt
09:27 gammalget joined #salt
09:30 fandikurnia01 joined #salt
09:35 mike251 joined #salt
09:35 * mike251 hi from Frankfurt
09:35 fandikurnia01 joined #salt
09:35 malinoff \me high fives from Omsk
09:36 * malinoff ?
09:36 * malinoff high fives from Omsk
09:36 zooz joined #salt
09:40 prooty joined #salt
09:41 prooty hello all. i have a question about the supervisord state.
09:42 prooty the update argument is documented as "Whether to update the supervisor configuration". my question is when will supervisor be updated?
09:43 malinoff prooty, During state execution
09:44 malinoff https://github.com/saltstack/salt/blob/develop/salt/states/supervisord.py#L150-L162
09:48 prooty hmm, i guess i'm looking at the wrong place. what happened was when i ran state.highstate i got the error for the supervisord state "ERROR (already started)".
09:49 prooty why would it be an error if it is already started? subsequent runs of highstate have no errors. and at this point i'm not sure how i produced the error in the first place.
09:51 malinoff prooty, Probably, one of your states already started supervisor daemon. Try to exclude failing state from the highstate and check whether supervisord is running after highstate
09:57 pviktori joined #salt
10:01 prooty i'm not sure i understand what you mean.
10:01 malinoff prooty, Can you start supervisord twice?
10:02 prooty like run "service supervisor start" twice?
10:02 malinoff Yes
10:03 prooty no, the second run errors out because supervisor is already running.
10:04 prooty i think you're talking about the supervisor daemon. i'm talking about the service in supervisor (salt.states.supervisord).
10:07 fllr joined #salt
10:09 malinoff I'm not very familiar with supervisor at all, but I think you should try execution module at first: http://docs.saltstack.com/ref/modules/all/salt.modules.supervisord.html?highlight=supervisord#salt.modules.supervisord
10:12 zandy joined #salt
10:14 ntt_ I'm trying to create a bridge with openvswitch in an sls file. It works, but if i recall the sls file, i have an error because the bridge already exists. How can i solve this? my sls fils -> http://pastebin.com/tznS9nRj
10:15 malinoff ntt_, Is there any command to show is there any existent bridges?
10:15 nebuchadnezzar unless: ovs-vsctl show ovsbr0
10:15 ntt_ yes
10:16 ntt_ or list-br
10:16 ntt_ nebuchandnezzar: show br-int doesn't work..... should use list-be
10:16 ntt_ list-br*
10:18 ntt_ malinoff: how can i parse the result of a ovs-vsctl list-br ?
10:19 malinoff {{ set brs = salt['cmd.run']('ovs-vsctl list-br').get('stdout') }}
10:21 bhosmer joined #salt
10:23 redondos joined #salt
10:33 fllr joined #salt
10:34 _fllr_ joined #salt
10:35 nebuchadnezzar ntt_: ovs-vsctl br-exists <bridge name>
10:35 nebuchadnezzar return 2 if bridge does not exists
10:36 ntt_ nebuchadnezzar: Solved with ovs-vsctl -- --may-exist add-br br-int
10:36 malinoff Cool
10:36 sroegner joined #salt
10:37 ntt_ someone can help me with this? -> http://pastebin.com/0735pFFg
10:37 ntt_ there is a canonical way to restart a service in a sls file?
10:38 malinoff ntt_, Often you have to restart a service after some changes
10:38 malinoff Is it your situation?
10:38 ntt_ yes
10:38 fllr joined #salt
10:38 malinoff ntt_, So you can add watch statement to supervisor service
10:39 malinoff http://docs.saltstack.com/ref/states/all/salt.states.service.html?highlight=service.running#starting-or-restarting-of-services-and-daemons
10:40 ntt_ watch statement should be related to a config file?
10:40 malinoff ntt_, to a state id of a state which handles config file
10:42 ntt_ like this -> http://pastebin.com/nWs4bKn0   ? So , when i made a change in the config file, service reboots?
10:43 malinoff When you run state with '/etc/redis.conf` id and it gives some changes, service reloads
10:43 bhosmer_ joined #salt
10:43 che-arne joined #salt
10:44 malinoff You simply shouldn't make any changes on a minion host, when you have salt-master
10:47 Katafalkas joined #salt
10:48 Katafalkas joined #salt
10:51 sylvinus joined #salt
10:52 Katafalkas joined #salt
10:53 Katafalkas joined #salt
10:58 mikkn Will I commit a semantic crime if I write a state which checks for the existance of a pillar?
10:59 juasiepo joined #salt
10:59 malinoff mikkn, Totally :)
11:00 mikkn malinoff: Very well! Then I shall commit a crime
11:06 psyl0n joined #salt
11:07 JasonG_TA joined #salt
11:07 fllr joined #salt
11:11 Iwirada joined #salt
11:12 sylvinus_ joined #salt
11:19 jY is it possible to have hierarchical pillar data? like i want different values based on if a server is in datacenter A or datacenter B
11:19 mikkn jY: As long as you don't have a default value you want to overwrite you can match pillars the same way you would match states.
11:20 jY mikkn: we are looking to convert from puppet and want to use hiera to do that like in puppet so we can keep certain passwords out of the main repo
11:20 junedm joined #salt
11:20 jY i haven't really found a good way to do that yet
11:21 mikkn jY: That is what pillar is for, yes
11:21 jY ok
11:21 jY i'll read more into pillars then
11:23 pengunix joined #salt
11:23 ninkotech__ joined #salt
11:24 redondos joined #salt
11:24 mikkn jY: You just need to have defined datacenter A and datacenter B as either a grain, environment or so
11:24 mikkn jY: Or part of the domain name
11:24 jY ok sounds easy enough.. i'll dig into them.. thanks
11:27 elm- joined #salt
11:28 mikkn jY: Do you know how matching works in states?
11:29 elm- Hello, I've a quick question: is there a way to debug template rendering (get the content of a rendered sls file) directly without running the state via salt with "-l debug"?
11:32 NV run the state with Test=true?
11:32 NV also, state.show_sls
11:35 elm- NV: Thanks, I use salt-call test=true -l debug until now, but state.show_sls is much better
11:35 MZAWeb joined #salt
11:35 NV each have their use :)
11:36 mikkn elm-: Look at http://docs.saltstack.com/ref/modules/all/salt.modules.state.html for more useful tips. :)
11:37 elm- thanks, is there also something similar to test a pillar file that contains "templated" content, e.g. based on grains? because those I also don't see with -l debug
11:38 bhosmer joined #salt
11:41 pengunix joined #salt
11:42 ntt_ can i define something similar this:  my_array['myhostname.mydomain'] = 192.168.10.10  in an sls file? can i access an associative array in an sls file?
11:43 mikkn elm-: Not as far as I know, but I'm rather new still ^^
11:44 bezaban woo. salt to the rescue
11:44 pengunix joined #salt
11:44 malinoff {{ set my_array = {} }} {{ my_array['myhostname.mydomain'] = '192.168.10.10' }} {% for host, ip in my_array.items() %} {% endfor %}
11:45 zandy joined #salt
11:45 bezaban microsoft audit; instead of installing their software I can 'sudo salt -N windows-servers cmd.run 'systeminfo | find /i "product id:"'
11:45 ntt_ malinoff: can i access with my_array[ grains['id'] ]?
11:46 malinoff ntt_, Yes, of course
11:46 ntt_ {% for host, ip in my_array.items() %}
11:47 ntt_ print array items?
11:47 ntt_ sorry
11:47 ntt_ ok....
11:47 malinoff {{ host }} {{ ip }}
11:48 malinoff http://jinja.pocoo.org/docs/
11:48 elfixit joined #salt
11:53 Destro joined #salt
11:54 mikef joined #salt
11:57 jY mikkn: ya i do know how that works
12:00 mikkn jY: It's the same for pillars. You have a top.sls and map what should be accessible to whom there in the same way. :)
12:01 jY mikkn: ya noticing that and seems more flexiable then hiera too.. i found http://intothesaltmine.org/blog/html/2013/02/28/using_pillar_data_in_saltstack.html which explained what i'd like to do nicely
12:01 mikef is there a way of requiring a mount  to exist?  or the normal  require: \n   - mount: /mnt/sdb2  will suffice?   im  talking about   https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.mount.html#module-salt.states.mount
12:02 ntt_ Rendering SLS  failed, render error: expected token 'variable_end', got 'my_array'; line 1 in template:
12:03 ntt_ what happens? i'm using malinoff code in an sls file
12:04 mikkn ntt_: They need to be on different lines. :)
12:05 ntt_ mikkn: i'm using on different lines but nothing
12:05 mikkn The first lines should also be {% %} and not {{ }}. The second means "print this"
12:07 mikkn mikef: Try. :) That should suffice, though! As long as you have a mount.mounted state to go with /mnt/sdb2 too.
12:07 mikkn jY: Excellent. :)
12:07 fllr joined #salt
12:08 anuvrat joined #salt
12:09 foxx joined #salt
12:11 ntt_ {% my_array['myhostname.mydomain'] = '192.168.10.10' %}   give me an error: render error: unknown tag 'my_array';
12:14 Destro {% set my_array['myhostname.mydomain'] = '192.168.10.10' %}
12:15 Destro I think you forgot to set the variable perhaps
12:15 ntt_ Destro: i have {% set my_array = {} %} in the line before
12:16 jinnko joined #salt
12:21 jinnko joined #salt
12:25 redondos joined #salt
12:25 sylvinus joined #salt
12:25 Sheco joined #salt
12:26 redondos_ joined #salt
12:32 _ikke_ Is it possible to have mulitple search / replace combos with the file.replace state?
12:37 anuvrat joined #salt
12:37 sroegner joined #salt
12:38 carlos joined #salt
12:44 bhosmer joined #salt
12:46 xl1 left #salt
12:47 mikkn Right. So. How stupid an idea is serving private keys over pillar?
12:51 mikkn Because there seems to be no file serving support right now in pillar?
12:52 junedm left #salt
12:52 bezaban are they protected with passphrases?
12:53 bezaban if I have to use private keys I prefer generating them on the machines in question, although most of our private keys are handled with smart cards and agent forwarding
12:54 mikkn It's for internal SSL certificates. So mainly for encryption. I'm pondering if it's feasable to set up a light CA using Salt. The CA key would of course be passphrase protected, but the server keys would be distributed through salt
12:54 bezaban that's a more general approach to key handling.  I'd say transferring them over an encrypted connection isn't a bad idea
12:56 bezaban the private keys could be generated on the servers by salt, you only need to sign the certificates which can be returned to the master for signing and then returned
12:57 mikkn bezaban: How would I send the file from the minion to the master?
12:57 bezaban or the certificate signing request rather
12:57 bezaban isn't there a thing called a returner? hmm
12:57 mikkn bezaban: Maybe! I'm rather new. :)
12:57 bezaban so am I! :P
12:58 mikkn http://docs.saltstack.com/ref/returners/all/index.html :)
12:58 mikkn Nice
12:58 moos3 joined #salt
12:58 mikef joined #salt
12:58 bezaban not sure that is actually what returners do, but worth a shot
12:58 mikkn Ah, then I might not even need pillar. :)
12:59 bezaban you'd possibly need a pillar to generate the certificate signing request / key with the correct data
13:00 mikkn bezaban: Well, if the CSR is created on the server itself, I just need to get that to the CA server and approve it
13:00 oz_akan_ joined #salt
13:02 mikkn bezaban: it seems Returners isn't what I want
13:02 bezaban :(
13:02 mikkn bezaban: But this is: http://docs.saltstack.com/ref/modules/all/salt.modules.cp.html#salt.modules.cp.push
13:03 bezaban ooh, indeed.
13:03 bezaban that will come in handy for me too
13:03 bezaban also neatly sorted
13:03 mikkn :)
13:04 mikkn Now I just need a state to generate the CSR, push it and wait for approval. :)
13:07 bezaban mikkn: will be interested in hearing if you get it working :)
13:07 fllr joined #salt
13:07 mikkn bezaban: Oh, I'll get it working ;) I'll let you know when!
13:07 bezaban that's the spirit :D
13:09 toastedpenguin joined #salt
13:12 _ikke_ I have this state: https://gist.github.com/Ikke/d22a2ab4be2713dca5e8, but it complains that there is no function declared for state 'file'. Any clue about what I'm doing wrong?
13:13 moos3__ joined #salt
13:15 bhosmer joined #salt
13:17 sgviking joined #salt
13:20 _ikke_ I think I know
13:21 _ikke_ But that doesn't really solve my problem
13:21 lpmulligan <_ikke_> replace doesn't get a ':' after it.
13:22 blee joined #salt
13:22 mikkn _ikke_: I would've guessed you needed two file.replace: rather than file: - replace: - replace:
13:23 mikkn file is the state module, file.replace is the state provided by the state module.
13:25 isomorphic joined #salt
13:26 _ikke_ Hmm, didn't know you could have two mapping keys with the same name
13:26 jslatts joined #salt
13:26 _ikke_ No, it doesn't work
13:27 _ikke_ https://gist.github.com/Ikke/d22a2ab4be2713dca5e8
13:27 mikkn _ikke_: Ah, you are correct, that's the net effect. :)
13:27 redondos joined #salt
13:27 _ikke_ I want to execute two replaces on the same file
13:28 bhosmer joined #salt
13:28 _ikke_ but it wouldn't be nice if I had to repeat everything for every replace I want to do
13:30 mikkn _ikke_: I honestly don't really know how you would do that in a neat way. I would probably be managing the entire php.ini in salt, though.
13:31 _ikke_ mikkn: Yeah, perhaps that's better
13:31 mikkn _ikke_: It's what its for anyway ^^
13:32 _ikke_ Yeah, I'd usually use that
13:34 bhosmer_ joined #salt
13:35 dstanek joined #salt
13:41 LucasCozy joined #salt
13:41 ipmb joined #salt
13:43 mgw joined #salt
13:43 Sheco joined #salt
13:43 dvl_ joined #salt
13:47 dvl_ Today's goal: get salt to install a package on FreeBSD using stats.  I can install from the command line (e.g. salt salt-test pkgng.install logcheck), but not yet via
13:47 dvl_ ... err states.
13:48 _ikke_ dvl_: What have you tried?
13:50 sylvinus joined #salt
13:50 pengunix joined #salt
13:52 bhosmer joined #salt
13:53 Psi-Jack How does salt actually handle multiple conflicting keys, exactly? From, for example, a gitfs point of view, I have ext_pillar with master, prod, then dev. If I have a key defined in dev does that take priority over what's in master, or does master have precedence?
13:54 mgw1 joined #salt
13:54 Psi-Jack For pillars specifically ^^
13:56 Psi-Jack Looks like the last matching pillar wins.
14:02 blee joined #salt
14:05 elfixit joined #salt
14:06 dvl_ _ikke_: so far, I'm following http://docs.saltstack.com/topics/tutorials/states_pt1.html and I'm about to try it again.  I'm getting 'State pkgng.install found in sls jailhosts is unavailable'.  So I figure my /usr/local/etc/salt/jailhosts.sls is at fault.
14:07 dvl_ .. when issuing: salt salt-test state.highstate
14:07 fllr joined #salt
14:08 bbinet hi
14:08 vejdmn joined #salt
14:08 Gifflen joined #salt
14:08 _ikke_ dvl_: note that commands are not states, they're different
14:09 bbinet is it normal that when I use "user.present" module to create a new user
14:10 bbinet when applying the state with salt '*' state.highstate
14:10 bbinet the home directly of the new user is own by root ?
14:10 oz_akan_ joined #salt
14:10 juicer2 joined #salt
14:11 brianhicks joined #salt
14:11 bbinet so I have to explicitly use file.directory module with user/group to force rewrite the home directory owner
14:11 bbinet this seems weird to me
14:12 mgw joined #salt
14:13 oz_akan_ joined #salt
14:14 dvl_ _ikke_: I'll look at commands versus states next.
14:15 mpanetta joined #salt
14:15 _ikke_ dvl_: you usually use pkg.installed
14:16 smccarthy joined #salt
14:16 dvl_ _ikke_: I understand.  That's what the docs say.  I'll try that too.
14:18 bhosmer_ joined #salt
14:19 dvl_ _ikke_: pkg.installed is giving better results, but failing to install. Seems it's using 'illegal option's.  Command '/usr/sbin/pkg install -y -L logcheck' failed with return code: 64 <== specifically the -L.  Looking in that
14:19 dvl_ FWIW, the command without -L works.
14:20 bhosmer__ joined #salt
14:22 racooper joined #salt
14:23 JasonSwindle joined #salt
14:24 mgw joined #salt
14:25 dvl_ It seems -L has been replaced by -U
14:27 jergerber joined #salt
14:28 thlig joined #salt
14:28 redondos joined #salt
14:30 thlig Hi, I am running Salt 17.1.1 with a Centos 6 Master and a with a couple of Centos minions and a single Windows minion. I am having problems communicating with the Windows Minion. How do I place the Windows Minion into debug mode? Thanks
14:32 fllr joined #salt
14:33 _fllr_ joined #salt
14:34 moos3__ joined #salt
14:37 moos3 joined #salt
14:38 sroegner joined #salt
14:42 dvl_ To be sure I understand: state files (.sls) represents the state in which a system should be.  That differs from a command, e.g. salt salt-test pkgng.install logcheck
14:42 _ikke_ correct
14:42 dvl_ A given state file might invoke that particular command.
14:42 _ikke_ yes
14:42 dvl_ Thank you.
14:43 quickdry21 joined #salt
14:45 yannj joined #salt
14:47 yannj Hello there, I have a design question. What would be the best way to maintain default configuration, overridden by group, overridden by host. I think I can use pillar to store all my configuration parameters and just replace them in the template. But I don't understand if it possible to do some group/host specific look up in pillars
14:48 jergerber joined #salt
14:52 billygoat joined #salt
14:54 pdayton joined #salt
14:55 EugeneKay you use a grain in your state file, usually the minions id.
14:55 EugeneKay sls are run through jinja before being evaluated
14:56 EugeneKay same thing with your pillar data - minion specific data can be included via the same technique
14:56 fandikurnia01 joined #salt
14:56 EugeneKay I'd give an example, but my phone does it poorly.
14:58 th3reverend joined #salt
14:59 fandikurnia01 joined #salt
15:00 dvl_ OK, I found a bug with site-packages/salt/states/pkg.py ... it's passing refresh=False to  __salt__['pkg.install'] when it should be passing refresh=refresh (i.e. pass on what was passed in).
15:01 yannj EugeneKey : but can't value in pillar be overridden using targetting?
15:02 EugeneKay if you override the minions id you're doing something wrong ;-)
15:03 yannj EugeneKey : no I mean for example set a value myvar: True for '*' and myvar: False for 'host1'
15:03 yannj EugeneKey: and then use this value stored in a pillar from my configuration file template
15:04 EugeneKay yes, you do that via templating
15:04 EugeneKay that's exactly what I'm describing
15:04 yannj ok
15:04 pengunix joined #salt
15:05 EugeneKay set up your defaults, then have a jinja block to override for a specific minion/group thereof
15:06 th3reverend left #salt
15:07 amahon joined #salt
15:07 fllr joined #salt
15:11 cachedout joined #salt
15:11 yannj EugeneKay: ok, that sounds good
15:15 pengunix left #salt
15:20 sylvinus joined #salt
15:21 pass_by_value joined #salt
15:22 elm- left #salt
15:22 dvl_ pkg.installed bug in pkg.py posted to mailing list: https://groups.google.com/forum/#!topic/salt-users/jqTLu8Wd8l4
15:29 redondos joined #salt
15:29 EWDurbin any timeline for 0.17.3 or 0.17.4 hitting EPEL testing or EPEL? yumpkg5 regression in 0.17.2 hitting me hard
15:29 EWDurbin :(
15:29 Marion_ joined #salt
15:29 Corey EWDurbin: "Soon."
15:29 EWDurbin \o/
15:29 EWDurbin yay!
15:29 EWDurbin now just pulling 0.17.1 from koji directly
15:30 Corey EWDurbin: Expect it later this week if I'm not mistaken.
15:30 EWDurbin thanks EPEL for never keeping even a single previous release around in the repo
15:30 Corey EWDurbin: That's hardly fair. :-) The PPA doesn't either.
15:30 Corey Even in Homebrew for Mac you've gotta rewind time.
15:30 EWDurbin Enterprise Linux
15:30 EWDurbin not Ubunut
15:31 Corey EWDurbin: Quite, I'm just saying that there really isn't anything that provides older releases.
15:33 EWDurbin i'm not to *salty* about it
15:33 tyler-baker joined #salt
15:33 EWDurbin s/to/too/
15:34 nmistry joined #salt
15:34 whiskybar joined #salt
15:35 JulianGindi joined #salt
15:36 forresta joined #salt
15:36 whiskybar1 joined #salt
15:38 kermit joined #salt
15:38 lineman60 joined #salt
15:40 lineman60__ joined #salt
15:40 jimallman joined #salt
15:40 psyl0n joined #salt
15:43 [diecast] joined #salt
15:44 bhosmer joined #salt
15:45 billygoat joined #salt
15:52 bhosmer_ joined #salt
15:53 mortis_ anyone good with salt-cloud here? i cant understand why its not working with my openstack-setup
15:53 mortis_ just says it doesnt find my profile when trying to create vms
15:54 mortis_ even tho it is configured in /etc/salt/cloud.profiles
15:54 mortis_ and i specify that on the commandline
16:00 Tekni joined #salt
16:00 MZAWeb joined #salt
16:01 bt joined #salt
16:03 terminalmage joined #salt
16:04 lineman60 joined #salt
16:04 bhosmer joined #salt
16:05 nmistry joined #salt
16:06 quenode joined #salt
16:12 cdn joined #salt
16:13 erchn joined #salt
16:13 fllr joined #salt
16:14 dstanek joined #salt
16:14 kaptk2 joined #salt
16:16 cnelsonsic joined #salt
16:17 cdn Hi all, have a question on how I should attack this problem with configuration a bunch of the same servers but playing different roles at different times.
16:17 cdn As an example, say I have 2 "profiles" that i'd go between in an allocated group of servers. Same "pool" of servers would be used/reset/etc since they are virtual.
16:18 cdn In profile1 (server1 gets all the configuration, apache+configurtion, our product to test, etc), In profile2 (server1 + server2 gets split configuration, apache on both server1 and server2, product is split across both serevrs, etc)
16:18 sylvinus joined #salt
16:19 erchn cdn: this would be done on demand or literally at specific times of the day?
16:19 cdn On demand.
16:19 cdn perhaps after Test1 is complete, change environment into test2, etc.
16:19 cdn with a reset inbetween.
16:20 erchn I would probably set a grain using grains.setval and then match on that to change pillar and states to apply
16:20 erchn all that can be done from the master
16:20 cachedout joined #salt
16:20 erchn does that make sense?
16:21 forresta I'd agree with erchn, set a role, then in your top file do targetting based on that grain data: http://docs.saltstack.com/ref/states/top.html#other-ways-of-targeting-minions
16:22 Katafalkas joined #salt
16:24 bastion2202 joined #salt
16:26 jalbretsen joined #salt
16:27 quenode joined #salt
16:30 cdn I worked a little with Pillars, but haven't created a grain. Is the grain defined in the minion's file?
16:30 forresta cdn, yes http://docs.saltstack.com/topics/targeting/grains.html#grains-in-the-minion-config
16:31 psyl0n joined #salt
16:31 davet joined #salt
16:34 Ryan_Lane joined #salt
16:37 Katafalkas joined #salt
16:38 kermit joined #salt
16:39 sroegner joined #salt
16:41 rlarkin joined #salt
16:41 andresr joined #salt
16:44 elfixit joined #salt
16:45 andresr joined #salt
16:45 opapo joined #salt
16:46 bitz joined #salt
16:48 dvl_ Where can I find the 'develop' branch of salt?  I'm asking because I was just told: Actually, I think this fix has already been implemented on `develop`.
16:49 scoates dvl_: https://github.com/saltstack/salt/tree/develop
16:50 StDiluted joined #salt
16:50 DanGarthwaite joined #salt
16:50 dvl_ scoates: thanks... that's where I was.... I'll keep looking for the fix.
16:51 StDiluted I've got a git state checking out a repo, and i specified the 'user' variable, but the repo is still owned by root, and not that user. That's not what I expected. Am I missing something?
16:53 StDiluted i added the runas variable (deprecated as of .17.0) and it seems to work as I expected
16:54 StDiluted ah, never mind, this client has an old version of salt-minion
16:55 teskew joined #salt
16:55 sroegner joined #salt
16:55 pipps joined #salt
16:56 foxx hello. is it normal for saltbootstrap to fail on ubuntu precise1 with the error "exit status 2: tar: ./Dockerfile: Cannot open: Resource temporarily unavailable"
16:56 foxx uh
16:56 foxx sorry wrong error, sec
16:57 DanGarthwaite I used it just yesterday on a 64bit precise vm
16:57 foxx *REPOST* is it normal for saltbootstrap to fail on ubuntu precise1 with the error "PreDepends: salt-common (= 0.17.2-2precise1) but it is not going to be installed"
16:57 DanGarthwaite By saltbootstrap you mean the output from http://bootstrap.saltstack.org ?
16:57 foxx yessir.
16:57 foxx /usr/bin/wget -O - http://bootstrap.saltstack.org | sh -s -- -M -N
16:58 foxx due to failed dependancies;
16:58 foxx salt-master : Depends: python-support but it is not installable
16:58 DanGarthwaite How minimal is your /etc/apt/sources.list ?  I've seen debootstrapped environments that have nothing but main in them.
16:58 foxx checking, sec
16:58 Jahkeup joined #salt
16:59 DanGarthwaite Seems DigitalOcean enables main universe multiverse and restricted by default
17:00 foxx (sorry, waiting for the image to compile again, make clean blah)
17:00 DanGarthwaite np
17:01 lineman60 so I shutdown one of my salt clients, fell off the map.  I shut it down change the top file ran highstate then switched the top file back and booted the system
17:01 DanGarthwaite . o O ( questions like this I wish were on serverfault - just so I can snipe the answer )
17:01 lineman60 now when i run salt '*'  grains it does not show up
17:02 lineman60 keys still listed and nothing in the log (server or minon) any ideas?
17:03 DanGarthwaite Hi lineman60
17:03 mgw joined #salt
17:03 DanGarthwaite What are you trying to test?
17:04 lineman60 just diffrnet configs.
17:04 lineman60 server setups
17:04 SpeeR joined #salt
17:04 lineman60 and this is a test envrioment so i roll a new vm just weard that it fell off the map
17:05 lineman60 actuly i was testing  https://github.com/clausa/salt-logstash
17:05 lineman60 and wanted to try 2 servers
17:06 lineman60 one with that and one a chat server i'm wirting the install for my self
17:07 DanGarthwaite Nice little jijna there:   "ES_HEAP_SIZE={{ (grains['mem_total']/2)|round|int }}m"
17:09 lineman60 DanGarthwaite ya, it seemed neat
17:09 redondos joined #salt
17:13 hotbox joined #salt
17:13 Katafalkas joined #salt
17:15 KyleG joined #salt
17:15 KyleG joined #salt
17:16 psyl0n joined #salt
17:19 hotbox joined #salt
17:20 troyready joined #salt
17:21 mike251 left #salt
17:23 mjulian joined #salt
17:23 mjulian joined #salt
17:24 Jahkeup joined #salt
17:25 jcsp joined #salt
17:25 jdenning joined #salt
17:25 whitepaws left #salt
17:27 DanGarthwaite ... that version of logstash is crusty.  The newer 1.1.13 has kibana built in.
17:28 DanGarthwaite whoops - might be 1.2 and up, looking for confirmation.
17:29 lineman60 okay still don't know why that made the Other server fall off the map
17:29 lineman60 but, I may just wipe the whole thing and use fromuals
17:31 Jahkeup joined #salt
17:32 zandy joined #salt
17:33 Sheco joined #salt
17:35 amahon joined #salt
17:36 dave_den joined #salt
17:41 backjlack joined #salt
17:42 jcsp joined #salt
17:45 backjlack joined #salt
17:47 dstanek joined #salt
17:53 jacksontj joined #salt
17:54 nmistry joined #salt
17:54 bemehow joined #salt
17:55 frosty996 joined #salt
17:57 slav0nic joined #salt
18:01 \ask in a custom grain how do I get the id of the current minion?
18:01 druonysus joined #salt
18:01 druonysus joined #salt
18:01 Katafalkas joined #salt
18:02 xmltok joined #salt
18:03 dave_den \ask: __opts__['id'] i believe
18:03 \ask dave_den: ah, thanks.
18:03 bhosmer joined #salt
18:06 log0ymxm_ joined #salt
18:07 bhosmer joined #salt
18:08 Sheco joined #salt
18:10 zandy joined #salt
18:11 zandy joined #salt
18:13 erchn hi all, anyone else having troubles with Travis?  Seems the new travis-pro thing is a PITA and it no longer sees my forked repo
18:13 forresta erchn, it ran fine on my fork around 11 PM MST last night erchn, with the latest develop branch that has all the tags.
18:13 forresta but I also don't use travis pro
18:14 billygoat joined #salt
18:14 erchn I don't wanna use travis-pro, but just signing in forces me into the travis-pro oauth flow
18:15 forresta weird, I never even log into travis
18:15 erchn ahh found it
18:16 erchn I had to go to the blog then there was a link to travis ci, not travis pro...lame
18:16 forresta erchn, this is where I always go
18:16 forresta https://travis-ci.org/gravyboat/salt
18:17 erchn forresta: thanks, I'll go directly to my account from now on...classic monetization play that isn't being done well.
18:18 forresta yea, make sure you don't go to https://travis-ci.org/youraccount, it will just load to a blank page I believe
18:18 forresta you have to make sure to specify the project, which is odd.
18:19 hotbox joined #salt
18:21 amckinley joined #salt
18:25 KyleG joined #salt
18:25 KyleG joined #salt
18:25 hotbox joined #salt
18:28 Shenril joined #salt
18:28 higgs001 joined #salt
18:30 jesusaurus forresta: so was your intention with that doc page to list large projects with multiple state formulas in them?
18:30 jesusaurus does it make sense to you to add https://github.com/saltstack-formulas to that page?
18:30 jesusaurus because thats the direction im going with splitting up my repo into multiple repos
18:30 dvogt joined #salt
18:31 hotbox joined #salt
18:32 forresta jesusaurus, the goal was to show projects that actually do something which are a combination of states, so the formula page wouldn't apply.
18:32 forresta I want to see stuff like 'I set up this web server and the associated database'
18:32 forresta or 'I set up a logstash server and configure my web server up to it'
18:33 frosty996 forresta: like my pgbouncer attached to postgresql demo I'm using tomorrow?
18:34 forresta frosty996, yea that sounds cool if you're configuring the boxes to do that.
18:34 jesusaurus i completely understand how useful those types of examples are, but i think that monolithic repos for your salt formulas make it much harder for collaboration
18:34 Ahlee Missing arguments executing "saltutil.sync_modules": ArgSpec(args=['env', 'refresh'], varargs=None, keywords=None, defaults=(None, True))
18:34 Ahlee theories?
18:34 log0ymxm_ left #salt
18:34 frosty996 forresta: yah, it's all in salt. That's why I was asking about the mine functions the other day
18:34 forresta frosty996, Would probably be great then!
18:35 forresta jesusaurus, I don't disagree with you, I'm looking at it more from a perspective of 'my project is checked into a repo'
18:35 frosty996 forresta: I'll put it in its own repo after the talk
18:35 forresta as opposed to 'my states are checked into a repo'
18:35 forresta frosty996, awesome
18:35 * Gareth waves
18:36 frosty996 right now the repo has a Vagrantfile and a bunch of iterative versions of /srv/salt and /srv/pillar to go along with various parts in the talk
18:36 frosty996 but I think people would only be interested in the final version
18:36 forresta because I know when I started learning puppet originally, all I wanted was example projects to look at, to see how people set up apache and served content with it, or a host of other things. Having just the manifests was useless because they weren't integrated into an end goal.
18:36 jacksontj joined #salt
18:36 frosty996 forresta: yah, I totally get you
18:36 forresta frosty996, It sounds like a great one to add!
18:37 frosty996 forresta: you can look at the current state of affairs here: https://github.com/pgexperts/saltstack-talk-examples
18:37 Ahlee fuck. it's a non-0.17 talking to 17 issue, again
18:37 jesusaurus forresta: ahh, then a repo with nothing more than a lot of submodules to the various formulas would be good for tying it all together
18:37 forresta jesusaurus, sure, if it attains the end goal of having a server up and running that accomplishes some sort of task
18:37 hotbox joined #salt
18:38 forresta for examples like the djangocon one, it's the fact that this example shows setting up an app, configuring a database, etc. that makes it awesome. You can pick and pull stuff from a real work example of something that actually delivers a product at the end.
18:41 rgarcia_ joined #salt
18:41 Psi-Jack EWDurbin: You could just take the 0.17.x src.rpm and make your own from a github branch tag download.
18:42 cdcalef joined #salt
18:42 cdn HI guys, best practice for States (SLS) question
18:42 simonmcc joined #salt
18:42 rgarcia_ has anyone used/pondered about salt for managing the state of accounts in things like google apps, AWS, etc.?
18:43 Psi-Jack EWDurbin: https://github.com/saltstack/salt/archive/v0.17.4.tar.gz
18:43 cdn If I had to maintain different applications across the servers, should I make a SLS file per application or try to group different applications into fewer .SLS files?
18:43 cdn i.e one for JDK, one for the Java App Server, etc.
18:43 forresta cdn, the usual suggestion is to make things as modular as possible
18:43 forresta cdn, take a look at how https://github.com/terminalmage/djangocon2013-sls is laid out
18:43 Psi-Jack Modular++
18:44 hotbox joined #salt
18:44 Psi-Jack Except that modularity impairs testing ability, but oh well. :(
18:44 forresta Psi-Jack, lol
18:44 forresta Did you post on the mailing list about that ever?
18:44 forresta I didn't see a thread, but I was scanning last night
18:44 Psi-Jack Not yet, but I'm building up my rage to do so. :)
18:45 cdn Thanks forresta, will give it a read right now.
18:45 jesusaurus Psi-Jack: how does modularity impair testability?
18:45 forresta nah don't let it be rage filled, just post over there, and maybe some of the devs can provide input
18:45 forresta rational > irrational
18:45 forresta cdn, np
18:45 Psi-Jack forresta: The email itself won't be. I just have to be angry enough to /want/ to join a mailing list to communicate about it. :)
18:46 forresta do you have a gmail account?
18:46 Psi-Jack I do. Though I prefer to use my own mail server.
18:46 forresta Psi-Jack, well, you could always just make a throwaway and post https://groups.google.com/forum/#!forum/salt-users
18:47 forresta takes about 30 seconds, and I'd be interested to see other ideas that people have for your specific scenario, or what I read of it last night before my finger got tired of scrolling :P
18:47 cbloss joined #salt
18:47 Psi-Jack Salt.. Uses.. Google groups as their mailing list?
18:47 forresta yea
18:47 Psi-Jack FRACK THAT nonsense. That's one of the worst I've ever seen for mailing list management. :({
18:48 jcockhren I totally saw that reaction coming ^
18:48 Psi-Jack sighs.
18:48 forresta Yea it's not perfect, but it's a discussion forum that is easy for people to get associated with
18:48 jcockhren lol
18:48 forresta mailing lists can be kind of daunting to some people
18:48 Psi-Jack I flat out refuse to use anything from groups.google.com
18:48 forresta lol, then open an issue on GitHub
18:49 Psi-Jack I'd rather talk to UtahDave, or if there's any other dev that comes here frequently, and talk about the issue in realtime. Where's he been? :(
18:49 billygoat joined #salt
18:50 meteorfox joined #salt
18:50 forresta I believe he's been away on business this week
18:50 forresta there are some devs in here if you want to summon them, I don't know who would be best to talk with regarding that though
18:50 * Psi-Jack nods.
18:50 sylvinus joined #salt
18:51 Psi-Jack I see, ehh, any of them works, UtahDave is just one of them I've spoken to before, and he's always been very helpful, and friendly.
18:51 forresta all of the guys are like that
18:51 forresta except basepi, but he's just a horrible person in general :P
18:51 Psi-Jack Heh, I see basepi is one that's here. :)
18:51 basepi that's me!
18:52 basepi the horrible person
18:52 forresta there are several others, he's just the only one with an ops tag
18:52 [diecast] joined #salt
18:52 forresta see, I told you he's terrible
18:52 basepi i know, i've regretted it from the day i enabled it.
18:52 Psi-Jack heh
18:52 basepi when you have op, people ask you QUESTIONS
18:52 basepi ;)
18:52 cachedout basepi: What is the meaning of life?
18:52 Psi-Jack Well, I have a question, and/or suggestion. :)
18:52 basepi 42
18:52 forresta basepi, lol, they don't ask less questions, the questions are just directed at you :P
18:52 forresta oh cachedout I didn't see you
18:52 forresta that was fast on the merge last night man
18:53 Gareth basepi: basepi What... is the air-speed velocity of an unladen swallow?
18:53 basepi Psi-Jack: you should re-ask your question.  because i'm lazy and scrollback is boring.  ;)
18:53 basepi blue....i mean yellow!!!!
18:53 forresta basepi, you don't want to look at the scrollback anyways, your finger will get tired
18:53 JasonSwindle joined #salt
18:54 ccormier joined #salt
18:54 Psi-Jack basepi: OKay. Well, it's long-winded, but the shortest version I can come up with is.. Is it possible to get Salt to stack and override states based on environment, as in, to have an environment dev override same states as in prod, which may've overrided states in base?
18:54 forresta frosty996, finally had a chance to look at that repo you linked, this looks cool! Especially the mine. If you could narrow it down (like you were saying) to an example of an actual working project, that would be sick
18:54 basepi I guess the correct reply should have been "African or European?", Gareth.  ;)
18:54 Gareth basepi: :)
18:55 basepi Psi-Jack: as far as I know, that's not currently possible.  But it certainly would be useful!
18:55 meteorfox Hi all, I currently want to delete minions that I've deployed with salt-cloud, if they're not ping-able, or even better for my use case, minion ask the master to revoke its key and destroy it
18:55 basepi Psi-Jack: you should submit a feature request.
18:55 Psi-Jack basepi: Indeed, It would be insanely good, instead of merging them all together like is being done now, and conflicting.
18:55 frosty996 forresta: essentially, if you just put: srvsalt/04-pgbouncer-mine in /srv/salt and srvpillar/04-pgbouncer-mine in /srv/pillar, you will come up with minion1 running pgbouncer connected to postgresql on minion2
18:56 forresta nice
18:56 Psi-Jack BEcause. well, developing salt states, you pretty much have to either: A> Test in a dedicated salt box that that's it's sole purpose is to be testing salt states. Or B> Test states in production.
18:56 JasonSwindle Psi-Jack:  Or use cloud / Vagrant :)
18:56 JasonSwindle That is how I did it
18:56 Psi-Jack JasonSwindle: Which is A
18:56 basepi I don't often test my states, but when I do, I test in production.
18:56 basepi ;)
18:56 JasonSwindle :)
18:57 Psi-Jack basepi: Heh, exactly./
18:57 Psi-Jack And I hate that! Soooo much!
18:57 frosty996 the numbers are just there for me to coordinate the sections of the talk
18:57 forresta gotcha
18:57 basepi Psi-Jack: just a sec, i may have an alternate solution for you
18:57 Psi-Jack Especially since when you deploy salt with schedules to perform highstate every 30~60 min, you're going to get burnt.
18:58 ajw0100 joined #salt
18:58 _jslatts joined #salt
18:58 basepi Psi-Jack: one useful thing is the ability to extend states, though I don't think that's quite what you're looking for.  http://docs.saltstack.com/topics/tutorials/starting_states.html#extending-included-sls-data
18:58 Psi-Jack basepi: I've tried many methods.. But the sole problem is, I have a state currently in env:prod, I copy it to env:dev and make changes and want to test. Because it's a copy, conflicts will occur.
18:59 jcockhren Psi-Jack: so you're basically asking for a way to extend states across evironments?
18:59 basepi Psi-Jack: another way is that you can define multiple directories for a given environment, and it will search them *in order* for the states.  this allows you to basically "set a priority" for your states.  but again, that's limited to states within the same environment
18:59 Psi-Jack basepi: Yeah, not quite. The idea of testing is making changes to the new copy and testing solely against it, so when you put it back to prod, it works exactly like it tested.
18:59 Psi-Jack jcockhren: Not quite, no.
19:00 ajw0100 joined #salt
19:00 erchn basepi: there's no reason different environment can't point to the same hierarchy of directories
19:00 Psi-Jack basepi: I've tried that method as well, except when you target the same host within the environments (2 environments, 1 state in both), conflicts still occur.
19:00 basepi erchn makes a good point.
19:01 meteorfox basepi: sorry for being intrusive, I don't see any other operator, Is it possible for a minion, that's been deployed with salt-cloud, to tell its master to delete it?
19:01 Psi-Jack Basically, however pillars is being handled, would be awesome if states did that. :)
19:01 Psi-Jack Or similar.
19:02 erchn psi-jack: I actually find pillar the least flexible portion of salt, layering pillar data together is a nightmare
19:02 Psi-Jack Because, in pillars, the last matching pillar state overrides the prior.
19:02 erchn I've resorted to many macros
19:02 cdcalef is there a way to get minions to highstate when they start up or if they lose network connection and then reconnect?
19:02 basepi meteorfox: i think if you enable the peer system and then use the new cloud execution module, you can
19:02 StDiluted I abandoned the idea of environments because they dont make sense in Salt at all
19:03 Psi-Jack StDiluted: Yeah. That;'s why I'm openly complaining. :)
19:03 erchn stdiluted: I completed agree.  It gets much easier if you just control what will and won't run via pillar and targetting
19:03 StDiluted yep
19:03 Sheco joined #salt
19:03 Psi-Jack Because yeah, they are worthless at this time, in comparison to chef and puppet, but overall salt is better in all but test-ability.
19:03 meteorfox basepi: cool, do you have a link to a reference, or code, to this cloud execution module? thanks
19:04 StDiluted which is sort of an argument for either making it work as expected, or removing it totally from the system
19:05 sylvinus_ joined #salt
19:05 pinge joined #salt
19:05 amckinley joined #salt
19:05 Psi-Jack I think states, personally, should run in the same order as pillars do, kinda. Because pillars index from 0 - X, if key in 0 exists in 1 replace it with 1's, etc. Because states would at least be able to have usable overrides for testing 100%.
19:06 StDiluted well, ordering has been added for states
19:06 Psi-Jack Sorta.
19:06 Psi-Jack Not between environments.
19:06 basepi meteorfox: https://github.com/saltstack/salt/blob/develop/salt/modules/cloud.py#L143-L155
19:07 Psi-Jack Basically salt merges all environments together and works off the $state['env']['state']... concept.
19:07 meteorfox basepi: thanks!
19:07 sylvinus_ joined #salt
19:07 Psi-Jack And if any $state[*]['state'] exists in multiple environments, conflicts.
19:07 erchn psk-jack: I feel like it can get complicated enough when only looking at a single directory structure (env), allowing merges across different envs sounds so painful
19:08 Psi-Jack erchn: Not really. It woould follow the same file_roots order as it already /should/ be doing, but isn't.
19:08 mgw any devops/sysadmins looking for full time work?
19:09 mgw feel free to PM me
19:09 Psi-Jack erchn: pillars works in ordering based on pillar_roots or ext_pillars list order. If that were applied to file_roots and/or somehow to gitfs_remotes, that order matters, you could stack them in whatever hierarchy you wanted and override only in the environments you need to override in.
19:10 Psi-Jack mgw: Spamming is off-toppic on freenode.
19:10 zandy joined #salt
19:11 dvl_ I'm looking at the stuff in salt-contrib/blob/master/states/ and wanted to start using one of them.  I know the file isn't on my minion right now, and I'm not sure of the right place to put it.  Clues please?
19:11 Psi-Jack basepi: So, where do I make suggestions? :)
19:11 forresta Psi-Jack, just open an issue
19:11 Psi-Jack Besides commuinicating here in IRC? ;)
19:12 Psi-Jack Ahh github?
19:12 mgw Psi-Jack, sorry… I've asked UtahDAve about posting previously and he said it was fine.
19:12 forresta yea
19:12 dave_den sigh
19:12 foxx mgw: fyi, a blind offer of a job like that is not a good way to poach developers. just saying.
19:13 Psi-Jack Heh
19:13 foxx mgw: pro tip, write up a spec and paste the url. dont ask to ask :)
19:14 basepi Psi-Jack: yep, open an issue.
19:14 Psi-Jack Roger that. Working on the write-up now.
19:15 Jahkeup joined #salt
19:15 erchn psi-jack: I always though of environments as a way of defining sets of states for a given set of nodes, not as a way of separating my in development from my production ready states.  But I see how that could be useful.
19:15 Psi-Jack erchn: That would be wrong. You've just defined roles. Not environments.
19:16 Psi-Jack A webserver, a mailserver, a database server. Three different roles. Add on an environment, you can have a role in prod, dev, qa, etc, so you can differentiate and/or test new states before putting them globally.
19:16 dave_den Psi-Jack: wouldn't trying to assign a minion into 3 environments at once be wrong?  :)
19:16 erchn psi-jack: wrong in your head, not mine.  I see a roll as a set of tasks for that node, not as a definition of who that server serves
19:17 Psi-Jack dave_den: If ordering worked like pillars, it would work with states too. :)
19:17 Psi-Jack If order only mattered, but in states, it doesn't.
19:17 dave_den it does
19:17 dave_den !
19:17 Psi-Jack Which is what makes it odd.. No, no, it doesn't.
19:18 dave_den clearly i've failed at explaining the problem you are having
19:19 dave_den hopefully we can clear it up when you file the issue tho
19:23 prooty joined #salt
19:24 prooty hello. can includes only be added at the top of the sls file?
19:25 erchn prooty: no
19:25 prooty thanks. so an sls can have multiple includes?
19:26 erchn prooty: yes, specified as a yaml list
19:26 prooty got it, thanks again.
19:28 meteorfox joined #salt
19:28 erchn basepi: are pull requests still expected against the develop branch?
19:28 echos joined #salt
19:28 meteorfox joined #salt
19:29 basepi erchn: yes
19:30 erchn basepi: ok thanks.  github is totally broken for me so I cannot get to the guidelines.  the backend storage for my repo is offline.  lame
19:35 echos joined #salt
19:35 jenner left #salt
19:35 aleszoulek joined #salt
19:35 Psi-Jack There we go. Issue 9186. ;)
19:36 meteorfo_ joined #salt
19:37 lv_ joined #salt
19:43 rgbkrk joined #salt
19:45 ccormier Hi all, Is it possible to dynamically set a grain, then use that grain in the generation of pillar data?
19:45 Psi-Jack Define: Dynamically
19:45 AdamSewell joined #salt
19:46 Psi-Jack https://github.com/saltstack/salt/issues/9186 in case anyone's interested. ;)
19:46 ccormier Using some logic in my pillar definitions, something like if grains[domain] = x, then set grain
19:47 AdamSewell When using salt '*' test.ping - is there a way to see which site does not respond?
19:47 Psi-Jack ccormier: Yes, you can do that. I have my salt managing my minion's /etc/salt/grains files.
19:47 Psi-Jack AdamSewell: salt-run manage.down
19:48 higgs001 joined #salt
19:48 blee_ joined #salt
19:50 ccormier Psi-Jack: so you would have a state to manage the config files on your minions and add the grains you want? I assume then multiple salt runs would be needed to get your desired states? First one to set minion config, second to execute proper states using the new grains?
19:51 scoates is there a `salt '*' something.items` command that will show me the minion's configured environment?
19:51 billygoat joined #salt
19:52 shadowsun joined #salt
19:53 bemehow_ joined #salt
19:53 scoates hmm… config.get environment ?
19:53 scoates yep.
19:54 zooz joined #salt
19:57 rgarcia_ what's the best way to pull in credentials for a custom salt module? e.g. if it needs to make 3rd party API calls on your behalf
19:57 rgarcia_ pull from pillar? env?
20:01 erchn ccormier: yes that's right, multiple runs
20:03 shadowfax|chc joined #salt
20:07 * renoirb just discovered salt.modules.mysql ... OMG!
20:07 elfixit joined #salt
20:08 morty_ joined #salt
20:08 modafinil rgarcia_: probably from config
20:09 andrej @renoirb ... is that good/bad/ugly? :)
20:09 scoates I'm a bit confused about environments. I have a minion configured as "environment: development" and have the appropriate pillar_root set for it. Within pillar, I have this: http://paste.roguecoders.com/p/d2aff3538dc391ce7312aa57b0ed8f3d.txt … but my environment:development minion reports "Specified SLS 'paths' in environment 'development' is not available on the salt master" … any ideas?
20:09 renoirb andrej: very good!
20:09 andrej :)
20:09 modafinil rgarcia_: https://gist.github.com/jzellner/6e6ed872d49e2d50c742
20:10 Psi-Jack scoates: Welcome to the club. :)
20:10 zandy joined #salt
20:10 Psi-Jack Well, hmm
20:10 scoates Psi-Jack: club of people who are confused by environments? (-:
20:10 Psi-Jack scoates: That too, yes. :)
20:11 renoirb Hi scoates, I saw your talk some time ago about Virtualize your Development. Glad to see you are using Salt :)
20:11 Psi-Jack scoates: Pillars work by ordering and overriding.
20:11 scoates renoirb: ha. oh hi. (-:
20:11 scoates yeah, we're moving all of our stuff off of puppet. that thing is a disaster.
20:11 xmltok joined #salt
20:11 Psi-Jack scoates: So your base is in /srv/pillars, while y our development is in /srv/pillars/development or something?
20:12 renoirb I'm heavily inspired by your talk to build webplatform.org using Vagrant
20:12 Psi-Jack scoates: That's bad form, to start with.
20:12 Psi-Jack scoates: What's your pillar_roots look like?
20:12 renoirb scoates: had same realization about puppet.  States using yaml is so much leaner
20:13 mgw joined #salt
20:13 Psi-Jack renoirb: My company is still pulling away from puppet, but we're getting there.
20:13 scoates Psi-Jack: yes; something like that (paths are different, but assume /srv matches my prefix).
20:13 JasonSwindle I wish I was as lean as YAML.
20:13 modafinil I'm having a weird problem, where all of my minions work when I run salt-call on them, but when I run salt '*' test.ping on the master, I only see one minion (I can verify they are all connected via netstat, and all work) wtf is going on :(
20:13 scoates Psi-Jack: http://paste.roguecoders.com/p/66702ef06b00e87bacaa82ee96ad4533.txt
20:13 JasonSwindle modafinil:  are any Windows?
20:13 scoates I did the overlap because that's what the docs suggest… ?
20:13 modafinil somewhere between 'no' and 'hell no'
20:14 scoates -> http://docs.saltstack.com/ref/configuration/master.html#pillar-roots
20:14 renoirb modafinil: make sure you run saltutil.sync_all  then saltuil.refresh_pillars
20:14 JasonSwindle OK, because windows boxes using salt may need a longer timeout.
20:14 Psi-Jack scoates: wrong kind of overlap. IN development, if you want development to overlap over base, put - /vagrant/edith/pillar/base above the pillar/development, if development has the same pillar as defined in base, it will override base's values.
20:14 renoirb modafinil: because when you change something in a pillar, doesn't mean all minions have the latest
20:14 scoates renoirb: glad it was helpful to you. (-:
20:14 modafinil renoirb: will try that, will it work if they dont show up for test.ping?
20:15 Psi-Jack scoates: Oh, those docs. Yeah. Isolation is a bit more sane.
20:15 renoirb no. they have to answer modafinil
20:15 modafinil yeah, that's the problem though :/
20:15 renoirb Gotta log in then modafinil
20:15 dvl_ If I wanted to ensure nrpe2_enable="YES" existed in /etc/rc.conf, what state/module would you recommend?
20:15 scoates Psi-Jack: ok. I can do the git gymnastics to move those around. That's only part of my problem, though, right?
20:15 modafinil renoirb: ill run that with salt-call see if it works
20:16 rupa joined #salt
20:16 Psi-Jack scoates: Yes. Like I said, if you want them to stack order from base to final potential result.
20:16 renoirb yeah, locally with salt-call
20:16 renoirb but if you are disconnected from salt master, what you change on it do not get sent to that minion modafinil
20:16 Psi-Jack scoates: Git? gitfs/ext_pillar, or just filesystem level git?
20:16 scoates just filesystem (for now at least)
20:16 * Psi-Jack nods.
20:17 Psi-Jack gitfs is a little different.
20:17 modafinil renoirb: they aren't disconnected, i can salt-call state.highstate from all of them -- they just dont show up when looking through the lends of the master
20:17 scoates ok… so… I *do* want development to override
20:17 modafinil *lens
20:17 Psi-Jack scoates: So, add in development environment, your base, above development pillars. So it scans and finds base, then development.
20:17 rupa hey, quick question - i have httpd:\n-pkg\n-removed - this refuses to run due to there's things that depend on httpd. but the docs seem to imply it should remove any unused dependencies as well
20:17 Psi-Jack scoates: Last matching pillar state wins. ;)
20:17 EWDurbin recommended way of listing nodes which aren't responding to '*' test.ping?
20:17 renoirb modafinil: that's most likely a networking issue then.
20:17 Psi-Jack EWDurbin: salt-run manage.down
20:18 scoates Psi-Jack: you mean for pillar_roots, yeah?
20:18 Psi-Jack scoates: Yes
20:18 scoates ok. on it.
20:18 EWDurbin (thumbsup) thanks Psi-Jack
20:18 EWDurbin first time i've gone full cattle on my nodes
20:18 Psi-Jack heh
20:18 EWDurbin and i didn't note which nodes to de-key
20:18 EWDurbin ec2-gobbilty-gook.aws.lol-guess.com
20:19 Psi-Jack EWDurbin: I originally wrote a script that would count test.ping results with salt-keys -l acc | head -n +2... But when I found out about manage.down, I was happier.
20:19 modafinil renoirb: i will keep digging, but the minions all work fine when in 'pull' mode via salt-call, they get new changes made to the master -- they just aren't 'pushable' via salt '*'
20:19 modafinil which is ... weird
20:20 scoates Psi-Jack: ok, with those rearranged, I guess I can just match on '*' in the top.sls? and it'll use development/paths.sls instead of base/paths.sls ?
20:21 Psi-Jack scoates: If proper ordering is done, correct. :)
20:21 shinylasers joined #salt
20:21 * scoates gives that a whirl
20:21 Psi-Jack Heh, I have https://github.com/saltstack/salt/issues/9186 in to attempt to get states environments a little more sane like pillars. ;)
20:23 rupa ok, if i'm reading it right, salt.modules.pkg resolves to, in this case, salt.modules.yumpkg, and the docs for that don't say it'll remove dependencies
20:23 renoirb I had this Psi-Jack to use git with pillars and states repos: https://gist.github.com/renoirb/7160412
20:23 renoirb But i stopped working on it
20:25 pinge joined #salt
20:26 rupa and the docs for salt.states.pkg doesn't say anything about removing dependiencies
20:26 andresr joined #salt
20:28 scoates Psi-Jack: ok; here's my current pillar files config: http://paste.roguecoders.com/p/efaff1022ae1e4d2db49c6722d5bad36.txt and pillar_roots: http://paste.roguecoders.com/p/8460886df99a23fb8d5ed721390f9357.txt ; the minion is trying to use `www-data` (not `vagrant`), and I don't have a paths in pillar.items … ? clearly, I still do not grok (-:
20:30 bhosmer joined #salt
20:30 lineman60 DanGarthwaite found the issue, the IP address some how got removed from the minion
20:32 Psi-Jack scoates: I don't see a development: environment in the top.sls
20:33 scoates ah; I thought development/paths.sls would just override it without a match. Let me add that. (-:
20:33 Psi-Jack Nope, need a match in the top.sls. :)
20:33 dvl_ I need to add nrpe2_enable="YES" to /etc/rc.conf, what state/module would you recommend?
20:34 dvl_ There is file.append... I guess I could combine that with file.search...
20:34 modafinil renoirb: figured it out, its dumb, and horrible, all machines come from a base machine image with salt-minion and keys and stuff... :groan:
20:34 modafinil thanks for your help :)
20:34 renoirb Pleasure modafinil, besides network, yup, the keys :)
20:35 renoirb there is a command modafinil to regenerate keys
20:35 Katafalkas joined #salt
20:35 renoirb I never used it myself but think its interresting
20:35 modafinil oh, that would be helpful
20:35 renoirb modafinil: but only from salt-call --local right
20:35 renoirb because you could not call from the master
20:36 forresta http://docs.saltstack.com/ref/cli/salt-key.html#key-generation-options I believe would do it.
20:36 modafinil well the master works, it just goes to <one of the machines> each time haha
20:36 forresta granted I haven't tried that before.
20:36 modafinil i will try it from the master just for giggles, np doing it by hand if needed
20:36 modafinil thanks forresta
20:36 renoirb Is there a command, forresta, to ask all minions if they are alive, and remove keys of the ones that aren't
20:37 scoates Psi-Jack: I still must be misunderstanding. http://paste.roguecoders.com/p/753c56ca4f24193b813001fe694adc6c.txt (I also tried with the development: stanza first)
20:37 forresta renoirb, I don't think so, I believe http://docs.saltstack.com/ref/cli/salt-key.html#cmdoption-salt-key-F would help you to check it, then perhaps -d with some sort of glob?
20:37 forresta renoirb, you should create an issue on that if it doesn't already exist, that would be cool
20:38 forresta unless it is part of another command
20:38 renoirb ok forresta will do
20:38 renoirb I asked some time ago about it, I thought that there is some way of doing it already, but cannot remember how
20:38 Ahlee gitfs not working on a fresh install, I can run from git import * from the same python that's running hte master - thoughts?  Keys all work, etc
20:39 forresta what does the debug output say Ahlee?
20:39 Ahlee no mention of git
20:39 renoirb Hatee-hatee-hatee oh!
20:40 forresta renoirb, yea maybe there was a way to do it, I have a bad memory for what happens in the IRC
20:40 jcsp joined #salt
20:40 renoirb sure, i'll make an issue (a better way to remember things) and somebody might say: oh that's how we do it.
20:40 renoirb forresta: ^
20:40 forresta yea fair enough
20:41 forresta just see if an issue exists
20:41 forresta it will be something funny like we talked about this before and you previously made an issue :P
20:41 Psi-Jack scoates: What's salt 'host' pillar.items show for a host that's not working as expected?
20:42 Psi-Jack scoates: Oh,, also... move development to development/top.sls   :)
20:42 scoates ah
20:42 scoates will the other top.sls still load?
20:42 Psi-Jack yes
20:43 pdayton joined #salt
20:43 Psi-Jack It base needs base, development needs development. :)
20:43 Ahlee jesus christ
20:43 Ahlee can salt please just blow the fuck up if it encounters a bad config option?
20:43 Psi-Jack Ahlee: Sorry, but Jesus isn't in the office now.
20:43 scoates got it. I think/hope. (-:
20:43 Ahlee filserver_backend:
20:43 Marion_ joined #salt
20:44 renoirb forresta: https://github.com/saltstack/salt/issues/9187
20:44 forresta renoirb, awesome
20:44 Psi-Jack Ahlee: But, if he were, he would be handing you soap for that potty mouth of yours. INstead, here, have some.
20:45 forresta renoirb, I think when we talked about it before wasn't part of salt-cloud?
20:45 forresta I also remember a discussion about this..
20:45 Ahlee between letting bad state files still execute, now this.  Really, please, stop trying to be nice.
20:45 pinge hi all
20:45 scoates Psi-Jack: sorry this is so drawn out. I really appreciate the help.
20:45 forresta hi
20:45 renoirb I don't know forresta, I am currently installing a new environment. I haven't installed salt-cloud yet
20:45 pinge i'm having an issue with referencing salt formulas from different environments
20:45 forresta don't worry scoates, you've only written 10% as much as Psi-Jack did last night about the state ordering :P
20:45 forresta renoirb, gotcha
20:46 Psi-Jack scoates: Did it work? ;)
20:46 scoates Psi-Jack: current structure is this: http://paste.roguecoders.com/p/b4e8bf27f19a7f704a8b8e08f790d248.txt
20:46 scoates Psi-Jack: no. pillar.items for that minion contains no paths now.
20:46 pinge for example, i have a formula called 'keychain' in the 'base' environment, but can't seem to reference it or include it in a 'development' environment formula
20:46 pinge is this the intended behavior?
20:46 renoirb forresta: Assuming I want to create a new salt-cloud install and that I never used it, which syntax is the best to use?
20:46 forresta renoirb, I really don't know, my salt-cloud knowledge is lacking :(
20:47 pinge I'm getting a 'Data failed to compile: Specified SLS keychain in environment development is not available on the salt master'
20:47 forresta I was gonna mess with it this weekend and write up some stuff :\
20:47 renoirb Discussing about old format and giving both format samples in http://salt-cloud.readthedocs.org/en/latest/topics/config.html#new-cloud-configuration-syntax is confusing
20:48 MK_FG joined #salt
20:48 drawsmcgraw joined #salt
20:48 Psi-Jack scoates: Hmmm. In paths: is that 2 spaces, or 4?
20:48 drawsmcgraw So I noticed that Halite doesn't use salt-api anymore
20:48 drawsmcgraw But that still seems to be an active project
20:49 Ahlee salt-master did not log it encountered an unknown config option in /etc/salt/master
20:49 scoates Psi-Jack: 2. I'll set it to 4 everywhere (preferred; I just inherited an old top.sls from someone else, originally, it seems)
20:49 drawsmcgraw so.... If I wanted to create something that interacts with Salt... which route would I go? Salt-api or salt/client/api.py ?
20:49 pinge Ahlee, i'm using salt with masterless minions
20:49 Psi-Jack scoates: Nah, 2 is right. :)
20:49 scoates heh. well, I have 4 in `paths:`
20:50 scoates should be consistent at least (-;
20:50 Ahlee pinge: iwas lamenting that i just spent the better part of the afternoon tracking down I had typo'd fileserver_roots as filserver_roots
20:50 jacksontj joined #salt
20:50 Psi-Jack scoates: Yeah, that might be why there's no paths, but I couldn't say for sure on yaml specifics. ;)
20:50 pinge :x
20:50 Ahlee and that salt happily continued processing rather than yelling at me, or even logging it had encountered something it didn't understand
20:50 pinge :|
20:51 Ahlee probably another case of valid yaml isn't valid salt config
20:52 drawsmcgraw #salt-devel
20:52 drawsmcgraw aww..
20:52 forresta renoirb, Tom already commented on your issue
20:54 * renoirb installing salt-cloud
20:55 mentat joined #salt
20:57 psyl0n joined #salt
20:57 mentat So, I've got a pillar dict that I want to use as the env for a cmd.run. It's not clear how to do that from command line, has anyone done?
20:58 scoates Psi-Jack: everything is 2 spaces now. Current state: http://paste.roguecoders.com/p/2260cea0091b6f7870bbc6bf6e7f9149.txt ; the minion is definitely trying to use `www-data` as the pillar variable, though
20:59 Psi-Jack hmm
21:00 MK_FG joined #salt
21:00 MK_FG joined #salt
21:01 cewood joined #salt
21:02 Psi-Jack scoates: Ahhh
21:02 Psi-Jack scoates: Don't set environment in the minion config, let top handle that.
21:03 scoates hmm
21:03 renoirb Anybody used with salt-cloud
21:03 renoirb I get: ' <LibcloudError in None 'Could not find specified endpoint'>'
21:03 shiznit joined #salt
21:03 Psi-Jack I don't use anything with "cloud" in its name.
21:03 mpanetta check your providers conf for typos maybe?
21:04 bemehow joined #salt
21:04 renoirb And the config I have only one, using my own openstack bare metal servers with a set of compute nodes
21:04 * mpanetta uses salt-cloud
21:04 mpanetta Never seen that error before though
21:04 mpanetta Sounds like your openstack API endpoint may be unreachable?
21:04 renoirb i have only one entry in a file /etc/salt/cloud.providers.d/hi.conf
21:04 scoates Psi-Jack: so in the minion's config file, don't set `environment: development`? How does top know which environment (including pillar roots) to use?
21:04 ajw0100 joined #salt
21:04 akoumjian What argument to I add to a cloud profile to run highstate after installation?
21:05 JasonSwindle joined #salt
21:05 renoirb root of yaml is anything, assuming it becomes the key name to use later.
21:05 JulianGindi joined #salt
21:05 Psi-Jack scoates: By the top.sls targetting.
21:05 renoirb then I have identity_url: '...http address to keystone controller...'
21:05 Psi-Jack scoates: That '*' == all hosts
21:05 scoates right
21:05 mpanetta Do you have keystone configured?
21:06 Psi-Jack So, currently, in this pillar's top.sls, you're defining all hosts to be in base and development.
21:06 renoirb mpanetta: it is, i can use python-novaclient from that machine
21:06 higgs001 joined #salt
21:06 Psi-Jack But the minion is restricted to one nevironment, due to the config file option.
21:06 scoates Psi-Jack: ah. I thought that was a match, not an assignment
21:06 Psi-Jack In the config, it's an assignment.,
21:06 Psi-Jack In the top, it's a match. :)
21:07 Psi-Jack A single node can be in multiple environments, technically. And pillars, they override each other on conflicts, states just conflict (which sucks!)
21:07 mpanetta renoirb: I asume then that the identity_url: is set properly?
21:07 mpanetta I have not used a plain openstack config before
21:07 scoates ok. let me try a thing (-:
21:08 renoirb mpanetta: it is the same url as the one i use with python-novaclient
21:08 mpanetta should be
21:08 renoirb ... and I use nova client on that machine already, I assume salt-cloud identity_url should be the same... as it is actually calling keystone
21:09 Psi-Jack scoates: I'm about to head home. ;)
21:09 scoates Psi-Jack: thanks. I really do appreciate the help.
21:09 mpanetta I believe.  Like I said I have not set that up before.  I use a rackspace config which is very similar to openstack, but not quite.
21:09 Psi-Jack scoates: No problem. Hopefully that last trick does the fix,.
21:09 renoirb mpanetta: ok, thanks. I'll try that later then :)
21:09 renoirb ... when I do not have other priorities :)
21:09 mpanetta renoirb: Ok, hope it helps :)
21:10 Psi-Jack scoates: I miiiiight be back in ~15~30 mins.
21:10 scoates feel free to pretend you're not, if I'm getting annoying. (-:
21:10 zandy joined #salt
21:11 rupa trying, and failing to use a pillar variable in the - after: clause of a file.sed.
21:11 Katafalkas joined #salt
21:12 jY if i do something like this for my pillars http://pastebin.com/FVceJkWU  and i look for a pillar key.. does it stop when it finds one in say the base file does it stop there or does it go down to the prod ones
21:12 ncjohnsto joined #salt
21:13 mentat so, it looks like I need to use an iterator to convert the pillar map to a list for use with env in cmd.run? Anyone?
21:14 BenCoinanke joined #salt
21:15 JasonSwindle You know what would be nice to have in a Salt Cloud map…… the un-deleteable flag
21:15 erchn mentat are you trying to execute from the command-line?
21:15 xmltok joined #salt
21:15 JasonSwindle This node cannot be deleted via the map, and has to be deleted by hand.
21:16 erchn JasonSwindle: but you want it in the map for querying reasons?
21:16 alunduil joined #salt
21:16 JasonSwindle For create reasion
21:17 dvl_ I have file.replace working on the CLI, but translating that into a state file always causes me grief.  http://pastebin.com/vWk6NQbY
21:17 JasonSwindle but I fear someone will run -d on salt-cloud on the map and boom.  There goes prod and the backup node
21:17 erchn JasonSwindle: you could just remove the node from the map
21:17 JasonSwindle That is an option
21:18 erchn or comment it out
21:18 JasonSwindle immutable flag would be neat, but editing the map file after deploy is an option as well.
21:18 mesmer joined #salt
21:18 JasonSwindle Just thinking out loud
21:18 dstanek joined #salt
21:19 mentat erchn: I changed to an sls file, it seemed easier, but env can't apparently directly consume a map
21:19 erchn mentat: yea I don't know how you'd do that either
21:19 bhosmer joined #salt
21:20 mentat in raw python you'd do an iterator over the keys and fill them out with values. I'm guessing it can be done with jinja but not sure how to construct the same thing
21:21 forresta mentat, this uses an example of iterating over pillar values
21:21 forresta might give you an idea: https://gist.github.com/UtahDave/3785738
21:23 bhosmer_ joined #salt
21:26 akoumjian whiteinge: Need a little salt-cloud help. What can I add to /etc/salt/cloud or /etc/salt/cloud.profiles to get a minion to run highstate after initializing? Adding  "start_action: state.highstate" is a no go in both.
21:28 mentat forresta: thanks, that helped. I got the same error with it and then realized I hadn't terminated my - cmd.run with a :
21:28 forresta mentat, haha
21:28 * mentat facepalm
21:29 Psi-Jack scoates: heh, pretend? nah. I'm here, for, this time frame of moments.
21:29 erchn akoumjian: I don't think it'll work in /etc/salt/cloud, as that's not a global config, but in your profile or provider you can put "minion:\n     startup_states: highstate"
21:29 erchn I never got it to work in a map file
21:29 akoumjian erchn: Will that run highstate every time the minion process restarts?
21:29 erchn yes
21:30 jimallman joined #salt
21:31 carlos__ joined #salt
21:31 mentat forresta: turns out you do have to use that syntax too, even though a map with compile it will fail on minion with "non-string data"
21:32 mentat Should probably submit a pull against the docs so no one else has to go through this
21:32 scoates Psi-Jack: welp. (-: I was hoping I'd get it before you returned, but no such luck. I've removed my minion's environment config.
21:32 forresta mentat, good to know. Yea do a pull request!
21:32 jacksontj joined #salt
21:33 gscott joined #salt
21:34 mentat aside: would be nice if there was a "fork this on github" link from a doc to make finding and editing more straightforward
21:34 gscott I'm creating a Jinja template of a file I want managed on my minions, but I want the template to contain a variable that is a placeholder for the minion's mac, so essentially the output of the network module:  salt 'someminion' network.hw_addr eth0
21:35 gscott is it possible to do that with a module instead of a grain (ex:  {{ grain['something'] }}
21:35 scoates Psi-Jack: so, if you're up for it, here's my current state http://paste.roguecoders.com/p/e01dceb0455dc2fb75fe9f03103e5a77.txt
21:39 Psi-Jack scoates: Gimme a few, trying things out to insure I'm also giving you proper help by testing myself. :)
21:39 scoates thanks!
21:39 scoates I currently manage this with a bunch of ugly jinja conditionals, so… (-:
21:40 forresta mentat, the fork on github thing exists over at read the docs, but not on the main salt stack docs :P
21:40 fandikurnia01 joined #salt
21:42 Psi-Jack scoates: Heh yeaaaah.. I know that feeling.
21:45 Psi-Jack scoates: hmmm, yep.. Mine.. it's working as expected, flawlessly. pillars defined in base and dev, dev wins overriding anything base had originally.
21:45 Psi-Jack scoates: make sure your config.get environment is None
21:45 mentat at https://github.com/1mentat/salt/commit/601a8ff8ca5646103e84e3279b16851f64737919 if anyone's curious
21:46 scoates psi-jack: yeah. it's none. (at the bottom of my last paste)
21:46 scoates None, not none.
21:47 scoates to be clear: my two top.sls files and two paths.sls files… those are correct? The grain match looks right to me, too…
21:47 Psi-Jack scoates: Looks like yes
21:48 scoates … /-:
21:48 Psi-Jack top.sls is right, grain is right for matching against, paths looks right as well.
21:52 Psi-Jack scoates: What other things did you configure into your minion or master config?
21:52 scoates Psi-Jack: nearly nothing
21:52 Psi-Jack I, personally /barely/ touch mine, leaving most of it to be fully dynamic. :)
21:53 scoates Psi-Jack: http://paste.roguecoders.com/p/d818f252f100d9189e424783affbb070.txt
21:56 Psi-Jack Looks good, but grains is better in its own file, grains. :)     But yeah, otherwise, i see no actual issues.
21:56 snave joined #salt
21:57 kermit joined #salt
21:58 dstanek joined #salt
21:59 akoumjian Still not having luck with either startup_states or salt-cloud's start_action. How can I get a new minion spun up with salt-cloud to run highstate? :-p Seems like a pretty common use case.
21:59 MK_FG joined #salt
21:59 MK_FG joined #salt
21:59 scoates is there a debug setting that will show me how pillar data is being compiled, or something, Psi-Jack?
22:01 rojem joined #salt
22:02 forresta akoumjian, get your damn dirty logic out of here!
22:02 * akoumjian throws logic out the window
22:02 forresta perfect
22:03 forresta akoumjina, https://github.com/saltstack/salt-cloud/issues/619
22:03 forresta when you use start_action: state.highstate it still doesn't work right?
22:04 bhosmer_ joined #salt
22:04 bhosmer__ joined #salt
22:05 akoumjian forresta: Correct, it does not run highstate, neither did specifying startup_states in the minion config. I would imagine these are two entirely separate features, and it's odd that neither of them is working.
22:05 harobed_ joined #salt
22:05 forresta akoumjian, yea I am thinking of recreating that issue over in the main salt repo
22:06 forresta because as you said, that seems like the main thing you'd want to do.
22:06 harobed_ joined #salt
22:07 harobed_ joined #salt
22:07 forresta Is anyone at the gartnerdc thing that picked up a shirt? https://twitter.com/SaltStackInc/status/410869921996759042/photo/1
22:08 harobed_ joined #salt
22:08 akoumjian forresta: Yeah, if you don't I may file a ticket at least for the startup_states
22:08 forresta akoumjian, if you have more details than what exists in the ticket go for it. I don't have a salt-cloud instance configured.
22:08 harobed_ joined #salt
22:08 forresta pass_by_value, are you running the booth at gartnerdc since it's halite stuff?
22:08 akoumjian forresta: That ticket seems to only describe a master event not firing, which makes sense because all salt-cloud is doing is running salt-call on the new minion.
22:09 forresta akoumjian, yea
22:09 akoumjian forresta: That ticket doesn't seem to cover the action not being called
22:09 harobed_ joined #salt
22:09 forresta Good point, I like how there are two seperate problems with the same command though :P
22:10 forresta *separate
22:10 harobed_ joined #salt
22:10 zandy joined #salt
22:10 akoumjian forresta: yes, that is a bit odd.
22:11 forresta Regardless, it doesn't work at all, which is a problem
22:11 harobed_ joined #salt
22:11 akoumjian I'm trying both cases again, just to confirm
22:11 harobed_ joined #salt
22:12 forresta sounds good
22:12 pass_by_value forresta: I believe Marc, Mike and Rhett are in Vegas.
22:12 forresta pass_by_value, ahh ok
22:12 scoates ugh
22:13 forresta Ok someone please enlighten me, wasn't this issue already resolved?? https://github.com/saltstack/salt/issues/8959
22:13 forresta I could have sworn someone put in a pull request from a discussion I was having with them regarding this
22:14 amckinley joined #salt
22:16 clone1018 joined #salt
22:16 kamal_ joined #salt
22:17 lineman60 is there a mysql.dump state?
22:17 Nazca__ joined #salt
22:18 honestly that doesn't make sense as a state
22:19 lineman60 er ya i guess i just have to do a cat the file in to a mysql insert
22:20 whyzgeek joined #salt
22:22 JasonSwindle left #salt
22:24 forresta pass_by_value, are you guys planning on doing a salt air sometime soon for the new/update halite functionality?
22:24 forresta *updated
22:25 NotreDev joined #salt
22:25 scoates Psi-Jack: I had a typo in my master config, but somehow that wasn't the whole problem. I now see this, so that part is right at least: [DEBUG   ] Jinja search path: '['/vagrant/edith/pillar/base', '/vagrant/edith/pillar/development']' … right? or are those in the wrong order?
22:25 kamal_ joined #salt
22:25 clone1018 joined #salt
22:26 dvl joined #salt
22:26 Sheco joined #salt
22:26 NotreDev sometimes it's easiest to have a build script for a package install (if it's not in a repo). currently i'm placing a bash script in /tmp and running it. is there a more preferable way?
22:26 dvl after a day of working on salt configurations, let's see how the same thing is done in ansible.  :)
22:27 pass_by_value I will have to check what our timelines / ideas are for salt air.
22:27 Marion_ I'm stuck on how to resolve an issue I'm having in production, but not in development env - Vagrant, salt, VM.  I'm getting a php fatal error allowed memory size … bytes exhausted.
22:28 Marion_ I copied the prod db over
22:28 Marion_ to development env
22:29 scoates Psi-Jack: except I never see development/paths.sls called. http://paste.roguecoders.com/p/ab240fd138611b543f33bcc35a2871bd.txt
22:29 pass_by_value are there any specific areas within Halite that might be good to cover with a salt air video?
22:29 dave_den scoates: that is the correct order for the pillar for the development environment. it means salt will scan through 'base' pillar files first, then the development pillar files, and will overwrite any duplicate keys with the on from development
22:30 Marion_ I'm comparing php_info() issued from code.  There are a few differences, but memory_limit is 128M for both
22:30 dstanek joined #salt
22:30 scoates dave_den: ok. that's… good. mostly.
22:31 forresta Marion_, did you try to bump it up?
22:31 Marion_ no, but that doesn't make sense to me if it works in my dev env and the values are the same.
22:32 dave_den NotreDev, you can use cmd.script instead - http://docs.saltstack.com/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.script
22:32 Marion_ foresta^^
22:34 NotreDev dave_den: thanks, going to mess around with that
22:34 dave_den Marion_: is it possible that the PHP script running in production is just trying to read in too much data?
22:35 robbyt joined #salt
22:35 whiteinge akoumjian: (just saw your question; didn't read entire scrollback yet) using the reactor to kick off a state run is probably most robust
22:35 NotreDev dave_den: i'm not seeing what the name argument should be
22:36 Marion_ dave_den: Since I copied the entire database from prod and imported into dev, I can't think of anyway that prod would be reading more than dev.
22:36 yannj joined #salt
22:36 whiteinge akoumjian: if you're using salt-cloud to preseed the minion key then by the time it checks into salt it will be ready to rock.
22:37 akoumjian whiteinge: Cool, cool.Is there a place in the docs that has a list of common events?
22:38 whiteinge eh, not so much :-/
22:38 whiteinge there's an open ticket for it
22:38 whiteinge you basically gotta use the salt/tests/eventlisten.py script to watch the stream for stuff you're interested it
22:38 whiteinge *in
22:39 akoumjian got it
22:39 whiteinge akoumjian: the reactor syntax to watch for the first auth looks like this: https://groups.google.com/d/msg/salt-users/vyqGTrjgDKA/QWhQn-SycEgJ
22:39 akoumjian whiteinge: brilliant, saved me a little time here
22:40 whiteinge nice. i'm using it in a project so it's on my mind
22:40 akoumjian whiteinge: Er, looks like it has minion starting and cloud destroying, but not cloud creating.
22:40 akoumjian I'll find the event
22:40 whiteinge the VM isn't available for executions when the creating event fires
22:41 whiteinge 'cause it hasn't checked into the master yet
22:41 whiteinge if you're doing master-side stuffs though, yeah
22:41 akoumjian whiteinge: is there an event that salt-cloud fires when it is "done" spooling up a new minion? or an event that gets fired the first time it checks in with a master?
22:41 akoumjian whiteinge: I can see why the first would be difficult, cause you don't know when the minion is ready
22:42 whiteinge there are events for both, afaik. the syntax for the second one (when the minion first checks in) is in that URL i pasted
22:43 whiteinge it's equivalent to startup_states
22:43 whiteinge but it goes through the master
22:43 zandy joined #salt
22:43 whiteinge er. s/goes through/configured on
22:48 cdcalef ooo this reactor thing is interesting.  would this be a good way to highstate a minion when it starts up or reconnects to a network, or is there a better built in way to do that?
22:48 akoumjian cdcalef: Yes, apparently. I'm setting that up now.
22:49 akoumjian whiteinge: How do I run that event listening script you mentioned?
22:49 forresta akoumjian, when you get that rocking can you write some quick notes up and push them to the docs?
22:50 whiteinge if your salt is in the normal place you can just ``python /path/to/salt/tests/eventlisten.py'
22:50 akoumjian forresta: Mos def
22:50 forresta awesome
22:50 * akoumjian loves adding to docs
22:50 whiteinge if your salt is not in the normal place you have to pass the --sock-dir=/path/to/your/var/run/salt
22:51 whiteinge akoumjian: oh, you need a git clone btw. the tests directory is not in the release tarball
22:52 whiteinge or to grab the single file off github
22:52 akoumjian kk, will probably do the latter for now
22:52 akoumjian whiteinge: So much has happened since I last dug deep :O
22:56 pipps_ joined #salt
22:58 srage joined #salt
23:02 pipps_ joined #salt
23:03 schristensen joined #salt
23:04 rgarcia_ joined #salt
23:05 akoumjian Curious how reactor configs live as a subset of master configs. I would have thought they would get their own top.sls and reactor_root
23:06 jfzhu_us joined #salt
23:09 jdenning joined #salt
23:11 whiteinge i'd prefer that. as it is now you have to restart the master whenever your reactor conf changes
23:11 whiteinge (it's also a good idea to restart the master when your .sls file that the reactor call changes. i'm not sure why)
23:12 whiteinge akoumjian: note, a great way (only way?) to debug the reactor is to run the master in the foreground with debug logging. you can see the rendered sls file there
23:17 ipmb joined #salt
23:21 akoumjian whiteinge: aye, thanks
23:22 nebuchadnezzar Hello, I have an issue with multi-environment pillar on version 0.17.2, if I understand correctly http://salt.readthedocs.org/en/v0.17.1/topics/pillar/index.html#pillar-namespace-flattened my minion1 should render “Pillar value from override” and not “Pillar value from core”: http://paste.debian.net/70443/
23:23 nebuchadnezzar arf, it's my minion2, not minion1
23:24 nebuchadnezzar line 46 should take precedence on line 45 if I understand correctly pillar namespace flattened
23:24 akoumjian forresta whiteinge : Working on the first try!
23:25 * whiteinge ducks and covers
23:25 JulianGindi joined #salt
23:25 sroegner joined #salt
23:25 austin987 joined #salt
23:27 bhosmer joined #salt
23:28 amckinley joined #salt
23:31 nebuchadnezzar it works if I define a new match line 64 of http://paste.debian.net/70447/
23:31 akoumjian whiteinge: The other annoying thing about having the reactor configs as part of the master config is that while I have /srv as a repo under version control, I do not have /etc/salt on my master under version control.
23:31 nebuchadnezzar I mean http://paste.debian.net/70448/
23:32 frosty996 akoumjian: I usually set my file_roots to be /etc/salt/srv instead of /srv/salt
23:32 frosty996 then everything under /etc/salt is in git
23:32 whiteinge akoumjian: i've taken to keeping reactor stuffs in master.d/reactor.conf for that same reason
23:33 EugeneKay I make /etc/salt/ file.managed
23:34 akoumjian EugeneKay: I will probably go that route.
23:34 EugeneKay I've yet to find a good reason to have lots of data in grains. I stuff it into a pillar instead
23:35 EugeneKay and I want my minion config consistent
23:36 EugeneKay so the initial startup of a minion requires the id be set, usually by my provisioning script to match the hostname.
23:36 EugeneKay everything past that is salty
23:36 ajw0100 joined #salt
23:36 akoumjian EugeneKay: The difference is that grains is a way to differentiate a minion as a inherent attribute, whereas pillar have to be assigned either via 1) minion ids or 2) grains
23:37 JesseC joined #salt
23:37 EugeneKay I do the first ;-)
23:37 JesseC joined #salt
23:38 akoumjian I personally find setting minion attributes via id feels a little too oldschool for me. Why parse a single string when I can have actual data structures with grains?
23:41 forresta akoumjian, awesome
23:41 EugeneKay I'm sure I'll find a reason, just haven't yet
23:44 Marion_ joined #salt
23:44 nebuchadnezzar ok, off to bed now, see you tomorrow
23:44 dstanek joined #salt
23:46 Steve__ joined #salt
23:46 Steve__ I'm having problems getting inheritance working across environments
23:47 jcsp joined #salt
23:47 Steve__ file_roots:     base:         - /srv/salt/base     dev:         - /srv/salt/dev         - /srv/salt/base      staging:         - /srv/salt/staging         - /srv/salt/base      production:         - /srv/salt/production         - /srv/salt/base
23:47 Steve__ have my file_roots defined as above
23:47 austin987 joined #salt
23:48 meteorfox joined #salt
23:48 Steve__ when i try to update states it can't find files which are setup in base from production
23:48 Steve__ have top.sls defined as such
23:48 Steve__ base:     '*':         - core.tools         - users #        - webapps.smartapps       #  - nginx       #  - apache.mod_wsgi   production:     'precise64':         - webapps.smartapps
23:49 Steve__ sorry for the non wrap
23:49 Steve__ can't find webapps.smartapps in production env
23:49 Steve__ init.sls is only defined in base environment
23:52 rgarcia_ joined #salt
23:52 nebuchadnezzar Steve__: sorry but pasting in IRC is just unreadable :-/
23:52 nebuchadnezzar I'm new to salt but can't help you
23:52 StDiluted environments dont work as you would expect them to
23:53 StDiluted I advise you dont use them
23:53 StDiluted target with grains or something instead
23:53 Steve__ how do they work? :)
23:54 Steve__ it actually is picking up the right environment
23:54 Steve__ the issue is that the file search path does not seem to work
23:54 Steve__ ie:   if I have
23:54 Steve__ production:
23:55 Steve__ /srv/salt/base
23:55 Steve__ /srv/salt/production
23:55 Steve__ it won't find file defined in base only
23:56 Steve__ above is in master -> file_roots
23:56 jslatts joined #salt
23:57 higgs001 joined #salt
23:58 xinkeT joined #salt
23:59 redondos joined #salt

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