10885 Commits

Author SHA1 Message Date
Alexander A. Klimov
967616d88e FilterUtility::EvaluateFilter(): ensure not to modify the global namespace
(cherry picked from commit bdadb53940f1187d60a4679675af164dbb63f37c)
2019-05-16 16:16:51 +02:00
Elias Ohm
8315ea86d7 * use dedicated permissions namespace for scriptframe in filterutility to allow proper parallel execution
* fixes issue https://github.com/Icinga/icinga2/issues/6785 where permission checks get wrong result because permissions checks are done within a shared namespaces without using only unique keys
  * mitigates issue https://github.com/Icinga/icinga2/issues/6874 where segmentation faults occur because of concurrent access to non threadsafe parts of namespace (a fix for thread safety of namespaces which would be an alternative approach to get rid of these segfaults is out of scope of this fix as 6785 needs to be fixed anyway and this is the straight-forwards) way to fix that
* do the same for eventqueue (not certain whether events can be processed in parallel but I expect it is the case)

(cherry picked from commit 1e7cd4afc821a0592b535e4270ebb2fdc387a207)
2019-05-16 16:12:21 +02:00
Michael Friedrich
6e822672be Add log message for log rotate; update docs
refs #6737

(cherry picked from commit df25b183cb256440a53d1c2fc582b98ceb25d444)
2019-05-16 15:28:52 +02:00
Alexander A. Klimov
98d674f780 Timer::TimerThreadProc(): use C++11 lambda instead of bind()
refs #6737

(cherry picked from commit 7a8f8fd7349269cb2e0e670b8d2a44693e5c07c7)
2019-05-16 15:27:53 +02:00
Alexander A. Klimov
f551666a7d StreamLogger#BindStream(): set #m_FlushLogTimer only if needed
refs #6737

(cherry picked from commit 622f68412440d4fa3ac1b347a929087073bc24f9)
2019-05-16 15:27:29 +02:00
Elias Ohm
304ba1fd6c Fix for double-free (and possibly other memory-corruption related) crashes at logrotate time
this is a direct fix of the issue revealing the problem that leads to crash

verification done with a patched icinga2 where the execution-order of the code lines of counter-parts involved in re-incrementing/decrementing Timer:Ptr is forced to be the one that leads to the obeserverd segfaults

refs #6737

(cherry picked from commit 52e3db279ab9ff348456234b8a033e703c6f7580)
2019-05-16 15:26:47 +02:00
marxin
54538986b8 Documentation: add missing argument to chkconfig command.
(cherry picked from commit dd0c7a28ddc2fd0f78f3fbdb1d4651d29e604e1c)
2019-05-16 15:25:01 +02:00
Michael Friedrich
0927078685 Docs: Use jo to format JSON body for API actions, esp. unix timestamps
(cherry picked from commit 21225c6b48a084c3d96ee1e7c938d30e19a2e395)
2019-05-16 15:23:56 +02:00
Michael Friedrich
469cd2503c CLI: Fix updates for NodeName/ZoneName constants
fixes #7117

(cherry picked from commit 4197bc9bcd957a1edcf5cec80a9d03fcc4b6c313)
2019-05-16 15:23:35 +02:00
Michael Friedrich
d0ac7f464d DB IDO: Do not deactivate objects during application reload/restart
This follows the same principle as with the shutdown handler,
and was introduced with the changed reload handling with 2.9.
Previously IsShuttingDown() was sufficient which got set at one
location.

SigUsr2 as handler introduced a new location where m_ShuttingDown
is not necessarily set yet. Since this handler gets called when
l_Restarting is enabled, we'll use this flag to avoid config update
events resulting in object deactivation (object->IsActive() always
returns false).

refs #5996
refs #6691
refs #6970

fixes #7125

(cherry picked from commit 78e24c53f1564269f744de5efe50cb099cadbdde)
2019-05-16 15:22:16 +02:00
Michael Friedrich
553bc54297 Improve REST API docs
- Better explanation for filters and filter_vars
- Update examples to use filters in the body only, don't fuck around with the URL parameters.
- Better explain actions and their intent
- More insights into config packages and their intention
- Improve API clients and add the tables from icinga2-api-examples
- Formatting for CLI requests

(cherry picked from commit 31170db12349f67b48b56f67342225a19e0f34e3)
2019-05-16 14:52:37 +02:00
Michael Friedrich
e55cad5c1a Fix headings in the docs
refs #6918

