-
Notifications
You must be signed in to change notification settings - Fork 260
fix: enable ip forward on transparent vlan network create #2335
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 8989ded.
4 tasks
| case opModeTransparentVlan: | ||
| logger.Info("Transparent vlan mode") | ||
| ifName = extIf.Name | ||
| nu := networkutils.NewNetworkUtils(nm.netlink, nm.plClient) |
Member
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.
can we add UT for this code? if it returns error, cni should bubble up the err correctly
dcfe1f9 to
18777da
Compare
18777da to
c147e1b
Compare
vipul-21
reviewed
Nov 2, 2023
|
|
||
| func (nu NetworkUtils) EnableIPV4Forwarding() error { | ||
| _, err := nu.plClient.ExecuteCommand(enableIPV4ForwardCmd) | ||
| return errors.Wrap(err, "enable ipv4 forwarding failed") |
Contributor
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.
Should log error as well similar to ipv6 ?
vipul-21
approved these changes
Nov 2, 2023
tamilmani1989
approved these changes
Nov 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for Change:
IP forwarding may not be enabled on the vm when transparent vlan endpoint client first starts (for the first time on this new vm). When namespaces are created, they would have ip forwarding disabled, leading to connectivity issues. This change runs a command to enable forwarding in each namespace on creation, as well as on the vm when the network is first created. Enabling IP forwarding on the namespace may be redundant but is useful for testing (can be removed if necessary). Does not use the existing enable ip forwarding function because that function seems to add additional iptable rules.
Adds transparent vlan multitenancy conflist to dropgz for testing.
Issue Fixed:
See above.
Requirements:
Notes: