Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-02-12

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

All times shown according to UTC.

Time Nick Message
00:00 whytewolf this is my biggest problem with using formulas. as there is not standard for datasharing between them the pillars are often not designed to work in anything but the limited design that the formula needs
00:03 DEger joined #salt
00:05 stooj joined #salt
00:09 viccuad I just think that using key:value pairs where the key name is not standardized but inputted by the user is inherently evil
00:10 viccuad see the syntactic sugar of - name
00:10 whytewolf a list wouldn't have helped here
00:10 whytewolf [which is all - is]
00:11 viccuad just make key identifiers know, and not chosen by the user
00:11 viccuad s/know/known
00:12 whytewolf but you can't be sure of order in a list. you don't know if the one you want is first or 50th
00:12 viccuad true. Maybe I should just go to sleep, obviously
00:12 viccuad to not embarrass myself anymore :)
00:20 s_kunk joined #salt
00:33 stooj joined #salt
00:39 stooj joined #salt
00:45 stooj joined #salt
01:03 shoemonkey joined #salt
01:03 FiveBroDeepBook joined #salt
01:03 FiveBroDeepBook left #salt
01:05 cyborg-one joined #salt
01:26 ksoviero joined #salt
01:27 ksoviero Anyone know if there's a development-focused IRC channel for SaltStack? I'm trying to add support for ignore_missing to states, but I can't figure something out.
01:28 hemebond I think there are usually one or two devs hanging around in here.
01:29 ksoviero Well, in that case, here's the question, how would I access the "ignore_missing" attribute from within the render_state function in salt/state.py?
01:31 alvinstarr joined #salt
01:31 ksoviero Pillars gets it from "six.itervalues(tops)", but I don't know what "six" is and neither does PyCharm.
01:32 jas02 joined #salt
01:37 ksoviero or, actually, I think I need to access that attribute from the render_highstate method rather, since render_state assumes there's a state to render.
01:58 ksoviero Actually, I figured it out.
01:59 ksoviero New issue is trying to figure out where the errors are coming from so I can effectively ignore them.
02:03 catpiggest joined #salt
02:06 djgerm joined #salt
02:09 hoonetorg joined #salt
02:13 onlyanegg joined #salt
02:27 justan0theruser joined #salt
02:33 Tanta joined #salt
02:36 hemebond I believe "six" is the compatibility stuff between Python 2 and Python 3.
03:03 shoemonkey joined #salt
03:08 ksoviero Ya, I meant to say "tops", not six, but it's 9pm here, so forgive my brain's BS. ;)
03:13 jas02 joined #salt
03:28 bluenemo joined #salt
03:29 cacasmacas_ joined #salt
03:31 cacasmacas joined #salt
03:42 g3cko joined #salt
03:47 justanotheruser joined #salt
03:54 PatrolDoom joined #salt
04:00 scoates joined #salt
04:01 ivanjaros joined #salt
04:10 swills__ joined #salt
04:15 jas02 joined #salt
04:18 scsinutz joined #salt
04:18 edrocks joined #salt
04:21 jeffspeff joined #salt
04:28 jeffspeff joined #salt
04:40 scsinutz joined #salt
04:58 morissette joined #salt
05:04 shoemonkey joined #salt
05:16 jas02 joined #salt
05:51 FiveBroDeepBook joined #salt
05:51 FiveBroDeepBook left #salt
05:52 mk-fg joined #salt
05:59 evle joined #salt
06:02 beardedeagle joined #salt
06:05 jeffspeff joined #salt
06:10 FiveBroDeepBook joined #salt
06:58 cacasmacas joined #salt
06:58 cacasmacas joined #salt
07:04 cacasmacas joined #salt
07:05 shoemonkey joined #salt
07:12 sh123124213 joined #salt
07:15 preludedrew joined #salt
07:17 jas02 joined #salt
07:33 jas02 joined #salt
07:34 jas02_ joined #salt
08:10 cacasmacas joined #salt
08:13 cacasmacas joined #salt
08:25 Inveracity joined #salt
08:31 cyborg-one joined #salt
08:34 jas02 joined #salt
08:38 jas02_ joined #salt
08:38 diagnostuck joined #salt
08:44 ivanjaros joined #salt
08:46 mk-fg joined #salt
08:58 sh123124213 joined #salt
09:00 cacasmacas joined #salt
09:06 Trauma joined #salt
09:06 shoemonkey joined #salt
09:21 edrocks joined #salt
09:25 viccuad joined #salt
09:39 jas02 joined #salt
10:23 icebal joined #salt
10:34 diagnostuck joined #salt
10:36 jas02 joined #salt
10:37 cacasmacas joined #salt
10:40 jas02_ joined #salt
10:46 icebal joined #salt
11:02 arif-ali joined #salt
11:04 Taters_ joined #salt
11:05 sh123124213 joined #salt
11:10 candyman88 joined #salt
11:34 Trauma joined #salt
11:37 jas02 joined #salt
11:37 mikecmpbll joined #salt
11:38 viccuad is there a known formula for installing ca certificates? do you folks use something to that effect? thanks in advance
11:39 mrBen2k2k2k joined #salt
11:48 FiveBroDeepBook joined #salt
11:48 FiveBroDeepBook left #salt
11:51 Neighbour viccuad: I use file.manage for that :)
11:54 diagnostuck joined #salt
11:58 FiveBroDeepBook joined #salt
11:59 FiveBroDeepBook left #salt
12:04 viccuad fair enough :)
12:06 viccuad so, download the file and check the checksum, just to have the state fail if the certificate changes? (and then, human interaction)
12:07 viccuad better make the state for obtaining the certificate fail, than software down the line?
12:08 jschoolcraft joined #salt
12:44 Neighbour Well, usually the OS gives you a bunch of root CA certs, which is all you need on the client end to verify certs a server hands you
12:44 Neighbour (since it's the server's obligation to send its own cert, plus all the intermediate certs, but not the root CA cert)
12:49 honestly how to update the OS cert store differs between OSes (and linux distros)
12:50 honestly salt has a module for windows: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.win_certutil.html
13:01 diagnostuck joined #salt
13:07 shoemonkey joined #salt
13:31 jas02 joined #salt
13:32 candyman88 joined #salt
13:51 jas02 joined #salt
13:53 candyman88 joined #salt
14:02 jas02 joined #salt
14:10 candyman88 joined #salt
14:14 candyman89 joined #salt
14:14 diagnostuck joined #salt
14:18 viccuad joined #salt
14:25 candyman88 joined #salt
14:48 guerby joined #salt
15:08 shoemonkey joined #salt
15:14 justanotheruser joined #salt
15:19 diagnostuck joined #salt
15:23 jas02 joined #salt
15:43 jas02 joined #salt
15:44 jas02_ joined #salt
16:15 diagnostuck joined #salt
16:19 FiveBroDeepBook joined #salt
16:19 FiveBroDeepBook left #salt
16:25 edrocks joined #salt
16:28 funster joined #salt
16:30 funster hi
16:30 jas02 joined #salt
16:32 daxroc How do I stop the escaping of newlines from a jinja variable into a state?
16:32 daxroc "|safe" filter has no effect
16:33 DEger joined #salt
16:36 skinkitten joined #salt
16:36 skinkitten_ joined #salt
16:41 Trauma joined #salt
16:43 cacasmacas joined #salt
16:43 jas02 joined #salt
16:44 netcho_ joined #salt
16:47 FiveBroDeepBook joined #salt
16:47 FiveBroDeepBook left #salt
16:53 scsinutz joined #salt
16:54 kappa joined #salt
16:56 mikecmpbll joined #salt
17:01 FiveBroDeepBook joined #salt
17:01 FiveBroDeepBook left #salt
17:07 diagnostuck joined #salt
17:08 scoates joined #salt
17:10 shoemonkey joined #salt
17:11 AvengerMoJo joined #salt
17:13 DEger joined #salt
17:14 ProT-0-TypE joined #salt
17:15 scsinutz joined #salt
17:17 AvengerMoJo joined #salt
17:26 cacasmacas joined #salt
17:31 hrumph is there a way to get a salt run to just exit?
17:40 ivanjaros joined #salt
17:41 fracklen joined #salt
17:57 diagnostuck joined #salt
18:03 bluenemo joined #salt
18:03 kappa joined #salt
18:04 iggy hrumph: in what way? on failure? just because?
18:05 iggy daxroc: it depends, gist the state/variable
18:05 jas02 joined #salt
18:05 inad922 joined #salt
18:11 fracklen joined #salt
18:12 cacasmacas joined #salt
18:14 kutenai left #salt
18:16 DEger joined #salt
18:24 jas02 joined #salt
18:29 lorengordon joined #salt
18:32 orionx joined #salt
18:33 jas02 joined #salt
18:33 Tanta joined #salt
18:37 kappa_ joined #salt
18:49 salzer joined #salt
18:56 salzer left #salt
19:01 salzer joined #salt
19:02 Lionel_Debroux joined #salt
19:02 buglessdr joined #salt
19:03 nicerobot[m] joined #salt
19:09 salzer left #salt
19:09 jas02_ joined #salt
19:10 shoemonkey joined #salt
19:23 jas02 joined #salt
19:24 hrumph iggy i would like it so you can call some function in a state function like saltutils.conclude_run, and then the state you are in would be the last state no matter waht
19:25 hrumph although it would still return whatever it was going to return
19:28 cyborg-one joined #salt
19:29 buglessdr joined #salt
19:43 iggy nope
19:44 iggy you can failhard on a test state that fails, but that's going to show up as a failure
19:45 iggy also, that's not very nice... you're never going to get a complete highstate that way
19:47 hrumph iggy i think it would be nice in the context of a state that calls a reboot
19:47 hrumph because you could just abandon cleanly
19:47 hrumph iggy in this context for example: https://github.com/saltstack/salt/pull/39332
19:47 saltstackbot [#39332][OPEN] Add shutdown and reboot functions to win_system state module | What does this PR do?...
19:48 iggy we just have a state with `order: last` that checks if /var/run/reboot-required exists
19:48 onmeac joined #salt
19:48 scsinutz joined #salt
19:49 hrumph iggy if the function had a param called something like "abandon_state_when" and then you could supply a value such as "on-attempt", "on-success", "never"
19:49 hrumph iggy yes i'm ok with that but this guy morganwillcock and (i think a bunch of other windows people) want more flexibility
19:49 hrumph they're introducing failhards into state runs just so they can do this
19:50 hrumph iggy but it's making it look like the state runs are failing when in fact it's a desired outcome
19:51 hrumph iggy that's why i said "it's time for a PR but I don't think that this will be the end of this"
19:51 iggy do you really want to say fuck it and reboot in the middle of a highstate?
19:52 hrumph iggy not me
19:52 iggy I'd be worried that would leave things in a bad state
19:52 hrumph iggy but if i ran into a problem with windows where i had to
19:52 hrumph iggy then that's how it would be
19:52 hrumph iggy gor the time being i'm using a final housekeeping state to reeboot like you suggested
19:52 hrumph iggy and it hasn't cause me problems yet
19:53 hrumph iggy i should ask for some context to establish that it's really necessary
19:58 freelock joined #salt
19:58 ThomasJ|m joined #salt
19:58 jerrykan[m] joined #salt
19:58 Salander27 joined #salt
19:58 saintaquinas[m] joined #salt
20:03 jas02_ joined #salt
20:12 DEger joined #salt
20:28 icebal joined #salt
20:35 diagnostuck joined #salt
20:37 salzer joined #salt
20:37 Guest93151 joined #salt
20:47 jas02 joined #salt
20:50 scsinutz joined #salt
21:04 icebal joined #salt
21:11 shoemonkey joined #salt
21:11 jimklo joined #salt
21:13 beardedeagle The more I do in salt, the more I find myself putting data into pillars to make the states more dynamic. Like I do a LOT of dicts and lists in my pillars so I can for loop through a single state declaration as many time as I need to (which can grow or shrink.
21:14 beardedeagle which...is about the same as making a macro I guess
21:14 beardedeagle not sure if this is best practice or not though
21:14 hemebond For-loop seems much better to me than a macro.
21:15 beardedeagle like pretty much every formula I have has as directories and files pillar dict
21:15 beardedeagle which I loop through in my config.sls's to lay things out
21:15 daxroc Hey all
21:15 daxroc hitting an unusal error with an orchestrate workflow.
21:17 daxroc I'm calling a saltutil.sync_grains  and  it returns a compound match for nodes successful but the changes show <node-id>: Data failed to compile:
21:17 beardedeagle hemebond: I'll throw an example at you, give me a moment
21:18 daxroc https://www.irccloud.com/pastebin/2pSH7U4H/
21:18 hemebond daxroc: Check the minion logs.
21:22 icebal joined #salt
21:23 daxroc hemebond: it's not loging any error on the minions - only shows on the orchestrate output - a salt '*' grains.ls, get <key> works fine after the run ?
21:24 hemebond Oooh. I'm afraid I don't know much about orchestration.
21:24 hemebond So running sync_grains manually against a minion works fine also?
21:27 daxroc Yes
21:27 daxroc Do notice - 2017-02-12 21:26:54,465 [salt.transport.ipc][ERROR   ][12721] Exception occurred while handling stream: [Errno 0] Success on the master now tho
21:27 orionx joined #salt
21:30 daxroc Must not linke one of my grains
21:30 daxroc *like
21:37 diagnostuck joined #salt
21:37 daxroc Says it has succeeded and the retcode is 0 >?<
21:38 beardedeagle hemebond: https://gist.github.com/beardedeagle/e4a2038f17c52b4372f314da0a3e2c9f
21:38 beardedeagle that is just an example of only file.directories
21:38 beardedeagle I have one for file.managed as well
21:38 blueelvis joined #salt
21:38 beardedeagle it's overly verbose, but it allows me to do #n of directories and files without being overly specific in the state
21:39 beardedeagle and you can probably see why I have thought of making it a macro. as a top level macro I could just inherit to all states
21:39 beardedeagle or iggy ^ if you want to give your opinion as well
21:40 icebal joined #salt
21:41 beardedeagle and literally all of my formula config.sls files are set up this way
21:41 hemebond Shouldn't the formula interpret the pillar data and create directories if needed?
21:41 beardedeagle it does
21:42 hemebond All you're really doing here is moving the state definition into your pillars.
21:42 hemebond Well you're not really interpreting the pillar data, you're just copying it over into the state.
21:43 beardedeagle I guess I don't follow then
21:43 hemebond Interpreting would be having a pillar "use_ssl: True" and having the formula create the directories and files required.
21:45 beardedeagle ah, I do that in some cases with things like services
21:46 beardedeagle So a little back story as well: currently i maintain everything salt. I have rewritten everything so I can open it up tot he dev teams I support. Basically I just wanted one location for them to go to to be able to add or remove things as needed and have my states apply dynamically from that
21:46 beardedeagle I don't want them to have to "know" salt
21:46 beardedeagle just how to edit yaml
21:47 beardedeagle so that is how this came about
21:47 hemebond I see.
21:47 beardedeagle learning infra is hard for the dev's here
21:48 hemebond Sure, but if the formula is written well they really only need to understand some simple pillar data, rather than having to understand how Salt states work.
21:48 beardedeagle I honestly feel the best way would make a top level macros folder and make things like this into a macro and just pass that macro the pillar object
21:48 Blueelvis_RoXXX_ joined #salt
21:49 beardedeagle it becomes a little DSL like then though
21:49 hemebond Yes, it does. Though it shouldn't be quite as bad.
21:50 hemebond Right now, all you've done is moved the state definition into pillars.
21:50 hemebond So your team still has to learn how states work.
21:50 jas02 joined #salt
21:50 hemebond As well as the ins and outs of the software being installed and configured.
21:50 scsinutz joined #salt
21:50 beardedeagle hrm
21:50 beardedeagle I guess I need to think about this more
21:51 beardedeagle thinking on best practices is something that keeps me up at night
21:51 jas02_ joined #salt
21:51 hemebond
21:51 beardedeagle best practices vs ease of use
21:52 jas02 joined #salt
21:55 salzer beardedeagle: Hello, looking at your code: recurse: {{ directory.recurse or None }}  .... Does this work?   directory['recurse']: key does not exist and "or None" is never reached ...?
21:55 alxf joined #salt
21:56 honestly the "or None" is pretty redundant
21:57 beardedeagle verbosity vs inference
21:57 salzer beardedeagle: I would say: You will need a pillar.get() for it.
21:57 beardedeagle salzer: this is an example
21:57 beardedeagle not exactly what my code looks like
21:57 beardedeagle but give you the general idea
21:57 jimklo joined #salt
21:57 beardedeagle gives* even
21:58 salzer beardedeagle: ok, sorry, I see.
21:58 beardedeagle @honestly: I write salt the same way I write python
21:59 beardedeagle and follow the "zen of python" pretty closely
22:03 jas02 joined #salt
22:03 bwellsnc joined #salt
22:04 p04451 joined #salt
22:04 bwellsnc Hey guys, I have a question.   I am trying to setup a config for a service which will have a default configuration.... I will then have custom conf.d files for other group of servers.  I tried to set this up but I was unable to, it said I had a conflict.. Anyone done this before.  Thanks!
22:05 beardedeagle That being said, this would probably be best written in the py renderer anyway
22:10 justan0theruser joined #salt
22:13 bwellsnc basically, I am managing the nrpe service, so I have a base nrpe config file with a /etc/nrpe.d entry in the config.  I then want for my elasticsearch servers have a elasticsearch.cfg file that is associated to that group and lives under the /etc/nrpe.d directory.  The elasticsearch group has a directory with nrpe and an init.sls that points to the elasticsearch.cfg file.. problem is I can't seem to have two entries with nrpe in my tree
22:15 salzer left #salt
22:18 beardedeagle @bwellsnc: namespace it
22:19 bwellsnc ah ok
22:22 inad922 joined #salt
22:26 cacasmacas joined #salt
22:27 edrocks joined #salt
22:34 ashmckenzie joined #salt
22:49 jas02 joined #salt
22:51 icebal joined #salt
22:52 scsinutz joined #salt
22:53 diagnostuck joined #salt
23:03 cacasmacas joined #salt
23:04 jas02 joined #salt
23:05 swa_mobil joined #salt
23:12 shoemonkey joined #salt
23:13 scsinutz joined #salt
23:16 orionx joined #salt
23:24 beardedeagle hemebond: after some thought here is what I am going to do
23:25 beardedeagle 1.) hard requirements to make the formula will be explicitly set
23:25 beardedeagle 2.) my for loops will be moved into top level macros
23:25 beardedeagle 3.) these macros will be included in each formula to allow for additional customization for each team
23:28 beardedeagle I think that is a good blend of "best practices" and this specific use case
23:36 justanotheruser joined #salt
23:50 jas02 joined #salt
23:50 netcho_ joined #salt

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