Commit Graph

11437 Commits

Author SHA1 Message Date
Michael Friedrich c5e68fb05f Dev Docs: Update Windows to Visual Studio 2019 2019-09-09 17:11:23 +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 0dbbba44dd
Merge pull request #7490 from Icinga/bugfix/asio-deprecated-io-service
Quality: Replace deprecated Boost IO service code
2019-09-09 16:05:38 +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
Michael Friedrich 9e16502581
Merge pull request #7487 from Icinga/bugfix/http-api-shutdown-avoid-io
API: Avoid I/O on shutdown
2019-09-09 14:21:24 +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 613925813f
Merge pull request #7486 from Icinga/bugfix/http-header-error-handling
Rewrite error handling in HttpServerConnection#EnsureValidHeaders()
2019-09-09 11:40:44 +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 5aa5ab956d
Merge pull request #7483 from Icinga/bugfix/jsonrpc-boost-asio-coroutine-exceptions
JsonRpcConnection: Don't swallow exceptions in Boost.Coroutine
2019-09-09 10:21:21 +02:00
Michael Friedrich fbee705105
Merge pull request #7481 from Icinga/feature/check-network-perfdata
Add summarized performance data to check_network
2019-09-09 09:47:37 +02:00
Michael Friedrich ebb0826be0 JsonRpcConnection: Don't swallow exceptions in Boost.Coroutine
refs #7351
2019-09-09 09:26:12 +02:00
Michael Insel 1bd91b0998 Add summarized performance data to check_network
This adds two new performance data values to check_network, 'network_in'
and 'network_out'.

On systems with multiple network interfaces the 'network_in' value holds
the summarized input bytes and the 'network_out' value holds the
summarized output bytes.
2019-09-06 20:46:32 +02:00
Michael Friedrich 897b81d461
Merge pull request #7479 from Icinga/feature/windows-dev
Build: Add Powershell script for development config for building Windows debug packages
2019-09-06 12:52:47 +02:00
Michael Friedrich 2178e150f9 Build: Add Powershell script for development config for building Windows debug packages 2019-09-06 10:51:06 +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 4a005c5d46
Merge pull request #7476 from Icinga/bugfix/api-beast-buffer
Always reset Boost beast buffer in HttpServerConnection#ProcessMessages
2019-09-06 09:56:29 +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 2cf38ba8ce Ensure that issue templates are more readable 2019-09-02 15:10:35 +02:00
Michael Friedrich 52af379839
Merge pull request #7467 from Icinga/feature/docs-development-2-11
Docs: Update Linux and Windows Dev instructions for 2.11
2019-09-02 09:36:47 +02:00
Michael Friedrich cf8a49bc78 Docs: Update dev chapter for Debian Buster 2019-09-02 09:20:56 +02:00
Michael Friedrich e4341a5bdc Docs: Update Boost setup instructions for Windows dev environment 2019-09-01 11:08:15 +02:00
Michael Friedrich 426c26f6cb
Merge pull request #7464 from Icinga/feature/docs-windows-agent-versions
Docs: Update supported Windows agent versions
2019-08-30 16:37:09 +02:00
Michael Friedrich 74ab3192a0 Docs: Sync Vagrant box dev instructions with development docs 2019-08-30 15:18:27 +02:00
Michael Friedrich 22243c10e0
Merge pull request #7463 from Icinga/feature/docs-powershell
Docs: Prefer the Powershell commands on Windows
2019-08-30 14:21:19 +02:00
Michael Friedrich ce9f5a9e2b Docs: Update supported Windows agent versions 2019-08-30 14:15:08 +02:00
Michael Friedrich e56de3f55f Docs: Add Windows debugging 2019-08-30 14:04:40 +02:00
Michael Friedrich 7f28718cad Docs: Prefer the Powershell commands on Windows 2019-08-30 14:04:05 +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 360cb50c9e Config parser: inline arraysep 2019-08-29 14:06:01 +02:00
Alexander A. Klimov fd88ac2f83 Config parser: introduce optional_newlines 2019-08-29 14:05:58 +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 0cef00c841 Update default cipher_list in upgrading docs 2019-08-27 16:47:58 +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 3f509c499f
Merge pull request #7450 from Icinga/feature/windows-exe-icon
Windows binary: Also update the exe icon
2019-08-27 15:15:18 +02:00
Michael Friedrich 36b7ad68a4 Windows binary: Also update the exe icon
A thousand places for everything.
2019-08-27 15:12:22 +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
Michael Friedrich e2f461cb06
Merge pull request #7447 from Icinga/bugfix/nscp-json
check_nscp_api: read HTTP response via Boost.Beast
2019-08-27 13:58:02 +02:00
Alexander A. Klimov b5a0be0d60 ITL: set globals.NscpPath explicitly 2019-08-27 13:34:10 +02:00