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

[orchagent, crm]: Reset crm threshold exceed count when threshold type changed #2073

Merged
merged 1 commit into from
Apr 23, 2022

Conversation

link19430
Copy link
Contributor

@link19430 link19430 commented Dec 9, 2021

What I did
Reset crm threshold exceed count when threshold type changed

Why I did it
The issue is that exceed msg not work when exceed count ran out by pervious threshold type.
Root cause is that doesn't reset the exceed count when changed the threshold type

How I verified it
Step1. Trigger exceed high threshold until the exceed count ran out.
Step2. Change the threshold type to a different one and trigger exceed high threshold
Step3. Check the exceed count reset to 0 and the exceed msg display ok.

Signed-off-by: link_chiang link_chiang@edge-core.com

@link19430 link19430 marked this pull request as draft December 9, 2021 03:47
@link19430 link19430 changed the title [orchagent, crm]: Reset crm threshold exceed count when threshold typ… [orchagent, crm]: Reset crm threshold exceed count when threshold type changed Dec 9, 2021
@link19430 link19430 marked this pull request as ready for review December 9, 2021 03:55
@link19430
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gord1306
Copy link
Contributor

@prsunny could you help to review this PR, thanks

@prsunny
Copy link
Collaborator

prsunny commented Mar 23, 2022

@volodymyrsamotiy , could you please review this?

@volodymyrsamotiy
Copy link
Collaborator

Changes look good to me.
Could you please also add VS test for this scenario?
(VS tests for CRM are here: https://github.com/Azure/sonic-swss/blob/master/tests/test_crm.py)

@link19430
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@link19430
Copy link
Contributor Author

link19430 commented Apr 15, 2022

@prsunny @volodymyrsamotiy
I have added the test case in vstest, please help review, thanks.
test_CrmResetThresholdExceedCount

intf_tbl.set("Ethernet0|10.0.0.0/31", fvs)
dvs.runcmd("config interface startup Ethernet0")

dvs.runcmd("crm config polling interval 1")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@link19430 , please use crm_update(dvs, "polling_interval", "1") and fix all the CLI command usage. VS tests are modified not use CLI commands. You can take a look at other tests for reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all cli commands had modified to use crm_update()

@link19430
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@link19430
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

prsunny
prsunny previously approved these changes Apr 21, 2022
…e changed

**What I did**
Reset crm threshold exceed count when threshold type changed

**Why I did it**
The issue is that exceed msg not work when exceed count ran out by pervious threshold type.
Root cause is that doesn't reset the exceed count when changed the threshold type

**How I verified it**
Step1. Trigger exceed high threshold until the exceed count ran out.
Step2. Change the threshold type to a different one and trigger exceed high threshold
Step3. Check the exceed count reset to 0 and the exceed msg display ok.

Signed-off-by: link_chiang <link_chiang@edge-core.com>
@link19430
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 2073 in repo Azure/sonic-swss

@link19430
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 5ba6a54 into sonic-net:master Apr 23, 2022
dprital pushed a commit to dprital/sonic-swss that referenced this pull request May 8, 2022
…e changed (sonic-net#2073)

Reset crm threshold exceed count when threshold type changed
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
…e changed (sonic-net#2073)

Reset crm threshold exceed count when threshold type changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants