sonic-buildimage/files/scripts
anamehra 0b30826e56 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-18 14:34:49 +08:00
..
arp_update chassis-packet: resolve the missing static routes (#14593) 2023-04-18 14:34:49 +08:00
asic_status.py [202205][chassis] update the asic_status.py to read from CHASSIS_FABRIC_ASIC_INFO_TABLE (#12780) 2022-11-26 20:27:30 -08:00
asic_status.sh [systemd] ASIC status based service bringup on VOQ chassis (#7477) 2021-07-27 23:02:49 -07:00
bgp.sh [202205] Fast reboot finalizer 202205 (#14143) 2023-03-15 09:34:05 -07: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-12-08 17:19:16 +00: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-09-01 00:12:56 +00: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 [mux]: Fix mark_dhcp_packet (#9373) 2021-11-29 12:04:06 -08:00
mgmt-framework.sh [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00:00
radv.sh [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00:00
service_mgmt.sh [202205] Fast reboot finalizer 202205 (#14143) 2023-03-15 09:34:05 -07:00
snmp.sh [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00: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 [Supervisord] Deduplicate the alerting messages of critical processes from Supervisord. (#6849) 2021-02-25 14:35:29 -08:00
swss.sh [202205] Fast reboot finalizer 202205 (#14143) 2023-03-15 09:34:05 -07:00
syncd_common.sh [202205] Fast reboot finalizer 202205 (#14143) 2023-03-15 09:34:05 -07:00
syncd.sh Add support for platform syncd pre shutdown plugin (#13564) 2023-03-09 04:33:42 +08:00
teamd.sh [202205] Fast reboot finalizer 202205 (#14143) 2023-03-15 09:34:05 -07:00
telemetry.sh [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00: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 [mux] skip mux operations during warm shutdown (#11937) 2022-09-08 15:48:56 +00:00