11607 Commits

Author SHA1 Message Date
Noah Hilverling
7772022da5
Merge pull request #8550 from Icinga/bugfix/unable-to-toggle-notifications-from-icingaweb2-8533-2.11
Fix runtime config updates not working for objects without zone
2020-12-11 09:26:28 +01:00
Noah Hilverling
03b728b83e Fix runtime config updates not working for objects without zone
refs #8533
2020-12-10 17:07:04 +01:00
Noah Hilverling
46708bc055
Merge pull request #8543 from Icinga/bugfix/openssl-error-buffer-2.11
Use proper buffer size for OpenSSL error messages (support/2.11)
2020-12-09 15:53:39 +01:00
Julian Brost
905cf5aa65 Use ERR_error_string_n() instead of ERR_error_string()
Explicitly pass the actual length of the buffer to avoid overflows.
2020-12-09 12:23:07 +01:00
Julian Brost
3b37867d2e Increase size of buffer for OpenSSL error messages
According to man 3 ERR_error_string, "buf must be at least 256 bytes
long", therefore increase the buffer size to 256 everywhere.
2020-12-09 12:23:07 +01:00
Julian Brost
64a49ee3a1 Remove std::string to_string(const errinfo_openssl_error& e)
The function was never used and it's implementation contains a bug where
a buffer of too small size is used as a paramter to ERR_error_string.
According to the `man 3 ERR_error_info`, the buffer has to be at least
256 bytes in size.

Also the function seems of limited use as it allows to output the tag
object used with additional error information for exceptions in Boost.
However, you boost::get_error_info<>() just returns the value type but
not the full tag object from the exception.
2020-12-09 12:22:52 +01:00
Alexander Aleksandrovič Klimov
c0ad8bdb9a
Merge pull request #8510 from Icinga/feature/improve-config-sync-locking-2.11
Improve config sync locking (support/2.11)
2020-11-27 17:53:21 +01:00
Julian Brost
072434f3f3 Remove SpinLock
No longer needed as its only user now uses std::mutex.
2020-11-27 11:24:17 +01:00
Julian Brost
7d546aa2d8 ApiListener: merge new config validation and actication functions
Merge AsyncTryActivateZonesStage and TryActivateZonesStageCallback and
name the result TryActivateZonesStage. The old split was a leftover from
the one being a callback function with no actual meaningful separation.
2020-11-27 11:24:17 +01:00
Julian Brost
a96e6c3861 Use std::mutex instead of Spinlock 2020-11-27 11:24:17 +01:00
Julian Brost
3081d9942d API filesync: wait for validation process to exit
This avoid having to pass a lock implictly using the captured variables
of a lambda.
2020-11-27 11:24:17 +01:00
Julian Brost
fde51ed9f7 Add Process::WaitForResult to allow waiting for the process to finish 2020-11-27 11:24:17 +01:00
Alexander A. Klimov
eb454b8517 Introduce Endpoint#capabilities
refs #8034
2020-11-20 17:41:45 +01:00
Alexander A. Klimov
9d574e7702 Fix missing include
refs #8034
2020-11-20 17:41:08 +01:00
Alexander A. Klimov
326698ab18 icinga::Hello: document version param 2020-11-20 17:41:08 +01:00
Mattia Codato
ce22f7f227 Add newline ad the end of file 2020-11-20 17:40:58 +01:00
Mattia Codato
c9cc8a7c70 Add timer to clean deadlined executions 2020-11-20 17:40:45 +01:00
Mattia Codato
edd55ef42f Fix doc for cluster events 2020-11-20 17:40:00 +01:00
Mattia Codato
444d815958 Fix doc execute-command 2020-11-20 17:40:00 +01:00
Mattia Codato
7852d5302c Fix doc 2020-11-20 17:40:00 +01:00
Mattia Codato
8d8171bf0d Fix typos 2020-11-20 17:40:00 +01:00
Mattia Codato
4feb10d7db Fix typo 2020-11-20 17:40:00 +01:00
Mattia Codato
7940402c17 Update doc 2020-11-20 17:39:59 +01:00
Mattia Codato
4559b5a22d Use ExecuteCommand::ExecuteOverride also for ido check 2020-11-20 17:38:27 +01:00
Mattia Codato
76007d369f Remove an useless check 2020-11-20 17:38:27 +01:00
Mattia Codato
e4c9616068 Set exit code 126 if endpoint doens't support the new executeCommand API 2020-11-20 17:38:27 +01:00
Mattia Codato
f1f5bb4738 Check child endpoint versions and check child zone can access to the target endpoint 2020-11-20 17:38:27 +01:00
Mattia Codato
85e2f3a479 Check satellites Icinga version before relay the execute command message 2020-11-20 17:38:27 +01:00
Mattia Codato
3516c9c631 Use local zone for update executions 2020-11-20 17:38:27 +01:00
Mattia Codato
1253aa07e4 Change checkable with the endpoint zone for execute command relay message 2020-11-20 17:38:27 +01:00
Mattia Codato
5134eca2ab Forward the execute command through the zones 2020-11-20 17:38:27 +01:00
Mattia Codato
3edf36658e Use ternary operator to get ExecuteOverride or checkable command 2020-11-20 17:38:27 +01:00
Mattia Codato
3a105cfe7c Use ExecuteOverride to override the command 2020-11-20 17:38:27 +01:00
Mattia Codato
ee86f5d7d8 Use MacroResolver::OverrideMacros on *task files 2020-11-20 17:38:27 +01:00
Mattia Codato
ba80ebc7cf Fix update execution 2020-11-20 17:38:27 +01:00
Mattia Codato
bb2726a44e Fix macros substitutions 2020-11-20 17:38:27 +01:00
Mattia Codato
dad2a3e786 Notify to all nodes that execution has completed 2020-11-20 17:38:27 +01:00
Mattia Codato
f790b7699d Check if last check result is null before executing the command 2020-11-20 17:38:27 +01:00
Mattia Codato
5467b7aa37 Fix indentation 2020-11-20 17:38:27 +01:00
Mattia Codato
aa2edcb322 Keep consistency with other methods in case of missing API listener 2020-11-20 17:38:27 +01:00
Mattia Codato
3d85492b9a Execute notification command only if there is a source param 2020-11-20 17:38:27 +01:00
Mattia Codato
c019dc9f90 Remove unused key in the execution 2020-11-20 17:38:27 +01:00
Mattia Codato
eb38821869 Remove pending key when the execution is completed 2020-11-20 17:38:27 +01:00
Mattia Codato
9a6646f76f Fix logs 2020-11-20 17:38:27 +01:00
Mattia Codato
d72b9dc138 Fix indentation 2020-11-20 17:38:27 +01:00
Mattia Codato
facf3ff170 Remove arguments from 'throw' inc case of ExecuteEventHandler error 2020-11-20 17:38:27 +01:00
Mattia Codato
58251d1fca Throw an exception in case of error during ExecuteEventHandler if source is not set 2020-11-20 17:38:27 +01:00
Mattia Codato
1f5a92a22d Remove unuseful variables 2020-11-20 17:38:27 +01:00
Mattia Codato
3ce56ac11a Add try catch for ExecuteEventHandler 2020-11-20 17:38:27 +01:00
Mattia Codato
78743098b0 Remove unuseful check result for notification command 2020-11-20 17:38:27 +01:00