Commit Graph

933 Commits

Author SHA1 Message Date
Alexander Aleksandrovič Klimov a32c1bf910
Merge pull request #7864 from Icinga/bugfix/icinga2-doesn-t-close-connections-7203
Add timeout for boost::asio::ssl::stream#async_shutdown()
2020-10-19 15:25:12 +02:00
Alexander Aleksandrovič Klimov f60ae93717
Merge pull request #7870 from Icinga/bugfix/last-zone-sync-stage-validation-failed-7642
Clear ApiListener#last_failed_zones_stage_validation on config::Update if config not changed
2020-10-19 12:31:01 +02:00
Alexander Aleksandrovič Klimov 4bb6f4c910
Merge pull request #8364 from Icinga/bugfix/configsyncstagelock-unlock-owner-213
Make ApiListener::m_ConfigSyncStageLock a SpinLock
2020-10-14 16:01:00 +02:00
Alexander A. Klimov fbfa931b31 Clear ApiListener#last_failed_zones_stage_validation on config::Update if config not changed
refs #7642
2020-10-14 12:17:14 +02:00
Alexander A. Klimov a083635de4 Make ApiListener::m_ConfigSyncStageLock a SpinLock 2020-10-14 10:47:08 +02:00
Julian Brost e04d618ede Catch exceptions in the thread running HandleConfigUpdate
With dc3062a9b0, exceptions in this code
path were no longer caught properly. This commit restores exception
handling for this function.
2020-10-13 14:07:44 +02:00
Noah Hilverling a615b2126e
Merge pull request #8142 from Icinga/bugfix/don-not-close-connection-on-missing-heartbeat-8095
Remove all codes related to the heartbeat timeout
2020-07-29 15:33:22 +02:00
Noah Hilverling 97fc70ccb2
Merge pull request #7836 from Icinga/bugfix/jsonrpcconnection-m_seen
Consider a JsonRpcConnection being seen on a single byte of TLS payload, not only a whole message
2020-07-29 15:02:48 +02:00
Yonas Habteab 964a90fa4b Remove all codes related to the heartbeat timeout
until now, if the timeout is exceeded, the connection is immediately terminated.
But since we do not want to disconnect even if the timeout is exceeded, it is
better to send the messages without timeout and have deleted everything that
related to the heartbeat timeout. We also have another mechanism in
JRPC::CheckLiveness that does the disconnect.
2020-07-29 14:27:55 +02:00
Noah Hilverling 9f57e895f1
Merge pull request #8102 from Icinga/bugfix/send-heartbeat-less-often-8098
Send heartbeat every 20s and not 10s
2020-07-21 09:46:33 +02:00
Yonas Habteab cf5ec5e341 Send heartbeat every 20s and not 10s 2020-07-09 13:22:08 +02:00
Alexander A. Klimov 19c632e44b Add timeout for boost::asio::ssl::stream#async_shutdown()
refs #7203
2020-06-17 10:33:35 +02:00
Alexander A. Klimov 647f1547a9 Generalize I/O timeout emulation 2020-06-17 10:31:40 +02:00
Noah Hilverling 84b052b314
Merge pull request #7926 from Icinga/bugfix/jsonrpcconnection-handleandwriteheartbeats-m_endpoint-getname
JsonRpcConnection#HandleAndWriteHeartbeats(): check !!#m_Endpoint
2020-06-03 15:46:38 +02:00
Noah Hilverling d5d89b7f39
Merge pull request #7970 from Icinga/bugfix/reconnect-loop
RequestCertificateHandler(): don't disconnect nodes already integrated into the cluster
2020-04-27 13:05:22 +02:00
Alexander A. Klimov 5a5cf1a2eb RequestCertificateHandler(): don't disconnect nodes already integrated into the cluster
... not to cause a reconnect loop.
2020-04-08 13:29:55 +02:00
Alexander Aleksandrovič Klimov 2e22ceb23e
Merge pull request #7936 from Icinga/bugfix/config-sync-failed-reload-7742
ApiListener::ConfigUpdateHandler(): make the whole process mutually exclusive
2020-04-07 15:55:14 +02:00
Michael Insel 51e534ff4c Fix CA verification regression
Uninitialized bool values may evaluate to true while it should be false.
2020-03-29 16:05:29 +02:00
Alexander A. Klimov 38f3108c1a ApiListener::HandleConfigUpdate(): make the whole process mutually exclusive
refs #7742
2020-03-23 17:33:14 +01:00
Alexander A. Klimov dc3062a9b0 ApiListener::ConfigUpdateHandler(): block as less as possible
refs #7742
2020-03-23 17:31:59 +01:00
Alexander A. Klimov 5e7a675009 JsonRpcConnection#HandleAndWriteHeartbeats(): check !!#m_Endpoint 2020-03-18 11:58:27 +01:00
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 c9ab04d511
Merge pull request #7841 from Icinga/bugfix/jsonrpcconnection-sendmessage-keepalive
JsonRpcConnection#Send*Message(): keep this alive
2020-03-03 10:46:33 +01:00
Michael Friedrich 13d2416e29 Fix regression from JsonRPC PKI CA verification checks
refs #7835
2020-02-27 12:31:02 +01:00
Michael Friedrich 456b0779bb JsonRpcConnection PKI: Document swalled exception 2020-02-20 15:15:54 +01:00
Alexander A. Klimov 0f84ce0470 Consider a JsonRpcConnection being seen on a single byte of TLS payload, not only a whole message 2020-02-19 11:11:53 +01:00
Michael Friedrich a91b9f2ddf Pki: Extend GetCertificateInformation() with version, serial, signature algorithm, SANs 2020-02-17 17:44:10 +01:00
Michael Friedrich 24397fbee8 CA Proxy: Catch exceptions from VerifyCertificate() 2020-02-17 17:43:11 +01:00
Alexander A. Klimov fbce756007 JsonRpcConnection#Send*Message(): keep this alive 2020-02-17 16:12:07 +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 d99f76bdae Merge pull request #7767 from Icinga/bugfix/replay-log-windows-rename
Ensure that log replay files are properly renamed on Windows
2020-02-10 11:42:25 +01:00
Michael Friedrich 8324970ab9
Merge pull request #7809 from Icinga/bugfix/handshake-timeout-7805
Close connections w/o sucessful TLS handshakes during 10s
2020-02-07 16:01:30 +01:00
Michael Friedrich 7488d2614b
Merge pull request #7811 from Icinga/bugfix/config-sync-log
Cluster config sync: Use a more friendly message when configs are equal and don't need a reload
2020-02-06 14:32:46 +01:00
Alexander A. Klimov 35c9f2e7b3 Close connections w/o sucessful TLS handshakes during 10s
refs #7805
2020-02-05 15:53:56 +01:00
Michael Friedrich cdfc6e6f50 Cluster config sync: Use a more friendly message when configs are equal and don't need a reload
This also adds an entry to the troubleshooting docs.
2020-02-05 15:31:41 +01:00
Michael Friedrich 0da46c1d4b Ensure that log replay files are properly renamed on Windows
rename() without _unlink() before doesn't work on Windows.
This commits also adds an error message which was swallowed
previously.
2020-01-20 11:41:43 +01:00
Alexander A. Klimov 3d841d5f64 Don't send event::Heartbeat to unauthenticated peers
refs #7746
2020-01-13 11:21:38 +01:00
Michael Insel 9d55a8264d Fix open connections when agent waits for CA approval
This closes the agent connection when the certificate sign requests
waits for CA approval.

