Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-02-28

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

All times shown according to UTC.

Time Nick Message
00:01 indistylo joined #salt
00:13 n0xff joined #salt
00:20 n0xff joined #salt
00:31 pcdummy jmedinar: maybe use something like file.blockreplace ?
00:31 pcdummy https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
00:35 MTecknology I usually recommend trying to manage a file either entirely or not at all
00:36 jpsharp What's the best way to walk through a mysql table and generate files based on whats in there?  I'm having trouble understanding pillars with mysql.
00:38 exarkun joined #salt
00:41 dxiri joined #salt
00:42 hasues jpsharp: Elaborate.  You are having issues getting pillar to use mysql as a backend?
00:43 hasues jpsharp: As in an external pillar?
00:43 hasues jpsharp: https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.mysql.html
00:44 jpsharp I've been reading through that and I think I've got the pillar talking to mysql as the back end, but I'm not sure if I'm doing everything else right.
00:44 hasues jpsharp: You could use JINJA to make some salt.pillar.mysql calls to populate a file as a template
00:45 jpsharp I need to query my database based on the hostname (which should be the minion id).  That will return a list of IPs.  I need to use those IPs to build configuration files.
00:46 jpsharp So I have a state that's supposed to use the pillar and iterate through those results.  I'm not sure if the pillar isn't talking to mysql or I'm not asking the pillar right.
00:47 jpsharp Let me sanitize and pastebin my stuff.
00:47 hasues Does your state use say file.managed and say it is a jinja template?  Because then in the file tempalte you could use JINJA to make the calls you want to populate it
00:50 jpsharp https://pastebin.com/SUWfs2gM
00:50 jpsharp Feel free to hit me with a brick if I'm completely on crack.
00:52 hasues Well, for one you are messing with Batman's servers..
00:52 jpsharp when I run salt 'hostname' state.apply instances    the minion does thigns, but comes up with a blank yaml redneck file and has 0 succesess and 0 failures.
00:52 hasues But no, what results do you get when you run that?
00:52 jpsharp er, blank yaml rendered file
00:54 hasues I guess I'm confused.  I thought you would use salt[pillar.mysql.get'](mysql) or some such.  I haven't used it.  I was just reading through it
00:55 jpsharp Well, I wasn't even sure i was calling the pillar get function.
00:55 jpsharp correctly.
00:55 jpsharp The documention is a little light.
00:56 hasues Well, that's one way of calling it, but for this since you are using mysql, I'm just looking at the class in the link I sent you.
00:56 hasues It is "salt.pillar.mysql"
00:56 hasues So I would think that would be used in any case
00:57 hasues And on on top of that, it looks like you have an extract_queries method that you would use.
00:57 hasues brb
01:03 tiwula joined #salt
01:20 gnomethrower joined #salt
01:20 onlyanegg joined #salt
01:20 jmedinar how can I add this regex_escape filter?
01:20 jmedinar https://docs.saltstack.com/en/latest/topics/jinja/index.html#regex-escape
01:20 jmedinar to this? https://pastebin.com/CcaKpWBz
01:20 jmedinar when setting the list
01:23 hemebond jmedinar: Just put |regex_escape after each string in the list
01:23 hemebond btw, you can test Jinja stuff on this cool tool https://cryptic-cliffs-32040.herokuapp.com/
01:26 zerocoolback joined #salt
01:50 Rubonnek joined #salt
02:20 exarkun joined #salt
02:56 evle joined #salt
02:58 ilbot3 joined #salt
02:58 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.4 <+> 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
04:00 exarkun joined #salt
04:05 thelocehiliosan joined #salt
04:35 wongster80 joined #salt
04:57 onlyanegg joined #salt
05:09 onlyaneg1 joined #salt
05:16 lompik joined #salt
05:20 justan0theruser joined #salt
05:24 threwahway joined #salt
05:29 thelocehiliosan joined #salt
05:39 exarkun joined #salt
05:42 dxiri joined #salt
05:47 aviau joined #salt
05:55 indistylo joined #salt
05:58 Aleks3Y joined #salt
06:01 threwahway joined #salt
06:07 __number5__ joined #salt
06:08 thelocehiliosan joined #salt
06:17 thelocehiliosan joined #salt
06:18 dfinn joined #salt
06:25 lkthomas is that possible to create test case on salt ?
06:25 lkthomas I need to check such as telnet, ping ...etc is functional
06:26 nkuttler sounds like a job for a monitoring service
06:28 lkthomas no, I don't mean for constantly probing
06:28 lkthomas so I need to do one last check before handover to developers
06:29 lkthomas I could do it from shell scripts, and I could even wrap it to cmd.run for multiple servers, but I am wondering if salt have some build in stuff I could use
06:30 tiwula joined #salt
06:35 nielsk joined #salt
06:36 hemebond You can test connectivity from a minion, yes.
06:36 hemebond Look at the `network` execution module.
06:39 MTecknology there was a talk at last saltconf about using salt to verify an environment
06:41 lkthomas hemebond, this one? https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#module-salt.modules.network
06:41 hemebond lkthomas: Yes
06:42 LocaMocha joined #salt
06:45 lkthomas MTecknology, sorry, I am trying to Google but not sure what I am searching
06:45 babilen lkthomas: Look into goss
06:47 babilen testinfra also (does have a salt module also)
06:49 babilen Just make sure you don't simply end up replicating your salt states in your testsuite, but opt for more "high level" tests + monitoring
06:51 babilen https://github.com/aelsabbahy/goss is what I'm referring to btw
06:54 lkthomas goss very interesting
06:56 MTecknology I think it was compared to testkitchen..
06:58 MTecknology lkthomas: sorry, I ended up deciding any project like that was in my very distant future so I let it slip my memory.
06:58 lkthomas LOL that's fine
06:58 lkthomas for me the main concern is network test
06:59 lkthomas goss require another installation
06:59 lkthomas I don't think our company could approve that
06:59 lkthomas I think I might wrap around cmd.run instead
07:00 MTecknology look through salt's youtube channel for last saltconf... I'm too distracted to do that
07:00 lkthomas no problem, thanks
07:05 indistylo joined #salt
07:05 aviau joined #salt
07:07 indistylo joined #salt
07:08 Hybrid joined #salt
07:20 exarkun joined #salt
07:29 kiorky joined #salt
07:33 saltnoob58 joined #salt
07:49 jas02 joined #salt
07:57 Gabemo joined #salt
08:01 aldevar joined #salt
08:04 kiorky joined #salt
08:07 sh123124213 joined #salt
08:14 Hybrid joined #salt
08:14 hoonetorg joined #salt
08:19 aviau joined #salt
08:20 saltnoob58 if i have python2 and python3 side by side on master, and python2 is system default how do i add salt libs to python3 as well?
08:29 MTecknology can py3 modules be imported by py2?
08:30 zerocoolback joined #salt
08:32 Pjusur joined #salt
08:33 babilen no
08:35 MTecknology so then the question is moot?
08:36 babilen I'm not actually sure what the problem is
08:41 saltnoob58 what im really trying to do is make salt-ssh use on minion python3 instead of system default
08:42 saltnoob58 im trying to figure out how it makes the choice what to use and what the requirements if any are on the master
08:47 MTecknology /usr/bin/env python3 $(which salt-minion) ...
08:48 saltnoob58 i do not understand
08:48 saltnoob58 please expand
08:49 babilen Why do you want that, saltnoob58 ?
08:49 babilen (just trying to understand the objective)
08:50 saltnoob58 i want to run salt-ssh targeting minions with python2.6 as system default. I want to use custom grains that dont work on 2.6. Getting rid of 2.6 is not an option
08:51 MTecknology my brain hurts..
08:51 saltnoob58 well you dont have to actually get it done :D
08:52 saltnoob58 i use alcohol for the brainhurt, would recommend
08:53 babilen saltnoob58: What does "salt-ssh --versions" give you?
08:54 MTecknology heh... the thing I miss most about LAX is Jersey Mike's Subs...
08:54 gnomethrower joined #salt
08:54 gnomethrower joined #salt
08:54 saltnoob58 Salt Version:            Salt: 2017.7.2
08:55 saltnoob58 do you want to knowthe dependencies too?
08:55 saltnoob58 Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
08:55 MTecknology saltnoob58: babilen was asking for a pbin of the whole thing
08:56 saltnoob58 https://pastebin.com/8wQzWjnd
08:56 saltnoob58 most are either not installed or dont seem interesting
08:56 babilen So, you are running on Python 2.7.5 -- Are you asking how to install salt with Python 3 also?
08:56 babilen (on your local machine)
08:57 babilen I guess a venv would do and install from pip
08:58 babilen Not sure where they provide packages for py3 tbh
08:58 babilen And what kind of "package" they refer to exactly
08:59 saltnoob58 hmm, yeah, i guess. if there's a venv i could have python3 with salt libraries and use --python3-bin and point at it. Man says to point to a binary with salt libs installed and I thought "hey it's a python3 binary but it doesnt have them"
09:00 exarkun joined #salt
09:00 saltnoob58 would be nice if there was a --minion-python-path= parameter or something but dont seem like there is
09:01 benner_ left #salt
09:04 zer0def why not rewrite the grain to 2.6? surely most of py3 code requires only mild tweaking to py2 and vice versa
09:04 zulutango joined #salt
09:05 zer0def from what i gather, he's running salt-ssh against centos6
09:05 aruns joined #salt
09:06 Ricardo1000 joined #salt
09:07 saltnoob58 well it's a 2.7 grain really. But when you're given a choice to rewrite your nice working code to something with EOL in 2013 you think "can't i just tell it to use a newer python" and then find out it's not that simple
09:07 threwahway joined #salt
09:07 saltnoob58 and i'm gonna be running salt-ssh against god knows what.
09:08 saltnoob58 but i guess porting is the simplest thing after all
09:16 Ricardo1000 joined #salt
09:18 saltnoob58_ joined #salt
09:19 threwahway joined #salt
09:23 mattfoxxx joined #salt
09:23 mikecmpbll joined #salt
09:25 BlackBishop joined #salt
09:25 BlackBishop so, any easy way to render a jinja template on the master for a minion  ?
09:25 BlackBishop there's salt-call cp.get_template ... /dev/stdout on the minion itself, but it doesn't work from the master...
09:30 Gabemo joined #salt
09:36 Ricardo1000 joined #salt
09:43 yuhl joined #salt
09:51 threwahway joined #salt
09:57 Mattch joined #salt
10:00 GrisKo joined #salt
10:01 saltnoob58_ aren't you supposed to use salt-run to run/do things on the master?
10:06 BlackBishop ok, how ? :/
10:13 aruns__ joined #salt
10:19 BlackBishop and salt machine cmd.run 'salt-call ... ' yells SpecialFileError: `/dev/stdout` is a named pipe :))
10:20 zer0def if there's no runner module for doing what you're trying to do, you could try could luck with `salt.cmd` https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.salt.html#module-salt.runners.salt
10:20 zer0def try your luck*
10:21 zer0def also "a jinja template on the master for a minion" sure sounds like a rendered file for a context of a given minion, is that correct?
10:22 BlackBishop zer0def: yeah
10:22 BlackBishop basically, I'm trying to see from the master how a template gets rendered for a minion
10:23 BlackBishop I can do 'salt-call cp.get_template salt://module/templates/file.conf /dev/stdout saltenv=env' on a minion
10:23 BlackBishop but I'd like to do it on the master given I have various minions that have that file rendered differently
10:24 zer0def you're probably not running a runner function at all, would start looking at the `file` execution module, potentially rant with `test=True`
10:24 zer0def not needing a runner function*
10:24 Neighbour The module file.apply_template_on_contents might be more what you're looking for
10:25 zer0def was about to mention that
10:25 Neighbour :)
10:26 BlackBishop hmmm, but I have to specify the contents manually :/
10:26 BlackBishop or how does that work ?
10:27 Neighbour use a .sls-file for that, and use jinja to load the contents of the template and supply them to the contents argument
10:39 onslack <mts-salt> you could try cp.get_file_str if you want to see the rendered contents, and you can easily run that from the master with the normal salt command
10:39 exarkun joined #salt
10:40 sh123124213 joined #salt
11:02 aldevar1 joined #salt
11:15 sjorge joined #salt
11:15 Naresh joined #salt
11:33 ddg joined #salt
11:47 Valfor joined #salt
11:47 Valfor joined #salt
11:50 BlackBishop mts-salt , it doesn't seem to render it
11:51 BlackBishop Neighbour: that sounds way more hackish than it should be :/
11:57 onslack <mts-salt> what does get output?
11:59 BlackBishop it seems to output the file itself, not jinja rendered.
11:59 onslack <mts-salt> could you pastebin the command and it's entire output ?
12:00 onslack <mts-salt> or just the command first
12:00 megamaced joined #salt
12:01 BlackBishop salt somemachine cp.get_file_str salt://ntp/templates/ntp.conf saltenv=somebranch ( using git )
12:01 megamaced hi, trying to create mongodb users as described here https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mongodb_user.html... However this fails for me with error "'roles' is an invalid keyword argument for 'mongodb_user.present'"
12:01 onslack <mts-salt> ah, i see what it is. cp.get_file supports the parameter template=jinja but it looks like get_file_str doesn't
12:01 BlackBishop and the output shows up with stuff like '{% if grains ... '
12:02 BlackBishop yep
12:02 onslack <mts-salt> cp.get_template fills that in for you as well, but doesn't display the file
12:02 BlackBishop yeah, and it needs a dest on the minion
12:03 onslack <mts-salt> ok, so of the three commands i could have picked, 2 of them would work and i picked the only one that wouldn't :)
12:03 BlackBishop It's ok, I know the feeling.
12:03 onslack <mts-salt> for testing, yes. you'll have to specify a file. if in doubt, put it in /tmp
12:04 BlackBishop yeah, but it doesn't get it to stdout .. I'd have to run another cmd.run cat that file
12:04 onslack <mts-salt> it's been one of those days. over 2h to get into work due to the snow, and pretty much no-one else seemed to be affected
12:05 BlackBishop snow is awesome. it's been snowing a lot here for the past 2 days, makes me remember of the good old days. Anyhow.
12:05 onslack <mts-salt> for diagnosing problems i run these commands directly on the minion using salt-call, then you can just cat the file from there
12:05 monokrome joined #salt
12:05 onslack <mts-salt> snow is indeed awesome, unless you're stuck in traffic for 2h and late to work :D
12:05 BlackBishop work should be a part of the day, not the reason for the day.
12:06 BlackBishop oh well, at least this looks like a more simple workaround... get_template, cmd.run cat
12:06 BlackBishop or get_file I guess
12:06 onslack <mts-salt> can't you login to the minion directly?
12:06 monokrome joined #salt
12:07 BlackBishop I could, but I'm trying to find an easy way to do it from one place.
12:07 BlackBishop if I'd login I might as well just run salt-call
12:07 rjc joined #salt
12:07 onslack <mts-salt> it's usually the easiest way when diagnosing problems
12:07 monokrome joined #salt
12:08 onslack <mts-salt> otherwise you get stuck running lots of remote commands
12:08 BlackBishop I'm not diagnosing anything :) I just want to see that I did it renders ok.
12:08 onslack <mts-salt> ah ok, i thought you were having a problem. sure, for checking then do it remotely :D
12:09 BlackBishop I have many clusters and I'd like to check in one of each, I'd rather do it faster on the master
12:09 BlackBishop than open 10 ssh terminals
12:09 onslack <mts-salt> if it's a state file then you can probably get it quicker with slsutil.renderer
12:09 BlackBishop nope, templates
12:10 onslack <mts-salt> then the double command is the only way i know
12:10 BlackBishop it's amazing, sls can get rendered, templates can get rendered ( on the minion ) but no way to do that from the master
12:10 BlackBishop it's the only piece missing ! :))
12:11 onslack <mts-salt> yes and no. rendering requires context, and as a result replicating that context on the master isn't a trivial thing
12:12 BlackBishop well, I don't mind if it does it on the minion and gets back to me with the result ! :)
12:13 onslack <mts-salt> i thought that's what get_file_str was doing, but now i see it doesn't render
12:13 onslack <mts-salt> i think i've seen a hack where the output file is actually /dev/stdout :D
12:13 onslack <mts-salt> or /proc/fd/1 or whatever works on your system
12:14 BlackBishop interesting...
12:15 onslack <mts-salt> never tried it, ymmv
12:16 syd_salt joined #salt
12:16 BlackBishop anyhow
12:17 BlackBishop thanks :) useful conversation !
12:20 exarkun joined #salt
12:27 thelocehiliosan joined #salt
12:30 _val_ If I have the following in minion sls file
12:30 _val_ pki:
12:30 _val_ certs:
12:30 _val_ - SOME_CERT_..
12:31 _val_ how do I disable this? What flag do I use?
12:32 babilen .oO( just remove the .sls? )
12:33 onslack <mts-salt> that's more likely to be pillar, right? just remove it from top so it's not referenced, or if there's more in the file then remove it from the file
12:34 onslack <mts-salt> if you mean something else then you'll have to clarify what "disable" means in your case
12:34 _val_ onslack: yes pillar/minions/vmname.sls
12:34 _val_ There is this certs, pki configuration but the SSL offloading is handled by haproxy, so I need to remove ssl related stuff there
12:35 _val_ Can I remove the whole pki: section?
12:35 onslack <mts-salt> without knowing a lot more about your setup than is reasonable, there's no way to answer that
12:36 babilen _val_: You can do whatever changes to your files you like, there is nothing salt itself requires.
12:37 babilen If your states reference that pillar and it is no longer available they might fail, but if you don't try to access it you can safely remove that data
12:44 jab416171 joined #salt
12:45 saltnoob58_ gah. i ported my grain to 2.6, i made sure to account for different which locations of the invoked file, made sure the grain is runnable from commandline, but still on some hosts my grain doesnt return :(
12:46 _val_ babilen: I don't want to break a highstate
12:48 saltnoob58_ Start removing things one by one that you dont need and check if highstate still works without it?
12:48 Miuku I'm on a highstate to hell
12:48 saltnoob58_ at some point you'll have to understand yourself what your sls-es do and work on them
12:49 saltnoob58_ also hell doesnt exist
12:49 Miuku Sure it does, there's a town called Hell in Norway.
12:52 saltnoob58_ towns exist hell doesnt exist
12:53 ipsecguy_ joined #salt
12:53 saltnoob58_ cant easily > -l output into a file for grepping and easy reading :(
12:58 ipsecguy joined #salt
12:58 _val_ saltnoob58_: let me check and troubleshoot step by step
12:58 _val_ Thanks!
12:58 _val_ Miuku: takk!
12:59 kiorky_ joined #salt
13:01 GrisKo joined #salt
13:01 thelocehiliosan joined #salt
13:06 tongpu joined #salt
13:11 CrummyGummy Hi, I'm using the mysql formula. There are permissions problems the first time I run it. When I run it a second time it works so my permission definitions are ok. Any idea why this is happening or what I'm doing wrong? Feels like a race condition.
13:11 mianosm salt-call -l debug state.sls mysql ?
13:13 gmoro joined #salt
13:14 saltnoob58_ https://docs.saltstack.com/en/latest/ref/cli/salt-ssh.html this doesn't match #salt-ssh --help ?
13:14 saltnoob58_ i thought i was finally gone crazy and couldn't find an option i was sure i had seen before
13:14 CrummyGummy mianosm: is state.sls the file name
13:15 pualj joined #salt
13:15 stewgoin joined #salt
13:18 CrummyGummy mianosm: is that run on the target locally? Sorry, I haven't done this before
13:18 saltnoob58_ https://docs.saltstack.com/en/latest/ref/cli/salt-call.html
13:19 saltnoob58_ https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.sls
13:19 CrummyGummy oh, right, thanks
13:20 saltnoob58_ that's right, you should read documentation always
13:22 dodge-lint joined #salt
13:24 Nahual joined #salt
13:26 cewood joined #salt
13:26 saltnoob58_ is it possible to set default roster behaviour tty: True in master config?
13:27 saltnoob58_ i cant seem to get it to work that way, and i dont want to write it for every host in my roster
13:29 CrummyGummy [DEBUG   ] Could not LazyLoad mysql/common.sls: 'mysql/common.sls' is not available.
13:30 CrummyGummy that's on the minion, any idea what I'm doing wrong. I ran
13:30 CrummyGummy salt-call -l debug mysql/common.sls
13:30 CrummyGummy tried with mysql.common.sls
13:30 CrummyGummy that's how it is defined in my top file
13:31 saltnoob58_ okay, maybe i dont want that, setting tty: True just for one host for testing breaks everything :)
13:32 saltnoob58_ fuck it, i'll just make a requirement that they have !requiretty for my user
13:36 k1412 joined #salt
13:56 CrummyGummy so, I point it right at my top file and it can't find it. Any idea what I'm missing?
13:56 CrummyGummy sudo salt-call  -l debug --file-root=/var/cache/salt/minion/files/ top.sls mysql.common
13:56 CrummyGummy [DEBUG   ] Could not LazyLoad top.sls: 'top.sls' is not available.
13:56 CrummyGummy how...
13:56 kiorky joined #salt
13:56 XenophonF what are you trying to do?
13:57 XenophonF if you're trying to apply an SLS, you must use state.apply
13:57 CrummyGummy 15:11 <mianosm> salt-call -l debug state.sls mysql ?
13:57 XenophonF e.g., salt-call state.apply something.something.something.darkside
13:57 CrummyGummy that was the advice above
13:57 XenophonF and that will run something/something/something/darkside.sls or possibly something/something/something/darkside/init.sls
13:58 XenophonF top.sls isn't a function
13:58 XenophonF you probably want to call state.show_top
13:59 XenophonF cf. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
13:59 CrummyGummy XenophonF: that seems to have worked, thanks.
13:59 XenophonF np
14:00 XenophonF the salt and salt-call commands are CLIs for Salt execution modules
14:00 XenophonF a way to invoke those functions from the command line
14:00 XenophonF likewise, salt-run is a CLI for Salt runner modules
14:00 exarkun joined #salt
14:00 onslack <mts-salt> saltnoob58: if you want to specify default minion config for salt-ssh minions then you can do that in master config
14:02 CrummyGummy XenophonF: Thanks, hopefully this gets me closer to debugging this mysql user issue. I need to run it twice for it to apply properly.
14:02 edrocks joined #salt
14:03 onslack <mts-salt> perhaps there's an ordering problem, does one or more of your states rely on another being done first?
14:07 gh34 joined #salt
14:16 Hybrid joined #salt
14:18 XenophonF CrummyGummy: I'm using mysql-formula for all my MySQL/MariaDB deployments, including RDS (although the RDS instance launches get handled by separate boto_rds states).
14:19 XenophonF it's a shame that postgresql-formula isn't as flexible
14:20 XenophonF that one seems to assume the database runs locally, whereas mysql-formula handles remote servers better
14:20 CrummyGummy joined #salt
14:29 thelocehiliosan joined #salt
14:30 saltnoob58_ mts-salt: i know i can set some default roster things in master config, and they are present with default values in commented out form, but tty is not one of them, and writing it there doesnt seem to work. But since writing in roster also didnt work for me i decided to have everyone obey my will and change their sudoers file
14:31 saltnoob58_ ie. writing in roster actually changed something, but it broke everything. Writing in master did nothing at all (stupid sexy Flanders)
14:38 Hybrid joined #salt
14:40 syd_salt joined #salt
14:49 mchlumsky joined #salt
14:55 cgiroua joined #salt
14:56 racooper joined #salt
15:07 Cluepon left #salt
15:09 dodge-lint joined #salt
15:16 Hybrid joined #salt
15:17 onlyanegg joined #salt
15:22 mk-fg joined #salt
15:22 mk-fg joined #salt
15:30 dfinn joined #salt
15:32 theloceh1liosan joined #salt
15:40 jbkc85 joined #salt
15:41 exarkun joined #salt
15:44 aldevar joined #salt
15:45 om2 joined #salt
15:46 mk-fg joined #salt
15:46 mk-fg joined #salt
15:51 Hybrid joined #salt
15:58 ddg joined #salt
16:10 dodge-lint joined #salt
16:16 nomad_fr_ joined #salt
16:19 felixhummel_ joined #salt
16:19 cofeineS1nshine joined #salt
16:19 Sacro_ joined #salt
16:19 vhasi_ joined #salt
16:19 mmidgett joined #salt
16:22 whiteing_ joined #salt
16:23 swa_mobil joined #salt
16:23 rodr1c_ joined #salt
16:23 Swant_ joined #salt
16:23 cb- joined #salt
16:24 marcinkuzminski_ joined #salt
16:24 zerocoolback joined #salt
16:24 ws2k3_ joined #salt
16:25 shakalaka joined #salt
16:25 notCalle joined #salt
16:26 mikecmpbll joined #salt
16:26 darvon joined #salt
16:26 heyimawesome joined #salt
16:27 bigjazzsound joined #salt
16:27 Sacro_ left #salt
16:28 Sacro joined #salt
16:29 nledez joined #salt
16:30 pcn joined #salt
16:30 eichiro joined #salt
16:31 hatifnatt joined #salt
16:31 robawt joined #salt
16:31 dodge-lint joined #salt
16:31 fleaz joined #salt
16:31 kavakava joined #salt
16:32 buumi joined #salt
16:32 tobiasBora joined #salt
16:33 justanotheruser joined #salt
16:34 tobiasvdk joined #salt
16:42 tiwula joined #salt
16:46 thenut joined #salt
16:48 thenut hi, i'm having an issue getting rest_cherrypy to work on CentOS 7.  I have the stanza defined, but it fails to listen on the specified port.  No errors are generated, even when run in the foreground with loglevel set to debug
16:52 wych joined #salt
17:00 Edgan thenut: Can you give a pastebin of the configuration or code you are talking about?
17:01 thenut actually, please disregard.  I did not realize salt-api was an additional service I had to run.  figured it was part of master since the config was
17:01 thenut all is well now
17:02 Edgan thenut: makes sense
17:02 sh123124213 joined #salt
17:10 dfinn joined #salt
17:21 exarkun joined #salt
17:24 aldevar left #salt
17:38 robawt joined #salt
17:39 megamaced joined #salt
17:46 gomerus[m]1 joined #salt
17:47 wryfi joined #salt
17:47 Psi-Jack joined #salt
17:48 rodr1c joined #salt
17:48 rodr1c joined #salt
17:49 gnomethrower joined #salt
17:49 georgemarshall joined #salt
18:02 Pjusur joined #salt
18:25 tiwula joined #salt
18:31 aldevar joined #salt
18:44 ponyofdeath joined #salt
18:50 inad922 joined #salt
19:00 exarkun joined #salt
19:01 aldevar joined #salt
19:01 dendazen joined #salt
19:12 ymasson joined #salt
19:19 tiwula joined #salt
19:30 onlyanegg joined #salt
19:45 Edgan gtmanfred: Can you look at https://github.com/saltstack/salt/pull/46257, or have thatch45 look at it? This is in relation to https://github.com/saltstack/salt/issues/42440.
19:46 onslack <gtmanfred> no, someone will get to looking at it when they get to it in the pull requests
19:46 Edgan ok
19:47 Neighbour Hey Edgan, good to see you here as well (github-abcde here :)
19:47 Edgan Neighbour: :)
19:47 Neighbour I have a question about line 149 in pillar/__init__.py though...could you maybe include OrderedDict in the type-check there as well?
19:49 sjorge joined #salt
19:49 Neighbour (and perhaps update the errormessage to reflect that OrderedDict is now also allowed)
19:49 Edgan Neighbour: I can, but not technically required. OrderedDicts are recongized as dicts.
19:49 brokensyntax joined #salt
19:50 Neighbour oh, so isinstance(x,dict) would also catch OrderedDicts? good :)
19:50 Edgan yes
19:54 Edgan Neighbour: https://pastebin.com/yKstNgWm
19:55 Edgan Neighbour: Line 11 of that patch, does that line seem to be pointless?
19:56 Edgan Neighbour: Check something, self it, but error because it wasn't set before. Why bother setting it?
19:56 Edgan self = set
19:56 Neighbour the error doesn't prevent further processing
19:56 Neighbour so an error is logged, but it is corrected as well
19:56 Edgan But wouldn't it also just ignore your overrides, which isn't really what you want?
19:57 Edgan Neighbour: Patch look good?
19:57 Neighbour It wouldn't ignore your overrides, because when they aren't presented as a dict (now OrderedDict), they can't be processed anyway
19:58 Edgan That is still a silent ignore.
19:58 Neighbour true
19:58 Edgan If you like the patch I will push it to the PR
19:59 Neighbour I'd like to test it a bit when I'm at work again tomorrow
19:59 Edgan Neighbour: But it makes the changes you were suggesting?
20:00 Neighbour not entirely, instead of testing for dict *and* ordereddict, you're now only testing for ordereddict
20:00 Neighbour I'm not sure what happens when you do supply a dict :) (I suspect the data gets ignored silently now :P)
20:01 Neighbour also, it's hard to supply an ordereddict from the CLI, so I'm not sure if that keeps on working well
20:01 Edgan Neighbour: I also realized it is incomplete
20:01 Edgan Neighbour: AsyncRemotePillar vs RemotePillar
20:02 Edgan I will fix that after getting some lunch.
20:02 Neighbour Heh, 21:00 here :)
20:09 DammitJim joined #salt
20:14 Trauma joined #salt
20:20 av joined #salt
20:40 tiwula joined #salt
20:41 exarkun joined #salt
20:43 dodge-lint joined #salt
20:54 aldevar joined #salt
20:54 aviau joined #salt
21:03 losh joined #salt
21:11 tiwula joined #salt
21:19 yuhl joined #salt
21:21 yuhl joined #salt
21:24 Rubin i'm trying to see if i'll need to worry about any breaking changes when updating from 2016.3 to 2017.7 but the changelogs are huge and very in depth (every pull request)
21:24 Rubin does anyone publish a simpler 'if you use this feature you need to be aware that it behaves differently now' type release notes list?
21:26 iggy not that I've ever seen
21:27 Rubin i found one release note (2017.7.0) that has a 'known issues' section. so maybe they add that if there are any
21:31 Rubin yeah nvm. they do write about things you need to know, if there are any. just the first few i looked at didnt have anything to talk about!
21:32 whytewolf Like any kind of update. it is best to test before putting into production ;)
21:32 rjc joined #salt
21:32 Rubin yes, thats what i'm working on
21:39 onlyanegg joined #salt
21:43 jbkc85 joined #salt
21:49 hoonetorg joined #salt
21:57 losh joined #salt
21:58 nixjdm joined #salt
22:07 lordcirth_work kmod.present doesn't allow passing arguments
22:14 hoolio joined #salt
22:15 Edgan Rubin: In my experience 2016.3 to 2017.7 is really minor.
22:15 Edgan Rubin: Mostly new features and bug fixes.
22:17 Edgan Rubin: In general salt is buggy, but the DSL hasn't change that much in recent years. There also aren't that many regressions. Mostly it is lots of corner cases, or bugs in new code.
22:18 Edgan Rubin: I have the best experience with the latest official release plus backported patches.
22:20 exarkun joined #salt
22:33 sh123124213 joined #salt
22:42 xet7 joined #salt
22:46 xet7 joined #salt
23:13 Edgan Neighbour: https://github.com/saltstack/salt/pull/46257/files  Updated with your ideas, and expanded to other like functions.
23:15 Edgan Neighbour: Yet another related feature would be to ensure external_pillars get import as OrderedDict.
23:16 thelocehiliosan joined #salt
23:18 alkyl joined #salt
23:19 alkyl joined #salt
23:19 daxroc joined #salt
23:19 gareth__ joined #salt
23:19 phtes joined #salt
23:19 petems joined #salt
23:20 alkyl joined #salt
23:20 Awesomecase joined #salt
23:22 Awesomecase joined #salt
23:23 hillna joined #salt
23:23 mrueg joined #salt
23:23 nickadam joined #salt
23:23 simondodsley joined #salt
23:24 nickadam joined #salt
23:25 hillna joined #salt
23:25 nickadam joined #salt
23:25 hillna joined #salt
23:25 nickadam joined #salt
23:26 hillna joined #salt
23:26 nickadam joined #salt
23:26 bbhoss joined #salt
23:26 SteamWells joined #salt
23:26 hillna joined #salt
23:26 nickadam joined #salt
23:26 kwmiebach joined #salt
23:27 ToeSnacks joined #salt
23:27 carlwgeorge joined #salt
23:27 hillna joined #salt
23:27 nickadam joined #salt
23:27 SteamWells joined #salt
23:27 ToeSnacks joined #salt
23:27 nickadam joined #salt
23:28 kwmiebach joined #salt
23:28 nickadam joined #salt
23:28 SteamWells joined #salt
23:28 ToeSnacks joined #salt
23:28 jhill_ joined #salt
23:32 cliluw joined #salt
23:34 cgiroua joined #salt
23:36 jmedinar joined #salt
23:37 jmedinar Hi!... Is there any sleep function in Jinja?
23:38 jmedinar I have this state that adds a couple lines using file.line into a configuration file... but it does it so fast that always one overwrites the other
23:39 jmedinar breaking into a couple states and adding a require will do the trick
23:39 jmedinar but also a nice and simple sleep will help
23:40 jmedinar here my state.. https://pastebin.com/U3T7Dw9w
23:40 Edgan jmedinar: Use a jinja template instead of files. Sleep is a workaround.
23:48 jmedinar {% set a = salt['cmd.run']('sleep 3') %}
23:48 Edgan jmedinar: I have another like idea, but it is still a bad idea
23:49 Edgan jmedinar: I am not sure your's will have the intended affect
23:49 Edgan jmedinar: I think that will sleep on the master, not the minion. It processes jinja master side.
23:49 whytewolf if you ... really want that you don't need to set anything. {% do salt['test.sleep']( 3') %}
23:50 whytewolf Edgan: depends if it is a state it will be the minion, if it is a pillar it will be the master
23:50 Edgan whytewolf: I think I found the answer
23:51 jmedinar the point is ... I need to find a line... and after that one add a few more
23:51 jmedinar so I look for the line a couple times and on each iteration I add a new line
23:51 jmedinar but overwrites the previous one
23:51 whytewolf that seems, ew
23:51 whytewolf might as well jsut use the accumulator instead
23:52 Edgan I think this is what he wants, but it is in develop, not in 2017.7.4. https://github.com/saltstack/salt/pull/44840/files
23:53 Edgan Lets you hide a cmd.run
23:53 whytewolf honestly. a jinja sleep makes little sense anyway as it won't work as expected. jinja isn't processed at the same time as states
23:53 Edgan whytewolf: but my method would be as a state
23:53 whytewolf Edgan: yes.
23:54 Edgan whytewolf: The goal in my book is to hide the change
23:54 Edgan whytewolf: surprised a hack like that didn't make it in sooner
23:54 whytewolf actually i kind of like the idea behind slots better.
23:54 Edgan whytewolf: slots?
23:54 whytewolf but yeah
23:55 whytewolf https://docs.saltstack.com/en/develop/topics/slots/index.html
23:55 whytewolf basicly a way to use commands from states at the same time as state exacution instead of before hand like jinja is
23:56 Edgan Interesting
23:56 Edgan Sounds very anti-source control
23:57 Edgan I have a strong distaste for anything that assumes for things that assume things will be just so from an external source. Hence why I don't edit files by line.
23:59 Edgan whytewolf: I wouldn't like use of that hide option either, but could see others using it all the time.
23:59 whytewolf I agree. I never edit lines. I only ever use file.managed, file.recurse, file.seralize and file.directory.

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