This repository was archived by the owner on May 6, 2020. It is now read-only.
network: Update route list according to what's on the system#158
Merged
Conversation
7ca813f to
0472856
Compare
jcvenegas
reviewed
Nov 10, 2017
| // Only save the routes that we are actually adding. Don't add | ||
| // skipped routes already existing, otherwise it could cause | ||
| // issues when trying to remove them. | ||
| finalRouteList = append(finalRouteList, route) |
Contributor
There was a problem hiding this comment.
dumb questions, you are returning finalRouteList only in the case of a successful setup. But later if removeRoutes is called to remove (clean up) the added interfaces. It will try to remove all of them and not only the ones that were added.
So questions:
- It is need to return the
finalRouteListeven on fail ? - In case being need to return finalRouteList or just to have according to the comment (
Only save the routes that we are actually adding), can you movefinalRouteList = append(finalRouteList, route)after callnetHandle.RouteReplace
Author
There was a problem hiding this comment.
Good points, I am gonna make some changes.
When using the destroyPod() function, the removal of the network is performed but it generates an error. The error says that we cannot remove the route. This is caused by the fact that we should not try to remove this route since we have not added it. Indeed, when we do the network setup, we skip the existing routes. This patch removes routes already on the system from the route list held in the pod structure. That way, when destroyPod() is called, the list does not contain the routes that we have not added. Fixes #157 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
0472856 to
0214486
Compare
Author
|
@jcvenegas please take a look, I've addressed your comments ! |
Contributor
|
cri-o test failed due to pull timeout , rerunning |
Contributor
|
@sboeuf looks like goveralls is bit sensitive with the decreased code coverage |
Author
|
@jcvenegas yeah I guess we have to change this, but that's not a big deal, we can merge it anyway. Just waiting for the CI |
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.
When using the destroyPod() function, the removal of the network is
performed but it generates an error. The error says that we cannot
remove the route. This is caused by the fact that we should not try
to remove this route since we have not added it. Indeed, when we do
the network setup, we skip the existing routes.
This patch removes routes already on the system from the route list
held in the pod structure. That way, when destroyPod() is called,
the list does not contain the routes that we have not added.
Fixes #157