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

[pfcwd]: support t0-116 and clean up the code #563

Merged
merged 2 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
delegate_to: "{{ptf_host}}"
when: port_type == "vlan"

#- name: "Update ARP entry on DUT"
#shell: ping {{minigraph_vlan_interfaces[0]['addr']}} -c 5 -I eth{{pfc_wd_test_port_id}}
#delegate_to: "{{ptf_host}}"
#when: port_type == "vlan"
- name: "Update ARP entry on DUT"
shell: ping {{minigraph_vlan_interfaces[0]['addr']}} -c 10
delegate_to: "{{ptf_host}}"
when: port_type == "vlan"

- name: "Update ARP entry on DUT"
shell: docker exec -i swss arping {{pfc_wd_test_neighbor_addr}} -c 5
Expand Down Expand Up @@ -108,7 +108,7 @@

- name: Let PFC storm happen for a while
pause:
seconds: 1
seconds: 5

- name: "Buffer up the queue in {{pfc_wd_test_port}}"
include: roles/test/tasks/ptf_runner.yml
Expand Down Expand Up @@ -343,6 +343,10 @@
login: "{{peer_login}}"
connection: switch

- name: Let PFC storm happen for a while
pause:
seconds: 5

- name: Check if logs contain message that PFC WD detected deadlock
include: roles/test/files/tools/loganalyzer/loganalyzer_analyze.yml

Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/test/tasks/pfc_wd/iterate_portchannels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@

- set_fact:
p: "{{pfc_wd_test_port[1]}}"
when: rx_pc_port is defined and test_pc_port is defined and testbed_type in ['t0-64', 't0-112', 't1-lag']
when: rx_pc_port is defined and test_pc_port is defined and testbed_type in ['t0-64', 't0-116', 't1-lag']

- set_fact:
test_ports: "{{ test_ports | combine( {p:{'test_neighbor_addr':pfc_wd_test_neighbor_addr, 'rx_port':pfc_wd_rx_port, 'rx_neighbor_addr': pfc_wd_rx_neighbor_addr, 'peer_device':neighbors[p]['peerdevice'], 'test_port_id': minigraph_port_indices[p], 'rx_port_id': pfc_wd_rx_port_id.split(' ') | list, 'test_portchannel_members': pfc_wd_test_port_id.split(' ') | list, 'test_port_type':'portchannel' }}) }}"
when: rx_pc_port is defined and test_pc_port is defined and testbed_type in ['t0-64', 't0-112', 't1-lag']
when: rx_pc_port is defined and test_pc_port is defined and testbed_type in ['t0-64', 't0-116', 't1-lag']

- set_fact:
p: "{{pfc_wd_rx_port[0]}}"
Expand All @@ -62,11 +62,11 @@

- set_fact:
p: "{{pfc_wd_rx_port[1]}}"
when: first_pair and testbed_type in ['t0-64', 't0-112']
when: first_pair and testbed_type in ['t0-64', 't0-116']

- set_fact:
test_ports: "{{ test_ports | combine( {p:{'test_neighbor_addr':pfc_wd_rx_neighbor_addr, 'rx_port':pfc_wd_test_port, 'rx_neighbor_addr': pfc_wd_test_neighbor_addr, 'peer_device':neighbors[p]['peerdevice'], 'test_port_id': minigraph_port_indices[p], 'rx_port_id': pfc_wd_test_port_id.split(' ') | list , 'test_portchannel_members': pfc_wd_rx_port_id.split(' ') | list, 'test_port_type':'portchannel' }}) }}"
when: first_pair and testbed_type in ['t0-64', 't0-112']
when: first_pair and testbed_type in ['t0-64', 't0-116']

- set_fact:
used: false
Expand Down
7 changes: 0 additions & 7 deletions ansible/roles/test/tasks/pfc_wd/iterate_vlans.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
- debug: msg="vlan running"
- debug: msg="{{pfc_wd_rx_port}}"

#- name: flush the ip on ptf


#- name: assgin ip to ptf neightbor
- set_fact:
test_ports: "{{ test_ports | combine( {item:{'test_neighbor_addr':generated_ips[0].split('/')[0], 'rx_port': pfc_wd_rx_port, 'rx_neighbor_addr': pfc_wd_rx_neighbor_addr, 'peer_device':neighbors[item]['peerdevice'], 'test_port_id': minigraph_port_indices[item], 'rx_port_id': pfc_wd_rx_port_id.split(' ') | list, 'test_port_type':'vlan' }}) }}"
2 changes: 1 addition & 1 deletion ansible/roles/test/templates/pfc_storm_arista.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bash
cd /mnt/flash
sudo python {{pfc_gen_file}} -p {{(1).__lshift__(pfc_queue_index)}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("Ethernet", "et")}} -r {{ansible_eth0_ipv4_addr}} &
sudo python {{pfc_gen_file}} -p {{(1).__lshift__(pfc_queue_index)}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("Ethernet", "et") | replace("/", "_")}} -r {{ansible_eth0_ipv4_addr}} &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you elaborate the reason of changing et/NN to et_NN?

Copy link
Contributor Author

@sihuihan88 sihuihan88 Apr 5, 2018

Choose a reason for hiding this comment

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

In bash, interfaces are named use "_" eg et3_1 instead of eth3/1.

exit
exit