Commit Graph

3173 Commits

Author SHA1 Message Date
Gunnar Beutner 796884343b Another build fix for Win64
refs #11462
2016-03-29 08:42:02 +02:00
Gunnar Beutner b863a84471 Build fix for Win64
refs #11462
2016-03-29 07:54:41 +02:00
Gunnar Beutner 5de9a988d9 Improve validation for arrays
fixes #11434
2016-03-24 09:15:39 +01:00
Michael Friedrich 0447e81d99 Ensure that the legacy_id attribute for comment/downtime objects is restored on restart
This has been changed when moving comments/downtimes to config objects
in 050c520b2a

It may cause trouble with DB IDO DELETE and UPDATE statements
depending on the old value.

refs #11382
2016-03-23 14:05:09 +01:00
Michael Friedrich 98e1d70dab DB IDO: Fix that downtime is not in effect after restart
fixes #10843
2016-03-23 13:42:00 +01:00
Gunnar Beutner 0e18acbf9d Don't use semi-colons in auto-generated config files
fixes #11438
2016-03-23 09:29:27 +01:00
Gunnar Beutner b621b00e3a Detect infinite recursion in the zone hierarchy graph
fixes #10937
2016-03-23 09:03:53 +01:00
Gunnar Beutner 6ba0c5fe01 Implement recursion limit for AST expressions which don't use a separate stack frame
fixes #11106
2016-03-23 09:03:49 +01:00
Gunnar Beutner 71060be89a Follow symlinks in Utility::GlobRecursive
fixes #11347
2016-03-22 08:22:11 +01:00
Michael Friedrich 67b7df3189 DB IDO: Fix user notification type filters
fixes #10766
2016-03-15 14:50:43 +01:00
Michael Friedrich a30cb86ca1 Only call UpdateNextCheck() for soft states
refs #11336
2016-03-15 14:02:19 +01:00
Michael Friedrich d682f56c38 Use UpdateNextCheck() for determining the retry_interval in ProcessCheckResult()
This patch also moves the next check updates for passive
check results into ProcessCheckResult(). That way the
next check status updates for DB IDO work in a sane way
again.

refs #11336
2016-03-15 13:02:38 +01:00
Michael Friedrich 3bd6848763 Refactor patch for host recovery notifications
refs #10225
2016-03-15 09:47:59 +01:00
Gunnar Beutner 4066ab730a Fix error handling for FeatureUtility::GetFeatures
fixes #11349
2016-03-14 08:45:12 +01:00
Gunnar Beutner a8ee6b2009 Fix crash in ScheduledDowntime::TimerProc
fixes #11352
2016-03-14 08:37:13 +01:00
Michael Friedrich 4746b214d6 Fix: Common name in node wizard isn't case sensitive
fixes #11159
2016-03-11 14:22:24 +01:00
Michael Friedrich 3e050bd0cd Fix: Volatile transitions from HARD NOT-OK->NOT-OK do not trigger notifications
fixes #11320
2016-03-11 13:19:03 +01:00
Michael Friedrich 7fb8bcd933 Use retry_interval on first OK -> NOT-OK state change
Only valid for active check results. The API actions were
missing that marker similar to the external command processor.

The initial OK -> NOT-OK transition should use the retry_interval
but nothing else.

fixes #11336
2016-03-11 12:00:30 +01:00
Michael Friedrich 5b6a6f86b1 Fix host recovery notifications for warning states
fixes  #10225
2016-03-11 09:29:07 +01:00
Michael Friedrich 65cbf04454 Fix: MkDirP supports '/' and '\' on Windows
fixes #10231
2016-03-07 09:22:07 +01:00
Julian Brost 7439633965 Fix max number of args for DEL_DOWNTIME_BY_HOST_NAME
The RegisterCommand call for DEL_DOWNTIME_BY_HOST_NAME was missing the
max args parameter. This prevented the optional service name, start time
and comment arguments to be passed.

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>

fixes #11240
2016-03-05 18:43:02 +01:00
Michael Friedrich ef532f20eb Revert "Fix check scheduling w/ retry_interval"
This reverts commit a51e647cc7.

This patch causes trouble with check results received
1) passively 2) throughout the cluster. A proper patch
for setting the retry_interval on NOT-OK state changes
is required.

