19:38:30 #startmeeting 19:38:30 Meeting started Wed Feb 19 19:38:30 2020 UTC. The chair is sumpfralle2. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:38:30 Useful Commands: #action #agreed #help #info #idea #link #topic. 19:38:48 It is Wednesday evening: time for our weekly IRC meeting! 19:57:17 hi all 19:59:19 Hi! 19:59:27 How was your munin week? 19:59:46 _very_ quiet 20:00:06 * TheSnide still waits for the time where he can put some time on it 20:00:29 Another winter will be there :) 20:01:26 I would be happy, if you could take a look at https://github.com/munin-monitoring/munin/pull/1282 - it is short and should be easy to review :) 20:03:00 I do not trust my perl enough - but I assume, that perl is quite tolerant anyway, thus that code should have no chance to disturb the rest of the program in any cose? 20:07:08 if you want to avoid breaking at all costs, you should wrap that in an eval{}. It's the perl equiv of a try-catch 20:08:42 the "This can be indicated by the socket path starting with a null byte" ... i don't really understand 20:08:56 eval: I will do so 20:10:02 null byte: I have seen this substitution in a python-based example implementation for sd_notify. Then I looked up some man page about sockets and found the reference to namespaces. 20:10:11 You are right: I will improve this comment. 20:10:48 also : why didn't you use IO::Socket ? 20:11:06 https://metacpan.org/pod/IO::Socket 20:11:50 Is it better/different? 20:12:12 I will switch, if "Socket" is assumed to be less fashionable today. 20:12:45 it is "object oriented" 20:12:53 null byte: it is an "abstract address" for a socket (see "man 7 unix") 20:13:02 hu - modern! 20:13:11 ... not that I care, but I do like the "automatic garbage & closing" that comes with it when it goes out of scope 20:13:15 I will switch .. 20:13:24 sounds good 20:13:33 I'm just checking if it doesn't add a new dep. 20:14:09 I think, IO::Socket is part of perl's core? 20:14:14 (if that is the proper name) 20:14:59 https://perldoc.perl.org/5.30.0/IO/Socket.html means it is indeed PerlCore 20:15:11 i was like, 95% sure. 20:15:38 (I have to admin, that I looked it up before) 20:15:44 ;) 20:15:59 good - thanks for your comments! 20:16:54 I was happy, that Net::Server allows to override configuration file settings (e.g. "background 1") in munin-node.conf with an argument during object initialization. It does not really feel ok, but it is useful. 20:17:28 (the override of "background" was necessary for the usage of "sd_notify") 20:18:57 yup 20:19:07 what's the use of sd_notify btw? 20:19:33 aha "Notify service manager about start-up completion" 20:20:05 At the moment "Net::Server" manages the "go into background" operation. It does this, *before* the munin-node process is ready to accept requests (no plugins parsed, ...). 20:20:43 aha. It's because Munin listens on the port and only then reads the config from the plugins 20:20:43 That was the basic problem. Now we stick to the foreground, but inform systemd/start-stop-daemon exactly, when we are ready. 20:20:55 yes 20:21:13 so before systemd was looking at the port opening 20:21:14 ? 20:22:08 With regard to systemd I am not completely sure. Since we did not configure socket activation in Debian for munin-node, I guess, that there was the same timing issue as with sysvinit. 20:22:28 Previously systemd just started it and counted this as a success ("simple"). 20:22:53 Now the type is "notify": background it; assume it is ready when the signal arrives. 20:23:04 hmmm... looking at the code, it seems that we could setup the whole stuff, and only then call Node::Server->run() 20:23:46 I think, the problem was a bit deeper, since Net::Server::Fork did the backgrounding even before the "prepare_loop" hook (or similar). 20:24:16 Thus we had no real chance to be ready *after* going into the background (this would be the alternative, I guess). 20:24:34 s/after/before/ 20:24:37 wondering about https://metacpan.org/pod/Systemd::Daemon 20:24:47 > The module is in experimental state 20:24:48 well... 20:25:09 I took a look: it is not packaged for Debian. Otherwise I would have used it. 20:25:17 (of course, I could have packaged it ...) 20:26:12 It has some dependency on "XS" (the author himself complained about this in a blog - almost regretting to have written the module). 20:26:37 (I do not know this XS - it just sounded like it is not desirable) 20:28:36 nah, let's leave it like that. 20:29:02 If it was me, i'd inverse the flow to avoid the "else" fountain 20:29:06 yes, our specific implementation is sufficient and trivial. 20:29:27 if (! socket() ) { 20:29:29 inverse: using "return" after every action? 20:29:32 error 20:29:35 return 20:29:35 } 20:29:39 yep 20:30:00 since, you don't do anything actually, you just try to do things, and the condition fails 20:30:00 I prefer conditionals over mutiple return statements. Taste! :) 20:30:03 ;) 20:30:48 i think that error+return is very like thowing an exception in other languages 20:31:27 but, i agree, it's just a matter of taste. 20:31:28 Yes, a "raise" would feel different for me. 20:31:48 If there would be just a widely used style guide for Perl :) 20:31:51 "Modern Perl"? 20:32:23 well... my style is very C-like. 20:33:01 i'm mostly writing Perl as "C with arrays, maps & regex" :)) 20:34:26 Do you follow the perl6 development? 20:37:06 I was just wondering, whether beautiful things like exception handling (similar to python) or "contexts" ("with" in python) would be introduced (probably similar things already work - they just do not look obvious to me and my basic skills). Anyway this would be probably a little bit overwhelming exchange :) 20:38:13 In other news: lemontree123 seems to clean up the issue tracker of munin-node-win32 quite well. A good start ... 20:40:26 Let's call this the end of the meeting. 20:40:32 #endmeeting