[Pkg-nagios-changes] [pkg-icinga2] 01/05: Imported Upstream version 2.3.7

Alexander Wirt formorer at debian.org
Wed Jul 15 15:32:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

formorer pushed a commit to branch debmon-jessie
in repository pkg-icinga2.

commit 0fff36af822d410cd6d2c7f619d69d13579a645f
Author: Alexander Wirt <formorer at debian.org>
Date:   Wed Jul 15 11:17:45 2015 +0200

    Imported Upstream version 2.3.7
---
 ChangeLog                     | 20 +++++++++
 RELEASE.md                    |  5 ++-
 doc/1-about.md                | 20 +++++++++
 doc/16-troubleshooting.md     | 98 ++++++++++++++++++++++++++++++-------------
 doc/22-appendix.md            |  4 +-
 icinga2.nuspec                |  2 +-
 icinga2.spec                  |  2 +-
 lib/base/scriptutils.cpp      | 20 +++++++--
 lib/config/config_parser.yy   | 10 +++++
 lib/config/configcompiler.hpp |  1 +
 lib/db_ido/dbconnection.cpp   |  4 +-
 lib/icinga/macroprocessor.cpp | 10 ++++-
 lib/remote/apilistener.cpp    | 69 +++++++++++++-----------------
 tools/chocolateyInstall.ps1   |  2 +-
 14 files changed, 185 insertions(+), 82 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a8cb238..fc1c00b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,26 @@ Please check [doc/1-about.md].
 
 ## What's New
 
+### What's New in Version 2.3.7
+
+#### Changes
+
+* Bugfixes
+
+#### Features
+
+* Feature 9610: Enhance troubleshooting ssl errors & cluster replay log
+
+#### Bugfixes
+
+* Bug 9406: Selective cluster reconnecting breaks client communication
+* Bug 9535: Config parser ignores "ignore" in template definition
+* Bug 9584: Incorrect return value for the macro() function
+* Bug 9585: Wrong formatting in DB IDO extensions docs
+* Bug 9586: DB IDO: endpoint* tables are cleared on reload causing constraint violations
+* Bug 9621: Assertion failed in icinga::ScriptUtils::Intersection
+* Bug 9622: Missing lock in ScriptUtils::Union
+
 ### What's New in Version 2.3.6
 
 #### Changes
diff --git a/RELEASE.md b/RELEASE.md
index 1d16c1b..222c1e1 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -78,8 +78,11 @@ For major releases: Create a new "support" branch:
 Example for CentOS7:
 
     $ sudo docker run -ti centos:latest bash
+
     # yum -y install http://packages.icinga.org/epel/7/release/noarch/icinga-rpm-release-7-1.el7.centos.noarch.rpm
-    # yum -y install icinga
+    # yum -y install icinga2
+    # icinga2 daemon -C
+
     # systemctl start icinga2
     # tail -f /var/log/icinga2/icinga2.log
 
