Julian Brost
6104df37dc
Add documentation for cast_exception function
2021-07-08 13:59:39 +02:00
Julian Brost
27767b1aa3
Pass fallback stacktrace to DiagnosticInformation in terminate handler
...
By default, DiagnosticInformation uses the stack trace saved when the
exception was thrown, but this mechanism is not in use on Windows.
Gathering a stacktrace in the terminate handler serves as a fallback.
2021-07-08 13:59:39 +02:00
Julian Brost
58d553a971
Replace icinga::StackTrace with boost::stacktrace::stacktrace
...
Provides roughly the same functionality but works better on certain
platforms (especially Windows) and is less code to maintain.
2021-07-08 13:59:39 +02:00
Julian Brost
fb303f5205
Print details in uncaught SEH exception handler
2021-07-08 13:59:39 +02:00
Julian Brost
a77c37da8e
Move error message and time to the beginning of the SEH crash log
...
This is more similar to the normal exception crashlog which also states
the problem and time at the beginning of the file.
2021-07-08 13:59:39 +02:00
Julian Brost
2c9b1d8415
Use boost::stacktrace instead of custom implementation in Windows SEH filter
2021-07-08 13:59:39 +02:00
Julian Brost
0b9ef5ab6d
Run termination handler for uncaught C++ exceptions on Windows
...
On Windows, the termination handler is executed for uncaught C++
exceptions unless a SEH unhandled exception filter is also set. In this
case, this filter has to explicitly chain the default filter to keep
this behavior.
2021-07-08 13:59:39 +02:00
Alexander Aleksandrovič Klimov
7c4996d1c2
Merge pull request #8878 from Icinga/bugfix/fixed-dt-end-notify-211
...
Checkable::NotifyDowntimeEnd(): don't send Downtime end notification unless triggered
2021-07-07 22:37:04 +02:00
Alexander Aleksandrovič Klimov
8a80e43507
Merge pull request #8880 from Icinga/feature/scheduleddowntime-change-remove-downtimes-211
...
On ScheduledDowntime change: remove downtimes created before change
2021-07-07 21:31:29 +02:00
Alexander Aleksandrovič Klimov
56f4313aed
Merge pull request #8888 from Icinga/feature/openssl-1.1.1k-2.11
...
Bump OpenSSL to 1.1.1k
2021-07-07 21:30:12 +02:00
Julian Brost
0f6e31d7a1
Bump OpenSSL to 1.1.1k
2021-07-07 16:48:27 +02:00
Julian Brost
b43c23296f
Merge pull request #8887 from Icinga/feature/windows-build-scripts-32-bit-2.11
...
Windows build scripts: allow setting BITS=32 to use 32 bit dependency paths by default
2021-07-07 16:46:32 +02:00
Alexander A. Klimov
05b2606fbb
Checkable::NotifyDowntimeEnd(): don't send Downtime end notification unless triggered
...
... for fixed Downtimes as well.
2021-07-07 15:44:48 +02:00
Alexander A. Klimov
084acbe028
On ScheduledDowntime change: remove future downtimes created before change
...
refs #8309
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
ffa3872b28
On ScheduledDowntime change: ignore downtimes created before change
...
... while creating new downtimes.
refs #8309
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
a262d18921
Introduce Downtime#config_owner_hash
...
refs #8309
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
743af40114
ScheduledDowntime: ignore not related Downtimes while creating Downtimes
2021-07-07 15:44:46 +02:00
Julian Brost
a038f513aa
Bump OpenSSL to 1.1.1k
2021-07-07 15:28:50 +02:00
Julian Brost
1c8b075efd
Windows build scripts: allow setting BITS=32 to use 32 bit dependency paths by default
2021-07-07 15:02:48 +02:00
Noah Hilverling
013ff97ae1
Merge pull request #8870 from Icinga/bugfix/downtime-for-host-service-with-long-name-8022-211
...
ConfigObjectUtility::GetObjectConfigPath(): hash names of not already existing objects
2021-07-07 10:39:03 +02:00
Noah Hilverling
13f091272f
Merge pull request #8871 from Icinga/bugfix/harden-scheduled-downtimes-211
...
ScheduledDowntime::TimerProc(): Catch exceptions to make sure other downtimes are still created
2021-07-07 10:38:57 +02:00
Noah Hilverling
65b608bcf8
Merge pull request #8872 from Icinga/bugfix/new-connection-timeout-211
...
Add timeout for full Icinga connection handshake
2021-07-07 10:38:51 +02:00
Noah Hilverling
f444d1e4f9
ScheduledDowntime::TimerProc(): Catch exceptions to make sure other downtimes are still created
2021-07-06 12:27:57 +02:00
Julian Brost
2131318c48
Add timeout for all new connections
...
This commit adds a timeout for both establishing new outgoing and incoming
connections. This timeout applies to everything until the connection is in a
state where either JsonRpcConnection or HttpServerConnection takes over.
2021-07-06 11:33:48 +02:00
Alexander Aleksandrovič Klimov
9512e7b30b
Merge pull request #8868 from Icinga/feature/gha-windows-211
...
GitHub actions: build Windows
2021-07-06 10:26:43 +02:00
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