[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.9.1-2-11-gdb397b3

Alexander Wirt formorer at debian.org
Fri Jul 12 06:00:50 UTC 2013


The following commit has been merged in the master branch:
commit e1883146c86e3138382d30176b6c66716aeb0323
Author: Alexander Wirt <formorer at debian.org>
Date:   Wed Jul 10 23:24:10 2013 +0200

    Imported Upstream version 1.9.3

diff --git a/Changelog b/Changelog
index 3fc74db..6b7e7dd 100644
--- a/Changelog
+++ b/Changelog
@@ -13,6 +13,14 @@ UPGRADE NOTES
 	- idoutils: ${source}/module/idoutils/config/updates
 * package locations may differ!
 
+1.9.3 - 07/07/2013
+
+FIXES
+* core: fix init script status exit codes on not running daemon and present pid file #4243 - MF
+
+* idoutils: fix workaround on libdbi fetch_next_row() bug applied for postgresql too, causing faulty queries #4367 - MF
+
+
 1.9.2 - 30/06/2013
 
 FIXES
diff --git a/Makefile.in b/Makefile.in
index 5c8dfb9..5982f92 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -81,7 +81,7 @@ MKDIR=/bin/mkdir
 ###############################
 # Global
 ###############################
-ICINGA_VERSION=1.9.2
+ICINGA_VERSION=1.9.3
 
 CP=@CP@
 
diff --git a/configure b/configure
index 305ee57..23ad914 100755
--- a/configure
+++ b/configure
@@ -2491,9 +2491,9 @@ ac_config_headers="$ac_config_headers include/config.h"
 
 
 PKG_NAME=icinga-core
-PKG_VERSION="1.9.2"
+PKG_VERSION="1.9.3"
 PKG_HOME_URL="http://www.icinga.org/"
-PKG_REL_DATE="06-30-2013"
+PKG_REL_DATE="07-07-2013"
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
diff --git a/configure.in b/configure.in
index c26517a..72f29ee 100644
--- a/configure.in
+++ b/configure.in
@@ -9,9 +9,9 @@ AC_CONFIG_HEADER(include/config.h)
 AC_PREFIX_DEFAULT(/usr/local/icinga)
 
 PKG_NAME=icinga-core
-PKG_VERSION="1.9.2"
+PKG_VERSION="1.9.3"
 PKG_HOME_URL="http://www.icinga.org/"
-PKG_REL_DATE="06-30-2013"
+PKG_REL_DATE="07-07-2013"
 
 dnl Figure out how to invoke "install" and what install options to use.
 AC_PROG_INSTALL
diff --git a/daemon-init.in b/daemon-init.in
index e15f7a1..ba35afc 100644
--- a/daemon-init.in
+++ b/daemon-init.in
@@ -55,6 +55,14 @@ fi
 
 
 ## helper functions ##
+check_pid_file_exists ()
+{
+        if test ! -f $IcingaRunFile; then
+                return 1;
+        fi
+
+        return 0
+}
 
 status_icinga ()
 {
@@ -69,17 +77,26 @@ status_icinga ()
 }
 
 
-printstatus_icinga()
+checkstatus_icinga()
 {
-
-	if status_icinga $1 $2; then
-		echo "icinga (pid $IcingaPID) is running..."
-	else
-		echo "icinga is not running"
-	fi
+        if check_pid_file_exists > /dev/null; then
+                pid_icinga
+                if status_icinga $1 $2; then
+                        echo "icinga (pid $IcingaPID) is running..."
+                        exit 0
+                else
+                        echo "icinga is not running. removing $IcingaRunFile"
+                        # pid file exists, but daemon is dead
+                        rm -f $IcingaRunFile
+                        exit 1
+                fi
+        else
+                # daemon not running
+                echo "icinga is not running"
+                exit 3
+        fi
 }
 
-
 killproc_icinga ()
 {
 	if kill -0  $IcingaPID  >/dev/null 2>&1; then
@@ -103,7 +120,6 @@ pid_icinga ()
 	IcingaPID=`head -n 1 $IcingaRunFile`
 }
 
-
 chk_config ()
 {
 	printf "Running configuration check..."
@@ -190,8 +206,7 @@ case "$1" in
 		;;
 
 	status)
-		pid_icinga
-		printstatus_icinga icinga
+		checkstatus_icinga icinga
 		;;
 
 	checkconfig)
