Michael Friedrich
6c9c65323e
Workaround for boost::filesystem and Visual Studio on Windows
2019-05-10 13:38:12 +02:00
Michael Friedrich
6cce9c0fdd
API: Automatically repair broken packages
...
This partially reverts #7150 and avoids exceptions
inside the flow. Each time an empty active stage
is detected, Icinga tries to repair it from the
the given directory tree.
Also, the code now takes into account that it should
create the package storage on startup, whether within
the API object, or if disabled, inside the application.
Caching the active stages for packages in memory
only is in effect with the API feature being enabled.
This is useful for other deployed config packages,
not only the internal one.
fixes #7173
refs #7150
refs #7119
fixes #6959
2019-05-10 12:48:34 +02:00
Michael Friedrich
03324b2fb6
Config packages: Catch active stage exceptions in rare cases
...
Typically this already is detected on startup.
2019-05-08 16:43:27 +02:00
Michael Friedrich
704aabcb63
Avoid dead-lock with config packages and active stages
2019-05-08 16:06:46 +02:00
Michael Friedrich
0438c866f8
Merge pull request #7102 from Icinga/feature/boost-fs-7101
...
Replace self-written filesystem ops with boost.filesystem
2019-04-25 15:53:55 +02:00
Alexander A. Klimov
5afef1015d
Replace unlink() with boost::filesystem::remove()
...
refs #7101
2019-04-25 09:53:02 +02:00
Alexander A. Klimov
ba842403ce
Fix circular #include
...
refs #6985
2019-04-25 08:25:28 +02:00
Michael Friedrich
d14a88235d
Replace Copyright header with a short version, part I
...
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Jean Flach
2aff6a5887
Don't run UpdateObjectAuthority for Comments and Downtimes
2019-01-10 11:44:14 +01:00
Alexander A. Klimov
8de5326d23
Remove redundand check for object existence on creation via API
...
refs #3937
2018-11-29 17:51:53 +01:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Friedrich
85e161ea1e
Silence config compiler logging for runtime created objects
...
This is especially problematic with many single creation requests,
e.g. many downtimes created via Icinga Web 2 & the REST API.
In addition to the config compiler messages, apply rule matches are
also in there which are removed by this patch.
2018-10-09 16:41:17 +02:00
Michael Friedrich
b9bfe70444
Fix missing name for workqueue while creating runtime objects via API
...
fixes #6364
2018-06-15 14:25:03 +02:00
Michael Friedrich
a8b5d8e64a
Merge pull request #6205 from Icinga/feature/api-verbose-errors
...
API: Unify verbose error messages
2018-04-17 16:40:11 +02:00
Michael Friedrich
bd7598cb1b
API: Check if objects exists and return proper error message
2018-04-06 12:32:27 +02:00
Michael Friedrich
c4a6ab0211
Add diagnostic_information as verbose error to config object handlers
2018-04-06 12:26:49 +02:00
Gunnar Beutner
94e6be1a65
Remove unused includes
2018-01-22 09:52:29 +01:00
Gunnar Beutner
e3ad0be769
Apply clang-tidy fix 'modernize-use-auto'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
ac155d1dda
Apply clang-tidy fix 'modernize-redundant-void-arg'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
abe3f8a959
Build fix for Debian wheezy
2018-01-03 10:32:33 +01:00
Michael Insel
158ae2188e
Change copyright header for 2018
2018-01-02 12:08:55 +01:00
Jean Flach
2636e6a77a
Whitespace fix
...
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Gunnar Beutner
ab8386cf5c
Use std::unique_ptr for Expression objects
2017-12-15 10:44:54 +01:00
Gunnar Beutner
1ad83886ac
Replace a few more NULLs with nullptr
2017-12-14 15:37:20 +01:00
Jean Flach
ef5013b903
Use locks in api config staging
...
refs #3668
2017-09-20 16:45:09 +02:00
Gunnar Beutner
d05b7c4178
Allow expressions for the type in object/template declarations
2017-05-11 14:21:30 +02:00
Gunnar Beutner
2d6434e96a
Improve log message in ConfigObjectUtility::DeleteObjectHelper
...
refs #5094
2017-03-27 10:46:35 +02:00
Michael Friedrich
b7caf0820d
Ensure that *.icinga.com is used everywhere
...
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
5cd2fadf2b
Fix crash when deleting config files fails
...
fixes #12860
2016-10-05 14:17:26 +02:00
Gunnar Beutner
06cb3cf875
Another build fix for Windows
...
refs #9182
2016-08-31 13:43:50 +02:00
Gunnar Beutner
68dceaab06
Replace boost::exception_ptr with std::exception_ptr
...
refs #9182
2016-08-30 20:46:23 +02:00
Gunnar Beutner
288413f046
Replace BOOST_FOREACH with range-based for loops
...
fixes #12538
2016-08-25 06:46:17 +02:00
Gunnar Beutner
0bc139af93
Improve timing behavior for UpdateObjectAuthority calls
...
refs #11765
2016-05-11 13:04:39 +02:00
Michael Friedrich
8a65c4a776
API: Fix error message with PUT requests for existing objects
...
fixes #11396
2016-05-09 15:08:35 +02:00
Gunnar Beutner
599929b0f6
Update copyright headers for 2016
2016-01-12 08:29:59 +01:00
Gunnar Beutner
3505ca3c16
Fix race condition in the ConfigItem class
...
fixes #10643
2015-11-19 19:38:49 +01:00
Michael Friedrich
6518f78af0
Fix attribute validation for PUT queries
...
fixes #10601
2015-11-12 10:13:46 +01:00
Gunnar Beutner
b2364884d8
Check whether config file exists before trying to create object
...
fixes #10602
2015-11-11 10:25:18 +01:00
Gunnar Beutner
356c4cc170
Don't allow users to set internal attributes via PUT
...
fixes #10601
2015-11-11 08:41:49 +01:00
Michael Friedrich
bc05389a79
Improve error handling for unlinking files
...
refs #10578
2015-11-09 13:35:51 +01:00
Gunnar Beutner
25c490ecb6
Remove config file when object creation fails
...
fixes #10578
2015-11-09 12:33:37 +01:00
Gunnar Beutner
050c520b2a
Convert Comment/Downtime to config objects
...
fixes #9777
2015-10-28 17:56:29 +01:00
Gunnar Beutner
dd77863910
Implement Array::ToString and Dictionary::ToString
...
fixes #10329
2015-10-26 11:05:24 +01:00
Michael Friedrich
9dcb33e8f4
Change object version to timestamps for diff updates on config sync
...
fixes #10257
2015-09-30 16:58:18 +02:00
Jean-Marcel Flach
5ef4204d06
Improve API error handling and fix some whitespace
...
fixes #10194
2015-09-25 13:57:28 +02:00
Michael Friedrich
0fd9d3406b
Prevent object deletion on shutdown when checking !IsActive()
...
This is fairly ugly and sets an extension for the ConfigObjectUtility
delete handler to signal the OnActiveChanged handler inside the cluster
configsync to send a delete event to the other nodes.
refs #9927
2015-09-17 14:20:44 +02:00
Gunnar Beutner
6fa58a520c
Implement config object sync
...
Adds object version.
refs #9927
2015-09-17 14:20:43 +02:00
Michael Friedrich
da83bae660
Rename config/modules to config/packages
...
fixes #9953
2015-09-01 20:09:04 +02:00
Gunnar Beutner
de09a562f6
Use dependency graph when deleting objects
...
refs #9096
2015-08-26 06:35:06 +02:00
Gunnar Beutner
b3db2ee1f6
Fix crash in ConfigObjectUtility::CreateObject
...
refs #9082
2015-08-18 20:25:06 +02:00