Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-05-23

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

All times shown according to UTC.

Time Nick Message
00:06 rem5 joined #salt
00:09 ageorgop joined #salt
00:14 sjmh joined #salt
00:17 zmalone joined #salt
00:18 edrocks joined #salt
00:21 sjorge joined #salt
00:24 clay_castiron joined #salt
00:24 clay_castiron brand new to salt! can't wait to expand my knowledge
00:25 clay_castiron left #salt
00:32 GreatSnoopy joined #salt
00:34 quasiben joined #salt
00:46 amcorreia joined #salt
00:54 flowstate joined #salt
01:07 iggy hexa-: start the minion in the foreground with -l debug
01:08 iggy and/or check the vagrant and salt issue trackers for similar issues
01:08 iggy and make sure you're using the latest versions
01:16 hexa- iggy: -l debug doesn't show the error :)
01:17 hexa- its weird
01:18 aqua^c joined #salt
01:18 subsignal joined #salt
01:18 tracphil joined #salt
01:19 hrumph how would i get salt to set a certain grain on start up?
01:19 hrumph i'd like to change the source code so it always happens no matter what's in the config file too
01:19 subsignal joined #salt
01:21 rem5 joined #salt
01:28 Vaelatern joined #salt
01:29 iceyao joined #salt
01:31 edrocks joined #salt
01:46 beardedeagle joined #salt
01:46 k_sze[work] joined #salt
01:49 quasiben joined #salt
01:55 catpigger joined #salt
01:55 flowstate joined #salt
02:02 iceyao joined #salt
02:02 cyborg-one joined #salt
02:03 iceyao_ joined #salt
02:06 zzzirk joined #salt
02:11 XenophonF hrumph: if you don't want to set a grain in the minon config, you could set a custom grain
02:12 XenophonF hrumph: https://docs.saltstack.com/en/latest/topics/targeting/grains.html
02:12 XenophonF hrumph: i've written my own grains for use with windows
02:13 XenophonF hrumph: https://github.com/irtnog/active-directory-formula/blob/master/_grains/windows_installation_type.py
02:19 racooper joined #salt
02:21 edrocks_ joined #salt
02:33 favadi joined #salt
02:34 GreatSnoopy joined #salt
02:41 felskrone joined #salt
02:49 hrumph XenophonF,  yo was afk
02:49 hrumph XenophonF, reading now
02:49 hrumph XenophonF, i don't think i'm supposed to be writing a custom grain in this instance
02:50 hrumph XenophonF, from a pm (hope i'm not revelaing anything I'm not supposed to) <jfindlay> that way, the knowledge that the system needs a reboot lives outside of a particular state run and is closer to the system, where that information ought to be
02:51 hrumph XenophonF, so i can call grains.set or what have you in a module and that sets the grain and writes to the file but at some point salt has to reset the grain. i was thinknig maybe a good time for that would be a start up
02:51 hrumph XenophonF, but that's not necessarily the best time. It's just something i'm pondering
02:53 oida joined #salt
02:55 flowstate joined #salt
02:58 estahn joined #salt
03:15 ageorgop joined #salt
03:19 quasiben joined #salt
03:19 zenlot joined #salt
03:20 majikman joined #salt
03:21 brianfeister joined #salt
03:32 hasues joined #salt
03:33 sjmh joined #salt
03:35 dober joined #salt
03:35 dober joined #salt
03:50 zmalone joined #salt
03:50 hasues left #salt
03:53 flowstate joined #salt
04:01 favadi joined #salt
04:02 aarontc joined #salt
04:04 estahn joined #salt
04:10 keimlink joined #salt
04:23 edrocks joined #salt
04:38 Ayo joined #salt
04:40 jxm_ joined #salt
04:41 lompik joined #salt
04:43 XenophonF interesting idea, hrumph
04:43 favadi joined #salt
04:43 hrumph XenophonF, can we discuss this for a bit?
04:43 XenophonF on windows at least it might be possible to detect when a reboot is needed
04:44 XenophonF iirc there's a pending file rename registry key
04:44 hrumph XenophonF, yep and the devels have already done it
04:44 hrumph XenophonF, i didn't even know it was in a the development branch a month ago
04:44 XenophonF really?
04:44 hrumph yes
04:44 XenophonF that's awesome
04:44 hrumph XenophonF, there's one final thing or two though
04:44 XenophonF ok
04:45 hrumph for a 3010 exit code it needs to be remembered through a state run so you can decide to reboot or whatever in a final housekeeping state
04:45 hrumph for that jfindlay recommended setting a grain
04:46 hrumph XenophonF, i would call the grain something like "reboot-code-witnessed"
04:46 XenophonF i'm with you so far
04:46 hrumph XenophonF, when would you recommend resetting the grain?
04:47 hrumph XenophonF, i could be reset when the minion starts (and i don't know how to do that I confess)
04:48 hrumph it could be reset when system.reboot is called
04:48 XenophonF i think this addresses the "how" - https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html
04:48 XenophonF as far as the when, prior to reboot might not be the right time
04:49 XenophonF it might be problematic to add a bunch of side effects to a reboot
04:49 hrumph XenophonF, yes because the reboot might not happen
04:49 XenophonF i mean logically that's when stuff's supposed to _stop_ happening, not start happening
04:50 hrumph XenophonF, i see how to set the grain in a module function, but i have no idea how to reset it when the minion starts
04:50 XenophonF so then the question is, how do you tell apart the cases when (a) the minion restarts and (b) when the minion starts after a reboot
04:50 hrumph XenophonF, i wouldn't know how to do that in a million years
04:51 XenophonF hang on let me look at the technet docs for the windows service control manager
04:53 hrumph XenophonF, would it be easier just to use a special home-made registry key?
04:53 XenophonF well, one moderately ugly way to identify condition (b) is to look for a computer startup event in the logs
04:54 XenophonF if there are no salt-minion service start events logged between "now" and the most recent computer startup event...
04:55 flowstate joined #salt
04:56 XenophonF even better would be if the SCM tracked how many times a service has started since boot time
04:56 XenophonF i think setting a registry key just moves the problem
04:56 hrumph XenophonF, it may move the problem to a space where it's more easily solved
04:56 hrumph since it's no longer a salt problem
04:57 hrumph XenophonF, i just have to make sure that it gets cleared on reboot
04:57 hrumph (somehow)
05:00 hrumph XenophonF, yeah i think that may be the best. i can set up windows task scheduler to clear it on reboot
05:02 ivanjaros joined #salt
05:05 XenophonF looks like it's possible to detect a shutdown pretty easily
05:05 hrumph XenophonF, so i should be using a reactor or something?
05:05 XenophonF but not startup
05:06 XenophonF no i don't think reactor would be appropriate
05:06 XenophonF that'd require network communications
05:06 hrumph XenophonF, i agree
05:06 XenophonF best you could do would be to clear a flag at shutdown time
05:07 hrumph XenophonF, can you give me some more details about what you mean by that?
05:07 XenophonF somehow that event would need to be propagated from nssm.exe to your custom code
05:07 rdas joined #salt
05:07 XenophonF well, this is the .NET way
05:07 XenophonF http://stackoverflow.com/questions/5202119/detect-shutdown-in-window-service
05:08 XenophonF unfortunately, salt-minion uses a wrapper called nssm.exe
05:08 XenophonF so nssm.exe will receive the event from the O/S stating that the computer is shutting down
05:08 XenophonF not sure how/if it gets propagated to the salt-minion Python process
05:09 XenophonF or how your code would get triggered to clear that grain
05:09 hrumph this relies on the minion being alive
05:10 hrumph if you think that we should worry about distinguishiong between a reboot and a minion starting then you've got a fair point
05:10 hrumph but if it's important to distinguish then the responsibility should be taken away from the salt minion
05:10 brianfeister joined #salt
05:11 XenophonF oh this is interesting
05:11 XenophonF http://stackoverflow.com/questions/10554922/how-to-detect-windows-started-or-user-login-in-c-net-windows-service
05:11 hrumph XenophonF, yes that's interesting
05:13 XenophonF tbh i think your best bet is to check the event log for the most recent windows startup event
05:13 XenophonF and make sure that salt-minion hasn't started since then
05:13 hrumph XenophonF, ok
05:13 hrumph i'll look into that. i think you're right
05:15 XenophonF event ID 100 in Microsoft/Windows/Diagnostics-Performance/Operational
05:15 XenophonF you'd have to make these queries via pywin32 somehow
05:16 hrumph XenophonF, i think all the modules are available in the minion
05:16 jf_ joined #salt
05:17 jf_ just checking in on packages for ubuntu 16.04 - are they going to be released anytime soon?
05:24 linjan_ joined #salt
05:28 jf_ I've tried the bootstrap script as well, but from the looks of it, it looks to the repo.saltstack.com for 16.04 packages too. Which, as I've mentioned, are not there
05:32 evle joined #salt
05:33 brianfeister joined #salt
05:34 favadi joined #salt
05:35 hrumph jf_ i'm using fedora and i've had my own problems getting up to date salt masters
05:36 hrumph (i wish i could help)
05:36 jf_ :) my fellow condolences
05:38 jhauser joined #salt
05:44 vodik joined #salt
05:44 Sylvain31 joined #salt
05:45 babilen jf_: You could install it from git
05:52 jf_ babilen: thanks. Havent actually found any instructions I could use. Do I simply download a release?
05:53 flowstate joined #salt
05:53 babilen You'd use the bootstrap script for that
05:53 babilen https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html -- You can pass it tags or branch names
05:54 babilen But you might also want to wait for packages and keep your master on a supported release for now
05:58 jf_ I suppose so... If i could get some kind of a timeline for this, that'd help
05:58 jf_ thanks for your help
06:02 colttt joined #salt
06:08 thorsif joined #salt
06:09 thorsif HELP
06:12 netcho joined #salt
06:15 manji joined #salt
06:17 ivanjaros3916 joined #salt
06:20 hrumph XenophonF, i think the best answer may be to use HKEY_CURRENT_CONFIG
06:20 hrumph XenophonF, in the windows registry
06:20 hrumph XenophonF, i think that it's cleared at boot time
06:20 hrumph XenophonF, since it's populated at boot time so anything put in there will be cleared after boot time
06:26 edrocks joined #salt
06:33 opdude joined #salt
06:40 penguinpowernz joined #salt
06:41 kawa2014 joined #salt
06:52 colttt joined #salt
06:53 flowstate joined #salt
06:58 wangofet1 joined #salt
07:01 Elsmorian joined #salt
07:02 yuhlw_ joined #salt
07:04 punkoivan joined #salt
07:08 fracklen joined #salt
07:09 fracklen joined #salt
07:09 linjan_ joined #salt
07:24 Sylvain31 hi, is it a good or bad way to do that: to have higher level of pillar, that generate lower pillar, ex: customer definition with standard options. That may generate lower level pillar for formula? Here's a prototype not workinng pillar: http://paste.debian.net/695999
07:27 dgutu joined #salt
07:28 babilen Sylvain31: I'm doing that frequently, but you can't "rename" pillars as you can't reference pillars in pillars. This would require pillarstack and/or external pillars again.
07:29 babilen I adopted a style that mixes multiple top-level pillar definitions in the same SLS such that they, in toto, constitute the configuration for that customer/site/app/...
07:30 babilen You can, naturally, work on the "pillar symlink" approach if you like (but don't introduce cycles!)
07:30 babilen Or write your own external pillar that does that
07:31 babilen Either way: I found it advantageous to keep settings pertaining to a single semantic "setup" in one SLS even if it contains multiple top-level pillar entries.
07:32 saffe joined #salt
07:33 martoss joined #salt
07:35 Sylvain31 OK, I need more reflexion on that. Do you know some example I can look at it? I'm thinking that part of the job is in the state too, not in the pillar…
07:36 babilen I am not aware of any examples of the "pillar symlink" approach you are proposing
07:38 MeltedLux joined #salt
07:38 babilen Read up on pillarstack and things referenced in https://github.com/saltstack/salt/issues/23910
07:38 saltstackbot [#23910]title: Please implement static pillars | Hi,...
07:38 babilen https://github.com/saltstack/salt/issues/23910#issuecomment-112355187 is what you are after
07:38 saltstackbot [#23910]title: Please implement static pillars | Hi,...
07:40 Elsmorian joined #salt
07:41 josuebrunel joined #salt
07:42 Elsmorian joined #salt
07:45 krymzon joined #salt
07:46 dmaiocchi joined #salt
07:47 keimlink joined #salt
07:50 Sylvain31 I'm not proposing "pillar symlink", did I?
07:53 babilen "to have higher level of pillar, that generate lower pillar"
07:53 flowstate joined #salt
07:54 Qlawy Hi guys, I have problem with heat which blows timeouts randomly
07:54 Qlawy example: 3 times of heat stack-list works like a charm, next one or two will timeout on message reply :/
07:55 Qlawy 2016-05-23 09:48:41.870 3031 DEBUG heat.common.wsgi [req-91d67206-7043-427b-8f3e-7029c4783781 98f13b5dca624e659c7bebd94f135ec6 433e9cf89c2943bcb56bc12ef81f1772] Calling <heat.api.openstack.v1.resources.ResourceController object at 0x7f3370081290> : metadata __call__ /usr/lib/python2.7/dist-packages/heat/common/wsgi.py:851
07:55 Qlawy 2016-05-23 09:48:41.873 3031 DEBUG oslo_messaging._drivers.amqpdriver [req-91d67206-7043-427b-8f3e-7029c4783781 98f13b5dca624e659c7bebd94f135ec6 433e9cf89c2943bcb56bc12ef81f1772] MSG_ID is 607110b71e4c49e4a30ba5a005ce1f18 _send /usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py:423
07:55 Qlawy always those messages times out
07:55 Qlawy o fuck
07:55 Qlawy wrong channel :(
07:55 Qlawy sorry :(
07:55 babilen That's okay ;)
07:56 Qlawy :)
07:56 Sylvain31 babilen: hum, I probably lack again salt knowledge. I'm thinking, what about a state, that generate pillar? salt 'saltmaster' state.apply generate_customer_pillar ?
07:57 babilen Sylvain31: States don't generate pillars .. or do you mean a state that generates an actual pillar file?
07:58 Sylvain31 which would generarte some more yaml on the master itself that expand pillar higher level config and spread lower config based on our (local) rules? Is that not the way to do it?
07:59 Sylvain31 "pillar file" yes. file.managed? I guess
07:59 babilen I wouldn't do that. Write an external pillar that does the renaming or just use pillarstack .. or configure a service with multiple top-level pillar entries in a single SLS
08:00 Sylvain31 I don't know pillarstack, I'm seeking about that
08:00 manji joined #salt
08:05 lero joined #salt
08:05 Sylvain31 pillarstack in a "custom pillar source" (I'm not sure about the vocabulary) which can merge or remove yaml stuff. Then when salt queries the yaml it get the definitive yaml on the fly.
08:06 Sylvain31 ?
08:06 dayid joined #salt
08:07 mackripeum joined #salt
08:09 Sylvain31 babilen: I'm thinking much more like a C coder, with a Makefile analogy: make customers (which would create sub config, with all gory details), I think this "make" is salt now, no?
08:09 GreatSnoopy joined #salt
08:10 Sylvain31 do you know Makefile?
08:11 babilen Sure
08:12 babilen Pillars and States are two different areas in salt. Pillars provide the data while states work with that data .. I wouldn't rely on states to generate pillar data that is then, in turn, needed by other states. That complicates things massively and requires a very specific order and reloading of pillar data
08:13 babilen If you want to make changes to pillar data then write an external pillar that does what you want
08:13 babilen Or adapt your pillar data to the usecase you have... As I said: I use formulas quite a lot and simply define SLS files with multiple top-level pillar key entries.
08:14 rrei joined #salt
08:19 martoss joined #salt
08:19 dayid joined #salt
08:21 s_kunk joined #salt
08:21 Sylvain31 babilen: but on the two steps: generate pillar from pillar, apply state from generated pillar. It
08:21 Sylvain31
08:21 k_sze[work] joined #salt
08:22 Sylvain31 It is exactly what salt does, for config file. And pillar, is a config file, so salt can generate its own config file, it seems logical for me
08:23 punkoivan joined #salt
08:23 iggy but it has to completely restart the minion for those config changes to take place
08:23 Sylvain31 babilen: I dont understand what you mean by 'SLS files with multiple top-level pillar key entries.' do you have examples?
08:24 babilen It might, but it introduces dependencies between areas that are separate and will cause you problems as you will have to ensure that things are done in the right order. It is a bit like changing a collection while you are iterating over it.
08:25 Sylvain31 iggy: you're speaking about what I'm talkink about?
08:25 iggy yes
08:26 babilen https://www.refheap.com/119496
08:27 sfxandy joined #salt
08:27 tuxx joined #salt
08:27 Sylvain31 babilen: "introduces dependencies between areas that are separate" yep, it's the role of the ext_pillar may be. But from Makefile point of view, you're are just introduce a step in dependancies… And from my point of view, I can git diff the generated file to be sure it generate what I expected… ;)
08:28 CeBe1 joined #salt
08:29 iggy I'm with babilen on this one... it doesn't sound like a good idea
08:29 edrocks joined #salt
08:29 babilen Salt is *not* a Makefile
08:30 babilen I don't think that thinking about it as one will allow you to make sensible decisions
08:30 Sylvain31 iggy: may be not, that what I'm chatting about… But sounds also the way, the tools proposes as feature: generating managed config, with templates, and trigered action, and dependancies… ! ;)
08:32 Sylvain31 babilen: salt borowed a lot from Makefile behavior, I as see with my own background.
08:34 iggy dependencies and generating files are really not Makefile specific
08:34 babilen Salt is a descriptive system rather than an imperative one ..
08:35 babilen So Makefiles also achieve "goals", but I really wouldn't be blinded by that analogy
08:37 babilen It would be much better to think of salt as a system that uses "data" (i.e. pillars) as a description of goals that should be achieved. You want the data to be complete before you start working on your goals.
08:37 Sylvain31 OK. any beginning starts with its own personal analogy, the important is to keep an openmind. ;)
08:38 babilen I'm not saying that what you want to do can't be done, but you are working against the system in that case and it will bite you down the road
08:38 KermitTheFragger joined #salt
08:39 Sylvain31 I heart that. ;)
08:39 Sylvain31 ear
08:41 garphy joined #salt
08:43 zer0def joined #salt
08:43 impi joined #salt
08:43 Elsmorian joined #salt
08:45 yuhlw_ left #salt
08:47 iceyao joined #salt
08:48 Sylvain31 iggy: I was just comparing to something old I new: Makefile and many derivative in any language, etc. packaging system also introduce dependancies, freebsb was using Makefile for that (may be still…)
08:49 iceyao_ joined #salt
08:50 saffe left #salt
08:53 flowstate joined #salt
08:54 kbaikov joined #salt
09:02 kbaikov joined #salt
09:04 Kurisutian joined #salt
09:06 Kurisutian Hi guys. Does anyone have salt running on an Archlinux based distro (Manjaro)? Somehow I get the error 'u'pkg.refresh_db' is not available.' whenever I want to do some process with their package manager (pacman). Does anyone know how I can get it to work properly or what the problem is?
09:10 jespada joined #salt
09:10 Kurisutian salt --version gives me: salt 2015.8.8.2 (Beryllium)
09:11 zer0def joined #salt
09:14 Sylvain31 Kurisutian: did you try salt-bootstrap? https://github.com/saltstack/salt-bootstrap
09:15 AndreasLutro Kurisutian: check the minion logs
09:15 Kurisutian Sylvain31: I installed it as described in the Arch Wiki with their official packages.
09:18 Sylvain31 Kurisutian: on the minion you can try salt-call -ldebug with.your.command
09:18 Kurisutian AndreasLutro: The Minion Log does not show anything when executing this.
09:18 Sylvain31 to get a lot of output, not available from the master
09:20 Sylvain31 some trick I found to run from the master:
09:20 Sylvain31 ssh db0 "salt-call -ldebug state.show_sls  mysql.user 2>&1" | less
09:20 Sylvain31 salt 'db0*' cmd.run "salt-call -ldebug state.show_sls mysql.user"
09:20 Sylvain31 the first need an ssh key auth…
09:21 MadHatter42 joined #salt
09:22 Kurisutian Sylvain31: here ist what the salt-call gave back: http://pastebin.com/D2xpW3Hy
09:22 Kurisutian I ran salt-call -ldebug pkg.refresh_db
09:26 Sylvain31 Kurisutian: look at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pacman.html#module-salt.modules.pacman
09:34 Sylvain31 Kurisutian: I cant help more on this topic.
09:34 Kurisutian Sylvain31: When checking the grains it returns 'ManjaroLinux'. So technically it should detect it when using the pkg.* commands...
09:36 Kurisutian OK, I think I have found the error...
09:38 Kurisutian The grain returned for 'os' is "ManjaroLinux" but in the core.py it looks for 'Manjaro'... this should explain it... shouldn't it?
09:41 7F1ABCRAB joined #salt
09:44 babilen Oh, it's LinuxMint vs Mint all over again!
09:44 pinchal joined #salt
09:45 pinchal Hi there!
09:45 Kurisutian babilen: Seems like that... ;)
09:46 babilen Kurisutian: I'd report a bug to salt .. Do you know if Manjaro always used "ManjaroLinux" or if that is a recent change?
09:47 Kurisutian babilen: Unfortunately I don't know... but since there has already been a bug reported which indicated 'Manjaro' it looks like they changed it later to 'ManjaroLinux'.
09:47 babilen Oh dear .. why did they think that's a good idea?
09:48 babilen So, yay, more special cases in Salt! (and other tools that use that data)
09:49 Kurisutian babilen: I just created a config for the "providers: " option. Running salt-call not works, but running this from the Master still does not work...
09:50 babilen I'm not sure I follow
09:50 babilen Which "providers: " option?
09:50 matthew-parlette joined #salt
09:51 Kurisutian babilen: in the config file of the Minion, according to this: https://docs.saltstack.com/en/latest/ref/modules/index.html#module-provider-override
09:52 Kurisutian could this be a cache issue?
09:52 babilen Please bear with me, but all I know is that you can't use pkg.refresh_db because the grain is wrong. What are you going on about now?
09:53 Kurisutian babilen: To have it use the correct command (pacman) I did set the providers option in the minion to overwrite the detected package manager based on the grain for the OS
09:53 babilen And if it is not working on the minion with salt-call then why do you expect the result to be different when you call it from the master?
09:54 flowstate joined #salt
09:54 babilen Or was the "not" a typo on your part?
09:54 babilen And what happens if you run it on the master and .... ?
09:55 Kurisutian after doing so it worked on the minion but not from the master.... so salt-call does work locally on the minion but running salt from the master does not yet work...
09:55 babilen Okay, drop caches and continue?
09:56 Kurisutian that's what I was asking... if the command was cached on the master... ;)
09:56 babilen https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.cache.html
09:58 Kurisutian [DEBUG   ] Runner return: False
09:58 Kurisutian I ran salt-run cache.clear_all
09:59 martoss joined #salt
10:01 ravenx joined #salt
10:05 iceyao joined #salt
10:05 Nothos927 joined #salt
10:07 hoonetorg joined #salt
10:09 pinchal I have a little problem here: I'm running salt-call state.highstate in the post-install script of an installation
10:09 pinchal many packages can be installed, but at some point, apt freeze
10:10 pinchal on "dpkg-preconfigure"
10:10 pinchal (OS is ubuntu 14.04)
10:12 pinchal any idea ?
10:15 babilen Configuration of which package?
10:17 babilen Kurisutian: Thanks for the report!
10:18 Kurisutian babilen: sure, no problem. :)
10:19 Kurisutian Still, the cache on the system does not seem to be cleared.... can I manually do that somehow?
10:21 pinchal it seems to be for every packages, I can't find where this problem starts
10:23 Nothos927 I've just installed salt master and minion on some test servers and it's looking good so far, but I'm wondering what the correct method is in the top.sls file to have one file per minion?
10:23 babilen Kurisutian: /var/cache/salt/, but I have no idea what is really needed to get that information to the salt master. Did you restart both the salt master and minion?
10:23 Kurisutian babilen: Yes, I did...
10:23 Nothos927 At the moment I have: https://gist.github.com/anonymous/cd2b4c96b767649ff7187fdddaccc84a
10:24 Nothos927 Where slave is the name of the minion
10:24 babilen Nothos927: What do you mean by "One file per minion" exactly?
10:24 Nothos927 As in, whenever I add a minion, I can have a folder with sls files for them that'll get read automatically
10:24 babilen Ah, one SLS per minion. Why do you want that? But the way you exemplify is one way to do it
10:24 Nothos927 It's just a preference thing more than anything :)
10:25 babilen Why don't you target the same state to all minions and make sure that they do the right thing?
10:26 avozza joined #salt
10:26 Nothos927 It just seems like long term it'd be neater to have things in smaller bits
10:26 fredvd joined #salt
10:28 Nothos927 Say for example I remove a minion, it'd be nice to just have to delete a single sls file rather than fiddling in a number of different ones
10:28 babilen Nothos927: Sure, but normally you target semantic states (e.g. "install mysql here" or "manage users there") rather than putting *everything* into a minion specific SLS
10:29 babilen But sure, you could target one SLS per minion in exactly the way you do in that paste
10:29 Nothos927 babilen: Yup, it works, but I'd like something a bit more automated. Like having a folder called minions which contains slave1.sls, slave2.sls, and salt master reads them
10:30 babilen Okay, you can use cp.list_master to list files on the master and loop over that in top.sls
10:31 edrocks joined #salt
10:32 babilen I would still be more explicit in your targeting and make *semantic* decisions. That doesn't mean that you have to keep everything in top.sls and target solely on minion id.
10:33 babilen There are various ways to do this. The easiest and most secure way is to target by ID and to use some semantic naming scheme for your minions (e.g. foo-db1, foo-web1, ...) and then target the "db" state to "foo-db*" and the "web" state to "foo-web*"
10:34 babilen Another approach is to assign certain "roles" to minions. I'd recommend to do this in pillars and then target by pillars. So you could have a "roles" list in pillars and the target "I@roles:db" - match: compound to all minions that have "db" in that list ..
10:34 babilen And so on ..
10:35 babilen But sure, including a SLS that matches the minion id is one way to do this. I really don't now your setup and it is therefore hard to give actually helpful advice
10:36 teryx510 joined #salt
10:37 Rumbles joined #salt
10:38 Nothos927 babilen: Basically I've literally just installed salt on two test VMs so I'm fiddling at the moment. Ideally I'd like something reasonably scalable though :)
10:39 Nothos927 But also wanna learn the 'right' way of doing things
10:41 babilen So, what kind of setup do you have?
10:41 teryx5101 joined #salt
10:41 babilen How many boxes? What are they running? What is your naming scheme? How are you doing things now?
10:49 fracklen joined #salt
10:52 rem5 joined #salt
10:55 felskrone joined #salt
11:00 amcorreia joined #salt
11:01 pmcg joined #salt
11:02 Antiarc joined #salt
11:03 viq https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.git_pillar.html#git-pillar-2015-8-0-and-later  does not tell me whether I can use pillars in a subdirectory of repository, anyone knows whether I can ?
11:04 babilen Isn't that what "root" is about?
11:04 viq oh, duh, thanks
11:05 babilen See the "Here is an example git_pillar configuration: .." bit and "Pillar SLS files will be read from the 'pillar' subdirectory in this repository" in particular
11:05 viq Yeah, apparently "readin with understanding" is not something I could put on my resume today
11:06 * viq reads what he wrote and adds "spelling" to the list
11:06 XenophonF :)
11:06 babilen ITYM "speling" ;)
11:06 fracklen joined #salt
11:07 viq "ITYM"?
11:07 babilen I think you menat
11:07 babilen *meant
11:07 babilen *sigh*
11:08 viq Ah :P
11:15 hoonetorg joined #salt
11:19 LotR /topic we spel reel good
11:19 LotR ;)
11:34 quasiben joined #salt
11:36 Nothos927 babilen: I'm planning to run about a dozen servers with this, at the moment I only have one because I'm testing it all out first :) There'll be a couple of different ones, like a mongo server, apache server, etc.
11:37 babilen Nothos927: How many in total? 5? 200? 20000 ?
11:37 Nothos927 So far I have like three servers setup, but managing nagios on them and such is a chore so I'm putting some time aside to look into salt to simplify the process in future
11:37 Nothos927 babilen: 12
11:37 Nothos927 At most
11:37 babilen Okay, do you have a semantic naming scheme for them?
11:38 Nothos927 Yup, it'll all be like: mongo-001.servers.etc.etc, apache-001 and so on
11:42 hlub salt-minion 2015.8.10: pkg.installed fails on CentOS 7, when trying to install package docker-python. Still, that package can be successfully installed with yum.
11:43 Nothos927 Though I think I should get my head around sls files first before complicating it
11:43 losh joined #salt
11:44 lempa joined #salt
11:46 Nothos927 Which leads me to my next question: https://gist.github.com/anonymous/0008210cf34d9ddf6e7b5b2c0454bd85 This is causing a 'State 'slave' in SLS 'slave' is not formed as a list' error, but as far as I can see it's correct. I assume I'm missing something stupendously obvious
11:49 hlub Nothos927: seemed correct although I was unable to see the indentation
11:49 hlub and I would say file.managed
11:49 Nothos927 hlub: I'm doing four space indents
11:50 Nothos927 https://gist.github.com/anonymous/f75f7ae09134145b13c21c2447542da8 same error though
11:50 hlub does yaml support other than using two spaces? :O
11:52 hlub Nothos927: the file.managed state of yours should start from the same level as the salve state.
11:53 hlub i.e. not indented
11:53 flowstate joined #salt
11:55 babilen Nothos927: I'd target services based on the minion id in that case. There is a great selection of pre-made formulas for you to use on https://github.com/saltstack-formulas that can be tailored to your needs by providing suitable data in pillars
11:55 babilen Nothos927: Line 5 should not be indented at all
11:56 babilen Those are different states
11:56 babilen (with different IDs)
11:57 Biopandemic joined #salt
11:58 babilen hlub: Run "salt-call state.highstate" and check what actually happens
11:59 wangofett joined #salt
11:59 wangofet1 joined #salt
12:01 hlub babilen: a couple of repoquery commands, then 'yum -y install docker-python' followed by 'rpm -qa --queryformat %{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'.
12:02 babilen hlub: Any error in the minion log? And "rum -y install docker-python" works ?
12:04 hlub babilen: only: [ERROR   ] The following packages failed to install/update: docker-python
12:04 hlub and the install command just says nothing to do
12:05 rgrinberg joined #salt
12:05 hlub and return 0
12:05 mierst joined #salt
12:07 hlub So, it probably installed the package but fails to report success. Of course, all the dependent states refuse to run.
12:07 rgrinberg joined #salt
12:07 lilvim joined #salt
12:11 johnkeates joined #salt
12:16 Ayo joined #salt
12:18 hlub same problem with pkg.latest
12:19 hlub but install of another package 'docker' is fine.
12:19 babilen Could you paste your state, the highstate output and minion logs to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
12:31 iceyao joined #salt
12:31 teryx5101 joined #salt
12:34 edrocks joined #salt
12:34 rem5 joined #salt
12:38 gh34 joined #salt
12:40 hlub babilen: Here it is: http://hlub.dy.fi/centos_pkg_latest.txt (I'm currently working on command line only, unable to use paste sites)
12:41 toastedpenguin joined #salt
12:43 TooLmaN joined #salt
12:46 rem5_ joined #salt
12:49 hlub hmm, it seems that pkg.latest for docker-python results with installation of python-docker-py but not docker-python.
12:51 babilen hlub: Is the name of the package different? (e.g. alias or something)
12:52 hlub I am not a yum expert :)
12:53 babilen Well, could you run that command manually and paste the output?
12:53 babilen (the yum install one)
12:53 babilen "yum -y install docker-python"
12:53 hlub but it seems that everything works if I change the package's name to python-docker-py.
12:53 babilen I guess that that is the actual name and that yum simply does some "user is too stupid to type the actual name, so I am helping"
12:54 babilen Salt is then checking if "docker-python" is installed (which it isn't) and fails
12:54 mapu joined #salt
12:54 hlub yeah, that came into my mind too
12:54 babilen Could you remove python-docker-py and show me what happens if you manually install "docker-python" ?
12:55 babilen Just to verify that hypthesis
12:56 hlub it must be the case, because 'yum list installed docker-python' says there is no such package installed, while python-docker-py is installed.
12:58 Qlawy Guys, does file.recurse check if file in directory has changed?
12:59 hlub babilen: Ah, it also says: "Package docker-python-1.4.0-115.el7.x86_64 is obsoleted by python-docker-py-1.7.2-1.el7.noarch which is already installed"
12:59 amcorreia joined #salt
12:59 hlub Qlawy: yes, it does
13:00 babilen hlub: So you were trying to install an obsoleted package and yum was trying to be "helpful"
13:00 * babilen prefers software that fails with a clear error message
13:01 Qlawy hmm, damn... it ignored changes in my case :/
13:01 Qlawy and I have old file versions
13:01 hlub Qlawy: but it does not remove those files you remove from the source directory.
13:02 Qlawy only content replace ;)
13:02 Qlawy oh... I see where I have typo :X
13:02 flowstate joined #salt
13:03 hlub babilen: yeah, did not expect such behavior at all...
13:09 fracklen joined #salt
13:11 bhosmer_ joined #salt
13:14 fracklen joined #salt
13:18 mapu_ joined #salt
13:19 Sylvain31 joined #salt
13:21 amcorreia joined #salt
13:26 manji joined #salt
13:27 krak3n joined #salt
13:28 mortis when running highstate scheduled on each minion, is there a good way to get a summary/report on the master to see which ones didnt run ...say ..the last few hours
13:29 mortis without using foreman or so
13:29 racooper joined #salt
13:29 krak3n hey guys, whats the best way to distribute a custom pillar module (ala one of these: https://github.com/saltstack/salt/tree/develop/salt/pillar) to the Salt Master for usage as an ext_pillar?
13:29 edrocks joined #salt
13:30 babilen krak3n: Put them in _pillar ?
13:30 estahn joined #salt
13:30 babilen bbl
13:31 subsignal joined #salt
13:31 babilen krak3n: Look into extension_modules/pillar
13:33 krak3n yeah i've used extension_modules/pillar before, was hoping for something like _states
13:33 keekz joined #salt
13:34 subsigna_ joined #salt
13:35 Tanta joined #salt
13:36 perfectsine joined #salt
13:38 mage_ is it possible to do some action when a mine function output change ?
13:39 edrocks joined #salt
13:39 babilen mage_: Is there an event if that happens?
13:39 dmaiocchi joined #salt
13:40 mage_ babilen: not necessary
13:40 josuebrunel joined #salt
13:41 mage_ I'm just starting with mine functions, but as I saw there is mine_interval parameter I wondered if I could do some actions after a refresh
13:41 mage_ if I understand well every mine_functions are executed every mine_interval ?
13:43 mage_ my idea is to create some FreeBSD jails on the fly and add the DNS/IP in my local resolver once they're setup
13:44 ferbla joined #salt
13:44 mage_ so I plan to periodicaly check for jail ips and adapt my unbound.conf
13:46 babilen I wouldn't necessarily know what to trigger on, but can't you simply run a state every mine_interval and rely on the fact that it simply uses up-to-date mine data?
13:46 ferbla Hello everyone, wondering if there is a good way for a saltstack state to check if a file contains a string
13:46 mage_ babilen: yep I could... it there some sort of crontab in salt ?
13:46 racooper joined #salt
13:46 manji joined #salt
13:47 XenophonF ferbla: in what context?
13:47 babilen mage_: https://docs.saltstack.com/en/latest/topics/jobs/schedule.html
13:47 mage_ thank you :)
13:47 XenophonF ferbla: you could use a file.append state
13:47 XenophonF it won't add the given text if it already exists in the file
13:48 ferbla XenophonF: So what I am looking to do is if in /etc/yum.conf the line 'exclude' is present, just append ', kernel*' to the end otherwise print 'exclude=kernel*'
13:48 XenophonF ferbla: use a file.replace state
13:49 XenophonF and come up with a suitable regular expression
13:49 XenophonF i might have an example for you - let me check
13:49 ferbla XenophonF: Awesome, thanks for your help
13:50 tracphil joined #salt
13:51 XenophonF ferbla: https://github.com/irtnog/salt-states/blob/development/cron/init.sls#L9
13:51 XenophonF note the use of an inverted match using ?!
13:51 mapu_ joined #salt
13:52 ferbla XenophonF: Thanks!
13:52 XenophonF also note the use of grouping to simplify the replacement regex
13:53 XenophonF no problem hope that helps
13:58 jerredbell joined #salt
14:00 rhand joined #salt
14:01 lorengordon joined #salt
14:06 Andrew joined #salt
14:10 impi joined #salt
14:11 zmalone joined #salt
14:12 mapu_ joined #salt
14:12 drawsmcgraw joined #salt
14:15 ivanjaros joined #salt
14:17 babilen ferbla: There's also file.line, but my general advice would be to manage the entire file explicitly. I found that states that depend on some content being present in some file are likely to break. Rather define *exactly* what you want in its entirety than relying on a series of changes to succeed.
14:18 hasues joined #salt
14:19 hasues left #salt
14:19 sbogg joined #salt
14:21 dstokes joined #salt
14:24 favadi joined #salt
14:28 filip___ joined #salt
14:28 brianfeister joined #salt
14:36 tpaul joined #salt
14:37 mapu_ joined #salt
14:39 _JZ_ joined #salt
14:48 DanyC joined #salt
14:50 mage_ is there a way to get some pillar data and have a way to maintain indentation ?
14:50 DanyC hi all, say i have a state lay day as /srv/salt/base/{init.sls,ssh/,network.sls} where network.sls is not called/ part of the init.sls. How can get the network.sls applied to other states like /srv/salt/app1/ ?
14:50 mage_ something like {{ mypillar|somefunc }}
14:51 DanyC can i include in /srv/salt/app1/init.sls something like include: - base.network ?
14:51 viq joined #salt
14:51 morissette joined #salt
14:57 viq joined #salt
14:58 mapu joined #salt
14:58 ferbla babilen: would you recommend keeping a config for each os flavor and version? Then just push that down to minions as needed?
14:59 fer_bla joined #salt
14:59 fer_bla joined #salt
15:00 mage_ how can I access salt.output.yaml_out in a template ?
15:01 debian112 joined #salt
15:01 mapu joined #salt
15:01 fer_bla joined #salt
15:05 mage_ is mine_functions: {internal_ip_addrs: {iface: bge0, mine_function: network.interface_ip}} valid yaml ?
15:09 zmalone joined #salt
15:09 drawsmcgraw left #salt
15:13 jenastar joined #salt
15:14 LordOfLA joined #salt
15:19 jeddi joined #salt
15:20 perfectsine_ joined #salt
15:20 debian112 joined #salt
15:20 mierst joined #salt
15:22 virty joined #salt
15:24 sjmh joined #salt
15:24 virty ve got a module question.  in the docs it says "since __virtual__ is called before the module is loaded, __salt__ will be unavailable", but the example below shows __salt__ being used in __virtual__().  I have also seen __salt__ in __virtual__() in a couple state modules.  How does this really work?
15:24 kingscott joined #salt
15:24 Kelsar joined #salt
15:26 kingscott I'm trying to figure out a way to make a file name using the current month as the name. Does anyone know how to do this in jinja?
15:29 jfindlay virty: that's a good question.  __salt__ contains the execution module functions, so it's somewhat of a paradoxical situation for it to be available in __virtual__ functions in execution modules.  I don't think it would be a problem for other module systems such as state modules
15:30 fracklen joined #salt
15:34 virty jfindlay: well I bring it up because im trying out the bigip state module, and it fails with "Reason: 'bigip' __virtual__ returned False".  When I comment out the __salt__ part it works fine.  And I have seen this before in an iis module.
15:36 perfectsine joined #salt
15:39 noraatepernos joined #salt
15:40 jfindlay virty: can you paste it?
15:40 ferbla joined #salt
15:42 virty https://gist.github.com/rmarcinik/7d0d364ae414def1764285d92ccb0290
15:43 jfindlay I'm getting a 404 on that URL
15:45 murrdoc joined #salt
15:45 murrdoc http://www.meetup.com/SaltStack-Chicago/events/231169453/
15:45 virty thats weird it disappeared for me too.  anyway, here is the state module, if you comment out the __salt__ part and __virtual__() returns 'bigip' it works fine https://github.com/saltstack/salt/blob/2015.8/salt/states/bigip.py
15:45 murrdoc looks promising
15:45 dh joined #salt
15:45 dezertol joined #salt
15:48 DanyC joined #salt
15:51 jfindlay virty: to me it seems that the problem is that the bigip state module is searching for bigip.exec_action in __salt__ to test the presence of the bigip exec module, but the bigip exec module does not have an exec_action function
15:52 DanyC joined #salt
15:53 jfindlay you should try changing it to something like `return 'bigip' if 'bigip.list_transaction' in __salt__ else False`
15:54 virty ok, that makes sense.  So is  the documentation on __virtual__() wrong, and __salt__ is present when its run?
15:55 marie1972 joined #salt
15:55 kingscott Does anyone know how to get the date, using jinja?
15:56 anotherZero joined #salt
15:56 jfindlay virty: it should be for state modules
15:58 Tanta {{ set date = salt['cmd.run']('date') }}
15:58 jeddi kingscott: for a state?   it seems ... brittle.  i'd probably just call out to a bash script to pull in a current date (yyyy-mm, say) and be done with it.   what happens the following month btw if you re-run the salt state?
15:58 jeddi Tanta: nice - didn't know we could do that.
15:59 Tanta yup, I use it with cURL a lot of interact with dynamic API data
15:59 kingscott I'm trying to create specific logs for the state i'm creating. we will run this state monthly, and we want to have a log of what happens.
15:59 virty Thanks jfindlay, so should I make a pull request for that module to replace 'exec_action'?
15:59 jfindlay virty: that would be nice if you can
16:00 kingscott Thanks. Tanta
16:00 jfindlay virty: and you're welcome to update that documentation too :)
16:06 dmaiocchi joined #salt
16:07 martoss joined #salt
16:11 mpanetta joined #salt
16:12 virty Do I merge this into 2015.8?
16:12 jfindlay I think that would be the best place
16:12 murrdoc jfindlay: will the pip fix be making it into 2015.8
16:12 jfindlay pip fix?
16:13 zmalone murrdoc: I thought that went into 2015.8.10 last week?
16:14 murrdoc ah thank you zmalone
16:14 murrdoc https://github.com/saltstack/salt/issues/33376: pip state broken in 2015.8.9 with pip <6.0
16:14 saltstackbot [#33376]title: pip state broken in 2015.8.9 with pip <6.0 | ### Description...
16:15 ALLmightySPIFF joined #salt
16:21 kingscott When running a salt command you can output the results using --out-file. Does anyone know if you can build that into your state so that it automatically does that instead of having to type that on the salt command?
16:24 UtahDave joined #salt
16:27 edrocks joined #salt
16:28 evle2 joined #salt
16:28 mierst joined #salt
16:28 linjan_ joined #salt
16:32 ferbla joined #salt
16:33 RandyT joined #salt
16:36 RandyT joined #salt
16:37 dstokes joined #salt
16:37 impi joined #salt
16:38 aw110f joined #salt
16:41 aw110f_ joined #salt
16:42 dstokes_ joined #salt
16:45 Heartsbane joined #salt
16:46 impi joined #salt
16:46 beelzebob Is there a way to use an external job cache for only *some* jobs?
16:46 beelzebob https://docs.saltstack.com/en/latest/topics/jobs/external_cache.html seems to indicate it can only be set for all jobs
16:47 sinonick joined #salt
16:48 jorr-el joined #salt
16:48 dstokes joined #salt
16:48 beelzebob or maybe I'm just not understanding returners - can you set master side returners on individual jobs?
16:54 gladiatr joined #salt
16:54 RandyT joined #salt
16:55 UtahDave beelzebob: yeah, if you have your minions configured to access your job cache  the  --return <your job cache>  will tell the minion to send the return directly to the job cache.
16:56 teryx510 joined #salt
16:57 beelzebob right, but I don't want my minions connecting to the db directly (mongo in this case) - I just want the master to put specific jobs in
16:57 beelzebob https://docs.saltstack.com/en/latest/topics/jobs/external_cache.html#external-master-cache seems like it is an all or nothing deal
16:58 UtahDave Hm. Yeah, I don't think Salt does that out of the box right now.
16:58 UtahDave I think you're correct. It's an all or nothing deal.
16:58 beelzebob "Configuration is a single line that specifies an already-configured returner to use to send all job data to an external system."
16:58 UtahDave There is a project that might do what you want. It's a reactor that sends certain jobs to an external data store.  Let me see if I can find it.
16:59 beelzebob hm. interesting, that may be sufficient
17:02 ageorgop joined #salt
17:02 beelzebob UtahDave: https://github.com/felskrone/salt-eventsd maybe?
17:02 UtahDave yes!  that's it!  I was having trouble finding it
17:05 murrdoc a salt engine would be easier
17:10 murrdoc UtahDave:  engines are stable yes ?
17:13 UtahDave Yep!
17:14 UtahDave that's a really good point, murrdoc.  It would probably be quite easy to write a salt engine that does exactly what beelzebob wants
17:14 murrdoc yup
17:16 edrocks joined #salt
17:18 beelzebob I'm not sure the difference between an engine and a reactor here - is it just persistence? (i.e. a single persistant process connected to the db)
17:18 sdemura joined #salt
17:18 beelzebob in both cases I'm just listening for events on the bus and dumping selected ones to a db
17:18 Biopandemic joined #salt
17:19 sdemura Hello. I have a question regarding upgrading salt. I'm on 2015.8.8.2, and I see 2015.8.10 is the newest version. I originally installed my salt master with the bootstrap script, onto Ubuntu 14.04
17:19 sdemura How do I upgrade?
17:20 UtahDave beelzebob: engines just give you a more programmatic interface.  Either would work fine for you.
17:20 punkoivan joined #salt
17:25 dstokes_ joined #salt
17:31 impi joined #salt
17:33 west575 joined #salt
17:35 Brew joined #salt
17:35 Fiber^ joined #salt
17:37 guerby joined #salt
17:38 flowstate joined #salt
17:40 dmaiocchi joined #salt
17:43 fracklen joined #salt
17:53 dstokes joined #salt
17:53 mierst joined #salt
17:54 bltmiller joined #salt
17:59 impi joined #salt
18:01 mowntan joined #salt
18:01 mowntan joined #salt
18:03 Elsmorian joined #salt
18:04 babilen ferbla: I typically follow a formula style if it gets that complicated -- https://github.com/saltstack-formulas/template-formula + https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
18:05 teryx5101 joined #salt
18:06 patrek joined #salt
18:08 GreatSnoopy joined #salt
18:11 teryx510 joined #salt
18:12 WyrD joined #salt
18:12 WyrD left #salt
18:12 ageorgop1 joined #salt
18:12 aw110f joined #salt
18:12 zer0def joined #salt
18:18 josuebrunel joined #salt
18:21 ferbla babilen: Okay, thanks. I will get working on that and see what I come up with
18:27 DammitJim joined #salt
18:28 perfectsine_ joined #salt
18:28 Vaelatern joined #salt
18:29 jhauser joined #salt
18:34 ALLmightySPIFF joined #salt
18:40 noraatepernos joined #salt
18:42 ageorgop joined #salt
18:50 linjan_ joined #salt
18:51 amcorreia joined #salt
18:56 ivanjaros joined #salt
18:59 dendazen joined #salt
19:03 bltmiller joined #salt
19:03 mierst joined #salt
19:03 brianfeister joined #salt
19:24 Rumbles joined #salt
19:24 linjan_ joined #salt
19:32 viq joined #salt
19:32 Favoretti joined #salt
19:33 wendall911 joined #salt
19:36 Trauma joined #salt
19:36 GreatSnoopy joined #salt
19:38 eight9three joined #salt
19:38 dstokes joined #salt
19:43 judbski joined #salt
19:44 dstokes joined #salt
19:49 dstokes joined #salt
19:55 dstokes joined #salt
20:01 Ayo joined #salt
20:01 perfectsine joined #salt
20:06 CimmX joined #salt
20:06 josuebrunel joined #salt
20:06 jhauser joined #salt
20:11 ssplatt joined #salt
20:12 dstokes joined #salt
20:14 ssplatt is it possible to lock a user down to just key.gen_accept?  or @wheel.key.gen_accept? for instance, for the kickstart example in https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#post--keys
20:14 ssplatt or in this example: https://github.com/saltstack/salt/blob/develop/salt/netapi/rest_cherrypy/app.py#L970-L975
20:16 CimmX Trying salt-cloud to automate windows spin ups.   Where can I get more information on softlayer that is referenced in the documentation?   Is this the same softlayer from IBM?
20:16 drawsmcgraw joined #salt
20:19 iggy CimmX: it is
20:19 CimmX is there any process to spin up a windows host with salt cloud in AWS without the softlayer?
20:22 wangofett joined #salt
20:24 UtahDave CimmX: Yes, basically you just need to make sure everything is set up the same way and make sure your windows image comes up with the correct management port open in the Windows firewall as well as your vpc
20:26 keimlink joined #salt
20:26 quasiben can someone help me understand `cp.get_template` ?
20:26 quasiben salt-call cp.get_template salt://foo/bar.conf works without issue
20:27 quasiben salt -G 'roles:ID_2' cp.get_template salt://foo/bar.conf fails for me
20:27 CimmX Right, I saw the ps script to open the mgmt ports....   I have that specified as userdata:.    It seems softlayer API is only for the IBM cloud services, not AWS.    Is there no documentation for AWS windows spinups?
20:27 wangofet1 joined #salt
20:29 zmalone You'll want the boto states for that stuff
20:32 ssplatt does this in teh external auth docs mean it’s only possible to authenticate to full @wheel, or nothing?  “Globs will not match wheel or runners! They must be explicitly allowed with @wheel or @runner.”
20:33 toastedpenguin looking for ways to manage windows file permissions via salt
20:34 toastedpenguin I have a file that gets installed as part of an msdeployment and the permissions aren't set to allow IIS to access it, need to modify them so IIS starts without issues
20:34 honestly toastedpenguin: it seems this is still under development - https://github.com/saltstack/salt/pull/21128
20:34 saltstackbot [#21128]title: Add win dacl | ...Directories/Registry Keys...
20:35 honestly well, hasn't landed in a release anyway
20:36 fracklen joined #salt
20:36 toastedpenguin wonderful
20:37 toastedpenguin guess it is FMR another powershell script...
20:39 dstokes joined #salt
20:45 RoGryza joined #salt
20:45 murrdoc fml
20:46 belak joined #salt
20:47 belak So, on the salt documentation, it says you can't set worker_threads lower than 3 if you're using some peer settings, but it doesn't seem to say that in the documentation with /etc/salt/master... it just says it can't be set lower than 3... which is right?
20:53 mpanetta_ joined #salt
20:54 mpanetta_ joined #salt
20:56 DanyC joined #salt
20:58 komputes joined #salt
20:58 DanyC hi, i have a 1G iso on master, what is the best way to trasfer it to a minion? i tried file.recurse but i get Recurse failed: none of the specified sources were found
20:58 DanyC any ideas much appreciated
20:59 Knuta DanyC: are you sure you're specifying the path correctly?
20:59 Knuta DanyC: say, if you replace the 1G iso with a text file containing "banana", can you transfer that?
21:00 flowstate joined #salt
21:05 DanyC Knuta: that is interesting, now i get The directory 'salt://repo/dani.txt' does not exist on the salt fileserver in saltenv 'base'
21:05 DanyC Knuta: although /srv/salt/repo/dani.txt is present
21:06 DanyC Knuta: but is a file of course, not trying to send over a directory but a file
21:06 DanyC hmmm
21:07 subsignal joined #salt
21:12 Brew joined #salt
21:17 UtahDave belak: Salt needs at least 3 worker process for various things that it does
21:18 belak UtahDave: Are there any recommendations for shrinking the requirements for a salt master with a small setup? Seems like all the master processes take up about 200-300M on my box
21:19 belak Which, for a DO box is more than I'd like
21:19 flowstate joined #salt
21:20 UtahDave belak: can you pastebin the command you're running and the output?
21:20 belak To check memory usage?
21:21 UtahDave yeah
21:21 belak UtahDave: this is from pmap -XX on one of the salt-master PIDs... https://www.zerobin.net/?1ced9fe9d439c740#n0MgmwOUhkojnB/J01oJ+85u0xOwMTtjABNfNfnMS6Y=
21:22 belak Which is a bit of overkill
21:22 belak I'm on debian jessie (8.4)
21:22 UtahDave what version of Salt?
21:23 thekabal joined #salt
21:23 belak salt 2015.8.10 (Beryllium)
21:24 thekabal Hello. How can I query to see the contents of the Salt Mine for a given minion?
21:24 belak I installed from the deb repo, and just updated today, so it should be the latest
21:27 belak :x
21:27 belak oops
21:29 babilen joined #salt
21:30 dstokes joined #salt
21:33 dstokes joined #salt
21:35 s_kunk joined #salt
21:36 dstokes joined #salt
21:43 dstokes joined #salt
21:53 west575 joined #salt
21:54 dstokes joined #salt
21:54 _JZ_ joined #salt
21:57 ahammond @jfindlay @UtahDave @gtmanfred please update announce to 2015.8.10
21:57 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.0rc3 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
21:57 UtahDave thanks, ahammond
21:57 ahammond also, any news about repo.saltstack.com for Ubuntu 16.04? It's an LTS. :)
21:58 darix joined #salt
21:58 UtahDave Yeah, we'll have packages for 2016.3
21:58 brianfeister joined #salt
21:59 dstokes joined #salt
21:59 ahammond Sweeeeet! :)
21:59 ahammond uh... any news on that? And, is there anything I can do to help it move from rc to out? :)
22:00 UtahDave also, 16.04 comes with 2015.8.8 or something in the default repo
22:00 ahammond Oooooh, that's pretty decent.
22:00 UtahDave yeah, not too bad
22:01 UtahDave we're fixing some last few bugs on the RC. QA team is working feverishly.  :)
22:01 ahammond you guys rock! Super excited
22:01 hrumph UtahDave, thanks for all the work on windows. it's really getting to the point where i can start bragging to people about all the stuff salt can do
22:01 hrumph UtahDave, now that  i've looked at the stuff in the devel branch
22:02 ahammond hrumph like... reboot it? :P
22:02 * ahammond worked for Microsoft a long time ago and still has the scars
22:02 hrumph ahammond, hehe...stuff like the windows certificate stuff. i was complaining earlier in the year that there weren't modules to do that
22:03 ahammond hrumph neato. I'm still glad to be back to the free and easy life of a linux geek.
22:04 hrumph ahammond, linux is easier to work with
22:04 belak UtahDave: do you have any ideas on decreasing memory usage?
22:04 hrumph but windows is still the desktop king
22:04 UtahDave hrumph: actually, twangboy has really been pushing all those changes and shepherding all the windows stuff. I've been helping and advising, but he's really done most of the work.  :)
22:04 hrumph UtahDave, ok tell him thanks. i will also tell him thanks
22:05 UtahDave I'll do that!
22:05 hrumph UtahDave, earlier on github someone was complaining that windows was an afterthought. i now think that's really not the case. that was really unfair. the winwows work looks awesome
22:05 hrumph i guess thre was a lag perior when folks were figuring out what they were going to do
22:06 hrumph period
22:06 UtahDave thanks, hrumph!   It's really coming along.
22:08 manji joined #salt
22:11 linjan__ joined #salt
22:12 dstokes joined #salt
22:21 mpanetta Hey salty people, quick question, do returner configs have to be in minion.conf or can I put them in pillar?
22:22 bltmiller joined #salt
22:22 anotherZero mpanetta: what do you mean by 'returner configs' ?
22:23 mpanetta For salt returners
22:23 mpanetta https://docs.saltstack.com/en/latest/ref/returners/
22:23 mpanetta anotherZero: ^
22:25 UtahDave mpanetta: If you want to use just the returner, then yes the config needs to be in the minion config because the minion returns the data directly to the data store.
22:25 mpanetta Ah ok.
22:25 UtahDave also, every minion needs the appropriate python modules.   like the python mysql module if you're using mysql for the returner
22:25 mpanetta That makes sense
22:26 UtahDave If you use the    master job cache, then only the master needs the configuration info because the minions just return to the master and the master handles putting the data in the databasae
22:26 UtahDave database
22:26 mpanetta Oh?
22:26 mpanetta Hmm how do I do that?
22:26 mpanetta Would be nice, that way I don't have to modify my minions...
22:27 mpanetta UtahDave: Is there a doc I can read somewhere?
22:27 UtahDave Yeah, that's my favorite way of doing it.    It's just the   master_job_cache option.
22:27 UtahDave https://docs.saltstack.com/en/latest/topics/jobs/external_cache.html#master-job-cache-master-side-returner
22:28 mpanetta https://docs.saltstack.com/en/latest/topics/jobs/external_cache.html#external-master-cache
22:28 mpanetta heh I just was looking at that
22:28 mpanetta Thanks UtahDave!
22:28 UtahDave This way the minions don't even have to have a network route to the database
22:28 UtahDave you're welcome, mpanetta!
22:28 mpanetta Yeah exactly, I was dreading having to set that up!
22:30 brianfeister joined #salt
22:33 belak UtahDave: is there a reason, when I have it set to 3 workers, that there are 9 processes?
22:34 UtahDave belak: There are several processes that always run and then the workers are the variable ones.
22:36 zenlot joined #salt
22:37 murrdoc https://docs.saltstack.com/en/latest/topics/beacons/
22:37 belak UtahDave: you said salt needs at least 3 workers? On top of the 6 other processes?
22:38 murrdoc in that one , what does `interval` need to be
22:38 murrdoc can i 10m
22:38 mpanetta UtahDave: Hrm, one issue... Maybe the returner I want to use is not a full one? KeyError: "Returner 'slack' does not support function prep_jid"
22:38 murrdoc or  do i have to do 10 * 60
22:38 mpanetta It only has the return function...
22:39 UtahDave mpanetta: interval is seconds
22:39 mpanetta I think that was for murrdoc heh
22:39 mpanetta UtahDave: wasn't my question :P
22:39 UtahDave mpanetta: Ah, yeah. you can't have the slack returner act as an external job cache since you can't treat it like a database
22:39 mpanetta Ah ok
22:39 mpanetta hrm
22:40 mpanetta I guess I will just have to edit my minion configs :)
22:40 mpanetta Well with salt of course :P
22:41 murrdoc https://github.com/saltstack/salt/blob/develop/salt/returners/slack_returner.py
22:41 murrdoc you can http post from anywhere
22:41 mpanetta Yep
22:41 mpanetta So it should not be too huge of a deal
22:41 UtahDave belak: I haven't kept track of exactly which processes are necessary for the salt master, but yeah, there are several salt-master processes that are always started up and you can configure how many worker processes are added on top of that.
22:41 belak You mentioned a minimum of 3 workers?
22:43 UtahDave Yes, I believe that is still the minimum.  You can try running on one or two, but test heavily before running in production
22:46 anotherZero Anyone have a suggestion for how to run a state on one target, then when it's done, run a state on a different one?  I'm trying to configure some master/slave stuff and I need the master server to be complete before the slave server runs some tasks
22:47 djinni` joined #salt
22:47 muep__ joined #salt
22:47 MightyJoe joined #salt
22:48 arapaho_ joined #salt
22:48 UtahDave have you looked at the salt.orchestrate runner?  Sounds like exactly what you're trying to do
22:48 tmmt_ joined #salt
22:48 anotherZero oooooh
22:48 Hipikat_ joined #salt
22:48 cwright_ joined #salt
22:48 Xenophon1 joined #salt
22:48 thraxil_ joined #salt
22:48 UtahDave Otherwise you could try creating a reactor that listens for an event at the end of the first state and then runs a state on the other minion
22:48 ]V[ joined #salt
22:49 scarcry_ joined #salt
22:49 snaggleb joined #salt
22:49 snaggleb joined #salt
22:49 mariusv joined #salt
22:50 sjmh is there a way to get the master to pre-render a script or state before sending it to the minion?
22:50 anotherZero this orchestrate looks amazing.  Thanks UtahDave
22:51 murrdoc only downside is you cant run orchestrate against one minion at a time
22:51 murrdoc :D
22:51 anotherZero hurr??
22:51 anotherZero dammitall
22:51 jgelens_ joined #salt
22:51 murrdoc i am kidding
22:51 murrdoc you can
22:51 anotherZero oh :D
22:51 jwon_ joined #salt
22:51 murrdoc just pass in the minion id as a pillar
22:51 zifnab06 joined #salt
22:51 jacksontj_ joined #salt
22:51 vaelen_ joined #salt
22:51 murrdoc or there might be a better wait
22:52 intr1nsic_ joined #salt
22:52 brucewang joined #salt
22:52 bbradley_ joined #salt
22:52 evilrob_ joined #salt
22:52 _i90rr joined #salt
22:52 notnotpeter Does anyone know who's release manager responsible for deb packages on repo.saltstack.com?
22:52 crashmag_ joined #salt
22:52 Ashald_ joined #salt
22:52 futuredale_ joined #salt
22:53 ask- joined #salt
22:54 dstokes joined #salt
22:54 anotherZero with the orchestrator, can I target a minion by IP, or should it be by id
22:54 UtahDave notnotpeter: are you seeing problems with the deb packages?
22:54 UtahDave anotherZero: yeah, you can target by IP.
22:54 anotherZero perfectness
22:55 vaelen joined #salt
22:55 UtahDave https://docs.saltstack.com/en/latest/topics/targeting/ipcidr.html
22:55 notnotpeter UtahDave: No, I just wanted to ping them on this issue: https://github.com/saltstack/salt/issues/33458
22:55 saltstackbot [#33458]title: repo.saltstack.com should retain old deb packages | ### Description of Issue/Question...
22:55 dunz0r joined #salt
22:55 notnotpeter Hahah... I beat you saltstack bot.
22:57 al joined #salt
22:58 xenoxaos joined #salt
22:59 notnotpeter I'm just really pissed about an issue in 2015.8.10 which broke pkgrepo. https://github.com/saltstack/salt/issues/33447
22:59 saltstackbot [#33447]title: pkgrepo broken in 2015.8.10 TypeError: expand_repo_def() got multiple values for keyword argument 'repo' | ### Description of Issue/Question...
22:59 manji joined #salt
23:03 UtahDave ah, sorry about that bug, notnotpeter
23:03 dstokes joined #salt
23:03 UtahDave I think the older packages are available in the archive sub directory
23:04 UtahDave ah, I see you noted that in the issue
23:05 evle joined #salt
23:06 flowstat_ joined #salt
23:09 notnotpeter Yeah. I know there's not going to be anything fixed today. I'm just bummed to be cleaning it up manually because the underlying module (pkgrepo) is the one I would try to use to overcome the repo shortcomings.
23:10 UtahDave I'll chat with the release team about that.
23:12 moloney joined #salt
23:12 murrdoc UtahDave:  please move to aptly
23:12 murrdoc for your repo
23:12 murrdoc we have an environment with no access to world and we have to hax the salt repo
23:13 hexa- joined #salt
23:13 murrdoc cant just do `apt-mirror`
23:13 murrdoc we have to setup a local mirror in aptly with every release
23:13 murrdoc and then mirror that
23:13 murrdoc please halt
23:13 murrdoc s/halt/halp
23:14 Nahual joined #salt
23:14 moloney Do I need to worry about race conditions in external pillars? I am setting up a simple external pillar for grabbing data out of Vault, and I was thinking about setting it up to auto-generate passwords if needed.
23:16 moloney If the same external pillar can be running simultaneously in multiple threads/processes then this would be a race condition
23:17 keimlink_ joined #salt
23:22 murrdoc jfindlay:  https://github.com/saltstack/salt/blob/336fbb03bc75bc079c1b45d3dccb1f41da747892/salt/grains/core.py#L2103 is not pyhon3 safe
23:24 dstokes joined #salt
23:26 godlike joined #salt
23:26 godlike joined #salt
23:30 Bucciarati joined #salt
23:31 ujjain joined #salt
23:31 ujjain joined #salt
23:31 feliks joined #salt
23:33 dstokes joined #salt
23:38 Brew joined #salt
23:38 cwyse joined #salt
23:38 kbaikov joined #salt
23:38 dyasny joined #salt
23:38 tercenya joined #salt
23:38 aw110f joined #salt
23:38 Eureka703 joined #salt
23:38 notnotpeter utahdave: murrdoc is correct. Aptly is the easy way forward for sure.
23:39 justyns joined #salt
23:42 ToeSnacks joined #salt
23:42 Freek joined #salt
23:42 murrdoc man
23:42 murrdoc beacons dont have splay ?
23:42 evle1 joined #salt
23:43 drvvv joined #salt
23:44 lz-dylan joined #salt
23:45 flowstate joined #salt
23:48 alias joined #salt
23:50 teryx510 joined #salt
23:51 teryx510 joined #salt
23:52 flowstate joined #salt

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