11543 Commits

Author SHA1 Message Date
Alexander Aleksandrovič Klimov
f714ca7982
Merge pull request #8867 from Icinga/bugfix/gha-cancel-211
GitHub actions: auto-cancel previous jobs for the same PR
2021-07-06 10:26:14 +02:00
Julian Brost
2dc5c9e47b GetObjectConfigPath: only truncate and hash comment and downtime filenames
This partially reverts 68a0079c26686363b6202a8abd2712d2bf96d9f2 and keeps the
fix only for comment and downtime objects for now. For reasoning, please see
the comment in the code.
2021-07-05 16:18:40 +02:00
Julian Brost
3db48de0e6 GetObjectPath: ensure use of escaped name in all cases and use TruncateUsingHash()
68a0079c26686363b6202a8abd2712d2bf96d9f2 introduced two problems that are fixed
with this commit:
1. The new truncated/hashed name did not use EscapeName()
2. There was a possible collision of names when creating objects with a full
   name of format "[80 characters]...[40 hex digits]" (i.e. the same as the
   truncated/hashed variant but short enough that it isn't hashed)
2021-07-05 16:18:40 +02:00
Julian Brost
fc0019b271 Utility: add a function to truncate strings while avoiding collisions 2021-07-05 16:18:40 +02:00
Alexander A. Klimov
c174456ed3 ConfigObjectUtility::GetObjectConfigPath(): hash names of not already existing objects
... to avoid too long file names.

refs #8022
2021-07-05 16:18:40 +02:00
Alexander A. Klimov
bea9d22c52 GitHub actions: build Windows 2021-07-05 16:13:50 +02:00
Alexander A. Klimov
28a9ee2b80 Don't use Appveyor 2021-07-05 16:13:50 +02:00
Alexander A. Klimov
66fbfc6746 Docs: provide shorter and batch-ier instructions on how to setup a Windows dev env 2021-07-05 16:13:50 +02:00
Julian Brost
e702fcff82 Update AppVeyor Config to use Visual Studio 2019 2021-07-05 16:13:50 +02:00
Julian Brost
7bce13eb2c Update Windows build scripts for Visual Studio 2019
$env:CMAKE_GENERATOR_PLATFORM is only used in configure-dev.ps1 but now
is also required in configure.ps1 to allow the build pipeline to be
upgraded to Visual Studio 2019.

Additionally bump the versions in paths for Boost and OpenSSL.
2021-07-05 16:13:50 +02:00
Alexander A. Klimov
889f4e7667 GitHub actions: auto-cancel previous jobs for the same PR
https://github.com/marketplace/actions/auto-cancellation-running-action
2021-07-05 16:11:40 +02:00
Julian Brost
4484c30e95
Merge pull request #8800 from Icinga/feature/release-v2.11.9
Version update and changelog for v2.11.9
v2.11.9
2021-05-27 09:26:45 +02:00
Julian Brost
fa9092889e Version update and changelog for v2.11.9 2021-05-26 16:08:05 +02:00
Alexander Aleksandrovič Klimov
0bf2c78cc4
Merge pull request #8810 from Icinga/bugfix/mysql-one-transaction-for-programstatus-2.11
IDO: Use own transaction for program status and make sure InternalNewTransaction() gets executed
2021-05-26 15:46:56 +02:00
Alexander Aleksandrovič Klimov
5f6fb3d617
Merge pull request #8770 from Icinga/bugfix/retry-rename-on-windows-2.11
Retry file rename operations on Windows for some errors (2.11)
2021-05-26 13:43:13 +02:00
Alexander Aleksandrovič Klimov
a18a2e3813
Merge pull request #8772 from Icinga/bugfix/problem-notification-at-downtime-end-2.11
Send problem notifications after downtime end for checkables in child zones (2.11)
2021-05-26 13:41:41 +02:00
Alexander Aleksandrovič Klimov
452665d774
Merge pull request #8776 from Icinga/bugfix/runworker-exceptions-2.11
Improve handling of exceptions thrown by RunWorker (2.11)
2021-05-26 13:37:37 +02:00
Alexander Aleksandrovič Klimov
031f379051
Merge pull request #8780 from Icinga/bugfix/concurent-notification-send-and-delete-2.11
Fix crash when notifications are sent while the notification object is deleted (2.11)
2021-05-26 13:36:18 +02:00
Alexander Aleksandrovič Klimov
42c32c70ac
Merge pull request #8784 from Icinga/bugfix/concurrent-schedule-downtime-delete-host-2.11
Fix null pointer dereferences when deleting objects while scheduling downtimes (2.11)
2021-05-26 13:35:43 +02:00
Alexander Aleksandrovič Klimov
ee21dc3f53
Merge pull request #8788 from Icinga/bugfix/api-put-object-deletion-211-7726
ConfigObjectUtility#CreateObject(): check config objects for duplicates
2021-05-26 10:41:12 +02:00
Noah Hilverling
98457f746b IDO-MySQL: Make sure InternalNewTransaction() and FinishAsyncQueries() get executed during high load 2021-05-26 10:35:23 +02:00
Noah Hilverling
cc9451b828 IDO: Use own transaction for programstatus 2021-05-26 10:35:23 +02:00
Julian Brost
77427bedae AddDowntime: return Downtime::Ptr instead of String containing the name
At numerous places in the code, something like this is performed:

    String name = Downtime::AddDowntime(...);
    Downtime::Ptr downtime = Downtime::GetByName(name);

However, `downtime` can be a `nullptr` after this as it is possible that
the downtime is deleted in between.

This commit changes the return type of `Downtime::AddDowntime` to return
a Downtime::Ptr instead of the full name of the downtime. `AddDowntime`
performs the very same `GetByName()` operation internally, but handles
the `nullptr` case correctly and throws an exception.
2021-05-26 08:54:01 +02:00
Julian Brost
5b5efab847 Properly handle service downtime referencing a deleted host
Only two out of three cases were handled properly by the code: host
downtimes referencing a deleted host and service downtimes referencing a
deleted service worked fine. However, if a service downtime references a
deleted host, `Host::GetByName()` returns `nullptr` which isn't
accounted for. Use `Service::GetByNamePair()` instead as this performs a
check for the host being null internally.
2021-05-26 08:54:01 +02:00
Julian Brost
9060264c64 Use reference-counted pointer in notification callback
`this` could be deleted after `Notification::BeginExecuteNotification`
exited and before `Notification::ExecuteNotificationHelper` finished.
This is fixed by constructing a `Notification::Ptr` and operate on that
one as it is properly reference-counted.
2021-05-26 08:53:33 +02:00
Julian Brost
1355341681 Try to log useful information for exceptions thrown by RunWorker 2021-05-26 08:52:37 +02:00
Julian Brost
b1536eac6f Catch exceptions thrown by RunWorker on Windows
The same is already done on other platforms in line 529.
2021-05-26 08:52:37 +02:00
Julian Brost
7511a5c3fc Only handle event::SetSuppressed{Notifications,NotificationTypes} within the local zone
Note that even when passing `nullptr` as target zone to `RelayMessage()`, the
cluster message will still be sent to the parent zone. These incoming messages
will now be rejected by the parent nodes. At the moment, there's no way to only
send within the local zone.
2021-05-26 08:52:05 +02:00
Julian Brost
c0c7d52921 Retry file rename operations on Windows for some errors 2021-05-26 08:51:22 +02:00
Alexander A. Klimov
83eba2b316 ConfigObjectUtility#CreateObject(): check config objects for duplicates
... not to delete already existing objects during a trial of re-creation.

refs #7726
2021-05-25 19:39:17 +02:00
Alexander Aleksandrovič Klimov
c6cf9c6279
Merge pull request #8791 from Icinga/feature/gha211
GitHub actions: build packages
2021-05-25 19:37:42 +02:00
Alexander A. Klimov
375a94404d Don't use Travis CI 2021-05-25 15:27:51 +02:00
Alexander A. Klimov
790db15675 GitHub actions: build packages 2021-05-25 15:27:51 +02:00
Alexander Aleksandrovič Klimov
04d8eee3e5
Merge pull request #8793 from Icinga/bugfix/211boost174
Support Boost 1.74
2021-05-25 15:26:19 +02:00
Alexander Aleksandrovič Klimov
073843f5f2
Merge pull request #8802 from Icinga/bugfix/211-7780
Fix building with Boost 1.71.
2021-05-25 15:25:18 +02:00
Bas Couwenberg
92cc5ecb5a Fix building with Boost 1.71.
The CMake file that detects Boost.Test version uses an older version
format, and incorrectly thinks that the available Boost version is
very old. This patch removes the version check, since Debian already
has a sufficiently recent Boost version.
2021-05-25 14:42:50 +02:00
Noah Hilverling
72e33d6300
Merge pull request #8789 from Icinga/bugfix/2.11-fix-non-unity-builds
Fix non-unity builds in support/2.11
2021-05-21 15:41:00 +02:00
Julian Brost
50820f1a73 Provide a conversion function from icinga::String to boost::string_view
Boost.Beast changed the signature of
boost::beast::http::basic_fields::set in version 1.74 so that no longer
allows passing an icinga::String instance as value. This adds a
conversion function so that it works again.
2021-05-20 16:28:30 +02:00
Julian Brost
058d267397 Use content_length method for setting the Content-Length header
Boost.Beast changed the signature of the previously used generic `set`
method so that it no longer accepts integer types, however there is
alreay a more specific method for setting the Content-Length header, so
use this one instead.
2021-05-20 16:28:30 +02:00
Alexander A. Klimov
590bd7ba1d Define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
... to enable compiling with Boost v1.74.

refs #8185
2021-05-20 16:28:30 +02:00
Louis Sautier
514a4e326f Fix ‘fs::copy_option’ has not been declared with boost 1.74.0
It was deprecated in
f199152b7d
2021-05-20 16:28:30 +02:00
Julian Brost
398a5baf70 Remove unused function declarations in tlsutility.hpp
These were introduced in c510fe4dfed0f65824bb259433faa0988caa2447, probably
when resolving a merge conflict. However, these functions do not exist in 2.11,
but refer to the Array type which is not included in the header, leading to
non-unity build failing.

This commit simply removes these declarations and thus restores non-unity
builds in 2.11.
2021-05-20 14:25:59 +02:00
Alexander Aleksandrovič Klimov
ff2001d7a1
Merge pull request #8783 from Icinga/probot/sync-changelog/bc63b653a427f283c9a1f475108d069f28c4b62c
CHANGELOG.md: add v2.10.7
2021-05-20 13:51:24 +02:00
Michael Friedrich
5247558156 CHANGELOG.md: add v2.10.7 2021-05-20 11:42:25 +00:00
Alexander Aleksandrovič Klimov
bc63b653a4
Merge pull request #8781 from Icinga/probot/sync-changelog/2c23a7e94f981b74a831a6535542710d6c048b84
CHANGELOG.md: add v2.10.6
2021-05-20 13:42:12 +02:00
Michael Friedrich
86a3209130 CHANGELOG.md: add v2.10.6 2021-05-20 11:36:32 +00:00
Alexander Aleksandrovič Klimov
2c23a7e94f
Merge pull request #8779 from Icinga/probot/sync-changelog/d17b4ecc4bfeb94611e4e8f5c52865540a9bb46b
CHANGELOG.md: add v2.9.3
2021-05-20 13:36:20 +02:00
Michael Friedrich
e35719f78e CHANGELOG.md: add v2.9.3 2021-05-20 11:30:26 +00:00
Noah Hilverling
d17b4ecc4b
Merge pull request #8560 from Icinga/bugfix/children-recover-too-late
On recovery: re-check children
v2.11.8
2020-12-15 13:11:46 +01:00
Alexander Aleksandrovič Klimov
7c7f549900
Merge pull request #8567 from Icinga/bugfix/fix-shared-ptr-2.11.8
Build fix: Use correct shared pointer implementation
2020-12-15 13:11:27 +01:00