diff --git a/doc/1-about.md b/doc/1-about.md
index 142e108..cf77b35 100644
--- a/doc/1-about.md
+++ b/doc/1-about.md
@@ -54,6 +54,26 @@ 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.3.7
+
+#### Changes
+
+* Bugfixes
+
+#### Features
+
+* Feature [9610](https://dev.icinga.org/issues/9610 "Feature 9610"): Enhance troubleshooting ssl errors & cluster replay log
+
+#### Bugfixes
+
+* Bug [9406](https://dev.icinga.org/issues/9406 "Bug 9406"): Selective cluster reconnecting breaks client communication
+* Bug [9535](https://dev.icinga.org/issues/9535 "Bug 9535"): Config parser ignores "ignore" in template definition
+* Bug [9584](https://dev.icinga.org/issues/9584 "Bug 9584"): Incorrect return value for the macro() function
+* Bug [9585](https://dev.icinga.org/issues/9585 "Bug 9585"): Wrong formatting in DB IDO extensions docs
+* Bug [9586](https://dev.icinga.org/issues/9586 "Bug 9586"): DB IDO: endpoint* tables are cleared on reload causing constraint violations
+* Bug [9621](https://dev.icinga.org/issues/9621 "Bug 9621"): Assertion failed in icinga::ScriptUtils::Intersection
+* Bug [9622](https://dev.icinga.org/issues/9622 "Bug 9622"): Missing lock in ScriptUtils::Union
+
 ### What's New in Version 2.3.6
 
 #### Changes
diff --git a/doc/16-troubleshooting.md b/doc/16-troubleshooting.md
index 3dbaa51..383d835 100644
--- a/doc/16-troubleshooting.md
+++ b/doc/16-troubleshooting.md
@@ -17,7 +17,14 @@
 
 ## <a id="troubleshooting-enable-debug-output"></a> Enable Debug Output
 
-Run Icinga 2 in the foreground with debugging enabled. Specify the console
+Enable the `debuglog` feature:
+
+    # icinga2 feature enable debuglog
+    # service icinga2 restart
+
+You can find the debug log file in `/var/log/icinga2/debug.log`.
+
+Alternatively you may run Icinga 2 in the foreground with debugging enabled. Specify the console
 log severity as an additional parameter argument to `-x`.
 
     # /usr/sbin/icinga2 daemon -x notice
@@ -25,13 +32,6 @@ log severity as an additional parameter argument to `-x`.
 The log level can be one of `critical`, `warning`, `information`, `notice`
 and `debug`.
 
-Alternatively you can enable the debug log:
-
-    # icinga2 feature enable debuglog
-    # service icinga2 restart
-
-You can find the debug log file in `/var/log/icinga2/debug.log`.
-
 ## <a id="list-configuration-objects"></a> List Configuration Objects
 
 The `icinga2 object list` CLI command can be used to list all configuration objects and their
@@ -210,12 +210,12 @@ the following
   * Verify the `Subject` containing your endpoint's common name (CN)
   * Check the validity of the certificate itself
 
-Steps:
+Steps on the client `icinga2-node2.localdomain`:
 
     # ls -la /etc/icinga2/pki
 
     # cd /etc/icinga2/pki/
-    # openssl x509 -in icinga2a.crt -text
+    # openssl x509 -in icinga2-node2.localdomain.crt -text
     Certificate:
         Data:
             Version: 1 (0x0)
@@ -225,29 +225,55 @@ Steps:
             Validity
                 Not Before: Jan  7 13:17:38 2014 GMT
                 Not After : Jan  5 13:17:38 2024 GMT
-            Subject: C=DE, ST=Bavaria, L=Nuremberg, O=NETWAYS GmbH, OU=Monitoring, CN=icinga2a
+            Subject: C=DE, ST=Bavaria, L=Nuremberg, O=NETWAYS GmbH, OU=Monitoring, CN=icinga2-node2.localdomain
             Subject Public Key Info:
                 Public Key Algorithm: rsaEncryption
                     Public-Key: (4096 bit)
                     Modulus:
                     ...
 
-Try to manually connect to the cluster node:
+Try to manually connect from `icinga2-node2.localdomain` to the master node `icinga2-node1.localdomain`:
+
+    # openssl s_client -CAfile /etc/icinga2/pki/ca.crt -cert /etc/icinga2/pki/icinga2-node2.localdomain.crt -key /etc/icinga2/pki/icinga2-node2.localdomain..key -connect icinga2-node1.localdomain.crt:5665
+
+    CONNECTED(00000003)
+    ---
+    ...
 
-    # openssl s_client -connect 192.168.33.10:5665
+If the connection attempt fails or your CA does not match, [verify the master and client certificates](16-troubleshooting.md#troubleshooting-cluster-ssl-certificate-verification).
 
+#### <a id="troubleshooting-cluster-unauthenticated-clients"></a> Cluster Troubleshooting Unauthenticated Clients
 
 Unauthenticated nodes are able to connect required by the
 [CSR auto-signing](10-icinga2-client.md#csr-autosigning-requirements) functionality.
 
-    [2015-06-10 03:28:11 +0200] information/ApiListener: New client connection for identity 'icinga-client' (unauthenticated)
+Master:
 
-If this message does not go away, make sure to verify the client's certificate and
-its received `ca.crt` in `/etc/icinga2/pki` (both master and client).
+    [2015-07-13 18:29:25 +0200] information/ApiListener: New client connection for identity 'icinga-client' (unauthenticated)
 
-    # openssl verify -verbose -CAfile ca.crt nbmif.int.netways.de.crt
-    nbmif.int.netways.de.crt: OK
+Client as command execution bridge:
 
+    [2015-07-13 18:29:26 +1000] notice/ApiEvents: Discarding 'execute command' message from 'icinga-master': Invalid endpoint origin (client not allowed).
+
+If these messages do not go away, make sure to [verify the master and client certificates](16-troubleshooting.md#troubleshooting-cluster-ssl-certificate-verification).
+
+#### <a id="troubleshooting-cluster-ssl-certificate-verification"></a> Cluster Troubleshooting SSL Certificate Verification
+
+Make sure to verify the client's certificate and its received `ca.crt` in `/etc/icinga2/pki` and ensure that
+both instances are signed by the **same CA**.
+
+    # openssl verify -verbose -CAfile /etc/icinga2/pki/ca.crt /etc/icinga2/pki/icinga2-node1.localdomain.crt
+    icinga2-node1.localdomain.crt: OK
+
+    # openssl verify -verbose -CAfile /etc/icinga2/pki/ca.crt /etc/icinga2/pki/icinga2-node2.localdomain.crt
+    icinga2-node2.localdomain.crt: OK
+
+Fetch the `ca.crt` file from the client node and compare it to your master's `ca.crt` file:
+
+    # scp icinga2-node2:/etc/icinga2/pki/ca.crt test-client-ca.crt
+    # diff -ur /etc/icinga2/pki/ca.crt test-client-ca.crt
+
+On SLES11 you'll need to use the `openssl1` command instead of `openssl`.
 
 ### <a id="troubleshooting-cluster-message-errors"></a> Cluster Troubleshooting Message Errors
 
@@ -255,8 +281,8 @@ At some point, when the network connection is broken or gone, the Icinga 2 insta
 will be disconnected. If the connection can't be re-established between zones and endpoints,
 they remain in a Split-Brain-mode and history may differ.
 
-Although the Icinga 2 cluster protocol stores historical events in a replay log for later synchronisation,
-you should make sure to check why the network connection failed.
+Although the Icinga 2 cluster protocol stores historical events in a [replay log](16-troubleshooting.md#troubleshooting-cluster-replay-log)
+for later synchronisation, you should make sure to check why the network connection failed.
 
 ### <a id="troubleshooting-cluster-command-endpoint-errors"></a> Cluster Troubleshooting Command Endpoint Errors
 
@@ -266,18 +292,32 @@ as well as inside an [High-Availability cluster](12-distributed-monitoring-ha.md
 There is no cli command for manually executing the check, but you can verify
 the following (e.g. by invoking a forced check from the web interface):
 
-* `icinga2.log` contains connection and execution errors
- * `CheckCommand` definition not found on the remote client
- * Referenced check plugin not found on the remote client
- * Runtime warnings and errors, e.g. unresolved runtime macros or configuration problems
-* Specific error messages are also populated into `UNKNOWN` check results including a detailed error message in their output
-
+* `/var/log/icinga2/icinga2.log` contains connection and execution errors.
+ * The ApiListener is not enabled to [accept commands](10-icinga2-client.md#clients-as-command-execution-bridge).
+ * `CheckCommand` definition not found on the remote client.
+ * Referenced check plugin not found on the remote client.
+ * Runtime warnings and errors, e.g. unresolved runtime macros or configuration problems.
+* Specific error messages are also populated into `UNKNOWN` check results including a detailed error message in their output.
+* More verbose logs are found inside the [debug log](16-troubleshooting.md#troubleshooting-enable-debug-output).
 
 ### <a id="troubleshooting-cluster-config-sync"></a> Cluster Troubleshooting Config Sync
 
 If the cluster zones do not sync their configuration, make sure to check the following:
 
 * Within a config master zone, only one configuration master is allowed to have its config in `/etc/icinga2/zones.d`.
-** The master syncs the configuration to `/var/lib/icinga2/api/zones/` during startup and only syncs valid configuration to the other nodes
-** The other nodes receive the configuration into `/var/lib/icinga2/api/zones/`
-* The `icinga2.log` log file will indicate whether this ApiListener [accepts config](12-distributed-monitoring-ha.md#zone-config-sync-permissions), or not
+** The master syncs the configuration to `/var/lib/icinga2/api/zones/` during startup and only syncs valid configuration to the other nodes.
+** The other nodes receive the configuration into `/var/lib/icinga2/api/zones/`.
+* The `icinga2.log` log file in `/var/log/icinga2` will indicate whether this ApiListener
+[accepts config](12-distributed-monitoring-ha.md#zone-config-sync-permissions), or not.
+
+### <a id="troubleshooting-cluster-replay-log"></a> Cluster Troubleshooting Replay Log
+
+If your `/var/lib/icinga2/api/log` directory grows, it generally means that your cluster
+cannot replay the log on connection loss and re-establishment.
+
+Check the following:
+
+* All clients are connected? (e.g. [cluster health check](12-distributed-monitoring-ha.md#cluster-health-check)).
+* Check your [connection](16-troubleshooting.md#troubleshooting-cluster-connection-errors) in general.
+* Does the log replay work, e.g. are all events processed and the directory gets cleared up over time?
+* Decrease the `log_duration` attribute value for that specific [endpoint](6-object-types.md#objecttype-endpoint).
diff --git a/doc/22-appendix.md b/doc/22-appendix.md
index a2c6735..aaea1e5 100644
--- a/doc/22-appendix.md
+++ b/doc/22-appendix.md
@@ -161,7 +161,7 @@ database schema available on [http://docs.icinga.org/latest/en/db_model.html]
 
 Icinga 2 specific extensions are shown below:
 
-New tables: `endpoints`, `endpointstatus`
+New table: `endpointstatus`
 
   Table               | Column             | Type     | Default | Description
   --------------------|--------------------|----------|---------|-------------
@@ -169,6 +169,8 @@ New tables: `endpoints`, `endpointstatus`
   endpoints           | identity           | TEXT     | NULL    | endpoint name
   endpoints           | node               | TEXT     | NULL    | local node name
 
+New table: `endpointstatus`
+
   Table               | Column             | Type     | Default | Description
   --------------------|--------------------|----------|---------|-------------
   endpointstatus      | endpoint_object_id | bigint   | NULL    | FK: objects table
diff --git a/icinga2.nuspec b/icinga2.nuspec
index 754f52a..b72e458 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.3.6</version>
+    <version>2.3.7</version>
     <authors>2015 - 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 c9c0edf..4a40696 100644
--- a/icinga2.spec
+++ b/icinga2.spec
@@ -66,7 +66,7 @@
 
 Summary: Network monitoring application
 Name: icinga2
-Version: 2.3.6
+Version: 2.3.7
 Release: %{revision}%{?dist}
 License: GPL-2.0+
 Group: Applications/System
diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp
index 7ce6d4b..abfffce 100644
--- a/lib/base/scriptutils.cpp
+++ b/lib/base/scriptutils.cpp
@@ -110,6 +110,7 @@ Array::Ptr ScriptUtils::Union(const std::vector<Value>& arguments)
 		Array::Ptr arr = varr;
 
 		if (arr) {
+			ObjectLock olock(arr);
 			BOOST_FOREACH(const Value& value, arr) {
 				values.insert(value);
 			}
@@ -139,7 +140,10 @@ Array::Ptr ScriptUtils::Intersection(const std::vector<Value>& arguments)
 	Array::Ptr arr1 = arg1->ShallowClone();
 
 	for (std::vector<Value>::size_type i = 1; i < arguments.size(); i++) {
-		std::sort(arr1->Begin(), arr1->End());
+		{
+			ObjectLock olock(arr1);
+			std::sort(arr1->Begin(), arr1->End());
+		}
 
 		Array::Ptr arg2 = arguments[i];
 
@@ -147,11 +151,19 @@ Array::Ptr ScriptUtils::Intersection(const std::vector<Value>& arguments)
 			return result;
 
 		Array::Ptr arr2 = arg2->ShallowClone();
-		std::sort(arr2->Begin(), arr2->End());
+		{
+			ObjectLock olock(arr2);
+			std::sort(arr2->Begin(), arr2->End());
+		}
 
 		result->Resize(std::max(arr1->GetLength(), arr2->GetLength()));
-		Array::Iterator it = std::set_intersection(arr1->Begin(), arr1->End(), arr2->Begin(), arr2->End(), result->Begin());
-		result->Resize(it - result->Begin());
+		Array::SizeType len;
+		{
+			ObjectLock olock(arr1), xlock(arr2), ylock(result);
+			Array::Iterator it = std::set_intersection(arr1->Begin(), arr1->End(), arr2->Begin(), arr2->End(), result->Begin());
+			len = it - result->Begin();
+		}
+		result->Resize(len);
 		arr1 = result;
 	}
 
diff --git a/lib/config/config_parser.yy b/lib/config/config_parser.yy
index f84d4d5..611dae1 100644
--- a/lib/config/config_parser.yy
+++ b/lib/config/config_parser.yy
@@ -456,6 +456,7 @@ object:
 	{
 		context->m_ObjectAssign.push(true);
 		context->m_SeenAssign.push(false);
+		context->m_SeenIgnore.push(false);
 		context->m_Assign.push(NULL);
 		context->m_Ignore.push(NULL);
 	}
@@ -473,6 +474,9 @@ object:
 		bool seen_assign = context->m_SeenAssign.top();
 		context->m_SeenAssign.pop();
 
+		bool seen_ignore = context->m_SeenIgnore.top();
+		context->m_SeenIgnore.pop();
+
 		Expression *ignore = context->m_Ignore.top();
 		context->m_Ignore.pop();
 
@@ -491,6 +495,9 @@ object:
 				filter = new LogicalAndExpression(assign, rex, DebugInfoRange(@2, @5));
 			} else
 				filter = assign;
+		} else if (seen_ignore) {
+			if (!ObjectRule::IsValidSourceType(type))
+				BOOST_THROW_EXCEPTION(ScriptError("object rule 'ignore' cannot be used for type '" + type + "'", DebugInfoRange(@2, @4)));
 		}
 
 		$$ = new ObjectExpression(abstract, type, $4, filter, context->GetZone(), $5, $6, DebugInfoRange(@2, @5));
@@ -600,6 +607,8 @@ lterm: type
 		if ((context->m_Apply.empty() || !context->m_Apply.top()) && (context->m_ObjectAssign.empty() || !context->m_ObjectAssign.top()))
 			BOOST_THROW_EXCEPTION(ScriptError("'ignore' keyword not valid in this context.", @$));
 
+		context->m_SeenIgnore.top() = true;
+
 		if (context->m_Ignore.top())
 			context->m_Ignore.top() = new LogicalOrExpression(context->m_Ignore.top(), $3, @$);
 		else
@@ -1041,6 +1050,7 @@ apply:
 	{
 		context->m_Apply.push(true);
 		context->m_SeenAssign.push(false);
+		context->m_SeenIgnore.push(false);
 		context->m_Assign.push(NULL);
 		context->m_Ignore.push(NULL);
 		context->m_FKVar.push("");
diff --git a/lib/config/configcompiler.hpp b/lib/config/configcompiler.hpp
index b1f7697..e3b692c 100644
--- a/lib/config/configcompiler.hpp
+++ b/lib/config/configcompiler.hpp
@@ -130,6 +130,7 @@ public:
 	std::stack<bool> m_Apply;
 	std::stack<bool> m_ObjectAssign;
 	std::stack<bool> m_SeenAssign;
+	std::stack<bool> m_SeenIgnore;
 	std::stack<Expression *> m_Assign;
 	std::stack<Expression *> m_Ignore;
 	std::stack<String> m_FKVar;
diff --git a/lib/db_ido/dbconnection.cpp b/lib/db_ido/dbconnection.cpp
index 4cb7333..c5948cf 100644
--- a/lib/db_ido/dbconnection.cpp
+++ b/lib/db_ido/dbconnection.cpp
@@ -410,8 +410,8 @@ void DbConnection::PrepareDatabase(void)
 	//ClearConfigTable("contactstatus");
 	ClearConfigTable("customvariables");
 	ClearConfigTable("customvariablestatus");
-	ClearConfigTable("endpoints");
-	ClearConfigTable("endpointstatus");
+	//ClearConfigTable("endpoints");
+	//ClearConfigTable("endpointstatus");
 	ClearConfigTable("host_contactgroups");
 	ClearConfigTable("host_contacts");
 	ClearConfigTable("host_parenthosts");
diff --git a/lib/icinga/macroprocessor.cpp b/lib/icinga/macroprocessor.cpp
index 177ef9d..e6a7225 100644
--- a/lib/icinga/macroprocessor.cpp
+++ b/lib/icinga/macroprocessor.cpp
@@ -278,10 +278,11 @@ Value MacroProcessor::InternalResolveMacros(const String& str, const ResolverLis
 				}
 
 				resolved_macro = resolved_arr;
-			} else
+			} else if (resolved_macro.IsString()) {
 				resolved_macro = InternalResolveMacros(resolved_macro,
 					resolvers, cr, missingMacro, EscapeCallback(), Dictionary::Ptr(),
 					false, recursionLevel + 1);
+			}
 		}
 
 		if (!useResolvedMacros && found && resolvedMacros)
@@ -290,7 +291,12 @@ Value MacroProcessor::InternalResolveMacros(const String& str, const ResolverLis
 		if (escapeFn)
 			resolved_macro = escapeFn(resolved_macro);
 
-		/* we're done if the value is an array */
+		/* we're done if this is the only macro and there are no other non-macro parts in the string */
+		if (pos_first == 0 && pos_second == str.GetLength() - 1)
+			return resolved_macro;
+		else if (resolved_macro.IsObjectType<Array>())
+				BOOST_THROW_EXCEPTION(std::invalid_argument("Mixing both strings and non-strings in macros is not allowed."));
+
 		if (resolved_macro.IsObjectType<Array>()) {
 			/* don't allow mixing strings and arrays in macro strings */
 			if (pos_first != 0 || pos_second != str.GetLength() - 1)
diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp
index 4204227..ea55fa4 100644
--- a/lib/remote/apilistener.cpp
+++ b/lib/remote/apilistener.cpp
@@ -367,58 +367,47 @@ void ApiListener::ApiTimerHandler(void)
 		}
 	}
 
-	if (IsMaster()) {
-		Zone::Ptr my_zone = Zone::GetLocalZone();
+	Zone::Ptr my_zone = Zone::GetLocalZone();
+
+	BOOST_FOREACH(const Zone::Ptr& zone, DynamicType::GetObjectsByType<Zone>()) {
+		/* only connect to endpoints in a) the same zone b) our parent zone c) immediate child zones */
+		if (my_zone != zone && my_zone != zone->GetParent() && zone != my_zone->GetParent()) {
+			Log(LogDebug, "ApiListener")
+			    << "Not connecting to Zone '" << zone->GetName() << "' because it's not in the same zone, a parent or a child zone.";
+			continue;
+		}
 
-		BOOST_FOREACH(const Zone::Ptr& zone, DynamicType::GetObjectsByType<Zone>()) {
-			/* only connect to endpoints in a) the same zone b) our parent zone c) immediate child zones */
-			if (my_zone != zone && my_zone != zone->GetParent() && zone != my_zone->GetParent()) {
+		BOOST_FOREACH(const Endpoint::Ptr& endpoint, zone->GetEndpoints()) {
+			/* don't connect to ourselves */
+			if (endpoint->GetName() == GetIdentity()) {
 				Log(LogDebug, "ApiListener")
-				    << "Not connecting to Zone '" << zone->GetName() << "' because it's not in the same zone, a parent or a child zone.";
+				    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because that's us.";
 				continue;
 			}
 
-			bool connected = false;
-
-			BOOST_FOREACH(const Endpoint::Ptr& endpoint, zone->GetEndpoints()) {
-				if (endpoint->IsConnected()) {
-					connected = true;
-					break;
-				}
+			/* don't try to connect to endpoints which don't have a host and port */
+			if (endpoint->GetHost().IsEmpty() || endpoint->GetPort().IsEmpty()) {
+				Log(LogDebug, "ApiListener")
+				    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because the host/port attributes are missing.";
+				continue;
 			}
 
-			/* don't connect to an endpoint if we already have a connection to the zone */
-			if (connected) {
+			/* don't try to connect if there's already a connection attempt */
+			if (endpoint->GetConnecting()) {
 				Log(LogDebug, "ApiListener")
-				    << "Not connecting to Zone '" << zone->GetName() << "' because we're already connected to it.";
+				    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because we're already trying to connect to it.";
 				continue;
 			}
 
-			BOOST_FOREACH(const Endpoint::Ptr& endpoint, zone->GetEndpoints()) {
-				/* don't connect to ourselves */
-				if (endpoint->GetName() == GetIdentity()) {
-					Log(LogDebug, "ApiListener")
-					    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because that's us.";
-					continue;
-				}
-
-				/* don't try to connect to endpoints which don't have a host and port */
-				if (endpoint->GetHost().IsEmpty() || endpoint->GetPort().IsEmpty()) {
-					Log(LogDebug, "ApiListener")
-					    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because the host/port attributes are missing.";
-					continue;
-				}
-
-				/* don't try to connect if there's already a connection attempt */
-				if (endpoint->GetConnecting()) {
-					Log(LogDebug, "ApiListener")
-					    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because we're already trying to connect to it.";
-					continue;
-				}
-
-				boost::thread thread(boost::bind(&ApiListener::AddConnection, this, endpoint));
-				thread.detach();
+			/* don't try to connect if we're already connected */
+			if (endpoint->IsConnected()) {
+				Log(LogDebug, "ApiListener")
+				    << "Not connecting to Endpoint '" << endpoint->GetName() << "' because we're already connected to it.";
+				continue;
 			}
+
+			boost::thread thread(boost::bind(&ApiListener::AddConnection, this, endpoint));
+			thread.detach();
 		}
 	}
 
diff --git a/tools/chocolateyInstall.ps1 b/tools/chocolateyInstall.ps1
index cfd163d..07b63a7 100755
--- a/tools/chocolateyInstall.ps1
+++ b/tools/chocolateyInstall.ps1
@@ -1,6 +1,6 @@
 $packageName = 'icinga2'
 $installerType = 'exe'
-$url = 'http://packages.icinga.org/windows/Icinga2-v2.3.6.exe'
+$url = 'http://packages.icinga.org/windows/Icinga2-v2.3.7.exe'
 $silentArgs = '/S'
 $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