Skip to content

Where does raven0 link gets its parentIndex? #138

@suyuee

Description

@suyuee

I noticed in our setup the wireguard fails to set up properly sometimes. due to

 error syncing event gw-lambdalabs: fail to ensure wireguar link: error getting default link to: 10.0.95.21, error get vxlan parent with index 0: invalid argument 

So the problems is the parent index is 0;

code pointer:

if vxLink, ok := link.(*netlink.Vxlan); ok {
link, err = netlinkutil.LinkByIndex(vxLink.ParentIndex)
if err != nil {
return nil, fmt.Errorf("error get vxlan parent: %v", err)
}
}

But it seems when creating the vxlan link, the code doesn't actually specify a parentIndex here:

LinkAttrs: netlink.LinkAttrs{
Name: vxlanLinkName,
MTU: func(a, b int) int {
if a > b {
return b
}
return a
}(vpnDriverMTU, routeDriverMTU),
Flags: net.FlagUp,
},
VxlanId: vxlanID,

When searching the netlink repo, I don't see the parentIndex field set for vxlan links (not sure if it's https://github.com/vishvananda/netlink/blob/77df5d35f725f10c8ca5f5552c95782fd639b46c/link_linux.go#L2098)

Any thoughts? Thanks in advance

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