Skip to content

Add temp interface name for vxlan #48

@networkop

Description

@networkop

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions