diff --git a/CHANGELOG-0.7.md b/CHANGELOG-0.7.md index 148cb2b931..cde8a7486f 100644 --- a/CHANGELOG-0.7.md +++ b/CHANGELOG-0.7.md @@ -26,6 +26,7 @@ - [#1495](https://github.com/epiphany-platform/epiphany/issues/1495) - Offline installation is broken for CentOS 7.8 environments - [#1347](https://github.com/epiphany-platform/epiphany/issues/1347) - Kibana config always points its elasticsearch.hosts to a "logging" VM - [#1336](https://github.com/epiphany-platform/epiphany/issues/1336) - Deployment of version 0.7.0 failed on-prem (spec.hostname) +- [#1394](https://github.com/epiphany-platform/epiphany/issues/1394) - Cannot access Kubernetes dashboard after upgrading ### Added diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/files/calico-network-manager.conf b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/files/calico-network-manager.conf deleted file mode 100644 index 3a53e5fbbe..0000000000 --- a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/files/calico-network-manager.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Ansible managed -[keyfile] -unmanaged-devices=interface-name:cali*;interface-name:tunl* diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/calico.yml b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/calico.yml index 513691a27c..cd1c1f3052 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/calico.yml +++ b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/calico.yml @@ -8,14 +8,17 @@ get_attributes: no register: network_manager_conf_d_stat + # https://docs.projectcalico.org/maintenance/troubleshoot/troubleshooting#configure-networkmanager - name: Copy calico.conf to /etc/NetworkManager/conf.d - copy: - src: calico-network-manager.conf + template: + src: network-manager.conf.j2 dest: /etc/NetworkManager/conf.d/calico.conf owner: root group: root mode: u=rw,g=r,o=r register: copy_calico_network_manager_conf + vars: + network_interface_prefix: cali when: - network_manager_conf_d_stat.stat.exists diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/canal.yml b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/canal.yml index 6d02ebdf98..c3c1591335 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/canal.yml +++ b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/canal.yml @@ -1,4 +1,40 @@ --- +- name: Configure NetworkManager before attempting to use Canal networking + block: + # /etc/NetworkManager/conf.d directory is created by NetworkManager(rpm)/network-manager(deb) package + - name: Check if /etc/NetworkManager/conf.d exists + stat: + path: /etc/NetworkManager/conf.d + get_attributes: no + register: network_manager_conf_d_stat + + # Remove flannel.1 interface from NetworkManager managed devices to get rid of + # random network issue with missing flannel.1 IP address + - name: Copy flannel.conf to /etc/NetworkManager/conf.d + template: + src: network-manager.conf.j2 + dest: /etc/NetworkManager/conf.d/flannel.conf + owner: root + group: root + mode: u=rw,g=r,o=r + register: copy_flannel_network_manager_conf + vars: + network_interface_prefix: flannel + when: + - network_manager_conf_d_stat.stat.exists + +- name: Reload NetworkManager service + when: copy_flannel_network_manager_conf.changed + block: + - name: Populate service facts + service_facts: + + - name: Reload if NetworkManager service is running + systemd: + name: NetworkManager + state: reloaded + when: ansible_facts.services["NetworkManager.service"].state == "running" + - name: Include Canal deployment tasks include_tasks: deployments/deploy-template.yml vars: diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/flannel.yml b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/flannel.yml index 0b0b713996..1f7002aa37 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/flannel.yml +++ b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/tasks/cni-plugins/flannel.yml @@ -1,5 +1,41 @@ --- -- name: Include flannel deployment tasks +- name: Configure NetworkManager before attempting to use Flannel networking + block: + # /etc/NetworkManager/conf.d directory is created by NetworkManager(rpm)/network-manager(deb) package + - name: Check if /etc/NetworkManager/conf.d exists + stat: + path: /etc/NetworkManager/conf.d + get_attributes: no + register: network_manager_conf_d_stat + + # Remove flannel.1 interface from NetworkManager managed devices to get rid of + # random network issue with missing flannel.1 IP address + - name: Copy flannel.conf to /etc/NetworkManager/conf.d + template: + src: network-manager.conf.j2 + dest: /etc/NetworkManager/conf.d/flannel.conf + owner: root + group: root + mode: u=rw,g=r,o=r + register: copy_flannel_network_manager_conf + vars: + network_interface_prefix: flannel + when: + - network_manager_conf_d_stat.stat.exists + +- name: Reload NetworkManager service + when: copy_flannel_network_manager_conf.changed + block: + - name: Populate service facts + service_facts: + + - name: Reload if NetworkManager service is running + systemd: + name: NetworkManager + state: reloaded + when: ansible_facts.services["NetworkManager.service"].state == "running" + +- name: Include Flannel deployment tasks include_tasks: deployments/deploy-template.yml vars: file_name: kube-flannel.yml.j2 diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/templates/network-manager.conf.j2 b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/templates/network-manager.conf.j2 new file mode 100644 index 0000000000..7a74a9e5af --- /dev/null +++ b/core/src/epicli/data/common/ansible/playbooks/roles/kubernetes_master/templates/network-manager.conf.j2 @@ -0,0 +1,3 @@ +# Ansible managed +[keyfile] +unmanaged-devices=interface-name:{{ network_interface_prefix }}*;interface-name:tunl*