[featured]: Release delayed features on multi-ASIC via per-ASIC PortInitDone#15
[featured]: Release delayed features on multi-ASIC via per-ASIC PortInitDone#15william8545 wants to merge 2 commits into
Conversation
…nitDone On multi-ASIC, PortInitDone is published in each ASIC namespace's APPL_DB, not the host APPL_DB. featured only watched the host APPL_DB, so it never observed PortInitDone and released delayed features (lldp, gnmi, mgmt-framework, snmp, sflow, pmon) only after the fallback timeout. * Subscribe every port-bearing namespace's PORT_TABLE and release delayed features once all of them report PortInitDone (quorum) * Detect port-bearing namespaces via PORT table presence; reconcile the quorum against the connectors actually established so a failed connector degrades to the timeout backstop instead of blocking release forever * Key subscriptions and callbacks by (namespace, table) to support per-namespace PORT_TABLE listeners; single-ASIC behavior is unchanged * Use get_keys instead of get_table for the port existence check * Add unit tests for the quorum, re-release after swss restart, out-of-quorum namespaces, non-SET/other keys, and the reconcile path Signed-off-by: William Tsai <willtsai@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: nvidia-sonic/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR implements multi-ASIC PortInitDone quorum tracking for delayed service enablement. Previously, delayed services were enabled immediately upon any single PortInitDone event. Now, they are enabled only after all participating namespaces have reported, via per-namespace subscription with namespace-aware event dispatch. ChangesMulti-ASIC Delayed Service Enablement
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Cover the multi-ASIC vs single-ASIC branch of register_callbacks, which was previously exercised only through hand-built handlers: * Multi-ASIC: each port-bearing namespace's PORT_TABLE is subscribed on its own connector and the host APPL_DB is NOT subscribed for ports * Single-ASIC: the host APPL_DB PORT_TABLE is subscribed The two tests share a _make_bare_daemon helper, mirroring the existing _make_multi_asic_handler, so each test shows only what differs. Signed-off-by: William Tsai <willtsai@nvidia.com>
|
❌ SONiC CI #4533 finished with status: FAILURE |
Problem
On multi-ASIC,
PortInitDoneis published per-ASIC in each namespace's APPL_DB, butfeaturedonly watched the host APPL_DB. It therefore never observed the marker and released the delayed features (lldp, gnmi, mgmt-framework, snmp, sflow, pmon) only after the 180s fallback timeout, slowing every reload/reboot.Fix
PORT_TABLEand release delayed features once all of them reportPortInitDone(quorum).PORTtable presence and reconcile the quorum against the connectors actually established, so a failed connector degrades to the timeout backstop instead of blocking release forever.(namespace, table)to support per-namespace listeners.Tests
Unit tests for the quorum, re-release after swss restart, out-of-quorum namespaces, non-SET/other keys, the reconcile path, and the multi/single-ASIC
register_callbackswiring.Verification
Verified on a multi-ASIC setup: delayed features release via the port-init path shortly after
featuredstarts (instead of the 180s timeout), with all expected containers up and no regression on restart or cold reboot.Summary by CodeRabbit
Release Notes
New Features
Tests