diff --git a/html/main.html b/html/main.html
index 22a9533..24e4aa6 100644
--- a/html/main.html
+++ b/html/main.html
@@ -18,9 +18,9 @@
 </div>
 
 <div id="currentversioninfo">
-<div class="version">Version 1.9.2</div>
-<div class="releasedate">June 30, 2013</div>
-<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.9.2</a></div>
+<div class="version">Version 1.9.3</div>
+<div class="releasedate">July 07, 2013</div>
+<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.9.3</a></div>
 </div>
 
 <div id="developer">
diff --git a/icinga.spec b/icinga.spec
index 0832c6a..baa7047 100644
--- a/icinga.spec
+++ b/icinga.spec
@@ -20,7 +20,7 @@
 
 Summary: Open Source host, service and network monitoring program
 Name: icinga
-Version: 1.9.2
+Version: 1.9.3
 Release: %{revision}%{?dist}
 License: GPLv2
 Group: Applications/System
@@ -438,6 +438,9 @@ fi
 
 
 %changelog
+* Sun Jul 07 2013 Michael Friedrich <michael.friedrich at netways.de> - 1.9.3-1
+- bump 1.9.3
+
 * Sun Jun 30 2013 Michael Friedrich <michael.friedrich at netways.de> - 1.9.2-1
 - bump 1.9.2
 
diff --git a/include/common.h b/include/common.h
index 23c97f5..670c802 100644
--- a/include/common.h
+++ b/include/common.h
@@ -27,8 +27,8 @@
 #define PROGRAM_NAME "Icinga"
 #define PROGRAM_NAME_UC "ICINGA"
 #define PROGRAM_NAME_LC "icinga"
-#define PROGRAM_VERSION "1.9.2"
-#define PROGRAM_MODIFICATION_DATE "06-30-2013"
+#define PROGRAM_VERSION "1.9.3"
+#define PROGRAM_MODIFICATION_DATE "07-07-2013"
 
 /*#define DEBUG_CHECK_IPC 1 */
 /*#define DEBUG_CHECK_IPC2 1*/
diff --git a/module/idoutils/include/common.h b/module/idoutils/include/common.h
index 803738c..c03dcfd 100644
--- a/module/idoutils/include/common.h
+++ b/module/idoutils/include/common.h
@@ -22,8 +22,8 @@
 #define LOG2IDO_NAME 		"LOG2IDO"
 
 /* only one space for update-version matching */
-#define IDO_DATE "06-30-2013"
-#define IDO_VERSION "1.9.2"
+#define IDO_DATE "07-07-2013"
+#define IDO_VERSION "1.9.3"
 
 #define IDO_SCHEMA_VERSION "1.9.0"
 
