sonic-buildimage/files/scripts
anamehra e107549942 chassis-packet: resolve the missing static routes (#14593)
Why I did it
Fixes #14179
chassis-packet: missing arp entries for static routes causing high orchagent cpu usage

It is observed that some sonic-mgmt test case calls sonic-clear arp, which clears the static arp entries as well. Orchagent or arp_update process does not try to resolve the missing arp entries after clear.

How I did it
arp_update should resolve the missing arp/ndp static route
entries. Added code to check for missing entries and try ping if any
found to resolve it.

How to verify it
After boot or config reload, check ipv4 and ipv4 neigh entries to make sure all static route entries are present
manual validation:
Use sonic-clear arp and sonic-clear ndp to clear all neighbor entries
run arp_update
Check for neigh entries. All entries should be present.
Testing on T0 setup route/for test_static_route.py

The test set the STATIC_ROUTE entry in conifg db without ifname:
sonic-db-cli CONFIG_DB hmset 'STATIC_ROUTE|2.2.2.0/24' nexthop 192.168.0.18,192.168.0.25,192.168.0.23

"STATIC_ROUTE": {
    "2.2.2.0/24": {
        "nexthop": "192.168.0.18,192.168.0.25,192.168.0.23"
    }
},
Validate that the arp_update gets the proper ARP_UPDATE_VARDS using arp_update_vars.j2 template from config db and does not crash:

{ "switch_type": "", "interface": "", "pc_interface" : "PortChannel101 PortChannel102 PortChannel103 PortChannel104 ", "vlan_sub_interface": "", "vlan" : "Vlan1000", "static_route_nexthops": "192.168.0.18 192.168.0.25 192.168.0.23 ", "static_route_ifnames": "" }

validate route/test_static_route.py testcase pass.
2023-04-12 18:32:47 +08:00
..
arp_update chassis-packet: resolve the missing static routes (#14593) 2023-04-12 18:32:47 +08:00
asic_status.py [systemd] ASIC status based service bringup on VOQ chassis (#7477) 2021-07-27 23:02:49 -07:00
asic_status.sh [systemd] ASIC status based service bringup on VOQ chassis (#7477) 2021-07-27 23:02:49 -07:00
bgp.sh Finalize fast-reboot in warmboot finalizer (#14238) (#14608) 2023-04-11 22:54:56 +08:00
configdb-load.sh [MultiDB] use sonic-db-cli PING and fix wrong multiDB API in NAT (#4541) 2020-05-06 15:41:28 -07:00
core_cleanup.py [Python] Align files in root dir, dockers/ and files/ with PEP8 standards (#6109) 2020-12-03 15:57:50 -08:00
database.sh [services] kill container on stop in warm/fast mode (#10510) 2022-09-19 19:34:33 +03:00
gbsyncd-platform.sh [gearbox] provide common gbsyncd.service.j2 to start for platform specific gbsyncd docker (#9332) 2021-11-23 10:44:29 -08:00
gbsyncd.sh Address Review Comment to define SONIC_GLOBAL_DB_CLI in gbsyncd.sh (#11857) 2022-08-29 08:19:28 -07:00
lldp.sh [systemd] ASIC status based service bringup on VOQ chassis (#7477) 2021-07-27 23:02:49 -07:00
mark_dhcp_packet.py Replace os.system and remove subprocess with shell=True (#12177) 2022-11-04 10:48:51 -04:00
mgmt-framework.sh [services] kill container on stop in warm/fast mode (#10510) 2022-09-19 19:34:33 +03:00
radv.sh [services] kill container on stop in warm/fast mode (#10510) 2022-09-19 19:34:33 +03:00
service_mgmt.sh Finalize fast-reboot in warmboot finalizer (#14238) (#14608) 2023-04-11 22:54:56 +08:00
snmp.sh [services] kill container on stop in warm/fast mode (#10510) 2022-09-19 19:34:33 +03:00
sonic-netns-exec [sonic-netns-exec]: use "$@" to reflects all positional parameters as they were set initially (#4375) 2020-04-07 00:05:47 -07:00
supervisor-proc-exit-listener Publish additional events (#12563) 2022-11-07 09:57:57 -08:00
swss.sh Finalize fast-reboot in warmboot finalizer (#14238) (#14608) 2023-04-11 22:54:56 +08:00
syncd_common.sh Finalize fast-reboot in warmboot finalizer (#14238) (#14608) 2023-04-11 22:54:56 +08:00
syncd.sh Reload BCM SDK kmods on syncd start to handle syncd restart issues (#12804) 2022-12-10 10:33:21 +08:00
teamd.sh Finalize fast-reboot in warmboot finalizer (#14238) (#14608) 2023-04-11 22:54:56 +08:00
telemetry.sh [services] kill container on stop in warm/fast mode (#10510) 2022-09-19 19:34:33 +03:00
update_chassisdb_config In modular chassis, add CHASSIS_STATE_DB on control card (#5624) 2020-12-15 17:15:00 -08:00
write_standby.py Increase wait_for_tunnel() timeout to 90s (#14279) (#14563) 2023-04-07 16:02:01 +08:00