Skip to content

Commit f40cb15

Browse files
elderingmeisterT
authored andcommitted
Tweak kernel ARP settings for keepalived to work.
This has not been necessary in the past, but was required at ICPC WFs in Egypt, see also: https://keepalived.readthedocs.io/en/latest/software_design.html#note-on-using-vrrp-with-virtual-mac-address
1 parent d5522ff commit f40cb15

File tree

1 file changed

+14
-0
lines changed
  • provision-contest/ansible/roles/keepalived/tasks

1 file changed

+14
-0
lines changed

provision-contest/ansible/roles/keepalived/tasks/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@
2222
enabled: false
2323
state: started
2424

25+
- name: Set kernel ARP parameters required by keepalived
26+
sysctl:
27+
name: "{{ item.key }}"
28+
value: "{{ item.value }}"
29+
sysctl_file: /etc/sysctl.d/30-keepalived.conf
30+
state: present
31+
loop:
32+
- { key: "net.ipv4.conf.all.arp_ignore", value: "1" }
33+
- { key: "net.ipv4.conf.all.arp_announce", value: "1" }
34+
- { key: "net.ipv4.conf.all.arp_filter", value: "0" }
35+
- { key: "net.ipv4.conf.vrrp/{{ CLUSTER_ID }}.arp_filter", value: "0" }
36+
- { key: "net.ipv4.conf.vrrp/{{ CLUSTER_ID }}.accept_local", value: "1" }
37+
- { key: "net.ipv4.conf.vrrp/{{ CLUSTER_ID }}.rp_filter", value: "0" }
38+
2539
- name: Install keepalived alert trigger code
2640
copy:
2741
src: alerting/

0 commit comments

Comments
 (0)