Johannes Schmidt
09eaa19b6b
Add debug output to find bug in PerfdataWriterConnection
2026-04-02 16:04:31 +02:00
Julian Brost
9d361e1fb3
Merge pull request #10734 from Icinga/deprecate-everything-we-dont-like
...
Schedule deprecated features for removal in v2.18
2026-03-31 10:25:44 +02:00
Johannes Schmidt
7d4af75189
Make ShowCodeLocation() show the full line with a LastColumn of 0
2026-03-24 13:53:31 +01:00
Alexander A. Klimov
85b16d2186
Remove unused IoEngine#m_AlreadyExpiredTimer
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
7b45d8d625
Remove unused IoEngine::YieldCurrentCoroutine()
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
cefa942c31
Make IoEngine#m_CpuBoundSemaphore unsigned
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
06cfdbb650
CpuBoundWork#CpuBoundWork(): don't spin on atomic int to acquire slot
...
This is inefficient and involves possible bad surprises regarding
waiting durations on busy nodes. Instead, use `AsioConditionVariable#Wait()`
if there are no free slots. It's notified by others'
`CpuBoundWork#~CpuBoundWork()` once finished.
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
c40c15ee11
Introduce AsioConditionVariable
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
e03db5f71d
[Refactor] CpuBoundWork#CpuBoundWork(): require an io_context::strand
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
149aecf3b9
CpuBoundWork#~CpuBoundWork(): just call #Done() to deduplicate code
2026-03-19 14:53:29 +01:00
Alexander A. Klimov
844b341225
Remove unused IoBoundWorkSlot
2026-03-19 14:53:29 +01:00
Julian Brost
6592eae21d
Merge pull request #10668 from Icinga/perfdata-writers-connection-handling
...
Add PerfdatawriterConnection to handle network requests for Perfdata Writers
2026-03-17 15:10:57 +01:00
Johannes Schmidt
907f41bae4
Use perfect-forwarding references to prevent passing temporaries
...
Without this change, it is easy to pass a temporary, for example a vector
returned by a function to ParallelFor(). With this commit a type-constraint
is added to disable the use of this function for rvalue sequences.
An alternative would have been to capture rvalue-references in the function,
but that would have made the function unnecessarily complex, involving tuple-capture
and `shared_ptr`s, while it is usually easy to control lifetime at the call-site.
2026-03-13 13:14:52 +01:00
Johannes Schmidt
eb97638743
Make retrieval of the vector size more generic
...
This also enables the use of the function with "containers" that
don't have a size function but implement an overload for `std::size()`,
like c-arrays with fixed sizes.
2026-03-12 15:37:24 +01:00
Yonas Habteab
c1763e4753
ObjectLock: allow to TryLock the mutex
2026-03-02 15:36:59 +01:00
Johannes Schmidt
7955d04ae3
Import std::chrono_literals into icinga namespace
2026-02-26 13:31:10 +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
Yonas Habteab
32887884e5
Make ValueGenerator more flexible & easy to use
...
This commit refactors the ValueGenerator class to be a template that can
work with any container type. Previously, one has to manually take care
of the used container by lazily iterating over it within a lambda. Now,
the `ValueGenerator` class itself takes care of all the iteration,
making it easier to use and less error-prone. The new base `Generator`
class is required to allow the `JsonEncoder` to handle generators in a
type-erased manner.
2026-02-10 16:57:56 +01:00
Johannes Schmidt
216e2d9861
Fix uninitialized member in ScriptError
2026-02-06 12:10:20 +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
Alexander Aleksandrovič Klimov
9bffe06169
Merge pull request #10388 from Icinga/Registry-Freeze
...
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
Freeze registries at startup, when everything has been registered
2026-01-26 17:28:43 +01:00
Alexander A. Klimov
74ac0183ca
Registry<U,T>: remove unused template typename U
2026-01-26 10:24:22 +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
Johannes Schmidt
1505f09ed6
Refactor HttpMessage into generalized templated types
...
This adds generalized IncomingHttpMessage and OutgoingHttpMessage templates
that support different types of streams (via a std::variant) and can both
be used for either requests or responses.
The tacked on metadata from the old HttpRequest and server connection from
the old HttpServerConnection have been moved to HttpApi(Request|Response)
classes that derive from the above generalized message types.
2026-01-22 17:20:32 +01:00
Yonas Habteab
0b2f22ce40
tlsutility: make cert ts configurable & use ASN1_TIME_compare for comparison
2025-12-04 13:01:48 +01:00
Brad Smith
bbc1859aa1
Have thread name length clamping also apply for the other OSes
...
This covers macOS, *BSDs, Linux, Cygwin.
NetBSD PTHREAD_MAX_NAMELEN_NP 32
macOS 64
OpenBSD 24
Linux/FreeBSD/DragonFly/Cygwin 16
2025-11-27 09:19:16 -05:00
Brad Smith
7aa777c40f
Fix usage of pthread_setname_np() on NetBSD
...
NetBSD's pthread_setname_np() takes a slightly different set of parameters.
2025-11-27 07:16:34 -05:00
Alvar
8c230df3da
Merge pull request #10640 from brad0/openbsd_dlopen
...
Fix dlopen()'ing libraries on OpenBSD
2025-11-27 12:13:18 +00:00
Brad Smith
d243da72e5
Fix dlopen()'ing libraries on OpenBSD
2025-11-27 04:52:28 -05:00
Brad Smith
cf8fc3d64f
Add tests for pthread_set_name_np() and pthread_setname_np()
...
Looks like the conversion from autoconf to CMake dropped
these tests along the way.
2025-11-27 10:48:54 +01:00
Brad Smith
77881a7e18
Enable the pthread_np.h header on OpenBSD and DragonFly
...
Necessary for pthread_set_name_np().
2025-11-25 15:46:02 -05:00
Johannes Schmidt
a2e0ce426f
Fix -Wunused-variable warnings
2025-11-19 12:00:58 +01:00
Johannes Schmidt
7b4697a237
Fix -Wredundant-move warnings
2025-11-19 12:00:58 +01:00
Johannes Schmidt
93e69ed0e8
Fix -Wsign-compare warnings
2025-11-19 12:00:58 +01:00
Johannes Schmidt
758d1b6873
Fix -Wsuggest-override 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
Alexander A. Klimov
68a8480251
Introduce Registry::GetInstance() to deduplicate such methods
...
in derived classes and inline them, as side effect, to speed up calls.
2025-11-07 18:01:38 +01:00
Alexander A. Klimov
2e3551e497
Introduce Registry#Freeze()
2025-11-07 18:01:38 +01:00
Alexander A. Klimov
496a65d0d0
Registry#Get*(): use shared locking to allow concurrent access
2025-11-07 18:01:38 +01:00
Alexander A. Klimov
7fc722e581
Make Registry#ItemMap a hash table to speed up lookups
2025-11-07 18:01:38 +01:00
Alexander A. Klimov
c3d9727133
Inline Registry#RegisterInternal() used only once
2025-11-07 18:01:38 +01:00
Alexander A. Klimov
87a2f9fade
Remove unused Registry#OnRegistered
2025-11-07 18:01:38 +01:00
Alexander A. Klimov
0fb4e4d642
Remove unused Registry#OnUnregistered
2025-11-07 18:01:38 +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
9612de881a
Fix compiler warnings by not std::move()ing where redundant
2025-10-17 17:08: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
315c9a3692
Fix compiler warnings by replacing x&&y||z with (x&&y)||z
2025-10-17 17:08:30 +02:00
Alexander Aleksandrovič Klimov
5d46ca4f77
Merge pull request #9730 from Icinga/don-t-define-use-openssl-callback-for-in-openssl-v1-1
...
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
Don't define/use OpenSSL*Callback() for/in OpenSSL > v1.1
2025-10-17 16:41:07 +02:00
Alexander A. Klimov
37b5c39e20
Fix compiler warnings by re-ordering member init in constructors
2025-10-17 15:33:57 +02:00
Alexander Aleksandrovič Klimov
c25297e26a
Merge pull request #9729 from Icinga/fix-compiler-warnings-by-removing-unused-variables
...
Container Image / Container Image (push) Waiting to run
Linux / alpine:bash (push) Waiting to run
Linux / amazonlinux:2 (push) Waiting to run
Linux / amazonlinux:2023 (push) Waiting to run
Linux / debian:11 (linux/386) (push) Waiting to run
Linux / debian:11 (push) Waiting to run
Linux / debian:12 (linux/386) (push) Waiting to run
Linux / debian:12 (push) Waiting to run
Linux / debian:13 (push) Waiting to run
Linux / fedora:41 (push) Waiting to run
Linux / fedora:42 (push) Waiting to run
Linux / opensuse/leap:15.6 (push) Waiting to run
Linux / opensuse/leap:16.0 (push) Waiting to run
Linux / registry.suse.com/suse/sle15:15.6 (push) Waiting to run
Linux / registry.suse.com/suse/sle15:15.7 (push) Waiting to run
Linux / rockylinux/rockylinux:10 (push) Waiting to run
Linux / rockylinux:8 (push) Waiting to run
Linux / rockylinux:9 (push) Waiting to run
Linux / ubuntu:22.04 (push) Waiting to run
Linux / ubuntu:24.04 (push) Waiting to run
Linux / ubuntu:25.04 (push) Waiting to run
Windows / Windows (push) Waiting to run
Fix compiler warnings by removing unused variables
2025-10-17 15:12:05 +02:00