This repository was archived by the owner on May 12, 2021. It is now read-only.
network: While updating routes, do not delete routes with proto "kernel"#624
Merged
egernst merged 2 commits intokata-containers:masterfrom Aug 9, 2019
Merged
Conversation
grahamwhaley
approved these changes
Aug 6, 2019
Contributor
grahamwhaley
left a comment
There was a problem hiding this comment.
lgtm
(note, also fixed in the runtime I believe...)
amshinde
added a commit
to amshinde/kata-runtime
that referenced
this pull request
Aug 6, 2019
Routes with proto "kernel" are routes that are automatically added by the kernel. It is a route added automatically when you assign an address to an interface which is not /32. With this commit, these routes are ignored. The guest kernel would add these routes on the guest side. A corresponding commit on the agent side would no longer delete these routes while updating them. Without this commit, netlink gives an error complaining that a route already exists when you try to add a route with the same dest subnet. Something like: dest: 192.168.1.0/24 device:net1 source:192.168.1.217 scope:253 dest: 192.168.1.0/24 device:net2 source:192.168.1.218 scope:253 Depends-on: github.com/kata-containers/agent#624 Fixes: kata-containers#1811 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
873e887 to
fe9721a
Compare
amshinde
added a commit
to amshinde/kata-runtime
that referenced
this pull request
Aug 6, 2019
Routes with proto "kernel" are routes that are automatically added by the kernel. It is a route added automatically when you assign an address to an interface which is not /32. With this commit, these routes are ignored. The guest kernel would add these routes on the guest side. A corresponding commit on the agent side would no longer delete these routes while updating them. Without this commit, netlink gives an error complaining that a route already exists when you try to add a route with the same dest subnet. Something like: dest: 192.168.1.0/24 device:net1 source:192.168.1.217 scope:253 dest: 192.168.1.0/24 device:net2 source:192.168.1.218 scope:253 Depends-on: github.com/kata-containers/agent#624 Fixes: kata-containers#1811 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Routes with proto kernel are automatically added by the kernel when an interface is added with ip assigned as a subnet address. With github.com/kata-containers/runtime#1936, these routes will no longer be sent from the runtime. Depends-on: github.com/kata-containers/runtime#1936 Fixes: kata-containers#623 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
fe9721a to
2537235
Compare
Codecov Report
@@ Coverage Diff @@
## master #624 +/- ##
=========================================
+ Coverage 61.37% 61.47% +0.1%
=========================================
Files 17 17
Lines 2506 2523 +17
=========================================
+ Hits 1538 1551 +13
- Misses 822 824 +2
- Partials 146 148 +2 |
This is not recommended, however we should not error out in this scenario. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Member
Author
|
/test |
Member
Author
|
PR updated to allow replacing routes. |
devimc
approved these changes
Aug 9, 2019
egernst
approved these changes
Aug 9, 2019
Member
egernst
left a comment
There was a problem hiding this comment.
thanks for the unit tests, too.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Routes with proto kernel are automatically added by the kernel
when an interface is added with ip assigned as a subnet address.
With github.com/kata-containers/runtime#1936, these routes will no
longer be sent from the runtime.
Depends-on: github.com/kata-containers/runtime#1936
Fixes: #623
Signed-off-by: Archana Shinde archana.m.shinde@intel.com