Julian Brost
e074e892ce
Merge pull request #9658 from Icinga/unfreeze
...
Dictionary#*(): remove bool overrideFrozen if unused
2023-02-10 19:42:00 +01:00
Julian Brost
213f3f9444
Merge pull request #8389 from Icinga/feature/forbid-dep-cycles
...
Forbid dependency cycles
2023-02-10 17:26:04 +01:00
Alexander A. Klimov
f3f2c943c7
ScriptGlobal::Set(): don't explicitly give Namespace#Set() its default values
2023-02-10 15:55:10 +01:00
Alexander A. Klimov
e61b380808
Call Namespace#Set(), not #SetFieldByName()
...
Namespace#SetFieldByName() calls #Set() anyway.
2023-02-10 15:53:30 +01:00
Julian Brost
0dd35bb960
Merge pull request #9657 from Icinga/shared_mutex-Dictionary
...
Use a shared_mutex for read `Dictionary` operations
2023-02-10 15:15:52 +01:00
Alexander A. Klimov
e9846f1827
ScriptGlobal::Set(): remove unused bool overrideFrozen
2023-02-10 11:33:46 +01:00
Alexander A. Klimov
cd78da13d3
Dictionary#Clear(): remove unused bool overrideFrozen
2023-02-10 11:33:46 +01:00
Alexander A. Klimov
270c6392d4
Dictionary#Remove(): remove unused bool overrideFrozen
2023-02-10 11:33:46 +01:00
Alexander A. Klimov
ca547d0292
Use a shared_mutex for read `Dictionary` operations
...
This allows multiple parallel read operations resulting
in a overall speedup on systems with many cores.
2023-02-10 11:31:51 +01:00
Alexander A. Klimov
5b63407d15
Forbid dependency cycles
2023-02-06 12:33:48 +01:00
Julian Brost
14d7ee2777
Merge pull request #9585 from Icinga/apply-doc
...
Doc: Troubleshooting: Optimise apply rules and group assign conditions
2023-02-03 09:46:35 +01:00
Julian Brost
c51037725a
Merge pull request #9466 from Icinga/flush-temp-files
...
Deduplicate and stabilize fragile filesystem transactions
2023-02-02 16:29:11 +01:00
Julian Brost
3eb85797ce
Merge pull request #9622 from Icinga/9563
...
Main process: ignore SIGHUP
2023-02-02 11:36:13 +01:00
Julian Brost
a0239e44f7
Merge pull request #9598 from Icinga/9596
...
CheckerComponent#CheckThreadProc(): also propagate next check update …
2023-02-01 20:09:06 +01:00
Alexander Aleksandrovič Klimov
4e021e0105
Merge pull request #9648 from Icinga/frozen-namespace-config-validation
...
Fix config sync after freezing namespaces
2023-02-01 17:07:57 +01:00
Julian Brost
0bd972ff0c
Merge pull request #9647 from Icinga/Al2Klimov-patch-3
...
Docs: Windows Dev Environment: TL;DR: disable unity build
2023-02-01 17:02:51 +01:00
Alexander A. Klimov
e9b8c67975
CheckerComponent#CheckThreadProc(): also propagate next check update to Icinga DB
...
if caused by dependency or check period.
Now as long as any of the above causes check skips
next check and next update will be up-to-date in Icinga DB,
so the checkable won't slide into false positive overdue.
2023-02-01 16:25:56 +01:00
Julian Brost
6fc9038e4d
Merge pull request #9620 from Icinga/9526
...
Document Notification#times being not aware of downtimes
2023-02-01 14:31:27 +01:00
Julian Brost
2b43354080
Merge pull request #8744 from Icinga/bugfix/unnecessary-chown-8743
...
NodeUtility::WriteNodeConfigObjects(): avoid unneccessary Utility::SetFileOwnership()
2023-02-01 14:27:46 +01:00
Alexander Aleksandrovič Klimov
4c2afb9279
Docs: Windows Dev Environment: TL;DR: disable unity build
...
This enables the individual C++ files, not just unity ones, in VS project tree.
2023-02-01 13:02:45 +01:00
Julian Brost
fd1aa73d25
Fix config sync after freezing namespaces
...
This was accidentally broken by #9627 because during config sync, a config
validation happens that uses `--define System.ZonesStageVarDir=...` which fails
on the now frozen namespace.
This commit changes this to use `Internal.ZonesStageVarDir` instead. After all,
this is used for internal functionality, users should not directly interact
with this flag.
Additionally, it no longer freezes the `Internal` namespace which actually
allows using `Internal.ZonesStageVarDir` in the first place. This also fixes
`--define Internal.Debug*` which was also broken by said PR. Freezing of the
`Internal` namespace is not necessary for performance reasons as it's not
searched implicitly (for example when accessing `globals.x`) and should users
actually interact with it, they should know by that name that they are on their
own.
2023-02-01 12:29:47 +01:00
Julian Brost
d2fb8a9181
Handle errors when evaluating --define
...
This can be observed when running something like `icinga2 daemon -C -DTypes.Host=42`.
Without this commit:
[2023-02-01 09:29:00 +0100] critical/Application: Error: Namespace is read-only and must not be modified.
Additional information is available in '/var/log/icinga2/crash/report.1675240140.425155'
With this commit:
[2023-02-01 09:30:37 +0100] critical/icinga-app: cannot set 'Types.Host': Namespace is read-only and must not be modified.
2023-02-01 09:30:49 +01:00
Julian Brost
a24375bc91
Merge pull request #9264 from Icinga/Al2Klimov-patch-7
...
Doc: SUSE: install monitoring-plugins-all
2023-01-31 17:44:44 +01:00
Julian Brost
2a4c9166c9
Merge pull request #9640 from Icinga/gha-repair
...
GHA: build Icinga 2 from source
2023-01-31 16:42:58 +01:00
Alexander A. Klimov
e43e657603
GHA: build Icinga 2 from source
...
as the package build images aren't public anymore.
2023-01-31 10:21:22 +01:00
Julian Brost
2ea866248b
Merge pull request #9642 from Icinga/9486a
...
ITL: let check_disk choose sane default units by itself
2023-01-27 22:22:24 +01:00
Julian Brost
03c7003cf0
Merge pull request #9644 from Icinga/probot/update-authors/master/0bdcd08e0240e009e6de635854dae625449260a5
...
Update AUTHORS
2023-01-27 21:09:17 +01:00
icinga-probot[bot]
3a848c600b
Update AUTHORS
2023-01-27 16:00:14 +00:00
Markus Weber
0bdcd08e02
Add the Option to disable RetryWrites to CheckCommand of mongodb ( #9539 )
...
* Add the Option to disable RetryWrites to CheckCommand for newer check_mongodb.py
* Add documentation foor the Option to disable RetryWrites in the MongoDB-Check
2023-01-27 15:59:40 +00:00
Alexander A. Klimov
3a1b080338
ITL: let check_disk choose sane default units by itself
...
so it is responsible for output readability, prefdata precision
and SI vs. IEC on its own.
2023-01-27 16:21:40 +01:00
Alexander A. Klimov
fd93feaec7
Include Utility::SetFileOwnership() inside FS transactions
...
to make them even more atomic.
2023-01-27 12:03:59 +01:00
Alexander A. Klimov
d22fdf2a7a
Introduce AtomicFile#GetTempFilename()
2023-01-27 12:03:59 +01:00
Alexander A. Klimov
0367c9e099
Remove unused Utility::CreateTempFile()
2023-01-27 12:03:59 +01:00
Alexander A. Klimov
b92fe23469
Deduplicate and stabilize fragile filesystem transactions
...
by using AtomicFile so they ensure all or nothing of a file gets replaced.
2023-01-27 12:03:56 +01:00
Alexander A. Klimov
a3e205b990
Introduce AtomicFile::Write()
2023-01-27 11:36:09 +01:00
Alexander Aleksandrovič Klimov
0ebec699ee
Doc: SUSE: install monitoring-plugins-all w/ --recommends
...
so it does something useful.
2023-01-27 11:25:18 +01:00
Julian Brost
2d860a0f5e
Merge pull request #8118 from Icinga/feature/speed-object-registry-8112
...
Speed up config object lookup
2023-01-26 19:03:40 +01:00
Alexander Aleksandrovič Klimov
421ac1735c
Merge pull request #9608 from Icinga/move-types-namespace
...
Move Types namespace into type.cpp and simplify Type::GetByName()
2023-01-26 18:32:41 +01:00
Julian Brost
ad8868cab7
Merge pull request #9599 from Icinga/influx-ns
...
Influx DB: don't unneccessarily truncate timestamps to whole seconds
2023-01-26 17:44:50 +01:00
Alexander A. Klimov
b2fc49569c
Make ConfigType#m_Mutex a std::shared_timed_mutex
...
refs #8112
2023-01-26 15:04:02 +01:00
Alexander A. Klimov
21759f015d
ConfigType: store config objects in a hash map
...
refs #8112
2023-01-26 15:03:54 +01:00
Julian Brost
27af8829f2
Merge pull request #9641 from Icinga/code-optimization-1
...
Some trivial code optimisations
2023-01-26 14:43:31 +01:00
Julian Brost
3dab46623b
Move Types namespace into type.cpp and simplify Type::GetByName()
...
This commit moves the initialization of the globals.Types namespace to type.cpp
in order to keep a pointer to the Namespace object in Type::m_Namespace and
simplify Type::GetByName() using it.
The dynamic type check is moved into an assertion after freezing the namespace.
2023-01-26 14:26:41 +01:00
Yonas Habteab
5a67ddea76
Don't post-increment stl iterators
2023-01-26 09:10:49 +01:00
Yonas Habteab
8bb0b857d8
ApiListener: Fix memory leak & group `a || b && c` correctly
2023-01-26 09:10:49 +01:00
Yonas Habteab
95cec9cba2
Don't mark a method as `virtual` in a `final` class
2023-01-26 09:10:38 +01:00
Yonas Habteab
7b91b200f5
Use simplified if conditions where applicable
2023-01-26 09:06:20 +01:00
Yonas Habteab
38313434d2
Avoid calling `GetDeferredInitializers()` repeatedly
2023-01-26 09:05:19 +01:00
Alexander Aleksandrovič Klimov
bb99106926
Merge pull request #7863 from Icinga/bugfix/disallow-receiving-ticket-salt-via-api
...
Disallow fetching the ticket salt via REST API
2023-01-25 16:39:30 +01:00
Julian Brost
5fea15e090
Merge pull request #7958 from Icinga/bugfix/api-500-404-7956
...
/v1/actions/*: return 404 if no objects found
2023-01-24 15:08:17 +01:00