Module: check_mk
Branch: master
Commit: b9eefe019a130a5650b1ed4096f21357d1f2d610
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b9eefe019a130a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 1 10:18:36 2014 +0100
#1545 FIX Terminating with exit code 3 now when duplicate host has been found
---
.bugs/2167 | 7 +++++--
.bugs/2183 | 7 +++++--
.werks/1545 | 9 +++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 +-
5 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/.bugs/2167 b/.bugs/2167
index 5a97049..ba5564d 100644
--- a/.bugs/2167
+++ b/.bugs/2167
@@ -1,12 +1,15 @@
Title: Edit view: Unable to save because of an empty selection
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2014-10-02 10:37:41
Targetversion: future
-Class: bug
1) Edit any view
2) Press "Add column". Do not select an entry
3) Press "Save" causes an empty selection warning
4) Remove this empty selection
5) Press "Save" -> Warning persists
+
+2014-12-01 10:10:28: changed state open -> done
+Already fixed some days/weeks ago.
diff --git a/.bugs/2183 b/.bugs/2183
index 80523ac..b78ff08 100644
--- a/.bugs/2183
+++ b/.bugs/2183
@@ -1,11 +1,14 @@
Title: cmk --check-inventory fails with exit code 4 on invalid configuration
Component: core
-State: open
+Class: bug
+State: done
Date: 2014-09-19 11:01:41
Targetversion: future
-Class: bug
If you have a duplicate host, for example, then the Inventory check fails with
4. This makes Nagios unhappy.
Solution: Fail with code 3 and a useful error message
+
+2014-12-01 10:18:05: changed state open -> done
+Fixed. Using exit code 3 now
diff --git a/.werks/1545 b/.werks/1545
new file mode 100644
index 0000000..6c20340
--- /dev/null
+++ b/.werks/1545
@@ -0,0 +1,9 @@
+Title: Terminating with exit code 3 now when duplicate host has been found
+Level: 1
+Component: core
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417425490
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 5875a2a..be0385f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 1439 mk-job: now also available on solaris systems...
* 1483 FIX: Savely replace illegal vertical bars in check plugin output...
* 1431 FIX: windows_agent: fixed error on parsing unicode formatted logfiles...
+ * 1545 FIX: Terminating with exit code 3 now when duplicate host has been found
Checks & Agents:
* 1197 climaveneta_temp: New check for temperature sensors on Climaveneta clima
devices
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 426962a..55e80c0 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -5733,7 +5733,7 @@ def read_config_files(with_autochecks=True, with_conf_d=True):
for hostname in strip_tags(all_hosts + clusters.keys()):
if hostname in seen_hostnames:
sys.stderr.write("Error in configuration: duplicate host
'%s'\n" % hostname)
- sys.exit(4)
+ sys.exit(3)
seen_hostnames.add(hostname)
# Add WATO-configured explicit checks to (possibly empty) checks