-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case 2 of PFC watchdog against warm-reboot: sad path (#834)
* First test case of PFC watchdog against warm-reboot Signed-off-by: Wenda Ni <[email protected]> * Add more comments for code readability Signed-off-by: Wenda Ni <[email protected]> * First test case of PFC watchdog against warm-reboot Signed-off-by: Wenda Ni <[email protected]> * Add more comments for code readability Signed-off-by: Wenda Ni <[email protected]> * Modify output message Signed-off-by: Wenda Ni <[email protected]> * Allow log analyzer to take a specified start marker Signed-off-by: Wenda Ni <[email protected]> * Use lookup('pipe', 'date +%H:%M:%S') in place of ansible_date_time.time, which uses cached time for a certain period of time ansible/ansible#22561 Signed-off-by: Wenda Ni <[email protected]> * Add the flexiblity to not start storm at fanout link partener in running functional_test_storm.yml Signed-off-by: Wenda Ni <[email protected]> * Dump only the current result and summary files for debugging and troubleshooting purpose Signed-off-by: Wenda Ni <[email protected]> * Add the capability to check if the number of exact matches is equal to to the target number Signed-off-by: Wenda Ni <[email protected]> * Split the actual storm and restore tests into functional_test_storm_perq.yml and functional_test_restore_perq.yml, respectively Add the capability to storm multiple queues of a port Signed-off-by: Wenda Ni <[email protected]> * Add test case 2 of PFC watchdog against warm-reboot: PFC storm started and detected before warm-reboot On-going storm on warm-reboot emission, and lasts past the warm-reboot finish PFC storm stopped and restored after warm-reboot Signed-off-by: Wenda Ni <[email protected]> * Ignore trival syncd ERR during the warm-reboot, e.g., Mar 20 00:40:33.599212 str-a7050-acs-1 ERR syncd#syncd: _brcm_sai_cosq_stat_get:1146 cosq stat get failed with error Invalid parameter (0xfffffffc). Mar 20 00:40:33.599212 str-a7050-acs-1 DEBUG syncd#syncd: brcm_sai_get_queue_stats:724 cosq stat get failed with error -5 for port 1 qid 10 Mar 20 00:40:33.599212 str-a7050-acs-1 NOTICE syncd#syncd: :- setQueueCounterList: Queue oid:0x102150000000b does not has supported counters Signed-off-by: Wenda Ni <[email protected]> * Use boolean variable to determine the test run type: regular pfc wd test or pfcwd warm-reboot test Signed-off-by: Wenda Ni <[email protected]> * Feed reboot type to reboot_sonic.yml in warm-reboot happy path test Signed-off-by: Wenda Ni <[email protected]> * Feed reboot type to reboot_sonic.yml in warm-reboot sad path test Signed-off-by: Wenda Ni <[email protected]> * Add expected errors on mlnx platform Signed-off-by: Wenda Ni <[email protected]>
- Loading branch information
Showing
6 changed files
with
235 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
ansible/roles/test/tasks/pfc_wd/functional_test/functional_test_restore_perq.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#------------------------------------ | ||
# Test the PFC restore action | ||
# 1. Verify restore is detected via syslog entry analysis on the dut | ||
# 2. Verity the forward action on both ingress and egress via ptf dataplane traffic test | ||
#------------------------------------ | ||
|
||
- block: | ||
# 1. Verify restore is detected via syslog entry analysis on the dut | ||
- set_fact: | ||
test_expect_file: "expect_pfc_wd_restore" | ||
|
||
- name: Initialize loganalyzer | ||
include: roles/test/files/tools/loganalyzer/loganalyzer_init.yml | ||
vars: | ||
testname_unique_gen: true | ||
|
||
- name: Stop PFC storm on fanout switch | ||
action: apswitch template="{{pfc_wd_storm_stop_template}}" | ||
args: | ||
host: "{{peer_mgmt}}" | ||
login: "{{peer_login}}" | ||
connection: switch | ||
|
||
- name: Allow enough time for the PFC storm restoration to flow into the syslog | ||
pause: | ||
seconds: 1 | ||
|
||
- name: Check if logs contain message that PFC WD restored from deadlock | ||
include: roles/test/files/tools/loganalyzer/loganalyzer_analyze.yml | ||
|
||
- name: Check if logs contain message that PFC WD restored from deadlock | ||
include: roles/test/files/tools/loganalyzer/loganalyzer_end.yml | ||
|
||
# 2. Verity the forward action on both ingress and egress via ptf dataplane traffic test | ||
- name: "Send packets via {{pfc_wd_test_port}}" | ||
include: roles/test/tasks/ptf_runner.yml | ||
vars: | ||
ptf_test_name: PFC WD test | ||
ptf_test_dir: ptftests | ||
ptf_test_path: pfc_wd.PfcWdTest | ||
ptf_platform: remote | ||
ptf_platform_dir: ptftests | ||
ptf_test_params: | ||
- testbed_type='{{testbed_type}}' | ||
- router_mac='{{ansible_ethernet0_mac_addr}}' | ||
- queue_index='{{pfc_queue_index}}' | ||
- pkt_count='{{pfc_wd_test_pkt_count}}' | ||
- port_src='{{pfc_wd_rx_port_id[0]}}' | ||
- port_dst='{{pfc_wd_test_port_ids}}' | ||
- ip_dst='{{pfc_wd_test_neighbor_addr}}' | ||
- port_type='{{port_type}}' | ||
- wd_action='forward' | ||
ptf_extra_options: "--relax --debug info --log-file /tmp/pfc_wd.PfcWdTest.{{lookup('pipe','date +%Y-%m-%d-%H:%M:%S')}}.log " | ||
|
||
- name: "Send packets to {{pfc_wd_test_port}}" | ||
include: roles/test/tasks/ptf_runner.yml | ||
vars: | ||
ptf_test_name: PFC WD test | ||
ptf_test_dir: ptftests | ||
ptf_test_path: pfc_wd.PfcWdTest | ||
ptf_platform: remote | ||
ptf_platform_dir: ptftests | ||
ptf_test_params: | ||
- testbed_type='{{testbed_type}}' | ||
- router_mac='{{ansible_ethernet0_mac_addr}}' | ||
- queue_index='{{pfc_queue_index}}' | ||
- pkt_count='{{pfc_wd_test_pkt_count}}' | ||
- port_src='{{pfc_wd_test_port_id}}' | ||
- port_dst='[{{pfc_wd_rx_port_id | join(' ')}}]' | ||
- ip_dst='{{pfc_wd_rx_neighbor_addr}}' | ||
- port_type='{{port_type}}' | ||
- wd_action='forward' | ||
ptf_extra_options: "--relax --debug info --log-file /tmp/pfc_wd.PfcWdTest.{{lookup('pipe','date +%Y-%m-%d-%H:%M:%S')}}.log " | ||
|
||
rescue: | ||
- name: Stop PFC storm on fanout switch | ||
action: apswitch template="{{pfc_wd_storm_stop_template}}" | ||
args: | ||
host: "{{peer_mgmt}}" | ||
login: "{{peer_login}}" | ||
connection: switch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.