Michael Friedrich
146b337d4d
Merge pull request #7211 from Icinga/feature/asio-tls-version
...
Require TLS 1.2 for Cluster & REST API
2019-06-03 16:19:22 +02:00
Michael Friedrich
d82c067555
Require TLS 1.2 for Cluster & REST API
...
refs #7041
2019-05-29 17:08:36 +02:00
Michael Friedrich
59b95ed1f0
Quality: Replace deprecated get_io_service() with get_executor().context() for Boost ASIO
...
refs #7041
2019-05-29 14:36:10 +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
502c43fb12
Active packages: Don't try to fix broken config packages which are not cached yet
2019-04-30 12:19:35 +02:00
Michael Friedrich
2bca7a5bb5
Repair broken API config packages at runtime
...
This means a new timer which checks every 5m whether the
active-stage can be read, and if not, it overwrites the
file on disk with the details from memory.
2019-04-26 14:53:36 +02:00
Michael Friedrich
c821e73364
Cache the API package stage name with a active-stage fallback
...
This prevents reading the file everytime the stageName is required
for when creating a runtime object via REST API.
2019-04-26 13:40:27 +02:00
Alexander A. Klimov
5afef1015d
Replace unlink() with boost::filesystem::remove()
...
refs #7101
2019-04-25 09:53:02 +02:00
Michael Friedrich
0f804d126b
Merge pull request #7133 from Icinga/feature/boost-asio-pki
...
Use new I/O engine in PkiUtility::FetchCert() and PkiUtility::RequestCertificate()
2019-04-23 14:27:48 +02:00
Michael Friedrich
20d51d21dc
Merge pull request #7127 from Icinga/bugfix/replay-log
...
ApiListener#RotateLogFile(): don't overwrite previous log
2019-04-23 12:08:12 +02:00
Alexander A. Klimov
407e77883c
ApiListener#ReplayLog(): read current log file too instead of rotating
2019-04-18 17:22:36 +02:00
Alexander A. Klimov
997d84bfa0
ApiListener#RotateLogFile(): don't overwrite previous log
2019-04-18 17:22:33 +02:00
Alexander A. Klimov
9b489cf9b9
ApiListener#ApiTimerHandler(): delete all replayed logs
...
refs #6932
2019-04-18 17:00:40 +02:00
Alexander A. Klimov
f44e847717
Rotate replay log on shutdown, not on startup
2019-04-17 14:18:20 +02:00
Michael Friedrich
b24a3be083
Improve code docs for cluster message routing conditions
...
refs #6781
2019-04-10 14:17:36 +02:00
Alexander A. Klimov
f2d9d91e83
Introduce UnbufferedAsioTlsStream#GetPeerCertificate()
2019-04-01 17:11:09 +02:00
Michael Friedrich
5c2aaf6380
Improve error logging on connection failure (cluster)
2019-04-01 16:13:37 +02:00
Alexander A. Klimov
64b2ac4b30
ApiListener: drop unused thread pool
2019-04-01 15:06:17 +02:00
Alexander A. Klimov
5208448b76
Restore the previous performance of replaying logs
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
e6d78bf361
Move some TCP/TLS logic out of ApiListener
...
... for re-using it
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
326bf66255
ApiListener: use setsockopt(), not tcp::acceptor#set_option()
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
b5fddaf3ce
ApiListener: log why bind(2) failed
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
19625e62ef
ApiListener: fix self-made security hole
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
a451327b81
JsonRpcConnection: re-add num_json_rpc_work_queue_item_rate
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
84b411501b
Re-add JsonRpcConnection#Disconnect()
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
2d16b02520
ApiListener#NewClientHandlerInternal(): shut down TLS stream
2019-04-01 13:30:42 +02:00
Alexander A. Klimov
c46157d552
ApiListener: fix self-made security hole
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
f9fff54da2
ApiListener: don't require a valid certificate for the TLS handshake to complete
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
6c86c127f1
Port JsonRpcConnection to Boost ASIO
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
48b5824e37
ApiListener: send icinga::Hello message
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
832365195d
ApiListener: connect(2) via Boost ASIO
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
e9a64abd09
ApiListener#ListenerCoroutineProc(): catch more edge cases
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
a6813ec786
ApiListener: restore previous bind(2) behavior
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
7fe0431ada
HttpServerConnection: verify requests via Boost ASIO + Beast
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
e21956e26e
ApiListener: detect protocol
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
539855bac1
ApiListener: verify peer
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
720c53ab77
ApiListener: perform TLS handshake
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
2615967e7f
Make ApiListener#m_SSLContext a Boost ASIO SSL context
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
e4f3422b3a
ApiListener: listen(2) via Boost ASIO
2019-04-01 11:40:14 +02:00
Michael Friedrich
149f640fd8
Improve DB IDO HA failover behaviour
...
- Decrease Object Authority updates to 10s (was 30s)
- Decrease failover timeout to 30s (was 60s)
- Decrease cold startup (after (re)start) with no OA updates to 30s (was 60s)
- Immediately connect on Resume()
- Fix query priority which got broken with #6970
- Add more logging when a failover is in progress
```
[2019-03-29 16:13:53 +0100] information/IdoMysqlConnection: Last update by endpoint 'master1' was 8.33246s ago (< failover timeout of 30s). Retrying.
[2019-03-29 16:14:23 +0100] information/IdoMysqlConnection: Last update by endpoint 'master1' was 38.3288s ago. Taking over 'ido-mysql' in HA zone 'master'.
```
- Add more logging for reconnect and disconnect handling
- Add 'last_failover' attribute to IDO*Connection objects
refs #6970
2019-04-01 08:50:00 +02:00
Michael Friedrich
804c00ece5
Merge pull request #6999 from Icinga/bugfix/compiler-warnings
...
Suppress or fix compiler warnings
2019-03-18 08:44:30 +01:00
Alexander A. Klimov
bf92e32496
Suppress or fix compiler warnings
2019-03-08 14:07:29 +01: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
Peter Eckel
5d59863725
Avoid duplicating non-zero count message replay messages in the debug log
2019-02-11 13:54:17 +01:00
Michael Friedrich
6de4cef3ae
Merge pull request #6719 from Icinga/fix/finished-reconnect-message
...
Do not send 'finished reconnecting...' if failed
2018-10-24 11:51:34 +02:00
Michael Friedrich
3cb2c1d143
icinga.com: Update everything else
2018-10-18 09:50:53 +02:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Friedrich
64e273afdd
Merge pull request #6639 from Icinga/fix/windows-api-log-rename
...
Ensure to _unlink before renaming replay log on Windows
2018-09-27 08:02:00 +02:00
Michael Friedrich
c979f86e4e
Merge pull request #6632 from Icinga/feature/cluster-faster-reconnect
...
Increase the cluster reconnect frequency to 10s
2018-09-25 17:07:01 +02:00
Michael Friedrich
cbde35ff22
Use a dynamic thread pool for API connections
...
The full analysis is located in #6517 .
fixes #6517
2018-09-25 12:43:10 +02:00