refs #11248
refs #11257
refs #11273

(the old issue)
refs #7287
2016-03-05 18:16:49 +01:00
Michael Friedrich b8e3d61820 Revert "Properly set the next check time for active and passive checks"
This reverts commit 2a11b27972.

This patch does not properly work and breaks the check_interval setting
for passive checks. Requires a proper patch.

refs #11248
refs #11257
refs #11273

(the old issue)
refs #7287
2016-03-05 18:15:03 +01:00
Tobias von der Krone ce3062904f Use the server's preferred cipher for the API connection
When using SSL_OP_CIPHER_SERVER_PREFERENCE the server's preferred cipher
is used instead of the client preference, see
https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html

fixes #11290
2016-03-04 14:57:06 +01:00
Michael Friedrich d14477c242 Fix MkDirP() on Windows
fixes #10231
2016-03-03 15:54:35 +01:00
Gunnar Beutner 47521904c1 Attempt to fix race condition problem with epoll_ctl()
refs #11289
2016-03-03 13:38:13 +01:00
Jean Flach 9cdea730a3 Fix delete object handler returning incorrect status codes
Now a 200 OK only gets returned if all objects could be deleted

fixes #10770
2016-03-01 16:53:52 +01:00
Vytenis Darulis 6729679f38 Try to queue all PROCESS_FILE commands instead of exploding the stack
fixes #10426

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-02-24 23:25:22 +01:00
Michael Friedrich 894aaaecb1 Ensure that config files are readable by the daemon
refs #11212
refs #11211
2016-02-24 14:24:08 +01:00
Michael Friedrich 47c5425137 Fix permissions for temporary files
fixes #11212
fixes #11211
2016-02-24 11:00:44 +01:00
Michael Friedrich 272d9541be Fix wrong log message in 'node setup' cli command
fixes #11209
2016-02-23 16:55:45 +01:00
Sebastian Chrostek 83845e609e Fix problem notifications while flapping is active
fixes #9969
fixes #9642
2016-02-23 16:27:22 +01:00
Michael Friedrich 4cb5b97e52 Fix unique creation of temp files
fixes #10948
2016-02-23 12:30:59 +01:00
Gunnar Beutner 74d1d68893 Fix: "node setup" tries to chown() files before they're created
fixes #11204
2016-02-23 08:42:05 +01:00
Michael Friedrich 5b30c9ed2c DB IDO: PArtially revert change for *group_members
Otherwise the index breaks.

