4962 Commits

Author SHA1 Message Date
Noah Hilverling
d6a007cd27
Merge pull request #8094 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-08 09:59:22 +02:00
Alexander A. Klimov
67b04fae69 ApiListener::HandleConfigUpdate(): make the whole process mutually exclusive
refs #7742
2020-07-07 16:11:21 +02:00
Alexander A. Klimov
4d80903c47 ApiListener::ConfigUpdateHandler(): block as less as possible
refs #7742
2020-07-07 16:11:21 +02:00
Noah Hilverling
e59c2e896f
Merge pull request #8054 from Icinga/bugfix/segfault-map-reduce-filter-null-8047
Ensure the custom function is not null in Array#{sort,map,reduce,filter,any,all}()
2020-06-15 16:16:30 +02:00
Noah Hilverling
949da2bc6b
Merge pull request #8043 from Icinga/bugfix/unify-application-start-times-v2114
Fix timing point for Application::GetStartTime() (related to command endpoint grace period)
2020-06-09 14:04:07 +02:00
Noah Hilverling
3628d7ffa8
Merge pull request #8044 from Icinga/bugfix/catch-exception-in-node-setup-v2114
Catch exception when trusted cert is not readable during node setup on agent/satellite
2020-06-09 14:02:32 +02:00
Alexander A. Klimov
9c85401914 Ensure the custom function is not null in Array#{sort,map,reduce,filter,any,all}()
refs #8047
2020-06-09 12:35:04 +02:00
Michael Insel
3b1f9a938a Fix Build
I have no idea how this got lost.
2020-06-03 16:37:40 +02:00
Michael Insel
18cf314480 CLI: Catch exception when trusted cert is not readable
This catches an exception when the trusted cert is not readable during
node setup.
2020-06-03 16:37:39 +02:00
Michael Friedrich
18fdc1457a 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-06-03 16:25:53 +02:00
Michael Friedrich
4878daff44 Introduce Application::GetUptime() 2020-06-03 16:21:01 +02:00
Alexander Aleksandrovič Klimov
13df2fc067
Merge pull request #7997 from Icinga/bugfix/jsonrpcconnection-handleandwriteheartbeats-m_endpoint-getname
JsonRpcConnection#HandleAndWriteHeartbeats(): check !!#m_Endpoint
2020-05-11 11:39:19 +02:00
Alexander A. Klimov
5e7a675009 JsonRpcConnection#HandleAndWriteHeartbeats(): check !!#m_Endpoint 2020-03-18 11:58:27 +01:00
Noah Hilverling
2a130df80f
Merge pull request #7848 from Icinga/bugfix/coroutine-exception-211x
IoEngine#SpawnCoroutine(): always terminate coroutines cleanly
2020-03-02 11:25:22 +01:00
Noah Hilverling
c02eb62ac5
Merge pull request #7846 from Icinga/bugfix/revert-notification-result-211x
Revert NotificationResult
2020-03-02 10:46:05 +01:00
Noah Hilverling
984c0ef645
Merge pull request #7849 from Icinga/bugfix/jsonrpcconnection-sendmessage-keepalive
JsonRpcConnection#Send*Message(): keep this alive
2020-03-02 10:45:46 +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
Alexander A. Klimov
18c1f1c4e5 Revert "Add NotificationResult class"
This reverts commit 9621fd2e4bc337befb46a4c885d80ccfce95f5ab.
2020-02-19 11:00:56 +01:00
Alexander A. Klimov
1183010b45 Revert "Add OnNewNotificationResult signal and ProcessNotificationResult handler"
This reverts commit ac483f2a8a07e4962068408d18b10a17204b6454.
2020-02-19 11:00:47 +01:00
Alexander A. Klimov
685ac2f6d7 Revert "Implement last_notification_result handling for Notification objects"
This reverts commit 1706b297a50aceafdbbfe8ed8d46c8d01c114464.
2020-02-19 10:59:07 +01:00
Alexander A. Klimov
e79e350740 Revert "Make NotificationResult available for events: Cluster and Features"
This reverts commit 566e59bbfa385ec1a023c32a1feb895791950032.
2020-02-19 10:59:00 +01:00
Alexander A. Klimov
f2474e2dc6 Revert "Fix license headers"
This reverts commit 48b3d25ce2ea9c6b48115f4bed2f9ac90a748c70.
2020-02-19 10:58:42 +01:00
Alexander A. Klimov
fbce756007 JsonRpcConnection#Send*Message(): keep this alive 2020-02-17 16:12:07 +01:00
Alexander A. Klimov
99387dd536 IoEngine#SpawnCoroutine(): always terminate coroutines cleanly 2020-02-13 18:27:18 +01:00
Michael Friedrich
df24d51ccf 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.

(cherry picked from commit cb20b4829ac10694920db0d9f52ccc39a1ca1ae1)
2019-10-22 17:54:45 +02:00
Michael Friedrich
de0876388e Avoid syncing .authorititative marker received from < 2.11 parent nodes
(cherry picked from commit e7c07062f8f70098cf73c41ca594178b20360d3c)
2019-10-17 13:54:03 +02:00
Alexander A. Klimov
d7d54e53f7 WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code
(cherry picked from commit b4e3736e31d8bc70ac75ca1522db9c0f28f4fa4d)
2019-09-25 12:25:12 +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
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