Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix non-encap routes on parent device change (#8279)
Previously, there were two problems: - The routing table was not updated to use the new parent. - After restarting felix, the routing table was unable to clean up the old routes. This PR fixes the first (and has a feature flag that helps with the second): - VXLAN manager now recreates the RouteTable when the parent device changes. - To make that safe, move the creation to the main goroutine, with a channel to send the new parent name. - When making a new RouteTable, include previous parent interface names in the regex so that the old routes get cleaned up. This only works if Felix is not restarted at the wrong moment. - As belt-and-braces, add a disabled-by-default feature flag that tells the RouteTable to use RouteReplace to clobber conflicting routes. (This was my first attempt at ta fix but it has its own problems.) Also noticed that KeepVXLANDeviceInSync could take a long time to respond to changes, add a kick channel. Move feature gates to the feature detector. Avoid needing to pass yet another object to 30 places.
- Loading branch information