Skip to content
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

[crmorch] Prevent exceededLogCounter from resetting when low and high values are equal #2327

Merged
merged 2 commits into from
Jun 14, 2022

Conversation

alexrallen
Copy link
Contributor

What I did

Made the if / else if condition in the CRM logic mutually exclusive so that you cannot enter a state where the resource utilization does not change but the counter is constantly reset and the log is spammed with CRM messages.

Why I did it

If a user sets the "low" value and the "high" value equal to each other (a condition which is possible to be manually configured using the CLI or CONFIG_DB) the log will immediately get spammed with CRM messages because the counter will almost instantly reset even if the utilization does not change because the condition in the if statement and the condition in the else if statement can be true simultaneously.

How I verified it

Manually tested by manually configuring a CRM resource high and low threshold to be equal and verifying that the number of error logs seen does not exceed the max value.

Verified

This commit was signed with the committer’s verified signature.
Kikobeats Kiko Beats
… values are equal
@alexrallen alexrallen requested a review from prsunny as a code owner June 13, 2022 16:44
@liat-grozovik
Copy link
Collaborator

@prsunny could you please help to review? @volodymyrsamotiy FYI

@liat-grozovik
Copy link
Collaborator

@alexrallen which branches we need this fix to get in?

@alexrallen
Copy link
Contributor Author

Lets have this in 202111 / 202205 that should be all.

@prsunny prsunny merged commit 3c3bb17 into sonic-net:master Jun 14, 2022
judyjoseph pushed a commit that referenced this pull request Jun 20, 2022
… values are equal (#2327)

* [crmorch] Prevent exceededLogCounter from resetting when low and high values are equal
yxieca pushed a commit that referenced this pull request Jun 20, 2022
… values are equal (#2327)

* [crmorch] Prevent exceededLogCounter from resetting when low and high values are equal
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
… values are equal (sonic-net#2327)

* [crmorch] Prevent exceededLogCounter from resetting when low and high values are equal
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.

None yet

6 participants