Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-01-01

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

All times shown according to UTC.

Time Nick Message
00:02 subsignal joined #salt
00:04 wt joined #salt
00:05 _viq joined #salt
00:21 subsignal joined #salt
00:29 viq_ joined #salt
01:12 colegatron joined #salt
01:24 brianfeister joined #salt
02:00 colegatron joined #salt
02:10 hasues joined #salt
02:15 asyncsrc joined #salt
02:38 colegatron joined #salt
03:00 anmol joined #salt
03:05 otter768 joined #salt
03:07 hasues left #salt
03:36 akhter joined #salt
03:36 jeffspeff joined #salt
03:50 catpig joined #salt
04:21 subsignal joined #salt
04:26 jaybocc2 joined #salt
04:28 subsignal joined #salt
04:28 subsigna_ joined #salt
04:29 malinoff joined #salt
04:31 aqua^c joined #salt
04:42 colegatron joined #salt
05:06 otter768 joined #salt
05:21 racooper joined #salt
05:21 gentoognuhurd joined #salt
05:26 jaybocc2 joined #salt
05:32 racooper joined #salt
05:51 brianfeister joined #salt
06:02 colegatron joined #salt
06:14 brianfeister joined #salt
06:48 malinoff joined #salt
06:56 impi joined #salt
07:00 anmol joined #salt
07:07 otter768 joined #salt
07:27 cberndt joined #salt
07:27 jaybocc2 joined #salt
07:29 TyrfingMjolnir joined #salt
07:37 TyrfingMjolnir joined #salt
07:51 av_ joined #salt
08:15 drunksignal joined #salt
08:22 MTecknology Any ideas what I'm doing wrong here? I can't quite comprehend the error message.  http://dpaste.com/0RDYYCT  I get something about "TypeError: list indices must be integers, not str"
08:25 iggy more context
08:29 MTecknology https://gist.github.com/anonymous/84284b5eb122314ea138 :)
08:33 MTecknology iggy: That happens when I try to run state.highstate
08:42 colegatron joined #salt
08:42 iggy MTecknology: seems like the problem is not in what you pasted... maybe you have a runner somewhere that calls salt-run/salt-call/etc ?
08:42 MTecknology iggy: *sigh* ... I'm too dumb to be awake. I used require: instead of include:
08:43 iggy hah, I missed it too
09:04 MTecknology iggy: also, apparently when you're pushing commits to a detached branch, they don't get reflected in salt runs... :P
09:08 otter768 joined #salt
09:21 Crazy67 joined #salt
09:28 jaybocc2 joined #salt
09:29 jeffspeff joined #salt
09:39 drunksignal joined #salt
09:56 HardWall joined #salt
10:00 ip` joined #salt
10:09 otter768 joined #salt
10:40 cberndt joined #salt
10:40 drunksignal joined #salt
10:41 TyrfingMjolnir joined #salt
11:29 jaybocc2 joined #salt
11:41 drunksignal joined #salt
11:57 malinoff joined #salt
12:23 otter768 joined #salt
12:30 TyrfingMjolnir joined #salt
12:38 aqua^c joined #salt
12:42 drunksignal joined #salt
12:44 felskrone1 joined #salt
12:48 abednarik joined #salt
12:50 cprior joined #salt
12:51 HardWall joined #salt
12:57 colegatron joined #salt
12:59 antpa joined #salt
13:02 TyrfingMjolnir joined #salt
13:08 antpa How can I set up a cron to email errors? Here is what I have so far.  https://gist.github.com/anthonyscolaro/34a2c7f4faff99a7de61
13:23 antpa joined #salt
13:29 jaybocc2 joined #salt
13:36 sinonick joined #salt
13:40 abednarik joined #salt
13:42 drunksignal joined #salt
13:55 XenophonF antpa: you want chronic, usually found in a package called moreutils
13:55 XenophonF antpa: by default cron will send the email to the crontab's owner or root in the case of the system-wide crontab
13:57 XenophonF antpa: you can override this - see crontab(5) for the details
14:11 ilbot3 joined #salt
14:11 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.3 | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
14:27 ilbot3 joined #salt
14:27 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.3 | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
14:28 viq joined #salt
14:35 XenophonF antpa: it'd look like https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html#salt.states.cron.env_present
14:36 XenophonF antpa: and then in the context of your gist, you'd change "php" to "chronic php" after installing moreutils
14:36 XenophonF that way you only get the output of the php command if there's an error
14:42 catpig joined #salt
14:43 drunksignal joined #salt
14:48 XenophonF antpa: for example - https://github.com/irtnog/salt-states/blob/development/amavisd/init.sls#L25
14:50 XenophonF which reminds me, i need to add a cron.env_present state to that formula
15:03 bhosmer joined #salt
15:08 XenophonF man, i wish the windows installer for the salt minion included a complete python environment
15:08 XenophonF like on unix
15:10 antpa joined #salt
15:24 asyncsrc joined #salt
15:26 TyrfingMjolnir joined #salt
15:26 tristianc_ joined #salt
15:30 jaybocc2 joined #salt
15:32 antpa joined #salt
15:33 bhosmer joined #salt
15:36 antpa joined #salt
15:42 cheus joined #salt
15:44 intr1nsic joined #salt
15:48 CeBe joined #salt
15:52 bhosmer joined #salt
15:55 moogyver joined #salt
15:57 traph joined #salt
16:05 lorengordon XenophonF: salt places python in 'C:\salt\bin', is that not a complete python environment?
16:06 XenophonF lorengordon: i mean like a standard python install
16:06 XenophonF with the complete runtime
16:06 lorengordon yeah, run C:\salt\bin\python.exe
16:08 XenophonF let me rephrase this
16:08 XenophonF i'd really rather the salt installer did not install its own python runtime on windows
16:09 lorengordon lol, ok, that reads to me like the exact opposite of the original statement
16:09 XenophonF the standard python install, in my mind, is what results when you run the MSI installer provided by PSF
16:09 XenophonF C:\Python27 by default etc.
16:09 lorengordon yeah, i get what you're saying now
16:10 XenophonF just like how on FreeBSD, installing Salt adds it to the existing Python runtime environment
16:10 XenophonF it doesn't install a wholly separate, self-contained install of Python
16:11 XenophonF while i'm whining on irc, i wish salt on windows used the event log like windows services are supposed to
16:11 lorengordon i suppose it could be an option for the installer... specify an existing python env and install to that
16:11 XenophonF and i wish salt installed a proper windows service instead of using nssm as a wrapper
16:12 XenophonF maybe
16:12 lorengordon the salt windows installer today is much more robust than it used to be, so i'm mostly just happy it works reliably :)
16:12 XenophonF hah
16:12 XenophonF it's tons better
16:12 XenophonF that's very true
16:13 XenophonF i'd still rather have a more native experience
16:13 XenophonF i've been tinkering on a msi installer for a while now
16:13 lorengordon there was some work on a different wrapper for the service and for the installer
16:13 XenophonF that's the thing - no wrapper's necessary
16:13 XenophonF http://www.chrisumbel.com/article/windows_services_in_python
16:13 lorengordon poor choice of words
16:14 lorengordon different mechanism
16:14 XenophonF oh no i get what you're saying
16:14 aqua^c joined #salt
16:15 XenophonF python on windows has msilib
16:15 XenophonF my current line of thinking is, use bdist_msi to create packages for salt and its dependencies
16:15 XenophonF then figure out how to chain them together with the python msi
16:16 XenophonF http://wixtoolset.org/documentation/manual/v3/xsd/wix/chain.html
16:16 lorengordon https://github.com/saltstack/salt-windows-msi
16:17 lorengordon will be afk for a while
16:20 godlike what would be the correct way to execute a cmd.run if a file is older than N days OR the file does not exist?
16:21 bhosmer joined #salt
16:23 AndreasLutro godlike: onlyif: test -f /path/to/file || find /path/to/file -mtime something
16:23 godlike ah, I was trying to use two distinct test commands, one after the other
16:25 otter768 joined #salt
16:30 om joined #salt
16:33 asyncsrc joined #salt
16:34 tmclaugh[work] joined #salt
16:36 av_ joined #salt
16:42 XenophonF alright! got MSIs for almost all of Salt's dependencies!
16:43 XenophonF just need to figure out how to build pywin32, pyzmq, and pycrypto
16:45 wangofett Nice!
16:46 drunksignal joined #salt
16:47 XenophonF bdist_msi for salt wants to install a bunch of binaries as part of the build process
16:47 XenophonF that seems wrong but i'm not familiar enough with python packaging to say for certain
16:48 XenophonF pycrypto must require openssl
16:48 XenophonF hm
16:50 XenophonF creating dist!
16:50 intr1nsic joined #salt
16:51 * XenophonF crosses his figners
16:51 * XenophonF hopes there are no porblems
16:55 XenophonF i've got an MSI for Salt!
16:56 XenophonF on to building MSIs for pypiwin32, pyzmq, and pycrypto
16:56 XenophonF and after that, figuring out how to chain them together
17:00 thehaven joined #salt
17:00 bhosmer joined #salt
17:02 cprior Any hint how to achieve this: I have a master and 1 or n (non-virtual) minions. I also have an event that triggers from the master a cmd.run to shutdown -h now the minions. BUT this is a bit too harsh: The job doesn't return.
17:03 cprior What is best practise to cleanly shutdown a node running a minion?
17:03 cprior Ideally I want to keep track how many (or even all) minions were powered off.
17:03 jdipierro cprior: You can issue a "system.shutdown" https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.system.html#salt.modules.system.shutdown
17:06 cprior Reading its documentation I am not clear if that is different from cmd.run shutdown -h now. Does this module "return"? Is it possible to do "accounting" of minions-powered-down?
17:10 AndreasLutro cprior: the point is to not do "shutdown now", but "shutdown 1"
17:13 jdipierro AndreasLutro: Actually it does do "now": https://github.com/saltstack/salt/blob/develop/salt/modules/system.py#L96
17:13 cprior Ah, ok -- I was too focussed on other aspects to realize the obvious! Thanks.
17:14 AndreasLutro jdipierro: only if the at_time argument is not supplied
17:14 AndreasLutro cprior: this same problem applies if you ever want to restart a salt minion - use the "at" module for that
17:14 slav0nic joined #salt
17:18 scoates joined #salt
17:19 jaybocc2 joined #salt
17:20 colegatron joined #salt
17:26 pcdummy joined #salt
17:26 pcdummy joined #salt
17:26 drunksignal joined #salt
17:46 izibi joined #salt
17:48 bhosmer joined #salt
17:51 bhosmer_ joined #salt
17:52 bhosmer joined #salt
17:58 anotherZero joined #salt
18:00 Crazy67 joined #salt
18:12 cprior joined #salt
18:16 tristianc_ joined #salt
18:22 hasues joined #salt
18:22 hasues left #salt
18:26 otter768 joined #salt
18:30 pcdummy joined #salt
18:30 pcdummy joined #salt
18:31 simmel joined #salt
18:33 tristianc joined #salt
18:41 antpa joined #salt
18:43 shaggy_surfer joined #salt
18:44 M-MadsRC1 Anyone else getting stack traces in the minion when using the service beacon without arguments? Say beacons: service: salt-minion:
18:44 M-MadsRC1 It works if I add onchangeonly: True
18:45 moogyver joined #salt
18:49 cprior M-MadsRC1: I only came to salt this week. Was pointed towards beacons in here yesterday. What I found out was that in a single pull request 20092 most of the existing beacons were added. Reads: The first beacon I used (journald) was slightly buggy. So I wouldn't be surprised if that was also your problem. My solution was to cross-reference with the inotify beacon (install pyinotify(sic) to test it), read the source of that and fix my journal
18:50 cprior My problem was that the journald beacon didn't even fire a useful tag! (I interprete this that many powerusers might write their own beacons? This should have been noticed earlier, methinks.)
18:52 M-MadsRC1 Hmm, could be that :P Have to get this working, as it's the centerpiece of my monitorign solution :P
18:54 cprior I also build a test-cluster for learning purposes. My event is also central to not nuking the SD cards of my Rsperry Pis :) Currently I fixed in in /usr/lib64/python2.7/site-packages/salt/beacons/journald.py ;)
18:55 M-MadsRC1 Nice, I'll search thorugh the code and submit a patch :D
18:57 asyncsrc joined #salt
18:58 cprior Judged by the documentation the inotify beacon seems to be kind of a standard implementation. The file is quite long indeed :) I used inotify as the cross-check that all other parts were working. I had both master and minion running in the foreground with -l debug. And despite the documentation the needed ptyhon module is pyinotify
18:59 M-MadsRC1 luckily the service beacon is <100 SLOC :D
19:00 cprior Which kinda suggests that not all all logical corner cases might be covered...
19:01 iggy cprior: open an issue please
19:01 asyncsrc joined #salt
19:02 colegatron joined #salt
19:02 M-MadsRC1 cprior (IRC) exactly
19:02 cprior iggy: M-MadsRC1 will do, I believe, as he asked. I pointed out that I submitted a pull request already.
19:02 M-MadsRC1 I am writing up a bug report right now :)
19:02 iggy I must have missed where you said you submitted the PR
19:04 cprior As I am no programmer my fix is quite lean though ;) https://github.com/saltstack/salt/pull/30116
19:04 saltstackbot [#30116]title: Added a tag to the event that is generated by the beacon for journald | From the docu:...
19:06 nyx_ joined #salt
19:20 jaybocc2 joined #salt
19:27 M-MadsRC1 Seems like I found the bug. Currently working on a fix, will hopefully send a pull request later tonight. https://github.com/saltstack/salt/issues/30117 - Now, excuse me, but I have to grab some more beverages. Back in 45
19:27 saltstackbot [#30117]title: Service beacons fails with Stacktraces | While trying to set up a service beacon and reading the documentation (https://docs.saltstack.com/en/latest/ref/beacons/all/salt.beacons.service.html) I noticed that the following beacon fails and leaves stack traces:...
19:35 hasues joined #salt
19:43 antpa joined #salt
19:57 cyborg-one joined #salt
20:01 hasues left #salt
20:14 cprior I have a question about The Orchestrate Runner https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html : The example cleanfoo.sls shows the ID cmd.run -- and cannot be chosen arbitrarily as otherwise I get "'mycmdrun' is not available." On the other hand I cannot make 2 sls files, call them as a list of "mods" in a reactor sls file, because "Detected conflicting IDs, SLS IDs need to be globally unique."
20:15 whytewolf cprior: just as any state sls file you can use - name:
20:15 whytewolf so the ID can be different and still have a different function
20:18 whytewolf cprior: kind of like this [old example i used to use for an older openstack neutron setup https://gist.github.com/whytewolf/b0887ceb472f92550df6]
20:20 jaybocc2 joined #salt
20:21 aboe joined #salt
20:23 cprior whytewolf: Thanks for the gist! "Function ran successfully. Function cmd.run ran on master."
20:24 whytewolf no problem
20:24 cprior Plus I grokked the solution
20:24 aboe joined #salt
20:26 CeBe joined #salt
20:26 aboe joined #salt
20:27 otter768 joined #salt
20:36 bhosmer joined #salt
20:41 antpa joined #salt
20:47 antpa joined #salt
20:58 keimlink joined #salt
21:05 spuder joined #salt
21:30 catpigger joined #salt
21:30 CeBe joined #salt
21:39 aqua^c joined #salt
21:39 nethershaw joined #salt
21:44 jaybocc2 joined #salt
21:46 M-MadsRC1 Does anyone know if the Salt pull request are vetted at all?
21:46 pcdummy joined #salt
21:46 pcdummy joined #salt
21:47 M-MadsRC1 This bug I just fixed (Writing up a pull request now) is extremely stupid and should have been cought by someone actually reading the git diff :S
21:47 M-MadsRC1 Like saying "If you set X, X will be returned" and then X is set and Y is returned...
21:47 M-MadsRC1 WTF!?
21:49 TTimo joined #salt
21:51 spuder joined #salt
21:56 Crazy67 joined #salt
22:06 linjan joined #salt
22:09 ip` joined #salt
22:12 spuder joined #salt
22:16 cberndt joined #salt
22:28 otter768 joined #salt
22:29 scoates joined #salt
23:09 Crazy67 joined #salt
23:12 godlike AndreasLutro: had to split my state into two. one with the original find checking if file was older than N days, and another one (executed before the previous one), with the creates parameter. there is just no way that I can make a test -f and a find work as I want them to. at least not today
23:15 aqua^c joined #salt
23:26 subsignal joined #salt
23:41 thejrose1984 joined #salt
23:54 opdude joined #salt
23:55 jaybocc2 joined #salt
23:56 Shirkdog_ joined #salt
23:56 trave_ joined #salt
23:56 buhman_ joined #salt
23:57 douardda joined #salt
23:57 egil_ joined #salt
23:57 ThomasJ|d joined #salt
23:57 sixninetynine joined #salt
23:58 hunmaat joined #salt
23:58 hunmaat joined #salt
23:58 antonw_ joined #salt
23:58 edrocks_ joined #salt
23:58 pfalleno1 joined #salt
23:58 giantlock_ joined #salt
23:59 pviktori_ joined #salt
23:59 ramishra__ joined #salt
23:59 Micromus_ joined #salt
23:59 CaptTofu___ joined #salt
23:59 jay_d_ joined #salt

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