-
Notifications
You must be signed in to change notification settings - Fork 37
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
fix: tap interface attach to bridge #479
Conversation
core/models/network.go
Outdated
@@ -23,7 +23,9 @@ type NetworkInterface struct { | |||
Type IfaceType `json:"type" validate:"oneof=tap macvtap unsupported"` | |||
// StaticAddress is an optional static IP address to assign to this interface. | |||
// If not supplied then DHCP will be used. | |||
StaticAddress *StaticAddress `json:"staticAddress,omitempty"` | |||
StaticAddress *StaticAddress `json:"staticAddrss,omitempty"` | |||
// BranchName is the name of the Linux bridge to attach the TAP device to. |
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.
// BranchName is the name of the Linux bridge to attach the TAP device to. | |
// BridgeName is the name of the Linux bridge to attach the TAP device to. |
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.
guessing that will need a regenerate
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.
Bugger, i had a real mental block between bridge name and branch name. Changing....
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.
Changed.
internal/config/validation.go
Outdated
@@ -5,6 +5,11 @@ import ( | |||
"os" | |||
) | |||
|
|||
// Validate will validate the Config. | |||
func (c *Config) Validate() error { |
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.
is this for anything?
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.
Removed, i did start to go down a rabbit hole with validation and then came to my senses. This got accidentally left behind.
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.
we can probs have a ticket for that
When requesting that a tap device is added to a microvm then we should attach (i.e. set the master) to a bridge. The bridge will be supplied via a new bridge-name flag. And the attach should not be done for the mmds network interface. The grpc api has been updated to allow the consumer to specify a bridge-name that is different as part of the create microvm call. Signed-off-by: Richard Case <[email protected]>
When requestinf that a tap device is added to a microvm then we should
attach (i.e. set the master) to a bridge.
What this PR does / why we need it:
The bridge will be supplied via the parent-iface flag. And the attach should not be done for the mmds network interface.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #478
Special notes for your reviewer:
Checklist: