13250 Commits

Author SHA1 Message Date
Yonas Habteab
e3a7ee079a Introduce RAII style ObjectNameLock class 2024-09-20 11:05:47 +02:00
Yonas Habteab
752f7c4ab6 ConfigObjectUtility: Use AtomicFile to store object config files 2024-09-20 10:30:41 +02:00
Yonas Habteab
adc350da08
Merge pull request #10134 from Icinga/2.13Boost1.86
Bump Boost shipped for Windows to v1.86
2024-09-19 12:00:42 +02:00
Yonas Habteab
20a73f6d13
Merge pull request #10127 from Icinga/AddDowntime-trigger_name-2.13
Downtime::AddDowntime(): NULL-check pointer before deref not to crash
2024-09-18 10:50:16 +02:00
Yonas Habteab
3d1a2b4e44
Merge pull request #10128 from Icinga/broken-timeperiod-2.13
Fix broken `TimePeriod/ScheduledDowntime`s
2024-09-18 10:36:41 +02:00
Yonas Habteab
1938268609
Merge pull request #10133 from Icinga/timeperiod-nth-day-of-month-off-by-one-2.13
Timeperiods: fix off by one when calculating n-th last weekday of the month
2024-09-18 10:28:07 +02:00
Alexander A. Klimov
7761d6f78b l_LegacyDowntimesCache: delete removed objects not to leak memory 2024-09-17 16:44:57 +02:00
Alexander A. Klimov
d09d051fad /v1/actions/schedule-downtime: reject request on invalid trigger_name
For this purpose lookup the specified Downtime. Also pass Downtime objects,
not just names, to Downtime::AddDowntime() not to lookup it twice.
2024-09-17 16:44:57 +02:00
Alexander A. Klimov
0bba441a86 [Refactor] Downtime::GetDowntimeIDFromLegacyID(): return the Downtime itself
not just its name.
2024-09-17 16:44:57 +02:00
Alexander A. Klimov
5a155346e7 [Refactor] l_LegacyDowntimesCache: store Downtime objects, not just their names
to avoid names of vanished objects.
2024-09-17 16:44:57 +02:00
Yonas Habteab
fb46d312e5 Add advanced timeperiod range,include/exclude test cases 2024-09-17 16:44:32 +02:00
Yonas Habteab
be775b4baf tests: Add some basic tests cases for LegacyTimePeriod::IsInTimeRange() 2024-09-17 16:44:32 +02:00
Yonas Habteab
e611dc65ea Check segemnt start date inclusively in TimePeriod::IsInside() 2024-09-17 16:44:32 +02:00
Yonas Habteab
3de7ec062b Fix broken timeperiods/scheduleddowntimes 2024-09-17 16:44:32 +02:00
Julian Brost
6986417533 Timeperiods: fix off by one when calculating n-th last weekday of the month
A day specification like "monday -1" refers to the last Monday of the month.
However, there was an off by one if the first day of the next month is the same
day of the week, i.e. a Monday in this example.

LegacyTimePeriod::FindNthWeekday() picks a day to start the search for the day
in question. When given a negative n to search for the n-th last day, it
wrongly used the first day of the following month as the start and counted it
as if it was within the current month. This resulted in a 1/7 chance that the
result was one week too late.

This is fixed by using the last day of the current month instead.
2024-09-17 16:44:09 +02:00
Alexander A. Klimov
7d9fb17976 Bump Boost shipped for Windows to v1.86 2024-09-17 16:43:42 +02:00
Yonas Habteab
bf24477638
Merge pull request #10109 from Icinga/gha21310
Update GitHub actions
2024-09-03 14:59:14 +02:00
Alexander A. Klimov
8c02210e63 Update AUTHORS 2024-08-06 11:32:36 +02:00
Alvar Penning
a12b501a51 GHA: Unbreak Windows Tests
As seen in the recent GHA run for #10102, the two Windows Actions have
failed. The output log contains:

> DEBUG:   27+  >>>> ctest.exe -C "${env:CMAKE_BUILD_TYPE}" -T test -O $env:ICINGA2_BUILDPATH/Test.xml
> --output-on-failure --log_level=all
> CMake Error: Unknown argument: --log_level=all
> CMake Error: Run 'ctest --help' for all supported options.

After consulting ctest(1), older versions included, I have never found a
mention of the "--log_level" flag. Since the useful
"--output-on-failure" flag is already set, which will "[o]utput anything
outputted by the test program if the test should fail", I do not see any
further reason for more logging information.

This flag was introduced in 7665143afa500dd589546665124293b9c1206265,
but I have not found any reasoning for the flag in particular.
2024-08-06 11:29:50 +02:00
Alexander Aleksandrovič Klimov
a3f1b91203 GHA: add openSUSE 15.6 and SLES 15.6 2024-08-06 11:03:02 +02:00
Alexander A. Klimov
1ccecb09c1 GHA: drop EOL EL7 2024-08-06 11:03:02 +02:00
Alexander Aleksandrovič Klimov
37e4d7c51a
Merge pull request #10089 from Icinga/win21310
Bump Windows deps
2024-06-13 17:00:11 +02:00
Alexander A. Klimov
3fefdf2294 Bump OpenSSL shipped for Windows to v3.0.14 2024-06-13 15:09:34 +02:00
Alexander A. Klimov
8d7a12c42e Bump Boost shipped for Windows to v1.85
Note: For doc/21-development.md use:

