Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-02-14

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

All times shown according to UTC.

Time Nick Message
00:00 poningru [dee], yeah I ran into the same issue, trying to figure out who in saltstack to notify
00:00 poningru if anyone knows where to file this ticket about ssl
00:00 [dee] I figured there was an issue on the website. I can't bootstrap any instances on 14.04 as of some time today. 16.04 works.
00:03 kiorky joined #salt
00:09 Guest73 joined #salt
00:10 Edgan poningru: I would do it here, https://github.com/saltstack/salt/issues
00:10 poningru hah
00:10 poningru https://github.com/saltstack/salt/issues/46021
00:12 Edgan poningru: :)
00:16 poningru [dee], and xMopx yall can track the apt problem in that github issue
00:16 poningru thanks Edgan and everyone for the help
00:16 xMopx thanks!
00:16 [dee] I posted my error as well
00:17 hammer065 joined #salt
00:23 Guest73 joined #salt
00:23 onslack <gtmanfred> [dee] it is being worked on
00:28 [dee] thanks
00:28 [dee] I'm in slack now
00:38 Hybrid joined #salt
00:54 anastasia_ joined #salt
00:56 miruoy joined #salt
00:56 psychohamster joined #salt
00:58 Guest73 joined #salt
01:04 Guest73 joined #salt
01:05 shiranaihito joined #salt
01:27 oida joined #salt
02:02 lkthomas does salt-cp run very slow ?!
02:03 pipps joined #salt
02:11 tiwula joined #salt
02:31 jrj hello. i write file.append task - http://paste.debian.net/1010184/, but it shows error - http://paste.debian.net/1010185/
02:31 jrj can someone help find out what is wrong?
02:31 jrj master logs empty
02:33 jrj minion logs has no detailed info, than showed
02:36 jrj emmmmm.... i think i found reason... it became visible in paste site - different "-" signs, which looks same in console... copy/paste
02:38 mechleg joined #salt
02:55 nomeeed joined #salt
02:57 ilbot3 joined #salt
02:57 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.3 <+> 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:00 jrj i need concatenate string and pillar value in for loop. i do it like this: {% for file in '/srv/salt' + pillar['cfg_repo_dir'] %}
03:01 evle joined #salt
03:02 jrj '/srt/salt' part brake into single characters
03:04 jrj like "/ s r v / " and so on
03:04 jrj and this part passed to for loop
03:07 monokrome joined #salt
03:17 MTecknology {% for char in 'string' ... what do you expect to happen?
03:27 DammitJim joined #salt
03:33 lkthomas folks, how could I do salt-call -l debug and output to a txt file ?
03:34 MTecknology >file.txt
03:37 lkthomas somehow it doesn't log any debug message
03:37 lkthomas but a lower level of log is on that file
03:37 lkthomas I mean, a less detail version of log is on that file
03:38 MTecknology I have no idea what you're saying..
03:40 lkthomas nevermind, let me work it out, thanks
03:50 lkthomas I found another problem, when I point pkg.installed into a sources URL, everytime when I run state apply, it will download that rpm file again and again, how could I avoid that from happening ?
03:59 jrj MTecknology, concatenate string and pillar value => needed path to search files to process them in for loop
04:00 jrj lkthomas, maybe debug output gors to stderr? try "> out.txt 2>&1"
04:00 MTecknology jrj: so you got your path... and then what did you do with it?
04:01 MTecknology jrj: also- your most recent statement is wrong
04:01 lkthomas jrj, I will try, thanks
04:01 jrj MTecknology, whole path splitted by single character, like "/ s r v / s a l t / e t c / "
04:01 MTecknology jrj: that's not what I asked
04:03 jrj MTecknology, i want list file in that path and create "file.managed" task with each file
04:04 jrj now i have like this: http://paste.debian.net/1010190/
04:04 MTecknology that's also not what I asked
04:04 MTecknology 22:00 < MTecknology> jrj: so you got your path... and then what did you do with it?
04:05 MTecknology you iterated over it...
04:05 jrj ahh, sorry. just a moment
04:06 MTecknology jrj: https://www.learnpython.org/en/Loops
04:06 jrj MTecknology, i use it like this: http://paste.debian.net/1010192/
04:07 jrj "set path" is my experiments. this part was in for loop before
04:09 jrj this is my original try: http://paste.debian.net/1010193/
04:09 jrj but result is same
04:09 MTecknology I don't know if you're intentionally ignoring me... but I'm going to walk away now.
04:09 MTecknology good luck
04:10 jrj i'm not ignoring. i nor teally understand what i need to provide. english not my native and i am new in salt
04:11 jrj i pasted my sls file fragment, result from minion with debug log.
04:12 jrj tried tell what i need in words. anything else?
04:17 jrj i need to iterate all files in /srv/salt/etc/blah/blah1 and create for each (/srv/salt/etc/blah/blah1/file1 for ex) file.managed task with "source" parameter "salt://srv/salt/etc/blah/blah1/file1". i use "for" loop in sls file for this
04:18 raptelan joined #salt
04:18 jrj *"source" parameter "salt://etc/blah/blah1/file1" *
04:21 lompik joined #salt
04:23 MTecknology jrj: have you ever used python in your life?
04:24 MTecknology or.. have you programmed in any language?
04:29 MTecknology I made another attempt. My questions still go unanswered.  I say again... good luck and good night.
04:29 jrj MTecknology, i have some scripting expirience in php. python - first course on codeacademy site. no real practice with it.
04:31 MTecknology k.. I'm still leaving, but leaving with this- use some basic thinking skills... What does a for loop do? What are you doing to what?
04:33 jrj don't judge. if i not familiar with it, it is not means i am completely stupid.
04:34 MTecknology If you take offense, that's your choice. My statement is still accurate.
04:34 jrj if you need some info, which i am still not provided - tell me what you want to get. i will do my best to provide it
04:34 MTecknology I get it just fine..
04:35 jrj for loop shold list files in directory. then use it to construct task for each file
04:36 jrj i really can nor understand what i missed to tell
04:36 zerocoolback joined #salt
04:57 zerocoolback joined #salt
04:57 exarkun joined #salt
05:05 K0HAX joined #salt
05:10 wongster80 joined #salt
05:17 threwahway joined #salt
05:29 jrj OK. my new question is how to list files on master in some directory and iterate them to create file.managed task for minion? CP module?
05:33 jrj i found, that i can not use file.readdir. it needs absolute path it is local for minion
05:33 jrj so, cp.list_master?
05:34 jrj and then filter output somehow? i need to pass some files from master (/srv/salt/path/to/dir) to minions
05:48 snakegums joined #salt
06:04 jrj_ joined #salt
06:16 pualj joined #salt
06:17 LocaMocha joined #salt
06:22 jrj dealed with job. with file.recurse
06:22 masber joined #salt
06:27 kwork joined #salt
06:29 kwork joined #salt
06:29 eseyman joined #salt
06:37 exarkun joined #salt
06:56 cswang joined #salt
07:07 zulutango joined #salt
07:09 cgiroua joined #salt
07:28 snakegums joined #salt
07:34 threwahway joined #salt
07:41 rodr1c joined #salt
07:41 rodr1c joined #salt
08:03 Hybrid joined #salt
08:03 Tucky joined #salt
08:04 aldevar joined #salt
08:13 Ricardo1000 joined #salt
08:19 aviau joined #salt
08:49 raptelan joined #salt
09:04 lionel joined #salt
09:08 pbandark joined #salt
09:13 LostSoul joined #salt
09:20 threwahway_ joined #salt
09:32 Mattch joined #salt
09:58 exarkun joined #salt
10:12 mattfoxxx joined #salt
10:14 lxsameer joined #salt
10:15 deuscapturus joined #salt
11:11 losh joined #salt
11:18 colttt joined #salt
11:24 zerocoolback joined #salt
11:27 aldevar left #salt
11:31 mattfoxxx joined #salt
11:39 exarkun joined #salt
11:41 losh joined #salt
11:45 GrisKo joined #salt
12:02 rgrundstrom joined #salt
12:04 Aikar joined #salt
12:04 Aikar joined #salt
12:11 aldevar joined #salt
12:20 morgana2313_ joined #salt
12:48 Aikar joined #salt
12:53 dnull joined #salt
13:01 taylorbyte joined #salt
13:14 Nahual joined #salt
13:23 losh joined #salt
13:29 DammitJim joined #salt
13:43 BarBQ joined #salt
13:48 callmecabman joined #salt
14:14 gh34 joined #salt
14:16 inad922 joined #salt
14:20 DammitJim joined #salt
14:22 Hybrid joined #salt
14:24 BitBandit joined #salt
14:26 deuscapturus joined #salt
14:41 shiranaihito joined #salt
14:49 racooper joined #salt
14:55 cgiroua joined #salt
14:56 pualj joined #salt
14:57 cyteen joined #salt
14:58 exarkun joined #salt
15:14 Naresh joined #salt
15:16 raptelan whytewolf: Crap, my IRC client has a much more limited scrollback buffer than I realized - did you happen to come up with any suggestions yesterday after I disappeared that I may have missed?
15:20 onslack <mts-salt> raptelan: whytewolf's last comment (supplied by slack's unlimited history):
15:20 onslack <mts-salt> <whytewolf> APP [22:36] that is the end goal yes. but not always possable. such as trying to remove crons on a user that doesn't exist personally I would put in a jinja check that just didn't put the cron.absent states in if the user doens't exist this is where the _in comes in handy because you can't require a state that isn't there so instead of remove_postgres_user requireing the cron.absent states. the cron.absent stats would require_in the
15:20 onslack remove_postgres_user it amounts to the same thing. however that allows the cron.absent states to be left out of the final run with out hurting anything
15:20 onslack <mts-salt> i suspect you saw that one
15:22 onslack <mts-salt> ooc is this working? :)
15:22 Arendtsen joined #salt
15:23 flebel joined #salt
15:24 onslack <mts-salt> i suspect not. i may be talking to myself...
15:24 rockey mts-salt: "supplied by slack's unlimited history", haha :D
15:25 onslack <mts-salt> ok, someone saw it then :D
15:27 onslack <ryan.walder> "supplied from slack's unlimited* history" \* upto 10,000 ;)
15:28 rockey mts-salt: i have more scrollback lines in irssi, than slack has though :P
15:29 rockey as ryan mentioned, 10k on slack, 100k in my irssi as is right now :)
15:29 onslack <ryan.walder> and you probably still use less memory than electron ;)
15:30 raptelan thanks onslack, I guess not.
15:30 onslack <mts-salt> i wasn't going to count the scrollback, but it wasn't that far up :p
15:30 rockey ryan: oh hell yes
15:30 raptelan I usually use irssi but switched to a desktop client so I could get notifications.  There's probably some way to wire up irssi to MacOS notification center or Growl but I haven't dug into that
15:31 rockey ryan: and also, it's not on my local host either, so infinite more ram on my laptop/workstation :P
15:31 raptelan it had a default of 300 lines of scrollback buffer :(
15:31 onslack <ryan.walder> ouch
15:37 raptelan Slack isn't very memory-efficient, especially when you start adding up teams!
15:39 babilen Well, it is a commercialised IRC dæmon that *had* to offer something to attract people .. All that fanciness requires memory and compute cycles
15:41 onslack <ryan.walder> If IRC handled inline code/multi line comments as well as slack I'd happily go back
15:41 babilen I don't mind using a pastebin; Makes it easier to keep everything in one place also
15:42 babilen I just have the relevant pastes open in a few tabs and can focus on what people are saying here
15:42 babilen But yeah, that is part of the "fanciness" that I refer to
15:42 babilen Not necessarily a bad thing either
15:42 taylorbyte joined #salt
15:43 onslack <mts-salt> as a computer programmer, i have to say it _doesn't_ need more memory. it also doesn't need 6 processes
15:43 onslack <ryan.walder> the way I see it is i can spare half a gig of ram these days, 10 years ago not so much
15:43 onslack <mts-salt> but it does. which sucks.
15:43 onslack <ryan.walder> it could be much more efficent if it wasnt written in electron
15:44 hop joined #salt
15:44 onslack <mts-salt> sadly true. throw more hardware at a problem to make it go away
15:44 onslack <ryan.walder> but then I very much doubt I'd be here as it wouldn't have a linux client
15:44 onslack <mts-salt> does have a web client tho... ;)
15:44 babilen I think it came up here: https://github.com/wee-slack/wee-slack
15:44 hop curious, if i want to use ! as comment char with file.comment_line, i have to give the argument as '"!"'
15:44 babilen I still prefer my mosh+tmux+IRC client setup
15:45 onslack <ryan.walder> babilen: sure but then you lose the multi line comments/code benefit
15:45 hop i get that yaml.load() returns None otherwise, but i can't read the code well enough to get why this happens for this argument, or if it is necessary
15:45 babilen Do you know if I can easily 'grep' Slack notes?
15:45 onslack <ryan.walder> which is the key feature for me
15:46 babilen Also .. as a computational linguist, I'm rather annoyed that the Slack destroys my 'thread detection' heuristics, as I have to adjust for onslack/saltstackbridge
15:46 onslack <ryan.walder> no idea what a slack note is to be honest
15:47 babilen onslack: My main benefit would be tab-completion for nicknames and no bridges anymore
15:47 babilen #salt will be die a slow death
15:47 lastmikoi Hello there. I'm thinking of getting to know the codebase in order to deal with the issues I stumble upon when deploying Salt at work (namely https://github.com/saltstack/salt/issues/36796). Is there a go-to primer for the design of salt as well as its inner workings ? Thinking of plumbing rather than doc-exposed porcelain :)
15:47 babilen hop: Sounds as if you are lost in string escape land
15:48 rockey ryan.walder: does slack code snippets show on irc btw?
15:48 hop babilen: i found my way out, but i'm still curious, why this happens to ! but not to # and whether to report this as bug ord documentation bug. also, how to fix it
15:49 onslack <ryan.walder> File uploaded https://saltstackcommunity.slack.com/files/U8HRFM0P9/F99TUGH7Y/test-snippet.txt / https://slack-files.com/T7KPDM7M3-F99TUGH7Y-615773f5a6
15:49 onslack <ryan.walder> rockey ^
15:49 onslack <ryan.walder> snippet
15:49 onslack <ryan.walder> probably horribe fo you guys
15:49 babilen It just links to https://saltstackcommunity.slack.com/files/U8HRFM0P9/F99TUGH7Y/test-snippet.txt / https://slack-files.com/T7KPDM7M3-F99TUGH7Y-615773f5a6
15:49 onslack <ryan.walder> or just plaintext
15:49 onslack <ryan.walder> ah
15:50 babilen "The requested file could not be found."
15:50 babilen heh
15:50 onslack <ryan.walder> lol
15:50 babilen First requires a login
15:50 onslack <ryan.walder> yeah
15:50 onslack <ryan.walder> opens in slack for me
15:50 onslack <mts-salt> ah the joys of desktop web intent
15:50 rockey so, urls but no-go action for it, good stuff :P
15:51 onslack <ryan.walder> and I'm sure multi line code looks even worse: ``` foo ```
15:51 onslack <ryan.walder> multiline/code
15:52 rockey just shows as "<backtics x3> foo <backtics x3>"
15:52 onslack <ryan.walder> heh
15:52 rockey > is this a quote on slack? :P
15:52 onslack <ryan.walder> yup
15:52 onslack <ryan.walder> cross compatability!
15:52 rockey so, raw formatting
15:52 rockey how can you use this opporturnity to fuck shit up :D
15:53 onslack <ryan.walder> yeah, you wally have to remember you're in the irc channel before pasting in a 20 line snippet ;)
15:53 babilen ``` uuuhhhhh `````
15:53 onslack <mts-salt> nice. slack formats that
15:54 onslack <ryan.walder> that's an inline one though `like this`
15:54 onslack <ryan.walder> or not
15:54 onslack <ryan.walder> some kind of odd hybrid
15:55 babilen I used an unbalenced number of backticks
15:55 onslack <ryan.walder> ah
15:55 babilen I had hoped that Slack would burn and die
15:55 babilen So we can all enjoy IRC again
15:55 babilen ;)
15:55 babilen *unbalanced
15:56 onslack <mts-salt> i've seen irc content inline quoted, so either people are simply using backticks or there's a conversion somewhere
15:56 onslack <ryan.walder> your resistance only makes me chat in here more
15:56 babilen lovely
15:56 rockey /shrug this might work, but i dunno
15:56 onslack <mts-salt> it's fine ryan, they don't see the other channels that we see ;)
15:57 rockey trying to find a way to do h1 formatting in slack, but guess it's just a mattermost annoying "feature"
15:57 raptelan I'm sure all the slack formatting syntax will render on Slack, but not most IRC clients.
15:57 onslack <mts-salt> i don't think slack has font size formatting
15:58 raptelan the slack-to-irc bridges are annoying to both sides
15:58 onslack <ryan.walder> I like the idea of matrix (https://matrix.org/) but it doesn't seem to have much traction
15:58 onslack <mts-salt> it looks fine on this side. we see names transparently whether it's from slack or irc
15:59 raptelan "looks fine" isn't the same as "is fine" ;)
15:59 babilen onslack: I do not dislike Slack (still prefer IRC, but that's irrelevant) and use it frequently in the context of k8s, for example. What I have a problem with is that this channel is some weird chimera, that bridges content between the two, so that it is no longer a choice between IRC or Slack
15:59 raptelan babilen: exactly.
15:59 babilen Either way, given that SaltStack employees seem to be required to use Slack and also like to not miss out on IRC, this is probably going to stay
16:01 onslack <ryan.walder> given the releases channel i would guess they have to be on here at least some of the time
16:01 raptelan babilen: they could use Slack -and- an IRC client.
16:01 babilen ^
16:02 raptelan I'm using HipChat and an IRC client at my work presently.  Don't plan to try to make one size fits all.
16:02 onslack <ryan.walder> not the amount of screen slack takes up, anything less than fullscreen is horrible ;)
16:02 onslack <mts-salt> not at 1920x1200 it's not. i can have it take up a quarter of my screen ;)
16:02 raptelan the problem I have with both Slack and HipChat is that they require proprietary clients for full functionality.
16:03 onslack <mts-salt> we tried hipchat at work. i can't remember why we ditched them
16:03 babilen Well, we would see more clients if the protocal had been standardised
16:03 raptelan both have XMPP gateways, and Slack has an IRC gateway, but they are limited
16:03 onslack <ryan.walder> because atlassian products seem like a good idea at the time till you actually have to use them?
16:03 babilen The entire point of Slack is to make money
16:03 onslack <mts-salt> the slack:xmpp gateway is truly poor. doesn't mark messages as read until the client disconnects!
16:03 raptelan There's one huge advantage of HipChat - you can host it yourself.
16:04 raptelan of course, you can host your own IRC server, but most companies aren't old school enough to do that.
16:04 babilen So, they create a centralised and proprietary protocol that adds some Web X.Y stuff on top to make it appealing
16:04 babilen raptelan: We host our own IRC server and have done for a long time
16:04 onslack <mts-salt> our sysop gateways everything into an irc client. including slack
16:04 babilen It really isn't hard
16:05 raptelan yeah, if Slack had made an open protocol - perhaps based on something already existing, perhaps not - it would have been a huge difference
16:05 onslack <ryan.walder> IRC is finiky for non nerds though, slack took that pain away so you can just give it to anyone and it "just works"
16:05 lordcirth_work IRC is finicky?
16:05 onslack <mts-salt> xmpp is the obvious choice there for protocol, but they still extended it
16:05 lordcirth_work The UI is usually not pretty, sure
16:06 onslack <ryan.walder> go tell sales to connect to your irc server and join the #sales channel
16:06 onslack <mts-salt> very true. our admin staff are non-technical
16:06 raptelan IRC "just works" too, if you give them a simplified client.
16:06 lordcirth_work Main downside of IRC is not saving messages while offline
16:06 spiette_ joined #salt
16:06 raptelan lordcirth_work: true.
16:06 onslack <ryan.walder> and no mobile client integration
16:06 onslack <ryan.walder> so now you need to run a bouncer
16:06 lordcirth_work Yeah
16:06 babilen We live in a time in which wonderful open source (true open source projects, with open communities as well) projects are commercialised and turned into products. These products *do* provide features that make them somewhat "better" than the project they are based on, but have been primarily developed in that way to jail users into your own platform
16:07 onslack <ryan.walder> even then you'll get duplicated notifications
16:07 raptelan there are mobile IRC clients
16:07 hop on the other hand irc doesn't suck my laptop's battery dry in half a train ride
16:07 raptelan babilen: well said.
16:08 babilen The sad thing is that there was never an inherent reason to *not* contribute to the original projects
16:08 rockey lordcirth_work: the downside of irc is the protocol itself tbh.. it has very limited characteristics by design which for instance xmpp try to adjust and adopt into a more modern tech time
16:08 lordcirth_work IRCv3 is cool
16:08 raptelan there's no profit in marketing open stuff :P
16:08 raptelan lordcirth_work: I'll have to look that up, hadn't heard of it.  v3 implies that there's a v2 as well?
16:08 lordcirth_work v2 is current
16:09 babilen raptelan: Surely not, but the very nature of the communities that made those projects possible seizes to exist
16:09 lordcirth_work https://ircv3.net/
16:09 raptelan ah, when did v2 become standard?
16:09 onslack <ryan.walder> raptelan: yes but they don't integrate with your desktop client. You either have multiple usernames (one on each device) or you use a bouncer, even using a bouncer you get notifications on the desktop and mobile at the same time
16:09 raptelan I didn't know IRC had more than one version
16:09 lordcirth_work s/seizes/ceases
16:09 onslack <ryan.walder> it can work but it's not a good user experience
16:09 lordcirth_work Well, I think 'v2' is kind of a catchall for 'IRC plus the things most modern systems added'
16:09 raptelan onslack: I believe some IRC servers allow logging in as the same user from multiple places, but I could be wrong.
16:10 lordcirth_work v3 gets rid of nickserv and all that tacked-on stuff
16:10 onslack <ryan.walder> which is exactly why slack has become dominant, it's easy and doesn't make your life more annoying (unless it's users talk to you via a slack bridge ;))
16:10 raptelan eff me, I can't even tab complete ryan.walder.
16:10 rockey raptelan: https://github.com/irssi/scripts.irssi.org/blob/master/scripts/slack_complete.pl
16:10 rockey if you're using irssi
16:11 raptelan I'm not presently.
16:11 raptelan maybe later though.  irssi is my usual client.  I'm trying LimeChat.
16:11 vexati0n am i blind, or does salt not give you the summary information for a state when you run with --out=json ?
16:11 babilen rockey: Ah, nice
16:11 raptelan honestly I don't really care enough about those who choose to use IRC via a Slack bridge to install custom stuff for it though.
16:12 raptelan (probably, I'll review that script anyways)
16:12 raptelan it's kind of amazing how much irssi has grown able to do.
16:13 onslack <ryan.walder> the emacs of irc
16:13 babilen ERC!
16:13 raptelan nooooooo!  vim forever!
16:13 onslack Action: ryan.walder shudders
16:14 onslack Action: mts-salt leaves for warmer climes
16:14 babilen raptelan: I'm just saying: evil is a much better vim implementation than vim
16:14 onslack <ryan.walder> neovim > vim
16:14 babilen But then .. we are getting into deep flamewar territory now :)
16:14 onslack <ryan.walder> ;)
16:14 babilen evil > neovim > vim
16:14 raptelan Personally, I found Slack very appealing initially, because it seemed like a modernized IRC.  I easily grasped how it worked and loved it for being that.  However, I found when setting up Slack teams for less technical people who had no IRC background, that they are just as mystified by it's setup as they would be if new to IRC.
16:14 onslack <ryan.walder> well, we've already had slack vs irc, may as well stoke the old ones too
16:15 Whissi joined #salt
16:15 zerocoolback joined #salt
16:15 _JZ_ joined #salt
16:15 raptelan I won't argue about vi variants, as I haven't bothered using any besides vim.  There may be better ones but I haven't had reason to go looking.
16:16 babilen Take a day or two and look into neovim and evil (on Emacs)
16:16 lordcirth_work I have heard good things about neovim
16:16 babilen I can't live without magit and org-mode on Emacs anymore, but neovim is quite nice too
16:17 * babilen → work
16:17 raptelan I use vim pretty simply though - I just work on one file at a time.  I don't try to use it as an IDE with a bunch of stuff open at once cross-referencing itself like I see people doing with emacs more often.
16:18 raptelan I don't like working on code so complex I'd need that in *any* editing platform :P
16:18 onslack <ryan.walder> same, I have multiple terminals open with multiple vims open but that's about it
16:18 raptelan I'd like to think that I like LISP, but have yet to learn it at all.
16:19 raptelan Here's another flamebait:  tmux > screen
16:20 babilen That's a given
16:20 onslack <ryan.walder> yeah
16:20 rockey gaaaah i'm to triggered, you guys have to stop :P
16:20 babilen systemd vs sysvinit, exim vs postfix, salt vs ansible, …
16:20 rockey i'm reading everything, and it triggers me whilst having to work at the same time :P
16:20 rockey gah
16:20 * rockey &
16:21 onslack <mts-salt> never used tmux. we have screen on most of our systems simply to comply with $policy regarding auto-locking sessions
16:21 onslack <mts-salt> yep, working while reading is tricky
16:22 onslack <ryan.walder> systemd is a fine initsystem, why it needs to manage my mounts, clock, etc... is beyond me
16:23 mikecmpbll joined #salt
16:25 raptelan runit is a fine init system.  There was some nicer fork of it but I can't remember now what it was called.
16:26 raptelan systemd doing more than init is exactly why I don't like it.  MacOS does the same thing so I guess they thought it must be a good idea.
16:29 RPM2018 joined #salt
16:29 hop now that the discussion has died down, forgive me if i repeat myself: if i want to use ! as comment char with file.comment_line, i have to give the argument as '"!"'
16:29 raptelan mts-salt:  I liked screen until I started learning OpenBSD, where tmux originated.  It didn't take very long for me to start liking it a lot more.
16:29 raptelan haha sorry hop, I'll stop it.
16:31 Nahual So, why hardcode a package installation into the network module? Specifically the bridge-utils install on RedHat. I see it run everytime there is a highstate even though the package is already installed.
16:31 hop maybe i should be even more explicit: the three characters "!" is what i have to salt in order for ! to end up in the file
16:31 raptelan hop:  is there a question?
16:31 hop is this intentional? and why doesn't it happen to #, because from what i can tell `yaml.load('#')` returns None as well
16:32 onslack <mts-salt> could you give some context? perhaps a pastebin of the state in question?
16:32 hop raptelan: the question is, should i report a bug, i guess
16:32 hop or maybe a documentation bug?
16:33 nebuchadnezzar not that easy to get througth salt code to start a proposal patch for https://github.com/saltstack/salt/issues/14613#issuecomment-365595752
16:34 onslack <tmacey> hop: That's because `!` is a special character in yaml (http://yaml.org/spec/1.2/spec.html#id2770814 look for section 2.4 Tags)
16:34 onslack <tmacey> By quoting it you're escaping it from being interpreted by the YAML parser
16:35 raptelan is there a saltstate that will execute `crontab -u username -r` to remove a user's entire crontab?
16:36 onslack <mts-salt> cron.absent might do it
16:37 raptelan cron.absent removes a single job from the crontab, but leaves the crontab file intact even after all jobs are removed.
16:37 raptelan I'm trying to make a remove saltstate that will delete the created user entirely, including their cron jobs.  cron.absent fails if the user doesn't exist when the state runs
16:39 raptelan `crontab -u postgres -r` throws an error when the user doesn't exist as well, but I suppose I could do a cmd.run on `crontab -u postgres -r 2>/dev/null`
16:39 onslack <mts-salt> probably not then. cmd.run isn't a terrible option
16:39 exarkun joined #salt
16:39 raptelan I've been really trying to avoid cmd.run
16:40 onslack <mts-salt> if you don't want it to error then append a simple `|| true`
16:40 raptelan the previous guy who wrote the saltstates I had to take over didn't use much except cmd.run and a whole bunch of shell scripts
16:40 onslack <mts-salt> well it's that or a python module that pretty much does cmd.run anyway
16:41 raptelan I'm just trying to use a little more forethought, although I still am largely ignorant about salt
16:41 onslack <mts-salt> that doesn't mean that cmd.run is the problem and should be avoided
16:41 raptelan right, just thought I'd ask if there was a better solution first :)
16:41 onslack <mts-salt> in this case i think cmd.run would be best. simple is usually better :)
16:42 whytewolf there are times when cmd.run is unavoidable. this does look like one of those times.
16:42 raptelan good morning whytewolf
16:42 whytewolf morning
16:43 raptelan is there a better solution to 2>/dev/null?  Like checking whether the user exists or not first and only executing the remove crontab function if they do?
16:43 raptelan I think that's what your last comment yesterday was getting at
16:43 aviau joined #salt
16:44 tys101010 joined #salt
16:44 whytewolf raptelan: yeap. you can use onlyif and unless which are global requisites that run a command on the shell and depending on the return code will let the cmd.run run
16:45 whytewolf https://docs.saltstack.com/en/latest/ref/states/requisites.html#onlyif
16:45 whytewolf https://docs.saltstack.com/en/latest/ref/states/requisites.html#unless
16:45 raptelan thanks for the link - I literally just found my way to that page as you posted them :)
16:45 whytewolf lol, no problem
16:47 raptelan I'm also getting an error from the 2>/dev/null approach, probably because of the exit code
16:47 raptelan retcode: 1 indicates a failure?
16:47 whytewolf yes
16:48 raptelan out of curiosity, how would I work around that?  I'll try onlyif instead though.
16:49 onslack <mts-salt> if you want it to succeed, append || true
16:49 whytewolf see mts-salt response about || True on the end
16:49 onslack <mts-salt> if you want something more controlled then look into using stateful: true
16:49 raptelan cool. I'll try to avoid that though.
16:49 raptelan so the command run can be a string of commands just like in a script
16:50 whytewolf yeap
16:51 whytewolf for this an unless or onlyif might check hey is the crontab there? if it exists run the cmd.run otherwise don't
16:53 raptelan I was thinking it should use `id -u postgres`
16:54 raptelan though that throws an error code if the user exists but the crontab doesn't
16:54 raptelan not sure how to check for an existing crontab
16:54 whytewolf it is just a file right?
16:54 raptelan different crons store them differently.
16:55 raptelan vixie-cron puts something in /etc for the user.  dcron does not but only maintains something in /var/spool
16:56 raptelan vixie will scan files in /etc on startup, dcron has no such support unless you put such a thing into each user's crontab to do so. :P
16:56 whytewolf what about crontab -l -u <username>
16:56 raptelan exit code 1 if there isn't one, just as with -r
16:57 whytewolf right, but it is nondestructive. so can be used in your onlyif
16:57 whytewolf or unless.
16:57 raptelan I thought any nonzero retcode would cause an error?
16:57 whytewolf nope. it is what is checked with onlyif and unless
16:57 copec joined #salt
16:58 whytewolf it works kind of like the test program in bash
16:58 whytewolf takes the exit code and decides if it is true or false based on that
16:59 ahrs joined #salt
16:59 raptelan cool, that works
17:23 zerocoolback joined #salt
17:40 pipps joined #salt
18:00 mikecmpbll joined #salt
18:02 tiwula joined #salt
18:12 K0HAX joined #salt
18:13 emerson joined #salt
18:19 exarkun joined #salt
18:20 emerson i have a state file that calls file.recurse on about 40 folders, each takes ~5 seconds to run. Is there any way to call the state file so that it only does file.recurse for a specific folder instead of all of them?
18:22 hoonetorg joined #salt
18:24 cyteen joined #salt
18:35 raptelan emerson: why not split the single state into 40, then make a new state that requires all of them for when you do want all 40 to be recursed?
18:50 cgiroua_ joined #salt
18:56 schemanic joined #salt
19:05 lordcirth_work I have a function def: "def suppress_comments(args, hide_comments=None):" and python says syntax error: "hide_comments=None):" with the ^ pointing to 's='
19:06 [dee] left #salt
19:13 raptelan I have a saltstate that installs a package.  How could I go about making the version of that package dynamically specified rather than hardcoded?
19:14 Edgan raptelan: https://cygnusx-1.org/formula.txt  Look for pkgs.sls. It is a pkg macro that reads the list from the map.jinja
19:15 Edgan raptelan: Then you can have overrides in pillars pulled into the map.jinja.
19:15 Edgan raptelan: You could also also adapt the code to a simpler for your use case.
19:16 Edgan raptelan: I really like to do packages in this style, because then pkgs.sls looks the same across formulas, other than the formula name. It makes it more like a re-using template.
19:17 raptelan hmm, that may be well beyond what I need.  This is the saltstate:  https://gist.github.com/caseyallenshobe/c46f116416833c08f778e0b49912a9ac - I just want to use a dynamic single version for this one package instead of "10"
19:17 raptelan I don't know anything about jinja yet - would that be required for something this simple?
19:18 whytewolf yes
19:18 Edgan raptelan: You want something like, https://paste.fedoraproject.org/paste/lIvMbjhmi38tT2HpCCjbQQ
19:18 lordcirth_work raptelan, dynamic based on what?
19:18 ymasson joined #salt
19:18 raptelan not sure?  We have many servers, with various versions that need to be maintained
19:19 raptelan presently there is a saltstate directory for each version
19:19 raptelan so somebody applies either postgresql9.5 or postgresql10, etc.
19:19 raptelan but all the steps are identical
19:19 Edgan raptelan: It is going to be more complicated than that. postgresql 9.2, 9.3, 9.4, 10, etc are going to have more than just the package name different. They will need different configuration file syntax, etc
19:20 raptelan Edgan: yeah, but that can be as simple as file.managed salt://postgresql/configuration/<version>/blah
19:20 raptelan the managed configurations are static for each version.
19:20 Garo_ left #salt
19:20 Edgan raptelan: That is the poor way to do it. Better to have one template that handles them all. Otherwise you will want to change the default amount of memory, and have to change X number of files.
19:22 raptelan I am fine with that, complexity can be added later if it ends up being desirable.
19:22 raptelan I'd prefer to start simple
19:22 Edgan raptelan: my experience says that starting simple just leads to a spectrum of quality as you learn the 10 different ways, and makes lots of tech debt
19:22 raptelan Edgan: with your last link, where does {{ version }} come from?
19:23 Edgan raptelan: It could come from a pillar. It was just an example. But with my map.jinja style you could have a default version, and then you could override it for different environments/accounts/clusters/etc
19:24 raptelan ok, I suppose I need to learn about pillars then.
19:25 Edgan raptelan: Here is a simple version, "- name: postgresql-{{ pillar['pg_version'] }}"
19:26 raptelan then why does your example have "{{ pillar }}" instead of that?
19:26 raptelan s/pillar/version/
19:26 Edgan raptelan: But you will learn that pillars aren't designed to scale well. {{ version }} could be use with {% set version = '10' %}
19:27 raptelan where would that set happen?
19:27 Edgan raptelan: You will actually end up with something like  "- name: postgresql-{{ pillar['postgresql']['environment']['pg_version'] }}"
19:27 raptelan we have hundreds of hosts, and need to apply various versions across them.
19:27 Edgan raptelan: You could set it in a map.jinja or in a .sls file
19:28 raptelan ah, so there could be, for instance, a postgresql10.sls that sets version = 10 then includes a more generic postgresql.sls
19:28 Edgan raptelan: maybe
19:28 raptelan is the version that's installed saved in a config on each host?
19:29 raptelan is that what a pillar is?
19:29 Edgan raptelan: But if you have hunderds of hosts that fall in to categories like env, cluster, datacenter, etc, then you really want the map.jinja way. It is meant for that exact use case.
19:29 raptelan all of our hosts are pretty darn standardized.  At least currently.
19:29 Aleks3Y joined #salt
19:30 Edgan A pillar is just metadata that is included in the salt run for a certain host. You can include them in all, or in just one. Pillars have their own top.sls.
19:30 raptelan ok, so it's a per-host configuration.  I think that sounds appropriate
19:33 pualj joined #salt
19:35 schemanic Hello, I'm getting minion did not return errors. Can anyone help me troubleshoot?
19:36 lordcirth_work schemanic, you have ssh access to the minion?
19:40 pipps joined #salt
19:43 pualj joined #salt
20:07 ecrane joined #salt
20:23 pipps joined #salt
20:25 raptelan joined #salt
20:25 pipps joined #salt
20:49 pipps joined #salt
20:51 pipps joined #salt
20:52 mchlumsky_ joined #salt
20:55 pipps99 joined #salt
20:55 pipps_ joined #salt
21:03 pipps joined #salt
21:05 pipps joined #salt
21:06 lordcirth_work I need to iterate over range(00,12) but it's getting cut to '1' instead of '01'.  Is there a simple fix?
21:08 sjorge joined #salt
21:09 lordcirth_work Found it: https://stackoverflow.com/questions/46938617/jinja2-templating-with-ansible-and-zfill
21:10 lordcirth_work {% set id = '%02d' | format(n) %}
21:26 mrueg joined #salt
21:28 mrueg joined #salt
21:38 frew joined #salt
21:39 aldevar left #salt
21:41 frew left #salt
21:41 frew joined #salt
21:54 cgiroua joined #salt
21:55 pipps joined #salt
22:01 pipps joined #salt
22:02 pualj joined #salt
22:12 Hybrid joined #salt
22:15 pipps joined #salt
22:17 pipps99 joined #salt
22:24 DanyC joined #salt
22:25 lru anyone else having headaches with the repo's?   seems like the http repos are being redirected to https
22:28 Edgan lru: there is an open bug in github. Many people complained yesterday.
22:29 Edgan gtmanfred: Whats going on with the repos?
22:29 Edgan lru: https://github.com/saltstack/salt/issues/46021
22:30 lru good to know.... I don't mind installing apt-transport-https, but old distros like Ubuntu 14.04 LTS had some serious struggles
22:30 lru thanks
22:30 Hybrid joined #salt
22:30 gtmanfred yes, all http is being redirected to https
22:31 gtmanfred we moved to a cloud load balancer at DO because there were problems with our haproxy server yesterday
22:31 gtmanfred the requests spiked to 1000/s yesterday
22:31 Edgan gtmanfred: thanks
22:31 Edgan gtmanfred: This is why I reverse proxy :)
22:32 Edgan lordcirth_work: nice find
22:32 gtmanfred They are also working on moving the repo to a CDN possibly, not really sure right now
22:33 Edgan gtmanfred: S3+Cloudfront seem like the way to go at that scale
22:33 gtmanfred yeah, that was the thought
22:33 gtmanfred we were discussing cloudflare or cloudfront this morning
22:33 Edgan gtmanfred: If already using AWS, I would just go with Cloudfront
22:34 gtmanfred we will see, it might just be one ip, and they could just block that
22:34 gtmanfred we are on Digital Ocean
22:34 gtmanfred because we have an old grandfathered in account that has free bandwidth
22:34 Edgan nice
22:34 gtmanfred but yeah, might be moving to aws
22:34 gtmanfred I am trying to keep my nose out of it, cause i don't want to be responsible for anything :P
22:34 Edgan haha
22:35 gtmanfred Edgan: what was the answer to your issue last week?
22:35 gtmanfred also, i am hoping to catch up with all my starred emails tomorrow when i do triage
22:36 Edgan gtmanfred: https://github.com/saltstack/salt/issues/45938
22:36 Edgan gtmanfred: I patched a in-house version with that. Curious what you think of the solution.
22:38 Edgan gtmanfred: from what you were saying I think it is the best solution with modifying kazoo
22:38 Edgan I mean without
22:38 gtmanfred yeah, i would just switch it around to `if chk_acls and _check_acls(chk_acls, cur_acls):`
22:39 gtmanfred if you wanted to submit that as a PR to the oxygen branch i would appreciate it
22:40 gtmanfred but yeah, that seems totally reasonable to me, if no acls are set on the state, then we shouldn't be setting any
22:43 Edgan gtmanfred: https://paste.fedoraproject.org/paste/oFIVoDBM5-5iWcng8gNlaw
22:44 gtmanfred sorry, i meant not _check_acls
22:45 gtmanfred that should be the same thing, because chk_acls != [] and just checking the truthiness of chk_acls should both result in false if it is [] and true for everything else
22:45 gtmanfred `if chk_acls and not _check_acls(chk_acls, cur_acls):`
22:46 Edgan right, that should work, and I will test it :)
22:47 gtmanfred :+1:
22:52 beardo joined #salt
23:02 dlloyd joined #salt
23:04 hemphill joined #salt
23:05 K0HAX joined #salt
23:07 Edgan gtmanfred: https://github.com/saltstack/salt/pull/46043 :) Tested on instance that previously experienced the issue
23:08 gtmanfred looks good, in the future, bug fixes should be made against branches for the fix, also fyi, this will not make it into oxygen.0, but will be in .1
23:08 gtmanfred approved!
23:08 gtmanfred thanks for doing that!
23:09 Edgan gtmanfred: Thank you for writing the original code. It helped kill some cmd.runs. :)
23:09 gtmanfred happy to help, it was actually code for one of our customers that they paid for some dev hours
23:09 Edgan They paid, but you wrote?
23:10 gtmanfred yeah
23:22 exarkun joined #salt
23:38 kiorky joined #salt

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