[Pkg-nagios-changes] [pkg-icinga2] 02/04: Imported Upstream version 2.5.3
Alexander Wirt
formorer at debian.org
Thu Aug 25 11:11:48 UTC 2016
This is an automated email from the git hooks/post-receive script.
formorer pushed a commit to branch master
in repository pkg-icinga2.
commit 6cd83c40e033e3c0dd0908d32f562449f647c448
Author: Alexander Wirt <formorer at debian.org>
Date: Thu Aug 25 13:11:09 2016 +0200
Imported Upstream version 2.5.3
---
ChangeLog | 17 +++++++
RELEASE.md | 20 ++++----
doc/1-about.md | 17 +++++++
doc/6-distributed-monitoring.md | 109 +++++++++++++++-------------------------
icinga2.nuspec | 2 +-
icinga2.spec | 2 +-
lib/db_ido/dbconnection.cpp | 1 +
lib/db_ido/hostdbobject.cpp | 5 ++
lib/db_ido/servicedbobject.cpp | 5 ++
lib/db_ido/userdbobject.cpp | 14 ++++++
lib/db_ido/userdbobject.hpp | 2 +
lib/icinga/checkable-check.cpp | 16 ++----
tools/chocolateyInstall.ps1 | 4 +-
13 files changed, 120 insertions(+), 94 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 61d1791..2156601 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,23 @@ Please check [doc/1-about.md].
## What's New
+### What's New in Version 2.5.3
+
+#### Changes
+
+This release addresses an issue with PostgreSQL support for the IDO database module.
+
+#### Bugfixes
+
+* Bug 12533 (DB IDO): ido pgsql migration from 2.4.0 to 2.5.0 : wrong size for config_hash
+
+### What's New in Version 2.5.2
+
+#### Bugfixes
+
+* Bug 12527 (DB IDO): Newly added group member tables in the IDO database are not updated
+* Bug 12529 (Checker): Icinga 2 sends SOFT recovery notifications
+
### What's New in Version 2.5.1
#### Bugfixes
diff --git a/RELEASE.md b/RELEASE.md
index 26c3575..6c46750 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -12,9 +12,9 @@ Check the following issue filters:
## Backport Commits
$ git checkout master
- $ ./pick.py -V 2.4.9
+ $ ./pick.py -V 2.5.3
-The script creates a new branch 'auto-merged-2.4.9' which is based on the
+The script creates a new branch 'auto-merged-2.5.3' which is based on the
current support branch. It then merges all commits from the 'master' branch which
reference a ticket for the version that was specified.
@@ -25,8 +25,8 @@ rebase until no commits are left:
After finishing the rebase the branch needs to be merged into the support branch:
- $ git checkout support/2.4
- $ git merge --ff-only auto-merged-2.4.9
+ $ git checkout support/2.5
+ $ git merge --ff-only auto-merged-2.5.3
## Authors
@@ -86,16 +86,16 @@ Push the tag.
For major releases: Create a new "support" branch:
$ git checkout master
- $ git checkout -b support/2.4
- $ git push -u origin support/2.4
+ $ git checkout -b support/2.5
+ $ git push -u origin support/2.5
For minor releases: Push the support branch, cherry-pick the release commit
into master and merge the support branch:
- $ git push -u origin support/2.4
+ $ git push -u origin support/2.5
$ git checkout master
- $ git cherry-pick support/2.4
- $ git merge --strategy=ours support/2.4
+ $ git cherry-pick support/2.5
+ $ git merge --strategy=ours support/2.5
$ git push origin master
# External Dependencies
@@ -141,7 +141,7 @@ Create the nupkg package:
Install the created icinga2 package locally:
- choco install icinga2 -version 2.5.0 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'"
+ choco install icinga2 -version 2.5.3 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'"
Upload the package to [chocolatey](https://chocolatey.org/packages/upload).
diff --git a/doc/1-about.md b/doc/1-about.md
index 77ab0bb..0246b89 100644
--- a/doc/1-about.md
+++ b/doc/1-about.md
@@ -54,6 +54,23 @@ More details in the [Icinga FAQ](https://www.icinga.org/icinga/faq/).
## <a id="whats-new"></a> What's New
+### What's New in Version 2.5.3
+
+#### Changes
+
+This release addresses an issue with PostgreSQL support for the IDO database module.
+
+#### Bugfixes
+
+* Bug [12533](https://dev.icinga.org/issues/12533 "Bug 12533") (DB IDO): ido pgsql migration from 2.4.0 to 2.5.0 : wrong size for config_hash
+
+### What's New in Version 2.5.2
+
+#### Bugfixes
+
+* Bug [12527](https://dev.icinga.org/issues/12527 "Bug 12527") (DB IDO): Newly added group member tables in the IDO database are not updated
+* Bug [12529](https://dev.icinga.org/issues/12529 "Bug 12529") (Checker): Icinga 2 sends SOFT recovery notifications
+
### What's New in Version 2.5.1
#### Bugfixes
diff --git a/doc/6-distributed-monitoring.md b/doc/6-distributed-monitoring.md
index b6ce38d..6c75b5a 100644
--- a/doc/6-distributed-monitoring.md
+++ b/doc/6-distributed-monitoring.md
@@ -29,13 +29,11 @@ Rephrasing this picture into more details:
The following sections will refer to these roles and explain the
differences and the possibilities this kind of setup offers.
-> **Tip**:
->
-> If you just want to install a single master node that monitors several hosts
-> (i.e. Icinga 2 clients), continue reading -- we'll start with
-> simple examples.
-> In case you are planning a huge cluster setup with multiple levels and
-> lots of clients, read on -- we'll deal with these cases later on.
+**Tip**: If you just want to install a single master node that monitors several hosts
+(i.e. Icinga 2 clients), continue reading -- we'll start with
+simple examples.
+In case you are planning a huge cluster setup with multiple levels and
+lots of clients, read on -- we'll deal with these cases later on.
The installation on each system is the same: You need to install the
[Icinga 2 package](2-getting-started.md#setting-up-icinga2) and the required [plugins](2-getting-started.md#setting-up-check-plugins).
@@ -175,9 +173,7 @@ Install the [Icinga 2 package](2-getting-started.md#setting-up-icinga2) and setu
the required [plugins](2-getting-started.md#setting-up-check-plugins) if you haven't done
so already.
-> **Note**
->
-> Windows is not supported for a master node setup.
+**Note**: Windows is not supported for a master node setup.
The next step is to run the `node wizard` CLI command. Prior to that
ensure to collect the required information:
@@ -572,10 +568,8 @@ The endpoint configuration could look like this, for example:
Next, you need to define two zones. There is no naming convention, best practice is to either use `master`, `satellite`/`client-fqdn` or to choose region names for example `Europe`, `USA` and `Asia`, though.
-> **Note**
->
-> Each client requires its own zone and endpoint configuration. Best practice
-> is to use the client's FQDN for all object names.
+**Note**: Each client requires its own zone and endpoint configuration. Best practice
+is to use the client's FQDN for all object names.
The `master` zone is a parent of the `icinga2-client2.localdomain` zone:
@@ -735,10 +729,8 @@ The endpoint configuration could look like this:
Next, you need to define two zones. There is no naming convention, best practice is to either use `master`, `satellite`/`client-fqdn` or to choose region names for example `Europe`, `USA` and `Asia`, though.
-> **Note**
->
-> Each client requires its own zone and endpoint configuration. Best practice
-> is to use the client's FQDN for all object names.
+**Note**: Each client requires its own zone and endpoint configuration. Best practice
+is to use the client's FQDN for all object names.
The `master` zone is a parent of the `icinga2-client1.localdomain` zone:
@@ -836,12 +828,10 @@ itself.
You can also use the config sync inside a high-availability zone to
ensure that all config objects are synced among zone members.
-> **Note**
->
-> You can only have one so-called "config master" in a zone which stores
-> the configuration in the `zones.d` directory.
-> Multiple nodes with configuration files in the `zones.d` directory are
-> **not supported**.
+**Note**: You can only have one so-called "config master" in a zone which stores
+the configuration in the `zones.d` directory.
+Multiple nodes with configuration files in the `zones.d` directory are
+**not supported**.
Now that you've learned the basics about the configuration sync, proceed with
the [scenarios](6-distributed-monitoring.md#distributed-monitoring-scenarios)
@@ -916,9 +906,9 @@ them from this directory and restart Icinga 2.
The generated host object uses the `cluster-zone` check command as
[health check](6-distributed-monitoring.md#distributed-monitoring-health-checks).
-> **Tip** In case you want to blacklist or whitelist certain hosts and/or services
-> on the master, use the `icinga2 node {black,white}list`
-> commands.
+**Tip**: In case you want to blacklist or whitelist certain hosts and/or services
+on the master, use the `icinga2 node {black,white}list`
+commands.
In this example we're first putting all `ping*` services on all hosts on the blacklist.
With the next command we allow the host `probe` to run the service `ping4`:
@@ -1112,8 +1102,7 @@ The setup uses the capabilities of the Icinga 2 cluster. All zone members
replicate cluster events amongst each other. In addition to that, several Icinga 2
features can enable HA functionality.
-> **Note**
-> All nodes in the same zone require that you enable the same features for high-availability (HA).
+**Note**: All nodes in the same zone require that you enable the same features for high-availability (HA).
Overview:
@@ -1291,9 +1280,8 @@ Validate the configuration and restart Icinga 2 on the master node `icinga2-mast
Open Icinga Web 2 and check the two newly created client hosts with two new services
-- one executed locally (`ping4`) and one using command endpoint (`disk`).
-> **Tip**
-> It's a good idea to add [health checks](6-distributed-monitoring.md#distributed-monitoring-health-checks)
-> to make sure that your cluster notifies you in case of failure.
+**Tip**: It's a good idea to add [health checks](6-distributed-monitoring.md#distributed-monitoring-health-checks)
+to make sure that your cluster notifies you in case of failure.
### <a id="distributed-monitoring-scenarios-master-satellite-client"></a> Three Levels with Master, Satellites, and Clients
@@ -1304,10 +1292,8 @@ This scenario combines everything you've learned so far: High-availability maste
satellites receiving their config from the master zone, and clients checked via command
endpoint from the satellite zones.
-> **Tip**
->
-> It can get complicated, so grab a pen and paper and bring your thoughts to life.
-> Play around with a test setup before using it in a production environment!
+**Tip**: It can get complicated, so grab a pen and paper and bring your thoughts to life.
+Play around with a test setup before using it in a production environment!
Overview:
@@ -1534,9 +1520,8 @@ Validate the configuration and restart Icinga 2 on the master node `icinga2-mast
Open Icinga Web 2 and check the two newly created client hosts with two new services
-- one executed locally (`ping4`) and one using command endpoint (`disk`).
-> **Tip**
-> It's a good idea to add [health checks](6-distributed-monitoring.md#distributed-monitoring-health-checks)
-> to make sure that your cluster notifies you in case of failure.
+**Tip**: It's a good idea to add [health checks](6-distributed-monitoring.md#distributed-monitoring-health-checks)
+to make sure that your cluster notifies you in case of failure.
## <a id="distributed-monitoring-best-practice"></a> Best Practice
@@ -1560,10 +1545,8 @@ configuration files only. Use your preferred package repository
and/or configuration management tool (Puppet, Ansible, Chef, etc.)
for that.
-> **Note**
->
-> Checkable objects (hosts and services) cannot be put into a global
-> zone. The configuration validation will terminate with an error.
+**Note**: Checkable objects (hosts and services) cannot be put into a global
+zone. The configuration validation will terminate with an error.
The zone object configuration must be deployed on all nodes which should receive
the global configuration files:
@@ -1592,10 +1575,8 @@ before restarting the parent master/satellite nodes.
Then validate the configuration on the master node and restart Icinga 2.
-> **Tip**
->
-> You can copy the example configuration files located in `/etc/icinga2/conf.d`
-> into your global zone.
+**Tip**: You can copy the example configuration files located in `/etc/icinga2/conf.d`
+into your global zone.
Example:
@@ -1823,15 +1804,13 @@ By default the DB IDO feature only runs on one node. All other nodes in the same
the active IDO database connection at runtime. The node with the active DB IDO connection is
not necessarily the zone master.
-> **Note**
->
-> The DB IDO HA feature can be disabled by setting the `enable_ha` attribute to `false`
-> for the [IdoMysqlConnection](9-object-types.md#objecttype-idomysqlconnection) or
-> [IdoPgsqlConnection](9-object-types.md#objecttype-idopgsqlconnection) object on **all** nodes in the
-> **same** zone.
->
-> All endpoints will enable the DB IDO feature and connect to the configured
-> database and dump configuration, status and historical data on their own.
+**Note**: The DB IDO HA feature can be disabled by setting the `enable_ha` attribute to `false`
+for the [IdoMysqlConnection](9-object-types.md#objecttype-idomysqlconnection) or
+[IdoPgsqlConnection](9-object-types.md#objecttype-idopgsqlconnection) object on **all** nodes in the
+**same** zone.
+
+All endpoints will enable the DB IDO feature and connect to the configured
+database and dump configuration, status and historical data on their own.
If the instance with the active DB IDO connection dies, the HA functionality will
automatically elect a new DB IDO master.
@@ -1883,10 +1862,8 @@ It is not necessary that both the master and the client node establish
two connections to each other. Icinga 2 will only use one connection
and close the second connection if established.
-> **Tip**
->
-> Choose either to let master/satellite nodes connect to client nodes
-> or vice versa.
+**Tip**: Choose either to let master/satellite nodes connect to client nodes
+or vice versa.
### <a id="distributed-monitoring-advanced-hints-command-endpoint-log-duration"></a> Disable Log Duration for Command Endpoints
@@ -2032,10 +2009,8 @@ Once the setup is completed you can use the `node setup` cli command too.
Instead of using the `node wizard` CLI command, there is an alternative `node setup`
command available which has some prerequisites.
-> **Note**
->
-> The CLI command can be used on Linux/Unix and Windows operating systems.
-> The graphical Windows setup wizard actively uses these CLI commands.
+**Note**: The CLI command can be used on Linux/Unix and Windows operating systems.
+The graphical Windows setup wizard actively uses these CLI commands.
#### <a id="distributed-monitoring-automation-cli-node-setup-master"></a> Node Setup on the Master Node
@@ -2261,8 +2236,6 @@ was executed inside the Docker client.
![Icinga 2 Client Automation Docker](images/distributed-monitoring/icinga2_distributed_automation_docker_client_icingaweb2.png)
-> **Note**
->
-> This is a volatile example using Docker. Build your own Docker
-> container client using these examples.
+**Note**: This is a volatile example using Docker. Build your own Docker
+container client using these examples.
diff --git a/icinga2.nuspec b/icinga2.nuspec
index 1624c17..814f11c 100755
--- a/icinga2.nuspec
+++ b/icinga2.nuspec
@@ -6,7 +6,7 @@
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
<id>icinga2</id>
<title>Icinga2</title>
- <version>2.5.1</version>
+ <version>2.5.3</version>
<authors>2016 - The Icinga Project</authors>
<owners>Icinga Development Team</owners>
<summary>icinga2 - Monitoring Agent for Windows</summary>
diff --git a/icinga2.spec b/icinga2.spec
index 6726d78..a682fe6 100644
--- a/icinga2.spec
+++ b/icinga2.spec
@@ -66,7 +66,7 @@
Summary: Network monitoring application
Name: icinga2
-Version: 2.5.1
+Version: 2.5.3
Release: %{revision}%{?dist}
License: GPL-2.0+
Group: Applications/System
diff --git a/lib/db_ido/dbconnection.cpp b/lib/db_ido/dbconnection.cpp
index 329c93b..93031c1 100644
--- a/lib/db_ido/dbconnection.cpp
+++ b/lib/db_ido/dbconnection.cpp
@@ -445,6 +445,7 @@ void DbConnection::UpdateObject(const ConfigObject::Ptr& object)
Dictionary::Ptr configFields = dbobj->GetConfigFields();
String configHash = dbobj->CalculateConfigHash(configFields);
+ ASSERT(configHash.GetLength() <= 64);
configFields->Set("config_hash", configHash);
String cachedHash = GetConfigHash(dbobj);
diff --git a/lib/db_ido/hostdbobject.cpp b/lib/db_ido/hostdbobject.cpp
index 7292338..30ef27a 100644
--- a/lib/db_ido/hostdbobject.cpp
+++ b/lib/db_ido/hostdbobject.cpp
@@ -397,6 +397,11 @@ String HostDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) co
Host::Ptr host = static_pointer_cast<Host>(GetObject());
+ Array::Ptr groups = host->GetGroups();
+
+ if (groups)
+ hashData += DbObject::HashValue(groups);
+
Array::Ptr parents = new Array();
/* parents */
diff --git a/lib/db_ido/servicedbobject.cpp b/lib/db_ido/servicedbobject.cpp
index 921e159..b900909 100644
--- a/lib/db_ido/servicedbobject.cpp
+++ b/lib/db_ido/servicedbobject.cpp
@@ -357,6 +357,11 @@ String ServiceDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields)
Service::Ptr service = static_pointer_cast<Service>(GetObject());
+ Array::Ptr groups = service->GetGroups();
+
+ if (groups)
+ hashData += DbObject::HashValue(groups);
+
Array::Ptr dependencies = new Array();
/* dependencies */
diff --git a/lib/db_ido/userdbobject.cpp b/lib/db_ido/userdbobject.cpp
index 60fe460..57adc53 100644
--- a/lib/db_ido/userdbobject.cpp
+++ b/lib/db_ido/userdbobject.cpp
@@ -163,3 +163,17 @@ void UserDbObject::OnConfigUpdateHeavy(void)
DbObject::OnMultipleQueries(queries);
}
+
+String UserDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) const
+{
+ String hashData = DbObject::CalculateConfigHash(configFields);
+
+ User::Ptr user = static_pointer_cast<User>(GetObject());
+
+ Array::Ptr groups = user->GetGroups();
+
+ if (groups)
+ hashData += DbObject::HashValue(groups);
+
+ return SHA256(hashData);
+}
diff --git a/lib/db_ido/userdbobject.hpp b/lib/db_ido/userdbobject.hpp
index 20f18fa..2aa90be 100644
--- a/lib/db_ido/userdbobject.hpp
+++ b/lib/db_ido/userdbobject.hpp
@@ -43,6 +43,8 @@ protected:
virtual Dictionary::Ptr GetStatusFields(void) const override;
virtual void OnConfigUpdateHeavy(void) override;
+
+ virtual String CalculateConfigHash(const Dictionary::Ptr& configFields) const;
};
}
diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp
index a064a80..00e4823 100644
--- a/lib/icinga/checkable-check.cpp
+++ b/lib/icinga/checkable-check.cpp
@@ -183,7 +183,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
if (IsStateOK(cr->GetState())) {
SetStateType(StateTypeHard); // NOT-OK -> HARD OK
- if (old_stateType == StateTypeHard && !IsStateOK(old_state))
+ if (!IsStateOK(old_state))
recovery = true;
ResetNotificationNumbers();
@@ -278,7 +278,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
if (notification_reachable && !in_downtime && !IsAcknowledged()) {
/* Send notifications whether when a hard state change occured. */
- if (hardChange)
+ if (hardChange && !(old_stateType == StateTypeSoft && IsStateOK(new_state)))
send_notification = true;
/* Or if the checkable is volatile and in a HARD state. */
else if (is_volatile && GetStateType() == StateTypeHard)
@@ -383,17 +383,9 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
NotifyFlapping(origin);
}
- if (recovery) {
- /* Recovery notifications must be sent any time.
- * Users who where notified about a problem before
- * will be filtered when processing the notification.
- */
+ if (send_notification && !is_flapping) {
if (!IsPaused())
- OnNotificationsRequested(this, NotificationRecovery, cr, "", "", MessageOrigin::Ptr());
- } else if (send_notification && !is_flapping) {
- /* Problem notifications */
- if (!IsPaused())
- OnNotificationsRequested(this, NotificationProblem, cr, "", "", MessageOrigin::Ptr());
+ OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "", MessageOrigin::Ptr());
}
}
diff --git a/tools/chocolateyInstall.ps1 b/tools/chocolateyInstall.ps1
index d5afe5e..28ab48f 100755
--- a/tools/chocolateyInstall.ps1
+++ b/tools/chocolateyInstall.ps1
@@ -1,7 +1,7 @@
$packageName = 'icinga2'
$installerType = 'msi'
-$url32 = 'http://packages.icinga.org/windows/Icinga2-v2.5.1-x86.msi'
-$url64 = 'http://packages.icinga.org/windows/Icinga2-v2.5.1-x86_64.msi'
+$url32 = 'http://packages.icinga.org/windows/Icinga2-v2.5.3-x86.msi'
+$url64 = 'http://packages.icinga.org/windows/Icinga2-v2.5.3-x86_64.msi'
$silentArgs = '/qn /norestart'
$validExitCodes = @(0)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git
More information about the Pkg-nagios-changes
mailing list