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
Alexander A. Klimov
1446139125
PluginCheckTask::ProcessFinishedHandler(): warn about exit codes outside 0..3
...
in the plugin output as well, in addition to the warning log.
2024-09-17 12:33:01 +02:00
Alexander A. Klimov
0605577d4d
Make ProcessResult#ExitStatus and CheckResult#exit_status 64-bit ints
...
so that they can hold Windows exit codes like 3221225477 (>2147483647).
2024-09-17 12:33:01 +02:00
Alexander A. Klimov
2722deb6aa
/v1/debug/malloc_info: call malloc_info(3) if available
...
The GNU libc function malloc_info(3) provides memory allocation and usage
statistics of Icinga 2 itself.
2024-09-17 12:32:52 +02:00
Julian Brost
3247e83957
Timeperiods: fix off by one when calculating n-th last weekday of the month
...
A day specification like "monday -1" refers to the last Monday of the month.
However, there was an off by one if the first day of the next month is the same
day of the week, i.e. a Monday in this example.
LegacyTimePeriod::FindNthWeekday() picks a day to start the search for the day
in question. When given a negative n to search for the n-th last day, it
wrongly used the first day of the following month as the start and counted it
as if it was within the current month. This resulted in a 1/7 chance that the
result was one week too late.
This is fixed by using the last day of the current month instead.
2024-09-17 12:32:10 +02:00
Yonas Habteab
36e8c9c8fd
Update object#config_hash after all relations queries
2024-09-17 12:31:38 +02:00
Robert Scheck
bde4257793
Strip '\r' in notification messages to avoid 'Content-Type: application/octet-stream'
...
Without this patch, an accidential `\r` in e.g. `$NOTIFICATIONCOMMENT`
leads to a `Content-Type: application/octet-stream` header in e-mails.
The accidential `\r` might slip in usually using Icinga/Nagios apps...
2024-09-17 12:29:56 +02:00
Yonas Habteab
31c42dc2ca
Merge pull request #10145 from Icinga/formatdatetime-2.14
...
Overhaul Utility::FormatDateTime()
2024-09-16 12:41:57 +02:00
Yonas Habteab
27a4a25c9f
Merge pull request #10146 from Icinga/JsonRpcConnection-2.14
...
JsonRpcConnection#Send*(): discard messages ASAP once shutting down
2024-09-16 11:59:19 +02:00
Yonas Habteab
96839d829b
ApiListener: Reorder logging in ApiTimerHandler()
2024-09-03 16:49:02 +02:00
Yonas Habteab
b9b3e7a925
ApiListener: Catch & supress clients runtime errors
2024-09-03 16:49:02 +02:00
Yonas Habteab
561aedab1d
JsonRpcConnection: Raise an exception when trying to send to disconnected clients
2024-09-03 16:49:02 +02:00
Julian Brost
02334c5f29
Make sure log file is reopened when ApiListener::ReplayLog()
returns
2024-09-03 16:49:02 +02:00
Yonas Habteab
b0b41b1aff
Defer: Allow empty initialization & add SetFunc()
method
2024-09-03 16:49:01 +02:00
Yonas Habteab
5f2d31bf3c
Use Defer
class for cleanup in ApiListener::ReplayLog()
2024-09-03 16:49:01 +02:00