13822 Commits

Author SHA1 Message Date
Nicolas Berens
4c9f267236 remove bracket 2024-12-02 10:13:54 +01:00
Josef Friedrich
b8107c81e9 Add Josef Friedrich <josef@friedrich.rocks> to AUTHORS 2024-12-02 10:13:54 +01:00
Josef Friedrich
5c23c198f4 Fix typo in 12-icinga2-api.md 2024-12-02 10:13:54 +01:00
Alexander Aleksandrovič Klimov
9920127683
Merge pull request #10257 from Icinga/gha2144
Update GHA
2024-11-29 14:26:57 +01:00
Alexander A. Klimov
e7710d5d7f GHA: Linux: don't track all supported distro versions
Instead just give a generic explanation per distro.
2024-11-27 17:21:13 +01:00
Alexander Aleksandrovič Klimov
e89da57dc1 GHA: update supported Fedora versions
Add v41, drop EOL v37, v38.
2024-11-27 10:39:27 +01:00
Yonas Habteab
92279c09d2 GHA: Drop ubuntu 23.{04,10} (EOL) 2024-11-27 10:39:27 +01:00
Alexander A. Klimov
7aa6fb4fed Clarify that our Debian installation docs also apply to the Raspberry Pi OS 2024-11-27 10:38:38 +01:00
Yonas Habteab
4e91fd7d9a
Merge pull request #10247 from Icinga/useless-http-coroutines-214
HttpServerConnection: Don't spawn useless coroutines
2024-11-19 17:47:13 +01:00
Yonas Habteab
d768c90937 HttpServerConnection: Don't spawn useless coroutines
Currently, for each `Disconnect()` call, we spawn a coroutine, but every
one of them is just usesless, except the first one. However, since all
`Disconnect()` usages share the same asio strand and cannot interfere
with each other, spawning another coroutine within `Disconnect()` isn't
even necessary. When a coroutine calls `Disconnect()` now, it will
immediately initiate an async shutdown of the socket, potentially causing
the coroutine to yield and allowing the others to resume. Therefore, the
`m_ShuttingDown` flag is still required by the coroutines to be checked
regularly.
2024-11-19 16:08:37 +01:00
Alexander Aleksandrovič Klimov
b9fd359fe5
Merge pull request #10240 from Icinga/probot/sync-changelog/support/2.14/538acb64ece9ea0a1514703e81befab89ac3f88e
CHANGELOG.md: add v2.13.10
2024-11-14 14:49:03 +01:00
Yonas Habteab
6f9ae05948
Merge pull request #10239 from Icinga/state-before-suppression214
Fix lost recovery notifications after recovery outside of notification time period
2024-11-14 13:49:15 +01:00
Alexander A. Klimov
e777f1c6d2 CHANGELOG.md: add v2.13.10 2024-11-14 12:12:50 +00:00
Alexander Aleksandrovič Klimov
538acb64ec
Merge pull request #10235 from Icinga/probot/sync-changelog/support/2.14/d5cd5aff2c8baac2040b2cd8ae7a466b819728b2
CHANGELOG.md: add v2.11.12
2024-11-14 13:12:38 +01:00
Yonas Habteab
eb32283751
Merge pull request #10237 from Icinga/log-connected-endpoint-connection-attempts-214
ApiListener: Log connection attempts from an already connected client
2024-11-14 12:57:41 +01:00
Yonas Habteab
122c20a6a0
Merge pull request #10236 from Icinga/log-error-context-only-once-214
ApiListener: Log error context only once
2024-11-14 12:57:03 +01:00
Julian Brost
e313b3f2aa Use Checkable::GetStateBeforeSuppression() only where relevant
This fixes an issue where recovery notifications get lost if they happen
outside of a notification time period.

Not all calls to `Checkable::NotificationReasonApplies()` need
`GetStateBeforeSuppression()` to be checked. In fact, for one caller,
`FireSuppressedNotifications()` in
`lib/notification/notificationcomponent.cpp`, the state before suppression may
not even be initialized properly, so that the default value of OK is used which
can lead to incorrect return values. Note the difference between suppressions
happening on the level of the `Checkable` object level and the `Notification`
object level. Only the first sets the state before suppression in the
`Checkable` object, but so far, also the latter used that value incorrectly.

