Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

weave reset fails with "Cannot find device" on kernel 4.2+ #1364

Closed
rade opened this issue Aug 27, 2015 · 6 comments
Closed

weave reset fails with "Cannot find device" on kernel 4.2+ #1364

rade opened this issue Aug 27, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@rade
Copy link
Member

rade commented Aug 27, 2015

Extracted from #1356...

@MaximeHeckel has seen weave --local reset fail with Cannot find device "vethwepl14191@if322". This can happen when a container dies during reset, which is what #1356 is about, but it could also happen if somehow our interface name extraction is broken - that @if322 in the interface name looks weird.

@MaximeHeckel as @bboreham said, please get us the output of ip link show from the host. Also what OS and kernel is that host running? And what version of iptables (ip -V)?

@rade rade added the bug label Aug 27, 2015
@MaximeHeckel
Copy link

@rade The user might have reset his host, so not sure I can provide that to you. I'm going to check with him.

@rade rade added this to the n/a milestone Oct 3, 2015
@rade
Copy link
Member Author

rade commented Oct 3, 2015

@MaximeHeckel I am going to close this; if you ever encounter such strange interface names in the wild again, please re-open with some extra info.

@rade rade closed this as completed Oct 3, 2015
@dpw
Copy link
Contributor

dpw commented Oct 4, 2015

It looks to me that an interface name like that will occur in the ip link output for anyone using kernel 4.1 or later:

torvalds/linux@a45253b

See also:

iproute2/iproute2@ccdcbf35

(That iproute2 change appeared in v4.0.0, or a snapshot after 20150217)

@rade
Copy link
Member Author

rade commented Oct 4, 2015

iproute2/iproute2@ccdcbf35

Hmm. According to that, it was outputing @ before too. What am I missing?

In the weave script we extract the name and then call ip link del on it. Will s.t. like ip link del vethwepl14191@if322 break?

@dpw
Copy link
Contributor

dpw commented Oct 4, 2015

Hmm. According to that, it was outputing @ before too. What am I missing?

The kernel change is the crucial one, because it causes the IFLA_LINK attribute to be reported for veth netdevs. ip link could output '@' before, going back to when it migrated to git, but until that kernel change it wouldn't do so for veths.

That iproute2 commit is interesting because it introduces @ifNNN (to denote a unique name for a netdev in a different namespace). So it ties down the relevant version of iproute2 a bit.

(It also shows that there are moves to make network namespaces and associated plumbing a bit more transparent. Which is nice - it might have made debugging the dangling netns problems a bit easier. It's just a shame the improvements are not yet widely deployed..)

In the weave script we extract the name and then call ip link del on it. Will s.t. like ip link del vethwepl14191@if322 break?

Yes, it will break. The part after '@' is informational. It's not part of the netdev name in any sense, and no ip subcommands accept it. We'll need to strip it off.

@rade rade changed the title strange host-side weave interface name ("vethwepl14191@if322") weave reset fails with "Cannot find device" on kernel 4.2+ Oct 4, 2015
@rade rade modified the milestones: 1.1.1, n/a Oct 4, 2015
@rade rade self-assigned this Oct 4, 2015
@rade rade reopened this Oct 4, 2015
@rade rade closed this as completed in 37ea8a2 Oct 4, 2015
@rade
Copy link
Member Author

rade commented Oct 4, 2015

@dpw thanks for tracking down the cause.

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

No branches or pull requests

3 participants