Commit Graph

10712 Commits

Author SHA1 Message Date
Alexander A. Klimov 5151f6567e ThreadPool: use the Boost ASIO thread pool under the hood 2019-04-25 08:25:28 +02:00
Michael Friedrich 56894bea17 Buildfix
Obviously tired.

fixes #7138
fixes #7139
2019-04-24 12:10:57 +02:00
Michael Friedrich 268c8b395f
Merge pull request #7140 from Icinga/feature/docs-logrotate
Add log message for log rotate; update docs
2019-04-24 11:54:54 +02:00
Michael Friedrich df25b183cb Add log message for log rotate; update docs
refs #6737
2019-04-24 11:53:27 +02:00
Michael Friedrich f923ee34fb
Merge pull request #7004 from Icinga/bugfix/logrotate-6737
Timer::TimerThreadProc(): use C++11 lambda instead of bind()
2019-04-24 11:52:16 +02:00
Alexander A. Klimov 7a8f8fd734 Timer::TimerThreadProc(): use C++11 lambda instead of bind()
refs #6737
2019-04-24 11:51:17 +02:00
Michael Friedrich f747e6b405
Merge pull request #7130 from Icinga/bugfix/logrotate-issues-6737
StreamLogger#BindStream(): set #m_FlushLogTimer only if needed
2019-04-24 11:49:33 +02:00
Alexander A. Klimov 622f684124 StreamLogger#BindStream(): set #m_FlushLogTimer only if needed
refs #6737
2019-04-24 11:47:02 +02:00
Michael Friedrich ccbe9f7fbe
Merge pull request #7129 from Elias481/fix/logrotate-segfaults-6737
avoid incrementing Ptr which could be already be in destruction-phase
2019-04-24 11:45:16 +02:00
Elias Ohm 52e3db279a Fix for double-free (and possibly other memory-corruption related) crashes at logrotate time
this is a direct fix of the issue revealing the problem that leads to crash

verification done with a patched icinga2 where the execution-order of the code lines of counter-parts involved in re-incrementing/decrementing Timer:Ptr is forced to be the one that leads to the obeserverd segfaults

refs #6737
2019-04-24 11:42:54 +02:00
Michael Friedrich d0e94c8efc Docs: Fix formatting in object type chapter 2019-04-23 15:33:28 +02:00
Michael Friedrich 43e9ae5f8d
Merge pull request #7135 from Icinga/feature/boost-asio-elasticsearchwriter
Use new I/O engine in ElasticsearchWriter
2019-04-23 14:53:00 +02:00
Michael Friedrich 1ac693bf13
Merge pull request #7137 from Icinga/bugfix/disconnect-log-more-spam
JsonRpcConnection: reduce log spam on disconnect
2019-04-23 14:50:18 +02:00
Alexander A. Klimov 3f0066e33b Use new I/O engine in ElasticsearchWriter 2019-04-23 14:33:19 +02:00
Michael Friedrich 856877d1fe
Merge pull request #7134 from Icinga/feature/boost-asio-influxdbwriter
Use new I/O engine in InfluxdbWriter
2019-04-23 14:31:42 +02:00
Michael Friedrich 0f804d126b
Merge pull request #7133 from Icinga/feature/boost-asio-pki
Use new I/O engine in PkiUtility::FetchCert() and PkiUtility::RequestCertificate()
2019-04-23 14:27:48 +02:00
Alexander A. Klimov a6cd3e65cb JsonRpcConnection: reduce log spam on disconnect 2019-04-23 14:09:07 +02:00
Michael Friedrich 0bd1d9a6f8 Quickfix technical docs for debugging 2019-04-23 13:48:07 +02:00
Michael Friedrich 20d51d21dc
Merge pull request #7127 from Icinga/bugfix/replay-log
ApiListener#RotateLogFile(): don't overwrite previous log
2019-04-23 12:08:12 +02:00
Michael Friedrich 5fb191bbeb
Merge pull request #7126 from Icinga/bugfix/replay-logs-6932
ApiListener#ApiTimerHandler(): delete all replayed logs
2019-04-23 12:07:02 +02:00
Alexander A. Klimov 14fdfff770 Use new I/O engine in InfluxdbWriter 2019-04-23 11:59:37 +02:00
Michael Friedrich dee8fbf248
Merge pull request #7128 from Icinga/feature/re-write-objectlock-7123
Re-write ObjectLock's implementation details
2019-04-23 11:53:40 +02:00
Alexander A. Klimov c1fa07899c Introduce OptionalTlsStream 2019-04-23 11:25:26 +02:00
Alexander A. Klimov 407e77883c ApiListener#ReplayLog(): read current log file too instead of rotating 2019-04-18 17:22:36 +02:00
Alexander A. Klimov 997d84bfa0 ApiListener#RotateLogFile(): don't overwrite previous log 2019-04-18 17:22:33 +02:00
Alexander A. Klimov 9b489cf9b9 ApiListener#ApiTimerHandler(): delete all replayed logs
refs #6932
2019-04-18 17:00:40 +02:00
Alexander A. Klimov d8c9fdf1d4 Make Object#m_Mutex std::recursive_mutex
refs #7123
2019-04-17 18:26:29 +02:00
Alexander A. Klimov 7e6868bc99 Make Object#m_LockOwner std::atomic<std:🧵:id>
refs #7123
2019-04-17 18:26:23 +02:00
Alexander A. Klimov f9f998334d ObjectLock: deduplicate constructors
refs #7123
2019-04-17 16:47:41 +02:00
Alexander A. Klimov f44e847717 Rotate replay log on shutdown, not on startup 2019-04-17 14:18:20 +02:00
Michael Friedrich 02db12ae02
Merge pull request #7050 from Icinga/feature/previous-state-change
Implement previous_state_change
2019-04-17 13:17:41 +02:00
Michael Friedrich 3665430005
Merge pull request #7112 from Icinga/bugfix/service-handled
Include host state in Service#handled and Service#severity
2019-04-17 13:16:23 +02:00
Michael Friedrich 64568f5966
Merge pull request #7121 from Icinga/bugfix/concurrent-checks
Fix that MaxConcurrentChecks constant is overridden from 'checker' feature
2019-04-17 13:14:32 +02:00
Michael Friedrich ab97d606db
Merge pull request #7122 from Icinga/bugfix/evaluatefilter-change-globals
FilterUtility::EvaluateFilter(): ensure not to modify the global namespace
2019-04-16 17:40:20 +02:00
Alexander A. Klimov 5afda77943 Namespace: place ObjectLock in all methods 2019-04-16 17:38:58 +02:00
Michael Friedrich ecbfdc2732
Merge pull request #7113 from Elias481/fix/incorrect-usage-of-global-namespace-6874-6785
use dedicated permissions namespace for scriptframe in filterutility
2019-04-16 16:02:16 +02:00
Alexander A. Klimov bdadb53940 FilterUtility::EvaluateFilter(): ensure not to modify the global namespace 2019-04-16 15:53:44 +02:00
Michael Friedrich b906714254 Fix that MaxConcurrentChecks constant is overridden from 'checker' feature
Note: This drops the deprecated concurrent_checks setting from the checker feature
entirely and refactors the underlaying code handling.

