Commit e1883146 authored by Alexander Wirt's avatar Alexander Wirt

Imported Upstream version 1.9.3

parent 7b2ec2a7
......@@ -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
......
......@@ -81,7 +81,7 @@ MKDIR=/bin/mkdir
###############################
# Global
###############################
ICINGA_VERSION=1.9.2
ICINGA_VERSION=1.9.3
CP=@CP@
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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">
......
......@@ -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@netways.de> - 1.9.3-1
- bump 1.9.3
* Sun Jun 30 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.9.2-1
- bump 1.9.2
......
......@@ -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*/
......
......@@ -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"
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment