Module: check_mk
Branch: master
Commit: d7c53cb4ecc49d310979464c40747a873028bd0f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d7c53cb4ecc49d…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Fri Nov 17 10:34:34 2017 +0100
add werk 5262
Change-Id: Ie48c164144e7cbd5c6c8944c652d640b9b0a220f
---
.werks/5262 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/.werks/5262 b/.werks/5262
new file mode 100644
index 0000000..686b233
--- /dev/null
+++ b/.werks/5262
@@ -0,0 +1,17 @@
+Title: Fix bug in agent bakery (regression #5261, since 1.4.0p17)
+Level: 2
+Component: agents
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1510910513
+Class: fix
+
+Werk #5261 introduced a bug that made it impossible to bake new agents for some specific rulesets.
+This would result in error messages like the following:
+
+<pre>
+"TypeError: key ('custom', 'win_certificates/lib/local/win_certificates.ps1') is not a string"
+</pre>
+
+After an update, no further action is required.
Module: check_mk
Branch: master
Commit: 8d32bc48d2a55f67720ead73e14a3dd15a54923f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d32bc48d2a55f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Nov 17 11:01:06 2017 +0100
5460 FIX Waiting without a wait condition immediately returns now
Note: This change only affects users writing their own tools for the
Livestatus interface, and only those tools which rely on an edge case.
Up to now, Livestatus had a special obscure case: Using a WaitTrigger header
in a query without a WaitCondition header resulted in waiting for the
trigger exactly once. This is a misfeature, because it is effectively
useless and doesn't do what one might expect: Due to spurious wakeups
(https://en.wikipedia.org/wiki/Spurious_wakeup), waiting might return
earlier basically at any time.
To fix this behaviour, the special case has been removed, and a missing
WaitCondition always has its expected semantics (always true) now. Note
that this is consistent with a missing Filter header, which means "no
filtering".
Change-Id: I5e680ac54125d07a2dcd17c8d3aae9a89c0f0455
---
.werks/5460 | 23 +++++++++++++++++++++++
livestatus/src/Query.cc | 8 --------
livestatus/src/Query.h | 1 -
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/.werks/5460 b/.werks/5460
new file mode 100644
index 0000000..6f9cd0c
--- /dev/null
+++ b/.werks/5460
@@ -0,0 +1,23 @@
+Title: Waiting without a wait condition immediately returns now
+Level: 1
+Component: livestatus
+Compatible: incomp
+Edition: cre
+Version: 1.5.0i1
+Date: 1510912156
+Class: fix
+
+Note: This change only affects users writing their own tools for the
+Livestatus interface, and only those tools which rely on an edge case.
+
+Up to now, Livestatus had a special obscure case: Using a WaitTrigger header
+in a query without a WaitCondition header resulted in waiting for the
+trigger exactly once. This is a misfeature, because it is effectively
+useless and doesn't do what one might expect: Due to spurious wakeups
+(https://en.wikipedia.org/wiki/Spurious_wakeup), waiting might return
+earlier basically at any time.
+
+To fix this behaviour, the special case has been removed, and a missing
+WaitCondition always has its expected semantics (always true) now. Note
+that this is consistent with a missing Filter header, which means "no
+filtering".
diff --git a/livestatus/src/Query.cc b/livestatus/src/Query.cc
index 1c75c4f..4759982 100644
--- a/livestatus/src/Query.cc
+++ b/livestatus/src/Query.cc
@@ -194,7 +194,6 @@ Query::Query(const std::list<std::string> &lines, Table *table,
}
_filter = std::make_unique<AndingFilter>(std::move(filters));
- _wait_conditions_empty = wait_conditions.empty();
_wait_condition =
std::make_unique<AndingFilter>(std::move(wait_conditions));
}
@@ -695,13 +694,6 @@ const std::vector<std::unique_ptr<Aggregator>> &Query::getAggregatorsFor(
}
void Query::doWait() {
- // TODO(sp): Funny special case, do we really want/need this?
- if (_wait_conditions_empty && _wait_trigger != nullptr) {
- waitForTrigger();
- return;
- }
-
- // Starting from here, it's basically a standard condition variable.
while (
!_wait_condition->accepts(_wait_object, _auth_user, timezoneOffset())) {
if (waitForTrigger() == std::cv_status::timeout) {
diff --git a/livestatus/src/Query.h b/livestatus/src/Query.h
index 6d080f1..f64f8e8 100644
--- a/livestatus/src/Query.h
+++ b/livestatus/src/Query.h
@@ -90,7 +90,6 @@ private:
using FilterStack = std::vector<std::unique_ptr<Filter>>;
std::unique_ptr<AndingFilter> _filter;
contact *_auth_user;
- bool _wait_conditions_empty; // TODO(sp): HACK, remove me...
std::unique_ptr<AndingFilter> _wait_condition;
std::chrono::milliseconds _wait_timeout;
std::condition_variable *_wait_trigger;
Module: check_mk
Branch: master
Commit: 3da5d48c5bb34f833b4f7c05056bb85e5eb79872
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3da5d48c5bb34f…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Nov 16 14:16:12 2017 +0100
5478 FIX fileinfo: fix globbing pattern expansion
Fixes the issue that globbing patterns were not expanded
after the introduction of werk 5344.
Change-Id: Ia8cee28137aefc9e8aff5b8db6f28e1c24ea3ab2
---
.werks/5478 | 12 ++++++++++++
agents/check_mk_agent.aix | 4 ++--
agents/check_mk_agent.freebsd | 4 ++--
agents/check_mk_agent.linux | 4 ++--
agents/check_mk_agent.macosx | 4 ++--
agents/check_mk_agent.openwrt | 4 ++--
agents/check_mk_agent.solaris | 4 ++--
7 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/.werks/5478 b/.werks/5478
new file mode 100644
index 0000000..ada7403
--- /dev/null
+++ b/.werks/5478
@@ -0,0 +1,12 @@
+Title: fileinfo: fix globbing pattern expansion
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1510837983
+
+Fixes the issue that globbing patterns were not expanded
+after the introduction of werk 5344.
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index 7632cb5..9376857 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -291,12 +291,12 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ]; then
date +%s
# simulate output of the Linux "stat -c "%n|%s|%Y" command
# TODO: feel free to improve this command. It opens the perl interpreter for every file found...
- while read pattern
+ for pattern in $(cat "$MK_CONFDIR/fileinfo.cfg" 2>/dev/null)
do
if [ -f "$pattern" ]; then
ls -1 "$pattern"
fi
- done < "$MK_CONFDIR/fileinfo.cfg" 2>/dev/null |\
+ done |\
while read file
do
/usr/bin/perl -e 'printf "$_|%s|%s\n", (stat) [7,9] for @ARGV' "$file"
diff --git a/agents/check_mk_agent.freebsd b/agents/check_mk_agent.freebsd
index 3748661..ba9aaf4 100755
--- a/agents/check_mk_agent.freebsd
+++ b/agents/check_mk_agent.freebsd
@@ -380,14 +380,14 @@ fi
if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
echo '<<<fileinfo:sep(124)>>>'
date +%s
- while read line
+ for line in $(cat "$MK_CONFDIR/fileinfo.cfg")
do
stat -f "%N|%z|%m" "$line" 2>/dev/null
if [ $? -ne 0 ]; then
echo "$line|missing|$(date +%s)"
fi
- done < "$MK_CONFDIR/fileinfo.cfg"
+ done
fi
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index f060f68..18244fb 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -766,7 +766,7 @@ function replace_datevariable()
if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
echo '<<<fileinfo:sep(124)>>>'
date +%s
- while read line
+ for line in $(cat "$MK_CONFDIR/fileinfo.cfg")
do
# only work on lines containing files, skip e.g. comments and blank lines
if [ "${line:0:1}" = "/" ]; then
@@ -777,7 +777,7 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
echo "$line|missing|$(date +%s)"
fi
fi
- done < "$MK_CONFDIR/fileinfo.cfg"
+ done
fi
# Get stats about OMD monitoring cores running on this machine.
diff --git a/agents/check_mk_agent.macosx b/agents/check_mk_agent.macosx
index 73b65ee..cb15c7e 100755
--- a/agents/check_mk_agent.macosx
+++ b/agents/check_mk_agent.macosx
@@ -93,14 +93,14 @@ netstat -ntfinet | awk ' /^tcp/ { c[$6]++; } END { for (x in c) { print x, c[x];
if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
echo '<<<fileinfo:sep(124)>>>'
date +%s
- while read line
+ for line in $(cat "$MK_CONFDIR/fileinfo.cfg")
do
stat -f "%N|%z|%m" "$line" 2>/dev/null
if [ $? -ne 0 ]; then
echo "$line|missing|$(date +%s)"
fi
- done < "$MK_CONFDIR/fileinfo.cfg"
+ done
fi
if type tmutil >/dev/null
diff --git a/agents/check_mk_agent.openwrt b/agents/check_mk_agent.openwrt
index c7e3125..37b9ff5 100755
--- a/agents/check_mk_agent.openwrt
+++ b/agents/check_mk_agent.openwrt
@@ -681,14 +681,14 @@ fi
if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
echo '<<<fileinfo:sep(124)>>>'
date +%s
- while read line
+ for line in $(cat "$MK_CONFDIR/fileinfo.cfg")
do
stat -c "%n|%s|%Y" "$line" 2>/dev/null
if [ $? -ne 0 ]; then
echo "$line|missing|$(date +%s)"
fi
- done < "$MK_CONFDIR/fileinfo.cfg"
+ done
fi
# Get stats about OMD monitoring cores running on this machine.
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 95b4dac..68c4310 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -369,7 +369,7 @@ then
echo '<<<fileinfo:sep(124)>>>'
/usr/bin/perl -e 'print time."\n"'
# note: patterns in the fileinfo.cfg are resolved inside this loop
- while read file
+ for file in $(cat "$MK_CONFDIR/fileinfo.cfg")
do
# only work on lines containing files, skip e.g. comments and blank lines
if [ "${file:0:1}" = "/" ]; then
@@ -387,7 +387,7 @@ then
echo "$file|missing|$(/usr/bin/perl -e 'print time')"
fi
fi
- done < "$MK_CONFDIR/fileinfo.cfg"
+ done
fi
# Libelle Business Shadow