Alexander A. Klimov
a1683568a1
Replace std::shared_ptr<AsioTlsStream> with Shared<AsioTlsStream>::Ptr
2019-10-21 16:12:35 +02:00
Alexander A. Klimov
b046ffe152
Introduce Shared<T>
2019-10-21 11:07:42 +02:00
Michael Friedrich
3e6fc9bfa1
Merge pull request #7457 from Icinga/feature/config-parser-malloc
...
Config parser: save some memory allocations
2019-10-17 17:19:30 +02:00
Michael Friedrich
e7c07062f8
Avoid syncing .authorititative marker received from < 2.11 parent nodes
2019-10-02 10:49:02 +02:00
Michael Friedrich
f0fcfdf910
Merge pull request #7538 from Icinga/bugfix/dependency-ignore_on_error-7536
...
Dependency#OnAllConfigLoaded(): don't link *this with the child if *this is going to be dropped
2019-09-25 12:12:22 +02:00
Michael Friedrich
4e23f954fa
Merge pull request #7529 from Icinga/bugfix/activestageoverride-7521
...
WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code
2019-09-25 12:11:26 +02:00
Alexander A. Klimov
7668314b4a
Dependency#OnAllConfigLoaded(): don't link *this with the child if *this is going to be dropped
...
refs #7536
2019-09-25 11:30:50 +02:00
Alexander A. Klimov
b8d495ae07
Introduce Checkable#next_update
2019-09-25 10:44:49 +02:00
Alexander A. Klimov
b4e3736e31
WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code
2019-09-23 15:09:57 +02:00
Michael Friedrich
617f1d1333
Improve error message for command endpoint checkable's requiring a zone
...
fixes #7514
2019-09-23 09:41:08 +02:00
Michael Friedrich
eddb40a913
CSR Auto-signing: Add debug logging for skipped signing
2019-09-18 11:53:58 +02:00
Michael Friedrich
d3eb62301e
API: Add AES128-GCM-SHA256 compatible cipher for el6
...
fixes #7501
2019-09-16 14:19:22 +02:00
Michael Friedrich
9ec246a2f4
Revert: Always reset Boost beast buffer in HttpServerConnection#ProcessMessages #7476
...
Not a simple revert but also adds a comment for the buffer.
refs #7476
2019-09-12 17:00:17 +02:00
Michael Friedrich
2c0e0da2d9
Introduce IoEngine::SpawnCoroutine wrapping asio::spawn and Boost exceptions
...
This is required to
- catch all exceptions and wrap them into Boost exceptions. They
are the only ones allowed with Boost.Coroutine.
- set a dedicated coroutine stack size for Windows.
refs #7431
2019-09-09 16:40:35 +02:00
Michael Friedrich
5fa7331cc9
Quality: Replace deprecated Boost IO service code
...
https://github.com/boostorg/asio/issues/110
https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp03/services/logger_service.hpp
2019-09-09 15:27:57 +02:00
Alexander A. Klimov
0a9563b3db
HttpServerConnection#ProcessMessages(): avoid I/O if shutting down
...
refs #7431
2019-09-09 13:37:44 +02:00
Alexander A. Klimov
b85b8b9697
HttpServerConnection#ProcessMessages(): avoid I/O after boost::asio::error::operation_aborted
...
refs #7431
2019-09-09 13:29:47 +02:00
Alexander A. Klimov
dfaeb88ac3
{HttpServer,JsonRpc}Connection#Disconnect(): cancel I/O ops ASAP
...
refs #7431
2019-09-09 13:11:51 +02:00
Michael Friedrich
b3c48e7520
Merge pull request #7485 from Icinga/bugfix/api-disconnect-defer
...
Avoid the Defer-Disconnect destructor pattern with Boost.Coroutines
2019-09-09 11:41:34 +02:00
Michael Friedrich
c5aa978912
Rewrite error handling in HttpServerConnection#EnsureValidHeaders()
...
Throwing local exceptions unnecessarily pollutes the exception
stack with immediate unwinding. Avoid this pattern at all cost within
Boost.Coroutines. MSVC may handle exceptions differently and cause
problems with stack unwinding.
refs #7431
refs #7351
2019-09-09 11:03:21 +02:00
Michael Friedrich
17d4d17307
Avoid the Defer-Disconnect destructor pattern with Boost.Coroutines
...
Exceptions in Disconnect() might be thrown (this has been reworked
into error_code locally) which are swallowed inside the Destructor
for being dangerous. On the other hand, swallowing them may
corrupt the stack unwinding operation from the coroutine layer.
The best is to avoid Defer inside lib/remote and call Disconnect()
directly after breaking from other operations.
refs #7351
refs #7431
2019-09-09 10:57:13 +02:00
Michael Friedrich
ebb0826be0
JsonRpcConnection: Don't swallow exceptions in Boost.Coroutine
...
refs #7351
2019-09-09 09:26:12 +02:00
Michael Friedrich
cdacd545c6
Merge pull request #7477 from Icinga/bugfix/api-boost-exceptions-errors
...
HttpServerConnection: Prefer error codes over Boost exceptions
2019-09-06 10:22:42 +02:00
Michael Friedrich
a208f7baf0
HttpServerConnection: Prefer error codes over Boost exceptions
...
When run within a coroutine, exceptions on Windows may influence
bad behaviour here. Instead, we'll check for the error code
and extract the message from memory. In contrast to exceptions
which are stored on the stack frame and then return, this costs
a little more memory but simplifies the logic.
This doesn't fix the linked issue, but is related to the analysis.
refs #7431
2019-09-06 10:06:17 +02:00
Michael Friedrich
eabba2de42
Always reset Boost beast buffer in HttpServerConnection#ProcessMessages
...
refs #7431
2019-09-06 09:31:16 +02:00
Michael Friedrich
1f50a705f9
Adjust code comment for Logger->Flush() on Windows
2019-09-06 09:24:34 +02:00
Michael Friedrich
8a07b64800
Merge pull request #7459 from Icinga/feature/expose-problem-handled-counts
...
Metrics: Expose problem/handled counts for hosts/services
2019-08-30 09:04:03 +02:00
Michael Friedrich
55d7da30ca
Metrics: Expose problem/handled counts for hosts/services
...
With the addition of problem/handled as checkable runtime
attributes in #7096 we should also expose them via CIB
into
- icinga check
- /v1/status/CIB
- IcingaApplication runtime macros
This originates from a request by @phil-or at the recent
Icinga meetup in Linz.
2019-08-29 17:04:23 +02:00
Alexander A. Klimov
203482a675
Config parser: save some memory allocations
2019-08-29 10:54:54 +02:00
Michael Friedrich
bea8527083
Merge pull request #7356 from Icinga/bugfix/influxdbwriter-clone
...
InfluxdbWriter: clone less
2019-08-28 09:16:19 +02:00
Michael Friedrich
f62db49d3e
Merge pull request #7451 from Icinga/bugfix/update-docs
...
Update docs: Fix online URL, cipher list
2019-08-28 08:59:28 +02:00
Michael Friedrich
5ed91098d2
Merge pull request #7445 from Icinga/bugfix/ddos-reconnect-7444
...
JsonRpcConnection#Disconnect(): unregister the connection ASAP
2019-08-28 08:59:14 +02:00
Michael Friedrich
0915c84530
Update doc URL for the API info handler at /v1
2019-08-27 16:47:07 +02:00
Michael Friedrich
9932f04751
Update doc URL references for the DB IDO feature
2019-08-27 16:46:51 +02:00
Michael Friedrich
b75e1585d6
Merge pull request #7449 from Icinga/feature/warn-set-global-var
...
DSL: warn on x=y if x is a global variable
2019-08-27 14:53:29 +02:00
Michael Friedrich
9d6ee44e71
Merge pull request #7346 from Icinga/feature/check-plugins-code-page-7110
...
DaemonCommand#Run(): set code page to UTF-8
2019-08-27 14:51:30 +02:00
Alexander A. Klimov
429080ee1c
DSL: warn on x=y if x is a global variable
2019-08-27 13:30:02 +02:00
Alexander A. Klimov
c24312b870
JsonRpcConnection#Disconnect(): unregister the connection ASAP
...
refs #7444
2019-08-23 17:14:13 +02:00
Alexander A. Klimov
efc7f2cf8d
Correct current_concurrent_checks to actually running checks
...
refs #7416
2019-08-15 13:39:01 +02:00
Michael Friedrich
c2e1d023e2
Merge pull request #7421 from Icinga/feature/threadpool-metric
...
Expose metric current_pending_callbacks
2019-08-15 10:51:31 +02:00
Michael Friedrich
2760748d78
Fix and improve logging for runtime object sync
...
config::UpdateObject would create a new object, but this may
have been silently ignored with 'ignore_on_error' - downtimes, etc.
Since we cannot simply fetch the error from inside the config compiler,
we'd just check whether there's a config object created at this stage.
This happens synchronously, and once there is, log something.
The previous code always logged the creation, even if the downtime
was ignored, e.g. when the first master sent one for local host objects.
This commit also adds more details: identity, endpoint, zone to extract
the MessageOrigin details into log messages for better troubleshooting
and debugging.
refs #7198
2019-08-15 09:29:05 +02:00
Alexander A. Klimov
448a991404
Expose metric current_pending_callbacks
2019-08-14 17:22:27 +02:00
Alexander A. Klimov
a58a5feee3
Introduce ThreadPool#GetPending()
2019-08-14 17:12:59 +02:00
Michael Friedrich
43ea6fb636
Merge pull request #7419 from Icinga/bugfix/downtime-loop-activate-origin
...
Fix object create/delete config object cluster loop (missing message origin)
2019-08-14 16:29:08 +02:00
Michael Friedrich
5b36ff0787
Properly parse the Icinga version for minimum version in the 'icinga' check
...
fixes #7415
2019-08-14 13:15:05 +02:00
Michael Friedrich
96f62d2d34
Add Utility::ParseVersion() and unit tests
...
This now uses a regex to extract the short version
similar to how Icinga Web 2 does it.
Additional unit tests prove the rule.
2019-08-14 11:22:55 +02:00
Michael Friedrich
7c1f716dad
Fix cookie with ActivateItems
2019-08-13 16:09:26 +02:00
Michael Friedrich
c30edd0a34
Fix message origin for runtime created config object (create/delete events)
2019-08-13 15:05:47 +02:00
Michael Friedrich
f9812ee1aa
Merge pull request #7404 from Icinga/bugfix/livestatus-interval
...
Explicitly write the 1.x legacy attribute 'interval_length' for Livestatus
2019-08-07 17:32:38 +02:00
Michael Friedrich
d8400699f9
Merge pull request #7353 from Icinga/bugfix/influxdbwriter-skip-tags-7341
...
InfluxdbWriter: skip non-resolvable tags
2019-08-07 17:15:24 +02:00