Skip to content

[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
sonic-net:masterfrom
nexthop-ai:save-and-restore-arp-fdb-fast-reboot
Closed

[Nexthop] fast-reboot: save FDB, ARP and route state for platforms that cold-start SAI after kexec#4757
wren-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:save-and-restore-arp-fdb-fast-reboot

Conversation

@wren-nexthop

Copy link
Copy Markdown

What I did

Resolves #4754

Save FDB, ARP/neighbor, default-route and media state to /host/fast-reboot before the fast-reboot kexec, so swss can restore it after boot.

swss startup already restores these snapshots — files/build_templates/docker_image_ctl.j2 copies fdb.json / arp.json / default_routes.json / media_config.json into 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() to scripts/fast-reboot, called for fast-reboot only, right before the point of no return:

  • Skips (with a debug log) when fast-reboot-dump.py is not present, and on multi-ASIC platforms.
  • Recreates /host/fast-reboot, runs fast-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

  1. sudo fast-reboot -v — the log shows Dumping FDB/ARP/route/serdes state to /host/fast-reboot ....
  2. Before kexec, /host/fast-reboot contains fdb.json, arp.json, default_routes.json, media_config.json.
  3. After boot, swssconfig logs show the JSON files being loaded, and the directory is cleaned up by the existing swss startup logic.

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)

Signed-off-by: domingo-nexthop <domingo@nexthop.ai>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fast-reboot: FDB/ARP snapshots are never produced although swss still restores them from /host/fast-reboot

3 participants