When ovn-controller is configured to maintain VRFs for routers
with dynamic-routing enabled, ovn-controller also handles deletion.
However, if the delete NetLink operation failed we should only retry it
if the device actually exists.  It's possible that that VRF device has
been (incorrectly) deleted externally.  In that case OVN can't really do
much but it should also stop retrying the delete - that will fail each
and every time.

Spotted while trying to add a new (broken) multinode test.

Fixes: 45b9fbb4b018 ("controller: Take into account nl failures updating VRF 
and configured routes.")
Signed-off-by: Dumitru Ceara <[email protected]>
---
 controller/route-exchange.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controller/route-exchange.c b/controller/route-exchange.c
index eef58e8018..360ffa14ee 100644
--- a/controller/route-exchange.c
+++ b/controller/route-exchange.c
@@ -302,7 +302,7 @@ route_exchange_run(const struct route_exchange_ctx_in 
*r_ctx_in,
     SSET_FOR_EACH_SAFE (vrf_name, &old_maintained_vrfs) {
         if (!sset_contains(&_maintained_vrfs, vrf_name)) {
             error = re_nl_delete_vrf(vrf_name);
-            if (error) {
+            if (error && error != ENODEV) {
                 /* If netlink transaction fails, we will retry next time. */
                 sset_add(&_maintained_vrfs, vrf_name);
                 SET_ROUTE_EXCHANGE_NL_STATUS(error);
-- 
2.49.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to