Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-29

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

All times shown according to UTC.

Time Nick Message
00:01 RandyT joined #salt
00:01 kevinquinnyo1 the orchestrate pillar is great for tasks that need to execute sequentially across various minions, ie first make sure db servers do something *then* web servers do something else
00:01 kevinquinnyo but is there a way to group a bunch of tasks across minions where you actually don't care about the order?
00:02 kevinquinnyo for instance if i want to "delete a site", things have to be done on quite a few minions
00:02 kevinquinnyo and i just want to make that whole "delete site" action organized into a single action that can be dispatched if that makes sense
00:03 racooper joined #salt
00:03 bb74352 joined #salt
00:03 kevinquinnyo but it does not matter what the order is for those tasks ^
00:04 kevinquinnyo is this a job for a custom "runner"  that i should build?
00:05 kevinquinnyo s/the\ orchestrate\ pillar/the\ orchestrate\ runner/g  -- sorry i still use the wrong words with salt constantly
00:11 nidr0x joined #salt
00:13 flowstate joined #salt
00:17 pipps joined #salt
00:22 mosen joined #salt
00:22 estahn joined #salt
00:26 baweaver joined #salt
00:27 XenophonF Argos_: glad you have it working now :)
00:29 aqua^c joined #salt
00:37 garthk joined #salt
00:38 estahn joined #salt
00:42 ahammond does anyone know if the sqlite3 ext_pillar holds the db open all the time, or can I have another process write to it?
00:44 brianfeister joined #salt
00:44 meekrab joined #salt
00:51 jvblasco_ joined #salt
00:57 quasiben joined #salt
00:58 quasiben joined #salt
00:59 campbellm joined #salt
00:59 edrocks joined #salt
01:00 iceyao joined #salt
01:03 Bico_Fino joined #salt
01:03 ahammond how do I get the information in salt-cloud --query directly in salt (ideally inside an execution module?)
01:04 ahammond ah! salt.modules.cloud.query. That was too easy.
01:09 amcorreia joined #salt
01:15 Bico_Fino Hello, I need a idea to decommision servers. Can I use reactor to update pillar? Or maybe change the nodegroup of that server.
01:24 sagerdearia joined #salt
01:28 iceyao joined #salt
01:38 dyasny joined #salt
01:54 catpigger joined #salt
01:57 donmichelangelo joined #salt
02:01 edrocks joined #salt
02:01 jprostko joined #salt
02:18 meekrab joined #salt
02:18 flowstate joined #salt
02:20 meekrab joined #salt
02:23 cpowell joined #salt
02:24 alexlist joined #salt
02:30 DammitJim joined #salt
02:30 DammitJim can I do a salt['pillar.get']('mysql_users:root:localhost', 'default_password') ?
02:31 DammitJim meaning... 3 levels down: mysql_users -> root -> localhost ?
02:31 DammitJim or is there a better way of doing this?
02:34 favadi joined #salt
02:41 bowhunter joined #salt
02:42 brianfeister joined #salt
02:44 XenophonF DammitJim: you can do that
02:44 XenophonF if any of the pillar keys are missing, it will return the default
02:45 XenophonF it's why there's a pillar.get() method in the first place
02:48 amy joined #salt
02:50 DammitJim I figured it out
02:50 DammitJim I don't get why I have to have 4 spaces when doing my state for this
02:52 alexlist` joined #salt
02:56 evle joined #salt
02:56 bdf joined #salt
02:57 SeaPhor joined #salt
03:02 XenophonF four spaces?
03:05 hasues joined #salt
03:05 hasues left #salt
03:22 quasiben joined #salt
03:36 dayid joined #salt
03:43 josuebrunel joined #salt
03:46 meekrab joined #salt
04:03 iceyao joined #salt
04:03 edrocks joined #salt
04:07 cyborg-one joined #salt
04:11 Chris-Simmons joined #salt
04:13 estahn joined #salt
04:14 Chris-Simmons Anyone here have experience with using cmd.shell for PowerShell commands through the API?
04:15 keldwud joined #salt
04:15 keldwud joined #salt
04:16 Chris-Simmons Specifically getting the output returned in some usable/parsable state?
04:23 josuebrunel joined #salt
04:26 slimmons joined #salt
04:27 jvblasco_ joined #salt
04:28 slimmons Just spun up a quick test server, and getting this error "[warning ] key 'file ignore glob' with the value None has an invalid type of NoneType, a list is required for this value"
04:28 slimmons prints it out 3 times
04:29 slimmons kind of weird, but I've found a lot of complaints online about it, and no resolutions.
04:29 flowstate joined #salt
04:29 slimmons I know @jfindlay has looked at it tons b/c he's tagged in every issue i've found
04:29 slimmons is there a resolution I'm not finding?
04:31 brianfeister joined #salt
04:37 slimmons ok, found same complaint, reading through all of it now.  I think there's a patch fix
04:37 slimmons https://github.com/saltstack/salt/issues/32173
04:37 saltstackbot [#32173]title: v2015.8.8 regression "[WARNING ] Key file_ignore_regex with ...a <type 'list'> is required..." | ### Description of Issue/Question...
04:45 nidr0x joined #salt
04:46 slimmons can someone point me to documentation or anything on how to upgrade from 2015.8.8 to 2015.8.8.2 in ubuntu?
04:47 josuebrunel joined #salt
04:54 brianfeister joined #salt
05:00 josuebrunel joined #salt
05:03 Antiarc joined #salt
05:04 sauvin joined #salt
05:04 catpig joined #salt
05:09 ajw0100 joined #salt
05:09 amy joined #salt
05:11 catpig joined #salt
05:12 slimmons nevermind on my previous question.  I found my problem...I started using 16.04 too early
05:12 slimmons oops
05:22 iceyao joined #salt
05:23 flowstate joined #salt
05:24 rdas joined #salt
05:25 garphy joined #salt
05:26 manji joined #salt
05:31 Hipikat joined #salt
05:41 kshlm joined #salt
05:55 nidr0x joined #salt
05:57 dyasny_ joined #salt
05:58 favadi joined #salt
06:05 edrocks joined #salt
06:13 jvblasco_ joined #salt
06:16 viq joined #salt
06:21 punkoivan joined #salt
06:24 flowstate joined #salt
06:25 cpowell joined #salt
06:34 favadi joined #salt
06:39 ht joined #salt
06:41 madpenguin joined #salt
06:54 ageorgop joined #salt
06:54 iceyao joined #salt
06:59 ravenx joined #salt
07:00 ravenx is there a way to run a command, let's say "salt '*' git.describe /path/path/path" on a successful:  salt '*' state.sls app
07:07 dkrae joined #salt
07:12 Garo_ joined #salt
07:13 Atomics joined #salt
07:13 iceyao joined #salt
07:18 CeBe joined #salt
07:18 colttt_ joined #salt
07:20 punkoivan joined #salt
07:25 flowstate joined #salt
07:27 Atomics Hello, I'm stuck in the deployment of some virtualMachine with saltcloud. I use this configuration : https://gist.github.com/Atomics/bd9fa6a851f74dfb71ca621120a0d599 And I always get the error : [ERROR   ] Failed to create VM saltmaster01. Configuration value ('sudo_password', None) needs to be set
07:31 babilen Atomics: https://docs.saltstack.com/en/develop/topics/cloud/vmware.html#configuration mentions "password" rather than "sudo_password"
07:33 zer0def joined #salt
07:34 Atomics_ joined #salt
07:35 Atomics_ babilen: Ok thanks. I will try. Should take around ~300s
07:36 ravenx anyone know the answer to my question
07:36 ravenx i was thinking of using teh reactor, but that seems a bit too much for what i want to do
07:37 slav0nic joined #salt
07:38 josuebrunel joined #salt
07:39 babilen ravenx: Why not solve this with requisites? But that way you wouldn't be able to explicitly run "salt '*' git.describe /path/path/path" on the command line
07:39 ravenx babilen: ah, i dont want to run it on teh command line
07:40 babilen Okay, then make a state that runs git.describe and define a requisite on the "app" sls
07:41 babilen But .. What are you really trying to achieve? You could just include that state in the "app" SLS and define requirements in such a way that it is run if whatever other state(s) you need for it succeeded
07:42 ravenx i just want it to be all done by itself. essentially my work flow is that i want to release from github branch
07:42 ravenx build it
07:42 ravenx and have supervisor launch it
07:43 ravenx and at the end, once supervisor launches it, i want it to report the tag to me
07:43 ravenx to make sure i am runnign the corrent one.
07:43 ravenx kinda like a "confirmation"
07:43 ravenx or a "receipt" if you will
07:44 babilen Do you have to stop supervisord if there is an update in git?
07:47 s_kunk joined #salt
07:47 ravenx not the supervisord itself
07:47 ravenx just gotta do:  supervisorctl reread; supervisorctl update
07:48 linjan__ joined #salt
07:49 dmaiocchi joined #salt
07:49 jhauser joined #salt
07:50 babilen ravenx: Okay, then define two states for the supervisord reconfiguration (cmd.run I guess) and a module.run for git.describe all with onchanges on the git.latest
07:51 babilen Or listen_in on the supervisord service.running state, but that would restart it
07:51 iceyao_ joined #salt
07:51 impi joined #salt
07:52 ravenx right now i have two states:  one to reread, and a supervisord.running one.
07:53 ravenx so i will keep the reread ( as that is quite important ), one for the supervisord.running and a module.run for gitdescribe.
07:53 ravenx the module.run will watch the supervisord.running, right?
07:53 s_kunk joined #salt
07:53 s_kunk joined #salt
07:53 babilen I'd anchor it to git.latest
07:54 babilen I mean that's what you really care about, don't you?
07:54 ravenx yes and no.
07:54 ravenx the no reasoning being:  what if i git checkout the latest branch, and the uild failed?  i dont want it to report to me the git describe when supervisor isn't runing it.
07:56 Rumbles joined #salt
07:57 babilen Well .. then pick whatever state(s) you really care about
07:57 Atomics_ babilen: Ok it's not working with the params password x)
07:58 ravenx babilen: thanks!
08:02 lero joined #salt
08:02 babilen Atomics_: Ah, you don't set it in salt-master1: config
08:03 babilen Ah, but it extends that
08:03 babilen Try moving it in there .. who knows? :)
08:03 Atomics_ Exactly. And if my memory is good i did try both
08:03 bdrung_work joined #salt
08:03 Atomics_ I try again
08:03 ravenx i am using output: mixed
08:04 ravenx is it possible to set , in a state that that one alway output full?
08:04 babilen Atomics_: I think the problem might be that you have both "provider" and "extends" in there ..
08:05 Atomics_ I can try to don't use extends
08:07 babilen Atomics_: Yeah, start with somthing simple and basic and then move on to inheritance .. Not sure why this fails as it looks sort of correct, but obviously at one point "sudo_password" isn't present in a dictionary when it should be
08:07 dmaiocchi joined #salt
08:08 edrocks joined #salt
08:08 Atomics_ babilen: Ok deploying both. one with extend and "sudo_password, password, sudo: True" in the "child" and one without extend
08:08 Rumbles is it possible to have 2 includes in a manifest?
08:09 Rumbles I have a manifest that relies on the presence of an apt repo, which is configured in another manifest, and I want to run a further manifest after everything else has completed installing as it replies on the presence of a particular user which is configured in this manifest
08:09 Rumbles I wa hoping I could have an include top and bottom but that causes a conflict
08:10 nidr0x joined #salt
08:10 babilen Atomics_: I haven't worked with salt-cloud, so I'm simply going by the documentation. Do you know what the difference is between defining a "parent" provider (e.g. "provider:
08:10 babilen saltmaster-base
08:10 babilen in the salt-master1 config vs defining "extends: saltmaster-base" ?
08:10 nebuchadnezzar joined #salt
08:11 babilen Rumbles: You could just include the "middle" SLS in the last one and define requisites on the user.present state in there
08:11 Ayo joined #salt
08:11 babilen That way the states will be correctly ordered
08:11 Atomics_ By what i understand. Provider is the connection information to the "backend" (Amazon, Vmware, Vsphere .....)
08:12 Atomics_ Extend can be use in the provider files and in the profile files.
08:12 babilen Atomics_: I'm simply wondering if there is a difference between them in terms of which data is being inherited
08:13 Atomics_ I did try to put sudo_password in the provider information too but fail x)
08:13 meekrab joined #salt
08:14 Atomics_ And about the 2 previous test (no inheritances and heritance with sudo_password in child) i still have the same error
08:15 babilen So, no inheritance is using a single definition?
08:17 GreatSnoopy joined #salt
08:17 Atomics_ Yes i use a single definition like : https://gist.github.com/Atomics/0c90c48e8da6f7d25885750988452291
08:21 babilen That looks alright (to me)
08:22 babilen Which version of salt is this?
08:23 Atomics_ Salt: 2015.8.8.2
08:24 flowstate joined #salt
08:24 kshlm joined #salt
08:25 beardedeagle joined #salt
08:25 cpowell joined #salt
08:28 kbaikov joined #salt
08:28 Atomics_ I will maybe need to open an issue x)
08:28 ravenx babilen: now that i have added it, how do you know why i dont see the actual tag itself:   https://i.imgur.com/9lcEPxl.png
08:28 keimlink joined #salt
08:28 ravenx this is what i'm getting
08:30 babilen ravenx: Ah .. last time I want to report something like that I simply used a cmd.run with echo
08:31 babilen Atomics_: yeah
08:31 N-Mi Hi, I was trying to manage Openvswitch with salt, and found there was a module for this. It is documented in the develop branch of the doc, but inside it was written these features were added in 2.8.x (where x = 1 or 2). I have 2015.8.8, and openvswitch.py is not in the module directory, which match the fact that this module is documented only in the develop branch. Is this normal ?
08:31 N-Mi Here is the doc page : https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.openvswitch.html
08:32 ravenx babilen: ah okay.  that works too
08:34 madpenguin joined #salt
08:34 kbaikov joined #salt
08:34 babilen N-Mi: It is normal that documentation in the development branch pertains to code in the development branch, yeah
08:36 N-Mi babilen: I agree, but I would expect that it says "New in version 2016.3.0." instead of "New in version 2015.8.1."
08:37 N-Mi because versions 2015.8.x don't have this feature
08:37 AndreasLutro N-Mi: shit happens, I'm guessing someone wanted it in 2015.8.1 but was asked to re-create the pull request against develop or 2016.3 but forgot to change the versionadded. you could do a pull request to fix it
08:39 N-Mi AndreasLutro: ok, I was not sure if it was an error in doc or if I missed another reason that would explain that
08:39 AndreasLutro hard to tell, would have to check git logs and look up the related pull requests to know for sure
08:40 rrei joined #salt
08:49 tyler-baker joined #salt
08:55 dmaiocchi joined #salt
08:59 Rumbles thanks babilen
09:00 fredvd joined #salt
09:02 toanju joined #salt
09:04 Sylvain31 joined #salt
09:04 dmaiocchi joined #salt
09:07 jesusaur joined #salt
09:13 iceyao joined #salt
09:20 ht joined #salt
09:21 flebel joined #salt
09:25 flowstate joined #salt
09:32 rrei hey guys
09:33 rrei can anyone tell me what is the default context passed to templates when using file.managed for example?
09:33 rrei without an explicit 'context' argument
09:42 iceyao_ joined #salt
09:55 Garyx joined #salt
09:56 colttt joined #salt
09:59 rrei nevermind, I found the answer
10:07 aqua^c joined #salt
10:09 edrocks joined #salt
10:22 flowstate joined #salt
10:23 kbaikov hello
10:23 kbaikov does the salt stdin parameter work for you? Or am i doing something wrong.
10:23 kbaikov e.g.: salt '*' cmd.run "somecommand that asks for stuff" stdin='someinput'
10:26 jvblasco joined #salt
10:29 pkrev joined #salt
10:37 rdas joined #salt
10:40 pkrev hi guys, if I use 2 file.patch in state I get 'Too many functions declared in state 'file' in SLS 'ico_ext'' code:https://dpaste.de/eGXR
10:42 pkrev I'm getting blind .. forgot salt:// in source :/
10:50 duncanmv joined #salt
10:52 estahn joined #salt
10:55 renaissancedev joined #salt
10:55 babilen rrei: For reasons of posterity: What is the answer?
10:57 AndreasLutro [WARNING ] [py.warnings      ] %s
10:57 AndreasLutro salt errors keep getting better
11:02 ronnix joined #salt
11:02 rrei babilen: these state functions also take a 'defaults' argument, on top of which the 'context' is overlaid. I don't really see why they need two arguments to pass context variables though
11:03 rrei I was just wondering if the context of the sls is passed to those templates, but I guess we have to explicitly pass all context vars
11:03 rrei Andreas: :D
11:07 babilen rrei: You might consider retrieving all data within the template, rather than passing them in from the outside
11:08 babilen AndreasLutro: Oh dear :-/
11:09 rrei yes, but in this case I want to keep the template simple. It's a .bashrc file in which I want to define some paths dynamically
11:09 amcorreia joined #salt
11:09 rrei so I'm passing a single variable in
11:10 spuder joined #salt
11:12 Harsh joined #salt
11:12 Harsh hi guys
11:14 rrei hey
11:16 Harsh hi
11:16 Harsh i need a help
11:17 Harsh regrading github clone repository with saltstack
11:17 Harsh can u plz help
11:18 babilen Okay, what have you tried so far?
11:18 Harsh just a min plz
11:20 Harsh i created a gitrepo.sls and added follwoing stuff in it
11:20 Harsh ssh_known_hosts:     - present     - user: root     - fingerprint: 89:aa:2c:05:d9:2f:6e:ef:d9:bb:35:c2:10:83:d5:c2 git.latest: – name: https://github.com/abc/GithubCIAzure.git – target: /usr/local/new/    - rev: master   – force_clone : True – force_fetch : True – identity: /root/.ssh/config
11:22 Harsh hi
11:23 flowstate joined #salt
11:26 Sylvain31 joined #salt
11:28 babilen That identity entry looks wrong (should be the private key), but what is the actual problem you are trying to fix? You might also want to use a pastebin such as http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … to show us
11:30 Harsh actually i wanted to clone a private git repo
11:30 Harsh can u plz give me ur email is so that i mail u complete details of the issue
11:30 babilen You also seem to be missing state ids, but that is hard to say as you might not have pasted the entire SLS
11:31 colttt joined #salt
11:32 Harsh can u plz tell me ur public email id for communication only
11:32 Harsh as i cannt tell u full details
11:34 babilen Feel free to remove information from your paste, but IRC is that, IRC support. If you wish to pay someone for personal support, I'm sure that there are some people in here that might be willing to offer their services. There is also http://saltstack.com/support/
11:38 Harsh sorru i cant get you
11:38 Harsh sorry
11:42 totte- joined #salt
11:42 iceyao joined #salt
11:44 quasiben joined #salt
12:08 blarghmatey joined #salt
12:12 edrocks joined #salt
12:15 HeresJohny joined #salt
12:18 akhter joined #salt
12:24 flowstate joined #salt
12:25 colttt joined #salt
12:26 akhter_1 joined #salt
12:27 cpowell joined #salt
12:27 XenophonF so babilen, what's your going rate? ;)
12:30 babilen XenophonF: Two pints an hour?
12:32 XenophonF ha!
12:32 XenophonF man if i'm ever on your side of the pond, I owe you at least a few pints for all the advice you've given me
12:37 akhter joined #salt
12:39 nidr0x joined #salt
12:46 squishypebble joined #salt
12:52 ajspa joined #salt
12:53 numkem joined #salt
12:53 mavhq joined #salt
12:57 steffo joined #salt
12:58 mavhq joined #salt
12:58 cpowell joined #salt
12:59 edrocks joined #salt
13:01 iceyao joined #salt
13:02 iceyao joined #salt
13:04 hal58th joined #salt
13:04 colttt_ joined #salt
13:04 elsysops joined #salt
13:05 akhter joined #salt
13:08 Rumbles is it possible to use an if statement in a template to see if the value of some context value matches? Like {% if {{ HEADER }} == "somevalue" %} ????
13:08 Rumbles If so, would that be the right syntax?
13:09 Rumbles or can I get rid of the {{ }} 's ?
13:12 rrei yes, exactly, since you're already inside a jinja statement you *must* omit the {{ }} to access template variables
13:12 Rumbles ah, nice one, thanks rrei  :)
13:12 rrei so that would become {% if HEADER == "somevalue" %}
13:12 babilen Rumbles: http://jinja.pocoo.org/docs/dev/templates/
13:12 rrei I associate {{ }} in jinja with output, kind of like print in python
13:13 rrei what goes inside {{ }} is "printed" in the rendered template
13:13 rrei in this case, you don't want to print anything, just do some logic
13:13 Rumbles I have it bookmarked thanks babilen, sometimes it's just quicker to ask someone who knows rather than reading through trying to find the thing I'm trying to do :)
13:14 newjersey joined #salt
13:14 losh joined #salt
13:14 babilen Sure! It's just that you want to read that article at one point if you plan to use a lot of jinja at one point. It is sort of "the missing manual" in Salt on "How to write (jinja) templates"
13:16 Rumbles I have skim read it previously, and it was a massive help
13:16 Rumbles but I forget quite a lot :)
13:17 mavhq joined #salt
13:21 rem5 joined #salt
13:24 kevinquinnyo joined #salt
13:26 flowstate joined #salt
13:27 Rumbles At the moment I'm trying to write a manifest which can create all the different nginx site config files we use. In the config files we have an "add_header" line, which is very long. I was hoping to include that in the context in the manifest, but salt isn't happy with what I am rying. Any chance someone can tell me what I'm doing wrong?
13:27 Rumbles I get the error "mapping values are not allowed here"  https://paste.fedoraproject.org/361027/14619364/
13:28 Rumbles is it seeing the bit in "'s as something unexpected? Can I escape them?
13:29 bowhunter joined #salt
13:30 renaissancedev joined #salt
13:30 flowstate joined #salt
13:32 subsignal joined #salt
13:33 babilen Rumbles: Most people in here use "state" or "SLS" for what you call manifest, btw
13:33 MadHatter42 joined #salt
13:33 Rumbles sorry :/
13:34 Rumbles I picked it up from my boss
13:34 kiorky joined #salt
13:34 Rumbles I'll try to change :)
13:34 babilen No problem .. I just thought that more people might understand your questions if you were to use the standard terminology
13:34 babilen (for salt that is)
13:34 Rumbles yep np :)
13:34 n1x0n_ joined #salt
13:35 babilen Could you paste your state?
13:35 n1x0n_ Hello, any hints on how can I get back multiple grains in one go ? grains.get foo,egg doesn't work, and I see nothing in documentation if it is even possible :-/
13:35 babilen There is also https://github.com/saltstack-formulas/nginx-formula/ which allows you to configure nginx and you might want to consider passing these values in via pillars.
13:36 Rumbles I am passing in via a pillar
13:36 babilen Rumbles: Did you quote the "add_header" value ?
13:36 babilen Rumbles: Ah, right .. so you are!
13:36 _JZ_ joined #salt
13:36 babilen Rumbles: I guess that you'll have to enclose it all in "..." and escape " within
13:37 amy_ joined #salt
13:37 Rumbles okay, thanks I'll try that
13:37 racooper joined #salt
13:37 hasues joined #salt
13:37 babilen That way it will be parsed as string
13:38 Rumbles I've seen state files like this before and I find them exremely difficult to understand what they're doing babilen. I'm sure they're smarter than hat I'm writing, but to be honest, if I don't understand it I wouldn't want to use it
13:38 Rumbles because if it breaks I'm in trouble :)
13:40 mapu joined #salt
13:42 babilen State files like the nginx formula?
13:43 hasues left #salt
13:43 DammitJim joined #salt
13:47 perfectsine joined #salt
13:49 nidr0x joined #salt
13:53 akhter joined #salt
13:55 edrocks joined #salt
13:59 Puckel_ joined #salt
13:59 mavhq joined #salt
14:04 perfectsine joined #salt
14:04 subsignal joined #salt
14:08 west575 joined #salt
14:09 simon_c joined #salt
14:09 subsigna_ joined #salt
14:10 simon_c hi there. I'm new to salt. (been using puppet up to now) & trying to get my head arond pillars.
14:10 simon_c where do I set my default data for template files, and how do I override that on a per node basis (or via other grains I suppose)
14:13 disbound I'm sort of new too but that way i understand it is grains are defined by the Minion which they are specific to, while Pillars are defined on the Master. Grains are generally used to provide data that is unlikely to change, at least without restarting the Minion, while Pillars tend to be more dynamic.
14:14 disbound both defaults data and override per node can be done in pillar
14:14 ronnix joined #salt
14:14 simon_c disbound: yeh I understand that.
14:15 simon_c but for some files (generated by tempaltes) I want a default value for some lines, but sometiems I want to override that. I *thought* that's what pillar was for, but I can't see to make it work that way.
14:16 cyborg-one joined #salt
14:16 tharkun joined #salt
14:17 kevinquinnyo i need to group a series of tasks across many minions.  i could use the orchestrate runner, but i don't actually need them to be done in any particular order.  is there a built in subsystem for this kind of thing or should i create a custom "runner"?
14:17 rm_jorge joined #salt
14:20 Rumbles joined #salt
14:21 SheetiS joined #salt
14:22 rem5 joined #salt
14:24 flowstate joined #salt
14:25 radhac joined #salt
14:25 scoates joined #salt
14:26 tristianc_ joined #salt
14:27 mrueg_ joined #salt
14:27 akhter joined #salt
14:27 dunz0r_ joined #salt
14:27 drawsmcgraw joined #salt
14:28 Shirkdog_ joined #salt
14:28 tharkun_ joined #salt
14:29 akhter Hey guys, I'm separating pillars so they are set per environment.  Is there a way to show pillars like saltutil.show_highstate?
14:30 west575_ joined #salt
14:31 mr_chris- joined #salt
14:31 Sketch_ joined #salt
14:31 rideh- joined #salt
14:31 MeltedLux_ joined #salt
14:32 MindfulM- joined #salt
14:33 dustywusty joined #salt
14:33 kaptk2 joined #salt
14:33 sarlalian joined #salt
14:35 cliffstah so I have a quick question..  over the last 2 days I've created myself a salt-cloud provider that uses libvirt via minions.  it works really well and I can just use salt-cloud instead of salt virt..  my question is, why does salt virt even exist and why isn't there a libvirt/minion provider already?  It seems odd to me and I just wondered what the rationale is, if any..
14:35 jasondotstar joined #salt
14:35 gtmanfred akhter:yes
14:35 newjersey joined #salt
14:35 akhter gtmanfred: How?
14:35 gtmanfred akhter: https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.pillar.html
14:36 gtmanfred salt-run pillar.show_pillar <minion_id>
14:36 gtmanfred or just pillar.items
14:36 akhter I'll try that, thanks.
14:36 gtmanfred i don't think there is a way to show them without the jinja rendered though
14:36 sagerdearia joined #salt
14:36 MadHatter42 joined #salt
14:37 edrocks joined #salt
14:37 dkrae joined #salt
14:37 Antiarc joined #salt
14:37 6JTAAFGVI joined #salt
14:37 Jimlad joined #salt
14:37 hillna joined #salt
14:37 WiuEmPe joined #salt
14:37 SpeeR joined #salt
14:37 alvinstarr joined #salt
14:37 gmoro joined #salt
14:37 zz_Cidan joined #salt
14:37 rickflare joined #salt
14:37 M-MadsRC1 joined #salt
14:37 lungaro joined #salt
14:37 chamunks joined #salt
14:37 wryfi joined #salt
14:37 riftman joined #salt
14:38 capri joined #salt
14:38 eightyeight joined #salt
14:39 akhter gtmanfred: I'm not particularly worried about jinja renderring, that's fine with me.
14:39 Hivlaher joined #salt
14:39 akhter I just want to know if I set different environments via salt (dev/qa/base/prod etc...), that they all apply correctly.
14:40 gtmanfred ahh yeah, you shoudl be able to also call salt-call pillar.items saltenv=preprod
14:40 gtmanfred same with salt-run pillar.show_pillar 'saltenv=preprod'
14:40 akhter In my case I'd be calling prod.
14:40 gtmanfred yeah, whichever env :)
14:42 simonmcc joined #salt
14:42 rem5 joined #salt
14:42 akoumjian joined #salt
14:43 ramblinpeck joined #salt
14:48 Bico_Fino joined #salt
14:48 akhter gtmanfred: That worked wonders, thanks.
14:49 gtmanfred akhter: no problem
14:59 akhter joined #salt
15:00 onlyanegg joined #salt
15:01 AnalogLifestyle joined #salt
15:06 Tanta joined #salt
15:07 brianfeister joined #salt
15:08 flowstate joined #salt
15:08 aqua^c joined #salt
15:08 spuder joined #salt
15:09 lungaro joined #salt
15:13 Brew joined #salt
15:13 murrdoc joined #salt
15:17 murrdoc how do we get travis going for the saltstack formulas
15:18 akhter joined #salt
15:18 debian112 joined #salt
15:18 murrdoc babilen:  ?
15:18 murrdoc this is the only one https://github.com/saltstack-formulas/jenkins-formula/blob/master/.travis.yml
15:18 flowstate joined #salt
15:19 brianfeister joined #salt
15:19 flowstate joined #salt
15:20 6JTAAFGVI Anyone know if you can pass options on the command line for salt-cloud?  Eg. instance size, or additional disks, etc.
15:21 rihannon joined #salt
15:23 brianfeister joined #salt
15:25 jnilsson joined #salt
15:33 bluenemo joined #salt
15:34 amy_ joined #salt
15:35 Gareth ahhh. cloud execution module does what I want.
15:37 pipps joined #salt
15:38 brianfeister joined #salt
15:39 autofsckk joined #salt
15:40 murrdoc o/ Gareth
15:40 ronp_usa1 joined #salt
15:41 Rumbles :( quote marks in an object in my pillar are killing my will to not drink
15:43 UtahDave joined #salt
15:48 Gareth hrm. murrdoc says hello then leaves.
15:48 UtahDave hi, Gareth
15:48 UtahDave left #salt
15:48 UtahDave joined #salt
15:48 UtahDave lol, just kidding
15:48 Gareth haha
15:51 const joined #salt
15:51 const Hi, is there some state to install package source?
15:51 const ie apt-get source nginx
15:54 josue1 joined #salt
15:55 UtahDave const: I'm not aware of an option for that
15:55 iggy that doesn't seem like a common thing to do in a declarative config manager
16:02 dean joined #salt
16:02 ageorgop joined #salt
16:02 josuebrunel joined #salt
16:03 ALLmight_ joined #salt
16:04 ALLmigh__ joined #salt
16:04 nidr0x joined #salt
16:06 akhter joined #salt
16:06 bluenemo hi guys. I've got a monitoring system that I can communicate with via json. I was thinking to write a custom state module.. is there anything in my direction yet?
16:07 bluenemo atm I hacked a py script using the modules json and requests.. feels like there might be sth already :)
16:07 kevinquinnyo bluenemo: what monitoring system
16:07 mpanetta_ joined #salt
16:08 XenophonF const: use a cmd.run state with the creates option, pointing at wherever apt unpacks source debs
16:08 kevinquinnyo monitoring system and json rpc api -- just a guess, if it's zabbix, there is a module for that already i belive
16:08 XenophonF i took a look at zabbix-formula and came away somewhat intimidated
16:09 bluenemo kevinquinnyo, bloonix
16:09 bluenemo its kinda amazing. I had my run with nagios, icinga, check_mk. Its the new sh*t :)
16:09 kevinquinnyo never heard of it
16:09 kevinquinnyo interesting
16:09 bluenemo tried zabbix too. I hightly recommend to try bloonix :) yeah its open source since a few month
16:10 kevinquinnyo well writing an execution module + state module combo for something with a solid rest api is actually not too hard
16:10 kevinquinnyo just kind of tedious
16:10 bluenemo it allows to create customers very easily. there is a hosted version of it too.
16:10 bluenemo yeah i know, its super simple. thats why I thought I'd ask if there is a generic module
16:10 bluenemo but I need some magic for getting an ID / token and using that
16:11 kevinquinnyo you could have a look at this for isnpiration https://github.com/TotalServerSolutions/salt-state-gitlab
16:12 kevinquinnyo i forked it from someone else and added a bunch of api abtraction
16:12 aqua^c joined #salt
16:12 josuebrunel joined #salt
16:16 onlyanegg joined #salt
16:19 writtenoff joined #salt
16:23 XenophonF kevinquinnyo: thanks for sharing that, i might follow that design for a state module i'm writing
16:24 kevinquinnyo there are some redundencies in that design, but honestly i dont mind that.  it makes it more clear, and there's no wizard behind the curtain that you have to find to see how it works
16:25 XenophonF yeah
16:25 kevinquinnyo i copied that design for a wordpress module that wraps the wp cli (wordpress command line client project) to do wordpressy things
16:25 kevinquinnyo and it works fine
16:25 XenophonF oh where did you find that?
16:25 XenophonF I need something exactly like that.
16:26 XenophonF I'm in the process of deploying a small fleet of WordPress sites, and it irks me that I can't manage their internals.
16:28 ajspa joined #salt
16:29 kevinquinnyo joined #salt
16:29 AndreasLutro XenophonF: define "their internals"?
16:29 bluenemo kevinquinnyo, cool, thank you! :)
16:29 kevinquinnyo np
16:30 bluenemo kevinquinnyo, are you from berlin? I feel like i know you
16:30 bluenemo (pic form github)
16:30 kevinquinnyo nope
16:30 bluenemo ah ok. we long haired nerds look all alike :D
16:30 XenophonF AndreasLutro: like, WordPress settings that aren't in wp-config.php
16:31 kevinquinnyo i should update that, i've cut it short now, so i'm a short haired nerd now ;)
16:31 bluenemo hm this gitlab magic is cool too
16:31 bluenemo :D
16:31 bluenemo ah I think i should too but i'm afraid I will look normal x)
16:31 AndreasLutro XenophonF: look into wp-cli
16:32 XenophonF I will.
16:32 Tanta joined #salt
16:33 kevinquinnyo XenophonF: did you ask me something before i got knocked offline?  I see mention of wp-cli
16:33 XenophonF yeah you said something about a wordpress module that wraps wp-cli
16:33 kevinquinnyo yeah
16:33 XenophonF was hoping for a pointer to it
16:33 XenophonF :_
16:33 XenophonF :)
16:34 kevinquinnyo i actually need to ask my employers if i can open-source that one
16:34 kevinquinnyo it's really simple though
16:34 XenophonF that would be pretty cool
16:34 kevinquinnyo it's basically just a wrapper for cmd.run
16:34 XenophonF gotcha
16:35 liskl joined #salt
16:35 kevinquinnyo wordpress.present() basically just calls the various wp-cli options, like wp core install
16:37 kevinquinnyo wordpress.plugin_present()  calls things in the execution module like plugin_install() if it needs to, which is ultimately "wp plgin install {0}'.format(plugin_name)
16:38 akhter joined #salt
16:41 ajspa joined #salt
16:43 flowstate joined #salt
16:45 bltmiller joined #salt
16:48 jvblasco joined #salt
16:52 pipps joined #salt
16:56 salty_solution joined #salt
16:58 manji joined #salt
17:00 ALLmightySPIFF joined #salt
17:02 kevinquinnyo if i have a state that depends on a specific pillar being set, what's the best way for me to gracefully exit the state indicating it did not have the pillar it needs?
17:02 Garo_ joined #salt
17:04 AndreasLutro I'd just wrap the state definition in an if statement
17:05 kevinquinnyo https://docs.saltstack.com/en/develop/ref/states/all/salt.states.test.html#salt.states.test.check_pillar  just stumbled across this
17:06 kevinquinnyo AndreasLutro: i was thinking about doing that but just wondering if theres a better way
17:06 edrocks joined #salt
17:08 flowstate joined #salt
17:08 kevinquinnyo oh all of that is in the develop branch
17:08 kevinquinnyo oh wait nm
17:10 bowhunter joined #salt
17:10 ronnix joined #salt
17:12 kevinquinnyo yeah those test states are actually really cool AndreasLutro
17:13 kevinquinnyo i can use test.check_pillar, then require it as a requisite in the state(s) that needs the pillar to exists
17:13 AndreasLutro not sure I'd call that a graceful exit
17:14 kevinquinnyo well maybe graceful wasn't the right word
17:14 flowstate joined #salt
17:14 kevinquinnyo saltful exit?
17:14 kevinquinnyo i just didnt want it to silently not do anything
17:14 murrdoc joined #salt
17:15 AndreasLutro test.check_pillar will show up as a state failure if the pillar doesn't exist, no?
17:15 AndreasLutro and the state that requires the test state will also fail
17:15 kevinquinnyo yes
17:16 kevinquinnyo in this case that's what i want
17:16 murrdoc joined #salt
17:17 flowstat_ joined #salt
17:18 pipps joined #salt
17:22 flowstate joined #salt
17:28 brianfeister joined #salt
17:29 flowstate joined #salt
17:34 elsysops joined #salt
17:36 harryw joined #salt
17:38 harryw joined #salt
17:39 flowstate joined #salt
17:41 DammitJim in order to use the mysql states
17:41 DammitJim do I need to supply a username/password?
17:41 DammitJim like if I want to create a database or add a user?
17:43 kevinquinnyo DammitJim: yes, there is the connection_user and commection_pass options
17:43 kevinquinnyo alternatively there is also a connection_defaults_file i believe, if you have something like /root/.my.cnf with the credentials in them
17:44 hal58th You also have to make sure to have the python mysql package installed... i think
17:45 kevinquinnyo yes
17:46 flowstate joined #salt
17:50 DammitJim I have that
17:50 DammitJim for some reason, it's not setting up the root password
17:50 DammitJim hhhmmmm
17:50 DammitJim I"ll have to read some more
17:50 DammitJim maybe I shouldn't be trying to set up users and databases on salt
17:50 DammitJim and do it all manually
17:51 keldwud joined #salt
17:51 damona joined #salt
17:52 DammitJim what came first? version 2014.1.0 or 0.16.2?
17:52 DammitJim so confusing the numbering
17:53 RandyT joined #salt
17:54 ALLmightySPIFF joined #salt
17:55 ALLmightySPIFF joined #salt
18:00 hoonetorg joined #salt
18:00 kevinquinnyo "do it all manually".  heresy! ;)
18:00 XenophonF DammitJim: are you using mysql-formula?
18:01 DammitJim I was
18:01 hoonetorg is --retcode-passthrough working with salt-run???
18:01 flowstate joined #salt
18:02 hoonetorg besides: hi all
18:02 DammitJim XenophonF, ... I don't know what this is...
18:02 DammitJim https://www.digitalocean.com/community/tutorials/saltstack-infrastructure-creating-salt-states-for-mysql-database-servers
18:04 XenophonF it looks like that's a tutorial for writing your own mysql deployment states
18:04 XenophonF i used this to do my mysql deployments: https://github.com/saltstack-formulas/mysql-formula
18:05 XenophonF if you set mysql:server:root_password, it should do the right thing
18:06 hoonetorg ^^^ i've seen in manpage of salt-run --hard-crash too
18:07 hoonetorg will it make the retcode of salt-run != 0 in case that something failed on orchestrate run f.e.???
18:08 DammitJim XenophonF, forgive me for the silly question
18:08 DammitJim all these things in github
18:08 DammitJim do you download them and use them
18:08 DammitJim or do you look at their code and customize it for your needs?
18:08 XenophonF not silly
18:09 XenophonF i fork them
18:09 XenophonF then i read through them to make sure they don't do anything hinky
18:09 cpowell joined #salt
18:10 XenophonF then i add them to my salt master like this (using salt-formula): https://github.com/irtnog/salt-pillar-example/blob/master/salt/example/com/init.sls#L311
18:11 XenophonF on a weekly basis, i update my forks after reviewing their changes
18:11 DammitJim what do you mean you fork them?
18:11 DammitJim you git checkout them?
18:11 XenophonF I fork the repository on GitHub
18:11 XenophonF https://help.github.com/articles/fork-a-repo/
18:12 DammitJim OMG... there is sooo much I need to learn!!!
18:12 DammitJim when you fork it, you have it locally in your environment, right?
18:12 XenophonF yes
18:12 DammitJim then you update your repo
18:12 XenophonF here are my helper scripts: https://gist.github.com/xenophonf/9df09e47a8629bb789ffbb94c7d17e42
18:12 DammitJim do you ever go back and update your fork?
18:13 XenophonF e.g., on GitHub, I fork saltstack-formulas/mysql-formula, putting it into my irtnog account (that's an organization I set up on GitHub)
18:14 XenophonF then I run my setup-fork script on my dev system
18:14 XenophonF e.g., ./setup-fork.sh irtnog/mysql-formula saltstack-formula
18:14 XenophonF first arg is my repo on github, second arg is the upstream account
18:14 cachedout joined #salt
18:15 XenophonF the script creates a file called "forks" that tracks the stuff i've checked out in this manner
18:15 XenophonF to update the forks, i run: ./update-forks.sh
18:15 XenophonF which iterates through the forks list, running ./update-fork.sh on each checkout
18:15 XenophonF like I said, I'll review the changelogs, make sure everything's kosher
18:16 XenophonF then on my master i'll re-run the salt.formulas SLS (from https://github.com/saltstack-formulas/salt-formula)
18:16 XenophonF that SLS will update the salt-managed formula repo checkouts on the master
18:17 XenophonF my master has its own GitHub account with read-only access to the repos in my GitHub organization
18:17 XenophonF "irtnog" is my personal setup that i used to mockup the configs we put in place at work
18:17 XenophonF at work some of our repos are private, of course
18:18 XenophonF does that all make sense?
18:25 newjersey joined #salt
18:27 baweaver joined #salt
18:28 DammitJim yes sir
18:28 DammitJim a little deep, but great info
18:29 DammitJim bottom line, though, I should check out that formula
18:29 DammitJim and adapt it to my needs
18:29 DammitJim for mysql stuff with salt
18:29 XenophonF that's a great place to start
18:29 baweaver joined #salt
18:29 XenophonF add complexity later, when you need it
18:30 zrkadlo joined #salt
18:30 mohg joined #salt
18:30 mohg hi guyz
18:30 zrkadlo hi noobs
18:30 mohg how u doin
18:30 zrkadlo salt at u all
18:30 mohg feelin salty today>
18:30 mohg ?
18:30 * tuxx_ is a nub
18:31 tuxx_ rape and mpillage
18:31 zrkadlo u r nub
18:32 * mohg is feeling salty today
18:32 XenophonF ugh would you guys take your bots to #salt-offtopic or something?
18:38 dmaiocchi joined #salt
18:39 kevinquinnyo #aol-chatroom-1998
18:41 zrkadlo im not a bot u nob
18:41 zrkadlo -_-
18:41 zrkadlo i dont know any bot
18:41 zrkadlo what is bot
18:41 zrkadlo ?:
18:41 zrkadlo and who r u
18:42 tuxx_ zrkadlo: you seem to be very smart
18:43 subsignal joined #salt
18:44 zrkadlo yes im
18:46 zrkadlo ur to helpfull
18:46 zrkadlo honour ju
18:46 zrkadlo ur gud people
18:48 bltmiller joined #salt
18:53 hasues joined #salt
18:57 zrkadlo hey mr. helpfull r u here ?
18:59 cachedout joined #salt
18:59 zrkadlo report him for afk
19:00 edrocks joined #salt
19:00 nidr0x joined #salt
19:06 kows joined #salt
19:07 khaije1 joined #salt
19:08 khaije1 things that make me happy on new CentOS machines: echo epel-release salt-minion | xargs -n1 yum install -y && systemctl enable --now salt-minion && reboot
19:08 west575 joined #salt
19:13 akhter joined #salt
19:17 brianfeister joined #salt
19:18 kevinquinnyo when running the tests for salt itself, is there a way to specify specifically the unit test you want to run
19:18 gtmanfred there should be
19:18 gtmanfred you should be able to pass the file and then the test class and function name
19:19 kevinquinnyo i was looking at the options for tests/runtests.py --help
19:19 kevinquinnyo i might have missed it
19:19 hoonetorg hi gtmanfred
19:19 hoonetorg we met at saltconf
19:19 gtmanfred lemme see if I can find an example
19:19 gtmanfred hoonetorg: hi :)
19:19 hoonetorg currently in the process of making salt-formula-keystone clusterable
19:20 hoonetorg will be a lot of changes
19:20 gtmanfred kevinquinnyo: https://docs.saltstack.com/en/latest/topics/development/tests/unit.html#a-simple-example
19:20 bantone nice
19:20 jfindlay kevinquinnyo: `python tests/runtests.py -v -n unit.modules.pip_test.PipTestCase.test_issue5940_install_multiple_pip_mirrors`
19:20 gtmanfred hoonetorg: have you seen tcpcloud's stuff for keystone and stuff?
19:20 kevinquinnyo awesome thanks gtmanfred jfindlay
19:20 hoonetorg had a look the official ones at openstack github account
19:20 gtmanfred and other openstack stuff
19:21 gtmanfred yeah, use those ones
19:21 gtmanfred cause that will be the official openstack project
19:21 gtmanfred https://github.com/openstack/salt-formula-keystone
19:21 hoonetorg already forked :)
19:21 gtmanfred cool
19:22 hoonetorg pillar example has a lot of typo's, mistakes or is outdated
19:22 gtmanfred I am working on moving our keystone and all openstack libraries over to use openstack-infra/shade
19:22 nerdsville joined #salt
19:22 gtmanfred so, then I am going to start working with them on stuff
19:22 hoonetorg what is this
19:22 hoonetorg ?
19:22 gtmanfred watch this to learn about shade https://www.openstack.org/summit/tokyo-2015/videos/presentation/the-real-slim-shade
19:22 baweaver joined #salt
19:23 gtmanfred https://github.com/openstack-infra/shade
19:23 nerdsville Hello all! I was just starting with saltstack and was looking for something similar to rspec-puppet for BDD with salt
19:23 nerdsville Any help would be greatly appreciated
19:23 gtmanfred nerdsville: do you just want to test what your states compile to?
19:23 gtmanfred nerdsville: salt-call state.show_low_sls <state> or salt-call state.show_highstate
19:24 gtmanfred https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_highstate
19:24 hoonetorg gtmanfred: also i found that uid/gid under rhel/centos for keystone is set to 163 instead of 301 and small otheer  stuff
19:24 gtmanfred oh, and state.show_lowstate
19:25 gtmanfred hoonetorg: the switch to shade will also allow for support of keystone v3
19:25 gtmanfred and allow for us to follow the upstream clients better
19:26 gtmanfred shade was written to add support for openstack stuff to ansible, and just is a nice abstraction layer, where the opnstack guys can controll the compatibilty with the different versions of the project clients in openstack
19:26 gtmanfred so I am going to use it for salt too, cause it is really good
19:26 nerdsville @gtmanfred one sec on phone
19:27 gtmanfred that is ok, i am about to head out for a while
19:28 nerdsville I want to write tests to describe behavior and test against the actual code
19:28 nerdsville without using a server
19:28 nerdsville rspec-puppet allows you to do this
19:29 AndreasLutro nerdsville: I use serverspec
19:29 AndreasLutro that uses ssh
19:30 sjmh joined #salt
19:30 nerdsville I don't want to use a server, maybe a docker container, but using a server is too slow
19:30 sagerdearia joined #salt
19:30 nerdsville I want my tests to be instantanious
19:31 hoonetorg gtmanfred: will hv a look at shade now
19:31 sjmh is there anyway to differentiate a minion that's starting up for the very first time, from a minion that's simply restarting?
19:31 sjmh via the event bus, that is..
19:32 AndreasLutro nerdsville: oh I see - afaik, there's nothing like rspec-puppet for salt currently
19:32 AndreasLutro sjmh: no, you'd have to trigger on when the key gets added - why do you ask?
19:32 nerdsville Crap, I want salt for the event driven actions and puppet for the ease of testing
19:33 sjmh AndreasLutro : Because it's important to know ( for us ) when a minion is first coming online, versus when someone has restarted the service/rebooted the box.
19:33 hoonetorg gtmanfred: did i understand correct that you want to use shade for openstack execution modules?
19:33 sjmh And since we do key preseeding, the key accept event doesn't work.
19:33 AndreasLutro sjmh: why is it important to know?
19:34 sjmh AndreasLutro : Because it's part of the orchestration for our provisioning process.
19:34 hoonetorg gtmanfred: shade isn't used yet somewhere, is it?
19:34 nerdsville @sjmh are you using salt-cloud?
19:35 sjmh nerdsville No, this is internal, bare-metal builds.
19:35 AndreasLutro sjmh: and making your orchestration process less reliant on knowing when a minion first connects is not an option?
19:36 nerdsville @AndreasLutro, I think he wants to run a bootstrap script, can't salt-cloud run on bare metal?
19:36 sjmh AndreasLutro - If I wanted to provide a worse user experience.. sure.
19:36 AndreasLutro if the salt minion is connecting I assume the bootstrap script or equivalent has already been ran
19:36 danlsgiga joined #salt
19:36 AndreasLutro sjmh: so the purpose is to alert people that server X is up?
19:37 nerdsville You can do such an alert in a bootstrap script correct?
19:38 jfindlay sjmh: could you get the event you need upon key acceptance?
19:38 jfindlay well, I should have read the history
19:38 AndreasLutro sjmh: one option would be to use a state sls with an event.send state using unless to somehow prevent it from being sent more than once, using https://docs.saltstack.com/en/latest/ref/states/startup.html to trigger the state
19:39 danlsgiga hey guys... I have one reactor that deletes an A dns record on Route53 at the destroy time and it works fine... I now need to delete a PTR record on Route53 at the destroy too but I can't because the destroy event only sends the minion id (which I use as hostname)
19:39 danlsgiga Does anyone know how to do this?
19:39 sjmh AndreasLutro - Yeah - we have a provisioning VLAN and some automated network orchestration that moves the system from it's provisioning VLAN over to it's final run VLAN.  Part of that orchestration is that salt gets notified when the system has completed provisioning the OS.  Salt then fires off the network orchestration, and then reboots the box via IPMI.
19:40 sjmh So.. the event is supposed to be a 'success' event that lets us know that all of that worked.
19:40 brianfeister joined #salt
19:40 sjmh ie - the system reboots and succesfully comes up on it's run VLAN.
19:40 AndreasLutro right... an event.send state with unless or onlyif might be what you need
19:40 gtmanfred hoonetorg: shade is not used in salt at all yet
19:40 sjmh AndreasLutro : Yeah, that's what I was considering.  A startup state that event.sends and then removes itself
19:40 gtmanfred i am working on it
19:40 gtmanfred hoonetorg: it is currently the backend for all openstack stuff in ansible though
19:41 sjmh AndreasLutro : I was considering doing an include: /some/dir that would have the startup_state config. Then it event.sends and removes the config so it won't be run again
19:41 AndreasLutro sjmh: alternatively, use a salt orchestration sls to execute these steps in order
19:41 gtmanfred nerdsville: i am not familiar with anything like that, except maybe salt's test kitchen
19:41 sjmh AndreasLutro - the orchestration sls is way too simplistic for our needs
19:41 gtmanfred there was a talk about doing stuff like that at saltconf last week, so maybe see when that video comes out
19:42 nerdsville test kitchen? reminds me of chef
19:42 nerdsville can you send me a link
19:42 AndreasLutro sjmh: hmm, how so?
19:42 gtmanfred it is based on chef
19:42 gtmanfred nerdsville: https://github.com/simonmcc/kitchen-salt
19:42 hoonetorg gtmanfred: nice stuff
19:43 hoonetorg browsed through sources a bit
19:43 gtmanfred hoonetorg: it is super good, and hides the nastyness of the openstack clients from you
19:43 gtmanfred hoonetorg:i was doing a lot of that stuff in salt already
19:43 gtmanfred but i am able to delete a lot of garbage with shade
19:44 hoonetorg yeah, import shade and use the nice abstraction of it
19:44 nerdsville @gtmanfred https://testinfra.readthedocs.io/en/latest/index.html
19:44 nerdsville Have you tried this
19:45 gtmanfred hoonetorg: https://github.com/saltstack/salt/compare/develop...gtmanfred:shade
19:45 sjmh AndreasLutro : because our orchestration process relies on a lot of dynamic results from other systems to make smart decisions.  It also implements a general overwatching process for ensuring processes don't time out or actually complete.
19:45 gtmanfred nerdsville: i haven't tried any of them
19:45 nerdsville This one looks the most promising
19:45 nerdsville It has a docker container driver
19:45 AndreasLutro sjmh: wouldn't writing custom salt modules and calling these in the orchestration sls solve that problem?
19:46 AndreasLutro granted I'm not 100% sure how you make sure custom modules are available in orchestration
19:46 sjmh AndreasLutro : It's all implemented as a giant salt runner anyways, which is just what the orchestration is
19:46 punkoivan joined #salt
19:46 hoonetorg gtmanfred: whoa, lots of stuff already done
19:47 gtmanfred hoonetorg: yeah, it is 90% done
19:47 hoonetorg when is it ready for a pr?
19:47 gtmanfred i just got pulled off of a lot of it when i started at saltstack
19:47 gtmanfred i need to rebase it
19:47 gtmanfred and test everything
19:47 gtmanfred it is in my sprint for the next 2 weeks, but, i have a conference in 2 weeks, then 2 weeks at home working on it, then pycon for a week
19:47 nerdsville How would I respond to an event such as a git push to the gitfs in salt? Can someone point me to a link for this?
19:47 gtmanfred then one week, then family vacation for a week and a half
19:47 gtmanfred i am hopign to get it done before pycon
19:47 gtmanfred but...
19:47 gtmanfred openstack
19:48 gtmanfred nerdsville: you cant' exactly?
19:48 hoonetorg yep
19:48 gtmanfred nerdsville: what you would do is you setup github or your git remote to hit the salt-api webhook
19:48 gtmanfred and then react on that event
19:49 hoonetorg gtmanfred: will work on openstack formulas now and create PR's
19:49 gtmanfred nerdsville: https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
19:49 gtmanfred check out webhook_url
19:49 gtmanfred and webhook_disable_auth
19:49 gtmanfred you can hit that without authenticating, then you just setup github to hit the webhook
19:49 gtmanfred and pass a preshared private key that you can match in your reactor
19:49 hoonetorg gtmanfred: as i told you and you probably remember, i install everything clustered with pacemaker
19:49 gtmanfred https://docs.saltstack.com/en/latest/topics/reactor/
19:50 nerdsville kk thanks! :)
19:50 hoonetorg therefore i need to split of lots of stuff
19:50 gtmanfred hoonetorg: i remember talking to someone about pacemaker... but i forget when and who :(
19:50 gtmanfred i met soo many people sorry
19:50 hoonetorg i can imaging
19:50 hoonetorg *imagine
19:50 hoonetorg lots of people at saltconf
19:51 gtmanfred yeah, and then this week I was at the openstack summit
19:51 gtmanfred today is my first day back doing coding
19:51 hoonetorg when u'r around again, i will send you link to my changes and u could hv a look if u like it
19:51 kevinquinnyo nerdsville: or you can create your web hook like https://someuser:greatpassword@your-salt-master-domain.com and put an ssl terminator that does basic http auth in front of salt-api
19:51 sjmh +1 on using testkitchen ( and serverspec.. )
19:51 gtmanfred hoonetorg: cool
19:51 gtmanfred kevinquinnyo: that is a great idea
19:51 kevinquinnyo although that might not be the most secure way to do it..
19:52 gtmanfred i need to finalize and publish my blog post about how I do auto updatse of my blog on git push to the blog repo
19:53 nerdsville Alright well thank you guys for all the help, it will take a bit to get used to this workflow but salt seems to have some really cool features I want to take advantage up! See you guys later :)
19:53 nerdsville advantage of*
19:54 gtmanfred good luck!
19:54 gtmanfred let us know if you need help :)
19:55 nerdsville Will do, see you guys
19:55 nerdsville \exit
19:58 hasues left #salt
20:00 perfectsine joined #salt
20:01 baweaver joined #salt
20:03 hoonetorg gtmanfred: maybe you know: i asked a few hundred lines ^^^ if salt-run has something similar like --retcode-passthrough to get an retcode != 0 when something in the (orchestrate) runner fails
20:03 hoonetorg especially a salt state
20:04 danlsgiga hey guys... I have one reactor that deletes an A dns record on Route53 at the destroy time and it works fine... I now need to delete a PTR record on Route53 at the destroy too but I can't because the destroy event only sends the minion id (which I use as hostname)
20:04 danlsgiga Does anyone know how to do this?
20:05 gtmanfred hoonetorg: it unfortunately does not afaik, that is one of the things I dislike about it
20:05 hoonetorg gtmanfred: running orchestration inside orchestration fails if you don't use base env
20:05 gtmanfred hoonetorg: i output everything to json, and then run it through a quick checker of my own
20:05 hoonetorg i create a Bug report
20:05 gtmanfred cool
20:05 hoonetorg that's why i use a shell script now
20:05 gtmanfred yarp
20:06 gtmanfred it is unfortunate
20:06 hoonetorg and want to have retcodes
20:06 hoonetorg mmhhh
20:06 kevinquinnyo gtmanfred: i know you said you are out the door, but do you quickly have an example of that?  outputting it to json and checking it?
20:06 kevinquinnyo if not no worries
20:07 gtmanfred i do not have a quick example unfortunately
20:07 gtmanfred just salt-run state.orch deploy.openstack --out=json | python script.py
20:07 perfectsine joined #salt
20:07 gtmanfred and the script takes in the json from stdin
20:07 kevinquinnyo ahhh
20:07 zrkadlo what is salt ?
20:07 zrkadlo :D
20:07 kevinquinnyo ok that's easy enough
20:08 gtmanfred yup :)
20:08 hoonetorg gtmanfred: nice
20:08 hoonetorg will try that
20:09 gtmanfred aight, i gotta go pick up medicine and then making a half elf bard for a d&d campaign
20:09 hoonetorg gtmanfred: thx
20:10 sjmh d
20:10 sjmh oops
20:10 sjmh d&d 5th ed? :)
20:10 gtmanfred yup
20:12 gtmanfred i will be GMing, but i have 4 people who have never played before, and 2 who have played a bunch, so I have been helping the ones who have never played before char create
20:12 gtmanfred this will be my first time gming, should be fun
20:12 Ayo joined #salt
20:13 gtmanfred was thinking about streaming it on twitch hehe
20:13 bantone :_)
20:17 gtmanfred hoonetorg: you should also check out #openstack-salt that is where the tcp cloud guys and the stuff on that project hang out
20:20 sagerdearia joined #salt
20:25 jvblasco joined #salt
20:28 punkoivan joined #salt
20:36 thejrose1984 joined #salt
20:40 iggy I saw a talk from them at openstack summit the other day
20:40 iggy their code seems pretty specific
20:42 rem5 joined #salt
20:45 pipps joined #salt
20:46 nidr0x joined #salt
20:50 spuder_ joined #salt
20:52 gtmanfred were you in that room?
20:52 gtmanfred (i was :D)
20:52 pipps_ joined #salt
20:53 gtmanfred from me talking to them, they are trying to make it more generic and in general be like the openstack-ansible stuff
20:55 sfz- joined #salt
21:00 Bico_Fino joined #salt
21:06 PuppyPoker joined #salt
21:06 bowhunter joined #salt
21:09 roqroq joined #salt
21:09 Bico_Fino I’m trying to use file.line with mode: delete and I’m getting  KeyError: ‘file.line’ http://pastebin.com/tQTXzz8x
21:11 UtahDave what version of salt is your minion, Bico_Fino?
21:12 Bico_Fino UtahDave:  2015.5.3+ds-1trusty1
21:12 UtahDave https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.line
21:12 UtahDave file.line is new in 2015.8.0
21:13 Bico_Fino UtahDave: That’s make sense, strange that I was sure that I had the latest version. Silly me.
21:13 Bico_Fino UtahDave: Thanks for point it out. :)
21:13 UtahDave You're welcome!  that happens all the time.
21:14 aqua^c joined #salt
21:17 jnilsson joined #salt
21:23 pipps joined #salt
21:23 ageorgop joined #salt
21:24 elsysops joined #salt
21:24 Slimmons joined #salt
21:25 Slimmons How come sometimes when I add a minion (fresh master, fresh minion, only connected them, and accepted key), when I run test.ping, or anything else, it returns twice?
21:26 AndreasLutro either you have more than 1 host running with the same minion id, or you have 2 salt-mininos running on the same host
21:30 Slimmons yeah, must have been something I didn't notice.  I changed the name of the minion id, to test that.  and changing the name stopped it from returning twice
21:30 Slimmons I guess I shouldn't use generic names like "minion1"
21:30 Slimmons over and over
21:30 Slimmons thanks
21:30 Slimmons I mean, I didn't have more than one currently named minion1, but I've used that a bunch in the past
21:36 perfectsine_ joined #salt
21:37 pid1 joined #salt
21:41 west575 joined #salt
21:43 Antiarc I have a custom grain that isn't showing up and isn't returning data for a single machine. Any idea how to debug this?
21:43 Antiarc The machine is fresh, has 2 custom grains synced. One shows up in grains.ls and grains.items just fine, the other is nowhere to be seen. Both work just fine on the ~2 dozen other boxes in my infrastructure.
21:43 baweaver joined #salt
21:46 kevinquinnyo joined #salt
21:50 onlyanegg joined #salt
21:52 Antiarc Okay, nevermind. It looks like bootstrap-salt didn't install the python26-boto package, so it was failing. Gotta see how I can fix that.
21:52 UtahDave Antiarc: ok
21:52 newjersey joined #salt
21:58 onlyanegg joined #salt
22:02 nidr0x joined #salt
22:07 jfindlay Antiarc: I don't think the boto packages are part of the core dependency set, you may have to install those separately, or modify bootstrap to do it
22:07 sotrue joined #salt
22:07 Antiarc jfindlay: Yeah, I worked that out. Now I'm confused as to why it worked elsewhere though! :)
22:07 dmaiocchi joined #salt
22:08 Bico_Fino joined #salt
22:10 sotrue hey folks. anyone seen this?
22:10 sotrue [ERROR   ] An extra return was detected from minion <hostname>-<username>, please verify the minion, this could be a replay attack
22:11 sotrue i am seeing a ton of these in my newly installed salt-master 2015.8.8.2 (Beryllium)
22:12 pipps joined #salt
22:12 sotrue i am running multiple minions per host. hence the need for -<username> addition to the minion id
22:12 sotrue not sure if that matters
22:12 Antiarc I haven't seen that, but are the minions all sharing the same key?
22:13 simon_c left #salt
22:13 sotrue no they are not
22:14 sotrue my salt-master config is
22:15 bltmiller if I manage a file on salt that is located on the salt master, will minions be able to retrieve that file with a file.managed? á la: https://gist.github.com/blaketmiller/0f990ba816067a598467cfe2c1a7b366
22:15 sotrue https://gist.github.com/anonymous/9fc14e50243e5a6903c7a5259405104d
22:17 sotrue minion config is: https://gist.github.com/anonymous/7748da1696a3fb96cc4b8b069711356d
22:17 newellista joined #salt
22:19 sotrue also i dont have root on these machines so am doing a minion per user i need to manage stuff for
22:19 sotrue i'd appreciate any help from folks more experienced. I'm just starting out with salt
22:20 sotrue i have ~ 1000 minion instances  talking to this single master
22:22 sotrue i will also post this request in the mailing list
22:22 jfindlay sotrue: good idea, also can you reproduce this with a small test case, like a test.ping?  What version of salt are you using?
22:23 newellista joined #salt
22:23 sotrue @jfindlay i am running 2015.8.8.2
22:23 jfindlay does a minion restart stop the problem?
22:23 sotrue and test.ping is all I have done so far
22:23 Antiarc bltmiller: If you want a file on the salt master, you want `source: salt://path_in_salt_dir/to/file`
22:23 sotrue just stood this up
22:24 Antiarc So if you have /srv/salt/foo/bar.gz, you would use source: salt://foo/bar.gz
22:24 cliluw joined #salt
22:24 sotrue oh and strangely test.ping for all minions comes back clean
22:24 sotrue but i see those messages in the master log
22:25 bltmiller Antiarc: does it need to be in /srv/salt? what if it exists elsewhere on system, say /tmp/path/foo.tar.gz? would I simply drop the salt://?
22:25 Antiarc bltmiller: I don't know if you can provide files that are outside of the salt repo to minions. I don't think dropping the scheme would do it.
22:25 jfindlay sotrue: you might have multiple minions running on the same machines
22:26 Antiarc Try it, but I won't be surprised if it fails :)
22:26 Antiarc bltmiller:  See the doc on the source parameter here: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
22:26 bltmiller Antiarc: mk thanks, I'll experiment with it a bit. I keep my states and pillar in GitFS, so I don't typically keep anything in local system path
22:26 jfindlay bltmiller: files served by the master must be underneath your configured `file_roots` for security reasons
22:27 sotrue @jfindlay, I do have multiple minions running as multiple users. but i am adjusting minion id to accomodate by tacking on -<username> to hostname in the minion config for id:
22:27 lero joined #salt
22:27 bltmiller Antiarc: and yep, already looked over that documentation, didn't exactly answer my question
22:27 sotrue i linked to my configs above
22:28 UtahDave bltmiller: The minion can only access files from the master that are in the master's file_roots.  Which by default is  /srv/salt/
22:28 jfindlay sotrue: salt is generally designed to run only one minion daemon per system.  You can run multiple minions, but you also need to update some default paths as well
22:29 bltmiller thank you, UtahDave and jfindlay :)
22:30 sotrue thanks @jfindlay. i thought i had but i will double check.
22:31 jfindlay sotrue: there might be some more things you need to check to ensure unique minions, but the multi minion configuration is not officially supported
22:31 jfindlay that is my best guess, anyway
22:32 sotrue ah ok thats a bummer. i dont have root access and need to manage files for multiple users
22:32 sotrue cant run minion as an unprivileged user and have it make a file owned by another user
22:33 estahn joined #salt
22:33 newellista joined #salt
22:33 bltmiller sotrue: I'm going through running salt as unpriv'd user right now actually, so I feel your pain.
22:34 jfindlay it should work, but I would look into debugging maybe two users on the same system and seeing if you can isolate the configs you need to ensure full separation
22:35 jfindlay I bet they might be sharing the same /etc/salt/pki/minion, for example
22:36 sotrue @jfindlay I will spend more time looking at paths now. thanks very much for the tip
22:36 jfindlay sure
22:36 bltmiller jfindlay: seems like you could easily change the salt root directory for each instance to each instance's home directory. that would make each instance create it's own pki foo, yes?
22:38 amy_ joined #salt
22:39 jfindlay bltmiller: true
22:39 jfindlay also, the salt test runner creates multiple daemons on the same system, so you could look at their configs: https://github.com/saltstack/salt/tree/v2016.3.0rc2/tests/integration/files/conf
22:40 zenlot joined #salt
22:41 bb74352 joined #salt
22:42 SheetiS joined #salt
22:45 pipps joined #salt
22:46 kevinquinnyo hey so i'm trying to write a test (out of curiosity) for a very minor improvement to salt core, but i'm getting "mock python module is unavailable" -- i'm looking into it but i wanted to ask here in case someone has the easy button answer for me -- i did do pip install git+https://github.com/saltstack/salt-testing.git#egg=SaltTesting per https://docs.saltstack.com/en/latest/topics/development/tests/
22:47 flowstate joined #salt
22:51 kevinquinnyo oh this test is decorating the test with @skipIf(NO_MOCK, NO_MOCK_REASON) .. hmm but i need a mock in my test
22:58 amcorreia joined #salt
23:01 cyborglone joined #salt
23:02 elsysops joined #salt
23:03 estahn joined #salt
23:08 UtahDave left #salt
23:09 PuppyPoker joined #salt
23:17 ageorgop joined #salt
23:17 subsignal joined #salt
23:19 nidr0x joined #salt
23:21 baweaver joined #salt
23:23 pipps joined #salt
23:23 flowstate joined #salt
23:25 jvblasco joined #salt
23:27 cpowell joined #salt
23:37 spuder joined #salt
23:44 Rumbles joined #salt
23:46 envintus joined #salt
23:53 jvblasco joined #salt

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