Commit graph

14663 commits

Author SHA1 Message Date
Johannes Schmidt
09eaa19b6b Add debug output to find bug in PerfdataWriterConnection 2026-04-02 16:04:31 +02:00
Johannes Schmidt
9f46abc179 Enable parallel testing in Linux CI and container image build 2026-04-02 14:09:04 +02:00
Johannes Schmidt
dc9dbc7bdb Fix PerfdataWriterConnection test-cases on parallel build 2026-04-02 14:09:00 +02:00
Johannes Schmidt
a05e2a3554 Rename EnsureCertFor to GetCertFor 2026-03-31 16:31:49 +02:00
Johannes Schmidt
f9a7e004b5 Generate ctest fixtures for generating CA and certificates 2026-03-31 16:31:49 +02:00
Johannes Schmidt
7c59c11417 Give CTestProperties a polymorphic interface 2026-03-31 16:31:49 +02:00
Johannes Schmidt
20ff982127 Make unit-test data and cache directory unique per test
This is necessary for parallel test execution so that tests don't overwrite
or delete (destructor of the fixture) data in these directories.

This is implemented by generating a unique name for each test with
`Utility::NewUniqueId()`.
2026-03-31 16:31:49 +02:00
Johannes Schmidt
c844a10dd4 Add network label to http tests
Mostly unrelated change to add the network label to test suites
already touched by other changes in this PR. The label is already
used for the perfdata writer tests to make it easy to exclude tests
that need a network connection when building and testing in a sandbox.
2026-03-31 16:31:49 +02:00
Johannes Schmidt
52dcf910b6
Merge pull request #10776 from Icinga/give-windows-more-time
Some checks are pending
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 / fedora:43 (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/bci/bci-base: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
Linux / ubuntu:25.10 (push) Waiting to run
Windows / Windows (push) Waiting to run
Fix sporadic fails in timer unit-tests on Windows
2026-03-31 12:30:13 +02:00
Julian Brost
4f13651cb0
Merge pull request #10727 from Icinga/icingadb-missing-exception-messages
Redis exceptions: add proper what() messages
2026-03-31 10:27:33 +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
72ebd43ef1 Give base_timer/(invoke|scope) timers a 10x multiplier on Windows 2026-03-31 09:33:09 +02:00
Johannes Schmidt
3f670463f4 Revert "Give timer tests more leeway for inaccurate implementations"
This reverts commit 1430e63e72.
2026-03-31 09:32:28 +02:00
Julian Brost
207764584a Redis exceptions: remove inline specifiers
Remove them as they are redundant, as requested in the PR review.
2026-03-27 17:02:05 +01:00
Julian Brost
221382486e Redis exceptions: use BOOST_THROW_EXCEPTION
Use it for consistency, as requested in the PR review.
2026-03-27 17:01:51 +01:00
Julian Brost
862f012381 Redis exceptions: add proper what() messages
RedisDisconnected::what() and RedisProtocolError::what() always returned an
empty string. Similarly, BadRedisType::what() and BadRedisInt::what() only
return the value that couldn't be parsed without any information about the
exception type. If only what() is used when printing the exception, as it's
typical, this results in unhelpful log messages like the following when simply
stopping the Redis server:

    [2026-02-23 14:33:33 +0100] critical/IcingaDB: Error during receiving the response to a query which has been fired and forgotten: Connection reset by peer [system:104 at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:134 in function 'do_complete']
    [2026-02-23 14:33:33 +0100] critical/IcingaDB: Error during receiving the response to a query which has been fired and forgotten:
    [2026-02-23 14:33:33 +0100] critical/IcingaDB: Error during receiving the response to a query which has been fired and forgotten:
    [2026-02-23 14:33:33 +0100] critical/IcingaDB: Cannot connect to redis-1:6379: Connection refused [system:111 at /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp:98 in function 'do_complete']

This commit changes these messages so that something like "Redis disconnected",
"Redis protocol error: bad int: foo", or "Redis protocol error: bad type: ?" is
returned. In doing so, it also removes a member of type std::vector<char> in
BadRedisInt as this is unsafe to use in exceptions (it violates the requirement
that copy constructor and assignment must be nothrow, see
https://en.cppreference.com/w/cpp/error/exception.html#Standard_exception_requirements).

With this commit, the log messages are now a bit more helpful:

    [2026-02-23 15:08:23 +0100] critical/IcingaDB: Error during receiving the response to a query which has been fired and forgotten: Connection reset by peer [system:104 at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:134 in function 'do_complete']
    [2026-02-23 15:08:23 +0100] critical/IcingaDB: Error during receiving the response to a query which has been fired and forgotten: Redis disconnected
    [2026-02-23 15:08:23 +0100] critical/IcingaDB: Error during receiving the response to a query which has been fired and forgotten: Redis disconnected
    [2026-02-23 15:08:23 +0100] critical/IcingaDB: Cannot connect to redis-1:6379: Connection refused [system:111 at /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp:98 in function 'do_complete']
2026-03-27 17:01:49 +01:00
Johannes Schmidt
1e022db535 Document the removal of deprecated features in v2.18 2026-03-27 14:20:58 +01:00
Johannes Schmidt
2108300cf8 Add warnings to deprecated features indicating removal in v2.18 2026-03-27 14:20:55 +01:00
Yonas Habteab
895dea2dc4
Merge pull request #10770 from Icinga/problem-chars
Some checks failed
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
Warn on problematic object names
2026-03-27 10:21:58 +01:00
Yonas Habteab
ad9d59df3b
Merge pull request #10772 from Icinga/dependabot/github_actions/korthout/backport-action-4.3.0
Bump korthout/backport-action from 4.2.0 to 4.3.0
2026-03-27 09:55:03 +01:00
dependabot[bot]
f8c21c191c
Bump korthout/backport-action from 4.2.0 to 4.3.0
Bumps [korthout/backport-action](https://github.com/korthout/backport-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](4aaf0e03a9...3c06f323a5)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-27 04:07:14 +00:00
Julian Brost
3312ed7ec4
Merge pull request #9990 from Icinga/re-think-cpuboundwork-implementation-9988
Some checks are pending
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 / fedora:43 (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/bci/bci-base: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
Linux / ubuntu:25.10 (push) Waiting to run
Windows / Windows (push) Waiting to run
CpuBoundWork#CpuBoundWork(): don't spin on atomic int to acquire slot
2026-03-26 15:21:13 +01:00
Yonas Habteab
4039b39061 Warn if object name contains ctrl characters 2026-03-26 15:01:15 +01:00
Yonas Habteab
da521203b1 Endpoint: warn if endpoint name exceeds 64 characters 2026-03-26 13:58:57 +01:00
Yonas Habteab
5a4cfae182 Warn of object name exceeds 255 characters 2026-03-26 13:58:57 +01:00
Yonas Habteab
2e6d23701a Warn about leading and trailing WSP in object names 2026-03-26 13:58:57 +01:00
Julian Brost
ed403294a3 OutgoingHttpMessage: don't use shared_ptr for m_CpuBoundWork
This change just gives clear ownership over the CpuBoundWork to the
OutgoingHttpMessage, instead of the previous shared_ptr and weak_ptr
combination with an unclear purpose.
2026-03-26 11:47:45 +01: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
Alexander A. Klimov
fdc08c2e00 OutgoingHttpMessage#Flush(): release CpuBoundWork slot
so that `/v1/events` doesn't have to use `IoBoundWorkSlot`.
`IoBoundWorkSlot#~IoBoundWorkSlot()` will wait for a free semaphore slot
which will be almost immediately released by `CpuBoundWork#~CpuBoundWork()`.
Just releasing the already aquired slot manually is more efficient.
2026-03-19 14:51:19 +01:00
Yonas Habteab
50b4bc5dce
Merge pull request #10757 from Icinga/10754
Some checks failed
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
Don't upload 32 bit MSIs to Chocolatey
2026-03-17 15:31:18 +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
75b2ec6d96 Add unit-tests for PerfdataWriterConnection
There's a set of two tests for each perfdatawriter, just
to make sure they can connect and send data that looks reasonably
correct, and to make sure pausing actually works while the connection
is stuck.

Then there's a more in-depth suite of tests for PerfdataWriterConnection
itself, to verify that connection handling works well in all types
of scenarios.

Co-authored-by: Yonas Habteab <yonas.habteab@icinga.com>
2026-03-17 12:11:30 +01:00
Johannes Schmidt
2ac0b8aeb4 Add documentation for the new disconnect_timeout config options 2026-03-17 12:11:30 +01:00
Johannes Schmidt
da2fc9df01 Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
Julian Brost
41109e20d6
Merge pull request #10744 from Icinga/use-string-view-consistently
Some checks are pending
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 / fedora:43 (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/bci/bci-base: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
Linux / ubuntu:25.10 (push) Waiting to run
Windows / Windows (push) Waiting to run
IcingaDB: consistently use `const char*` literals everywhere
2026-03-16 13:00:36 +01:00
Yonas Habteab
1a352a9c8f
Merge pull request #10758 from Icinga/dependabot/github_actions/actions/create-github-app-token-3.0.0
Some checks are pending
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 / fedora:43 (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/bci/bci-base: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
Linux / ubuntu:25.10 (push) Waiting to run
Windows / Windows (push) Waiting to run
Bump actions/create-github-app-token from 2.2.1 to 3.0.0
2026-03-16 09:13:39 +01:00
Yonas Habteab
fa514e6336 IcingaDB: use a statically initialized list of syncable types for Redis keys 2026-03-16 08:39:12 +01:00
dependabot[bot]
3fb70662cc
Bump actions/create-github-app-token from 2.2.1 to 3.0.0
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 2.2.1 to 3.0.0.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v2.2.1...v3.0.0)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 04:09:45 +00:00
Yonas Habteab
cb872ee5c8 IcingaDB: consistently use const char* literals everywhere
Co-Authored-By: Julian Brost <julian.brost@icinga.com>
2026-03-13 16:14:12 +01:00
Yonas Habteab
f593330735 IcingaDB: change const T to const T& to avoid stupid String copying 2026-03-13 16:14:12 +01:00
Johannes Schmidt
8f85e8b72a
Merge pull request #10756 from Icinga/improve-parallel-for
Some checks failed
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
Improve `WorkQueue::ParallelFor()`
2026-03-13 16:12:32 +01:00
Alexander A. Klimov
c55e171f4b Fix copy and paste error in build log message 2026-03-13 14:16:25 +01:00