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
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
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
Yonas Habteab
ad7495dc0e
Don't fail to remove obsolete downtimes
2024-09-17 15:06:45 +02:00
Yonas Habteab
6347c9089d
Don't loose args in recursive Downtime::RemoveDowntime()
call
2024-09-17 15:06:45 +02:00
Yonas Habteab
088f4e0f48
Introduce & use enum DowntimeRemovalReason
2024-09-17 15:06:45 +02:00
Alexander A. Klimov
d7a590e3ef
Remove unused Checkable#RemoveAllDowntimes()
2024-09-17 15:06:45 +02:00
Alexander A. Klimov
b09517e876
Bump Boost shipped for Windows to v1.86
2024-09-17 12:33:47 +02:00
Yonas Habteab
b70f4da208
Don't allow to modify/create/delete an object concurrently
2024-09-17 12:33:35 +02:00
Yonas Habteab
395a1398f6
ConfigObjectUtility#CreateObject()
: Use Defer
for config path cleanup
2024-09-17 12:33:35 +02:00
Yonas Habteab
42891028ca
ApiListener: Process cluster config updates sequentially
2024-09-17 12:33:35 +02:00
Yonas Habteab
3d5e0fef69
Introduce RAII style ObjectNameLock
class
2024-09-17 12:33:35 +02:00
Yonas Habteab
cf11fe0177
ConfigObjectUtility
: Use AtomicFile
to store object config files
2024-09-17 12:33:35 +02:00
Yonas Habteab
5f9868d97a
Add advanced timeperiod range,include/exclude test cases
2024-09-17 12:33:27 +02:00
Yonas Habteab
b48dcc9f77
tests: Add some basic tests cases for LegacyTimePeriod::IsInTimeRange()
2024-09-17 12:33:27 +02:00
Yonas Habteab
574cbb4b4e
Check segemnt start date inclusively in TimePeriod::IsInside()
2024-09-17 12:33:27 +02:00
Yonas Habteab
ed16377349
Fix broken timeperiods/scheduleddowntimes
2024-09-17 12:33:27 +02:00
Alexander A. Klimov
b3c914242c
l_LegacyDowntimesCache: delete removed objects not to leak memory
2024-09-17 12:33:16 +02:00
Alexander A. Klimov
58a10ad312
/v1/actions/schedule-downtime: reject request on invalid trigger_name
...
For this purpose lookup the specified Downtime. Also pass Downtime objects,
not just names, to Downtime::AddDowntime() not to lookup it twice.
2024-09-17 12:33:16 +02:00
Alexander A. Klimov
a3dd32e6e5
[Refactor] Downtime::GetDowntimeIDFromLegacyID(): return the Downtime itself
...
not just its name.
2024-09-17 12:33:16 +02:00
Alexander A. Klimov
9cf585b625
[Refactor] l_LegacyDowntimesCache: store Downtime objects, not just their names
...
to avoid names of vanished objects.
2024-09-17 12:33:16 +02:00