Skip to content
Snippets Groups Projects
Unverified Commit 00e0f3bd authored by Etienne Champetier's avatar Etienne Champetier Committed by GitHub
Browse files

Fix nf_conntrack_ipv4 modprobe (#6988)


RedHat 8.3 merged nf_conntrack_ipv4 in nf_conntrack but still advertise 4.18
so just try to modprobe and decide depending on the success
Also nf_conntrack is a dependency of ip_vs, so no need to care about it

Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
parent cd721245
No related branches found
No related tags found
No related merge requests found
...@@ -103,23 +103,13 @@ ...@@ -103,23 +103,13 @@
tags: tags:
- kube-proxy - kube-proxy
- name: Modprobe nf_conntrack_ipv4 for kernels < 4.19 - name: Modprobe nf_conntrack_ipv4
modprobe: modprobe:
name: nf_conntrack_ipv4 name: nf_conntrack_ipv4
state: present state: present
register: enable_nf_conntrack register: modprobe_nf_conntrack_ipv4
ignore_errors: yes
when: when:
- ansible_kernel.split('.')[0:3] | join('.') < '4.19'
- kube_proxy_mode == 'ipvs'
tags:
- kube-proxy
- name: Modprobe nf_conntrack for kernels >= 4.19
modprobe:
name: nf_conntrack
state: present
when:
- ansible_kernel.split('.')[0:3] | join('.') >= '4.19'
- kube_proxy_mode == 'ipvs' - kube_proxy_mode == 'ipvs'
tags: tags:
- kube-proxy - kube-proxy
...@@ -132,9 +122,7 @@ ...@@ -132,9 +122,7 @@
ip_vs_rr ip_vs_rr
ip_vs_wrr ip_vs_wrr
ip_vs_sh ip_vs_sh
{% if enable_nf_conntrack is failed -%} {% if modprobe_nf_conntrack_ipv4 is success -%}
nf_conntrack
{%- else -%}
nf_conntrack_ipv4 nf_conntrack_ipv4
{%- endif -%} {%- endif -%}
when: kube_proxy_mode == 'ipvs' when: kube_proxy_mode == 'ipvs'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment