Edgar Fuß
3b4dc854cf
Put running downtimes in effect
...
If Icinga2 was restarted with a newly configured downtime that should
be in effect at the time of restart, the should-be-running segment of
it was not put into effect.
Add new LegacyTimePeriod::FindRunningSegment() and
ScheduledDowntime::FindRunningSegment() functions, call the latter in
ScheduledDowntime::CreateNextDowntime() before trying the old
ScheduledDowntime::FindNextSegment().
2018-12-05 16:00:28 +01:00
Edgar Fuß
e76ec0d42e
Remove spurious string in debug message
...
Remove a spurious " at " in the "Evaluating segment" debug message in ScheduledDowntime::FindNextSegment().
2018-12-05 15:59:58 +01:00
Edgar Fuß
ce6ab9a948
Remove dead code
...
Remove some dead code in ScheduledDowntime::CreateNextDowntime().
2018-12-05 15:59:52 +01:00
Alexander A. Klimov
f3f402fa7e
Socket engine: drop life support objects
...
refs #6477
2018-12-05 15:59:29 +01:00
Alexander A. Klimov
ad06c4f5ab
Make SocketEventDescriptor#EventInterface a SocketEvents::Ptr
...
refs #6477
2018-12-05 15:59:23 +01:00
Alexander A. Klimov
0b03a3d8f8
SocketEvents: inherit from Stream
...
refs #6477
2018-12-05 15:59:17 +01:00
Michael Friedrich
78e470996d
Only create downtimes from non-paused ScheduledDowntime objects in HA enabled cluster zones
2018-12-05 15:47:41 +01:00
Alexander A. Klimov
1d6cec5a99
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
...
refs #6816
2018-12-05 15:46:32 +01:00
Alexander A. Klimov
797ecd1539
ThreadPool#Stop(): discard non-processed queue items
2018-12-05 15:46:03 +01:00
Michael Friedrich
1c8fba182c
Add a code comment for connection: close handling
2018-12-05 15:45:17 +01:00
Sven Wegener
080f666b55
Restore 'Connection: close' behaviour in HTTP responses
...
Actually the `corked` functionality caused problems with
not closing connections properly.
Full Analysis: https://github.com/Icinga/icinga2/issues/6799#issuecomment-443710338
Full credits to @swegener :)
fixes #6799
2018-12-05 15:45:09 +01:00
Michael Friedrich
0046dcad7b
DB IDO: Don't enqueue queries when the feature is paused (HA)
...
fixes #5876
refs #6739
2018-11-13 12:01:50 +01:00
Michael Insel
f4f2d862e6
Fix deadlock in GraphiteWriter
...
This fixes a deadlock in the GraphiteWriter feature, which is visible
during the reload process. The reload thread waits for the
GraphiteWriter to finish, but the GraphiteWriter can't finish because
it's stuck in `SendMetric()` waiting for a lock which is hold by the
reload thread.
2018-11-13 09:13:55 +01:00
Michael Friedrich
b3e98a842f
Fix possible double free in StreamLogger::BindStream()
...
refs #6737
2018-11-12 17:07:51 +01:00
Michael Friedrich
46ed01348c
Ensure that API/JSON-RPC messages in the same session are processed and not stalled
...
This basically drops the "corked" implementation which just stalled the
TLS IO polling after some requests. If you need sort of rate limiting
for these events, use an external TLS proxy which terminates that in front
of Icinga.
fixes #6635
2018-11-12 17:07:38 +01:00
Michael Friedrich
ec939373d0
Improve error handling for invalid child_options for API downtime actions
...
fixes #6712
2018-10-29 13:52:43 +01:00
Michael Friedrich
4424b203c2
Minor styleguide
2018-10-29 13:51:25 +01:00
Max Rosin
d8462cf6cd
Fix the Icinga2 version check for versions with more than 5 characters
...
The previous implementation assumed that every version number will have
5 characters. With the release of 2.10.0 this does not work anymore.
The new implementation extracts everything from the second character to
the first dash. This should work as long as the version string is in a
format like 'v2.10.1-8-gaebe6da'.
fixes Icinga#6703
2018-10-29 13:51:09 +01:00
Michael Friedrich
30853e6041
Revert code from icinga.com update
2018-10-24 12:34:38 +02:00
Michael Friedrich
fac43e9eaf
Fix regression for wrong objects.cache path overwriting icinga2.debug file
...
The 'statusdata' feature is deprecated, although it affects 'object list'.
fixes #6705
refs #6707
2018-10-19 12:31:24 +02:00
Michael Friedrich
3cb2c1d143
icinga.com: Update everything else
2018-10-18 09:50:53 +02:00
Michael Friedrich
a2cb542a2e
icinga.com: Update '*.sql'
2018-10-18 09:41:54 +02:00
Michael Friedrich
eabea68c56
icinga.com: Update config files (ITL, etc.)
2018-10-18 09:37:59 +02:00
Michael Friedrich
dea5ec614e
icinga.com: Update CMakeLists.txt
2018-10-18 09:35:18 +02:00
Michael Friedrich
44c3b83769
icinga.com: Update '*.ti'
2018-10-18 09:30:00 +02:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Friedrich
af6c8a1f50
Add missing shutdown/program state dumps for SIGUSR2 reload handler
...
Credits to @west0rmann finding the issue and providing the initial fix.
fixes #6689
fixes #6592
2018-10-16 12:36:43 +02:00
Michael Friedrich
34de8104b8
Fix regression with API permission filters and namespaces in v2.10
...
fixes #6682
2018-10-15 15:47:11 +02:00
Michael Friedrich
43a571e013
Don't throw an error when namespace indexers don't find a valid key
...
Examples:
```
globals["abc"]
globals.def
```
The patch for the Icinga Director unfortunately only solves the
master, and as discussed with @lippserd we need to ensure that
satellites and clients with 2.10 can be restarted without any errors
from deployed configuration.
refs #6509
refs icinga/icingaweb2-module-director#1654
2018-10-11 12:42:56 +02:00
Michael Friedrich
4be9f418a9
Revert "Initialize Socket Event Engine on application startup"
...
This reverts commit c8dcd1297f
.
We cannot do this during application startup, since Daemonize()
kills the threads again.
refs #6514
refs #6630
2018-10-09 19:38:29 +02:00
Michael Friedrich
85e161ea1e
Silence config compiler logging for runtime created objects
...
This is especially problematic with many single creation requests,
e.g. many downtimes created via Icinga Web 2 & the REST API.
In addition to the config compiler messages, apply rule matches are
also in there which are removed by this patch.
2018-10-09 16:41:17 +02:00
Michael Friedrich
e6eb703b36
Merge pull request #6661 from Icinga/bugfix/cache-http-peer-address
...
Cache the peer address in the HTTP server
2018-10-09 16:00:27 +02:00
Michael Friedrich
5c32a5a7dc
Cache the peer address in the HTTP server
...
Later socket calls are expensive and might lead
into a race condition on close when logging it.
refs #6655
2018-10-09 15:40:16 +02:00
Michael Friedrich
58cfc3955d
Merge pull request #6658 from Icinga/bugfix/api-connection-close-req-by-client
...
Ensure that HTTP/1.0 or 'Connection: close' headers are properly disconnecting the client
2018-10-09 13:49:22 +02:00
Michael Friedrich
9352f4bfb3
Merge pull request #6657 from Icinga/feature/api-debug-log-request-body
...
Enable the HTTP request body debug log entry for release builds
2018-10-09 13:29:00 +02:00
Michael Friedrich
13239c3172
Ensure that HTTP/1.0 or Connection: close headers are properly disconnecting the client
...
Test results: https://github.com/Icinga/icinga2/issues/6514#issuecomment-428155731
fixes #6514
2018-10-09 13:23:23 +02:00
Michael Friedrich
73263b7702
Enable the HTTP request body debug log entry for release builds
...
fixes #4282
2018-10-09 12:55:53 +02:00
Michael Friedrich
57081176de
Improve logging for disconnected HTTP clients
...
Previously this was inside the debug log, with the
new socket printers we can enhance checking for proper
connects and disconnects.
refs #6514
2018-10-09 12:22:19 +02:00
Michael Friedrich
051b3ba9b7
Merge pull request #6503 from peteeckel/fix/reduce-loglevel-plugin-env-6460
...
Reduce the log level for missing env macros to debug
2018-10-08 14:09:18 +02:00
Alexander A. Klimov
6d114b16e4
node setup: always respect --accept-config and --accept-commands
2018-10-01 16:33:50 +02:00
Michael Friedrich
617925374b
Fix that check_timeout was used for Event/Notification commands too
...
We may add specific timeouts for event/notification commands
later, for now the original timeout inside the EventCommand/NotificationCommand
is used.
fixes #6304
2018-09-28 14:32:57 +02:00
Michael Friedrich
7acf3689a7
Merge pull request #6642 from Icinga/bugfix/concurrent-checks-constant
...
Allow to override MaxConcurrentChecks constant
2018-09-28 09:34:53 +02:00
Michael Friedrich
82178e3b33
Don't inherit daemonize parameter from parent process
2018-09-27 20:30:19 +02:00
Thomas Forrer
816cae98fa
Fix config validation problem (startup.log) during /v1/config/stages API call
...
copy all arguments of parent process in AsyncTryActivateStage
2018-09-27 20:27:09 +02:00
Michael Friedrich
96c0de9bea
Allow to override MaxConcurrentChecks constant
2018-09-27 20:23:00 +02:00
Michael Friedrich
64e273afdd
Merge pull request #6639 from Icinga/fix/windows-api-log-rename
...
Ensure to _unlink before renaming replay log on Windows
2018-09-27 08:02:00 +02:00
Jordi van Scheijen
bc1dc9c7a7
Fix issue 5022
2018-09-27 07:52:37 +02:00
Michael Friedrich
c979f86e4e
Merge pull request #6632 from Icinga/feature/cluster-faster-reconnect
...
Increase the cluster reconnect frequency to 10s
2018-09-25 17:07:01 +02:00
Michael Friedrich
cbde35ff22
Use a dynamic thread pool for API connections
...
The full analysis is located in #6517 .
fixes #6517
2018-09-25 12:43:10 +02:00
Michael Friedrich
cd819f74f4
Increase the cluster reconnect frequency to 10s
...
This is blocked by #6517 .
refs #6234
2018-09-25 12:36:30 +02:00