[Nexthop] warm-reboot: disable FLOW_CNT_TRAP before warm shutdown - #4756
Closed
wren-nexthop wants to merge 1 commit into
Closed
[Nexthop] warm-reboot: disable FLOW_CNT_TRAP before warm shutdown#4756wren-nexthop wants to merge 1 commit into
wren-nexthop wants to merge 1 commit into
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). |
10 tasks
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 #4753
Disable the
FLOW_CNT_TRAPflex counter group before warm-boot shutdown, and roll the change back if the reboot aborts before kexec.With trap flow counters enabled, orchagent binds a SAI counter to every HOSTIF trap via
SAI_HOSTIF_TRAP_ATTR_COUNTER_ID. After warm boot, syncd replays that attribute during APPLY_VIEW and Broadcom SAI fails withBCM_E_NOT_FOUND, surfacing asSAI_STATUS_ITEM_NOT_FOUND; syncd enters shutdown-wait and orchagent crash-loops. Disabling the group before the warm shutdown lets CoppOrch unbind and clear every trap counter through SAI while the handles are still valid.How I did it
FLOW_CNT_TRAPis enabled, disable it in CONFIG_DB before the warm shutdown and wait forCOUNTERS_TRAP_NAME_MAPto drain./host/warmboot(flow_cnt_trap_need_re_enable) so the warmboot-finalizer knows to re-enable the group after a successful reconcile. The marker is only written when re-enable is actually needed, so its absence is the no-op signal.clear_bootre-enables the counter group and removes the marker.The finalizer side (re-enable after reconcile) is the companion sonic-buildimage PR: sonic-net/sonic-buildimage#28896
How to verify it
FLOW_CNT_TRAPin CONFIG_DB andconfig reload.sudo warm-reboot.show flowcnt-trap statsworks once the counter group is re-enabled by the finalizer.Verified on Broadcom Tomahawk-based platforms together with the companion finalizer change; also verified the abort path (interrupted warm-reboot re-enables the group and removes the marker).
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)