-
Notifications
You must be signed in to change notification settings - Fork 648
Add check for empty m_priority_group_ids in initializePriorityGroupsBulk #3944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for empty m_priority_group_ids in initializePriorityGroupsBulk #3944
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arista-hpandya Can you fix the code coverage issue? |
|
@arista-hpandya, can you please add UT to handle this case |
|
@arista-hpandya Please address UT |
|
/azp run |
|
Sure will add a UT soon |
|
Azure Pipelines successfully started running 1 pipeline(s). |
696015e to
e85c87a
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
e85c87a to
c7b3b59
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
c7b3b59 to
921cafc
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-swss |
|
/AzurePipelines run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-swss |
|
/AzurePipelines run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-swss |
|
/AzurePipelines run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arista-hpandya please rebase |
f0bd9d3 to
d8843b7
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d8843b7 to
55c73f4
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arista-hpandya #3966 seems to be an enhancement to this PR that addresses additional use cases. |
|
@arista-hpandya @Pavan-Nokia Thanks for raising this PR and letting me know. Also, please have a look at changes I did in my PR in the UT regarding |
|
@arista-hpandya , can we close this in favor of #3966 |
|
Thanks for the PR @stepanblyschak . Yes we can close this PR @prsunny |
What I did
Fixes sonic-net/sonic-buildimage#24268
Added a guard clause in
PortsOrch::initializePriorityGroupsBulkto check if the port has any configured Priority Groups (port.m_priority_group_ids.size() == 0). If the size is zero, the function now skips the SAI calls to retrieve the Priority Group list.Why I did it
This fixes a critical regression introduced by a previous PR discussed in detail here: sonic-net/sonic-buildimage#24268 that replaced the individual
initializePriorityGroupscall with a bulk operation.The original function included a check to ensure
SAI_PORT_ATTR_NUMBER_OF_INGRESS_PRIORITY_GROUPSwas non-zero before attempting to retrieve the list. This check was missing in the newinitializePriorityGroupsBulkmethod.Impact of Regression:
When processing ports without Priority Groups (e.g., recirculation ports like
Ethernet-Rec0), the missing check led to a failed SAI operation (SAI_STATUS_NOT_EXECUTED) during initialization, causing astd::runtime_errorand an immediate OrchAgent crash, which subsequently brings down the entire SWSS and Syncd stack.