[Nexthop] fast-reboot: save FDB, ARP and route state for platforms that cold-start SAI after kexec - #4757
Closed
wren-nexthop wants to merge 1 commit into
Closed
Conversation
Signed-off-by: domingo-nexthop <domingo@nexthop.ai>
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Resolves #4754
Save FDB, ARP/neighbor, default-route and media state to
/host/fast-rebootbefore the fast-reboot kexec, so swss can restore it after boot.swss startup already restores these snapshots —
files/build_templates/docker_image_ctl.j2copiesfdb.json/arp.json/default_routes.json/media_config.jsoninto the swss container before signaling swssconfig — but nothing in the fast-reboot flow produces them anymore. On platforms where fast-reboot re-initializes the ASIC after kexec (no SAI warm-boot state is preserved), the snapshots are the recovery input that shortens post-boot relearning.How I did it
Add
dump_state_for_fast_boot()toscripts/fast-reboot, called forfast-rebootonly, right before the point of no return:fast-reboot-dump.pyis not present, and on multi-ASIC platforms./host/fast-reboot, runsfast-reboot-dump.py -t /host/fast-reboot, and removes the directory again if the dump fails so a partial snapshot is never restored.How to verify it
sudo fast-reboot -v— the log showsDumping FDB/ARP/route/serdes state to /host/fast-reboot ..../host/fast-rebootcontainsfdb.json,arp.json,default_routes.json,media_config.json.Verified on Broadcom Tomahawk-based platforms whose fast-reboot path cold-starts SAI after kexec.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)