Skip to content
Snippets Groups Projects
Commit 1c25ed66 authored by Matthew Mosesohn's avatar Matthew Mosesohn Committed by Kubernetes Prow Robot
Browse files

Remove unnecessary and risky reload network for resolvconf propagation (#5322)

Change-Id: I54d706f7941b4b86c4c6cd45340295577155b884
parent a005d19f
No related branches found
No related tags found
No related merge requests found
--- ---
- name: Preinstall | restart network - name: Preinstall | propagate resolvconf to k8s components
command: /bin/true command: /bin/true
notify: notify:
- Preinstall | reload network
- Preinstall | reload kubelet - Preinstall | reload kubelet
- Preinstall | kube-controller configured - Preinstall | kube-controller configured
- Preinstall | kube-apiserver configured - Preinstall | kube-apiserver configured
...@@ -12,20 +11,6 @@ ...@@ -12,20 +11,6 @@
- Preinstall | restart kube-apiserver crio/containerd - Preinstall | restart kube-apiserver crio/containerd
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
# FIXME(bogdando) https://github.com/projectcalico/felix/issues/1185
- name: Preinstall | reload network
service:
name: >-
{% if ansible_os_family == "RedHat" -%}
network
{%- elif ansible_distribution == "Ubuntu" and ansible_distribution_release == "bionic" -%}
systemd-networkd
{%- elif ansible_os_family == "Debian" -%}
networking
{%- endif %}
state: restarted
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] and kube_network_plugin not in ['canal', 'calico']
- name: Preinstall | update resolvconf for Container Linux by CoreOS - name: Preinstall | update resolvconf for Container Linux by CoreOS
command: /bin/true command: /bin/true
notify: notify:
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
create: yes create: yes
backup: yes backup: yes
marker: "# Ansible entries {mark}" marker: "# Ansible entries {mark}"
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
- name: Remove search/domain/nameserver options before block - name: Remove search/domain/nameserver options before block
replace: replace:
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
with_nested: with_nested:
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}" - "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
- [ 'search ', 'nameserver ', 'domain ', 'options ' ] - [ 'search ', 'nameserver ', 'domain ', 'options ' ]
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
- name: Remove search/domain/nameserver options after block - name: Remove search/domain/nameserver options after block
replace: replace:
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
with_nested: with_nested:
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}" - "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
- [ 'search ', 'nameserver ', 'domain ', 'options ' ] - [ 'search ', 'nameserver ', 'domain ', 'options ' ]
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
- name: get temporary resolveconf cloud init file content - name: get temporary resolveconf cloud init file content
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
insertbefore: BOF insertbefore: BOF
backup: yes backup: yes
marker: "# Ansible entries {mark}" marker: "# Ansible entries {mark}"
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
when: dhclientconffile is defined when: dhclientconffile is defined
- name: Configure dhclient hooks for resolv.conf (non-RH) - name: Configure dhclient hooks for resolv.conf (non-RH)
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
dest: "{{ dhclienthookfile }}" dest: "{{ dhclienthookfile }}"
owner: root owner: root
mode: 0755 mode: 0755
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
when: ansible_os_family != "RedHat" when: ansible_os_family != "RedHat"
- name: Configure dhclient hooks for resolv.conf (RH-only) - name: Configure dhclient hooks for resolv.conf (RH-only)
...@@ -29,5 +29,5 @@ ...@@ -29,5 +29,5 @@
dest: "{{ dhclienthookfile }}" dest: "{{ dhclienthookfile }}"
owner: root owner: root
mode: 0755 mode: 0755
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
backup: yes backup: yes
marker: "# Ansible entries {mark}" marker: "# Ansible entries {mark}"
when: dhclientconffile is defined when: dhclientconffile is defined
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
- name: Remove kubespray specific dhclient hook - name: Remove kubespray specific dhclient hook
file: file:
path: "{{ dhclienthookfile }}" path: "{{ dhclienthookfile }}"
state: absent state: absent
when: dhclienthookfile is defined when: dhclienthookfile is defined
notify: Preinstall | restart network notify: Preinstall | propagate resolvconf to k8s components
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment