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

Add temp interface name for vxlan #48

Open
networkop opened this issue Nov 27, 2018 · 0 comments
Open

Add temp interface name for vxlan #48

networkop opened this issue Nov 27, 2018 · 0 comments

Comments

@networkop
Copy link

Hi Tomofumi,
it's me again. I've been using your library for quite a while now and occasionally I run into a race condition when two Vxlan links are created with the same name at the same time. Like this:

  1. First vxlan link is created using MakeVxLan call for container c1, it's interface name is eth1
  2. Before the first call gets to the SetVethLink, another vxlan links is created for container c2 but with the same name eth1.
  3. Obviously the netlink.LinkAdd(&vxlanconf) fails for the second call with vxlan add failed: Failed to add vxlan eth1: file exists

I was wondering, would it be possible to do a similar trick that you do with veth pair, namely give it a temporary name and rename it only after it's been moved to the container's namespace?

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

No branches or pull requests

1 participant