Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-14

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

All times shown according to UTC.

Time Nick Message
00:02 Ni3mm4nd joined #salt
00:02 ox left #salt
00:17 Edur joined #salt
00:17 omie888777 joined #salt
00:36 hammer065 joined #salt
00:49 ninjada joined #salt
00:51 keldwud joined #salt
00:51 keldwud joined #salt
01:01 debian112 joined #salt
01:04 debian1121 joined #salt
01:20 swills joined #salt
01:25 ws2k3 joined #salt
01:27 swills joined #salt
01:27 swills joined #salt
01:29 ws2k3 joined #salt
01:37 debian112 joined #salt
01:51 ilbot3 joined #salt
01:51 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.6, 2017.7.0 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers <+> Please make sure you're properly identified to speak in the channel.
02:03 Ni3mm4nd joined #salt
02:07 debian112 joined #salt
02:23 justyns joined #salt
02:27 hoonetorg joined #salt
02:37 berto- joined #salt
02:37 debian112 joined #salt
02:39 Edur joined #salt
02:43 debian1121 joined #salt
02:45 evle joined #salt
02:46 JPT joined #salt
02:51 evle joined #salt
02:53 justan0theruser joined #salt
03:02 debian112 joined #salt
03:06 zerocool_ joined #salt
03:08 donmichelangelo joined #salt
03:09 zerocool_ joined #salt
03:11 onlyanegg joined #salt
03:21 ws2k3 joined #salt
03:21 ws2k3 joined #salt
03:22 ws2k3 joined #salt
03:23 ws2k3 joined #salt
03:23 ws2k3 joined #salt
03:23 ws2k3 joined #salt
03:30 shoemonkey joined #salt
03:34 debian112 joined #salt
03:59 debian1121 joined #salt
04:05 Ni3mm4nd joined #salt
04:29 gmoro joined #salt
04:35 gmoro_ joined #salt
04:39 usernkey joined #salt
04:46 golodhrim|work joined #salt
04:48 usernkey1 joined #salt
05:03 onlyanegg joined #salt
05:03 zer0def joined #salt
05:05 Tgrv joined #salt
05:07 _KaszpiR_ joined #salt
05:10 _aeris_ joined #salt
05:27 CrummyGummy_ joined #salt
05:32 beardedeagle joined #salt
05:32 mbuf joined #salt
05:33 mbuf left #salt
05:37 felskrone joined #salt
05:43 debian112 joined #salt
05:55 oida joined #salt
05:58 pualj joined #salt
06:04 do3meli joined #salt
06:04 do3meli left #salt
06:06 Ni3mm4nd joined #salt
06:29 Neighbour wwalker: How about {%- if grains['id'] in [list-of-string] %} ?
06:38 armyriad joined #salt
06:40 Ricardo1000 joined #salt
06:43 Ni3mm4nd joined #salt
06:43 ninjada joined #salt
06:44 ninjada joined #salt
06:52 hoonetorg joined #salt
06:52 jhauser joined #salt
06:58 darioleidi joined #salt
07:01 CrummyGummy joined #salt
07:01 lietu joined #salt
07:02 lietu I've got salt provisioning on a Vagrant VM which is on the whole taking a long time - any tips on how to profile the various Salt States in the state.highstate -run so that I can find out which bits I need to optimize?
07:04 ninjada joined #salt
07:06 onlyanegg joined #salt
07:19 o1e9 joined #salt
07:20 usernkey joined #salt
07:28 high_fiver joined #salt
07:43 aldevar joined #salt
07:50 rgrundstrom joined #salt
07:57 viq lietu: IIRC states say explicitly how much time each took - though admittedly I'm not even a n00b when it comes to profiling
07:57 viq lietu: one thing I learned is that salt calls to other nodes or mine take time
08:02 pbandark joined #salt
08:03 mikecmpbll joined #salt
08:05 DanyC joined #salt
08:06 coredumb joined #salt
08:06 saintpablo joined #salt
08:10 impi joined #salt
08:15 _aeris_ joined #salt
08:15 bdrung_work joined #salt
08:19 flughafen can i access the salt id from the roster file in a state file?
08:19 toabi left #salt
08:20 vchauhan joined #salt
08:30 Mattch joined #salt
08:32 xet7 joined #salt
08:33 high_fiver_ joined #salt
08:39 Naresh joined #salt
08:51 pbandark joined #salt
08:53 zulutango joined #salt
08:55 high_fiver joined #salt
09:01 zerocoolback joined #salt
09:07 _KaszpiR_ joined #salt
09:07 onlyanegg joined #salt
09:07 gnomethrower joined #salt
09:10 theanalyst how do I pass None as an argument in a state file to a salt.runner
09:10 theanalyst the runner seems to interpet this as a string instead of pythonic None
09:12 sjorge joined #salt
09:12 Lionel_Debroux_ joined #salt
09:16 Lionel_Debroux_ joined #salt
09:17 ProT-0-TypE joined #salt
09:25 _KaszpiR_ joined #salt
10:08 onlyanegg joined #salt
10:12 zerocoolback joined #salt
10:14 smartalek joined #salt
10:15 zerocoolback joined #salt
10:19 mikecmpbll joined #salt
10:26 jeddi joined #salt
10:56 mike25de joined #salt
10:56 * mike25de hi all
11:06 toanju joined #salt
11:27 Savemech_ joined #salt
11:27 Savemech_ joined #salt
11:36 Cooldot joined #salt
11:41 Ludo- joined #salt
11:45 felskrone joined #salt
11:58 shalkie joined #salt
12:08 onlyanegg joined #salt
12:11 justan0theruser joined #salt
12:15 ssplatt joined #salt
12:16 zerocoolback joined #salt
12:27 zerocoolback joined #salt
12:34 dev_tea joined #salt
12:36 cyteen joined #salt
12:45 jdipierro joined #salt
12:50 coredumb Rendering SLS default.scheduler failed, render error: global name '__proxy__' is not defined < I'm confused... I indeed don't use any proxy
12:54 toanju joined #salt
12:56 Psyke joined #salt
13:02 cyborg-one joined #salt
13:02 mchlumsky joined #salt
13:03 noobiedubie joined #salt
13:06 Nagyi joined #salt
13:10 coredumb meh
13:10 coredumb agent didn't get restarted after an update >_<
13:20 LeProvokateur joined #salt
13:23 shoemonkey joined #salt
13:24 onlyanegg joined #salt
13:26 edrocks joined #salt
13:28 Shirkdog joined #salt
13:31 jdipierro joined #salt
13:31 ecdhe joined #salt
13:32 toastedpenguin joined #salt
13:34 lietu thanks viq, I guess I just need to enable verbose output to get the state timings out .. and this is simply some bash scripts etc. that are taking too long and can likely be optimized in some way
13:39 edrocks_ joined #salt
13:40 Kelsar joined #salt
13:43 cgiroua joined #salt
13:46 edrocks joined #salt
13:47 evle1 joined #salt
13:49 drawsmcgraw joined #salt
13:54 beardedeagle joined #salt
14:00 noobiedubie joined #salt
14:01 computerfoo joined #salt
14:02 computerfoo Hi
14:03 ouemt joined #salt
14:04 computerfoo When I run highstate on a minion, I get a traceback. https://pastebin.com/PsfXke22 Is there a way to narrow it down a bit more?
14:06 brianthelion joined #salt
14:07 Cottser joined #salt
14:07 gmoro joined #salt
14:09 zerocoolback joined #salt
14:10 ouemt I just installed salt-minion on a new computer, it successfuly gives the key to the salt-master, but after accepting the key it doesn't respond to test.ping. How do I go about troubleshooting?
14:11 tapoxi joined #salt
14:15 computerfoo ouemt: You could run minion and master with "-l debug" and look at the output.
14:17 ouemt computerfoo: working on figuring out how to do that, thanks :)
14:19 computerfoo ouemt: Just stop the background services and start them with "salt-minion -l debug" and "salt-master -l debug"
14:19 ouemt computerfoo: I usually run them as a service with systemd
14:19 ouemt will that make any difference?
14:20 racooper joined #salt
14:20 computerfoo Just use it to debug things. When you're done with debugging, start the systemd units again
14:21 ChubYann joined #salt
14:21 ouemt will do
14:21 promorphus joined #salt
14:21 zerocoolback joined #salt
14:22 computerfoo :)
14:23 ouemt well it worked that time...
14:24 ouemt it's something to do with the server
14:24 whytewolf ouemt: if you would rather still run them as systemd daemons you can just turn log_level_logfile to the desired loglevel you want.
14:24 ouemt if they're both started from the commandline with "salt-[master|minion] -l debug" it works
14:24 whytewolf ouemt: does the master have both 4505 and 4506 open for connection
14:25 ouemt whytewolf: I've had no problems with anything until this computer, and all the other computers work except this one
14:25 man_of_wax hi, if I need to run a couple of shell commands on a minion is it better to use a salt state or a module?
14:25 ouemt and it only happens if the master is run via systemd instead of salt-master at the cli
14:26 whytewolf ouemt: then change the log_level_logfile setting on the master. and then check the logs
14:27 whytewolf man_of_wax: if all you are doing is running a couple of commands. then just use a module or two. don't need to get into states for that. states are more for hey this is how i want this system to look. "make it so."
14:29 man_of_wax whytewolf: ok perfect that what I was thinking
14:30 brianthelion joined #salt
14:30 man_of_wax so I just put __salt__[cmd.run] inside a module
14:31 babilen man_of_wax: A state SLS with a couple of cmd.run (or module.run) entries doesn't sound too wrong either
14:31 ouemt whytewolf: I set log_level to debug, restarted the service, the command works
14:31 ouemt set log_level back to warning, restarted the service, the command times out
14:31 babilen man_of_wax: Do you want to run this once/twice on a minion or more often? How many commands are you referring to and would they be run together all the time or are these one time adjustments?
14:33 man_of_wax babilen: I'm runnig a command like this: cmd.run "my_script.sh --restart" evrytime a bunch of my programs needed a restart.
14:33 babilen And you do this manually?
14:33 man_of_wax yes
14:34 man_of_wax like a couple of time a week
14:34 whytewolf ouemt: first change log_level_logfile not log_level they are two different settings. log_level is for the console not to the logfile
14:34 babilen man_of_wax: And only that command?
14:35 whytewolf man_of_wax: is there anything that triggers a need for running that command?
14:35 babilen man_of_wax: I mean if really all you want to do is to run a single command manually every now and then in a completely manual way then I don't see a problem with salt 'foo' cmd.run 'my_script.sh --restart"
14:36 babilen If there are ways to automate that or if you want to run a group of (parameterised?) commands then a SLS might come in handy
14:36 onlyanegg joined #salt
14:37 btorch joined #salt
14:38 btorch besides file.absent is there not a way to remove multiple files ?
14:38 babilen btorch: What's wrong with file.absent ?
14:39 whytewolf ^
14:39 btorch babilen: I think I found it https://github.com/saltstack/salt/issues/22834
14:40 btorch I wanted to use it to remove several files on one declaration, seems like there is - names
14:40 babilen Yes, names is what you'd use there
14:40 babilen That's not specific to file.absent either, but can be used with any state
14:40 whytewolf - names is very useful and doens't work for just file.absent
14:41 whytewolf https://docs.saltstack.com/en/latest/ref/states/highstate.html#names-declaration
14:42 btorch thanks
14:42 ouemt whytewolf: no idea: https://gist.github.com/anonymous/b340cfba217f75479e1fde9807eb9856
14:43 ouemt whytewolf: that's not the right log, hold on...
14:43 ouemt jk, it is
14:43 ouemt just got confused by line wrapping
14:43 whytewolf okay. need more context
14:44 ouemt whytewolf: just added salt-minion to "trouble_server.dept.uni.edu" this morning, it successfully pushes the key to the master
14:44 ouemt however, I can't get test.ping to reliably return
14:46 jobuv joined #salt
14:47 ouemt it works if log_level is set to debug, or if salt-master is started via cli with -l debug, but not with log_level_file set to debug
14:48 computerfoo That seems a bit strange
14:48 ouemt you're telling me...
14:48 computerfoo :D
14:49 whytewolf very strange. [although log_level: debug and -l debug are the same thing.] log_level_logfile: just changes the logging level to the logger with out changing the console output
14:50 ouemt I blame gtmanfred for getting me started down this salt rabbit hole :)
14:51 gtmanfred you are also using oracle linux, so that is probably the problem
14:51 ouemt gtmanfred: iron here is that the problem computer is ubuntu mate
14:51 ouemt irony*
14:52 gtmanfred another terrible distribution
14:52 ouemt another decision I didn't get to make, lol
14:52 gtmanfred did you make sure the minion service didn't die while waiting on the master to accept the key?
14:53 ouemt gtmanfred: yeah, it was still running and has been restarted several times since
14:53 Llmiseyhaa joined #salt
14:53 gtmanfred ¯\(°_o)/¯ i am about to go into a meeting, then I am validating some vmware stuff today that I only have today and tomorrow to work on, so I can't really help right now, sorry
14:53 ouemt np, thanks!
14:54 gtmanfred good luck
14:54 computerfoo What error do you see when running test.ping?
14:55 ouemt computerfoo: well, it worked that time...
14:55 whytewolf ?
14:56 whytewolf so it is intermitten?
14:56 ouemt whytewolf: apparently
14:56 whytewolf worse kind of thing to find the issue with
14:56 babilen When did it not work?
14:57 ouemt babilen: I'm not sure what to say other than what I've said above
14:57 ouemt the fact that it worked this last time breaks the log_level pattern, so I don't know anymore
14:57 babilen I'm not sure if it started working at one point and had worked reliable every since or if this is an entirely intermittent issue
14:58 ouemt in the last 5 minutes, it has been working
14:58 ouemt before that, it was intermittent
14:58 ouemt I'll report back if it stops again, but for now, I'm just going to assume it was too early for it to work
14:59 babilen But there was a timeframe in which it alternated between "working" and "not working" ?
15:00 ouemt babilen: yes, as a function of log_level
15:00 ouemt log_level = debug, worked, log_level = warning, didn't
15:01 ouemt didn't matter if it was set in /etc/salt/master or with -l debug
15:01 babilen So you couldn't ping your minion if you set log_level ?
15:01 babilen Set it to warning that is
15:01 ouemt babilen: I couldn't ping it with the default setting, i.e. "systemctl start salt-minion"
15:02 ouemt the log level line was commented out in the file, so I assume warning was the default
15:02 ouemt I then killed the service, and started it with "salt-master -l debug"
15:02 ouemt it worked
15:03 ouemt I killed it, edited /etc/salt/master log_level = debug, then started the service with systemctl start salt-master
15:03 ouemt it worked
15:03 ouemt I edited /etc/salt/master to log_level = warning, restarted the service, it wouldn't work
15:03 ouemt except now (20 minutes later), it does
15:04 babilen You consistently refer to restarting the salt-master service?
15:05 ouemt yes
15:05 ouemt as in "systemctl restart salt-master"
15:05 babilen How long did you wait after starting/restarting the master before you issues pings?
15:05 babilen *issued
15:05 ouemt anywhere from 20 seconds to a few minutes
15:06 ouemt also of note, I've got 14 other machines reporting to this master, and they all returned successfully, it was only this one that didn't
15:06 babilen Okay, and at one point a minion returned pings successfully and then, after a successful ping, showed unsuccessful ones at a later time without any changes to the service status?
15:07 ouemt babilen: I don't believe I can say that
15:07 ouemt so far it has only gone from unsuccessful to successful
15:07 babilen That would be my understanding of "intermittent"
15:08 babilen It takes a bit of time for the minion to connect to the master, so I'm not surprised that you get errors rights after a restart
15:08 babilen This shouldn't take a "few minutes" though and should never stop working after it has succeeded
15:09 whytewolf it was the other way around. it started working after a few minutes
15:10 btorch how could i not know about names :) so many states that should be changed now
15:12 whytewolf btorch: just, please avoid things like this https://gist.github.com/whytewolf/32a910d964d52ac10be20fca9ff29c2b
15:13 LeProvokateur joined #salt
15:14 zutu joined #salt
15:14 btorch I see, I was thinking more in regards to directory creation
15:15 btorch I won't lie, I did think about file.manage but I think it could become messy and hard to find
15:15 btorch plus I like to use sls_id when needed against just a single file being managed
15:18 whytewolf btorch: basicly that gist is just a warning. things can get really ugly really quick. that isn't the worst i could think of with names. just the worst i want to actually put down on paper as it were.
15:18 btorch whytewolf: this should be ok though right ? https://gist.github.com/btorch/99b1e23ead5c9195d8f1413751a0150d
15:19 whytewolf your missing a {
15:19 whytewolf you're*
15:19 btorch hehe thanks
15:19 whytewolf and yeah that is fine
15:25 _JZ_ joined #salt
15:26 omie888777 joined #salt
15:31 lorengordon joined #salt
15:33 afics joined #salt
15:33 fatal_exception joined #salt
15:38 fritz09 joined #salt
15:39 computerfoo I love salt. Keep up the good work!
15:41 tapoxi joined #salt
15:52 kavakava joined #salt
15:52 gmoro joined #salt
15:53 man_of_wax I need to run the state "update_patterndb" only when update repo really updates the git repo. I wrote this state file: https://pastebin.com/YHUmr970 but I think it's wrong
15:54 dev_tea joined #salt
15:58 whytewolf man_of_wax: git: update repo not state: update repo. also service.restart is wrong. you need service.running with a watch on another state that could change it's behavrour. or a module.run to service.restart [service.restart is an execution module. not a state module]
15:58 omie888777 joined #salt
15:59 man_of_wax whytewolf: thanks for the pointers
16:05 Heartsbane joined #salt
16:07 onlyanegg joined #salt
16:20 gmoro joined #salt
16:20 ujjain joined #salt
16:20 ujjain joined #salt
16:21 gmoro joined #salt
16:24 jdipierro joined #salt
16:24 AvengerMoJo joined #salt
16:29 tiwula joined #salt
16:34 fatal_exception joined #salt
16:38 mbuf joined #salt
16:46 promorphus joined #salt
16:46 woodtablet joined #salt
16:48 Brew joined #salt
16:52 edrocks joined #salt
16:58 pipps joined #salt
16:59 pipps joined #salt
17:11 promorphus joined #salt
17:11 swills joined #salt
17:11 swills joined #salt
17:19 LeProvokateur joined #salt
17:20 alvinstarr joined #salt
17:21 whytewolf ugh, i just can't seem to focus today. so tired.
17:25 bbradley joined #salt
17:26 * woodtablet hands whytewolf a coffee
17:26 whytewolf I've had several ... they are not helping
17:33 sp0097 joined #salt
17:33 shoemonkey joined #salt
17:40 ThomasJ joined #salt
17:41 pbandark hello all..  I am using external pillar "stack". For me, the configuration looks ok. but not sure why I am not getting expected result.
17:41 pbandark https://paste.fedoraproject.org/paste/Jm1~A7sGbZOrBpppxCbWsQ
17:42 pbandark can anyone help me to understand ^^
17:43 ivanjaros joined #salt
17:44 gmoro joined #salt
17:45 nixjdm joined #salt
17:46 armguy joined #salt
17:47 whytewolf pbandark: looking at the documentation i don't see stack as a config file option only as a yaml file option.
17:49 pbandark whytewolf: i am referring https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.stack.html#module-salt.pillar.stack
17:49 whytewolf multiple config files that are jinja2 templates with support for pillar, __grains__, __salt__, __opts__ objects
17:49 whytewolf notice the lack of stack
17:49 pbandark checking
17:51 skullone left #salt
17:51 pbandark whytewolf: on the same page
17:51 pbandark "stack: the PillarStack pillar data object that has currently been merged (data from previous yaml files in PillarStack configuration)"
17:52 whytewolf "Before merging, every files above will be preprocessed as Jinja2 templates. The following variables are available in Jinja2 templating of yaml files:" the line just before that
17:52 pipps joined #salt
17:52 whytewolf for the record Jinja Templates are being referenced seperatly then config files
17:53 whytewolf stack is not an option in the config files. only in the ymal tamplate files
17:54 whytewolf yaml*
17:54 pbandark ok.. let me modify the content and check
17:54 pbandark content == my configuration
18:01 ThomasJ|d joined #salt
18:09 jrdnr joined #salt
18:10 johnkeates joined #salt
18:17 LeProvokateur joined #salt
18:20 ivanjaros joined #salt
18:21 cmz joined #salt
18:23 LeProvokateur joined #salt
18:26 brianthelion Is `module.run: state.sls:` an antipattern?
18:26 brianthelion I find myself wanting to treat states like functions and this seems to be one way to get that done
18:27 brianthelion but i don't see anyone else doing it
18:28 whytewolf i hate the term antipattern. but if anything was an anti pattern calling state.slsl from module.run would be it
18:28 whytewolf you might as well be using orchestration at that point
18:31 pipps joined #salt
18:31 brianthelion can you give some specific reasons why it should be considered an anitpattern?
18:34 whytewolf because it is better handeled through orchestration. it is actually slower in the long run as it has to create a new thread. and what are you hoping to achive that include/exclude and top level matching don't already do.
18:36 brianthelion it's not clear, though, how orchestration is a general solution in that you can't use it when running masterless
18:36 brianthelion at least to the best of my knowledge
18:36 whytewolf https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#masterless-orchestration
18:37 brianthelion nice.
18:38 whytewolf unforchantly masterless orchestration only works for salt.state currently. but i am sure that will be fixed in a future version
18:39 whytewolf but that is easy to work around with use of module.run in a state which are already familure with
18:42 jdipierro joined #salt
18:44 pbandark whytewolf: in the same environment, I can see pillar data if I execute `salt 'pratik1' pillar.items` but, i am unable to get pillar data with `salt 'pratik1' pillar.get profiles`. any clue ?
18:44 whytewolf pbandark: issue a salt 'pratik1' saltutil.pillar_refresh
18:45 whytewolf [pillar.items ignores the pillar cache compleatly, pillar.get uses it]
18:45 pbandark ahh. ok. i am getting the result now
18:45 pbandark thanks
18:53 DammitJim joined #salt
19:02 nixjdm joined #salt
19:02 _KaszpiR_ joined #salt
19:03 ProT-0-TypE joined #salt
19:07 toanju joined #salt
19:15 DammitJim is there a way to capitalize only the first letter of a pillar in jinja?
19:17 mike25de DammitJim: maybe with the python title() :
19:18 mike25de DammitJim: or x[0].upper() + x[1:]
19:19 DammitJim oh, there is no such thing as capfirst?
19:19 mike25de not sure exactly :) i am not a very advanced user/py guy
19:21 mike25de DammitJim: it seems that {{ "waiting for action"|capfirst }} exists.... but not sure if it is implemented in salt :(  you can ... only try it
19:21 DammitJim yeah, I just tested it and didn't work LOL
19:35 whytewolf DammitJim: |capitalize might be what you are looking for
19:36 DammitJim thanks whytewolf I actually found |title
19:37 DammitJim and that worked! amazing!
19:37 pipps joined #salt
19:38 whytewolf take it, it isn't a sentance with multiple words.
19:40 onlyanegg What's a use case of masterless orchestration?
19:41 brianthelion @onlyanegg: funny you should ask, whytewolf was just explaining that to me a few minutes ago
19:41 onlyanegg I think of orchestration as doing things in order over multiple boxes. Couldn't masterless orchestration be done using a state run?
19:41 onlyanegg yeah, I was reading, lol
19:41 shoemonkey joined #salt
19:42 whytewolf best case i can see is setting up all in one service configuration. such as a web server with a self services database. that you need to make sure exists. things like that. honestly i have never used it.
19:42 whytewolf also getting around jinja compile limitations
19:45 brianthelion my main motivation is to be able to treat states like functions
19:46 brianthelion i can modify the pillar and pass it on
19:46 brianthelion that provides me a level of state reuse that i don't currently have
19:47 brianthelion question tho:
19:48 brianthelion if one of the orchestrated states does something idempotent -- like create a temporary directory and install stuff there -- how does that "knowledge" get back up to the master in an orchestration scenario?
19:48 brianthelion via a grains update?
19:48 ssplatt brianthelion: you mean like formulas?
19:48 ssplatt where you write out states and separate our pillar?
19:48 ssplatt then do things on different servers based on what is enabled in the pillar?
19:49 ssplatt and you can orchestrate off the formulas too....
19:49 onlyanegg brianthelion: so your running a state which modifies a pillar, and then running another state based on that modified pillar?
19:49 gmoro joined #salt
19:50 edrocks joined #salt
19:50 brianthelion onlyanegg: not actually modifying the pillar; just passing a modified copy
19:50 onlyanegg ah, cool - would love to see an example :)
19:51 ssplatt brianthelion: you might wnat ot rethink what you are trying to do
19:51 brianthelion ssplatt: the boilerplate in formulas is pretty notorious -- it's one the biggest complaints about them
19:51 ssplatt biolerplate?
19:51 brianthelion if you want to tweak the formula even a little bit you end up having to rewrite the whole thing
19:52 brianthelion no functional encapsulation
19:52 ssplatt not following.
19:52 ssplatt you mean teh ones in salt-formulas/ repo?
19:53 brianthelion any that follow the "formula style guide" or whatever
19:53 brianthelion https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
19:53 ssplatt oh yeah i’ve never read that because we ended up going our own way on our own style before that.
19:54 ssplatt we have a pretty easy time adding new thigns to ours without rewriting them from scratch…
19:55 ssplatt but i guess that’s part ofthe complaint, we wrote all of ours from scratch because the ones in the public repo didn’t work well for us
19:55 brianthelion that's good to know.... i am a n00b so my biases are based entirely on my readings and not any practical experience. salt devs are welcome to tell me i'm a dumbass
19:55 brianthelion because i *am* a dumbass
19:58 ssplatt i made these and presented them at work recenty: https://github.com/ssplatt/salt101/blob/master/README.md   & https://github.com/ssplatt/salt201/blob/master/README.md   may be useful.  doesn’t go into all teh details
19:59 ssplatt but explains how the formulas in my repo are started.
19:59 wavded joined #salt
19:59 gmoro_ joined #salt
20:00 brianthelion nice
20:01 nixjdm joined #salt
20:07 systemexit joined #salt
20:08 saintpablos joined #salt
20:11 whytewolf brianthelion: here is a master based orchestration i plan to use on a future project. https://github.com/whytewolf/salt-phase0-orch/blob/master/orch/packs/mysql/install.sls [I'm all centos so I'm not bothered that this doesn't cover other distros]
20:12 brianthelion thanks!
20:14 whytewolf [the relavant states are located in this repo https://github.com/whytewolf/salt-phase0-states
20:23 gmoro_ joined #salt
20:30 onlyanegg joined #salt
20:30 gmoro_ joined #salt
20:32 high_fiver joined #salt
20:34 gmoro_ joined #salt
20:34 brianthelion @whytewolf: in an orchestration scenario, do grains updates get propagated back the master between each of the "salt.state:" runs? so if i run one "salt.state" and it modifies the grains, can i select on that grain in the next "salt.state"?
20:35 whytewolf no.
20:36 brianthelion that seems problematic
20:36 whytewolf it isn't.
20:38 brianthelion i currently have an implementation that involves salt using mktemp
20:38 whytewolf why
20:38 brianthelion because i need a temporary directory
20:38 whytewolf why
20:38 brianthelion but i need to get that directory name back to the master
20:39 brianthelion so i'm doing a grains update
20:40 systemexit joined #salt
20:43 brianthelion why am i using mktemp? because that's the *nix idiom for guaranteeing that you aren't clobbering something
20:45 whytewolf i know what mktemp is. the question really is why do you need a temp directory at all.
20:45 vtolstov joined #salt
20:46 vtolstov hi! i'm searching to solve my issue - i have 100-300 diskless servers and need to persistent minion keys and distribute it when node up. does somebody already have working scheme for tis?
20:46 Ni3mm4nd joined #salt
20:47 brianthelion i don't need temporary directory; i need a guarantee that i'm not clobbering another user's stuff
20:48 brianthelion i'm not the only one doing stuff on the minion
20:51 rylnd shouldnt "salt minionname saltutil.sync_all" work fine? i get an error message that says "Passed invalid arguments to saltutil.sync_all: 'bool' object is not iterable" which confuses me abit
20:53 whytewolf rylnd: it should yes. check your versions make sure you don't have something like a newer minion talking to an older master
20:55 michaelahess joined #salt
20:56 vtolstov as i understand i can put special build key inside booted server but how salt-master understand that host have two different keys ?
20:56 pipps joined #salt
20:57 onlyanegg joined #salt
21:00 whytewolf brianthelion: sounds like you have a nightmare enviroment. there is a trick to get around the fact orchestration has the same limitation as states when it comes to jinja rendering. [that being jinja is rendered before the exacution, which is why you can't access vars that are changed during the run] however salt.runner will let you run a second orchestration. and with orchestration every stanza is a
21:00 whytewolf seperate call
21:01 nixjdm joined #salt
21:01 rylnd whytewolf: thank you sir! as always spot-on. i would have looked at that last, as the template is supposed to have the same version of the salt-client. very weird. will investigate internally in that direction.
21:03 viq vtolstov: IIRC cloudflare published a bit of go that generates various keys based on a value stored in UEFI stores
21:05 viq vtolstov: https://github.com/cloudflare/gokey
21:10 MajObviousman I had a good laugh the first time I wrote an orchestration of orchestrations
21:11 MajObviousman like what rylnd is going to do
21:11 whytewolf um, brianthelion is the one looking at orchestration of orchestrations
21:11 cyteen joined #salt
21:12 brianthelion @whytewolf thanks, i will check that out.
21:14 Cottser joined #salt
21:14 flebel joined #salt
21:14 rylnd MajObviousman: what who where?
21:30 agustafson1 joined #salt
21:32 MajObviousman yes, my mistake. Sorry for the unnecessary ping rylnd
21:32 armguy joined #salt
21:33 rylnd MajObviousman: oh ok. no problem haha.
21:41 freelock joined #salt
21:42 mad` joined #salt
21:47 Ni3mm4nd joined #salt
21:48 pipps joined #salt
21:56 gomerus[m] joined #salt
21:56 hackel joined #salt
21:56 benjiale[m] joined #salt
21:56 toofoo[m] joined #salt
21:56 psychi[m] joined #salt
21:56 aboe[m] joined #salt
21:56 jerrykan[m] joined #salt
21:56 theblazehen joined #salt
21:56 ThomasJ|m joined #salt
21:56 fujexo[m] joined #salt
22:01 nixjdm joined #salt
22:03 onlyanegg joined #salt
22:04 shoemonkey joined #salt
22:24 coredumb whytewolf: would you mind giving a try to something?
22:26 whytewolf ?
22:28 cyborg-one joined #salt
22:28 pipps joined #salt
22:31 coredumb whytewolf: about that minion_id matching
22:31 coredumb :)
22:31 whytewolf ok
22:31 coredumb actually my external pillar should let you use {{ minion_id }} in jinja as passed by the server to the ext_pillar function
22:32 coredumb so normally this should be possible to override that
22:32 coredumb so I wondered if you'd mind giving it a try
22:32 coredumb *this should NOT*
22:34 coredumb https://github.com/saltstack/salt/pull/42349 < PR is here
22:34 whytewolf ahhh a master_tops
22:35 whytewolf going to take a moment I"ll commant on the PR
22:35 pipps joined #salt
22:36 coredumb yeah doing both ext_pillar and mater_tops
22:36 coredumb from the same source
22:36 coredumb I've basically ported the idea of reclass with improvements
22:37 woodtablet left #salt
22:37 whytewolf yeah.
22:38 gmoro joined #salt
22:41 coredumb Think I should actually add a sample matching in my examples
22:41 rpb joined #salt
22:44 whytewolf yes you should
22:46 coredumb let me know if you find a way to bypass that :)
22:47 erchn joined #salt
22:48 Ni3mm4nd joined #salt
22:48 erchn joined #salt
22:49 whytewolf well you shouldn't be able to by pass minion_id that is passed in from pillar. as that isn't the grain that is the real minion_id
22:49 whytewolf so allowing access to that variable in your reclass script actually is good
22:50 mikecmpbll joined #salt
22:53 coredumb yep
22:54 onlyanegg joined #salt
22:58 ouemt joined #salt
23:09 whytewolf humm. salt master needs a way to sync_utils.
23:09 smartalek joined #salt
23:14 shoemonkey joined #salt
23:19 coredumb whytewolf: that'd be great :D
23:19 whytewolf you would need to use the dunder like it works in a minion currently.
23:20 swills joined #salt
23:20 swills joined #salt
23:24 whytewolf anyway. yeah i don't see a way arround {{minion_id}}. now. get those tests written :P
23:29 coredumb whytewolf: :D
23:31 ouemt joined #salt
23:33 coredumb ok time to go get some sleep
23:33 coredumb good night
23:34 whytewolf good night
23:51 saltsa joined #salt
23:51 bigjazzsound joined #salt
23:51 Mogget joined #salt
23:51 godber joined #salt
23:51 jtb joined #salt
23:51 blue joined #salt
23:51 tvinson joined #salt
23:52 Aikar joined #salt
23:52 watersoul joined #salt
23:52 PFault joined #salt
23:52 twiedenbein joined #salt
23:52 Vye joined #salt
23:52 systeem joined #salt
23:52 LordOfLA joined #salt
23:52 canci joined #salt
23:52 TRManderson joined #salt
23:52 doubletwist joined #salt
23:52 rodr1c joined #salt
23:52 McNinja joined #salt
23:52 robinsmidsrod joined #salt
23:52 onovy joined #salt
23:52 trent joined #salt
23:52 Twiglet joined #salt
23:52 esharpmajor joined #salt
23:53 lkolstad joined #salt
23:53 KingOfFools joined #salt
23:53 phobosd__ joined #salt
23:54 moy joined #salt
23:54 justan0theruser joined #salt
23:54 s0undt3ch joined #salt
23:54 munhitsu_ joined #salt
23:55 ouemt joined #salt
23:55 ThomasJ|m joined #salt
23:55 cyteen joined #salt
23:55 LeProvokateur joined #salt
23:55 bdrung_work joined #salt
23:55 oida joined #salt
23:55 hammer065 joined #salt
23:55 dwfreed joined #salt
23:55 SamYaple joined #salt
23:55 izrail joined #salt
23:55 beardo joined #salt
23:55 icebal joined #salt
23:55 kiorky joined #salt
23:55 Sammichmaker joined #salt
23:55 cswang joined #salt
23:55 ixs joined #salt
23:55 APLU joined #salt
23:55 bantone joined #salt
23:55 nich0s joined #salt
23:55 brent joined #salt
23:55 lubyou joined #salt
23:55 valkyr2e joined #salt
23:55 tehsu joined #salt
23:55 spaceman_spiff joined #salt
23:55 viq joined #salt
23:55 kevc joined #salt
23:55 wych joined #salt
23:55 KennethWilke joined #salt
23:55 darvon joined #salt
23:55 Kruge joined #salt
23:55 fleaz joined #salt
23:55 elektrix_ joined #salt
23:55 Valfor joined #salt
23:55 simmel joined #salt
23:55 MTecknology joined #salt
23:55 jessexoc joined #salt
23:55 gadams joined #salt
23:55 nonsenso joined #salt
23:55 goal joined #salt
23:55 iter joined #salt
23:55 coldbrewedbrew_ joined #salt
23:55 MajObviousman joined #salt
23:55 rmc3 joined #salt
23:56 J0hnSteel joined #salt
23:56 darix joined #salt
23:56 dmaphy joined #salt
23:56 pcgod joined #salt
23:56 graffic_ joined #salt
23:56 ksa joined #salt
23:56 lastmikoi joined #salt
23:56 lstor joined #salt
23:56 farcaller joined #salt
23:56 klaas joined #salt
23:56 ThomasJ joined #salt
23:56 omie888777 joined #salt
23:56 btorch joined #salt
23:56 donmichelangelo joined #salt
23:56 wryfi_ joined #salt
23:56 cro joined #salt
23:56 mavhq joined #salt
23:56 filippos joined #salt
23:56 k_sze[work] joined #salt
23:56 dh joined #salt
23:56 matti joined #salt
23:56 magnuss joined #salt
23:56 evilet joined #salt
23:56 SteamWells joined #salt
23:56 Udkkna joined #salt
23:56 CeBe joined #salt
23:56 drags joined #salt
23:56 linovia joined #salt
23:56 tcolvin joined #salt
23:56 nich0s joined #salt
23:56 cyborg-one joined #salt
23:56 jab416171 joined #salt
23:56 ashmckenzie joined #salt
23:56 cliluw joined #salt
23:56 permalac joined #salt
23:56 mmidgett joined #salt
23:56 tru_tru joined #salt
23:56 kwork joined #salt
23:56 vexati0n joined #salt
23:56 ekkelett joined #salt
23:56 gtmanfred joined #salt
23:56 jthunt joined #salt
23:56 jesusaur joined #salt
23:56 pocketprotector joined #salt
23:56 whyzgeek joined #salt
23:56 socket-_ joined #salt
23:56 sybix_ joined #salt
23:56 pmcg joined #salt
23:56 carmony joined #salt
23:56 Dev0n joined #salt
23:56 socket- joined #salt
23:56 asoc joined #salt
23:56 rwaweber joined #salt
23:56 whiteinge joined #salt
23:56 FreeSpencer joined #salt
23:56 rickflare joined #salt
23:56 xMopxShell joined #salt
23:56 Gabemo joined #salt
23:56 Swant joined #salt
23:56 kloeri joined #salt
23:56 uncool joined #salt
23:56 k1412 joined #salt
23:56 nledez joined #salt
23:57 Valfor joined #salt
23:57 LostSoul joined #salt
23:59 k1412 joined #salt
23:59 ouemt joined #salt
23:59 cyteen joined #salt
23:59 LeProvokateur joined #salt
23:59 bdrung_work joined #salt
23:59 oida joined #salt
23:59 hammer065 joined #salt
23:59 dwfreed joined #salt
23:59 SamYaple joined #salt
23:59 izrail joined #salt
23:59 beardo joined #salt
23:59 icebal joined #salt
23:59 kiorky joined #salt
23:59 Sammichmaker joined #salt
23:59 cswang joined #salt
23:59 ixs joined #salt
23:59 APLU joined #salt
23:59 bantone joined #salt
23:59 brent joined #salt
23:59 lubyou joined #salt
23:59 valkyr2e joined #salt
23:59 tehsu joined #salt
23:59 spaceman_spiff joined #salt
23:59 viq joined #salt
23:59 kevc joined #salt
23:59 wych joined #salt
23:59 KennethWilke joined #salt
23:59 darvon joined #salt
23:59 Kruge joined #salt
23:59 fleaz joined #salt
23:59 elektrix_ joined #salt
23:59 simmel joined #salt
23:59 MTecknology joined #salt
23:59 jessexoc joined #salt
23:59 gadams joined #salt
23:59 nonsenso joined #salt
23:59 goal joined #salt
23:59 iter joined #salt
23:59 coldbrewedbrew_ joined #salt
23:59 MajObviousman joined #salt
23:59 rmc3 joined #salt

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