warning being output in check
Message-ID: <58d8e548.5eODaOhIgdChHKvr%kb(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Module: check_mk
Branch: master
Commit: 02405ad8547f1dbbf18e83de83ee6840dd4cb53a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=02405ad8547f1d…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Mar 27 12:04:11 2017 +0200
8627 FIX apt: Fix Ubuntu "NOTE: This is only a simulation!" warning being output in check
When running the Check_MK agent as a non-root user, the apt-get command used in the
mk_apt plugin would output a note that would then appear in the update check.
The agent plugin no longer outputs this message. To fix the problem, you will need
to deploy the updated version of the mk_apt plugin.
Thanks to Barnaby Shearer for the fix!
Change-Id: Ic702a3d474da8d3e57c52d6f7b6ca0bd66d1c0ea
---
.werks/8627 | 16 ++++++++++++++++
agents/plugins/mk_apt | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/8627 b/.werks/8627
new file mode 100644
index 0000000..3744eb5
--- /dev/null
+++ b/.werks/8627
@@ -0,0 +1,16 @@
+Title: apt: Fix Ubuntu "NOTE: This is only a simulation!" warning being output in check
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1490608751
+
+When running the Check_MK agent as a non-root user, the apt-get command used in the
+mk_apt plugin would output a note that would then appear in the update check.
+The agent plugin no longer outputs this message. To fix the problem, you will need
+to deploy the updated version of the mk_apt plugin.
+
+Thanks to Barnaby Shearer for the fix!
diff --git a/agents/plugins/mk_apt b/agents/plugins/mk_apt
index c4ded2d..31f930b 100755
--- a/agents/plugins/mk_apt
+++ b/agents/plugins/mk_apt
@@ -50,7 +50,7 @@ function check_apt_update {
# 1397BC53640DB551
apt-get update -qq 2> /dev/null
fi
- apt-get -o 'Debug::NoLocking=true' -s -qq "$UPGRADE" | grep -v '^Conf'
+ apt-get -o 'Debug::NoLocking=true' -o 'APT::Get::Show-User-Simulation-Note=false' -s -qq "$UPGRADE" | grep -v '^Conf'
}
Module: check_mk
Branch: master
Commit: 4a3f4e4b9415ccd9229bcf3b013ebccce23b8263
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4a3f4e4b9415cc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 27 11:02:10 2017 +0200
4513 FIX Agent Updater: Fixed broken state persisting on windows (regression since #4499)
The following exception could occur with Check_MK version shipping werk #4499 (1.2.8p19, 1.4.0b4):
Traceback (most recent call last):
File "cmk-update-agent.py", line 1230, in
File "cmk-update-agent.py", line 255, in main_update
File "cmk-update-agent.py", line 271, in do_update_as_command
File "cmk-update-agent.py", line 319, in do_update_agent
File "cmk-update-agent.py", line 939, in update_deployment_state
File "cmk-update-agent.py", line 925, in write_state_file
WindowsError: [Error 183] Cannot create a file when that file already exists
This issue occured during update and trying to save the new deployment state. It
should be enough to apply the update on the Check_MK server and rebuild the agents.
Change-Id: I3a86f4a24eb595a12cc58f0a5eb173a221185510
---
.werks/4513 | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/.werks/4513 b/.werks/4513
new file mode 100644
index 0000000..3f74dfd
--- /dev/null
+++ b/.werks/4513
@@ -0,0 +1,23 @@
+Title: Agent Updater: Fixed broken state persisting on windows (regression since #4499)
+Level: 1
+Component: agents
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.5.0i1
+Date: 1490604948
+
+The following exception could occur with Check_MK version shipping werk #4499 (1.2.8p19, 1.4.0b4):
+
+Traceback (most recent call last):
+File "cmk-update-agent.py", line 1230, in
+File "cmk-update-agent.py", line 255, in main_update
+File "cmk-update-agent.py", line 271, in do_update_as_command
+File "cmk-update-agent.py", line 319, in do_update_agent
+File "cmk-update-agent.py", line 939, in update_deployment_state
+File "cmk-update-agent.py", line 925, in write_state_file
+WindowsError: [Error 183] Cannot create a file when that file already exists
+
+This issue occured during update and trying to save the new deployment state. It
+should be enough to apply the update on the Check_MK server and rebuild the agents.
Module: check_mk
Branch: master
Commit: 1d930c9888f03a257ea72f93fd2ffe585f8b8dfb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d930c9888f03a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Sat Mar 25 17:09:18 2017 +0100
4466 FIX liveproxyd: fixed needless connection timeouts (site dead) when changing the site configuration
Upon startup, the liveproxyd waited one heartbeat interval before making any attempts
to contact the remote sites. This has been fixed. Changes in the distributed monitoring
configuration should no longer result in longer fake "site dead" messages.
Change-Id: I5c088c654d152967d1340ed58d22905aa1ac65d2
Note: This also improves the stability of BI aggregation checks which rely on a stable connection to the remote sites.
---
.werks/4466 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.werks/4466 b/.werks/4466
new file mode 100644
index 0000000..e1bf9d3
--- /dev/null
+++ b/.werks/4466
@@ -0,0 +1,14 @@
+Title: liveproxyd: fixed needless connection timeouts (site dead) when changing the site configuration
+Level: 1
+Component: liveproxy
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1490457827
+Class: fix
+
+Upon startup, the liveproxyd waited one heartbeat interval before making any attempts
+to contact the remote sites. This has been fixed. Changes in the distributed monitoring
+configuration should no longer result in longer fake "site dead" messages.
+
+Note: This also improves the stability of BI aggregation checks which rely on a stable connection to the remote sites.
Module: check_mk
Branch: master
Commit: bbdb741ea4dd94a47e2a889023ea6d85714bc50f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbdb741ea4dd94…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Sat Mar 25 15:32:31 2017 +0100
updated werk text
Change-Id: I73dc99fd4bbde791068659e1a7b5efea275f21b9
---
.werks/4465 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/4465 b/.werks/4465
index 2b027f1..fa37dd6 100644
--- a/.werks/4465
+++ b/.werks/4465
@@ -1,4 +1,4 @@
-Title: Fixed raise condition when mulitple Check_MK helpers updated the ipaddresses.cache file
+Title: Fixed race condition when mulitple Check_MK helpers updated the ipaddresses.cache file
Level: 1
Component: checks
Compatible: compat
@@ -9,6 +9,6 @@ Class: fix
Check helpers now lock the ipaddresses.cache file when they want to update an ip address.
The locked file is read, updated with the new content and written afterwards.
-The raise condition happened when multiple check helpers tried to update the file
+The race condition happened when multiple check helpers tried to update the file
at the same time, hereby removing some recently looked up ip addresses.
Module: check_mk
Branch: master
Commit: 83bec89089310072eadf97e9a59d6bf56e42a472
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=83bec890893100…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Sat Mar 25 15:23:15 2017 +0100
4465 FIX Fixed raise condition when mulitple Check_MK helpers updated the ipaddresses.cache file
Check helpers now lock the ipaddresses.cache file when they want to update an ip address.
The locked file is read, updated with the new content and written afterwards.
The raise condition happened when multiple check helpers tried to update the file
at the same time, hereby removing some recently looked up ip addresses.
Change-Id: Ic68fcf342b8dc92a2b7d7a28f45f3d9b9b06e5aa
---
.werks/4465 | 14 ++++++++++++++
modules/check_mk.py | 19 ++++++++++++++-----
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/.werks/4465 b/.werks/4465
new file mode 100644
index 0000000..2b027f1
--- /dev/null
+++ b/.werks/4465
@@ -0,0 +1,14 @@
+Title: Fixed raise condition when mulitple Check_MK helpers updated the ipaddresses.cache file
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1490451474
+Class: fix
+
+Check helpers now lock the ipaddresses.cache file when they want to update an ip address.
+The locked file is read, updated with the new content and written afterwards.
+The raise condition happened when multiple check helpers tried to update the file
+at the same time, hereby removing some recently looked up ip addresses.
+
diff --git a/modules/check_mk.py b/modules/check_mk.py
index ec24602..0e2f2df 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2268,7 +2268,8 @@ def initialize_ip_lookup_cache():
ip_lookup_cache = cmk_base.config_cache.get_dict("ip_lookup")
try:
- ip_lookup_cache.update(eval(file(cmk.paths.var_dir + '/ipaddresses.cache').read()))
+ data_from_file = cmk.store.load_data_from_file(cmk.paths.var_dir + '/ipaddresses.cache', {})
+ ip_lookup_cache.update(data_from_file)
# be compatible to old caches which were created by Check_MK without IPv6 support
if ip_lookup_cache and type(ip_lookup_cache.keys()[0]) != tuple:
@@ -2286,10 +2287,18 @@ def initialize_ip_lookup_cache():
def write_ip_lookup_cache():
ip_lookup_cache = cmk_base.config_cache.get_dict("ip_lookup")
- # TODO: Write using cmk.store
- suffix = "." + str(os.getpid())
- file(cmk.paths.var_dir + '/ipaddresses.cache' + suffix, 'w').write(repr(ip_lookup_cache))
- os.rename(cmk.paths.var_dir + '/ipaddresses.cache' + suffix, cmk.paths.var_dir + '/ipaddresses.cache')
+
+ cache_path = cmk.paths.var_dir + '/ipaddresses.cache'
+ # Read already known data
+ data_from_file = cmk.store.load_data_from_file(cache_path,
+ default={},
+ lock=True)
+ ip_lookup_cache.update(data_from_file)
+ # The lock from the previous call is released in the following function
+ # (I don't like this)
+ # TODO: this file always grows... there should be a cleanup mechanism
+ # maybe on "cmk --update-dns-cache"
+ cmk.store.save_data_to_file(cache_path, ip_lookup_cache)
def do_update_dns_cache():
Module: check_mk
Branch: master
Commit: 6e2bcdcf206e7c85f3b5716c375a83af9ca54b32
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e2bcdcf206e7c…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Sat Mar 25 14:34:34 2017 +0100
4464 FIX RRD Helper Process: No longer uses default RRD templates after a core reload
The rrd helper lost its entire configuration on a core reload. As a result, new rrds for host and services
used the default rrd configuration and not any configurations specified in the corresponding WATO rules.
Change-Id: Id9dabb25b218c9bb1eb4c689802ad0e52560537a
---
.werks/4464 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.werks/4464 b/.werks/4464
new file mode 100644
index 0000000..f2c9b00
--- /dev/null
+++ b/.werks/4464
@@ -0,0 +1,11 @@
+Title: RRD Helper Process: No longer uses default RRD templates after a core reload
+Level: 2
+Component: core
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1490447132
+Class: fix
+
+The rrd helper lost its entire configuration on a core reload. As a result, new rrds for host and services
+used the default rrd configuration and not any configurations specified in the corresponding WATO rules.