cablelabs / snaps-kubernetes

Installation tool to install Kubernetes on a Linux servers
Apache License 2.0
21 stars 7 forks source link

Flannel, Weave network conflicts with Multus CNI #141

Open sbhojpur opened 6 years ago

sbhojpur commented 6 years ago

Running Flannel, Weave daemons create their own CNI configuration files inside /etc/cni/net.d. This create conflict as Kubelet pick up only one CNI file in lexicographic order

chiraggupta06 commented 5 years ago

Changes have been done. Testing is ongoing.

chiraggupta06 commented 5 years ago

@spisarski @sbhojpur Hi,

Found some issues with the latest code of cablelabs master branch.

  1. k8s-deploy.yaml was missing.

  2. after deployment, pod is not being created. Error: Events: Type Reason Age From Message


    Normal Scheduled 14m default-scheduler Successfully assigned default/new-working-dhcp-chirag3-with-wireshark to node218 Warning FailedCreatePodSandBox 14m kubelet, node218 Failed create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "fe892c24b92bdc0995c59ecd5ad1c2347a47500e22e5bc5517c8e4e856c6b96a" network for pod "new-working-dhcp-chirag3-with-wireshark": NetworkPlugin cni failed to set up pod "new-working-dhcp-chirag3-with-wireshark_default" network: failed to find plugin "multus" in path [/opt/cni/bin], failed to clean up sandbox container "fe892c24b92bdc0995c59ecd5ad1c2347a47500e22e5bc5517c8e4e856c6b96a" network for pod "new-working-dhcp-chirag3-with-wireshark": NetworkPlugin cni failed to teardown pod "new-working-dhcp-chirag3-with-wireshark_default" network: failed to find plugin "multus" in path [/opt/cni/bin]] Normal SandboxChanged 4m (x47 over 14m) kubelet, node218 Pod sandbox changed, it will be killed and re-created.

RCA: /opt/cni/bin directory doesn't have the multus binary and code which copy the multus binary from the source package to destination is now replaced with below mentioned code

and this cni-plugins-amd64-v0.6.0.tgz doesn't have the multus binary.

  1. multus-cni.conf file format is incorrect. (issue was fixed earlier as well after rephrasing the code). Pull request #144 after replacing dynamic parameters with static , multus-cni.conf file is not having the correct value.

before fixes: root@multus-issue-3:/etc/cni/net.d# cat multus-cni.conf {'kubeconfig': '/etc/kubernetes/node-kubeconfig.yaml', 'type': 'multus', 'delegates': [{'masterplugin': True, 'type': 'weave-net', 'hairpinMode': True}], 'name': 'minion-cni-network'}

After fix: root@multus-issue-3:/etc/cni/net.d# cat multus-cni.conf { "name": "minion-cni-network", "type": "multus", "kubeconfig": "/etc/kubernetes/node-kubeconfig.yaml", "delegates": [{ "type": "weave-net", "hairpinMode": true, "masterplugin": true }] }

Regards, Chirag Gupta

chiraggupta06 commented 5 years ago

Ceated a pull request (#200 ) for the below-mentioned issues present in the master branch of snaps-kubernetes.

  1. Multus binary was missing.
  2. K8s-deploy.yaml file missing
  3. Multus-cni.conf file format incorrect.
  4. Cluster role play was missing.

Regards, Chirag Gupta