-
Notifications
You must be signed in to change notification settings - Fork 243
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
MACVLAN interfaces #1402
MACVLAN interfaces #1402
Conversation
I had to base this PR on top of #1395. |
I am not yet 100% sure if we should probably dissociate from the rather simple format we used for the links and come up with some more formal struct. In this PR now I had to e.g. add interface types 'macvlan/macvtap' to the dependency manager as fake nodes, to prevent it from complaining and a couple of other stunts... To me it appears ugly enough to do something about it. Opinions? @hellt ? |
We're missing docs. |
dm := &defaultDependencyManager{ | ||
nodes: map[string]*dependencyNode{}, | ||
} | ||
|
||
// init helper nodes | ||
// TODO, we need to rework this stuff | ||
for _, n := range []string{"macvlan", "macvtap"} { | ||
dm.AddNode(n) | ||
// artificially indicate that all the helper nodes have reached all the defined states | ||
for _, s := range RegularNodeStates { | ||
dm.SignalDone(n, s) | ||
} | ||
} | ||
|
||
return dm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steiler why is this needed to support macvlan, but was not needed to support host
kind?
If there is a difference, then maybe we can use host
kind for macvlan/tap as well and not touch depmgr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, there is always multiple ways towards rome.
For host
and mgmt-net
we prevented this dependency from getting inserted.
See https://github.com/srl-labs/containerlab/blob/main/clab/clab.go#L505
I'll extend that filter to also exclude the macvtap and macvlan (fake) nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either I removed this with a wrong force push, or you never added this condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yepp you trashed 3 commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cherry-picked and pushed them now
ee1fb6a
to
dec07c7
Compare
With a recent forced push I have rebased this PR on top of the current main, to include the work done in #1450 |
Codecov Report
@@ Coverage Diff @@
## main #1402 +/- ##
==========================================
- Coverage 21.77% 21.37% -0.40%
==========================================
Files 65 64 -1
Lines 6830 6858 +28
==========================================
- Hits 1487 1466 -21
- Misses 5212 5261 +49
Partials 131 131
|
This is to support macvlan and macvtap interfaces in the endpoint section of the topology definition.
This PR fixes #1393.
from @hellt: I removed macvtap support in b5dbaf4. If we need to add it later this commit can be reverted/re-added.