Commit ede1d71
fix(e2e): reuse OVSDB client in address set tests to avoid HA deadlock (#6368)
Cache the OVN NB client across WaitForAddressSet* calls instead of
creating a new connection each time. In HA environments, repeated
connect/monitor cycles can trigger a deadlock in libovsdb when a leader
change occurs during the initial Monitor RPC setup: the Monitor goroutine
holds rpcMutex.RLock while the leader-change handler blocks on
rpcMutex.Lock, and Go's write-preferring RWMutex then also blocks the
inactivity probe's RLock, leaving no recovery path.
Also tolerate transient "not connected" errors during the poll loop
instead of failing immediately, giving libovsdb's automatic reconnection
time to recover after a leader failover.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 43ff19a commit ede1d71
1 file changed
+22
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
65 | | - | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
187 | 194 | | |
188 | | - | |
| 195 | + | |
189 | 196 | | |
190 | 197 | | |
191 | 198 | | |
| |||
0 commit comments