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

changes to make PR#1561 compatible for 201811 #1562

Merged
merged 1 commit into from
Apr 13, 2020
Merged
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
37 changes: 23 additions & 14 deletions ansible/roles/test/tasks/qos_sai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@
- lldpd
- lldp-syncd

- name: Disable bgpd
- name: Ensure BGP Daemon stopped
become: yes
lineinfile: dest=/etc/quagga/daemons
regexp=^bgpd=.*$
line='bgpd=no'
notify:
- Restart Quagga Daemon
supervisorctl: state=stopped name=bgpd
vars:
ansible_shell_type: docker
ansible_python_interpreter: docker exec -i bgp python

- name: Add iptables rule to drop BGP SYN Packet from peer so that we do not ACK back
shell: "iptables -A INPUT -j DROP -p tcp --destination-port bgp"
become: true

- name: Add ip6tables rule to drop BGP SYN Packet from peer so that we do not ACK back
shell: "ip6tables -A INPUT -j DROP -p tcp --destination-port bgp"
become: true

- meta: flush_handlers

Expand Down Expand Up @@ -571,17 +575,22 @@
- lldpd
- lldp-syncd

- name: Enable bgpd
become: yes
lineinfile: dest=/etc/quagga/daemons
regexp=^bgpd=.*$
line='bgpd=yes'
notify:
- Restart Quagga Daemon
- name: Remove iptables rule to drop BGP SYN Packet from Peer
shell: "iptables -D INPUT -j DROP -p tcp --destination-port bgp"
become: true

- name: Remove ip6tables rule to drop BGP SYN Packet from Peer
shell: "ip6tables -D INPUT -j DROP -p tcp --destination-port bgp"
become: true

- name: Restore BGP daemon and docker
supervisorctl: state=started name=bgpd
vars:
ansible_shell_type: docker
ansible_python_interpreter: docker exec -i bgp python

notify:
- Restart Quagga Daemon

- name: Restore original watermark polling status
shell: counterpoll watermark {{watermark_status.stdout}}
when: watermark_status.stdout == "enable" or watermark_status.stdout == "disable"
Expand Down