diff --git a/neutron/privileged/agent/linux/ip_lib.py b/neutron/privileged/agent/linux/ip_lib.py index aa44b62c912..f889b795dd1 100644 --- a/neutron/privileged/agent/linux/ip_lib.py +++ b/neutron/privileged/agent/linux/ip_lib.py @@ -400,6 +400,10 @@ def set_link_flags(device, namespace, flags): _run_iproute_link("set", device, namespace, flags=new_flags) +@tenacity.retry( + retry=tenacity.retry_if_exception_type(NetworkInterfaceNotFound), + wait=tenacity.wait_exponential(multiplier=0.02, max=1), + stop=tenacity.stop_after_delay(3), reraise=True) @privileged.link_cmd.entrypoint def set_link_attribute(device, namespace, **attributes): _run_iproute_link("set", device, namespace, **attributes) @@ -430,7 +434,8 @@ def set_link_bridge_master(device, bridge, namespace=None): @tenacity.retry( retry=tenacity.retry_if_exception_type( - netlink_exceptions.NetlinkDumpInterrupted), + (netlink_exceptions.NetlinkDumpInterrupted, + NetworkInterfaceNotFound)), wait=tenacity.wait_exponential(multiplier=0.02, max=1), stop=tenacity.stop_after_delay(8), reraise=True)