13799 Commits

Author SHA1 Message Date
Julian Brost
ea6ebd2e95
Merge pull request #10313 from Icinga/Icinga-2.14.4
Icinga 2.14.4
v2.14.4
2025-01-23 11:53:08 +01:00
Alexander A. Klimov
6c38447ed1 Icinga 2.14.4 2025-01-22 14:43:55 +01:00
Julian Brost
a8c9192e41
Merge pull request #10314 from Icinga/win-configure-cmake-opts214
tools/win32/configure*.ps1: allow custom $CMAKE_ARGS (JSON array)
2025-01-22 12:04:52 +01:00
Alexander A. Klimov
7866308e31 tools/win32/configure*.ps1: allow custom $CMAKE_ARGS (JSON array) 2025-01-22 10:07:44 +01:00
Alexander Aleksandrovič Klimov
c538324040
Merge pull request #10304 from Icinga/win-progfiles-icinga2-var214
On Windows, don't create C:\Program Files\Icinga2\var during MSI build
2025-01-16 14:03:58 +01:00
Alexander A. Klimov
e241a240a8 On Windows, don't create C:\Program Files\Icinga2\var during MSI build 2025-01-16 12:04:12 +01:00
Yonas Habteab
ebac52b830
Merge pull request #10300 from Icinga/error-timestamp-out-of-range-53323-214
IDO: timestamp out of range errors
2025-01-14 12:06:18 +01:00
Alexander A. Klimov
32d604f954 Ido*sqlConnection#FieldToEscapedString(): don't write out of range time
MySQL's FROM_UNIXTIME() NULLs ts <1970, errors for >2038.
Postgres' TO_TIMESTAMP() errors for all ts not between 4713BC - 294276AD.
2025-01-14 10:05:36 +01:00
Alexander A. Klimov
ecce7f8dcb Ido*sqlConnection#FieldToEscapedString(): don't overflow timestamps > long 2025-01-14 10:05:36 +01:00
Yonas Habteab
2c0925cedd
Merge pull request #10293 from Icinga/graceful-tls-disconnect-214
Add a dedicated method for disconnecting TLS connections
2025-01-14 10:03:22 +01:00
Yonas Habteab
ee98a9e335
Merge pull request #10298 from Icinga/timestamp-serialization-issues
IcingaDB: limit several numbers not to crash Go daemon
2025-01-13 16:27:27 +01:00
Yonas Habteab
f53e5343c8
Merge pull request #10292 from Icinga/rpc-sync-failures
Runtime RPC sync failures
2025-01-13 14:44:02 +01:00
Alexander A. Klimov
cf895e7e3f IcingaDB::TimestampToMilliseconds(): limit output to four year digits
Too high timestamps may overflow uint64_t (and the YYYY format) and negative
ones don't fit into uint64_t. Those may crash our Go daemon.
2025-01-13 14:30:54 +01:00
Alexander A. Klimov
c21e99a15c IcingaDB#SerializeState(): limit execution_time and latency to 2^32-1
not to write higher values into Redis than the Icinga DB schema can hold.
This fixes yet another potential Go daemon crash.
2025-01-13 14:30:32 +01:00
Yonas Habteab
14b854d891
Merge pull request #10296 from Icinga/comment-loading-nullptr-deference
Address comment loading where host reference is not found gracefully
2025-01-13 13:17:40 +01:00
Yonas Habteab
7defb0c942
Merge pull request #10295 from Icinga/do-not-write-new-messages-on-shutdown
JsonRpcConnection: don't write new messages on shutdown
2025-01-13 13:11:17 +01:00
Yonas Habteab
9b3e97e067
Merge pull request #10294 from Icinga/log-slow-http-rpc-processing-214
Log slow HTTP/RPC processing stats
2025-01-13 12:44:22 +01:00
Alexander A. Klimov
9887ad79a0 AUTHORS: add Yannick Martin <yannick.martin@ovhcloud.com> 2025-01-13 11:19:42 +01:00
Yannick Martin
ec2645d33c icinga2: address comment loading where host reference is not found
address #9752: check if host reference is valid
2025-01-13 11:19:42 +01:00
Alexander Aleksandrovič Klimov
ebf905a220 JsonRpcConnection: don't write new messages on shutdown
In fact, this is already done for the outer loop (for each bulk), just not yet for the inner one (for each message of a bulk). So once the remote signals EOF, don't try to process the remaining queue until write error (which can't be associated with a particular message anyway, due to buffering), but just let the peer go. Flush already half-written messages, though, if possible.
2025-01-13 11:17:23 +01:00
Alexander A. Klimov
2bc1c8e1dc Document Timeout 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
e544fef7a2 Timeout: explicitly delete #Timeout(const Timeout&), #Timeout(Timeout&&), #operator=(const Timeout&), #operator=(Timeout&&) 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
d956920bd7 Move Timeout instances from heap to stack 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
1703f99d14 Don't call Timeout#Cancel() where Timeout#~Timeout() is called 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
fe1420523a Timeout#~Timeout(), #Cancel(): support boost::asio::io_context running on multiple threads 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
a47508b7b3 Timeout#Timeout(): drop unnecessary template parameters 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
d69291739f While using Timeout, don't unnecessarily keep the strand alive via smart pointer 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
c23bd4c186 Test Timeout 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
ff5ae18b9c Timeout: use a plain callback, not an unnecessary coroutine 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
f839707c4a Timeout#Timeout(): don't pass yield_context to callback
It's not used. Also, the callback shall run completely at once. This ensures that it won't (continue to) run once another coroutine on the strand calls Timeout#Cancel().
2025-01-13 10:42:36 +01:00
Yonas Habteab
a88d6988b4 JsonRpcConnection: Log message processing time stats
Co-Authored-By: Julian Brost <julian.brost@icinga.com>
2025-01-13 10:39:23 +01:00
Yonas Habteab
7225d78047 HttpServerConnection: Log noticable CPU semaphore wait time 2025-01-13 10:39:23 +01:00
Yonas Habteab
7b30cb3431 Don't endlessly wait on writer coroutine on disconnect 2025-01-13 10:36:21 +01:00
Yonas Habteab
f2fbb61ad8 Log before & after an RPC client is disconnected 2025-01-13 10:36:21 +01:00
Yonas Habteab
7ed5c6a2c7 JsonRpcConnection: Don't drop client from cache prematurely
PR #7445 incorrectly assumed that a peer that had already disconnected
and never reconnected was due to the endpoint client being dropped after
a successful socket shutdown. However, the issue at that time was that
there was not a single timeout guards that could cancel the `async_shutdown`
call, petentially blocking indefinetely. Although removing the client from
cache early might have allowed the endpoint to reconnect, it did not
resolve the underlying problem. Now that we have a proper cancellation
timeout, we can wait until the currently used socket is fully closed
before dropping the client from our cache. When our socket termination
works reliably, the `ApiListener` reconnect timer should attempt to
reconnect this endpoint after the next tick. Additionally, we now have
logs both for before and after socket termination, which may help
identify if it is hanging somewhere in between.
2025-01-13 10:36:21 +01:00
Julian Brost
2fffb28ab0 Add comment for remaining uses of async_shutdown() why it's safe
The reason for introducing AsioTlsStream::GracefulDisconnect() was to handle
the TLS shutdown properly with a timeout since it involves a timeout. However,
the implementation of this timeout involves spwaning coroutines which are
redundant in some cases. This commit adds comments to the remaining calls of
async_shutdown() stating why calling it is safe in these places.
2025-01-13 10:33:11 +01:00
Julian Brost
f99d35ed91 HttpServerConnection: use AsioTlsStream::GracefulDisconnect()
This new helper function has proper timeout handling which was missing here.
2025-01-13 10:33:11 +01:00
Julian Brost
28776cb37c JsonRpcConnection: use AsioTlsStream::GracefulDisconnect()
This new helper functions allows deduplicating the timeout handling for
`async_shutdown()`.
2025-01-13 10:33:11 +01:00
Julian Brost
a593bdfa5f AsioTlsStream: add GracefulDisconnect() and ForceDisconnect()
Calling `AsioTlsStream::async_shutdown()` performs a TLS shutdown which
exchanges messages (that's why it takes a `yield_context`) and thus has the
potential to block the coroutine. Therefore, it should be protected with a
timeout. As `async_shutdown()` doesn't simply take a timeout, this has to be
implemented using a timer. So far, these timers are scattered throughout the
codebase with some places missing them entirely. This commit adds helper
functions to properly shutdown a TLS connection with a single function call.
2025-01-13 10:33:11 +01:00
Julian Brost
156ba265e1 Simplify DependencyGraph:RemoveDependency() method 2025-01-13 10:25:48 +01:00
Yonas Habteab
7501525550 ApiListener: Sync runtime configs in order 2025-01-13 10:25:48 +01:00
Yonas Habteab
5c0ce6350c DependencyGraph: Allow lookups by parent & child dependencies 2025-01-13 10:25:48 +01:00
Alexander A. Klimov
c64ff492ec DependencyGraph: use ConfigObject*, not Object*
This saves dynamic_cast<ConfigObject*> + if() on every item of GetChildren().
2025-01-13 10:25:42 +01:00
Alexander A. Klimov
6aa2355427 DependencyGraph: switch "parent" and "child" terminology
The .ti files call `DependencyGraph::AddDependency(this, service.get())`. Obviously, `service.get()` is the parent and `this` (Downtime, Notification, ...) is the child. The DependencyGraph terminology should reflect this not to confuse its future users.
2025-01-13 10:23:28 +01:00
Julian Brost
c3b5dbfbc7
Merge pull request #10289 from Icinga/fix-broken-links-2.14
Fix and cleanup broken and obsolete links
2025-01-13 09:27:06 +01:00
Julian Brost
bea0d34f35
Merge pull request #10285 from Icinga/gha2144
Update GitHub Actions
2025-01-13 09:26:17 +01:00
Blerim Sheqa
54fa56c010 Fix and cleanup broken and obsolete links 2025-01-10 14:35:57 +01:00
Alexander A. Klimov
2e8258dfe7 GHA: also test SLES, not just openSUSE
They may be similar, but SLES isn't that hard to deploy.
2025-01-08 12:15:19 +01:00
Alexander A. Klimov
bba2e1a84e GHA: drop EOL SUSE 15.4 2025-01-08 12:15:18 +01:00
Alexander A. Klimov
07aec81054 GHA: drop EOL SLES 15.3 2025-01-08 12:15:18 +01:00