Skip to content
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

netlink add ecmp route #66

Merged
merged 1 commit into from
Nov 5, 2021
Merged

netlink add ecmp route #66

merged 1 commit into from
Nov 5, 2021

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Nov 5, 2021

The default route will be added for each connected network, so when you
would try to use two networks it would fail because the default route
was already added. While we could ignore eexist error this is not what
we want.
If we only have one route and disconnect the network with the default
route we will loose internet connectivity. To best way is to have each
network create the default route. This can be done by not setting the
NLM_F_EXCL flag for the netlink request.

Also see this CNI bridge plugin PR which does the same there: containernetworking/plugins#615

The default route will be added for each connected network, so when you
would try to use two networks it would fail because the default route
was already added. While we could ignore eexist error this is not what
we want.
If we only have one route and disconnect the network with the default
route we will loose internet connectivity. To best way is to have each
network create the default route. This can be done by not setting the
NLM_F_EXCL flag for the netlink request.

Also see this CNI bridge plugin PR which does the same there: containernetworking/plugins#615

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented Nov 5, 2021

@mheon @baude @flouthoc PTAL

@openshift-ci openshift-ci bot added the approved label Nov 5, 2021
@@ -1,14 +1,21 @@
use futures::stream::TryStreamExt;
use futures::StreamExt;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using this import anywhere. I am not able to see in the diff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I it need for let mut response = match handle.clone().request(req), do not ask me why.
Also the linter fails with unused imports so we should be safe.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i see call to request returns a future Stream

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 5, 2021

LGTM. Just couple of nits.

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 5, 2021

LGTM

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 5, 2021

/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 5, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@flouthoc flouthoc merged commit f30b9cb into containers:main Nov 5, 2021
@Luap99 Luap99 deleted the route branch November 5, 2021 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants