Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amazon-vpc-cni-k8s cni errors out due to setupNS network failing as 'file exists' when default route is already established. #203

Closed
Deepthidharwar opened this issue Oct 17, 2018 · 1 comment

Comments

@Deepthidharwar
Copy link

Setup: Kubernetes on AWS EC2-instance running. 1 master and 2 nodes.

CNI plugin used : Multus with amazon-vpc-cni-k8s configured to be used for secondary interface on the pod.
Version: latest Multus code + latest amazon-vpc-cni-k8s code.

When Multus plugin is used, the pod comes up with multiple interfaces. Ideally when we want to run pods in k8's hosted in AWS, we would want to use amazon-vpc-cni-k8s cni to provide a secondary interface to the pod.

Using amazon-vpc-cni-k8s plugin as secondary cni plugin, plugin errors out with the below message:

2018-10-11T11:46:42Z [INFO] Starting CNI Plugin v1.2.0-6-g645535ed-dirty  ...
2018-10-11T11:46:42Z [INFO] Received CNI add request: ContainerID(c3204c7ddb2a1a094e5275018d42c745539f026649fbb55b1296ce6a2111986f) Netns(/proc/130265/ns/net) IfName(net1) Args(IgnoreUnknown=1;K8S_POD_NAMESPACE=default;K8S_POD_NAME=samplepod4;K8S_POD_INFRA_CONTAINER_ID=c3204c7ddb2a1a094e5275018d42c745539f026649fbb55b1296ce6a2111986f) Path(/opt/cni/bin) argsStdinData({"cniVersion":"0.3.0","name":"aws-cni","type":"aws-cni","vethPrefix":"eni"})
2018-10-11T11:46:42Z [INFO] Received add network response for pod samplepod4 namespace default container c3204c7ddb2a1a094e5275018d42c745539f026649fbb55b1296ce6a2111986f: 172.31.19.103, table 0
2018-10-11T11:46:42Z [ERROR] Failed to setup NS network setup NS network: failed to add default route: file exists
2018-10-11T11:46:42Z [ERROR] Failed SetupPodNetwork for pod samplepod4 namespace default container c3204c7ddb2a1a094e5275018d42c745539f026649fbb55b1296ce6a2111986f: setup NS network: failed to setup NS network: setup NS network: failed to add default route: file exists

This is because amazon-vpc-cni-k8s is trying to setup default route but it's already been set beforehand by the primary Multus plugin. So the plugin errors out.
CNI's are supposed to be resilient if the route already exists but in case of amazon-vpc-cni-k8s it fails.
Request to allow amazon-vpc-cni-k8s plugin to work even if the default route is already set.
There are no errors in L-IPAMD logs.

@Deepthidharwar Deepthidharwar changed the title amazon-vpc-cni-k8s cni erros out due to setupNS network failing as 'file exists' when default route is already established. amazon-vpc-cni-k8s cni errors out due to setupNS network failing as 'file exists' when default route is already established. Oct 17, 2018
@mogren
Copy link
Contributor

mogren commented Aug 21, 2019

Fixed by #367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants