-
Notifications
You must be signed in to change notification settings - Fork 659
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
Clarify policy-forwarding and routing-policy if no rules are present #1223
base: master
Are you sure you want to change the base?
Conversation
Related to discussion on #1150 |
No major YANG version changes in commit 441428e |
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.
LGTM - updated clarification reads well.
We discussed this a second time in the OC Operators meeting on Nov 26, 2024. For routing-policy, vendor native implementations widely support policies which have no 'conditions' matching all packets. Example native routing policy configuration: https://gist.github.com/dplore/cff9a4c782f68734adaafff8952fc3cb (Kudos to @oscargdd for sharing this investigation) So I am updating this description to assert that no rules means match all packets. |
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.
LGTM for BGP routing policies. Thanks Darren.
After a bit more discussion, there was a request to also clarify what happens if there is a routing-policy statement with no condition AND no action, as well as a policy-definition without any statements. These should be treated as errors (grpc error: Note that policy-result is an action. So one may write a valid OC routing-policy which has for example, one statement which as no condition (matching all routes) and a I will update this pull request accordingly. |
forwarding-policy is applied to an interface via referencing it | ||
consist of a number of criteria, such as DSCP. The match criteria | ||
is specified as rules. If no rules are specified, then the policy | ||
will match all packets. |
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.
Why is this the right thing to do vs. having an explicit match-all type criteria?
The downside of this API design is that the absence of something means something implicitly -- it seems a better API design to have the presence of something indicate something, which would mean that we should rather have an explicit "match everything" (can be done with matching all src/dst IP addrs)?
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.
There is no right or wrong here. This proposal is made based on precedent as referenced in #1223 (comment) earlier in this PR. The industry precedent is no-condition = matches any and all. This was also discussed in the OpenConfig operator meeting on Nov 26, 2024 with some thoughtful conversation.
The precedent is pretty strong where 5 out of 5 implement that no "condition" means match all. (Not included in the gist of 4 examples is arista EOS, which also defines a route map with no match statements as match all)
I do like the idea of being explicit in general. A number of changes in OC in the last few years have been due to ambiguity. But what is better? Do something different in OC or go with the precedent? In this case, I think the precedent is so strong that it's better to go with no conditions means match all. This change makes this decision explicit via description, but not in the data model/API.
Small clarification, About following:
|
Two scenarios as you described. |
Change Scope