refs #11103
2016-02-22 20:23:18 +01:00
Gunnar Beutner bc6d82c560 Build fix for CentOS 5
fixes #11179
2016-02-22 08:12:35 +01:00
Gunnar Beutner 9a8458fd67 Rename the IOTHREADS macro
refs #11014
2016-02-16 13:30:55 +01:00
Michael Friedrich 04a4049a4d Increase query queue size for testing
refs #10963
2016-02-12 14:15:24 +01:00
Michael Friedrich c8a9f45697 ApiListener: Bail out if object could not be created during config sync
refs #11006
2016-02-12 14:15:24 +01:00
Adam James e04b70856b Fix parsing of YYYY-MM-DD in LegacyTimePeriod::ParseTimeSpec
fixes #11132

Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
2016-02-10 16:24:36 +01:00
Jean Flach 58a31e8166 Use ConfigWriter class in repositoryutility.cpp
refs #10989
2016-02-09 15:59:19 +01:00
Jean Flach 19134f41cf Fix client not closing connections
fixes #11122
2016-02-09 15:59:19 +01:00
Jean Flach fa1d633484 Rephrase some log messages
refs #11122
2016-02-09 15:59:19 +01:00
Gunnar Beutner 674badd3ce Build fix
fixes #11096
2016-02-09 13:56:17 +01:00
Gunnar Beutner 9e7da9837e Revert "Windows build fix"
This reverts commit f06f6d4d86.
2016-02-09 13:54:19 +01:00
Gunnar Beutner 90e241ca85 Fix: Cluster WQ thread dies after fork()
fixes #11118
2016-02-09 12:46:46 +01:00
Jean Flach 4d87c96d06 Refactor String-Escape in repositoryutility
fixes #10989
2016-02-09 09:38:12 +01:00
Gunnar Beutner 14d805e6fe Fix crash in ApiListener::ConfigUpdateObjectAPIHandler
fixes #11006
2016-02-09 09:13:43 +01:00
Jean Flach 393a6bf641 Remove unused variables
fixes #11111
2016-02-08 17:10:12 +01:00
Jean Flach 8dbd84daed Remove unused variable 2016-02-08 16:40:34 +01:00
Jean Flach 964cfcebd3 Make schedule-downtime default fixed
fixes #10923
2016-02-08 16:04:41 +01:00
Gunnar Beutner e224e74994 Make sure the "syncing" attribute is set to false
refs #11083
2016-02-08 13:15:24 +01:00
Michael Friedrich 99dbb249de DB IDO: Fix problem with hostgroup_members cleanup
fixes #11103
2016-02-08 11:05:27 +01:00
Gunnar Beutner 6d5014b610 Increase grace period for agent-based checks
refs #11020
2016-02-08 09:46:01 +01:00
Michael Friedrich 4049cc0b9a Fix: Deleting an object via API does not disable it in DB IDO
fixes #11065
2016-02-05 12:37:00 +01:00
Michael Friedrich f06f6d4d86 Windows build fix
fixes #11096
2016-02-05 10:55:16 +01:00
Michael Friedrich 3227186c7d Fix: API queries on non-existant objects cause exception
fixes #11088
2016-02-04 22:40:01 +01:00
Gunnar Beutner 611ff869e1 Implement support for epoll
refs #11014
2016-02-04 16:31:59 +01:00
Gunnar Beutner c06f6d7aeb Fix crash in ConfigItem::RunWithActivationContext
fixes #11085
2016-02-04 13:17:37 +01:00
Michael Friedrich 949b129c65 Ensure that config sync updates are always sent on reconnect
fixes #11083
2016-02-04 11:30:27 +01:00
Gunnar Beutner caf3380e73 Fix memory leak in Stream::Close
refs #10655
2016-02-03 13:02:49 +01:00
Gunnar Beutner 2dc385e31b Fix memory/thread leak in the HttpServerConnection class
fixes #10655
2016-02-03 09:54:31 +01:00
Gunnar Beutner fabf37e79c Improve performance for TlsStream::OnEvent
refs #11014
2016-02-02 13:51:17 +01:00
Gunnar Beutner f234bdd321 Fix crash in IdoCheckTask::ScriptFunc
refs #11014
2016-02-02 12:03:12 +01:00
Gunnar Beutner 532655d482 Use multiple threads for socket IO
refs #11014
2016-02-02 11:17:33 +01:00
Gunnar Beutner 3f95e86c73 Remove debug log message
refs #11014
2016-02-02 09:54:31 +01:00
Gunnar Beutner ecfaf019fd Avoid unnecessary pollfd updates
refs #11014
2016-02-02 09:52:23 +01:00
Gunnar Beutner 83889dcbb0 Increase the buffer size in TlsStream::OnEvent to avoid unnecessary poll() calls
refs #11014
2016-02-02 08:28:54 +01:00
Gunnar Beutner ec050dd2a7 Fix deadlock in HttpClientConnection::DataAvailableHandler
refs #11014
2016-02-01 14:50:18 +01:00
Gunnar Beutner e6a972f975 Fix incorrect memcpy() with overlapping buffers
refs #11014
2016-02-01 12:58:42 +01:00
Gunnar Beutner 98e104a773 Fix incorrect method call in JsonRpcConnection::MessageHandler
refs #11014
2016-02-01 11:25:34 +01:00
Gunnar Beutner c03e458e13 Avoid unnecessary new/deletes
refs #11014
2016-02-01 09:33:33 +01:00
Gunnar Beutner deac316a45 Fix deadlock in {HttpServerConnection,JsonRpcConnection}::DataAvailableHandler
refs #11014
2016-02-01 08:35:55 +01:00
Michael Friedrich c2cf614d62 Remove debug output, part 2
refs #11014
2016-01-29 14:09:50 +01:00
Michael Friedrich 7a3848af1e Remove debug output
refs #11014
2016-01-29 14:03:58 +01:00
Gunnar Beutner 6fc91a38eb Avoid unnecessary reallocs in FIFO::Optimize
refs #11014
2016-01-28 13:09:17 +01:00
Gunnar Beutner 56e7c24f1f Avoid unnecessary dictionary lookups in SocketEvents::ThreadProc
refs #11014
2016-01-28 13:07:09 +01:00
Gunnar Beutner fe421d76fb Remove debug output
refs #11014
2016-01-28 12:23:07 +01:00
Gunnar Beutner 4237c6eaaa Avoid unnecessary wake-ups in SocketEvents::ChangeEvents (part 2)
refs #11014
2016-01-28 11:55:31 +01:00
Gunnar Beutner 75f7fe10e1 Avoid unnecessary wake-ups in SocketEvents::ChangeEvents
refs #11014
2016-01-28 09:05:49 +01:00
Gunnar Beutner 3c76e70fe2 Avoid updating the file descriptor list for poll() unless we really need to
refs #11014
2016-01-28 08:24:33 +01:00
Gunnar Beutner fa7d0448f9 Decode cluster messages in the WorkQueue threads
refs #11014
2016-01-27 16:52:01 +01:00
Gunnar Beutner 9689223081 Use multiple WorkQueues to process cluster messages
refs #11014
2016-01-27 15:45:58 +01:00
Gunnar Beutner 54df0b74b6 Improve performance for ApiListener::RelayMessageOne
refs #11014
2016-01-27 13:39:31 +01:00
Gunnar Beutner 8c05003101 Improve the performance for ApiListener::SyncRelayMessage (part 2)
refs #11014
2016-01-27 12:18:16 +01:00
Gunnar Beutner 9ae1f1abee Improve performance for ApiListener::SyncRelayMessage
refs #11014
2016-01-27 08:43:20 +01:00
Michael Friedrich 22c21ebd61 Implement String#trim
fixes #11037
2016-01-26 16:01:14 +01:00
Gunnar Beutner 4185c75d8a Ignore the .timestamp file when determining whether the zone config has changed (second attempt)
refs #11014
2016-01-26 15:46:03 +01:00
Michael Friedrich 627814b8e7 Fix incorrect --version information
fixes #10784
2016-01-26 15:17:48 +01:00
Gunnar Beutner c5a003c162 Ignore the .timestamp file when determining whether the zone config has changed
refs #11014
2016-01-26 11:32:54 +01:00
Gunnar Beutner f3351bc80e Make sure the updated config sync works with old versions of Icinga 2
refs #11014
2016-01-26 10:46:27 +01:00
Gunnar Beutner 1eecc72093 Use MkDirP instead of MkDir when syncing zone configs
fixes #10932
2016-01-26 10:45:03 +01:00
Gunnar Beutner 980ce96910 Make sure the .timestamp file is synced for config updates
refs #11014
2016-01-26 09:04:26 +01:00
Gunnar Beutner 23edd6cb8f Add missing comment
refs #10988
2016-01-26 08:35:29 +01:00
Michael Friedrich d412a9055d Fix cluster config timestamp again
refs #11014
2016-01-25 15:49:32 +01:00
Michael Friedrich a4562fb433 Only set SSL_OP_NO_COMPRESSION if supported
OpenSSL 0.9.8 does not support this flag.

fixes #10988
2016-01-25 14:53:26 +01:00
Michael Friedrich a17419e8c2 Fix cluster config sync timestamp
refs #11014
2016-01-25 14:39:21 +01:00
Gunnar Beutner 8f53835c11 Make sure we only have one connection per satellite
refs #11014
2016-01-25 10:57:06 +01:00
Michael Friedrich b960850ce3 DB IDO: Only update 'next_check' column when manually scheduling a check
Otherwise the changes from #7287 already take care of setting
the proper next check time from inside ProcessCheckResult().

There is no need to use the generic OnNextCheckChanged signal
but instead we're using a new one, locally just for DB IDO.

fixes #11019
2016-01-22 18:42:15 +01:00
Michael Friedrich 2a11b27972 Properly set the next check time for active and passive checks
fixes #7287
refs #11019
2016-01-22 18:40:14 +01:00