Module: check_mk
Branch: master
Commit: ae02f1f5895e11eda18cb411d7faf7211e474ca0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ae02f1f5895e11…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Sep 3 14:59:00 2015 +0200
#2569 FIX fixed crash in aix lvm check after volume disappears
after removing/renaming a lvm in aix the check would crash until rediscovery
---
.werks/2569 | 10 ++++++++++
ChangeLog | 1 +
checks/aix_lvm | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/2569 b/.werks/2569
new file mode 100644
index 0000000..dad7b7f
--- /dev/null
+++ b/.werks/2569
@@ -0,0 +1,10 @@
+Title: fixed crash in aix lvm check after volume disappears
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1441284997
+
+after removing/renaming a lvm in aix the check would crash until rediscovery
diff --git a/ChangeLog b/ChangeLog
index 0a420d6..5c83796 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -164,6 +164,7 @@
* 2557 FIX: cmciii_lcp_airin cmciii_lcp_airout cmciii_lcp_waterin
cmciii_lcp_waterout: Fixed exception parsing data from some devices
* 2558 FIX: cmciii.temp: Do not discover air temperature sensors anymore...
* 1290 FIX: brocade_mlx_fan: Fix: Not longer add fans who not are present while
discovery
+ * 2569 FIX: fixed crash in aix lvm check after volume disappears...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/aix_lvm b/checks/aix_lvm
index 273ecb7..8724143 100644
--- a/checks/aix_lvm
+++ b/checks/aix_lvm
@@ -104,7 +104,7 @@ def check_aix_lvm(item, _no_params, info):
# Get structured LVM info
lvmconf = parse_aix_lvm(info)
- if target_lv in lvmconf[target_vg].keys():
+ if target_vg in lvmconf and target_lv in lvmconf[target_vg]:
msgtxt = []
state = 0