Commit e6a657c
fix(daemon): handle OVS bridge creation race condition with exchangeLinkName (#6374)
When exchangeLinkName=true, a race condition exists between OVS vswitchd
processing the netlink rename notification and the bridge creation: OVS's
netdev cache still holds a reference to the old NIC name, causing the
bridge's kernel interface to never appear. Additionally, the retry path
fails because changeProviderNicName cannot detect the already-renamed
state.
Fix by:
1. Making changeProviderNicName idempotent - when the source link is not
found, check if the target already exists as a non-OVS interface,
indicating a prior successful rename.
2. Adding waitForBridgeInterface to poll for the kernel interface after
bridge creation. If it doesn't appear within 5s, delete the stale
OVSDB bridge record so the reconciliation loop can retry cleanly.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 503c357 commit e6a657c
2 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
262 | 275 | | |
263 | 276 | | |
264 | 277 | | |
| |||
307 | 320 | | |
308 | 321 | | |
309 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
310 | 334 | | |
311 | 335 | | |
312 | 336 | | |
| |||
0 commit comments