refs #7680
2019-12-03 21:19:39 +01:00
Matthias Baur 177c45d787
Improve error message for POST queries
If the user does a POST query but forgets to add the
'X-HTTP-Method-Override: GET' HTP header, the error message was
misleading. This changes the error message to a more detailed message
which might give the user a better understanding what the problem
could be.

Fixes #7675.
2019-12-03 11:39:40 +01:00
Michael Insel 859658ab98 Fix TLS context copies in ApiListener
This avoids copying the TLS context in the ApiListener class and removes
the obsolete variable.

This is a follow-up from #7654
2019-11-29 16:03:38 +01:00
Michael Insel 8431ea52ee Make SSL context const again
Turns out that the switch to the class member variable inside the lambda
expression is sufficient to fix the issue.
2019-11-25 23:42:32 +01:00
Michael Insel 016a6c3f25 Fix ApiListener const SSL context
This makes the SSL context in ApiListener::SpawnCoroutine non-const to
address an issue when an agent recieves an signed certificate from the
master and tries to update the SSL context. This also uses the class
member variable which is captured by `this` in the lamda expression.

fixes #7650
2019-11-25 22:21:09 +01:00
Michael Friedrich b1787883f7
Merge pull request #7535 from tigercomputing/Icinga/feature/config-stage-activate-parameter
API /v1/config/stages 'activate' parameter
2019-11-15 12:58:03 +01:00
Michael Friedrich 38080405df
Merge pull request #7528 from Icinga/bugfix/api-put-error-handling
API: Handle permission exceptions soon enough, returning 404
2019-11-15 11:53:59 +01:00
Alexander A. Klimov f601ba51e0 Revert "Eventqueue: Remove unused code"
This reverts commit a7873da89d.
2019-11-02 14:00:23 +01:00
Michael Friedrich cb20b4829a Cluster Config Sync: Check the timestamp prior to config file checksums
Otherwise old configuration received from a secondary master/satellite
could always trigger a config change & reload.
2019-10-22 14:07:10 +02:00
Alexander A. Klimov aa4cad7482 Replace std::shared_ptr<Expression> with Expression::Ptr
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 a1fef92835 Replace std::shared_ptr<boost::asio::ip::tcp::acceptor> with Shared<boost::asio::ip::tcp::acceptor>::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