Commit Graph

1720 Commits

Author SHA1 Message Date
Noah Hilverling 4c9e4959f3
Merge pull request #7823 from Icinga/bugfix/unify-application-start-times
Fix timing point for Application::GetStartTime() (related to command endpoint grace period)
2020-03-09 09:45:57 +01:00
Noah Hilverling 6e3c928205
Merge pull request #7837 from Icinga/bugfix/coroutine-exception
IoEngine#SpawnCoroutine(): always terminate coroutines cleanly
2020-03-03 11:19:18 +01:00
Michael Friedrich 06d0c3ea4e
Merge pull request #7843 from Icinga/feature/cli-pki-verify
CLI: Add `pki verify` command for better TLS certificate troubleshooting
2020-02-25 09:07:24 +01:00
Michael Friedrich fdb13d1b7d TlsUtility: Replace deprecated OpenSSL function with ASN1_STRING_get0_data() 2020-02-21 13:02:58 +01:00
Alexander A. Klimov b65aed1dd3 IoEngine#SpawnCoroutine(): always terminate coroutines cleanly 2020-02-19 10:51:26 +01:00
Michael Friedrich 548eb933c9 TlsUtility: Add getters for version, signature algorithm, SANs 2020-02-17 17:42:20 +01:00
Henrik Triem 099cc5d8df
Merge pull request #7833 from Icinga/feature/version-build-info-openssl
CLI: Add OpenSSL version to 'Build' section in --version
2020-02-17 17:07:51 +01:00
Michael Friedrich 71c7eebe4e CLI: Add OpenSSL version to 'Build' section in --version
This helps to see against which OpenSSL version Icinga was built.
Inspired by #5572
2020-02-14 08:55:39 +01:00
Michael Friedrich a7436394cd TlsUtility: Add IsCa() function to verify given certificate being a CA certificate 2020-02-13 16:03:43 +01:00
Michael Friedrich d53eb34520 Unify Application::GetStartTime() and drop GetMainTime()
This essentially moves the start time into the scope when main
starts to "do something", after the reload and configuration handling
is done.
2020-02-11 17:26:15 +01:00
Michael Friedrich ae8a0b6a64 Introduce Application::GetUptime() 2020-02-11 16:47:50 +01:00
Michael Friedrich 04edda531c
Merge pull request #7788 from Icinga/bugfix/windows-timeout-unknown-state
Terminate windows check processes with UNKNOWN state on timeout
2020-02-10 15:34:28 +01:00
Alexander A. Klimov 0ed0f73d9d IoEngine#SpawnCoroutine(): remove redundand overload 2020-02-05 15:31:57 +01:00
Alexander A. Klimov d98493c90f IoEngine#SpawnCoroutine(): don't copy parameter 2020-02-05 15:30:03 +01:00
Michael Insel d7dfa6f1df Terminate windows check processes with UNKNOWN state on timeout
On Windows this terminates checks that reached the timeout with the UNKNOWN
state instead the WARNING state.

Co-authored-by: araujorm <araujorm@users.noreply.github.com>
2020-01-27 21:43:01 +01:00
Michael Friedrich f62f2eb25e Boost Coroutines: Increase the default stack size from 64 to 256KB
refs #7532
2019-12-13 17:20:06 +01:00
Michael Friedrich 1cda421bad DSL: Add get_template{,s}
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2019-11-08 11:13:26 +01:00
Alexander A. Klimov 768044a754 Replace std::shared_ptr<NamespaceValue> with NamespaceValue::Ptr
refs #7361
2019-10-21 17:10:51 +02:00
Alexander A. Klimov 4438ccbf9e Introduce SharedObject
refs #7361
2019-10-21 17:10:51 +02:00
Alexander A. Klimov ba1ce9c853 Replace std::shared_ptr<boost::asio::ssl::context> with Shared<boost::asio::ssl::context>::Ptr 2019-10-21 16:12:46 +02:00
Alexander A. Klimov 26ce2cfb73 Replace std::shared_ptr<AsioTcpStream> with Shared<AsioTcpStream>::Ptr 2019-10-21 16:12:46 +02:00
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 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
Michael Friedrich 1f50a705f9 Adjust code comment for Logger->Flush() on Windows 2019-09-06 09:24:34 +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
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 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 c30edd0a34 Fix message origin for runtime created config object (create/delete events) 2019-08-13 15:05:47 +02:00
Michael Friedrich 0fd2fc0a4f Only include SSL_CTX_set_ecdh_auto for OpenSSL < 1.1.0 2019-07-23 17:39:02 +02:00
Michael Friedrich 844e821cd1
Merge pull request #7320 from Icinga/feature/foreground-5230
Rework reload handling on *nix
2019-07-18 18:24:22 +02:00
Michael Friedrich 71cf491a3b
Merge pull request #7331 from Icinga/bugfix/unit-tests-packaging-7327
Shutdown timers cleanly on exit
2019-07-17 15:16:04 +02:00
Alexander A. Klimov 80d976fed6 Shutdown timers cleanly on exit
refs #7327
2019-07-17 13:53:43 +02:00
Alexander A. Klimov 31e5394fe9 Fix style
refs #5230
2019-07-16 11:45:23 +02:00
Alexander A. Klimov c385355c38 DaemonCommand: make the atomics a bit more atomic
Just to be sure.

refs #5230
2019-07-16 11:39:09 +02:00
Alexander A. Klimov 4ee9ac16b4 Fix missing comments
refs #5230
2019-07-16 11:11:10 +02:00
Alexander A. Klimov 3584ad97d8 Fix missing log messages
refs #5230
2019-07-15 18:29:15 +02:00
Alexander A. Klimov ac29b3b93a Adjust sd_notify()
refs #5230
2019-07-15 17:04:55 +02:00
Alexander A. Klimov 06b504f291 Adjust PID file management
refs #5230
2019-07-15 17:04:53 +02:00
Alexander A. Klimov 37a3e7e4d5 Application::RunEventLoop(): forward restart requests to umbrella process
refs #5230
2019-07-15 15:23:37 +02:00
Alexander A. Klimov d6bc5a1a18 Remove old signal handlers
refs #5230
2019-07-15 15:06:29 +02:00
Michael Friedrich 6682a427d4 TLS: Ensure to specify options in one place
`SetTlsProtocolminToSSLContext()` may have overridden
previous flags.

refs #7277

refs #7041
refs #7211
2019-07-15 13:29:55 +02:00
Michael Friedrich 524e2368be Respect OpenSSL 1.1.0 vs older 2019-07-12 14:56:08 +02:00
Michael Friedrich 32d288f243 TLS: Fetch the cipher list and log them for debugging 2019-07-12 14:39:17 +02:00
Michael Friedrich 38b7f10e0e Array: Move Join into the base class, available for programmers 2019-07-12 14:36:55 +02:00
Michael Friedrich 0d25ae0e08 Quality: Prefer BOOST_{,UN}LIKELY gcc optimizer macros over our own
Our macro collides with Boost::DateTime and the gregorian classes
and I don't see any reason why we shouldn't use Boost::Config
being already there.
2019-07-09 13:20:53 +02:00
Michael Friedrich 065067c8b5
Merge pull request #7281 from Icinga/bugfix/openssl-1-0-1-7280
Use SSL_CTX_set_ecdh_auto only if available
2019-07-04 14:27:45 +02:00
Alexander A. Klimov 6568017658 Use SSL_CTX_set_ecdh_auto only if available
refs #7280
2019-07-04 13:05:31 +02:00