Johannes Schmidt
2108300cf8
Add warnings to deprecated features indicating removal in v2.18
2026-03-27 14:20:55 +01:00
Johannes Schmidt
56c878d815
Improve debug message when dependency child/parent don't exist
...
Previously this didn't print which of host/service is referenced
and what the referenced non-existing checkable's name should have
been.
This commit adds that information.
2026-03-03 11:59:44 +01:00
Johannes Schmidt
27c954dde8
Merge pull request #10715 from Icinga/fix-ubsan-errors
...
Container Image / Container Image (push) Has been cancelled
Linux / alpine:bash (push) Has been cancelled
Linux / amazonlinux:2 (push) Has been cancelled
Linux / amazonlinux:2023 (push) Has been cancelled
Linux / debian:11 (linux/386) (push) Has been cancelled
Linux / debian:11 (push) Has been cancelled
Linux / debian:12 (linux/386) (push) Has been cancelled
Linux / debian:12 (push) Has been cancelled
Linux / debian:13 (push) Has been cancelled
Linux / fedora:41 (push) Has been cancelled
Linux / fedora:42 (push) Has been cancelled
Linux / fedora:43 (push) Has been cancelled
Linux / opensuse/leap:15.6 (push) Has been cancelled
Linux / opensuse/leap:16.0 (push) Has been cancelled
Linux / registry.suse.com/bci/bci-base:16.0 (push) Has been cancelled
Linux / registry.suse.com/suse/sle15:15.6 (push) Has been cancelled
Linux / registry.suse.com/suse/sle15:15.7 (push) Has been cancelled
Linux / rockylinux/rockylinux:10 (push) Has been cancelled
Linux / rockylinux:8 (push) Has been cancelled
Linux / rockylinux:9 (push) Has been cancelled
Linux / ubuntu:22.04 (push) Has been cancelled
Linux / ubuntu:24.04 (push) Has been cancelled
Linux / ubuntu:25.04 (push) Has been cancelled
Linux / ubuntu:25.10 (push) Has been cancelled
Windows / Windows (push) Has been cancelled
Fix undefined behavior discovered with `-fsanitize=undefined`
2026-02-19 08:38:40 +01:00
Johannes Schmidt
e976450bbb
Fix undefined behavior introduced by initializing last states with 99
2026-02-12 16:00:36 +01:00
Yonas Habteab
3b80153848
Remove AuthenticatedApiUser thread-local variable & pass it as param instead
2026-02-11 11:39:57 +01:00
Yonas Habteab
91c7e60df8
Replace all existing copyright headers with SPDX headers
...
I've used the following command to replace the original copyright header
lines in a C-style comment block:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{/\*[^*]*\(\s*c\s*\)\s*(\d{4})\s*Icinga\s+GmbH[^*]*\*/}{// SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n// SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
For files that use shell-style comments (#) like CMakeLists.txt, I've
used this command:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{#.*\(\s*c\s*\)\s(\d{4})\sIcinga\s+GmbH.*}{# SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n# SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
And for SQL files:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{--.*\(c\)\s(\d{4})\sIcinga\sGmbH.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{-- Copyright \(c\)\s(\d{4})\sIcinga\s+Development\sTeam.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
2026-02-04 14:00:05 +01:00
Yonas Habteab
36b41dbe11
Merge pull request #10698 from ymartin-ovh/pr-10687
...
Fix nullptr dereference on `{child_,parent_}service` navigation
2026-01-30 16:49:19 +01:00
Alexander Aleksandrovič Klimov
363a051e18
Merge pull request #9728 from Icinga/silence-compiler-warnings-about-unused-parameters
...
Silence compiler warnings about unused parameters
2026-01-23 16:40:54 +01:00
Alexander A. Klimov
4ba46f9eb2
Silence compiler warnings about unused parameters
...
Every of these parameters exists for a reason.
The best we can do is to convince the compiler.
2026-01-23 13:31:01 +01:00
Alexander A. Klimov
92b6034504
Downtime::AddDowntime(): remove unused parameter const MessageOrigin::Ptr& origin
2026-01-23 10:41:18 +01:00
Yannick Martin
1f7c38c792
Fix( #10687 ): address null pointer dereference on navigate
2026-01-16 18:14:46 +01:00
Yonas Habteab
ed9014103f
Merge pull request #10609 from Icinga/fix-misc-compiler-warnings
...
Container Image / Container Image (push) Has been cancelled
Linux / alpine:bash (push) Has been cancelled
Linux / amazonlinux:2 (push) Has been cancelled
Linux / amazonlinux:2023 (push) Has been cancelled
Linux / debian:11 (linux/386) (push) Has been cancelled
Linux / debian:11 (push) Has been cancelled
Linux / debian:12 (linux/386) (push) Has been cancelled
Linux / debian:12 (push) Has been cancelled
Linux / debian:13 (push) Has been cancelled
Linux / fedora:41 (push) Has been cancelled
Linux / fedora:42 (push) Has been cancelled
Linux / opensuse/leap:15.6 (push) Has been cancelled
Linux / opensuse/leap:16.0 (push) Has been cancelled
Linux / registry.suse.com/suse/sle15:15.6 (push) Has been cancelled
Linux / registry.suse.com/suse/sle15:15.7 (push) Has been cancelled
Linux / rockylinux/rockylinux:10 (push) Has been cancelled
Linux / rockylinux:8 (push) Has been cancelled
Linux / rockylinux:9 (push) Has been cancelled
Linux / ubuntu:22.04 (push) Has been cancelled
Linux / ubuntu:24.04 (push) Has been cancelled
Linux / ubuntu:25.04 (push) Has been cancelled
Windows / Windows (push) Has been cancelled
Fix misc compiler warnings
2025-11-19 14:26:57 +01:00
Johannes Schmidt
7b4697a237
Fix -Wredundant-move warnings
2025-11-19 12:00:58 +01:00
Johannes Schmidt
4f0a24f8ab
Add ABORT() macro for unconditionally failing ASSERTS
...
This is necessary to stop MSVC complaining that "not all paths return a value", because
it is not able to infer that the expression `false ? 0 : non_returning_function()`
never returns.
In the process of debugging this I've also slightly simplified the other assert macros and
abort function, so they don't need compiler specific preprocessor-paths anymore.
2025-11-19 11:55:49 +01:00
Yonas Habteab
017a4012f3
TimePeriod: properly validate ranges field
2025-11-14 16:38:41 +01:00
Johannes Schmidt
f42510f981
Merge pull request #9411 from Icinga/compiler-warnings
...
Container Image / Container Image (push) Has been cancelled
Linux / alpine:bash (push) Has been cancelled
Linux / amazonlinux:2 (push) Has been cancelled
Linux / amazonlinux:2023 (push) Has been cancelled
Linux / debian:11 (linux/386) (push) Has been cancelled
Linux / debian:11 (push) Has been cancelled
Linux / debian:12 (linux/386) (push) Has been cancelled
Linux / debian:12 (push) Has been cancelled
Linux / debian:13 (push) Has been cancelled
Linux / fedora:41 (push) Has been cancelled
Linux / fedora:42 (push) Has been cancelled
Linux / opensuse/leap:15.6 (push) Has been cancelled
Linux / opensuse/leap:16.0 (push) Has been cancelled
Linux / registry.suse.com/suse/sle15:15.6 (push) Has been cancelled
Linux / registry.suse.com/suse/sle15:15.7 (push) Has been cancelled
Linux / rockylinux/rockylinux:10 (push) Has been cancelled
Linux / rockylinux:8 (push) Has been cancelled
Linux / rockylinux:9 (push) Has been cancelled
Linux / ubuntu:22.04 (push) Has been cancelled
Linux / ubuntu:24.04 (push) Has been cancelled
Linux / ubuntu:25.04 (push) Has been cancelled
Windows / Windows (push) Has been cancelled
Fix compiler warnings
2025-10-21 15:23:31 +02:00
Alexander A. Klimov
78631fa319
Fix compiler warnings by ensuring variable initialization
2025-10-17 17:08:31 +02:00
Alexander A. Klimov
3d69a31043
Fix compiler warnings by removing unused variables
2025-10-17 09:56:46 +02:00
Alexander Aleksandrovič Klimov
9905e9af32
Merge pull request #10389 from Icinga/zone-endpoint-order
...
Zone#GetEndpoints(): return endpoints in the specified order, not randomly🎲
2025-08-22 10:11:51 +02:00
Julian Brost
63e9ef58ba
Prevent worst-case exponential complexity in dependency evaluation
...
So far, calling Checkable::IsReachable() traversed all possible paths to it's
parents. In case a parent is reachable via multiple paths, all it's parents
were evaluated multiple times, result in a worst-case exponential complexity.
With this commit, the implementation keeps track of which checkables were
already visited and uses the already-computed reachability instead of repeating
the computation, ensuring a worst-case linear runtime within the graph size.
2025-08-04 10:42:20 +02:00
Julian Brost
43f1e6f3a1
Move code involved in recursive dependency evaluation to helper class
...
Checkable::IsReachable() and DependencyGroup::GetState() call each other
recursively. Moving them to a common helper class allows adding caching to them
in a later commit without having to pass a cache between the functions (through
a public interface) or resorting to thread_local variables.
2025-08-04 10:42:20 +02:00
Chris Malton
ec48dae331
Correct a problem with expiry times not being passed through to AcknowledgeProblem
2025-06-23 11:57:29 +02:00
Julian Brost
dcd9a2dd41
Merge pull request #10457 from Icinga/remove-superfluous-dsl-functions
...
Drop superfluous (broken) DSL functions
2025-06-10 16:33:37 +02:00
Julian Brost
c41fe682c5
Merge pull request #10452 from Icinga/streamline-redis-and-db-values
...
IcingaDB: Make Redis & DB values consistent
2025-06-10 11:30:07 +02:00
Julian Brost
a15b706ee3
Merge pull request #10372 from WuerthPhoenix/10364-race-condition-while-calculating-object-state
...
Keep object locked until events are dispatched.
2025-06-06 17:19:21 +02:00
Julian Brost
4d9e9e7ed6
Merge pull request #9924 from ymartin-ovh/pr-9916
...
Fix `/v1/actions/` deadlock & nullptr dereference
2025-06-06 15:15:51 +02:00
Yonas Habteab
186571ec99
Refresh the states & types bitsets whenever states & types attrs change
...
Since the types and states attributes are user configurable and allowed to change at
runtime, we need to update the actual filter bitsets whenever these attributes change.
Otherwise, the filter bitsets would be stale and not reflect their current state.
2025-06-06 13:31:44 +02:00
Yonas Habteab
7037b18b34
IcingaDB: Send the int representation of states & types filter
2025-06-06 13:31:44 +02:00
Yonas Habteab
953a2e2e96
Merge {host,service}::StateTypeToString() & drop unused StateTypeFromString()
2025-06-06 13:31:44 +02:00
Yonas Habteab
9577af8e6d
Drop Checkable#process_check_result() DSL function
...
Not sure why it's introduced in the first place, maybe for debugging
purposes at the early stage of Icinga 2 dev but I failed to see an
actual useful use case for it that's worth its maintenance burden. So,
this commit dropped it entirely from the DSL language.
2025-06-03 17:09:57 +02:00
Yannick Martin
e6fc1b91a7
AddComment: return Comment::Ptr instead of String containing the name
...
Mimic 88e5744d54 and address nullptr on concurrent
add-comment / remove-comment actions.
2025-06-03 17:00:07 +02:00
William Calliari
9d40de78eb
Address comments from review
2025-05-29 09:16:46 +02:00
William Calliari
abf2fb392b
Keep object locked until events are dispatched.
2025-05-29 09:16:44 +02:00
Julian Brost
c253e7eb6e
Merge pull request #10397 from Icinga/activation-priority-10179
...
Checkable#ProcessCheckResult(): discard🗑️ CR or delay its producers shutdown
2025-05-28 12:30:40 +02:00
Alexander A. Klimov
36743f3100
Checkable#ProcessCheckResult(): discard CR or delay its producers shutdown
2025-05-23 14:53:58 +02:00
Alexander A. Klimov
f4691dd054
Require to pass WaitGroup::Ptr to several methods
...
Namely:
Checkable#ProcessCheckResult()
ClusterCheckTask::ScriptFunc()
ClusterZoneCheckTask::ScriptFunc()
DummyCheckTask::ScriptFunc()
ExceptionCheckTask::ScriptFunc()
IcingaCheckTask::ScriptFunc()
IfwApiCheckTask::ScriptFunc()
NullCheckTask::ScriptFunc()
PluginCheckTask::ScriptFunc()
RandomCheckTask::ScriptFunc()
SleepCheckTask::ScriptFunc()
IdoCheckTask::ScriptFunc()
IcingadbCheck::ScriptFunc()
CheckCommand#Execute()
Checkable#ExecuteCheck()
ClusterEvents::ExecuteCheckFromQueue()
ExternalCommandProcessor::Process*CheckResult()
ExternalCommandCallback
ExternalCommandProcessor::Execute()
ExternalCommandProcessor::ExecuteFromFile()
ExternalCommandProcessor::ProcessFile()
LivestatusQuery#ExecuteCommandHelper()
LivestatusQuery#Execute()
2025-05-23 14:53:58 +02:00
Yonas Habteab
2b0f73987e
Merge pull request #10443 from Icinga/use-correct-timeout-for-command-endpoints
...
Checkable: Use correct timeout for rescheduling remote checks
2025-05-23 10:14:49 +02:00
Alexander Aleksandrovič Klimov
ec2080dcc1
Merge pull request #9731 from Icinga/fix-compiler-warnings-by-copy-constructing-loop-variables-explicitly
...
Fix compiler warnings by (copy-)constructing loop variables explicitly or not at all
2025-05-21 14:26:47 +02:00
Alexander A. Klimov
22e75f08fa
Fix compiler warnings by not unnecessarily (copy-)constructing loop variables
2025-05-21 11:36:32 +02:00
Alexander Aleksandrovič Klimov
5c20b1ae12
Merge pull request #10444 from Icinga/ProcessingResult-NoCheckResult
...
Remove unused ProcessingResult::NoCheckResult
2025-05-20 12:54:41 +02:00
Alexander A. Klimov
69d2a0442a
Remove unused ProcessingResult::NoCheckResult
...
No one passes a NULL CR to Checkable#ProcessCheckResult() anymore.
2025-05-20 10:41:26 +02:00
Alexander A. Klimov
55fc0e51ff
Checkable#process_check_result(): don't pass NULL CR to Checkable#ProcessCheckResult()
...
It's ignored anyway.
2025-05-20 10:33:20 +02:00
Yonas Habteab
0c2215a9f8
Checkable: Use correct timeout for rescheduling remote checks
...
Previously, the `command#timeout` which by default is `1m`, was used to reschedule
the just sent remote check. However, this results into a bunch of extra checks being
sent to the remote host, even though the first one is still running. That's because
if one want to override the default timeout of the command for a specific host/service,
one has to set the `checkable#check_timeout` attribute to the desired value. So, this
commit makes sure that the `checkable#check_timeout` attribute (if set) is used to
reschedule the remote check.
2025-05-19 14:07:33 +02:00
Johannes Schmidt
f8d3bacc29
Fix warnings related to enum integer conversion
2025-05-19 12:31:22 +02:00
Johannes Schmidt
6a6c494279
Mark MakeName and ParseName virtual methods as override
2025-05-19 11:33:22 +02:00
Yonas Habteab
83a0f9d217
Merge pull request #10361 from Icinga/reset-no-more-notifications-only-on-recovery
...
Notification: Reset internal states on (missed)recovery
2025-05-16 09:53:10 +02:00
Yonas Habteab
d750bff193
Notification: Fix incorrectly dropped recovery & ACK notifications
...
Previously, recovery and ACK notifications were not delivered to users
who weren't notified about the problem state while having a configured
`Problem` type filter. However, since the type filter can also be
configured on the `Notification` object level, this resulted to an
incorrect behaviour. This PR changes the existing logic so that the
recovery and ACK notifications gets dropped only if the `Problem` filter
is configured on both the `User` and `Notification` object levels.
2025-05-13 09:46:35 +02:00
Yonas Habteab
4596b44171
Reset no_more_notifications on filter mismatch correctly
...
Previously, if you enable flapping for a Checkable but the corresponding
`Notification` object does not have `FlappingStart` or `FlappingEnd`
types set, the `no_more_notifications` flag wasn't reset to false again.
This commit ensures that this flag is always reset on `Recovery` even
the type filter does not match including when we miss the `Recovery` due
to Flapping state.
2025-05-12 12:03:13 +02:00
Yonas Habteab
9166326876
Notification: Reset notified problem users on flapping end as well
2025-05-12 12:03:13 +02:00
Yonas Habteab
86365a4e2b
Notification: Clear last notified state per user on flapping end as well
2025-05-12 12:03:13 +02:00