Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-05-05

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

All times shown according to UTC.

Time Nick Message
00:00 _Cyclone_ joined #salt
00:11 fr0de joined #salt
00:12 Pixionus so I'm getting an [ERROR] Attempt to authenticate with the salt master failed
00:12 Pixionus but the key was deleted from unaccepted keys
00:12 Pixionus on the master
00:12 hemebond Pixionus: Did you re-accept the key?
00:13 otter768 joined #salt
00:13 Pixionus it's not listed in the salt-keys at all\
00:13 hemebond Sounds like you need to generate a new key on the minion.
00:13 hemebond (if that's a thing)
00:13 baweaver joined #salt
00:14 Pixionus ... it's supposedly not stored on the master.  More likely it sounds like it's cached somewhere.
00:14 hemebond http://superuser.com/questions/695917/how-to-make-salt-minion-generate-new-keys
00:15 murrdoc look up the salt-manage runner
00:15 murrdoc might help
00:15 Pixionus nah... Just after I asked I realized the test-master was having some stupid network issues...
00:16 * Pixionus sighs
00:16 Pixionus Pings worked so I figured it was up but someone messed with dns
00:16 hemebond LOL
00:16 Pixionus and master was using dns
00:16 Pixionus sorry minion was pointing to dns
00:17 Pixionus thanks guys
00:17 Pixionus (or gals)
00:17 hemebond np
00:17 MatthewsFace joined #salt
00:18 murrdoc no girls on the internet Pixionus
00:18 murrdoc u should know better
00:18 * Pixionus sighs again.. and those that are are taken :P
00:19 murrdoc well maybe they are
00:19 murrdoc but they are all on tubmler
00:19 murrdoc tumblr
00:19 murrdoc be better than tumblr
00:19 aquassaut joined #salt
00:20 Pixionus why's it so hard to find an unattached intelligent woman that isn't crazy or just otherwise doesn't measure up to my standards?
00:20 Pixionus maybe I need to reevaluate my standards... and you know my methodologies..
00:20 murrdoc there is a salt module for that
00:21 Pixionus nah Ill just blame it on no women on line
00:21 Pixionus oh really?  Digs back into salt
00:21 rhodgin joined #salt
00:21 murrdoc salt 'Pixionus' sys.doc life
00:21 Pixionus it was so much easier in college.  this real world shit is complicated
00:22 Pixionus lol
00:24 Pixionus yeah fuckers need to tell people when they change dns
00:24 murrdoc there it it
00:24 murrdoc is
00:24 murrdoc let it out man
00:24 murrdoc let it out
00:24 murrdoc cant eat your feelings
00:24 murrdoc well u can
00:24 murrdoc but u shouldnt
00:24 Pixionus lol
00:25 Pixionus I'm sitting here "I know the reasons this can happen.  Why is this still happening?"
00:26 Pixionus damn, pings still taking a long time..
00:36 jeffspeff joined #salt
00:44 Singularo joined #salt
00:45 cberndt joined #salt
00:49 XenophonF joined #salt
00:52 primechuck joined #salt
00:55 primechuck joined #salt
01:06 baweaver joined #salt
01:11 _Cyclone_ joined #salt
01:17 MaliutaLap left #salt
01:21 gladiatr joined #salt
01:24 ITChap joined #salt
01:26 Furao joined #salt
01:31 TyrfingMjolnir joined #salt
01:37 _Cyclone_ joined #salt
01:38 zpotoloom joined #salt
01:40 bhosmer_ joined #salt
01:50 _Cyclone_ joined #salt
01:50 bhosmer_ joined #salt
01:52 rideh joined #salt
02:08 thayne joined #salt
02:13 Furao joined #salt
02:13 rideh_ joined #salt
02:13 otter768 joined #salt
02:18 dthorman joined #salt
02:20 bhosmer joined #salt
02:24 iromli joined #salt
02:30 CeBe1 joined #salt
02:33 badon joined #salt
02:38 TyrfingMjolnir joined #salt
02:40 evle joined #salt
02:42 AlexStraunoff joined #salt
02:44 enarciso joined #salt
02:45 Not_ joined #salt
02:45 rojem joined #salt
02:45 favadi joined #salt
02:48 thayne joined #salt
02:50 donmichelangelo joined #salt
02:51 zz_Cidan joined #salt
02:51 Cidan joined #salt
02:52 SeeDickCode joined #salt
02:53 catpig joined #salt
02:54 scbunn joined #salt
03:02 djinni` joined #salt
03:13 JlRd joined #salt
03:14 clintberry joined #salt
03:14 CeBe joined #salt
03:23 fxhp joined #salt
03:25 otter768 joined #salt
03:27 zugzwang My state.highstate is kinda big, so the master returns before the minion ends its execution. Is it normal?
03:27 hemebond zugzwang: It happens, yes.
03:27 hemebond You can query jobs from the master.
03:27 hemebond When the job does return you can see the result.
03:27 zugzwang hemebond, thx. Is there a way to check for the result after?
03:28 ChesFTC Is there any way of setting a longer timeout from the command line?
03:28 hemebond ChesFTC: I believe so.
03:28 hemebond zugzwang: http://docs.saltstack.com/en/latest/topics/jobs/
03:28 hemebond It will have told you the job ID.
03:29 hemebond So you can just use lookup_jid <id> to see the result.
03:29 zugzwang hemebond, thank you very much!
03:32 hemebond ChesFTC: I think the --timeout # argument/parameter can be used to change the timeout for a particular command.
03:32 hemebond Otherwise you can set it in the master config.
03:34 writtenoff joined #salt
03:35 otter768 joined #salt
03:43 freelock joined #salt
03:45 murrdoc joined #salt
03:57 beneggett joined #salt
04:01 markm__ joined #salt
04:08 markm_ joined #salt
04:15 JakTrades joined #salt
04:17 markm_ joined #salt
04:20 bhosmer joined #salt
04:22 rdas joined #salt
04:28 markm__ joined #salt
04:31 thayne joined #salt
04:31 markm_ joined #salt
04:33 edulix joined #salt
04:42 zugzwang How do i read a subgrain with grains.item?
04:42 zugzwang grains.item a.b doesnt work
04:43 murrdoc grains.get a:b
04:43 murrdoc a : b
04:44 zugzwang thx!
04:47 edulix joined #salt
04:51 ajw0100 joined #salt
04:55 fxhp joined #salt
04:57 AB_ joined #salt
04:57 AB_ Hello Everyone. I wanted to know if we can set iptables using SALT on all the minion at once ?
04:59 llua sure
05:02 writtenoff joined #salt
05:03 ageorgop joined #salt
05:07 AB_ Hello Everyone. I wanted to know if we can set iptables using SALT on all the minion at once ?
05:08 ramteid joined #salt
05:18 c10 joined #salt
05:21 joeto joined #salt
05:26 ndrei joined #salt
05:32 stoogenmeyer joined #salt
05:36 malinoff joined #salt
05:39 markm joined #salt
05:43 nesv joined #salt
05:49 blfish joined #salt
05:50 danielcb joined #salt
05:53 favadi joined #salt
05:53 steffo joined #salt
05:57 st_iron joined #salt
05:58 st_iron 'morning
05:58 favadi1 joined #salt
06:01 ThomasJ AB_: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.iptables.html and https://github.com/saltstack-formulas/iptables-formula are relevant
06:02 badon_ joined #salt
06:03 teogop joined #salt
06:04 colttt joined #salt
06:06 ITChap1 joined #salt
06:06 AB_ @Thomas: Thanks mate. I had checked the second link but could get it working. First link is new one and is very flexible. Thanks a ton for that !!
06:10 otter768 joined #salt
06:11 writtenoff joined #salt
06:14 AB_ Ok.Another piece of information required. Is there any C based APIs that anyone has used to automate few tasks for SALT Master
06:17 AndreasLutro joined #salt
06:19 writtenoff joined #salt
06:20 Furao joined #salt
06:21 bhosmer joined #salt
06:24 cetex joined #salt
06:30 ramaseshan joined #salt
06:34 KermitTheFragger joined #salt
06:36 cetex hm, it seems i can't match on grains in top.sls..
06:36 hemebond cetex: You should be able to.
06:36 flyboy joined #salt
06:36 ITChap joined #salt
06:36 cetex in top.sls i have: base:\n  'environment:pxe':\n    - pxe\n    - kernel
06:37 cetex and in minion config i have set the grain: grains:\n  environment: pxe"
06:37 hemebond cetex: Isn't there meant to be something that makes it match on the grain?
06:38 cetex hm, yeah.
06:38 hemebond You need a "- match" parameter
06:38 cetex "- match: grain"
06:39 cetex that actually seems to do it
06:39 cetex i tried it earlier but it didn't work, must have misspelled or something..
06:39 cetex thanks for making me try again ;)
06:40 hemebond welcome :-)
06:40 cetex ;)
06:44 martoss joined #salt
06:46 beneggett joined #salt
06:51 julienlavergne joined #salt
06:52 _JZ_ joined #salt
06:54 nene1 joined #salt
06:54 Auroch joined #salt
07:00 CeBe joined #salt
07:07 CeBe1 joined #salt
07:07 lb1a joined #salt
07:10 dopesong joined #salt
07:11 fbergroth joined #salt
07:11 AndreasLutro joined #salt
07:12 linjan joined #salt
07:14 eseyman joined #salt
07:22 rdas joined #salt
07:24 kawa2014 joined #salt
07:32 nesv joined #salt
07:35 ndrei joined #salt
07:41 rdas joined #salt
07:43 yggdrasi1 joined #salt
07:44 rojem joined #salt
07:48 PI-Lloyd joined #salt
07:50 martoss joined #salt
07:54 dopesong joined #salt
07:57 favadi1 left #salt
07:59 MatthewsFace[SEA joined #salt
08:00 chiui joined #salt
08:02 OnTheRock joined #salt
08:03 losh joined #salt
08:04 stoogenmeyer_ joined #salt
08:06 c10 joined #salt
08:09 c10_ joined #salt
08:10 zugzwang joined #salt
08:11 otter768 joined #salt
08:15 martoss joined #salt
08:17 steffo joined #salt
08:17 mike25de left #salt
08:18 CeBe joined #salt
08:22 bhosmer joined #salt
08:27 steffo joined #salt
08:27 N-Mi__ joined #salt
08:38 N-Mi joined #salt
08:38 N-Mi joined #salt
08:39 rdas joined #salt
08:50 trikke joined #salt
08:52 chiui joined #salt
08:52 RobbieAB|laptop joined #salt
08:53 unixlike joined #salt
08:53 unixlike Hi there !
08:54 RobbieAB|laptop Hi
08:54 unixlike is someone could help me with following construction
08:54 unixlike >>> instances_list=local.cmd('-G','os:openSUSE','cmd.run','hostname')
08:54 unixlike No minions matched the target. No command was sent, no jid was assigned.
08:54 unixlike >>> instances_list=local.cmd('-G os:openSUSE','cmd.run','hostname')
08:54 unixlike No minions matched the target. No command was sent, no jid was assigned.
08:54 unixlike >>>
08:54 unixlike I am trying too run that from python console
08:55 RobbieAB|laptop I would guess none of your nodes have openSUSE as the OS in the grains.
08:55 unixlike nope ) this working fine from bash shell
08:55 unixlike # salt -G 'os:openSUSE'  cmd.run 'hostname'
08:55 unixlike a43d27975b16:
08:55 unixlike a43d27975b16
08:55 unixlike 5d2d8ba617d6:
08:55 unixlike 5d2d8ba617d6
08:57 c10 joined #salt
08:57 Furao joined #salt
09:00 MatthewsFace[SEA joined #salt
09:02 jhauser joined #salt
09:04 jeddi joined #salt
09:13 hemebond unixlike: Do you get matches on generic targets?
09:13 hemebond e.g., *
09:15 unixlike yep, i see that when i run salt '*' grains.items
09:16 hemebond ah
09:16 hemebond One of the parameters is expr_form
09:16 hemebond Which is where you specify grain
09:16 hemebond http://docs.saltstack.com/en/latest/ref/clients/#salt.client.LocalClient.cmd
09:17 hemebond expr_form is the type of target, by default it's glob.
09:18 unixlike Thanks ! I think that i understood what you mean , will try to change expr_form to 'grain'
09:21 nesv joined #salt
09:21 unixlike hemebond: Great ! It works!  Thanks a lot !
09:21 unixlike >>> instances_list=local.cmd('os:openSUSE','cmd.run','hostname',expr_form='grain')
09:21 unixlike >>> instance_list
09:21 unixlike Traceback (most recent call last):
09:21 unixlike File "<stdin>", line 1, in <module>
09:21 unixlike NameError: name 'instance_list' is not defined
09:21 unixlike >>> instances_list
09:21 unixlike {'a43d27975b16': 'ERROR: The shell n is not available', '5d2d8ba617d6': 'ERROR: The shell n is not available'}
09:22 hemebond You're welcome :-)
09:23 hemebond What is hostname?
09:23 hemebond Oh the parameter.
09:23 hemebond try
09:24 hemebond Oh, your command is correct.
09:24 hemebond Try putting "hostname" as ["hostname"]
09:30 babilen (and use spaces after , !)
09:30 unixlike hemebond:  Thanks again !
09:30 unixlike instances_list=local.cmd('os:openSUSE','cmd.run',["ifconfig -a"],expr_form='grain')
09:30 hemebond babilen: I think he might be typing this on the console :-)
09:31 CeBe joined #salt
09:31 mdupont joined #salt
09:35 CeBe1 joined #salt
09:38 favadi joined #salt
09:42 peters-tx joined #salt
09:42 Xevian joined #salt
09:43 markm_ joined #salt
09:49 cberndt joined #salt
09:52 djinni` joined #salt
09:54 trikke joined #salt
10:02 Berty_ joined #salt
10:03 yetAnotherZero joined #salt
10:05 Grokzen joined #salt
10:05 cromark joined #salt
10:12 otter768 joined #salt
10:12 csar Hi!
10:13 csar I know how to restart systemd on a minion via CLI (salt '*' service.systemctl_reload
10:13 csar How would I put that in a state file?
10:14 AndreasLutro csar: module.wait
10:14 AndreasLutro http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
10:14 csar AndreasLutro: thx!
10:15 djinni` joined #salt
10:15 ITChap joined #salt
10:20 kbyrne joined #salt
10:23 bhosmer joined #salt
10:26 giantlock joined #salt
10:29 iwishiwerearobot joined #salt
10:38 CeBe joined #salt
10:46 trikke joined #salt
10:48 MatthewsFace[SEA joined #salt
10:53 elfixit joined #salt
10:54 zooz joined #salt
10:54 cberndt joined #salt
10:57 bhosmer joined #salt
10:59 evle joined #salt
11:00 cberndt joined #salt
11:03 fbettag joined #salt
11:04 jonatas_oliveira joined #salt
11:10 nesv joined #salt
11:16 ruza joined #salt
11:16 steffo joined #salt
11:19 djinni` joined #salt
11:22 yetAnotherZero joined #salt
11:23 slav0nic joined #salt
11:24 agend joined #salt
11:25 amcorreia joined #salt
11:27 viq joined #salt
11:35 elfixit joined #salt
11:38 zooz joined #salt
11:44 asido joined #salt
11:45 dramagods joined #salt
11:50 briner joined #salt
11:52 losh joined #salt
11:55 Nazzy joined #salt
11:57 c10 joined #salt
12:09 gmoro joined #salt
12:13 otter768 joined #salt
12:18 MatthewsFace[SEA joined #salt
12:20 aquassaut joined #salt
12:22 saltuser joined #salt
12:24 bhosmer_ joined #salt
12:25 jhauser joined #salt
12:25 djinni` joined #salt
12:26 steffo joined #salt
12:26 jonatas__ joined #salt
12:34 cberndt joined #salt
12:36 Nazzy *sigh* I hate regressions
12:38 bhosmer joined #salt
12:38 mike25de joined #salt
12:39 Nazzy wow, this bug's been hiding there for a while
12:39 cberndt joined #salt
12:40 MaliutaLap joined #salt
12:40 JayFK joined #salt
12:43 MaliutaLap left #salt
12:44 Furao joined #salt
12:45 pf_moore joined #salt
12:46 djinni` joined #salt
12:50 JlRd joined #salt
12:53 CeBe1 joined #salt
12:55 N-Mi joined #salt
12:58 wplatnick joined #salt
12:58 wplatnick Good morning...is there a way to use pillar data from within a map - ie: https://gist.github.com/WillPlatnick/c31b002f21e045c3901f
12:58 racooper joined #salt
12:59 nesv joined #salt
13:01 dyasny joined #salt
13:04 jonatas_oliveira joined #salt
13:05 steffo joined #salt
13:05 subsignal joined #salt
13:06 AndreasLutro wplatnick: doesn't that code snippet work? looks to me like it should
13:06 jonatas_oliveira joined #salt
13:07 FeatherKing joined #salt
13:09 wplatnick AndreasLutro: no, it doesn't. gist is updated with the error I'm getting
13:10 speedlight joined #salt
13:10 speedlight joined #salt
13:10 AndreasLutro wplatnick: ah, .jinja maps don't render like .sls files
13:10 AndreasLutro in sls you can do "foo {{ bar }} baz" and the `bar` variable will be expanded, not in jinja
13:12 wplatnick hmm
13:14 wplatnick is there a more jinja'y way to do what I'm looking to do?
13:15 AndreasLutro no, you're doing it right, you just need to fix the code
13:15 AndreasLutro data_directory: '/var/lib/postgresql/' ~ postgresql_version ~ '/main',
13:15 AndreasLutro for example
13:15 jenty joined #salt
13:16 jdesilet joined #salt
13:17 jenty i'm new to salt and i don't really understand how i can make a state a requirement for another state. can anyone else or point me to an example?
13:17 jenty can anyone *explain
13:17 stoogenmeyer_ is there any way to get autocomplete for salt cli ?
13:17 stoogenmeyer_ sorry not autocomplete, meant command completion
13:18 JayFK joined #salt
13:19 wplatnick AndreasLutro: thanks!
13:19 viq joined #salt
13:19 jdesilet jenty, I think what you're looking for can be found on this page. http://docs.saltstack.com/en/latest/ref/states/ordering.html . You have your state and then in a second one do a require: - sls: statename
13:19 primechuck joined #salt
13:19 cpowell joined #salt
13:20 Sacro stoogenmeyer_: most shells are open source, should be quite easy to add
13:20 stoogenmeyer_ Sacro: I'm sure it is. Was just wondering if anyone knows something and can recommend
13:20 debian112 joined #salt
13:22 JayFK joined #salt
13:23 premera joined #salt
13:31 toastedpenguin joined #salt
13:32 Illusioneer joined #salt
13:33 cmcmacken joined #salt
13:34 genediazjr joined #salt
13:35 Guest15 joined #salt
13:39 rhodgin joined #salt
13:39 edrocks joined #salt
13:41 Tyrm joined #salt
13:41 CedNantes joined #salt
13:42 c10 joined #salt
13:44 hasues joined #salt
13:44 catpig joined #salt
13:44 hasues left #salt
13:47 andrew_v joined #salt
13:47 GrueMaster joined #salt
13:49 kaptk2 joined #salt
13:49 JDiPierro joined #salt
13:49 iggy stoogenmeyer_: https://github.com/saltstack/salt/blob/develop/pkg/salt.bash ?
13:49 iggy there's one there for zsh completion too if that's your thing
13:50 agend joined #salt
13:52 WesleyTech joined #salt
13:54 CedNantes hello !
13:56 stoogenmeyer_ iggy: thanks iggy
13:58 RobbieAB|laptop joined #salt
13:58 CedNantes in salt-cloud what are you suppose to use to create a VM using a template in vsphere: clonefrom or image ? I've seen  some peoples using "clonefrom" on cloud.profiles files but all i get is "The following exception was thrown by libcloud when trying to run the initial deployment: 'image'"
13:59 CedNantes and KeyError: 'image'
13:59 agend joined #salt
13:59 CedNantes but if i'm using image, "devices" aren't taken into account
14:00 CedNantes if i'm following this : http://docs.saltstack.com/en/latest/topics/cloud/vmware.html#profiles
14:03 murrdoc joined #salt
14:03 djinni` joined #salt
14:06 mapu joined #salt
14:07 MatthewsFace[SEA joined #salt
14:07 VSpike When using salt-cloud to deploy minions, does anyone know where the default /etc/salt/minion comes from?
14:08 mpanetta joined #salt
14:09 cromark_ joined #salt
14:10 StDiluted joined #salt
14:12 manfred VSpike:  it is deployted in the deploy_script function
14:12 manfred one second
14:12 manfred VSpike:  https://github.com/saltstack/salt/blob/develop/salt/utils/cloud.py#L210
14:12 murrdoc VSpike:  read the code , it the one true doc
14:12 murrdoc also what version are u using
14:13 murrdoc manfred's link changes based on the version
14:13 murrdoc s/develop/version
14:13 beneggett joined #salt
14:14 otter768 joined #salt
14:14 manfred VSpike:  https://github.com/saltstack/salt/blob/develop/salt/config.py#L674
14:14 unni joined #salt
14:15 manfred it does, it should be in that place for 2014.7 and 2015.2 though, well, in that file
14:15 manfred DEFAULT_MINION_OPTS = {
14:15 unni Hi, I am trying to automate the adding of minions. I am trying to add them after a vps is provisioned. Please suggest a way to automate this if possible.
14:16 murrdoc is it a secure network
14:16 murrdoc is it a public network
14:17 unni It is a secure network of course.
14:17 murrdoc there is a config u can flip to allow all minions
14:17 ksj joined #salt
14:19 subsigna_ joined #salt
14:19 unni Is that a recommended way?
14:19 manfred no
14:20 manfred but it is the only way to automate adding them
14:20 murrdoc its the easiest option
14:20 murrdoc second option is the reactor
14:20 giantlock joined #salt
14:20 unni How to deal with reactor?
14:20 murrdoc http://docs.saltstack.com/en/latest/topics/reactor/#a-complete-example
14:21 manfred there is a feature request somewhere about this
14:21 manfred to add a one time validation key like chef has
14:21 murrdoc oh  ?
14:22 manfred yeah, it has been open for a while
14:22 manfred looking
14:22 dyasny joined #salt
14:22 murrdoc or u can go crazy
14:23 murrdoc have an external data store that stores all minion keys
14:23 thayne joined #salt
14:23 murrdoc then put vault in front of it
14:23 murrdoc then … goes off the rails
14:24 pdayton joined #salt
14:24 smcquay joined #salt
14:25 TooLmaN joined #salt
14:26 unni I m facing another issue, For eg, I have nodes min1, min2, ....min 10. If I execute salt-run manage.status , some will show down and if I execute same command 2nd time, all nodes are showing up. This happens all the time. What can be the reason?
14:28 Illusioneer joined #salt
14:28 giannello joined #salt
14:29 WesleyTech joined #salt
14:31 pdayton joined #salt
14:31 jhauser joined #salt
14:31 iggy upgrade to 2015.2 (when it's out)
14:32 ek6 iggy: you have that message in cron now dont you
14:32 * murrdoc waits for the followup joke about it being 2015.5 time already
14:32 sandah joined #salt
14:33 manfred 2016.1
14:33 murrdoc the one true version
14:33 murrdoc do we start a pool ?
14:33 murrdoc for when 2015.2 ships
14:33 cedwards So I know there is a 'startup_states:' minion config option, but is there any way to run a module on startup?
14:33 murrdoc docs.saltstack.com/en/latest/topics/reactor/ use that
14:33 ek6 ive still got another month with 2 because I still think it actually stood for second season of 2015
14:33 murrdoc and the startup event
14:34 smcquay joined #salt
14:34 nesv I've just started getting into reactors, and damnit, they're fun
14:35 joehh murrdoc: and then is packaged? :)
14:35 murrdoc nah you are pretty good about it
14:35 murrdoc :D
14:36 conan_the_destro joined #salt
14:36 murrdoc then we start the pool for 2015.2.1
14:37 murrdoc the losers in the pool have to 'upgrade' a formula
14:37 murrdoc winner gets to pick which formula
14:38 bhosmer joined #salt
14:39 markm__ joined #salt
14:42 Kurt_ joined #salt
14:42 Kurt_ hey!
14:42 murrdoc wassup!
14:43 Kurt_ got a question. :)
14:43 murrdoc no way!!1
14:43 murrdoc :)
14:43 murrdoc shoot
14:43 Kurt_ :p im trying to use use the formula https://github.com/bougie/salt-php-formula and the state seems to can't be found on the master
14:43 Kurt_ my /etc/salt/master is
14:44 Kurt_ file_roots:   base:     - /srv/salt/secure     - /srv/salt/base/states  pillar_roots:   base:     - /srv/salt/base/pillar  fileserver_backend:   - roots   - git  gitfs_provider: gitpython  gitfs_remotes: - https://github.com/bougie/salt-phabricator-formula.git
14:44 Kurt_ er sorry. let me get some pastebins
14:44 murrdoc boooo
14:44 murrdoc read the topic
14:44 murrdoc i should have slept more
14:44 murrdoc brb
14:45 aparsons joined #salt
14:45 jalbretsen joined #salt
14:46 Kurt_ http://pastebin.com/6i4ckxc2
14:46 Kurt_ i did read the docs :p
14:46 Kurt_ i went in /var/log/salt, saw it was trying to reference non-installed python-git client
14:47 Kurt_ so changed that and the error no longer appears there
14:47 mirko joined #salt
14:47 rhodgin joined #salt
14:51 Brew joined #salt
14:52 JlRd joined #salt
14:55 RabidCicada joined #salt
14:56 markm_ joined #salt
14:56 c10 joined #salt
14:56 Furao joined #salt
14:57 dendazen joined #salt
14:58 StDiluted joined #salt
14:58 conan_the_destro joined #salt
15:01 windoverwater joined #salt
15:03 Furao joined #salt
15:04 gladiatr joined #salt
15:04 favadi joined #salt
15:06 Illusioneer So the information Salt keeps on it's minions, is this all stored in files like puppet and ansible?
15:06 Kurt_ okay. it turns out i was referencing it in the wrong way.
15:07 Kurt_ @Illusioneer so salt has 2 kinds of info, pillars and grains. grains are meta information about minions (os, kernel, etc.) and pillar is config information. generally pillar is in files, grain is queried live
15:08 rm_jorge joined #salt
15:08 Illusioneer Similar to Facter or Ohai
15:09 Illusioneer the grain part
15:09 clintberry joined #salt
15:09 favadi left #salt
15:10 ageorgop joined #salt
15:11 Auroch joined #salt
15:11 druonysus joined #salt
15:11 druonysus joined #salt
15:16 nzero joined #salt
15:16 scbunn joined #salt
15:20 perfectsine joined #salt
15:22 ndrei joined #salt
15:28 huddy joined #salt
15:29 const joined #salt
15:29 emberkom joined #salt
15:29 mr_const left #salt
15:29 thayne joined #salt
15:30 markm__ joined #salt
15:33 markm_ joined #salt
15:34 mr_const joined #salt
15:35 mr_const Hi, is it possible to create postgres database schema (and populate data) using saltstack?
15:35 mr_const without cmd.run
15:36 iggy mr_const: yes, there are postgres modules and states that can do a lot of the heavy lifting for you
15:36 djaykay left #salt
15:36 nesv mr_const: The postgres_user and postgres_db state modules are pretty awesome
15:37 iggy I will say this however, Salt doesn't excel at long running processes (i.e. loading large amounts of data)
15:37 nesv iggy: Not many configuration management systems do. :(
15:38 Illusioneer joined #salt
15:38 nesv I can't remember what Ansible's default timeout is, but running large DB migrations in the past usually left me in a weird state.
15:38 denys joined #salt
15:38 nesv mr_const: Salt has state modules for managing postgres databases, extensions, groups, schemas, and users.
15:39 mr_const You mean this one? http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.postgres.html
15:41 markm__ joined #salt
15:42 SeeDickCode joined #salt
15:46 emberkom Hey everybody.
15:46 emberkom I feel retarded using IRC. I'm so lost...
15:46 emberkom Anyway, I have a question and further input on issue 10948 (https://github.com/saltstack/salt/issues/10948)
15:46 Micromus joined #salt
15:47 cromark joined #salt
15:47 yetAnotherZero joined #salt
15:48 iggy emberkom: you should comment on the issue
15:48 iggy not many devs actually spend much time here
15:48 emberkom Oh really?
15:48 nesv mr_const: Yes, that's the execution module, but if you are looking to do it from states in an SLS file, look here http://docs.saltstack.com/en/latest/ref/states/all/index.html and search for "postgres_"
15:49 perfectsine joined #salt
15:50 perfectsine joined #salt
15:53 dendazen Where does salt keeps pillars information on minion, does it caches it?
15:54 TyrfingMjolnir joined #salt
15:55 iggy don't think so
15:55 iggy it queries the master every time iirc
15:55 murrdoc caches on master
15:55 rideh joined #salt
15:55 murrdoc unless u run highstate then it doesnt cache
15:55 timoguin joined #salt
16:00 sdm24 joined #salt
16:01 rojem joined #salt
16:02 mr_const Hm...
16:02 mr_const State 'postgres_schema.present' found in SLS u'postgres' is unavailable
16:02 cromark joined #salt
16:02 mr_const however postgres_database.present in the very same file is available
16:02 mr_const and worked as intended
16:06 Brenden joined #salt
16:06 writtenoff joined #salt
16:06 Brenden Good day everyone.  I feel stupid even bringing this question here but I have been unable to find any information on how to do this.
16:07 Brenden How do I point a minion to a new salt master?
16:07 Brenden I'm not doing multi-master
16:07 sdm24 change the master line in the minion config file?
16:07 sdm24 and restart salt-minion
16:07 Brenden no dice, tried that
16:08 sdm24 will that at least disconnect it to the old master?
16:08 XenophonF does pkgrepo support zypper?
16:08 Brenden @sdm24 I would think so
16:09 Brenden @sdm24 I have also yanked the master's public key
16:09 Brenden @sdm24 from the minion of course
16:09 sdm24 after you restart, have you tried running a salt-call command, like salt-call test.ping?
16:10 sdm24 sometimes I have found that you need to do something like that to jump-start the minion to send its key
16:10 c10 joined #salt
16:10 sdm24 also, I don't know if you have already done this, but try setting the master line in the minion config to the fqdn and/or IP of the master
16:11 KyleG joined #salt
16:11 KyleG joined #salt
16:11 Brenden @sdm24, trying the test.ping right now.  I have tried every iteration of the salt master with no luck
16:13 FeatherKing how can i make sure a custom module is pulled by all future minions?
16:13 sdm24 on the minion, try "salt-call test.ping -l debug" and se what the output says
16:14 conan_the_destro joined #salt
16:14 Brenden @sdm24 trying that now. previous message read "Attempt to authenticate with the salt master failed"
16:15 otter768 joined #salt
16:15 iggy make sure you don't have multiple minion processes running
16:16 Brenden [DEBUG   ] Reading configuration from /etc/salt/minion [DEBUG   ] Using cached minion ID from /etc/salt/minion_id: sandbox2.localdomain [DEBUG   ] Configuration file path: /etc/salt/minion [DEBUG   ] Reading configuration from /etc/salt/minion Attempt to authenticate with the salt master failed
16:16 spiette joined #salt
16:16 Brenden only one minion running
16:17 markm joined #salt
16:17 XenophonF with pkg.installed, can i combine the 'names' and 'sources' parameters?
16:17 Brenden I can ping the master just fine (this is just two vm's running on my host). salt-key -L from the master yields nothing
16:19 loz-- joined #salt
16:20 iggy XenophonF: no (don't think so anyway)
16:20 XenophonF thanks
16:20 c10 joined #salt
16:20 ek6 unhappiness spending the last 10 minutes wondering why stupid salt wasnt taking   salt '*' module.run modulename
16:20 ek6 sigh
16:22 iggy ...
16:22 mr_const "state in sls is unavailable" drives me mad
16:22 mr_const removed all requires
16:22 iggy that usually means you don't have some dependency installed
16:23 Grokzen joined #salt
16:23 iggy or you're using a version that doesn't match the docs you're looking at
16:23 mr_const how to guess which one?
16:23 iggy what's the full error message?
16:24 murrdoc joined #salt
16:25 mr_const iggy, [ERROR   ] State 'postgres_schema.present' found in SLS u'postgres' is unavailable
16:25 csar joined #salt
16:25 iggy postgres_schema.present isn't available
16:26 iggy it was added after 2014.7
16:26 iggy and someone didn't add versionadded annotations!
16:26 MatthewsFace[SEA joined #salt
16:27 Matthews_ joined #salt
16:28 wolog_ left #salt
16:28 * mr_const sighs...
16:29 mr_const so it seems cmd.run is for me
16:29 amcorreia joined #salt
16:29 iggy you might be able to get away with copying salt/modules/postgres.py to /srv/salt/_modules and salt/states/postgres_schema.py to /srv/salt/_states
16:31 mr_const Yeah, but I didn't find a way to load data into database anyway
16:31 mr_const even if I'll create a schema, I still need to load data
16:32 ageorgop joined #salt
16:33 thayne joined #salt
16:39 ckao joined #salt
16:39 bhosmer joined #salt
16:40 JDiPierro Any way to activate a python virtualenv from within a salt module?
16:41 murrdoc yes
16:41 murrdoc the virtualenv module/state
16:42 kawa2014 joined #salt
16:45 yaryarrr joined #salt
16:56 julienlavergne joined #salt
16:57 dthorman joined #salt
17:02 scbunn joined #salt
17:03 Illusioneer joined #salt
17:04 jimklo joined #salt
17:08 fyb3r joined #salt
17:11 bemehow joined #salt
17:11 Auroch joined #salt
17:19 stoogenmeyer_ joined #salt
17:21 MTecknology Is it possible to have github send a notification to a salt-master server?
17:22 spookah joined #salt
17:22 ek6 you just talking about a simple web hook?
17:23 theologian joined #salt
17:23 MTecknology good point! that'd work
17:23 Brenden sdm24 found the problem. new salt master had iptables running :-P thanks for your help!
17:25 ndrei joined #salt
17:25 ek6 mtecknology: thats the simple way..security implications of running api/webserver on my master was a bit painful for me
17:25 basepi Ryan_Lane: in reply to https://twitter.com/SquidDLane/status/595424602102374400, no, we deleted all the boto stuff for a couple of days during Microsoft Build. xD
17:25 fbergroth joined #salt
17:26 MTecknology ek6: It'll be pretty simple. I just need to get a ping from github saying the repo was updated and all systems need to run state.highstate.
17:27 MTecknology I'm picturing a simple web app that updates the timestamp on a file that it can write to, fire an event, and next time it makes sure the file hasn't been modified in at least x-minutes.
17:27 ek6 mtecknology: yeah im just overly cautious about adding any application to my masters....its not difficult..
17:27 iggy MTecknology: webhook is the way to go... lock down salt-api access appropriately (github has some docs that list what IPs the webhook pings come from)
17:28 MTecknology awesome :)
17:29 ek6 mtecknology: well the other reason i dont is because what i would want to hook results in about 4 hours of packer builds and occasionally people get commit happy
17:30 MTecknology icky
17:30 iggy we only do anything if the commit is to dev/qa/prod branches... and people (read me and one other guy) do our work on branches that then get merged into those
17:31 MTecknology that's what I do at work
17:31 ek6 iggy: what i would pay to have all my dev's inside choking distance...
17:31 iggy lol
17:32 MTecknology I'm working with <insert big name company/project> to merge some community projects into the organization but keeping community members able to see everything so that anyone can replicate that environment and so that anyone could jump in if the particular governing community members were to go missing.
17:32 iggy yeah, there's only like 4 guys in devops right now and only 2 of us have commit access
17:32 iggy so it's pretty easy to keep things sane at this size
17:32 murrdoc i do it the linux dude way
17:32 clintberry joined #salt
17:32 murrdoc fork and do whatever
17:33 murrdoc send me a pull and i iwll merge
17:33 MTecknology 100% of the sys admins (lotsa devops) have commit access to the salt repos at my company
17:33 ek6 thought there would be 'gin and juice' in there somewhere
17:33 murrdoc MTecknology:  u live on teh wild side
17:33 MTecknology and 100% of them are mucking with production nearly 100% of the time
17:33 MTecknology murrdoc: 1 of 1 is 100% :P
17:34 iggy nobody can commit to anything other than a feature branch (really wish GH had the ability to enforce that... for now it's enforced by "HR")
17:34 martoss joined #salt
17:34 MTecknology My policy is that if I commit something I don't like I'm going to kick my ass. Nobody else to blame.
17:35 tedski i'm having issues with salt-bootstrap v2015.03.15 on debian at the daemons_running() point
17:35 MTecknology I love that fact, though. It used to be that if something broke, I'd have no idea who or how
17:35 VR-Jack2 iggy: can't just have updates done to a different account and pull them in?
17:35 ndrei joined #salt
17:36 tedski nevermind, user error :(
17:36 iggy VR-Jack2: not sure what you mean... but probably not, I enjoy my inflated github activity from work
17:37 VR-Jack2 iggy: figured if you couldn't enforce by branch, then perhaps you could just have them do updates to another repo, and pull them in once approved similar to a lot of GH projects.
17:38 linjan joined #salt
17:38 iggy oh, that's terrible
17:38 iggy git... we've heard of it
17:38 iggy and use it completely wrong
17:39 * VR-Jack2 is still stuck on cvs. lol
17:39 iggy I'm not going to compound git/GH's permissions woes by doing things even more wrong
17:39 VR-Jack2 works okay when it's you, you, and you.
17:39 ek6 its only par iggy...we use salt wrong as well
17:40 ek6 can you include a reactor sls from another reactor sls?
17:40 murrdoc u can call an orchestrate
17:40 iggy heathen
17:40 murrdoc from a reactor
17:40 AbyssOne joined #salt
17:41 ek6 hey..your the one that always thinks i should split my states into smaller pieces  :)
17:41 Jimlad joined #salt
17:41 murrdoc orchestrate from reacrtor
17:41 iggy no way brah, do what works best for you
17:41 VR-Jack2 one file per state!
17:41 VR-Jack2 j/king
17:42 murrdoc actually one file per 'types' of states
17:42 murrdoc all configs in file
17:42 murrdoc all services in an another
17:43 ageorgop joined #salt
17:43 iggy I've broken it up like that before
17:43 VR-Jack2 makes sense, though probably annoying with the includes
17:44 murrdoc isnt
17:44 murrdoc init.sls does all includes
17:44 murrdoc basically its the cleanest way to do this
17:44 VR-Jack2 ahh, so 2 type files, and a glue init
17:44 murrdoc no requires no nothing
17:44 bemehow joined #salt
17:46 murrdoc https://github.com/saltstack-formulas/sysctl-formula for eg
17:47 murrdoc so all u do is include: - sysctl and configure it with pillar
17:47 murrdoc as the lord intended
17:48 VR-Jack2 looks good. can you handle a watch, that way, though? Don't watches require including the other state?
17:48 murrdoc i use listen_in instead of watc
17:48 murrdoc so no reordering and does the same thing as a watch
17:49 VR-Jack2 correct, but you still need the definition state in the other file, don't you?
17:49 murrdoc if u use the init.sls then file can listen_in stuff in package.sls
17:49 murrdoc but if u call files.sls then it wont know to look in package.sls
17:50 murrdoc sorta forces one entry path into a collection of states
17:50 murrdoc this is true
17:50 dingo just driving by, < VR-Jack2> iggy: figured if you couldn't enforce by branch, then perhaps you could just have them do updates to another repo, and pull them in once approved similar to a lot of GH projects.
17:50 VR-Jack2 ahh, so since init is including both, it treats it as one list and knows the defs then
17:50 murrdoc yaarp
17:50 dingo that is indeed the correct way to deal with enforcing access, problem is its too complicated for most mortals
17:51 murrdoc its actually really easy to do dingo
17:51 dingo it is for me, sure
17:51 murrdoc it works for saltstack repo
17:51 bhosmer__ joined #salt
17:51 dingo but i work with people who struggle with the basics, much less multiple upstream remote's
17:51 VR-Jack2 I was thinking single upstream remote to share with devs, then the maintainer just pulls from the one.
17:52 VR-Jack2 slightly easier than each having their own account
17:52 iggy oh, you mean a fork (not an actual different repo that would require manual merging)
17:52 dingo you bet, that's how most foss projects work naturally without a problem
17:52 VR-Jack2 iggy, yeah. sorry.
17:52 VR-Jack2 I'm not a git person. bad on terms. :)
17:52 iggy yeah, we _could_ do that
17:52 kunersdorf joined #salt
17:53 dingo poor iggy will have to put up with whining from at least a few developers for some time, hehe
17:53 iggy but since it's just a couple of us for now... we just handle permissions in meat space
17:53 kunersdorf are nested if statements bad form in salt states?
17:53 iggy kunersdorf: not at all
17:53 dingo i don't think so, kunersdorf, esp. with limitations in jinja, its necessary
17:53 iggy protip: you can indent jinja stuff at different levels which usually makes things easier to read
17:54 VR-Jack2 sometimes it's best to just be simple with jinja and not try and get overly complex. jinja can be finicky.
17:54 VR-Jack2 what I'd do in perl or python in a single line, I might break out into 5 lines with jinja
17:54 kunersdorf ok, I added a if/elif inside a working if statement, now both above and below cmd.runs are "not formed as list"
17:55 VR-Jack2 watch your line breaks
17:55 VR-Jack2 use the {%- or -%} as necessary
17:55 dingo ^ yeah what he says, they're fricken tricky sometimes
17:55 kunersdorf where do I use {%- ?
17:55 iggy kunersdorf: paste code
17:56 murrdoc not in here
17:56 murrdoc use gist
17:56 VR-Jack2 The left one removes the line break on the left of your code, the right one removes the line break after the code
17:56 dingo http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
17:56 dingo i admit this documentation confused me a bit the first three times i read it, kunersdorf, but it introduces the concept
17:56 VR-Jack2 ahh. dingo the docs king
17:57 dingo i may even be wrong in my understanding, still, but {%- jinja command [..] ensures that any leading whitespace (including newline) is rendered away -- does not exist, similarly with [jinja command .] -%} for trailing whitespace & newline
17:57 aparsons_ joined #salt
17:58 VR-Jack2 dingo: that's correct.
17:58 Ryan_Lane basepi: :D
17:58 Ryan_Lane salt should really be pushing the boto_* stuff. it's better than terraform, ansible's cloud support, chef's, etc.
17:58 dingo so if its meant to be part of a list, you would want something like - {% long jinja starts -%}\n{%- and keeps going.. many more \n's then finally ends %}
17:58 VR-Jack2 allows you do start a line, drop down a line, do jina code, drop down another line and add more stuff and have it all compiled into a single line
17:59 kunersdorf https://gist.github.com/anonymous/2364c82892adab3802f7
18:00 dingo i think the leading whitespace of your if/else  states are the problem, they are considered part of 'remove_old_repo_file'
18:00 cpowell I am using the salt localclient in a program of mine and I experiencing a weird issue
18:00 dingo change '#Add repo file' to 'add-repo-file:' might help
18:01 VR-Jack2 yeah. despite how pretty code indention is, you have to indent based on where the yaml should be.
18:01 cpowell I am executing localclient.cmd and expecting it to block until the cmd is completed, but I am finding that its returning while the cmd continues to run on the minions
18:02 cpowell anyone have thoughts?
18:02 desposo joined #salt
18:02 dingo cpowell: i dunno, looking at http://docs.saltstack.com/en/latest/ref/clients/#localclient, you are using it from python code, not 'salt-call' somehow, i gather?
18:03 dingo according to this documentation it most certainly returns the result, which cannot be received until the command is finished
18:03 baweaver joined #salt
18:03 VR-Jack2 cpowell, you might need longer timeouts as well. if a timeout is reached, things move on, even if the command hasn't finished
18:03 kunersdorf ok, I removed leading whitespace and things are peachy, tyvm folks
18:03 VR-Jack2 yw, kunersdorf
18:03 cpowell I have the timeout set to 300 secs
18:04 cpowell i would expect it to block util the call is 100% complete
18:04 VR-Jack2 up to 300 seconds
18:04 cpowell timeout -- Seconds to wait after the last minion returns but before all minions return.
18:05 dingo unfortunately the only thing i could do at this point is review the source code of LocalClient and review it for the possibility of returning without a result.  If it is as straight-forward (reading the pipe of a subprocess until EOF) as I suspect, then you have to consider the possibility of a forking processes that becomes disowned, like a daemon like 'apachectl start' would do...
18:05 scbunn joined #salt
18:05 dingo so it sounds like you might have some work ahead of you, good luck :)
18:06 cpowell ok
18:06 denys joined #salt
18:07 cpowell the result I do receive is the standard, The state is still running onthe minion with JID#######
18:07 cpowell something to that
18:08 dingo ahh, that is indeed more complex than i thought
18:08 dingo maybe trace with -l debug on the minion and see if it has anything interesting to say about it
18:08 ek6 if you give user state.apply access via access control system any way to add glob/list of states available to that user?  or is it always * ?
18:10 VR-Jack2 ek6: from what I've seen you can only restrict modules and not the parameters passed to them
18:10 VR-Jack2 ie, cmd.run... but not cmd.run poweroff
18:11 ek6 yup...whole lot of 'here's a gun, try not remove head.'
18:12 VR-Jack2 you can sorta limit it by using sudo and keeping minion unprivileged, but even then it's just a matter of if they can change the sudo rules or minion config to escalate privileges.
18:12 pannon joined #salt
18:13 ek6 im specifically dealing with eauth for salt-api  so thats not my problem right now...
18:14 VR-Jack2 I think it's the same issue, though. Perhaps I missed something. The permission system definitely should support parameter permissions and not just modules but I couldn't find it.
18:15 sdm24 joined #salt
18:15 ek6 its basically the same issue..no doubt...its just not a matter of a user being able to flip on minion that causes the issue
18:15 otter768 joined #salt
18:15 dingo its a difficult problem, reminds me of rootfilterwrap of openstack or systrace of bsd or selinux
18:16 dingo or sudoers, of course
18:20 VR-Jack2 ideally, we'd do something like
18:20 VR-Jack2 - state.apply:
18:20 iggy kunersdorf: that was wrong, the problem was the leading white space for the stanzas themselves, you can keep the jinja stuff indented
18:20 VR-Jack2 - mystates.*
18:21 kunersdorf correct, changing the jinja idents did nothing
18:22 VR-Jack2 jinja indents only matter if it's outputing text. then the text itself must be at the right indention level. You must interpret what everything will look like in the finished yaml so that it's indented correctly.
18:22 iggy kunersdorf: yaml is very picky about indentation... not so much blank lines inbetween
18:23 VR-Jack2 although I've had lists gripe about blank lines between them where I do small if statements in the middle of a list.
18:23 kunersdorf unfortunately for me, my yaml tester hates jinja
18:23 ek6 VR-Jack2: correct on the state.apply...that some FR somewhere...not saying its urgent but still
18:24 iggy kunersdorf: salt-call -l debug state.sls your.file
18:24 iggy kunersdorf: that'll show you the rendered yaml (assuming it doesn't fail to render)
18:24 VR-Jack2 ek6: did you find the FR? It would definitely improve the versatility of security and multiuser salt.
18:24 kunersdorf that is how I test individual states
18:24 kunersdorf humm, guess I'm missing it in the debug output
18:24 ek6 vr-jack2: worried that badly..that was me asking you if you knew of one id throw my name on
18:25 VR-Jack2 kunersdorf: It's up a little ways. It shows the rendered yaml then follows with processing
18:25 kunersdorf k
18:26 VR-Jack2 ek6: didn't look, sorry. Wasn't that important to me to bother with finding it or creating it.
18:28 VR-Jack2 kunersdorf: sample from one of my debugs. https://gist.github.com/anonymous/95a536982fb51463cffe
18:28 VR-Jack2 no jinja in that one, but it comes out the same
18:29 kunersdorf rgr, ty
18:29 bemehow joined #salt
18:32 yggdrasi1 joined #salt
18:32 Ahlee what do you call the 'stanzas'? like my_thingie: file.managed: - name: /foo.txt
18:33 Ahlee is that a 'state defintion' vs the execution module 'states'?
18:34 XenophonF left #salt
18:35 iggy I usually just call them stanzas
18:35 iggy the execution module to run them is state.single
18:35 iggy singles?
18:36 Illusioneer joined #salt
18:36 Ahlee ok
18:37 Fiber^ joined #salt
18:37 ndrei joined #salt
18:43 rojem joined #salt
18:44 renoirb joined #salt
18:46 Ahlee Now I get to try to clarify execution modules vs state modules to the underlings, which I haven't bothered to care about since passing the ssce and never worrying about hte difference again
18:48 iggy state modules go in sls files, execution modules go on the command line
18:48 VR-Jack2 Pretty sure execution modules can pretty much go everywhere.
18:49 iggy ssshhh
18:49 VR-Jack2 lol
18:49 iggy they don't need to know that
18:49 Ahlee my summary is 'execution modules do the work, state modules are parsed to tell them what work to do"
18:49 Ahlee these arne't people that will ever grasp the subtlties, and are confused by 'file.managed calls the managed method in the file state'
18:50 iggy you could say something about state modules describing the state of a machine (present/absent/managed/etc) vs execution modules saying to do something specific
18:50 murrdoc state modules are configs that execute execution modules
18:50 iggy or something
18:50 VR-Jack2 I like, "state modules define a state while execution modules perform a task".
18:50 Ahlee iggy: lol
18:50 Gareth ahoy hoy.
18:51 Ahlee hey there Gareth
18:51 Gareth Ahlee: hey, hows it going?
18:52 Ahlee Well enough. You?
18:52 Gareth Not too bad :)
18:53 esharpmajor joined #salt
18:53 cetex left #salt
18:54 dendazen I have this in top.sls for pillar http://pastebin.com/4S1DdyDB and hostname demo1.sec1.veliosystems.com. Why i only see pillar for prod_hosts to be satisfied?
18:55 dendazen if i remove and not E@^(bm|dev|lab|qa|uat|nextgen)\d*': from app_hosts
18:55 dendazen i see app_hosts pillar as well satisfied.
18:55 VR-Jack2 Later we'll have iggy modules. They don't exactly define states or perform tasks, but they do something... we think
18:55 * VR-Jack2 runs and hides
18:55 dendazen how demo1.sec1 can fall under E@^(bm|dev|lab|qa|uat|nextgen)\d*’?
18:56 dyasny joined #salt
18:57 iggy VR-Jack2: and they're kind of an asshole sometimes
18:57 Ahlee But a good source of entropy.
18:57 * Ahlee disappears for a few weeks again
18:58 murrdoc where is the meetup smarty pants Ahlee
18:59 VR-Jack2 dendazen: then I would guess your host is in the qa environment.
19:01 dendazen velio.environment reports
19:01 dendazen ‘production'
19:01 VR-Jack2 bleh. never mind. knew I should have memorized those lists
19:02 soren_ joined #salt
19:03 timoguin joined #salt
19:03 soren_ joined #salt
19:03 Illusioneer joined #salt
19:07 nergdron joined #salt
19:12 hybridpollo joined #salt
19:12 ndrei joined #salt
19:15 VR-Jack2 dendazen: did you try dropping the \d*? Given the context, it doesn't actually do anything
19:15 nergdron quick q: what's the design pattern to push out the required salt config changes to file_roots for formulas you want included in every host? How do you avoid salt breaking on missing formulas before the config change has been made?
19:17 baumaeam_ joined #salt
19:17 dendazen yeah i did.
19:18 baumaeam_ Hi friends. I've been seeing an odd issue where salt-minions will be slow to respond when I issue a command from my master. For instance, if I issue "salt web-server-* test.ping", maybe three of the five will respond. Then if I issue "salt web-server-n test.ping", the individual server may not respond at all until I issue the command 3 or 4 times. Is this expected behavior?
19:18 joeto1 joined #salt
19:21 iggy baumaeam_: not expected, no, but common
19:21 iggy baumaeam_: mostly (entirely?) fixed in 2015.2
19:22 baumaeam_ iggy: That's good news! Next few week for 2015.2 release?
19:22 VR-Jack2 hahaha. lololol
19:22 iggy ^
19:23 iggy nobody really knows, I've heard "soon"
19:23 iggy for the past couple months
19:23 baumaeam_ Joy.
19:23 VR-Jack2 what's causing it? issues with minion busy with a state so refusing to respond to command?
19:26 VR-Jack2 nergdron: I'd guess you need to update the config and restart the minion before applying the formula that required the update. just guessing, though.
19:26 dendazen interesting thing is that if i switch to local minion and run that state from the disk
19:27 dendazen I get that app_host condition satisfied.
19:27 dendazen When i run state from master salt host
19:27 dendazen it doesn’t see that pillar
19:27 iggy VR-Jack2: there's a bug in older versions that meant keepalives weren't turned on for one of the connections
19:27 iggy I suspect that is the cause of most people's problems
19:27 dendazen but both local and master have same files
19:27 iggy baumaeam_: what's your network look like?
19:27 VR-Jack2 ahh, yeah. that would get nasty
19:28 VR-Jack2 even my centos host firewall would eventually time out the state
19:28 iggy yeah, and most cloud providers route everything (even if it actually looks like a flat network)
19:29 baumaeam_ iggy: Simple. /24s everywhere. Firewall in between Salt and the target subnets, but the issue occurred before install of that firewall.
19:29 baumaeam_ No weird MPLS or anything like that.
19:30 baumaeam_ GigE everywhere.
19:30 iggy baumaeam_: before, your master was in the subnet with the minions?
19:31 baumaeam_ No, it was still in a different subnet. However the firewall between the two subnets was not a Layer 7 firewall.
19:31 baumaeam_ We added a Palo Alto which has been.... interesting to say the least.
19:31 iggy so it was still routed before
19:31 baumaeam_ Correct.
19:31 iggy so I'm still leaning toward this is the issue you're seeing
19:32 baumaeam_ I bet you're right. It makes sense given that the minions start responding after 3 or 4 pokes.
19:32 iggy https://github.com/saltstack/salt/pulls?utf8=%E2%9C%93&amp;q=is%3Apr+author%3Acachedout+is%3Aclosed+keepalive
19:32 baumaeam_ Probably takes that long for the agent to "spin up" again anyways.
19:32 iggy might be able to apply it to your version if you're feeling froggy
19:33 iggy so yeah, the option was set going one way, but not the other
19:33 VR-Jack2 are you losing arp? are the minions passive or active?
19:33 ndrei joined #salt
19:33 iggy so the master could still send things to the minion, but the minion couldn't reply back (or something like that)
19:35 nergdron VR-Jack2: yeah, I guess my problem is a little chicken/egg-y. I'm trying to update the config using salt, which also has the state which depends on the config. So I need a way to check in the state template whether or not that config has been applied or not, I guess, so I can force the order of execution.
19:36 VR-Jack2 nergdron: orchestrate is your friend for deployment of something prior to state
19:36 baumaeam_ I might try patching a minion or two, see if it fixes the issue. OTOH this isn't a showstopper for me, so maybe I'll just wait til 2015.2. Depends how bored I get :)
19:38 nergdron VR-Jack2: I'm pretty unclear on how that's supposed to work, at least from the docs. is there an example of a highstate run doing orchestration before state application?
19:38 murrdoc no
19:39 murrdoc its teh other way
19:39 VR-Jack2 orchestrate is completely different than highstate run. It runs from master and is processed from the master, so you can maintain order
19:39 murrdoc you setup an orchestrate to run states, then run highstate
19:39 nergdron We're not doing master, we're doing local execution on every aws node we spin up. so yeah... I guess that's why I'm having issues.
19:40 VR-Jack2 Well, you could just run the state.sls to configure minion, then jump to highstate.
19:40 murrdoc u can always write a state and execute state.highstate within it
19:40 murrdoc using module.run
19:40 murrdoc u can
19:41 murrdoc i dont know if u should
19:41 nergdron yeah... just execute the salt minion state first before doing highstate. I imagine that'd work fine.
19:42 VR-Jack2 it's the local equiv of what I do with orchestrate
19:43 UtahDave joined #salt
19:43 UtahDave Ryan_Lane: Hey, check this out:  https://github.com/saltstack/salt/pull/23386
19:44 VR-Jack2 I've never tried to see if orchestrate will run masterless. I doubt it, though.
19:46 nzero joined #salt
19:46 murrdoc great, fire_event does the same as using a listen_in to call a state to fire an event ?
19:46 nergdron VR-Jack2: Yeah, running state.sls salt first works like a charm. Thanks!
19:47 ek6 @utahdave: thats pretty slick...can already think of way to abuse that
19:49 lionel joined #salt
19:49 UtahDave Yeah, it's a shortcut syntax to send an event without having to do a requisite and the extra lines of yaml to make that happen
19:50 UtahDave I'm definitely open to suggestions and improvements on it, if anyone has any ideas.
19:50 ek6 its a readability win for me which ill always gladly take
19:50 VR-Jack2 nergdron: cool. I avoided masterless as it almost seems you have to do git backends to make it worthwhile
19:51 UtahDave yeah, that's why I wrote it. I was sick of writing 8 lines of code when it could be one
19:52 theologian joined #salt
19:52 VR-Jack2 So it's an event.send w/ listen_in shortcut?
19:54 murrdoc i like it
19:54 VR-Jack2 ahh, not listen_in. Fires immediately
19:54 murrdoc does it have mod_watch support UtahDave
19:55 murrdoc cos that would be nice, i have the salt run to finish before reactor steps in
19:56 VR-Jack2 I think the idea was to get state fires instead of having to wait for the job completion fires
19:58 bastion1704 joined #salt
19:58 VR-Jack2 but given that job completion events are annoying to process, support for delayed state events would be nice as well. I think that's what you want, murrdoc?
19:58 Tyrm joined #salt
19:59 murrdoc yes
19:59 armguy is there a reason why out = __salt__['cmd.run'](cmd, python_shell=True).split(':') fails on salt-call 2014.1.13 (Hydrogen) but works on salt-call 2014.7.5 (Helium)
19:59 murrdoc i like listen_in cause it basically tables all restarts to end of highstate run
20:01 VR-Jack2 True, and I could see both types of event times being useful in reactor.
20:02 UtahDave murrdoc: Yeah, listen_in is awesome for making things happen at the end of the highstate run
20:02 VR-Jack2 UtahDave: how hard would it be to support that extra option with fire_event?
20:02 jdputsch_ joined #salt
20:02 UtahDave The use case I had in mind for fire_event was listening on the event bus during long highstates  and being able to monitor the progress and results while everything is still ongoing
20:02 bemehow joined #salt
20:03 murrdoc ok UtahDave that works
20:03 murrdoc maybe it should be fire_event: - now: event.name  ?
20:03 murrdoc or something
20:03 murrdoc wasnt clear
20:04 VR-Jack2 Will also be good when you need reactor to process results of a specific state and do something
20:04 bemehow_ joined #salt
20:04 UtahDave I'll have to think of an elegant way to have it behave like a listen_in.
20:05 VR-Jack2 but when you do something might be good immediately or after job completion.
20:05 murrdoc well or have an option to make it fire now or fire end of run
20:05 murrdoc still i like the feature :)
20:05 murrdoc feature creep is normal when u introduce something new
20:06 VR-Jack2 yep. great feature. It also supports more than what you can do without it, since it has the state return data
20:06 UtahDave Yeah, that's for sure! I think it wouldn't be too hard to add these in.
20:07 bastion1704 how can we escape caracter inside a cmd.run ? I am having a hard time with a curl command
20:07 c10 joined #salt
20:08 VR-Jack2 if the problem is with the url, I'd use url escaping
20:08 murrdoc dont curl ?
20:08 murrdoc use cp.get_url
20:09 armguy is there a reason why out = __salt__['cmd.run'](cmd, python_shell=True).split(':') fails on salt-call 2014.1.13 (Hydrogen) but works on salt-call 2014.7.5 (Helium)? Tried setting up my first grain and all systems that were older than 2014.7.5 seem to have issues with how I did the out
20:10 spootly joined #salt
20:10 bastion1704 murrdoc tx I will try. I want to publish to hipchat and cannot wait for 2015.2.0 anymoe
20:10 murrdoc cp.get_url is in 2014.7
20:11 bluenemo joined #salt
20:11 murrdoc also there is a stae and a returner for hipchat
20:11 murrdoc so u can probably reuse some of the existing code to post to hipchat
20:11 bastion1704 murrdoc I think it is for 2015.2
20:12 murrdoc ah …. well that stinks … put it in _modules and _states ?
20:12 murrdoc remove it when u upgrade
20:13 llua hey, are all of the minion target options for salt(1) mutex?
20:14 llua salt -G ... -L ... test.ping will error, etc?
20:15 baweaver joined #salt
20:15 sdm24 joined #salt
20:16 bhosmer__ joined #salt
20:16 otter768 joined #salt
20:23 nzero joined #salt
20:26 babilen joined #salt
20:27 JoeJulian I'm trying to add tests for an existing module. One of the module functions returns a dict with objects. I don't want to assertEqual that portion of the dict, but I'd like to compare the rest of it. Any suggestions on how to do that?
20:31 martoss joined #salt
20:32 scbunn joined #salt
20:35 ntropy llua: probably, if you want to use more that one of -G or -L etc, you can do a compound match with -C
20:36 cberndt joined #salt
20:39 Guest15 joined #salt
20:40 thayne joined #salt
20:40 crd joined #salt
20:40 Pixionus joined #salt
20:41 joren joined #salt
20:41 ntropy how can i pass a multiline string via context in file.managed?
20:42 ntropy i've tried to pass it just like any other variable, eg "pubkey: {{ pubkey }}", or using a pipe and value with extra indent on a new line, both fail to render
20:42 ntropy https://gist.github.com/anonymous/2459844870d75b60ebae
20:43 dendazen If i use for pillars external git repo besides changing it ext_pillar on master config should i have to configure anything on minion side?
20:44 ntropy dendazen: no, that will be invisible to your minions
20:45 crane_ joined #salt
20:46 mfournier joined #salt
20:46 Ryan_Lane UtahDave: that's awesome
20:46 scbunn joined #salt
20:46 hemebond joined #salt
20:47 dendazen interesting, why would then same pillars on master hosted via git and pillars hosted locally but with the same top.sls give different results, once run locally or via salt master
20:48 dendazen i md5ed all the files in pillar repo and locally in /srv/pillar and they are the same
20:48 JayFK joined #salt
20:49 ntropy maybe you need to run saltutil.sync_all ?
20:49 ponpanderer joined #salt
20:49 ponpanderer hello
20:49 ntropy hai
20:49 MatthewsFace[SEA joined #salt
20:50 catpig joined #salt
20:52 ponpanderer i'm noticing 'salt-call saltutil.find_job' on a minion does not work on Windows, only Linux. Is that a known issue? The expected result is the job info. On Linux minions this works. On Windows 2012 R2 the output is just "local:" and nothing about the job
20:57 ntropy ponpanderer: did you check if you have any jobs stored under $cachedir/jobs?
20:57 ntropy (don't know where cachedir is on windows)
20:57 ntropy this will be on the master
20:58 VR-Jack2 I use saltutil.refresh_pillar over sync_all. I'm not sure sync_all does the pillar.
21:02 murrdoc sync_all doesnt
21:03 VR-Jack2 cool. good to have verification. Figured it only did the sync_ types
21:03 ntropy dendazen: there you go, try saltutil.refresh_pillar
21:08 dendazen After i ran it i got this
21:08 dendazen salt-call saltutil.refresh_pillar
21:08 dendazen local:
21:08 dendazen True
21:09 dendazen does it look feasible?
21:09 VR-Jack2 yeah, you only get True results when you do a refresh
21:10 dendazen nah did not help, something is not right.
21:11 nergdron left #salt
21:12 VR-Jack2 dendazen: so you tested on a master somewhere else and then you tested it on your local install?
21:13 VR-Jack2 masters ignore top restrictions if you are just asking for local data, vs asking for the view of a minion
21:13 dendazen I have demo1 hosts, on that host i have 2 setups master salt and local
21:13 linjan joined #salt
21:13 dendazen i use local to test my states
21:14 VR-Jack2 well, a master isn't a minion, so it's local view of pillar is complete. a masterless minion is still a minion, though, and follows restrictions
21:15 VR-Jack2 I'm hypothesizing here, but it would make sense as to why you see different views
21:15 llua ntropy: thanks. https://github.com/saltstack/salt/pull/23392
21:18 ntropy hey thanks, i didn't know there was completion for zsh
21:20 wt joined #salt
21:27 baweaver joined #salt
21:34 baweaver joined #salt
21:35 lumtnman joined #salt
21:35 rhodgin joined #salt
21:36 lumtnman joined #salt
21:38 drw_ joined #salt
21:39 lumtnman Hey all - I am curious what folks are using for their workflow as it relates to gitfs -> github, and being able to target dev and prod separately
21:40 lumtnman are you storing the top file locally or in the repo etc
21:40 timoguin joined #salt
21:41 iggy lumtnman: I think a common thing to do is have a separate repo for your top file (because top file merging is a young mans game)
21:41 subsignal joined #salt
21:41 lumtnman @iggy haha that makes sense
21:42 lumtnman store that either in a separate repo or on the salt master locally as a 'roots' target I believe its called?
21:43 ntropy iggy: but then you need to commit to several repos if, eg, you write a new state, thats annoying no?
21:43 iggy you more than likely already have to do 2 (states, pillars)
21:43 iggy what's one more?
21:44 ntropy if the new state is included in a old one :)
21:45 murrdoc on call with salt
21:45 murrdoc gonna ask em 'so whens 2015.2
21:45 murrdoc and why is 2015.5 now'
21:45 murrdoc :D
21:45 lumtnman Ya thats fair - yep we are somewhat in the beginning stages of getting our implementation off the ground and just interested in trying to dig up tips on what folks have had success with workflow wise
21:46 ntropy why is it that my pillar with value 'yes' still renders as True in the template?
21:46 ntropy i thought quotes are supposed to take care of it
21:46 ntropy http://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#true-false-yes-no-on-off
21:48 writtenoff joined #salt
21:48 iggy ntropy: how are you passing it? paste code
21:55 ntropy https://gist.github.com/anonymous/1e6d5add86bebce4420d
21:55 badon joined #salt
21:57 iggy ntropy: in your macro, try (context section) 'enabled: "{{ enabled }}"'
22:00 ntropy ha, perfect, that works
22:00 ntropy thanks!
22:04 adelcast joined #salt
22:11 amcorreia joined #salt
22:13 giantlock joined #salt
22:17 otter768 joined #salt
22:25 spookah joined #salt
22:26 Ph-x joined #salt
22:26 ramishra_ joined #salt
22:27 Not_ joined #salt
22:28 canci_ joined #salt
22:28 bbhoss_ joined #salt
22:28 akitada_ joined #salt
22:28 awerner_ joined #salt
22:29 photex- joined #salt
22:29 zemm_ joined #salt
22:29 TomJepp_ joined #salt
22:29 paolo_ joined #salt
22:29 darvon_ joined #salt
22:29 sinenitore joined #salt
22:29 Hazelesque joined #salt
22:29 Hazelesque joined #salt
22:30 Nazzy joined #salt
22:30 Rockj joined #salt
22:30 armguy joined #salt
22:30 conan_the_destro joined #salt
22:31 gyre007 joined #salt
22:33 cberndt joined #salt
22:33 JonGretar joined #salt
22:34 baweaver joined #salt
22:38 druonysuse joined #salt
22:38 druonysuse joined #salt
22:40 nzero_ joined #salt
22:40 cromark joined #salt
22:43 baweaver joined #salt
22:43 nikogonzo hihi, if I wanted to do something like this in a statefile: {% if foo %} {% set bar = 'baz' %} {% else %} {% set bar = '' %} <- how could I do it without the jinja templater rendering '' to None ?
22:44 hemebond nikogonzo: Is the variable actually being set to None? Is that was is output?
22:45 Zachary_DuBois joined #salt
22:46 cberndt joined #salt
22:47 mdupont joined #salt
22:47 Brew {% set bar = 'baz' if foo else 'None' %}
22:48 Brew ahh… n/m you are trying to avoid None
22:48 sunkist joined #salt
22:48 sunkist1 joined #salt
22:49 VR-Jack2 convert to unicode, I guess. lol
22:50 yetAnotherZero joined #salt
22:50 Brew you could always check if its none before printing the output.  {{ bar if bar != None }}
22:51 jerematic joined #salt
22:51 MindDrive I'm feeling a bit sheepish, someone here had pointed me towards some small example reactor/events configuration to have minions synchronize with a module file change on the Salt server (instead of needing to do a 'saltutil.sync_modules' every time the module was updated on the server), and I let the paste expire before I could snag the code...
22:52 jeremati_ joined #salt
22:53 `backtick` joined #salt
22:55 Singularo joined #salt
22:55 VR-Jack2 MindDrive: you mean like the last example at the bottom of thise page? http://docs.saltstack.com/en/latest/topics/reactor/index.html
22:56 druonysuse joined #salt
22:57 VR-Jack2 that one syncs grains (but could do modules or sync_all) when a minion first starts via reactor. This allows syncing things prior to initial highstate
22:58 mosen joined #salt
22:59 clintberry joined #salt
23:00 MindDrive VR-Jack2: that works great when a minion start/restart occurs, but I want to say that I think the configuration given to me would have allowed the minions to poll for changes without needing to restart... of course, the person may have misunderstood my original request and I could just be horribly misremembering as well!
23:01 VR-Jack2 MindDrive: not sure. There's plenty of events you could use becides start to fire off a sync
23:02 bemehow joined #salt
23:02 MindDrive VR-Jack2: It's okay... it's my own damn fault for not copying the info the person gave me right away. :)
23:03 VR-Jack2 http://docs.saltstack.com/en/latest/topics/event/master_events.html#event-master-events
23:03 jmstrupp joined #salt
23:03 VR-Jack2 find yourself a good event, or you could event just send a custom event from an sls. The original page is how reactor handles the event
23:17 MindDrive The auth one actually probably would work just fine.
23:17 MindDrive Thanks for the leads, VR-Jack2.
23:17 Not_ joined #salt
23:18 VR-Jack2 auth triggers a LOT. almost everything minion does creates an auth event
23:19 agend joined #salt
23:19 VR-Jack2 MindDrive: presence and the minion setting for it is probably better if you want just a periodic check. You could do it in highstate, but you might have race conditions. ie, module might not update until next highstate
23:19 bemehow joined #salt
23:19 nzero joined #salt
23:25 MindDrive VR-Jack2: Heh, right now Salt isn't being used for much, so auth actually wouldn't be that bad, though yeah, once it starts getting used more... I'll take a look at the presence one.
23:38 ponpanderer Anyone know of a good way to kill a running script from cmd.script on a windows minion? Seems as though the pid for all processes on windows salt-minion is the process itself
23:39 murrdoc kill the job
23:39 murrdoc look up the salt runner for jobs
23:39 murrdoc list the job
23:39 murrdoc and kill by jid
23:40 ponpanderer salt-util.kill_job doesn't work on windows from what I saw (https://github.com/saltstack/salt/issues/23303). i confirmed on the master a salt 'target' saltutil.kill_job results in the exception noted in the issue
23:41 VR-Jack2 restart minion
23:41 murrdoc hah
23:41 murrdoc that wont do it
23:42 murrdoc saltutil.kill_job != salt-job kill
23:42 murrdoc except i am an idiot
23:42 murrdoc ignore me
23:42 ponpanderer hehe :)
23:42 murrdoc turns out salt-run doesnt have kill job
23:42 murrdoc even tho it should
23:43 murrdoc stop the minion
23:43 murrdoc kill the job
23:45 ponpanderer so far the only solution i can see is to actuall kill the salt-minion process tree to kill a specific script from cmd.script....but of course this is as graceful as a bull in a china shop and will kill everything with it
23:45 ponpanderer otherwise i have 1 or more cmd.exe processes i know is a salt job and i play russian roulette :P
23:45 murrdoc restart the computer
23:45 murrdoc its the windows way
23:45 ponpanderer that'll do it too!
23:46 VR-Jack2 put a *nix dvd in. ;)
23:46 murrdoc https://github.com/saltstack/salt/commit/58a1afc83264ed10f8f7d4c32bf3db590f42b4aa
23:46 murrdoc yes gonna throw exception here
23:46 murrdoc update calling code ?
23:46 murrdoc nah no need for that
23:46 murrdoc fuck it ship it
23:46 zz_ashmckenzie joined #salt
23:52 __number5__ basepi: I'm totally agreed with you on the name of "Beryllium" :)
23:53 druonysuse joined #salt
23:53 murrdoc __number5__:  have u used vault yet
23:54 __number5__ murrdoc: nope, I'm going to but too many stuff on my plate right now
23:55 murrdoc k, saw you in the user list on the chatroom so i ax'ed about it
23:55 iggy that's my excuse, you can't use that one
23:55 basepi Hehe
23:56 __number5__ murrdoc: that's the first move of 'I need to figure out this vault thing'
23:57 VR-Jack2 what's a vault and do I care?
23:57 VR-Jack2 :)
23:57 bemehow joined #salt
23:59 aurynn it's a hashicorp product for handling secured secrets, and maybe

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