Timo Sirainen [Tue, 2 Oct 2018 07:22:11 +0000 (10:22 +0300)]
lib-master: ipc-client: Don't free command too early
When multiple replies were received by IPC only the final reply should free
the command. This may have caused e.g. "doveadm proxy list" to crash.
Broken by 435f0545b200767c25a5daee17cd6b4998d03710
Aki Tuomi [Mon, 23 Jul 2018 09:40:15 +0000 (12:40 +0300)]
lib-ssl-iostream: Always fall back to default CAs for client contexts
When creating a client context, we always try to load the default
CA, if no CA settings have been provided. This makes it also possible
to allow invalid certs without specifying ssl_client_ca settings,
and also makes dovecot trust system store by default for outgoing
connections.
Stephan Bosch [Wed, 26 Sep 2018 10:25:59 +0000 (12:25 +0200)]
lib-smtp: client: Make the initialization of the connection after SSL handshake reliable.
Before, the connection was not guaranteed to be fully initialized after the SSL
handshake. The problem would occur when the handshake finished while writing the
SSL output stream. In a similar HTTP client issue, this caused a segfault.
Stephan Bosch [Tue, 25 Sep 2018 22:26:32 +0000 (00:26 +0200)]
lib-http: client: Fix segfault by making the initialization of the connection after SSL handshake reliable.
Before, the connection was not guaranteed to be fully initialized after the SSL
handshake. The problem would occur when the handshake finished while writing the
SSL output stream.
Stephan Bosch [Wed, 5 Sep 2018 19:56:42 +0000 (21:56 +0200)]
lib-storage: Change default postmaster_address setting to "postmaster@<user domain or server hostname>".
The former "postmaster@<user domain>" default would only yield a valid
postmaster address when there is a domain part in the username. The new default
uses a conditional variable expansion choose "%d" when it is not empty and the
new "%{hostname}" otherwise.
Timo Sirainen [Fri, 7 Sep 2018 17:04:48 +0000 (20:04 +0300)]
doveadm: Make sure to stop running commands requiring synced ring when ring is no longer synced
A command could desync the ring, and no more commands should be run
afterwards.
This also fixes a bug where a command that desyncs the ring is supposed to
wait for the ring being synced before returning OK, but returns it
immediately instead.
Timo Sirainen [Thu, 6 Sep 2018 14:04:00 +0000 (17:04 +0300)]
global: Replace MASTER_SERVICE_FLAG_SEND_STATS with _DONT_SEND_STATS
Most services want to send statistics, so it's better to reverse the flag
behavior. Mark the few services that don't want stats with
MASTER_SERVICE_FLAG_DONT_SEND_STATS.
Timo Sirainen [Thu, 6 Sep 2018 16:48:09 +0000 (19:48 +0300)]
master: Start service processes only after adding all service listeners
Otherwise the processes could try to connect to services that aren't being
listened on, causing errors. Especially stats-writer socket needs to be
available early on.
Stephan Bosch [Thu, 6 Sep 2018 13:22:30 +0000 (15:22 +0200)]
lib-http: client: peer: Notify all peers in a peer pool about a successful connection.
This allows peers for which the last connection attempt failed (which was not
the last pending attempt in the pool) to try again. This solves a problem that
could potentially cause a hang with multiple parallel clients creating serveral
new connections at once.
Stephan Bosch [Thu, 6 Sep 2018 01:11:18 +0000 (03:11 +0200)]
lib-http: client: peer: Always run http_client_queue_connection_failure() upon definitive connection failure.
The recorded peer->connecting flag was highly unreliable in a scenario involving
starting parallel connections. This way, the linked queues can update their
state accordingly. Also, this will not cause empty queues to initiate new
connection, because empty queues will do nothing after updating the connection
state.
This problem caused a client ioloop hang in high-load conditions.
Stephan Bosch [Thu, 6 Sep 2018 00:51:09 +0000 (02:51 +0200)]
lib-http: client: peer: Determine number of pending peers in http_client_peer_shared_connection_failure() itself.
Before, the number of pending peers was a parameter, but that was only for a
single peer pool. This is wrong, since the one peer can have many different
pools (depending on how many clients with incompatible configs share this
peer).
Timo Sirainen [Fri, 31 Aug 2018 11:57:13 +0000 (14:57 +0300)]
log: Move data stack frame allocation to parent function
This simplifies the next commit, which requires data stack nearly always
when logging. The data stack frames are cheap enough that we don't really
need to optimize for avoiding the cases when they're not needed.