diff --git a/module/idoutils/src/dbhandlers.c b/module/idoutils/src/dbhandlers.c
index a7d0539..0a51b67 100644
--- a/module/idoutils/src/dbhandlers.c
+++ b/module/idoutils/src/dbhandlers.c
@@ -478,6 +478,7 @@ int ido2db_get_cached_object_ids(ido2db_idi *idi) {
 #ifdef USE_LIBDBI
 	unsigned long offset, stride;
 	char *buf = NULL;
+	char *name2 = NULL;
 #endif
 
 #ifdef USE_ORACLE
@@ -487,21 +488,17 @@ int ido2db_get_cached_object_ids(ido2db_idi *idi) {
 
 	/* find all the object definitions we already have */
 #ifdef USE_LIBDBI /* everything else will be libdbi */
-	offset = 0;
-	stride = 2500;
-
-	for (;;) {
-		if (asprintf(&buf, "SELECT object_id, objecttype_id, name1, name2 FROM %s WHERE instance_id=%lu LIMIT %lu, %lu", ido2db_db_tablenames[IDO2DB_DBTABLE_OBJECTS], idi->dbinfo.instance_id, offset, stride) == -1)
+	switch (idi->dbinfo.server_type) {
+	case IDO2DB_DBSERVER_PGSQL:
+		/* postgresql works well with dbi_result_next_now() */
+		if (asprintf(&buf, "SELECT object_id, objecttype_id, name1, name2 FROM %s WHERE instance_id=%lu", ido2db_db_tablenames[IDO2DB_DBTABLE_OBJECTS], idi->dbinfo.instance_id) == -1)
 			buf = NULL;
 
 		if ((result = ido2db_db_query(idi, buf)) == IDO_OK) {
-			if (dbi_result_get_numrows(idi->dbinfo.dbi_result) == 0)
-				break;
 
 			while (idi->dbinfo.dbi_result) {
 				if (dbi_result_next_row(idi->dbinfo.dbi_result)) {
-					char *name2;
-					
+
 					object_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "object_id");
 					objecttype_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "objecttype_id");
 
@@ -529,7 +526,53 @@ int ido2db_get_cached_object_ids(ido2db_idi *idi) {
 
 		free(buf);
 
-		offset += stride;
+		break;
+	default:
+		/* provide a workaround for mysql bug with dbi_result_nextrow() */
+		offset = 0;
+		stride = 2500;
+
+		for (;;) {
+			if (asprintf(&buf, "SELECT object_id, objecttype_id, name1, name2 FROM %s WHERE instance_id=%lu LIMIT %lu, %lu", ido2db_db_tablenames[IDO2DB_DBTABLE_OBJECTS], idi->dbinfo.instance_id, offset, stride) == -1)
+				buf = NULL;
+
+			if ((result = ido2db_db_query(idi, buf)) == IDO_OK) {
+				if (dbi_result_get_numrows(idi->dbinfo.dbi_result) == 0)
+					break;
+
+				while (idi->dbinfo.dbi_result) {
+					if (dbi_result_next_row(idi->dbinfo.dbi_result)) {
+
+						object_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "object_id");
+						objecttype_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "objecttype_id");
+
+						/* get string and free it later on */
+						if (asprintf(&tmp1, "%s", dbi_result_get_string_copy(idi->dbinfo.dbi_result, "name1")) == -1)
+							tmp1 = NULL;
+						name2 = dbi_result_get_string_copy(idi->dbinfo.dbi_result, "name2");
+						if (!name2 || asprintf(&tmp2, "%s", name2) == -1)
+							tmp2 = NULL;
+
+						ido2db_add_cached_object_id(idi, objecttype_id, tmp1, tmp2, object_id);
+
+						free(tmp1);
+						free(tmp2);
+
+					} else {
+						dbi_result_free(idi->dbinfo.dbi_result);
+						idi->dbinfo.dbi_result = NULL;
+					}
+				}
+			} else {
+				dbi_result_free(idi->dbinfo.dbi_result);
+				idi->dbinfo.dbi_result = NULL;
+			}
+
+			free(buf);
+
+			offset += stride;
+		}
+		break;
 	}
 #endif
 
diff --git a/update-version b/update-version
index d084187..8e0bf46 100755
--- a/update-version
+++ b/update-version
@@ -10,10 +10,10 @@ else
 fi
 
 # Current version number
-CURRENTVERSION=1.9.2
+CURRENTVERSION=1.9.3
 
 # Last date
-LASTDATE=06-30-2013
+LASTDATE=07-07-2013
 
 if [ "x$1" = "x" ]
 then

-- 
debian packaging of icinga(-core)



More information about the Pkg-nagios-changes mailing list