.. _example_service_dhcp-server_failover-split-brain: #################### Failover-Split-Brain #################### Test suite for DHCP Failover split-brain scenarios. Split-brain occurs when both DHCP servers lose communication with each other but both remain operational. Each server thinks the other is down and may enter "communications-interrupted" state. This test suite verifies: - Both servers detect communications-interrupted state - Clients can still obtain IPs during split-brain - Servers recover to normal state when communication is restored ************************** Test Split-Brain Detection ************************** Description =========== This scenario verifies that when communication between primary and secondary DHCP servers is blocked, both servers detect the issue and enter "communications-interrupted" state. The failover protocol uses port 647 for peer communication. By blocking this port, we simulate a network partition. Expected behavior: - Initially both servers are in "normal" state - After blocking port 647, both detect "communications-interrupted" - Servers may also show "partner down" after timeout Scenario ======== .. include:: failover-split-brain/testsplit-braindetection .. raw:: html
************************************* Test Split-Brain Client Still Gets IP ************************************* Description =========== This scenario verifies that during a split-brain condition, DHCP clients can still obtain IP addresses from one of the servers. The failover protocol is designed to allow both servers to serve clients during communication interruption. Expected behavior: - Split-brain is active (servers can't communicate) - Client requests DHCP lease - Client successfully obtains IP from available server Scenario ======== .. include:: failover-split-brain/testsplit-brainclientstillgetsip .. raw:: html
************************* Test Split-Brain Recovery ************************* Description =========== This scenario verifies that after a split-brain condition is resolved (communication restored), both servers recover to normal state and synchronize their lease databases. Expected behavior: - Start in split-brain state - Remove traffic blocking rules - Both servers recover to "normal" state - Lease databases are synchronized Scenario ======== .. include:: failover-split-brain/testsplit-brainrecovery .. raw:: html