Module: check_mk
Branch: master
Commit: e230d686a219768003ba0cdf252fe3d13415beee
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e230d686a21976…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Feb 15 13:39:58 2018 +0100
5671 Use RE2 regular expression engine for Livestatus queries.
Livestatus offers various places where a regular expression can be used, e.g. in
its "Filter:" header for GET queries. The previous implementation had various
problems, which have all been fixed by switching to a new regular expression
engine (RE2, see https://github.com/google/re2):
<ul>
<li>Unicode was not handled correctly: RE2 fully understands UTF-8, so this has
been fixed.</li>
<li>Unbounded memory usage during matching: This could lead to stack overflows
and CMC/Nagios crashes when trying to match some classes of regular expressions
on long inputs. RE2 guarantees that this won't happen, it either complains that
a regular expression is too complicated (which is hard to provoke) or runs in
constant memory afterwards.</li>
<li>Exponential runtime: Some classes of regular expressions could lead to
exponential runtime, blocking Livestatus threads and using CPU time for some
millenia or more. RE2's runtime is linear in the size of the regular expression
and the input, so this has been fixed, too.</li>
</ul>
As an additional bonus, most of the time RE2 is quite a bit faster than the
previous implementation.
RE2's regular expression syntax (https://github.com/google/re2/wiki/Syntax) is
basically a superset of the previous POSIX extended regular expression syntax
(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag…),
so you won't have to change your patterns.
Note that one esoteric detail is different, though, namely the semantics of
submatching (see https://swtch.com/~rsc/regexp/regexp2.html#posix). If you
relied on this, you probably already had some problems, because almost every
POSIX regex implementation out there was buggy in some way (see
https://wiki.haskell.org/Regex_Posix#Results_and_Bugs).
Change-Id: Ib89c152c1c1bf7809ff22b8bab879ce794386af1
---
.werks/5671 | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/.werks/5671 b/.werks/5671
new file mode 100644
index 0000000..cf0df46
--- /dev/null
+++ b/.werks/5671
@@ -0,0 +1,41 @@
+Title: Use RE2 regular expression engine for Livestatus queries.
+Level: 2
+Component: livestatus
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1518698354
+Class: feature
+
+Livestatus offers various places where a regular expression can be used, e.g. in
+its "Filter:" header for GET queries. The previous implementation had various
+problems, which have all been fixed by switching to a new regular expression
+engine (RE2, see https://github.com/google/re2):
+
+<ul>
+<li>Unicode was not handled correctly: RE2 fully understands UTF-8, so this has
+been fixed.</li>
+<li>Unbounded memory usage during matching: This could lead to stack overflows
+and CMC/Nagios crashes when trying to match some classes of regular expressions
+on long inputs. RE2 guarantees that this won't happen, it either complains that
+a regular expression is too complicated (which is hard to provoke) or runs in
+constant memory afterwards.</li>
+<li>Exponential runtime: Some classes of regular expressions could lead to
+exponential runtime, blocking Livestatus threads and using CPU time for some
+millenia or more. RE2's runtime is linear in the size of the regular expression
+and the input, so this has been fixed, too.</li>
+</ul>
+
+As an additional bonus, most of the time RE2 is quite a bit faster than the
+previous implementation.
+
+RE2's regular expression syntax (https://github.com/google/re2/wiki/Syntax) is
+basically a superset of the previous POSIX extended regular expression syntax
+(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04),
+so you won't have to change your patterns.
+
+Note that one esoteric detail is different, though, namely the semantics of
+submatching (see https://swtch.com/~rsc/regexp/regexp2.html#posix). If you
+relied on this, you probably already had some problems, because almost every
+POSIX regex implementation out there was buggy in some way (see
+https://wiki.haskell.org/Regex_Posix#Results_and_Bugs).
Module: check_mk
Branch: master
Commit: ed4f58a35d31360a5557543979c59ea29d0a5108
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed4f58a35d3136…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Feb 15 10:19:03 2018 +0100
Windows: update MinGW-w64 and gcc version in README
---
agents/windows/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents/windows/README b/agents/windows/README
index e01faad..428f088 100644
--- a/agents/windows/README
+++ b/agents/windows/README
@@ -79,7 +79,7 @@
** Compilation dependencies
-Currently mingw-w64 5.0.1-1 (http://mingw-w64.org), based on gcc 6.2.1, is used to build the agent.
+Currently mingw-w64 5.0.3 (http://mingw-w64.org), based on gcc 7.2.0, is used to build the agent.
The compilation uses GNU autotools and takes place within a chroot jail. The bash script
'make-agent' (sudo necessary!) is used for setting up the chroot jail and executing the desired
build steps within it.
Module: check_mk
Branch: master
Commit: 37b6a7252a275d4335d1b3cd5ec4e0cb3c9aa338
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=37b6a7252a275d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 14 17:54:33 2018 +0100
mkbackup: Use dynamic (platform dependent) interface name instead of hard coded eth0
Change-Id: I39b7f350cb542b1c38966c9a9bec25cf3c4a9417
---
bin/mkbackup | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/mkbackup b/bin/mkbackup
index b761368..1b5960d 100755
--- a/bin/mkbackup
+++ b/bin/mkbackup
@@ -1649,7 +1649,8 @@ def setup_cluster_environment(info):
# To be able to start the DRBD volume we need to have the IP
# addresses configured in the DRBD config active. Simply activate
- # all IP addresses of the host on eth0. Will be cleaned up by reboot.
+ # all IP addresses of the host on the primary network interface.
+ # This will be cleaned up by reboot.
enable_drbd_ip_addresses()
cma.initialize_drbd()
@@ -1681,7 +1682,7 @@ def enable_drbd_ip_addresses():
log("Enabling DRBD network address (%s: %s/%s)" % (drbd_if, address, netmask))
subprocess.call(["ip", "a", "a", "%s/%s" % (address, netmask),
- "dev", "eth0"])
+ "dev", cma_net.get_simple_interface_name()])
def verify_cma_version_compatible(info):
Module: check_mk
Branch: master
Commit: bd2fff7f72ad7979ba75efd66cb94721cf56ded9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bd2fff7f72ad79…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Wed Feb 14 16:37:11 2018 +0100
Windows agent: clear global variable g_script_stat
Use member variable for script statistics and pass a reference to it to
the two sections that need it.
---
agents/windows/SectionManager.cc | 13 +++++++----
agents/windows/SectionManager.h | 1 +
agents/windows/build_version | 2 +-
agents/windows/sections/SectionCheckMK.cc | 29 ++++++++++-------------
agents/windows/sections/SectionCheckMK.h | 5 +++-
agents/windows/sections/SectionPluginGroup.cc | 33 ++++++++++-----------------
agents/windows/sections/SectionPluginGroup.h | 12 +++-------
agents/windows/types.h | 22 ++++++++++++++++++
8 files changed, 63 insertions(+), 54 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=bd2fff7f72…