Affects Version/s: 2.2.0, 2.5.0
Fix Version/s: None
On a couple different production environments we've run into an issue where a hardware failure has hung up the controller and prevented controller and topic leadership from changing to a healthy broker. When the issue happens we see this repeated in the logs at regular intervals for the other brokers (the affected broker can’t write to disk, so no logging occurs there):
Once we encounter this error any partitions whose leadership is on the affected node are unavailable until we force that broker out of the cluster – that is to say, kill the node.
When we initially hit the issue we were running on version 2.2.0, though I've been able to reproduce this in an environment running 2.5.0 as well. To simulate the hardware failure I'm using the xfs_freeze utility to suspend access to the filesystem. Zookeeper failover is also part of the mix. In all instances where we’ve seen this the ZK leader and Kafka Controller were on the same node and both affected by the hardware issue. Zookeeper is able to successfully failover, which it does rather quickly.
Reproduction steps are pretty straightforward:
- Spin up a 3 node cluster
- Ensure that the Kafka Controller and Zookeeper Leader are on the same node.
- xfs_freeze the filesystem on the node that the controller is running on
This reproduces 100% of the time for me. I’ve left it running for well over an hour without any Kafka failover happening. Unfreezing the node will allow the cluster to heal itself.
I’ve attached a thread dump from an environment running 2.5.0.