(cherry picked from commit e909302fd90ccc4aecdb99bcc04750c4aa0f098d)
2019-05-16 14:52:33 +02:00
Michael Friedrich
defb5b505f Docs: Improve config object types chapter
(cherry picked from commit 2ce82b56d480cb0af469cc5d6feb8eb52c3f9c49)
2019-05-16 14:49:56 +02:00
Alexander A. Klimov
9c0507f725 Doc: adjust default of ApiListener#bind_host
(cherry picked from commit 915525dbcdb1af544aa7518250955d9c1d78fa3a)
2019-05-16 14:46:00 +02:00
Michael Friedrich
d6b4c96d02 Add technical concept docs for our internal JSON-RPC message API
(cherry picked from commit 3c591a03b048cc3fd00ad75e467797f9448f3fa5)
2019-05-16 14:40:40 +02:00
Michael Friedrich
1149ed7506 Technical Concepts: Add config compiler references
(cherry picked from commit 219602761166375b51089aaa25c9d7e28cf692d3)
2019-05-16 14:40:09 +02:00
Peter Eckel
2a1a3726bf Avoid duplicating non-zero count message replay messages in the debug log
(cherry picked from commit 5d59863725ea843312fd89a9fc9e434187a56650)
2019-05-16 14:31:12 +02:00
Robert Scheck
bb503cce16 Strip '\r' in notification messages to avoid 'Content-Type: application/octet-stream'
Without this patch, an accidential `\r` in e.g. `$NOTIFICATIONCOMMENT`
leads to a `Content-Type: application/octet-stream` header in e-mails.
The accidential `\r` might slip in usually using Icinga/Nagios apps...
2019-05-16 12:44:29 +02:00
Michael Friedrich
d94e300907
Merge pull request #7181 from Icinga/feature/x509-check-command
Add check command for x509's host check
2019-05-16 10:02:51 +02:00
Johannes Meyer
45433e5c91
doc: Add section for x509 to the ITL chapter 2019-05-13 15:57:27 +02:00
Johannes Meyer
7403139622
Add check command for x509's host check
The refererred PR: https://github.com/Icinga/icingaweb2-module-x509/pull/47
2019-05-13 14:36:27 +02:00
Michael Friedrich
66df1e9542 Docs: Fix typos 2019-05-13 08:34:38 +02:00
Michael Friedrich
e8c6e3da32
Merge pull request #7026 from Icinga/feature/ca-list-all
CLI: 'ca list' lists pending CSRs by default, add '--all' parameter
2019-05-10 16:41:53 +02:00
Michael Friedrich
9fa611cd37
Merge pull request #7179 from Napsty/feature/itl-esxi-hardware-regex
Add new -r parameter for esxi_hardware command
2019-05-10 16:22:54 +02:00
Michael Friedrich
6ba67487ea CLI: 'ca list' now lists pending CSRs by default, add '--all' parameter
https://puppet.com/docs/puppet/5.5/man/cert.html
2019-05-10 15:41:00 +02:00
Michael Friedrich
47ce864fae
Merge pull request #7180 from Icinga/bugfix/revert-exit-code
Revert "CLI: Return non-zero on unknown sub commands"
2019-05-10 15:17:51 +02:00
Michael Friedrich
aed88ca477 Revert "CLI: Return non-zero on unknown sub commands"
This reverts commit 00bc0b230357bf02c1c9da4ca59c2d359c73a538.
2019-05-10 15:16:05 +02:00
Napsty
e385c3b515 Add new -r parameter for esxi_hardware command 2019-05-10 14:51:11 +02:00
Michael Friedrich
af42e2dfc0
Merge pull request #7178 from Icinga/bugfix/api-package-repair
API: Automatically repair broken _api package
2019-05-10 14:40:48 +02:00
Michael Friedrich
368383bedd
Merge pull request #7154 from Elias481/fix/serializer-object-locking-7003
Lock all kind of Objects during serialization
2019-05-10 14:39:27 +02:00
Napsty
2332bc30d0 Add new -r parameter for esxi_hardware command 2019-05-10 13:46:11 +02:00
Michael Friedrich
6c9c65323e Workaround for boost::filesystem and Visual Studio on Windows 2019-05-10 13:38:12 +02:00
Michael Friedrich
ed4e68430b
Merge pull request #7172 from Elias481/fix/generate-rsa-4635-org
Account for OpenSSL library evolution
2019-05-10 13:24:01 +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
de3c73ff18
Merge pull request #7175 from Icinga/feature/docs-api-jo-timestamps
Docs: Use jo to format JSON body for API actions, esp. unix timestamps
2019-05-09 17:56:29 +02:00
Michael Friedrich
21225c6b48 Docs: Use jo to format JSON body for API actions, esp. unix timestamps 2019-05-09 17:53:40 +02:00
Michael Friedrich
98039e88b4
Merge pull request #7165 from Icinga/feature/enhance-dev-docs
Doc: Improve the development chapter
2019-05-09 14:47:49 +02:00
Michael Friedrich
af9d2e2e93
Merge pull request #7171 from dgoetz/bugfix/doc-mysql-ha
Docs: Add Master-Master-Replication as option for mysql
2019-05-09 14:25:31 +02:00
Elias Ohm
4c86c370bb fixup errbuf length in the other files and avoid using the static buffer in one place (for thread safety and code consistency reasons) 2019-05-09 09:30:12 +02:00
Dirk Goetz
c4f1ad7abb Docs: Add Master-Master-Replication as option for mysql 2019-05-09 09:25:07 +02:00
Elias Ohm
e75f063552 bring some things in line
- account for documented buffer size openssl 1.1.x for error string (>=256 bytes)
- use nullptr instead of NULL
- fix/streamline null-checks
2019-05-09 00:22:24 +02:00
Jean Flach
9a0d894f10 Don't use deprecated RSA_generate_key
fixes #4635
2019-05-08 23:46:31 +02:00
Michael Friedrich
81075088f1
Merge pull request #7169 from Icinga/feature/enhance-docs
Docs: Improve distributed, features HA, reachability chapters
2019-05-08 18:25:25 +02:00
Michael Friedrich
c3d7fc727b
Merge pull request #7168 from Icinga/bugfix/config-packages-regression
Fix deadlock in API config packages
2019-05-08 18:18:21 +02:00
Michael Friedrich
c2542710b7 Docs: Add initial sync for secondary HA masters, hints on IDO DB clusters
refs #6492
2019-05-08 18:16:54 +02:00
Michael Friedrich
07790e456b Docs: Improve features chapter and add details on HA setups
refs #4855
2019-05-08 18:16:40 +02:00
Michael Friedrich
15326caf38 Docs: Add note for reachability calculation with checks disabled
refs #6844
2019-05-08 17:31:36 +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
2faf58dc9e
Merge pull request #7166 from Icinga/feature/pure-mariadb-libs
cmake: Update MySQL autodetection to support MariaDB
2019-05-08 12:03:23 +02:00