Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-03-09

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

All times shown according to UTC.

Time Nick Message
00:06 mikecmpbll joined #salt
00:15 zerocoolback joined #salt
00:25 LostSoul joined #salt
01:02 hammer065 joined #salt
01:57 tys101010 joined #salt
02:01 shiranaihito joined #salt
02:35 onlyanegg joined #salt
02:55 zerocoolback joined #salt
02:57 ilbot3 joined #salt
02:57 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.4 <+> RC for 2018.3.0 is out, please test it! <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:07 packeteer joined #salt
03:10 exarkun joined #salt
03:14 onlyanegg joined #salt
03:22 onlyanegg joined #salt
03:26 amy_ joined #salt
03:50 bigjazzsound joined #salt
04:17 zerocoolback joined #salt
04:21 fuzzy joined #salt
04:22 hemebond joined #salt
04:22 whiteinge joined #salt
04:57 mechleg joined #salt
04:57 mechleg left #salt
05:09 fuzzy left #salt
05:10 Uni joined #salt
05:10 nielsk joined #salt
06:05 amy_ joined #salt
06:13 zerocoolback joined #salt
06:21 dnull joined #salt
06:25 exarkun joined #salt
06:37 LocaMocha joined #salt
06:40 exarkun joined #salt
06:44 zerocoolback joined #salt
06:57 om2 joined #salt
07:04 onlyanegg joined #salt
07:09 amy_ joined #salt
07:10 zerocoolback joined #salt
07:11 onlyanegg joined #salt
07:15 netcho joined #salt
07:15 netcho joined #salt
07:17 zerocoolback joined #salt
07:35 jhauser joined #salt
07:40 pf_moore joined #salt
07:41 jkaberg joined #salt
07:43 jkaberg is it possible to use the cherrpy rest api to tell the saltmaster to pull new pillar / states from git/disk ?
07:44 jkaberg thinking of makeing a hook in gitlab to call saltmaster when someone pushes to our master branch of both pillar and states
08:02 amy_ joined #salt
08:04 hemebond jkaberg: There is a runner to update git pillar, yes.
08:04 hemebond And you can call runners via the HTTP API, yes.
08:05 jkaberg hemebond: that cool. any documentation?
08:05 hemebond https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#usage
08:05 hemebond https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.git_pillar.html
08:05 jhauser_ joined #salt
08:05 jkaberg wow, thanks :-)
08:05 hemebond 👍
08:07 hemebond Of course, if your Git server is a minion it's even easier (using reactors and custom events)
08:07 jkaberg yeah i know about that one, however we have several saltmasters on different locations etc
08:07 jkaberg but they all use the same git... long story really
08:08 hemebond That sounds fine.
08:11 evle1 joined #salt
08:19 Tucky joined #salt
08:35 jrenner joined #salt
08:42 Naresh joined #salt
08:50 tuxawy joined #salt
08:52 aldevar joined #salt
08:54 Pjusur joined #salt
08:56 cewood joined #salt
09:02 inad922 joined #salt
09:13 zerocoolback joined #salt
09:23 zerocoolback joined #salt
09:25 masber joined #salt
09:26 aldevar joined #salt
09:30 zerocoolback joined #salt
09:32 xet7 joined #salt
09:50 xet7 joined #salt
09:53 zerocoolback joined #salt
10:06 esteban joined #salt
10:11 CrummyGummy joined #salt
10:14 sh123124213 joined #salt
10:28 GrisKo joined #salt
10:46 aldevar joined #salt
11:04 viq Erm, how do I template files that also in themselves use jinja templating? x_X
11:04 viq namely, prometheus alertmanager config
11:06 hemebond viq: do you have an example?
11:07 viq Looks like I may have both an answer and an example - https://github.com/salt-formulas/salt-formula-prometheus/blob/master/prometheus/meta/prometheus.yml for example line 56 should look *exactly* like that in rendered file
11:07 hemebond Ah, I thought I was in a different channel :-D
11:08 hemebond Yes, {% raw %}
11:08 jkaberg hemebond: when calling an runner via the rest API, is timeouts supposed to happend?
11:09 hemebond jkaberg: I suppose it could if your master was under a lot of load.
11:09 jkaberg right
11:12 Miuku Hrm. I wonder if there are any public case studies where people explain how they've implemented Salt as their infra management from scratch, including the actual implementation and examples.
11:22 jkaberg hemebond: hehe. fw issue, my bad.
11:23 hemebond Ah :-)
11:27 aldevar joined #salt
11:51 zerocoolback joined #salt
12:41 evle1 joined #salt
12:51 zerocoolback joined #salt
13:11 thelocehiliosan joined #salt
13:31 evle2 joined #salt
13:52 zerocoolback joined #salt
13:53 zerocoolback joined #salt
14:21 cgiroua joined #salt
14:27 cgiroua_ joined #salt
14:28 thelocehiliosan joined #salt
14:40 edrocks joined #salt
14:53 BitBandit joined #salt
15:11 thelocehiliosan joined #salt
15:41 thelocehiliosan joined #salt
15:44 tiwula joined #salt
15:48 englishm_work joined #salt
15:50 heaje joined #salt
15:54 amy_ joined #salt
16:06 nixjdm joined #salt
16:10 rjc joined #salt
16:51 alvinstarr joined #salt
17:08 zerocoolback joined #salt
17:12 dlloyd_ joined #salt
17:14 Trauma joined #salt
17:15 onlyanegg joined #salt
17:24 tuxawy joined #salt
17:30 nixjdm joined #salt
17:30 zildjan joined #salt
17:31 benner joined #salt
17:34 Edgan Miuku: I wish there were more, and more public salt formulas. I think both hold the community back.
17:41 Miuku Edgan: I'm just personally interested in how others have managed to setup their infra when you have to deal with multiple people maintaining the system and hundreds (or thousands) of vms with varying requirements.
17:43 frew joined #salt
17:43 Edgan Miuku: On the lots of systems, I can show you ways to have fine grained control over overrides.
17:44 Edgan Miuku: On multiple people, that gets more into workflow. Things like feature branches, pull requests, unit testing, etc.
17:44 Miuku Edgan: I'm in a lucky position, I have a clean slate to build things on "soon" so I'm in the planning phases.
17:45 Edgan Miuku: From what I have seen kitchen-salt is the most popular unit testing framework for Salt
17:45 Edgan Miuku: yeah, I have been there. I love green field. I am currently in a clean up all the tech debt mode.
17:46 Miuku On the other hand right now I'm trying to mop up legacy on top of legacy of more hideous legacy that no one understands.
17:46 Edgan Miuku: I really need to just rebuild our AWS VPCs from the ground up. But right now I am trying to get the existing ones into a what I would call usable state.
17:47 Miuku Edgan: This current case is "No automation, OF ANY KIND".
17:47 Edgan So I am busy switching to a more thought out host naming scheme, and switching one environment to it. Also setting up internal dns at the same time.
17:47 Miuku So everything is installed by hand and I need to figure out how to reel this catastrophe home :P
17:48 Edgan Miuku: That is my single biggest piece of advice. Have a good host naming scheme, serious salt pretty much requires it.
17:48 Miuku Edgan: I'll remember that :)
17:48 Edgan Miuku: This is because of how host matching work in the state top.sls and the pillar top.sls
17:49 Edgan Miuku: How many distributions and releases do you want to support in salt?
17:50 Miuku Edgan: This is the only good thing about all this; just one platform and various service packs in it, and I've packaged Salt myself so I have that under control.
17:51 Edgan Miuku: service packs, as in Windows?
17:51 Miuku Edgan: SLES, SUSE uses the same monicker for their patch levels.
17:51 Edgan ah
17:52 Edgan Miuku: How well do you understand Salt, Python, and Jinja?
17:53 Miuku Edgan: Decently, I've built my own infra for testing and even had to do so as part of getting a job. Hehe. All in all, I'm just interested in how people have managed to do this and if I could learn something from others.
17:54 Miuku Edgan: Mainly I have issues with trying to wrap my head around how I could effectively get the multi-admin versioning system to work.
17:54 Edgan Miuku: https://cygnusx-1.org/formula.txt   This is a rough template of my formula style. It allows you to have defaults, and layered overrides from pillars. Plus it allows you to have the variable name be foo.bar.password instead of pillars['foo']['bar']['prod']['server-01'].
17:55 Edgan Miuku: Most people don't really version salt code
17:55 Miuku Edgan: We are kinda used to git so I was wondering if I should just host all the files via our internal gitlab and allow pull to push modifications that way.
17:55 Edgan Miuku: If you need to make multiple versions of say nginx work, you try to make it work in one formula instead of one per version of nginx.
17:56 Edgan Miuku: yes, gitlab and git
17:56 Edgan Miuku: Salt has gitfs to auto pull changes from the git repo
17:56 Edgan Miuku: otherwise you git clone and have a cron git pull
17:56 Miuku Edgan: Yes I noticed that in the docs but I've yet to test it. It's on the roadmap :-)
17:57 Edgan Miuku: gitfs is much clearer and more automation friendly
17:57 Edgan Miuku: gitfs is much cleaner and more automation friendly
17:57 Edgan Wish irc worked like Slack
17:57 Miuku Soon no more IRC gateway in Slack :c
17:57 Edgan Haven't heard that
17:58 Edgan What is happening?
17:58 Miuku Yeah they're killing it.
17:58 Edgan Who? Why?
17:58 Miuku Hold on..
17:58 Miuku https://news.ycombinator.com/item?id=16539857
17:59 Edgan As I expected Slack
17:59 Edgan They really need to make it easier to switch Slack orgs
17:59 Miuku "Security" :D
18:00 Edgan I would use more Slack hangouts if it didn't make it hard to see my own company's Slack
18:00 Miuku I don't use Slack unless I'm absolutely forced to do so - I prefer Discord.
18:00 Edgan I have it too
18:01 Edgan I have Slack, IRC, Whatsapp, and Discord. Plus a little Hangouts and SMS.
18:02 Edgan I started talking to my GF on Whatsapp to mostly drop Hangouts. Still have a few friends on it.
18:02 Miuku :) Thanks for the hints, I'll take a peek at stuff and draw random squiggles on paper to see how I end up doing all of this.
18:02 Edgan Miuku: Most people have at least two branches for Salt.
18:02 Miuku Before all of that I have to reel in this current catastrophe. At least I get to do some server consolidation here :-)
18:03 Edgan Miuku: One is dev/staging, where you merge your code in when you think it is ready. Then a production/master branch when it has been throughly tested in an env pre-production.
18:03 Edgan Miuku: As you scale the need for feature branches and pull requests goes up
18:05 whiteinge If anyone's using IRCCloud, Daniel just enabled the newly announced Slack integration for the SaltStack Community workspace. So far it's pretty great.
18:06 Edgan whiteinge: I am curious, but need some context.
18:07 whiteinge https://www.irccloud.com/faq#faq-slack
18:07 whiteinge I've got both IRC and several Slack workspaces running in a single IRCCloud tab.
18:08 mikecmpbll joined #salt
18:10 Edgan whiteinge: How well does it emulate Slack?
18:10 whiteinge Quite well. Supports edits, code blocks, reactions, emoji, etc. Looks like they're trying to make it a pretty seamless switch.
18:11 whiteinge Threads too
18:12 MTecknology Miuku: I think they're all garbage. IRC.. the standard that hasn't changed in over a century!
18:12 Miuku MTecknology: Well out of all the bad choices, I'd say Discord annoys me the least :-)
18:12 MTecknology Always works the way you expect it to work, well documented, generally rock solid stability, etc.
18:13 Miuku Plus it has dark theme out of the box.
18:13 MTecknology that's a selling point?
18:13 Edgan MTecknology: Newer clients have very nice features, like being able to edit what you just said to fix typoes.
18:13 Edgan whiteinge: irccloud, pay for, :\
18:13 Miuku MTecknology: Sadly, it is because many others do not.
18:14 MTecknology Edgan: sure- or you can think about the crap you're saying before you press enter.. :)
18:14 Edgan MTecknology: a typo is a typo
18:15 Edgan whiteinge: and Slack is a pay only feature
18:16 Edgan whiteinge: I could also see Slack shutting down integrations through a third-party like this if it gets too popular
18:16 whiteinge Eh, $5/mo for a VM somewhere or $5/mo for IRCCloud. Sixes for me, plus IRCCloud is a pretty nice service. If you host your own bouncer somewhere then WeeSlack for WeeChat works the same way (Websockets) and is free.
18:17 whiteinge You're right about the connections thing. Definitely a worry.
18:17 RF_ joined #salt
18:17 MTecknology irccloud seems like a reasonable service (not for me, but others that like that kinda thing)
18:18 whiteinge Slack had been courting IRC users to switch but then kinda fizzed on support for that after they started raking in the cash. If they don't do something about searchable archives or supporting third-party clients I can definitely see a Slack exodus coming.
18:18 RF_ Does anybody know why boto3_route53.rr_present still tries to create the A record even if the A record already exists and has the same values (hostname, IP etc)?
18:18 Edgan The problem is irc, Discord, and Whatsapp are free. Slack is free to me. This is pay to me. I already run an irc bouncer from home.
18:18 Edgan RF_: Sounds like a bug
18:19 MTecknology I have irssi running in a screen session on a VPS
18:19 whiteinge If you run your own bouncer there are clients that use the websockets interface. WeeSlack, as mentioned, and I just saw this one for Emacs users: https://melpa.org/#/slack
18:20 RF_ Edgan: could be. I was going to try it here first and see if it's a known issue. I haven't looked at its code yet.
18:34 tuxawy joined #salt
18:37 jkaberg left #salt
18:41 cewood joined #salt
18:43 fxhp joined #salt
18:53 thelocehiliosan joined #salt
19:13 mechleg joined #salt
19:20 emerson joined #salt
19:33 RF_ Edgan: found the issue. The Name parameter has to end with '.', or it won't find it in the zone when it tries to verify if it exists already.
19:36 Edgan RF_: Seen that kind of issue before
19:38 edrocks joined #salt
19:55 ymasson joined #salt
19:59 MTecknology Is there ever a time when the trailing dot shouldn't be appended? Perhaps the source should add it?
19:59 salty joined #salt
20:03 saltyguy joined #salt
20:10 muchsalty joined #salt
20:13 muchsalty test
20:14 muchsalty Hi everyone. I was wondering if someone can give me a hand with printing pillar values inside of an init.sls file? I have no problem retrieving the pillars via the comand line using "salt '*' pillar.get <key>", but I have the pillars in the init.sls inside a for loop and if statement and they aren't being run
20:14 muchsalty So I need to narrow down within the init.sls file where the pillars are failing
20:19 pcn muchsalty: create a file template, and inside the template provide a {{ salt['pillar.get']('your:pillar') }} and see how it goes.
20:20 tuxawy joined #salt
20:26 muchsalty Ok this is the file template I set up and the result: http://termbin.com/xbas
20:26 muchsalty basically: Jinja variable 'dict object' has no attribute 'lxc:containers'
20:27 muchsalty but I get results from the command line
20:29 whytewolf muchsalty: can we see osvhost.lxc.containers
20:30 whytewolf cause that error looks like you used something like {{ pillars['lxc:containers'] }}
20:30 RF_ I keep seeing salt['pillar.get']() on here and in the salt doc. Is there a difference between salt['pillar.get'] and pillar['key']?
20:31 RF_ besides the latter is shorter
20:32 whytewolf pillar.get is a salt function that gets pillars and uses the pillar.get function. which allows the use of : as a way to traverse the pillars. pillar is a dict that contains the pillars so requires knowing how things are arranged before hand
20:33 RF_ wouldn't you need to know the pillars are arranged with pillar.get as well?
20:33 whytewolf you can be more generic.
20:34 RF_ ok. Can you give an example of "can be more generic" that shows the difference of the two?
20:34 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pillar.html#salt.modules.pillar.get
20:37 whytewolf {{ salt.pillar.get('lxc:containers','Default') }} vs {{ pillar['lxc']['containers'] }}
20:37 whytewolf pillar.get also allows the use of defaults
20:37 RF_ not much of a difference to me besides 1) it does a bit more with "merge"; 2) it doesn't raise an exception when the pillar is not found by default (pillar[] will)
20:37 pcn And is more concise than .get(foo).get(bar).get(baz)
20:38 pcn Sorry, more concise than .get(foo, {}).get(bar, {}).get(baz)
20:38 RF_ {{ pillar['lxc']['containers'] | default('blah') }}, but it's obviously longer than pillar.get version :)
20:39 pcn the deeper the depth, the nicer it is to have a function that doesn't bomb out, and which doesn't require multiple layers of try/except to sort out what went wrong.
20:39 RF_ I agree
20:40 RF_ unless of course we want it to bomb out on purpose when a pillar var is required but not defined
20:41 whytewolf I would never want that. I would define a default that when return would signal that i should stop processing gracefully. instead of blowing up
20:46 muchsalty Sorry about the wait. Here is the meat and potatoes of osvhost.lxc.containers: http://termbin.com/sczd
20:47 pcn I usually like to have tha default be "You didn't get the pillar you wanted here".
20:47 pcn For e.g.
20:49 muchsalty Not sure if the version matters, but I'm running on one that is older than dirt
20:49 muchsalty Which really grinds my gears
20:49 muchsalty but it is what it is
20:49 whytewolf it shouldn't... pillar.get has been in there for a long time
20:50 muchsalty ok
20:50 whytewolf but for curiosity. how old?
20:50 whytewolf like 0.17.5 old?
20:51 muchsalty salt --version = salt 2014.7.1 (Helium)
20:51 whytewolf wow, that is pretty old.
20:52 muchsalty yep
20:52 pcn Lots of good stuff fixed and added since then
20:52 muchsalty I tried briefly upgrading but the code immediately just stopped running at all
20:53 muchsalty @pcn I have no doubt, this is like going on 4 years old now ...
20:54 whytewolf well, and 5 Magor releases since than :P
20:54 swa_work joined #salt
21:03 rjc joined #salt
21:03 cgiroua joined #salt
21:05 RF_ whytewolf: Thanks! I am going to look at all of my Salt code and replace pill[] with salt.pillar.get as needed.
21:06 RF_ How come boto_ec2.associate_eip_address doesn't have a corresponding state?
21:07 * whytewolf shrugs
21:07 whytewolf cause ryan didn't need one?
21:08 whytewolf or it is covered in some other state
21:09 Edgan RF_: you mean boto3 eip_address?
21:09 RF_ Edgan: oh, there is a boto3.eip_address?
21:10 hohum joined #salt
21:11 Edgan RF_: I am asking what to what
21:12 RF_ Edgan: hmm, I don't see a state that ensures an EIP is associated with an instance
21:15 Edgan RF_: salt.states.boto_ec2.instance_present   allocate_eip:  (bool) - Allocate and attach an EIP on-the-fly for this instance. Note you'll want to releaase this address when terminating the instance, either manually or via the 'release_eip' flag to 'instance_absent'.
21:20 RF_ Edgan: Thank you! Exactly what I need!
21:50 edrocks joined #salt
22:15 RF_ joined #salt
22:16 RF_ Edgan: I am having an issue with boto_ec2.instance_present: https://pastebin.com/DsGRMPtt
22:17 jabberius joined #salt
22:17 RF_ I wonder if I missed something?
22:22 whytewolf so, that looks like you have something called time.py somewhere that is overriding the built in python time.
22:25 MTecknology time = get_time()\ntime.sleep(10)  :D
22:25 SteamWells joined #salt
22:28 pfallenop joined #salt
22:29 carlwgeorge joined #salt
22:30 asoc joined #salt
22:31 RF_ whytewolf: that's another issue caused by an missing IAM permission. I have added the permission and now I am getting https://pastebin.com/sKZMj2kL
22:31 supermike___ joined #salt
22:32 aldevar left #salt
22:36 whytewolf you know. an sg500-52 port switch is a real pain to configure 400+ vlans on when using the web interface
22:38 Edgan whytewolf: Why would you need 400 vlans on one switch?
22:38 whytewolf openstack
22:38 thelocehiliosan joined #salt
22:39 whytewolf self service networking
22:40 whytewolf vlans 600-1000 are used for internal networking. they don't route to the firewall
22:45 whytewolf i could get away with maybe 50 ... but why stop at 500 when i can have 400
22:45 whytewolf s/500/10/
22:45 whytewolf s/10/50
22:45 whytewolf numbers... I know how they work
23:20 zulutango joined #salt
23:27 masber joined #salt
23:30 masber joined #salt
23:42 filthyG joined #salt
23:47 pheonix991 joined #salt
23:49 pheonix991 quick question.  Hopefully I ask it right.  I'm trying to setup ssh keys utilizing my state file: https://github.com/pheonix991/salt_gitfs/blob/master/users/init.sls
23:49 pheonix991 I have my key.pub value set to True.
23:49 pheonix991 I have my key.pub file here:
23:49 pheonix991 ll /srv/pillar/users/travis/keys
23:49 pheonix991 total 4.0K
23:49 pheonix991 -rw-r--r--. 1 root root 393 Mar  9 16:33 key.pub
23:49 pheonix991 What am I doing wrong?
23:49 pheonix991 Is this not how you pull a static file out of pillar?
23:49 pheonix991 source: salt://users/{{ user }}/keys/key.pub
23:50 hemebond pheonix991: You can't use a pillar file as a source.
23:50 hemebond It has to be under your states.
23:50 pheonix991 thanks!
23:51 hemebond There is another parameter, source_pillar or something, that can read a particular pillar value to use.
23:51 hemebond (not a path in the pillar, but the actual file contents)
23:52 pheonix991 I'll play with it, thanks!
23:54 pheonix991 cool, I just moved that key to my local filesystem instead of pushing it up to git.

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