Commit Graph

107 Commits

Author SHA1 Message Date
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 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
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 35c9f2e7b3 Close connections w/o sucessful TLS handshakes during 10s
refs #7805
2020-02-05 15:53:56 +01: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
Alexander A. Klimov 3f4cb0936c Add ApiListener::UpdatedObjectAuthority()
refs #7086
2019-07-11 12:58:07 +02:00
Michael Friedrich f92f6f7f8c Improve checksum checks for each file content 2019-06-19 14:46:11 +02:00
Michael Friedrich 7a02990ef8 Refactor the client sync, part II (WIP, currently checksums generate an endless loop) 2019-06-19 14:46:11 +02:00
Michael Friedrich fcc1799a5d Split config file sync updates, part I
This commit also introduces a playground for checksums,
whilst refactoring the code in large parts.
2019-06-19 14:46:11 +02:00
Michael Friedrich efc2289178 Remove duplicated validation paths in function signatures 2019-06-19 14:46:11 +02:00
Michael Friedrich 2acf3a6941 Indicate a warning in the 'icinga' check when cluster stage validation failed
- success: clear the last failed attribute
- failed: populate it with the output and current timestamp

This can be used to highlight this in the 'icinga' check task.
Since 2.9 we don't have problems with circular library dependencies
with just one linked binary, therefore it is safe to include libremote
in libmethods here.
2019-06-19 14:46:11 +02:00
Michael Friedrich 86108e6a1e Improve logging and code quality 2019-06-19 14:46:11 +02:00
Michael Friedrich fb367e12cc Store the last failed zone stage sync validation as runtime ApiListener attribute 2019-06-19 14:46:11 +02:00
Michael Friedrich 2c39d69428 Implement first draft for cluster config staged sync 2019-06-19 14:46:11 +02:00
Michael Friedrich 6a8823f879 Avoid concurrent cluster config sync transactions
fixes #6660
2019-06-05 15:23:28 +02:00
Michael Friedrich 2bca7a5bb5 Repair broken API config packages at runtime
This means a new timer which checks every 5m whether the
active-stage can be read, and if not, it overwrites the
file on disk with the details from memory.
2019-04-26 14:53:36 +02:00
Michael Friedrich c821e73364 Cache the API package stage name with a active-stage fallback
This prevents reading the file everytime the stageName is required
for when creating a runtime object via REST API.
2019-04-26 13:40:27 +02:00
Michael Friedrich b24a3be083 Improve code docs for cluster message routing conditions
refs #6781
2019-04-10 14:17:36 +02:00
Alexander A. Klimov 64b2ac4b30 ApiListener: drop unused thread pool 2019-04-01 15:06:17 +02:00
Alexander A. Klimov 832365195d ApiListener: connect(2) via Boost ASIO 2019-04-01 11:40:14 +02:00
Alexander A. Klimov e21956e26e ApiListener: detect protocol 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 720c53ab77 ApiListener: perform TLS handshake 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 2615967e7f Make ApiListener#m_SSLContext a Boost ASIO SSL context 2019-04-01 11:40:14 +02:00
Alexander A. Klimov e4f3422b3a ApiListener: listen(2) via Boost ASIO 2019-04-01 11:40:14 +02:00
Michael Friedrich d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Michael Friedrich cbde35ff22 Use a dynamic thread pool for API connections
The full analysis is located in #6517.

fixes #6517
2018-09-25 12:43:10 +02:00
Michael Friedrich 29701b4db5 Add ApiListener#tls_handshake_timeout option
This allows to specify the previously hardcoded
timeout of 10s.

refs #6517
2018-09-14 09:20:09 +02:00
Michael Friedrich ecb73e08ed Implement ApiListener status file removal on shutdown 2018-08-09 11:54:34 +02:00
Markus Frosch 20269a89d0 ApiListener: Add support for dynamic port handling 2018-08-08 17:42:57 +02:00
Markus Frosch ddc5b951b3
Revert "Implement support for the --env command-line argument" 2018-07-26 17:09:06 +02:00
Gunnar Beutner c577554073 Implement support for the --env command-line argument 2018-06-27 13:15:52 +02:00
Jean Flach 1bdd14b428 Limit anonymous connections to 25 2018-03-05 13:22:43 +01:00
Gunnar Beutner 9d436605f0 Fix compatibility with CMake < 3.1 2018-01-18 15:12:46 +01:00
Gunnar Beutner 21254fb610 Avoid accessing attributes for validators where not necessary 2018-01-11 08:20:16 +01:00
Gunnar Beutner 91c256261a Apply clang-tidy fix 'modernize-use-default-member-init' 2018-01-04 12:24:58 +01:00
Gunnar Beutner 9ca682496c Apply clang-tidy fix 'modernize-use-override' 2018-01-04 12:24:57 +01:00
Gunnar Beutner ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Gunnar Beutner efe99a3e5e Add the final keyword to classes 2018-01-04 05:20:20 +00:00
Gunnar Beutner 90496b5456 Build libraries as static libraries 2018-01-02 23:29:48 +01:00
Michael Insel 158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach 2636e6a77a Whitespace fix
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Gunnar Beutner 42744fde5b Remove extraneous whitespace 2017-12-14 08:50:09 +01:00
Gunnar Beutner 325e4a2fb9 Use nullptr instead of <Type>::Ptr() 2017-11-30 17:47:09 +01:00
Gunnar Beutner 6d09efc907 Use std::shared_ptr instead of boost::shared_ptr 2017-11-30 17:41:00 +01:00
Gunnar Beutner f2d437e96c Implement support for migrating certificates to /var/lib/icinga2/certs
This commit includes documentation too.

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-10-20 14:06:02 +02:00