This commit moves the check of `GetStateBeforeSuppression()` from
`Checkable::NotificationReasonApplies()` to the one place where it's actually
relevant: `Checkable::FireSuppressedNotifications()`. This made the existing
call to `NotificationReasonApplies()` unneccessary as it would always return
true: the `type` argument is computed based on the current check result, so
there's no need to check it against the current check result.
2024-11-14 12:07:02 +01:00
Yonas Habteab
8acfb9b214 ApiListener: Log connection attempts from an already connected client
Something is definitely going wrong if a client tries to reconnect to
this endpoint while it still has an active connection to that client. So
we shouldn't hide this, but at least log it at info level. Apart from
that, I've added some additional information about the currently active
client, such as when the last message was sent and received.
2024-11-14 11:09:00 +01:00
Yonas Habteab
d5051c7ea3 ApiListener: Log error context only once
When logging at the warning level, the logger will automatically look up
for registered context and append them to the log entry accordingly.
2024-11-14 11:05:53 +01:00
Alexander A. Klimov
82bf39e9f3 CHANGELOG.md: add v2.11.12 2024-11-14 10:02:47 +00:00
Yonas Habteab
d5cd5aff2c
Merge pull request #10080 from Icinga/net-stack-2.14.3
Fix network stack stability issues
2024-11-14 11:02:36 +01:00
Yonas Habteab
4850018464 Don't use thread-local variable in coroutine & process final cr in global thread pool 2024-11-13 15:36:57 +01:00
Yonas Habteab
2854c618dd HttpServerConnection: Drop yet another superfluous CpuBoundWork usage 2024-11-13 15:36:57 +01:00
Yonas Habteab
660b82b4f9 JsonRpcConnection: Don't read any data on shutdown
When the `Desconnect()` method is called, clients are not disconnected
immediately. Instead, a new coroutine is spawned using the same strand
as the other coroutines. This coroutine calls `async_shutdown` on the
TCP socket, which might be blocking. However, in order not to block
indefintely, the `Timeout` class cancels all operations on the socket
after `10` seconds. Though, the timeout does not trigger the handler
immediately; it creates spawns another coroutine using the same strand
as in the `JsonRpcConnection` class. This can cause unexpected delays if
e.g. `HandleIncomingMessages` gets resumed before the coroutine from the
timeout class. Apart from that, the coroutine for writing messages uses
the same condition, making the two symmetrical.
2024-11-13 15:35:57 +01:00
Julian Brost
58197dbbaa
Merge commit from fork
Icinga 2.14.3
2024-11-12 15:01:58 +01:00
Alexander A. Klimov
b55b536ceb Resolve merge conflicts with support/2.14
This reverts commit 850f79e774735a4a366e58f3fa68e446769bdd1a
which has already been cherry-picked there, but is also needed for v2.14.3.

This has the same effect as `git merge support/2.14`, but involves no merge,
no conflict resolution, less commits and a smaller diff.
2024-10-25 11:15:59 +02:00
Alexander A. Klimov
45452629db Icinga 2.14.3 v2.14.3 2024-10-25 11:15:45 +02:00
Alexander Aleksandrovič Klimov
8d4bae310e
Merge pull request #10202 from Icinga/gha2143
Fix GitHub actions
2024-10-24 09:56:16 +02:00
Alexander Aleksandrovič Klimov
4cd05d730b GHA: Linux: include Ubuntu 24.10 2024-10-23 16:12:25 +02:00
Alexander A. Klimov
bc433e3b68 GHA: Windows: don't require git.icinga.com/packaging/windows-icinga2
"A little copying is better than a little dependency."
- https://www.youtube.com/watch?v=PAAkCSZUG1c&t=9m28s
(Gopherfest 2015 | Go Proverbs with Rob Pike)
2024-10-23 16:12:25 +02:00
Alexander A. Klimov
850f79e774 Bump OpenSSL shipped for Windows to v3.0.15 2024-10-22 10:55:43 +02:00
Julian Brost
2febc5e18a Security: fix TLS certificate validation bypass
The previous validation in set_verify_callback() could be bypassed, tricking
Icinga 2 into treating invalid certificates as valid. To fix this, the
validation checks were moved into the IsVerifyOK() function.

