net: Document use of ip route append to add routes#2130
Merged
Conversation
Support for rfc3442 routes was added to cloud-init in 07b172. In this commit, `ip route append` was used to add the route. This succeeds at adding static routes, but its documented purpose is related to multipath routing. To avoid confusion around the undocumented behavior being used, switch to `ip route add`, which does the same thing. This will also simplify an abstraction to support distros that do not use iproute2.
Contributor
|
This was intentionally changed in #1124, though the code has moved files. I can't say I 100% understand the use case, but I think changing this could break some (or at least one) use cases. |
Member
Author
Great context, thanks for pointing out the requirement for this behavior @TheRealFalcon. I just reverted the previous commit and updated this PR to include context alongside the code, since that is currently not obvious. |
ip route add to add static routesip route append to add routes
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 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.
Update
I am changing this PR to document the reason that the current code is needed for better context.