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

Address issue where genie throws error while assigning multiple veths to a pod #108

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

satyaranjanp
Copy link
Collaborator

No description provided.

@satyaranjanp
Copy link
Collaborator Author

This PR addresses issue https://github.com/Huawei-PaaS/CNI-Genie/issues/107

@satyaranjanp satyaranjanp changed the title Handle issue where genie throws error while assigning multiple veths to a pod Address issue where genie throws error while assigning multiple veths to a pod Jun 8, 2018
@sushanthakumar
Copy link
Collaborator

@satyaranjanp , also mention the reason for this failure due to go version change

@satyaranjanp
Copy link
Collaborator Author

satyaranjanp commented Jun 8, 2018

For Go versions older than 1.9, the method Start(), in os/exec/exec.go and is invoked while executing a command, fetches the env and uses it without removing any duplicate entry for a env variable. So when genie tries to set the veth for the second plugin, the env still has the entry for CNI_IFNAME as eth0 that was set for the first plugin. So while the second plugin tries to fetch the veth from env, it gets the older value which was set for the first plugin.

As there can not be two veth in a single container, the plugin fails to assign a veth and an ip.

To address this issue, genie will unset CNI_IFNAME env variable each time it calls a plugin to assigne a ip to pod.

snap

@sushanthakumar
Copy link
Collaborator

LGTM

@sushanthakumar sushanthakumar merged commit ef56381 into cni-genie:master Jun 8, 2018
satyaranjanp pushed a commit to satyaranjanp/CNI-Genie that referenced this pull request Oct 3, 2018
Address issue where genie throws error while assigning multiple veths to a pod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants