Commit 65433e1
committed
fixup review comment
CA-384228: Enable TCP Path MTU Discovery by default
Fixes slave xapi hang during pool join when jumbo frames are configured
but the network path doesn't support them.
Problem:
When MTU mismatch occurs (interface configured for 9000 but path supports
only 1500), RPC connections hang on large requests (~1613 bytes). The
hanging connection holds a database lock, blocking all other DB operations
and causing the entire slave xapi to become unresponsive during pool join.
Root cause:
Without Path MTU Discovery, TCP cannot detect when the path MTU is smaller
than the configured interface MTU. When ICMP "Fragmentation Needed" messages
are blocked by firewalls, TCP has no feedback mechanism to reduce packet size.
Packets exceeding the path MTU are silently dropped by network infrastructure,
leading to connection timeouts. The application-level retry logic (in
master_connection.ml) attempts reconnection, but each retry encounters the
same issue while holding a database lock, causing extended hangs.
Solution:
Enable TCP PMTUD to allow automatic MTU detection and adaptation.
Configuration:
- net.ipv4.tcp_mtu_probing=1: Enable automatic MTU detection when ICMP
blackhole is detected (recommended setting)
- net.ipv4.tcp_base_mss=1024: Base MSS for MTU probing
With PMTUD enabled, TCP detects packet loss patterns indicating MTU issues
and proactively reduces packet size to find a working MTU. This works even
when ICMP Fragmentation Needed messages are blocked by firewalls, allowing
connections to succeed and preventing database lock contention.
Files:
- scripts/92-xapi-tcp-mtu.conf: New sysctl configuration file
- scripts/Makefile: Install sysctl config to /usr/lib/sysctl.d/
The file is installed to /usr/lib/sysctl.d/ (package-owned location) rather
than /etc/sysctl.d/ (user config space). The "92" prefix ensures this loads
after basic network configuration (91-*), and admins can override with files
in /etc/sysctl.d/ if needed.
Reference: https://blog.cloudflare.com/path-mtu-discovery-in-practice/
Signed-off-by: Gang Ji <gang.ji@cloud.com>1 parent dcaf8d9 commit 65433e1
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments