Skip to content

[CRM] Wait more time for CRM stats to update - 201811 branch#1053

Merged
yxieca merged 1 commit intosonic-net:201811from
wangxin:crm-wait-201811
Aug 5, 2019
Merged

[CRM] Wait more time for CRM stats to update - 201811 branch#1053
yxieca merged 1 commit intosonic-net:201811from
wangxin:crm-wait-201811

Conversation

@wangxin
Copy link
Collaborator

@wangxin wangxin commented Aug 4, 2019

Description of PR

Summary:
Fixes # (issue)

CRM testing may fail because CRM stats was not updated yet
while checking the counters. Main purpose of this change is
to increase the time waiting for CRM update from 2 seconds
to 4 seconds. Two other improvements:

  • Decrease the time waiting for CRM counters update from
    300 seconds to 30 seconds. The 300 seconds waiting is
    unnecessary.
  • Use a single redis-cli command to get used and available
    counters rather than two commands.

Because there was conflict merging PR #1027 to 201811 branch, I resolved the conflicts, tested again and created this PR to the 201811 branch.

Type of change

  • Bug fix
  • [] Testbed and Framework(new/improvement)
  • [] Test case(new/improvement)

Approach

How did you do it?

  • Increase the time waiting for CRM counters update from 2 seconds to 4 seconds.
  • Decrease the time waiting for CRM counters update from 300 seconds to 30 seconds.
  • Use a single redis-cli command to get used and available counters rather than two commands.

How did you verify/test it?

Tested on Mellanox platform.

TASK [test : debug] ************************************************************
task path: /root/code/sonic-mgmt/ansible/roles/test/tasks/test_sonic_by_testname.yml:44
Sunday 04 August 2019  03:46:17 +0000 (0:00:00.611)       0:29:06.041 ********* 
ok: [mtbc-sonic-03-2700-t0] => {
    "msg": [
        "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", 
        "!!!!!!!!!!!!!!!!!!!! end running test crm !!!!!!!!!!!!!!!!!!!!!!", 
        "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    ]
}

TASK [test : include] **********************************************************
task path: /root/code/sonic-mgmt/ansible/roles/test/tasks/main.yml:8
Sunday 04 August 2019  03:46:18 +0000 (0:00:00.158)       0:29:06.199 ********* 
skipping: [mtbc-sonic-03-2700-t0] => {"changed": false, "skip_reason": "Conditional check failed", "skipped": true}

PLAY ***************************************************************************
skipping: no hosts matched

PLAY RECAP *********************************************************************
mtbc-sonic-03-2700-t0      : ok=2390 changed=762  unreachable=0    failed=0   

Sunday 04 August 2019  03:46:18 +0000 (0:00:00.096)       0:29:06.296 ********* 
=============================================================================== 
TASK: test : Make sure CRM counters updated ---------------------------- 30.11s
TASK: test : Copy loganalyzer common match and ignore files to switch -- 15.24s
TASK: test : Copy loganalyzer common match and ignore files to switch -- 14.65s
TASK: test : Copy loganalyzer common match and ignore files to switch -- 14.29s
TASK: test : Copy loganalyzer common match and ignore files to switch -- 12.98s
TASK: test : Copy loganalyzer common match and ignore files to switch -- 11.11s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 9.79s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 9.47s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 7.96s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 7.90s
TASK: test : Get ethertype for ACL entry in order to match ACL which was configured --- 7.51s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 7.08s
TASK: test : Get ethertype for ACL entry in order to match ACL which was configured --- 6.87s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 6.36s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 6.10s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 6.08s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 5.99s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 5.59s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 5.49s
TASK: test : Copy loganalyzer common match and ignore files to switch --- 5.44s

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

CRM testing may fail because CRM stats was not updated yet
while checking the counters. Main purpose of this change is
to increase the time waiting for CRM update from 2 seconds
to 4 seconds. Two other improvements:
* Decrease the time waiting for CRM counters update from
300 seconds to 30 seconds. The 300 seconds waiting is
unnecessary.
* Use a single redis-cli command to get used and available
counters rather than two commands.

Signed-off-by: Xin Wang <[email protected]>
@yxieca yxieca merged commit 374c5d1 into sonic-net:201811 Aug 5, 2019
@wangxin wangxin deleted the crm-wait-201811 branch September 26, 2019 12:35
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Add watchdogutil to control the hw watchdog (sonic-net#945)
[db_migrator] Support migrating database regarding buffer
configuration for all Mellanox switches (sonic-net#1053)

Signed-off-by: Abhishek Dosi <[email protected]>
Pterosaur pushed a commit to Pterosaur/sonic-mgmt that referenced this pull request Mar 25, 2026
Pterosaur pushed a commit to Pterosaur/sonic-mgmt that referenced this pull request Mar 26, 2026
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.

3 participants