perl -pi -e 's/(boost[-\w]*?1[-_]?)84/${1}85/g' doc/21-development.md
2024-06-13 15:09:23 +02:00
Alexander Aleksandrovič Klimov
c0d0203a5c
Merge pull request #10087 from Icinga/gha21310
Update GitHub actions
2024-06-13 12:46:30 +02:00
Alexander Aleksandrovič Klimov
48530e4b52 CMakeLists.txt: set(CPACK_WIX_INSTALL_SCOPE NONE)
to stick to CMake pre-v3.29 behavior. CMake v3.29 introduces CPACK_WIX_INSTALL_SCOPE. Its default conflicts with the ALLUSERS property in our icinga-installer/icinga2.wixpatch.cmake.
2024-06-12 16:10:54 +02:00
Alexander Aleksandrovič Klimov
36ac418ad1 GHA: Docker: don't run on support/* branches
PRs to them are already covered and we don't need support* image tags.
2024-06-12 16:10:54 +02:00
Alexander Aleksandrovič Klimov
9f624f678a GHA: drop Debian 10
which will be EOL in 2.5 months.
2024-06-12 16:10:54 +02:00
Alexander Aleksandrovič Klimov
e12186f24a GHA: add upcoming Fedora 40 2024-06-12 16:10:54 +02:00
Alexander Aleksandrovič Klimov
e518681091 GHA: add upcoming Ubuntu 24.04 2024-06-12 16:10:54 +02:00
Alexander A. Klimov
3230b7f228 GHA AUTHORS check: handle PRs from forks
where the ref names differ compared to own PRs. Instead refer to the base branch and the head branch via generic HEAD^<parent number> where HEAD is a merge commit.
2024-06-12 16:10:54 +02:00
Alexander Aleksandrovič Klimov
84672b34b2
Merge pull request #9939 from Icinga/2139
Icinga 2.13.9
v2.13.9
2023-12-20 17:21:34 +01:00
Alexander Aleksandrovič Klimov
600e631a4d
Merge pull request #9945 from Icinga/2139backport
Disable TLS renegotiation, bump Windows deps and fix Icinga DB crashes
2023-12-20 12:14:30 +01:00
Alexander A. Klimov
b2d975f916 IcingaDB#SendConfigDelete(): fix missing nullptr check before deref 2023-12-20 10:29:17 +01:00
Alexander A. Klimov
873988129f Icinga DB downtime history: provide cancel_time where has_been_cancelled may be 1
The table sla_history_downtime requires a downtime_end.
The Go daemon takes the cancel_time if has_been_cancelled is 1.
So we must supply a cancel_time whereever has_been_cancelled is 1.
Otherwise the Go daemon can't process some entries.
2023-12-20 10:29:17 +01:00
Alexander A. Klimov
3bcd4db967 Icinga 2.13.9 2023-12-20 10:11:29 +01:00
Alexander A. Klimov
4aefab59ae Bump OpenSSL shipped for Windows to v3.0.12 2023-12-20 10:06:03 +01:00
Alexander A. Klimov
d856dc9638 Bump Boost shipped for Windows to v1.83
Note: For doc/21-development.md use:

perl -pi -e 's/(boost[-\w]*?1[-_]?)82/${1}83/g' doc/21-development.md
2023-12-20 10:05:46 +01:00
Alexander A. Klimov
89c54ca5e5 Disable TLS renegotiation
The API doesn't need it and a customer's security scanner
is afraid of a potential DoS attack vector.
2023-12-20 10:05:35 +01:00
Alexander Aleksandrovič Klimov
5acf3fb539
Merge pull request #9934 from Icinga/renew-the-ca-9890-213
ApiListener#Start(): auto-renew CA on its owner
2023-12-19 15:26:00 +01:00
Alexander A. Klimov
7a8bd0f6ea RequestCertificateHandler(): also renew if CA needs a renewal
and a newer one is available.
2023-12-18 17:07:44 +01:00
Alexander A. Klimov
5bf8db41ef CertificateToString(): allow raw pointer input 2023-12-18 17:07:44 +01:00
Alexander A. Klimov
e7a50f3e7c ApiListener#Start(): auto-renew CA on its owner
otherwise it would expire.
2023-12-18 17:07:44 +01:00
Alexander A. Klimov
1e31bc13f0 ApiListener#RenewCert(): enable optional CA creation 2023-12-18 17:07:44 +01:00
Alexander A. Klimov
d1098dc959 CreateCertIcingaCA(EVP_PKEY*, X509_NAME*): enable optional CA creation 2023-12-18 17:07:44 +01:00
Alexander A. Klimov
9345caacec Test IsCertUptodate() and IsCaUptodate() 2023-12-18 17:07:44 +01:00
Alexander A. Klimov
35317f14e7 Introduce IsCaUptodate() by splitting IsCertUptodate() 2023-12-18 17:07:44 +01:00
Alexander Aleksandrovič Klimov
f483d3757e
Merge pull request #9920 from Icinga/gha2139
Update GitHub actions
2023-11-24 19:11:02 +01:00
Alexander A. Klimov
d260a0aa6d Update AUTHORS 2023-11-24 17:26:57 +01:00
Lord Hepipud
215dba9d0f Adds ProgressPreference SilentlyContinue
We should use `$Global:ProgressPreference = 'SilentlyContinue';` to disable the progress bar during download.
By doing so, information are directly written to the disk instead of written inside the memory and dumped to the disk afterwards
2023-11-24 17:26:57 +01:00