Also affects ReloadTimeout which is new for 2.11.

fixes #7111
2019-04-16 15:04:57 +02:00
Michael Friedrich ab9b4b7786
Merge pull request #7120 from Icinga/bugfix/cluster-ignore-non-configured-zones
Ignore synced config zones where no config item exists
2019-04-16 11:08:15 +02:00
Michael Friedrich 44d0c9013b Ignore synced config zones where no config item exists
The culprit is that we're in compiling configuration stage here,
we don't have access to `Zone::GetByName()` as objects have not
been activated yet.

Our best guess is from a config item loaded before (e.g. from zones.conf)
since no-one can sync zones via cluster config sync either.

It may not be 100% correct since the zone object itself may be invalid.
Still, if the zone object validator fails later, the config breaks either way.

The problem with removal of these directories is dealt by the cluster
config sync with stages.

refs #6727
refs #6716
2019-04-15 17:38:43 +02:00
Michael Friedrich e0d9814feb
Merge pull request #7116 from Icinga/feature/no-reachable
Drop Checkable#reachable in favor of #last_reachable
2019-04-15 13:40:06 +02:00
Michael Friedrich 82de4bd13a
Merge pull request #7115 from Icinga/feature/docs-api
Improve REST API docs
2019-04-12 15:28:49 +02:00
Michael Friedrich 31170db123 Improve REST API docs
- Better explanation for filters and filter_vars
- Update examples to use filters in the body only, don't fuck around with the URL parameters.
- Better explain actions and their intent
- More insights into config packages and their intention
- Improve API clients and add the tables from icinga2-api-examples
- Formatting for CLI requests
2019-04-12 15:26:21 +02:00
Alexander A. Klimov d7b63143cf Drop Checkable#reachable in favor of #last_reachable 2019-04-12 13:03:11 +02:00
Michael Friedrich 5e3df67ab3 Docs: Fix RPM snapshot repo name 2019-04-12 09:34:34 +02:00
Elias Ohm 1e7cd4afc8 * use dedicated permissions namespace for scriptframe in filterutility to allow proper parallel execution
* fixes issue https://github.com/Icinga/icinga2/issues/6785 where permission checks get wrong result because permissions checks are done within a shared namespaces without using only unique keys
  * mitigates issue https://github.com/Icinga/icinga2/issues/6874 where segmentation faults occur because of concurrent access to non threadsafe parts of namespace (a fix for thread safety of namespaces which would be an alternative approach to get rid of these segfaults is out of scope of this fix as 6785 needs to be fixed anyway and this is the straight-forwards) way to fix that
* do the same for eventqueue (not certain whether events can be processed in parallel but I expect it is the case)
2019-04-12 08:10:57 +02:00
Alexander A. Klimov 66949dd018 Service: reduce severity while host is down 2019-04-11 11:36:23 +02:00
Alexander A. Klimov ae18536b0f Service: be handled while host is down 2019-04-11 11:25:45 +02:00
Michael Friedrich 973b03dcb2
Merge pull request #7109 from Icinga/feature/enhance-cluster-message-send-code-docs
Improve code docs for cluster message routing conditions
2019-04-11 11:20:46 +02:00
Michael Friedrich b24a3be083 Improve code docs for cluster message routing conditions
refs #6781
2019-04-10 14:17:36 +02:00