Skip to content

[ACL]Avoid incrementing crm count when ACL rule create fails#2238

Merged
prsunny merged 2 commits intosonic-net:masterfrom
dgsudharsan:crm_acl_fix
Apr 25, 2022
Merged

[ACL]Avoid incrementing crm count when ACL rule create fails#2238
prsunny merged 2 commits intosonic-net:masterfrom
dgsudharsan:crm_acl_fix

Conversation

@dgsudharsan
Copy link
Copy Markdown
Collaborator

@dgsudharsan dgsudharsan commented Apr 22, 2022

What I did
Avoid increment CRM counter when ACL rule creation fails. In existing code there is no return statement after failure during ACL rule creation which results in CRM getting incremented. Since the ACL rule recreation is retried this counter increments in a loop.

Why I did it
Added return statement in case of a failure.

How I verified it
Existing UT should verify the changes

Details if related

@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@prsunny could you please help to signoff?

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@dgsudharsan unrelated to this PR can you please check if we have such problem with other CRM counters? @volodymyrsamotiy FYI

@prsunny prsunny merged commit 3d3364f into sonic-net:master Apr 25, 2022
@qiluo-msft
Copy link
Copy Markdown
Contributor

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

judyjoseph pushed a commit that referenced this pull request May 2, 2022
* [ACL]Avoid incrementing crm count when ACL rule create fails
dgsudharsan added a commit to dgsudharsan/sonic-swss that referenced this pull request May 4, 2022
…et#2238)

* [ACL]Avoid incrementing crm count when ACL rule create fails
prsunny pushed a commit that referenced this pull request May 5, 2022
…2256)

* [ACL]Avoid incrementing crm count when ACL rule create fails
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
…et#2238)

* [ACL]Avoid incrementing crm count when ACL rule create fails
@dgsudharsan dgsudharsan deleted the crm_acl_fix branch March 9, 2023 02:01
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
…et#2238)

* [ACL]Avoid incrementing crm count when ACL rule create fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants