Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-31

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:22 jeddi joined #salt
00:25 NightMonkey joined #salt
00:28 aneeshusa joined #salt
00:29 dxiri joined #salt
00:32 icebal joined #salt
00:34 noobiedubie joined #salt
00:37 Guest73 joined #salt
00:45 johnj_ joined #salt
00:54 jas02 joined #salt
00:58 zerocoolback joined #salt
01:03 aneeshusa joined #salt
01:07 zerocoolback joined #salt
01:21 nixjdm joined #salt
01:29 Church- joined #salt
01:33 GMAzrael joined #salt
01:51 ilbot3 joined #salt
01:51 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
01:54 cgiroua joined #salt
01:56 jessexoc joined #salt
01:59 cgiroua joined #salt
02:04 darioleidi joined #salt
02:14 cyborg-one joined #salt
02:15 zerocoolback joined #salt
02:16 Guest73 joined #salt
02:19 omie888777 joined #salt
02:33 wavded joined #salt
02:34 jeddi joined #salt
02:36 hammer065 joined #salt
02:41 dxiri joined #salt
02:43 omie888777 joined #salt
02:43 jessexoc joined #salt
02:44 onlyanegg joined #salt
02:47 johnj_ joined #salt
02:51 zoomzoomzoom joined #salt
02:52 evle2 joined #salt
03:02 spuder joined #salt
03:05 onlyanegg joined #salt
03:06 jeddi joined #salt
03:10 noobiedubie joined #salt
03:21 tiwula joined #salt
03:31 michelangelo joined #salt
03:34 nickbartos joined #salt
03:40 cro joined #salt
03:43 nickbartos left #salt
03:48 johnj_ joined #salt
03:48 GMAzrael joined #salt
03:55 justanotheruser joined #salt
04:19 lazybear joined #salt
04:35 spuder joined #salt
04:44 mechleg1 joined #salt
04:49 johnj_ joined #salt
05:05 justanotheruser joined #salt
05:06 justanotheruser joined #salt
05:19 maestropandy joined #salt
05:25 maestropandy left #salt
05:26 maestropandy joined #salt
05:28 Xenophon1 joined #salt
05:33 usernkey joined #salt
05:34 impi joined #salt
05:39 aleph- joined #salt
05:40 Church- joined #salt
05:46 rgrundstrom Good morning!
05:50 johnj joined #salt
05:59 preludedrew joined #salt
06:02 maestropandy1 joined #salt
06:11 Ricardo1000 joined #salt
06:12 maestropandy1 left #salt
06:14 coredumb Morning
06:14 rgrundstrom Hey coredump :)
06:14 darioleidi joined #salt
06:17 * rgrundstrom *sigh
06:18 * rgrundstrom gets a new cup of coffe..... bad morning.
06:24 yuhl joined #salt
06:25 coredumb it's coredumb not coredump :)
06:26 maestropandy joined #salt
06:27 maestropandy left #salt
06:28 sh123124213 joined #salt
06:33 XenophonF joined #salt
06:36 felskrone joined #salt
06:40 rgrundstrom See what i mean... Bad morning. Sorry about that
06:51 johnj joined #salt
06:51 maestropandy joined #salt
06:51 maestropandy left #salt
06:56 remyd1 joined #salt
06:57 armyriad joined #salt
06:58 DanyC joined #salt
06:58 coredumb rgrundstrom: nah it's just your forgot the <tab> completion :D
07:02 sh123124213 joined #salt
07:05 darioleidi joined #salt
07:07 rpb joined #salt
07:09 darioleidi joined #salt
07:16 hoonetorg joined #salt
07:21 Hybrid joined #salt
07:33 DanyC joined #salt
07:35 o1e9 joined #salt
07:45 schasi joined #salt
07:45 schasi left #salt
07:45 schasi joined #salt
07:47 vb29 joined #salt
07:48 vb29 left #salt
07:52 johnj joined #salt
07:58 schasi Does anyone do orchestration and has instance specific data that needs to be there at VM creation time? How do you handle that data; where does it go?
07:59 k1412 joined #salt
08:05 mikecmpbll joined #salt
08:11 colttt joined #salt
08:15 Electron^- joined #salt
08:16 colttt joined #salt
08:19 oida joined #salt
08:20 jeddi joined #salt
08:24 k1412 joined #salt
08:27 jas02 joined #salt
08:30 Church- joined #salt
08:31 _KaszpiR_ joined #salt
08:32 colttt joined #salt
08:49 Florian_ joined #salt
08:52 FloZ joined #salt
08:52 johnj joined #salt
08:55 FloZ joined #salt
08:55 FloZ Hi
08:56 FloZ I have a question about running salt-masters behind an ELB
08:56 FloZ If there is anyone in here who's willing to look into my problems, that'd be greatly appreciated :)
09:00 tyrant_ joined #salt
09:01 maestropandy joined #salt
09:01 maestropandy left #salt
09:03 rgrundstrom FloZ: Please ask you questions and we will try to answer.
09:05 Tyrant joined #salt
09:05 Tyrant Is there a way to use a state twice on the same minion using different pillar data for each? E.g.: I want to set up two instances of a web application on the same machine, one of them using a different subdomain etc.
09:09 hemebond Tyrant No, the state pulls in the pillar. So you'll need to rewrite the state to process a list or use a loop to create two instances of the state with a different pillar reference.
09:10 Tyrant Too bad! Thanks for the quick answer, hemebond
09:13 babilen It normally isn't much work to write a loop for states that can be applied multiple times and to provide the pillar data as iterable
09:13 flughafen joined #salt
09:13 flughafen is there an api call to search for a minion given a machine id?
09:15 babilen test.ping? But what do you mean by 'search' ? How did you lose it in the first place?
09:15 Tyrant @babilen: It isn't much work, true. It would be cleaner to re-use a state with different data, imho.
09:15 justanotheruser joined #salt
09:16 babilen Tyrant: But that's exactly what you'd do .. You will have to specify the pillar data list somewhere and also that the state should be repeated for every element in that list
09:17 lorengordon joined #salt
09:18 _KaszpiR_ joined #salt
09:20 FloZ @rgrundstorm: I want to use salt-masters behind an ELB within AWS. In the minion config, I put in the dns-name of the ELB. I currently have 2 masters running, they use redis for the job_cache and the minion data cache. Both masters state in their log file, that they have accepted the key of one minion, which is correct. However, if I try a 'test.ping', it almost never makes it to the minion
09:20 zerocool_ joined #salt
09:20 Tyrant I have to touch pillar and state, that's what I dislike. I'd prefer to write a state that describes the configuration of exactly one instance and then "use" it multiple times. Like a function that I call in a loop, each call takes parameters instead of a list of parameters and the function itself loops inside.
09:21 hemebond Tyrant Sounds like you're trying to put data into the state.
09:22 hemebond The way you're describing your preferred method is how Puppet works.
09:22 Tyrant All my data is in my pillars
09:22 hemebond "I'd prefer to write a state that describes the configuration"
09:22 babilen I'd think of states of being "fed" by data via pillars and ensuring that the state can handle all data that is appropriate to describe what I try to achieve
09:23 babilen (e.g. list of users if you want to create multiple ones in the pillar and a state (SLS rather) that can handle that)
09:23 babilen So if a state can be applied multiple times it should be written in a way that this is supported from the start
09:24 babilen The case where you provide a list with a single element is no different from the case in which you provide multiple in a way
09:26 Tyrant The difference is in how you view states/sls. Looks like I had the wrong picture in my head.
09:29 GMAzrael joined #salt
09:30 zerocoolback joined #salt
09:53 hoonetorg joined #salt
09:53 johnj joined #salt
09:56 netcho joined #salt
09:58 frygor_ joined #salt
10:17 _KaszpiR_ joined #salt
10:18 daxroc Morning all
10:19 daxroc can you pass parameters to orchestration runners ?
10:21 daxroc salt-run state.orch orch.deploy pillar= duh!
10:21 johnj joined #salt
10:36 coredumb daxroc: https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.state.html#salt.runners.state.orchestrate
10:37 daxroc @coredumb cheers - seen that after posting Thanks.
10:37 daxroc accepts the normal pillar= param
10:38 pualj joined #salt
10:41 dnull joined #salt
10:42 pualj joined #salt
10:42 netcho hi all
10:43 netcho what a wonderful day for orchestrating :D
10:43 Church- joined #salt
10:45 coredumb netcho: you mean because it's raining outside?
10:45 coredumb :P
10:45 netcho pretty sunny over here :P
10:49 golodhrim|work joined #salt
10:51 schasi Hi
10:52 schasi It rained heavily here, now it's just dark
10:52 schasi Perfect day for system administration ;-)
10:53 babilen Scotland is bathed in Sunshine today
10:54 pualj joined #salt
10:54 * babilen will go hiking over the weekend
10:56 maestropandy joined #salt
10:58 schasi Nice
10:59 babilen We need more people in #salt-offtopic
10:59 schasi When defining salt-cloud settings in pillars, in which file would I do that? I tried configuring it in a cloud.sls, but now get that my profile is not defined
11:02 schasi This is how my cloud.sls looks: https://gist.github.com/schasi/1d69d890bee26b1af76493e8795c473a
11:09 maestropandy joined #salt
11:09 maestropandy Hi
11:10 maestropandy Pls let me know salt channel for Reclass-saltstack / Formula saltstack
11:10 babilen There isn't one
11:10 babilen (or rather: this is it)
11:12 colttt joined #salt
11:12 pualj joined #salt
11:15 netcho schasi: shouldn't this be just ovirt? https://gist.github.com/schasi/1d69d890bee26b1af76493e8795c473a#file-cloud-sls-L14
11:15 schasi netcho: indeed
11:16 netcho i don't quite get `When defining salt-cloud settings in pillars,`
11:17 maestropandy joined #salt
11:17 maestropandy Pls let me know salt channel for Reclass-saltstack / Formula saltstack
11:17 maestropandy I am beginner to saltstack.. i want to do task in reclass,, please let me know how i can start ?
11:18 johnkeates joined #salt
11:18 babilen maestropandy: As I said: There isn't a specific channel and you are free to ask your questions here.
11:18 babilen Not that many people use reclass though, so you might not necessary get timely answers (but we shall see)
11:18 schasi You can specify providers and profiles in /etc/salt.cloud.pro(viders|files)
11:19 netcho yes
11:19 schasi Apparently you can also specify those settings in pillars
11:20 schasi Which I would prefer, beause I have everything in one place then
11:20 netcho not sure if you can populate profiles from pillar>
11:21 netcho pillar data is used by minions, salt-cloud runs on master
11:21 schasi At least it says so here: https://docs.saltstack.com/en/latest/topics/cloud/config.html#pillar-configuration
11:21 schasi I just don't know how to run/test it.
11:23 maestropandy okay thanks, accepted many are using,  I have installed reclass with salt.. being as excersise.. I am trying to create apache on one minion node using reclass by changing apache default ports to 83 from 80.. how to write reclass
11:24 maestropandy @babilen >> okay thanks, accepted many are using,  I have installed reclass with salt.. being as excersise.. I am trying to create apache on one minion node using reclass by changing apache default ports to 83 from 80.. how to write reclass
11:24 * babilen is one of those people that don't use reclass
11:25 schasi I tried "salt <someminion> cloud.profile <profile> <new_vm_name>", but that gave me "Profile <profile> is not defined". Hmmm...
11:25 netcho schasi: what is your final goal
11:26 justan0theruser joined #salt
11:26 schasi I have all my states and pillars in one place right now and would like the same for the providers and profiles
11:26 schasi As it is one git repository which can be easily checked out on a new master, bringing everything needed with it
11:31 netcho put your provider/profiles in that repo too
11:31 GMAzrael joined #salt
11:32 schasi So a workaround, I guess.
11:32 schasi Or can I specify in the master config where the cloud dirs will be found?
11:33 nahkiss Eh, after updating to 2017.7.1 I've started getting "Minion did not return. [No response]" from my minions after I apply state to a large amount of minions, any ideas? Targeting to smaller groups seems to work just fine.
11:34 netcho you can either change file_roots in master config or add everythint to repo and them symlinks around for master/cloud stuff
11:38 netcho i have everything i /srv  ... salt,pillar,master
11:39 schasi file_roots are already changed, but don't seem to apply to configuration files
11:39 schasi I think they just apply to states (like pillar_roots to pillars)
11:40 justanotheruser joined #salt
11:42 netcho schasi:  my repo is in /srv .. there i have master dir where is my master config, cloud maps,providers,profiles...
11:42 netcho file_roots aare defualtr
11:43 schasi Interesting. Hm. Maybe I should try to move the config
11:43 netcho in /etc/salt i have symlinks to /srv/master ...
11:43 schasi Ok, that explains a lot :) Was just thinking. So I guess symlinks it is then.
11:44 netcho ls /etc/salt .... cloud.providers.d -> /srv/master/cloud.providers.d
11:44 netcho workaround you may say
11:44 netcho but it works for now
11:46 N-Mi joined #salt
11:46 N-Mi joined #salt
11:47 maestropandy babilen: may i know answer
11:48 maestropandy any one worked on reclass ?
11:48 zerocoolback joined #salt
11:49 netcho not me
11:58 dalom joined #salt
11:59 dalom It seems __env__ is not defined to the pkg state when called from a custom execution module: __states__['pkg.installed']('<package>'), could that be a bug?
12:00 dalom In pkg.py: 1444     kwargs['saltenv'] = __env__
12:00 dalom But when running, it fails: File "/usr/lib/python2.7/dist-packages/salt/states/pkg.py", line 1444, in installed
12:00 dalom NameError: global name '__env__' is not defined
12:01 dalom Running the same state from a custom state does not fail. Seems the __env__ variable is available in states, but not in modules.
12:01 daxroc Should a request for jobs.active take > 5 minutes?
12:02 daxroc at most there are < 10 jobs active with at most < 100 hosts in the job.
12:13 Nahual joined #salt
12:22 schasi Is __states__['somekey'] how you get a variable that is defined in a state? Would that also work from a module within salt-cloud?
12:36 johnkeates does salt-ssh not support pillar.data / pillar.items?
12:36 dnull joined #salt
12:37 GMAzrael joined #salt
12:42 canta joined #salt
12:42 AvengerMoJo joined #salt
12:51 oyvindmo joined #salt
12:52 daxroc After setting a variable in jinja how do I interpolate  that in another jinja block  e.g. {% set target="G@...." %} {% set public = salt[]('mine.get',tgt=target+'and G@ec2_roles:example'....
12:52 XenophonF is there a setting that forces salt-minion on windows to canonicalize hostnames to all lower case?
12:52 daxroc is + concatenation the correct method here ?
12:53 daxroc guess I could use "".format()
12:53 XenophonF daxroc: use ~ instead which guarantees type conversion, or use |format (which is the Jinja way)
12:54 daxroc XenophonF: can you mock a simple jinja example
12:55 hemebond left #salt
12:55 netcho daxroc: just use it as variable in another jinja block
12:55 XenophonF no but I can point you toward TFM: http://jinja.pocoo.org/docs/dev/templates/#list-of-builtin-filters, scroll down to format in that list
12:55 XenophonF and here's the doc for the ~ operator: http://jinja.pocoo.org/docs/dev/templates/#other-operators
12:56 netcho daxroc:  is this waht you mean> {% for name in instance_list %} .... {% set instance_id = salt['boto_ec2.get_id'](region='us-east-1', name=name) %}
12:57 gh34 joined #salt
12:58 daxroc {%- set example = salt['saltutil.runner']('mine.get', tgt="{cluster} and G@ec2_roles:cheese".format(cluster=cluster), fun='private_ips', tgt_type='compound').values()|first|default([]) %}
12:59 XenophonF "{cluster} and G@ec2_roles:cheese"|format(cluster=cluster) is the Jinja way
12:59 daxroc sweet
12:59 XenophonF also i'm not sure you can use format like that
12:59 XenophonF prob has to be positional but again, check TFM
13:00 XenophonF I think it calls the old % operator in the implementation of the filter
13:00 XenophonF when in Jinja I try to avoid writing Python
13:01 XenophonF that way differences between py2 and py3 don't come back to haunt you
13:01 XenophonF so e.g., |dictsort instead of .items() or .iteritems()
13:02 KennethWilke joined #salt
13:02 XenophonF and |format, and others
13:02 XenophonF of course that isn't always possible
13:02 XenophonF so YMMV
13:07 numkem joined #salt
13:11 Brew joined #salt
13:15 Ch3LL joined #salt
13:15 vb29 joined #salt
13:15 daxroc Thanks
13:15 vb29 Hi
13:16 vb29 I have salt-2017.7.1 installed
13:17 vb29 I have an environment where MySQL servers are geographically separated. Is it possible to declare multiple mysql hosts in minion configuration file?
13:18 dnull joined #salt
13:26 rpb joined #salt
13:34 babilen vb29: I'm not exactly sure what you are trying to achieve. Could you elaborate a bit more?
13:35 colttt joined #salt
13:40 zerocoolback joined #salt
13:44 vb29 To connect to mysql we need to add mysql host, user, password, port in minion configuration file....Now I have multiple mysql servers  and they all have different data stored on them....I want to fetch the data based on my need and I would like to connect to any of those servers whenever I want
13:44 netcho using mine?
13:45 babilen vb29: You'd do that by targeting different configurations in the pillar to the respective minion. See https://github.com/saltstack-formulas/mysql-formula for suitable states and https://docs.saltstack.com/en/latest/topics/tutorials/pillar.html for details
13:45 babilen For getting information about these mimions/servers you'd use the mine and access it via mine.get
13:47 vb29 thanks for the reply.....Could you please give a small example..I didn't understand the mine part
13:47 babilen The mine essentially allows you to define information you want to sent to the master. Once it's "in the mine" you can query it from other minions with mine.get
13:48 mchlumsky joined #salt
13:48 babilen You can target these minions with all the power of compound matchers (you could, for example, "tag" them with pillar or grains data)
13:48 babilen https://docs.saltstack.com/en/latest/topics/mine/ would be the documentation
13:49 vb29 thanks! will check it out
13:49 babilen Let me paste an example
13:50 keltim joined #salt
13:50 vb29 that would be great! :)
13:51 babilen http://paste.debian.net/983870/ for example
13:52 babilen That "saves" ip addresses of minions in the 10.0.0.0/8'
13:52 babilen range to the mine and you can query these addresses with mine.get (here exemplified in the pillar, but can be used in states/templates also)
13:53 babilen You can target these minions in whichever way you want in line 10 (cf. https://docs.saltstack.com/en/latest/topics/targeting/compound.html - pillar data, grains data, globbing, regular expressions, combinations of the former, ...)
13:54 babilen And you can "send" the output of any execution module function to the mine by configuring it as mine function alias
13:55 babilen To activate the mine function I define the above data in pillar and target it to my minions (these generic functions are targeted to all)
13:56 vb29 That's a lot of info :)
13:57 vb29 Thanks!
13:57 vb29 I will go through it and see if I can get it to work
13:59 babilen Have fun, feel free to ping if you have further questions
14:00 vb29 sure! Thanks a lot
14:01 babilen In states and/or templates you don't need the runner, but you'd call mine.get directly: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html#salt.modules.mine.get
14:02 babilen I'd start with an easy mine function alias and a few manual calls to mine.update, mine.get and so on from the command line
14:03 babilen Then decide which data you need, how to get that into the mine and how to "tag" / "target" the minions in question
14:06 noobiedubie joined #salt
14:07 Church- joined #salt
14:08 Church- joined #salt
14:10 ChubYann joined #salt
14:12 Church- joined #salt
14:12 racooper joined #salt
14:13 ssplatt joined #salt
14:15 dxiri joined #salt
14:15 dunz0r joined #salt
14:20 jschoolcraft joined #salt
14:28 simon_c joined #salt
14:29 Kelsar joined #salt
14:29 wavded joined #salt
14:32 vb29 left #salt
14:35 azul joined #salt
14:36 jas02 joined #salt
14:38 sarcasticadmin joined #salt
14:41 GMAzrael joined #salt
14:45 cgiroua joined #salt
14:47 wccropper joined #salt
14:47 fatal_exception joined #salt
14:48 wccroppe_ joined #salt
14:50 spuder joined #salt
14:54 skatz joined #salt
14:56 skatz Is it possible to set a minion's saltenv in pillar without having to modify the minion conf file? It looks like just setting `environment: my_saltenv` in pillar doesn't change the saltenv but putting that in the minion conf file does change it.
14:56 ccha with grains['fqdn_ip4'] I got 172.16.1.100 how can I trim it with jinja to 172.16.1 only ?
14:58 simon_c left #salt
14:59 skatz ccha: {{ grains['fqdn_ip4'].split('.')[:-1] | join('.') }} should do it
15:00 babilen ccha: What are you really trying to do?
15:00 babilen (skatz' snippet works though)
15:01 rgrundstrom_home joined #salt
15:01 rgrundstrom_home Good afternoon
15:01 ccha babilen: I will it
15:01 wavded joined #salt
15:03 ccha babilen: Infact I need to set a variable in pillar which is the network ip part of all server with at the end part X.X.X.248
15:04 babilen Would it make sense to use CIDR instead?
15:05 preludedrew joined #salt
15:09 vb29 joined #salt
15:12 aleph- joined #salt
15:13 pualj joined #salt
15:15 babilen The above is pretty much a hack (that does exactly what you want) that relies on a specific network setup
15:16 omie888777 joined #salt
15:18 huddy joined #salt
15:18 zerocoolback joined #salt
15:21 Church- joined #salt
15:24 ccha babilen | Would it make sense to use CIDR instead? < how can you do that ?
15:25 babilen What are you doing with the above information?
15:26 ccha the X.X.X.248 will be set in a jinja template file
15:26 babilen Sure, but whatfor?
15:29 ccha for zabbix agentd conf the server=X.X.X.248 part
15:31 onlyanegg joined #salt
15:31 babilen Do you have a reference to the zabbix docs for that particular setting?
15:33 jas02 joined #salt
15:33 jshm joined #salt
15:33 spuder joined #salt
15:35 numkem joined #salt
15:42 aleph- joined #salt
15:44 wavded joined #salt
15:45 jas02 joined #salt
15:47 mikecmpb_ joined #salt
15:47 keltim joined #salt
15:48 jas02_ joined #salt
15:50 pualj joined #salt
15:50 jas02 joined #salt
15:51 gtmanfred wccropper: what did you install this on?  https://gist.github.com/wccropper/4f060c63455331e70b5d748bab7ee2ee I have never seen anything like that before, might be nuking the machine and seeing if it happens again?
15:52 jas02_ joined #salt
15:53 onlyanegg joined #salt
15:55 DanyC joined #salt
15:55 jas02 joined #salt
15:55 tiwula joined #salt
15:56 * rgrundstrom_home feels like a noob.....
15:57 gtmanfred welcome to salt!
15:57 rgrundstrom_home 10 years of Linux experience.... Tried FreeBSD.... A world of diffrence
15:57 gtmanfred oh yeah, you should see me troubleshooting freebsd issues on github
15:57 rgrundstrom_home gtmanfred: Salt i can manage :)
15:57 jas02__ joined #salt
15:57 woodtablet joined #salt
15:58 rgrundstrom_home Hmmm concidering my options.... Learn a new OS or just ignore it..... Hmmmmm
15:58 gtmanfred pretend it doesn't exist!
15:58 DanyC joined #salt
15:59 rgrundstrom_home Kinda hard in my line of work
15:59 gtmanfred yeah
15:59 rgrundstrom_home BSD is still one of if not the most secure.
16:07 jas02 joined #salt
16:07 mikecmpbll joined #salt
16:08 jas02 joined #salt
16:09 jas02 joined #salt
16:12 jas02 joined #salt
16:15 bluenemo joined #salt
16:15 jas02_ joined #salt
16:16 jas02_ joined #salt
16:17 shanth_ joined #salt
16:19 jas02 joined #salt
16:22 overyander joined #salt
16:23 DammitJim joined #salt
16:25 nkrshna joined #salt
16:25 maestropandy joined #salt
16:25 maestropandy left #salt
16:27 ooboyle joined #salt
16:34 skatz joined #salt
16:35 ooboyle joined #salt
16:37 vexati0n i have salt 3 salt masters -- 1 primary, and 2 syndics that report to the primary. minions are connected to all 3. The primary maintains a cache of all the minion info, and it works fine for everything except the 2 syndic masters... there's no cached grains for those. anyone have any idea why?
16:39 ooboyle is there a way to create an .sls file package definition that uses grains to match a Windows OS version (e.g., w2k3, w2k8r2 etc...) to a specific installer? I have an example of how to do so within a version but not sure if I can apply the same strategy globally in the .sls file.
16:41 gtmanfred wrap the whole state file in an if statement
16:41 gtmanfred vexati0n: are there minions running on the syndics connected to something? or is it just the syndics connected?
16:41 vexati0n the minions on the syndic masters are configured to point to 'localhost'
16:42 gtmanfred hrm, then i don't know
16:42 vexati0n everything works fine, but the syndic masters themselves don't seem to cache their own local minions' grains... even tho they do cache remote minions' grains just fine
16:42 cyborg-one joined #salt
16:42 ooboyle @gitmanfred thanks. So the version blocks would just be the if and elif options?
16:42 gtmanfred yeah
16:42 ooboyle cool, thanks!
16:43 gtmanfred vexati0n: and I am in the middle of triaging a different issue right now and can't test this one,if someone else doesn't come along could you open an issue on github with some steps to reproduce this behavior?
16:43 vexati0n yeah, i will. thanks
16:43 gtmanfred Vagrantfile would be appreciated if possible https://github.com/utahdave/salt-vagrant-demo
16:44 GMAzrael joined #salt
16:48 shanth__ joined #salt
16:52 aneeshus1 joined #salt
16:55 shanth_ joined #salt
16:58 Church- joined #salt
17:02 ooboyle @gtmanfred this is for a winrepo package. can I put a global install_flags: line after the endif so that it applies to all versions?
17:05 bowhunter joined #salt
17:07 nkrshna joined #salt
17:09 gtmanfred ooboyle: yes
17:12 ooboyle awesome, thanks!
17:16 shanth_ joined #salt
17:18 ecdhe joined #salt
17:18 wccropper @gtmanfred the issue was not salt, the python was broken. running "python -m pip install --upgrade --force pip;  pip install setuptools==33.1.1" fixed the issue
17:18 gtmanfred cool
17:24 cholcombe in my grains.items for ubuntu xenial i'm seeing some strange entries.  For rhel 7.2 I see the manufacturer as: Supermicro.  For ubuntu I see it as:    manufacturer:
17:24 cholcombe Supermicro
17:24 cholcombe Invalid entry length (16). Fixed up to 11.
17:24 cholcombe anyone else seen this?
17:26 gtmanfred dmidecode is broken iirc
17:26 gtmanfred https://github.com/saltstack/salt/issues/40044
17:26 cholcombe gtmanfred: yeah it's def a dmidecode issue
17:27 gtmanfred yup, that is a known issue, add info to that issue if you want, not much we can do about it i am afraid
17:28 cholcombe how would you match against that in an sls file is what i'm wondering
17:28 cholcombe or is it impossible to match against it?
17:30 gtmanfred that is going to be a problem,if you wanted to submit a PR that looks for that string, and strips it out, that would be greatly appreciated, but it is not anywhere near a priority right now
17:30 cholcombe ok
17:31 rylnd is there a reason anyone could think of why the salt-minion would "take a break" of 5 minutes before it continues to carry out jobs? i cant see or find anything special at all. but the minion seems to carry out one job, then takes a break, and then continues 5 minutes later
17:31 cholcombe also this is a newbie question.  How do I install a package that I've downloaded to the salt server?  I'm trying this: https://gist.github.com/cholcombe973/8c8b79160a022cd05bbfb0887b0492af but it's not working.
17:34 whytewolf cholcombe: you need a seperate state for the ones that you have different sources for. and you use sources instead of pkgs
17:34 cholcombe whytewolf: i see
17:35 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed has a lot of info, so it is wise to read it carefully about all the options pkg.installed has
17:36 cholcombe thanks whytewolf
17:36 NightMonkey joined #salt
17:36 whytewolf sources can be "fun" since you have to list the package name with the source. and if the package name doesn't exactly match what the pkg system has listed, it will install the package and not know that it is installed
17:37 cholcombe lol that's bad
17:38 whytewolf no real way to get around it. salt talks to the pkg manager so if the package manager doesn't know that pkg-x is really pkg-y
17:39 sh123124213 vexati0n: you only get grain cache from the minions connected to the master
17:40 ooboyle i'm getting the following errors when I run pkg.refresh_db on w2k3 minions with 2015.8.12 installed: https://pastebin.com/raw/bx09exuH
17:40 ooboyle any ideas why?
17:40 sh123124213 vexati0n : if you would like to have grains cache you would need to cache in a shared storage key/value db
17:40 sh123124213 vexati0n: like etcd, consul etc
17:41 whytewolf sh123124213: i think he is saying that the minions on the syndic masters are not even grain cacheing to themselves.
17:42 sh123124213 those minions are not connected to any masters so its normal the master not being able to cache them since it doesn't see them as a minion.
17:43 whytewolf sh123124213: they are connected to the syndic master.
17:43 sh123124213 "The syndic masters themselves are running local minions,"
17:43 whytewolf localhost
17:43 whytewolf and are not putting grain caches in the syndic master grains cache
17:43 sh123124213 ahm, still you would only be able to see the cache from the syndics not the masters
17:44 sh123124213 if you connect syndics minions to the top level masters then you would be able to see their cache
17:44 sh123124213 but not the cache of the minions that are connected to the syndics
17:44 dxiri_ joined #salt
17:44 whytewolf i don't think he is talking about the grain caches in the top level master. i think he said that he can't get the grain data on the syndic masters even
17:45 sh123124213 "except that there is no cached grains on the primary master for the syndic masters' minions"
17:46 whytewolf ahhh. i did miss that, i am mistaken
17:46 whytewolf although cache data should propigate up from syndics to the master or masters
17:47 sh123124213 not possible as far as I know
17:47 sh123124213 because the top level masters don't know what minions the syndics are connected to
17:48 sh123124213 I guess somebody could add the option to sent the cached data to the top level masters ...
17:48 whytewolf that shouldn't matter.
17:48 sh123124213 but atm its not implemented :)
17:48 whytewolf don't need to know where something is to have data from it
17:49 sh123124213 not saying that its not possible to be implemented, just saying its not an option now
17:49 sh123124213 there is a github ticket about it as I remember
17:50 sh123124213 and they decided that if somebody wants to have that they should use an external grain cache db
17:51 wavded joined #salt
17:52 Hybrid joined #salt
17:52 sarlalian joined #salt
17:54 vexati0n sh123124213: "you only get grain cache from the minions connected to the master" -- this is obviously not true, because i DO get cached grains for minions that are connected to downstream syndic masters. They are not connected to the primary, yet their grains are cached all the same.
17:54 sarlalian joined #salt
17:54 vexati0n the only minions that don't have cached data are the syndic masters themselves.
17:55 sh123124213 vexati0n: how do you check for cached grains ?
17:55 vexati0n salt-run cache.grains
17:55 sh123124213 vexati0n: ok, so you are telling me that if you run that from a top level master for a minion connected to a syndics you get the cached grains ?
17:55 vexati0n yes.
17:56 sh123124213 vexati0n: I tried that 1 week before and I only get grains from syndics. please double check
17:59 vexati0n ok, maybe you are right :/
17:59 sh123124213 I want more than maybe :P
18:00 vexati0n ok you are right. so... the cache only works for minions connected directly to a master. what good are syndics, then? If I want to get a list of all my minions, i really have to wait for a test.ping from everything... and even then, i still won't get a hit (or a miss) for anything that happens to be offline
18:00 vexati0n srsly why would they design it this way, that's absolutely useless
18:01 vexati0n I can't create a shared cache, because the syndics are spread out in different AWS regions
18:03 sh123124213 vexati0n: I wrote to you that its possible to create a shared cache if you have it in an external db
18:03 sh123124213 vexati0n: like consul, etcd ..
18:04 vexati0n yes but i'm not going to put my shared cache on the internet
18:05 sh123124213 vexati0n: why would you ? all the above have auth
18:05 sh123124213 you can have vpn between your syndics and masters
18:05 sh123124213 or maybe you can write a pr that every time a something is cached sent it to the masters
18:06 vexati0n maybe
18:06 vexati0n but I don't python
18:06 sh123124213 then you can change your github ticket to a feature request :)
18:06 vexati0n maybe i'll use redis, we have that laying around doing nothing. i'm sure it's thoroughly documented in the salt docs.
18:07 sh123124213 vexati0n: I'm sure you can use redis but I think its not the best option
18:08 sh123124213 while I was thinking for a solution I though consul would be a perfect fit for this since its datacenter aware and has decent auth options
18:09 vexati0n i do not have time to learn a whole new thing i just found out about.
18:10 _JZ_ joined #salt
18:10 sh123124213 you can always target syndics and get the cache from their minions and process it :)
18:12 coredumb sh123124213: just asking cause I've not digged up syndics yet but isn't it possible to use the mine?
18:12 vexati0n gah. that's a lot of work for something that should be a one-liner. asking salt "which minions do i own?" shouldn't be this much of a hassle.
18:13 coredumb or is the mine not shared between syndics and mom?
18:14 rylnd whytewolf: i think sh123124213 is right. we have a similar problem in our environment and at the time we were told to use for example consul as a remediation
18:14 nixjdm joined #salt
18:15 sh123124213 mine is just a method of caching stuff on the masters regularly. maybe you can have a function that caches grains from minions from the top level masters to the syndics otherwise its not usefull
18:15 whytewolf rylnd: i admitted i was wrong, what more do you want blood? [jk]
18:15 rylnd whytewolf: fight fight fight ;-)
18:16 ooboyle i'm getting the following errors when I run pkg.refresh_db on w2k3 minions with 2015.8.12 installed: https://pastebin.com/raw/bx09exuH
18:16 ooboyle any idea why?
18:16 coredumb sh123124213: yeah ok
18:18 mikecmpbll joined #salt
18:20 sh123124213 vexati0n: I'm not sure what you want to achieve, if you want to describe maybe I can help
18:20 brianthelion joined #salt
18:21 sh123124213 vexati0n: "which minions do i own?" : every response on the event bus coming from a syndic is marked with the syndic id
18:22 sh123124213 if you tempered with the the cli command that sends commands you could output that specific field
18:23 sh123124213 but if you ask me the purpose of the syndic is that you don't care where it came from
18:25 swa_work joined #salt
18:26 sh123124213 ooboyle: you should probably create a github ticket for that error. Tracebacks should not appear in cli commands
18:27 sjorge joined #salt
18:28 lordcirth_work What is the "oldest stable" that bugfixes/docs PRs should be made against?
18:29 ooboyle @sh123124213 grrr. ok, thanks. I'll do that
18:29 whytewolf lordcirth_work: currently i think that would be 2016.11
18:30 lordcirth_work whytewolf, thanks!
18:31 obscuras joined #salt
18:32 cgiroua joined #salt
18:38 whytewolf Always two there are; no more, no less. A master and an apprentice.
18:39 noobiedubie joined #salt
18:40 schemanic joined #salt
18:40 vexati0n welp. tried to use cache: redis_cache, but of course, it just crashes the master
18:40 vexati0n so that's cool
18:41 shanth_ joined #salt
18:44 skatz joined #salt
18:45 vexati0n "cache: redis_cache" in the master config causes salt to blow up, and the stacktrace shows a bunch of "python can't find Consul" nonsense. which is weird, because "redis_cache" is not "consul"
18:45 schemanic Hello, does anyone know any good formulas for setting up gpg rendering between master/minion? I'm reading that I need python-gnupg to do that, so I figure a formula that manages pip modules would be what I should turn to
18:46 GabeBrodbeck joined #salt
18:51 sjorge joined #salt
18:53 alvinstarr joined #salt
18:57 GMAzrael joined #salt
18:58 rylnd this break taking minion really starts to aggravate me.
19:01 wavded joined #salt
19:03 sh123124213 vexati0n: i'm dure you will figure it out
19:03 sh123124213 dure/sure
19:07 sh123124213 maybe only consul is supported atm*
19:07 gh34 joined #salt
19:09 vexati0n They should not put settings for redis in the docs for the current version then
19:11 sh123124213 if they have its probably support but I checked master config it only shows consul
19:13 sh123124213 for sure if you would want to use redis you would need to add the redis python module
19:14 hoonetorg joined #salt
19:17 viq schemanic: do you mind whether master has access to the decrypted data?
19:18 Eelis what are some typical examples of servers that one would /not/ want to manage through salt stack?
19:19 sh123124213 Eelis: servers that are in dmz and make outside connections to a master
19:19 viq Eelis: off? ;)
19:20 viq sh123124213: eh?
19:20 lordcirth_work sh123124213, I would configure a VPN on those if I was paranoid, then still use Salt
19:21 wavded joined #salt
19:22 carrot joined #salt
19:23 Eelis sh123124213: hmm, interesting
19:23 Eelis viq: i'm not sure what "off" means in this context
19:24 ooboyle @sh123124213 well... bug closed in 41 minutes. They won't look at it because it's EoL
19:24 viq Eelis: servers that are off, turned off, powered down ;)
19:25 Eelis ah, i see
19:25 carrot hi all. I'm new to salt, trying to figure out how to get a xenial cloud image going with "virt.init" - running this starts a new VM up but the test ping fails: "sudo salt "nibble" virt.init bunnycloud-test-1 2 512 https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img enable_vnc=True --log-level=all"; two other (manually set up) minions working fine otherwise
19:25 carrot wondering if I've misunderstood something, struggling to find examples in the docs
19:25 viq Eelis: making a nonsensical joke ;)
19:32 nixjdm joined #salt
19:33 high_fiver joined #salt
19:36 preludedrew joined #salt
19:41 whytewolf sh123124213: i would go masterless on dmz server, or as lordcirth_work said use a vpn. or even a seperate master setup that lives in the dmz. but the servers i would want most to be goverend by salt would be dmz server.
19:42 lordcirth_work carrot, do you get any useful output?
19:43 lordcirth_work carrot, also check /var/log/salt/master on master, and ./minion on this minion "nibble"
19:43 carrot not that I can see, no - not on the virt.init, it just says "True" as expected, and looking at the VNC console it has loaded, but no user prompt or anything
19:44 carrot oh the master log has useful output
19:45 sh123124213 what I wanted to say is that salt pulls from masters, if your servers are in a zone that minions cannot connect directly to the masters but you can have the other way around then I would suggest to use something else
19:48 hatifnat1 left #salt
19:49 hatifnatt joined #salt
19:51 carrot lordcirth_work: "Request to sign key for minion 'bunnycloud-test-1' on hyper 'nibble' denied: no authorization" which is interesting
19:51 carrot because as far as I can see it says libvirt keys and stuff are fine? https://gist.github.com/CarrotCodes/061660acba0dfe7884623996664364e0
19:53 lordcirth_work carrot, I think you want to use the runner virt.init, not the module
19:54 oida_ joined #salt
19:54 lordcirth_work Try: salt-run virt.init host=nibble bunnycloud-test-1  2  512   https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img enable_vnc=True
19:57 carrot that has different output at least, I'll run it and see what happens, thanks
19:58 carrot huh that ended suspiciously quickly, and the vm isn't running
19:58 carrot said "good" at the end though haha
20:00 frygor_ joined #salt
20:00 pualj joined #salt
20:01 dev_tea joined #salt
20:03 carrot also seems like it didn't listen to enable_vnc
20:08 cholcombe joined #salt
20:09 lordcirth_work carrot, so runners are executed on the master, and this particular runner will call the *module* lxc.init on the minion like you are doing, but it is supposed to handle things like the keys as well
20:10 lordcirth_work carrot, you should probably delete all trace of the test vm, or change the name of the new one, and run again
20:15 WesleyTech joined #salt
20:15 oida_ joined #salt
20:16 pualj joined #salt
20:16 hatifnatt Hi. What kind of type will return grains.filter_by if there is no match? Empty dict, 'None' or something else?
20:17 johnkeates joined #salt
20:17 whytewolf hatifnatt: if you don't have a default setup? i believe None [or what ever is in the merge
20:18 pualj joined #salt
20:18 _KaszpiR_ joined #salt
20:19 whytewolf if you have a dict named default in the dict that it is scanning that will be returned [default is the default]
20:20 hatifnatt whytewolf: Im agin using grains.filter_by unusual way.
20:20 hatifnatt *I'm again
20:20 whytewolf how unusual?
20:20 hatifnatt I want filter data from pillar based on key name.
20:22 numkem joined #salt
20:23 hatifnatt So I'm using it like that salt['grains.filter_by'](pillar_dict_var, default="key_name")
20:24 pualj joined #salt
20:24 whytewolf I ... why ....
20:24 hatifnatt :) There is better way?
20:26 whytewolf salt.pillar.get('location of pillar_dict_var' ~ key_name,default if it doens't exist)
20:26 whytewolf your just pulling data with what you have anyway
20:30 hatifnatt whytewolf: I think we have misunderstanding.
20:30 nixjdm joined #salt
20:30 whytewolf well with what you posted. that is pretty much all your doing.
20:31 tommyfun__ joined #salt
20:34 GMAzrael joined #salt
20:35 hatifnatt whytewolf: Yes, you right, someting wrong with me...
20:36 onlyanegg joined #salt
20:44 cain_ joined #salt
20:50 Rubin joined #salt
20:52 GMAzrael joined #salt
20:53 sh123124213 joined #salt
21:02 dnull joined #salt
21:12 hemebond joined #salt
21:13 carrot lordcirth_work: no luck. "sudo salt-run virt.init bunnycloud-test-30 2 512 https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img host=nibble enable_vnc=True seed=True install=True --log-level=all"
21:13 carrot this defines a domain, but doesn't start it, and doesn't appear to actually enable VNC
21:20 preludedrew joined #salt
21:21 cain_ joined #salt
21:22 cain_ Hey, i have a command in salt to recursively set permissions in a directory, and i want to ensure the next state in the file (service.running) does not execute until this has completed, what do I need to do? Something like `require: file.directory: <directory_name>` ?
21:24 vexati0n require: file: <name of the state that sets the permissions>
21:25 cain_ aha, thanks
21:26 vexati0n not all on one line of course
21:26 vexati0n file: <statename> is a child of "require"
21:27 cain_ Yeah of course
21:31 nixjdm joined #salt
21:33 pualj joined #salt
21:46 SneakyPhil does anyone here use the thorium reactor engine?
21:47 SneakyPhil If so, has anyone managed to catch an event with   check.contains  and then file off a local.cmd with func: cmd.run
21:47 SneakyPhil this seems impossible to me
21:55 pualj joined #salt
21:59 vexati0n uggh. Syndic will not stop ruining my life. Why is it that I can ssh to my Master-of-masters, and run "salt -C 'server*' test.ping" and get a response back from everyone, but if I do the *exact same thing* through the rest_cherrypy, it will only return minions that are directly connected to the MoM ?
22:04 spuder joined #salt
22:06 xet7 joined #salt
22:08 dnull joined #salt
22:11 pualj_ joined #salt
22:26 usernkey joined #salt
22:27 SneakyPhil ok so after a couple minutes it finally decided to start working
22:34 carrot there's a "fun" bug floating around with "virt.purge" - it couldn't find an image (I edited manually with `virsh edit domain`), so it nuked the entire folder, which seems reasonably problematic...
22:34 carrot as in it deleted /var/lib/libvirt/images instead
22:36 shred joined #salt
22:40 michelangelo joined #salt
22:44 shred left #salt
22:48 coredumb carrot: ouch
22:57 GMAzrael joined #salt
23:01 jessexoc joined #salt
23:09 pualj_ joined #salt
23:14 hatifnatt It looks like simple task, but how populate ditctionary with variables in Jinja?
23:14 MTecknology typically, you don't want to
23:15 MTecknology {% set
23:18 hatifnatt MTecknology: typically yes, I don't. Bu I want put few common variables in map.jinja
23:25 cain_ joined #salt
23:29 hatifnatt Eh, again, I'm doing weird things, I can use import.
23:29 Church- joined #salt
23:58 Shirkdog joined #salt

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