This is tracked as CVE-2024-49369, more details will be published at a later time.
2024-10-22 10:41:00 +02:00
Yonas Habteab
84cf8fc291
Merge pull request #10173 from Icinga/214OpenSSL3015
Bump OpenSSL shipped for Windows to v3.0.15
2024-09-26 09:25:18 +02:00
Alexander A. Klimov
c1335af6b7 Bump OpenSSL shipped for Windows to v3.0.15 2024-09-25 11:28:08 +02:00
Yonas Habteab
3b57e4915f
Merge pull request #10163 from Icinga/next-check-cluster-sync-issue-2.14
Checkable: Don't recalculate `next_check` while processing remotely genrated check
2024-09-20 11:32:47 +02:00
Yonas Habteab
2d9917a673
Merge pull request #10162 from Icinga/unregister-invalid-objects-properly-2.14
Unregister invalid config objects properly
2024-09-20 11:28:33 +02:00
Yonas Habteab
200f198a35 Checkable: Don't recalculate next_check while processing remotely genrated check
Currently, when processing a `CheckResult`, it will first trigger an
`OnNextCheckChanged` event, which is sent to all connected endpoints.
Then, when `Checkable::ProcessCheckResult()` returns, an `OnCheckResult`
event is fired, which is of course also sent to all connected endpoints.

Next, the other endpoints receive the `event::SetNextCheck` cluster
event followed by `event::CheckResult`and invoke
`checkable#SetNextCheck()` and `Checkable#CheckResult()` with the newly
received check. So they also try to recalculate the next check
themselves and invalidate the previously received next check timestamp
from the source endpoint. Since each endpoint randomly initialises its
own scheduling offset, the recalculated next check will always differ by
a split second/millisecond on each of them. As a consequence, two Icinga
DB HA instances will generate two different checksums for the same state
and causes the state histories to be fully resynchronised after a
takeover/Icinga 2 reload.
2024-09-19 13:27:50 +02:00
Yonas Habteab
eeaa25c284 Unregister invalid config objects properly 2024-09-19 13:24:23 +02:00
Alexander Aleksandrovič Klimov
d94aa8759b
Merge pull request #10160 from Icinga/bugfix/do-not-sync-partially-initialised-objects-214
IcingaDB: Don't sync partially initialised objects
2024-09-18 17:29:31 +02:00
Yonas Habteab
bdc089ba95 IcingaDB: Don't sync partially initialised objects 2024-09-18 15:52:13 +02:00
Yonas Habteab
1d0a984d33
Merge pull request #10124 from Icinga/do-not-fail-removing-obsolete-downtimes-2.14
Don't fail to remove obsolete downtimes, remove RemoveAllDowntimes()
2024-09-17 17:17:42 +02:00
Yonas Habteab
2d970bcd3b
Merge pull request #10123 from Icinga/AddDowntime-trigger_name-2.14
Downtime::AddDowntime(): NULL-check pointer before deref not to crash
2024-09-17 16:09:16 +02:00
Yonas Habteab
221041487c
Merge pull request #10122 from Icinga/broken-timeperiod-2.14
Fix broken `TimePeriod/ScheduledDowntime`s
2024-09-17 15:56:49 +02:00
Yonas Habteab
235e4d4824
Merge pull request #10121 from Icinga/broken-runtime-config-sync-2.14
Fix broken runtime config sync
2024-09-17 15:20:56 +02:00
Yonas Habteab
c9aba3375b
Merge pull request #10119 from Icinga/2.14Boost1.86
Bump Boost shipped for Windows to v1.86
2024-09-17 15:20:05 +02:00
Yonas Habteab
06b01cb574
Merge pull request #10125 from Icinga/output-exit-code-2.14
Mention plugin exit codes outside [0..3] in the plugin output and warning log
2024-09-17 15:18:27 +02:00
Yonas Habteab
7a04966e78
Merge pull request #10131 from Icinga/heavy-update-missing-table-relations-2.14
Update object#config_hash after all relations queries
2024-09-17 15:14:28 +02:00
Alexander Aleksandrovič Klimov
9c50fa5d94
Merge pull request #10132 from Icinga/strip-cr-in-notification-messages-2.14
Strip '\r' in notification messages to avoid 'Content-Type: application/octet-stream'
2024-09-17 15:14:00 +02:00
Yonas Habteab
cad41fa76a
Merge pull request #10129 from Icinga/malloc_info-2.14
/v1/debug/malloc_info: call malloc_info(3) if available
2024-09-17 15:13:47 +02:00
Yonas Habteab
64d5778954
Merge pull request #10130 from Icinga/timeperiod-nth-day-of-month-off-by-one-2.14
Timeperiods: fix off by one when calculating n-th last weekday of the…
2024-09-17 15:10:46 +02:00