Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staticd: Handle static routes appropriately #16684

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DennyAgussy
Copy link

zebra not restore routes when have more then one iface with common network and one iface is flaping (up, then get IP) #16110

Introduction:
As per the bug when setting up a route via dum2 and assuming it will be restored after the interface is restored. There is a weird behavior. Good behavior "get addr + up" then the route is activated as expected. But when "up + get addr" the route is inactive, though the interface is up and the connected route is added.

Implementation details:
We have added a check whether the interface is up or not and triggering the function which potentially leads to route walk.

Hope this implementation is a good an approach, if not let's know the alternative one, so that we can work on it.

Thanks
Denny Agussy

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the commit as per workflow.rst specifies. Additionally put the description of what is going on in the commit message. Finally we do not use c++ style comments either, please fix that.

@DennyAgussy DennyAgussy force-pushed the zebra-not-restore-routes16110 branch from abb1a4d to 0daba99 Compare August 29, 2024 12:20
@frrbot frrbot bot added the staticd label Aug 29, 2024
@DennyAgussy DennyAgussy changed the title zebra not restore routes:16110 staticd: Handle static routes appropriately Aug 29, 2024
@ton31337
Copy link
Member

Possible to reproduce this with a topotest?

@DennyAgussy
Copy link
Author

Possible to reproduce this with a topotest?

Hi @ton31337

The topotests which are failing in the master branch are also being failed in the fix we had done. Apart from that rest of the tests were success.

Test cases failed:

  • topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp2.py
    Master: FAILED test_multicast_pim_static_rp2.py::test_restart_pimd_process_p2 - AssertionError: Testcasetest_restart_pimd_process_p2 : Failed Error: True
    Fix: FAILED test_multicast_pim_static_rp2.py::test_restart_pimd_process_p2 - AssertionError: Testcasetest_restart_pimd_process_p2 : Failed Error: True
  • topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
    Master:test_static_routes_topo2_ibgp.py::test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp - AssertionError: Testcase test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp : Failed
    Fix: test_static_routes_topo2_ibgp.py::test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp - AssertionError: Testcase test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp : Failed
  • topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
    Master: FAILED test_static_routes_topo1_ebgp.py::test_static_route_2nh_p0_tc_1_ebgp - AssertionError: Testcase test_static_route_2nh_p0_tc_1_ebgp
    FIX: ERROR test_static_routes_topo1_ebgp.py::test_static_route_2nh_p0_tc_1_ebgp - AssertionError: Timeout(10) waiting for /var/run/frr/mgmtd.pid...
    ERROR test_static_routes_topo1_ebgp.py::test_static_route_2nh_admin_dist_p0_tc_2_ebgp - AssertionError: Timeout(10) waiting for /var/run/frr/mgmtd.pid...
    ERROR test_static_routes_topo1_ebgp.py::test_same_rte_from_bgp_static_p0_tc5_ebgp - AssertionError: Timeout(10) waiting for /var/run/frr/mgmtd.pid
  • topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
    Master: FAILED test_static_routes_topo2_ebgp.py::test_static_rte_with_8ecmp_nh_p1_tc9_ebgp - AssertionError: Testcase test_static_rte_with_8ecmp_nh_p1_tc9
    FIx:FAILED test_static_routes_topo2_ebgp.py::test_static_rte_with_8ecmp_nh_p1_tc9_ebgp - AssertionError: r1: Daemon zebra not running
  • topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
    Master: FAILED test_static_routes_topo3_ebgp.py::test_staticroute_with_ecmp_p0_tc3_ebgp - AssertionError: Testcase test_staticroute_with_ecmp_p0_tc3_ebg...
    FAILED test_static_routes_topo3_ebgp.py::test_bgp_local_nexthop_p1_tc14_ebgp - lib.common_config.InvalidCLIError: vtysh show running error on
    Fix: ERROR test_static_routes_topo3_ebgp.py::test_staticroute_with_ecmp_p0_tc3_ebgp - AssertionError
    ERROR test_static_routes_topo3_ebgp.py::test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ebgp - AssertionError
    ERROR test_static_routes_topo3_ebgp.py::test_bgp_local_nexthop_p1_tc14_ebgp - AssertionError
    ERROR test_static_routes_topo3_ebgp.py::test_frr_intf_name_as_gw_gap_tc4_ebgp_p0 - AssertionError
    ERROR test_static_routes_topo3_ebgp.py::test_static_route_with_tag_p0_tc_13_ebgp - AssertionError

Master branch commit(9a009e1)
Fix tested after rebasing on 9a009e1

Thanks
@DennyAgussy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants