-
Notifications
You must be signed in to change notification settings - Fork 91
gnmi on-change clarification #219
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
base: master
Are you sure you want to change the base?
Conversation
Clarification in 3.5.1.5.2 On Change for counter type exclusion and heartbeat behaviors.
Update gnmi-specification.md
|
Could you elaborate on the reasoning for this change? It seems that the scenario you have in mind is already covered by the target defined mode: reference/rpc/gnmi/gnmi-specification.md Lines 1634 to 1640 in 95392c1
I don't agree that this can be considered "a clarification". This is a significant change in the behavior.
What's the definition of a "rapidly changing counter type"? How can it be distinguished from other counter types? |
|
The reasoning is that TARGET_DEFINED is left to the vendor to determine the best type of subscription. Comparison of vendor implementations have shown a difference in view of which type of subscription should be used. The use of ON_CHANGE avoids the ambiguity and vendor implementation for type of subscription. The current ON_CHANGE description does not indicated the behavior if there is a mix between leaves suitable for event based update and counters. For example an ON_CHANGE subscription to /interfaces/interface/state would include the counter container within the hierarchy. The counter performance leaves are only desired on SAMPLE basis. This is an obvious scenario, but in some cases there is no counter container and some mix of event leaf and counter items are present within the same container. Some vendors already behave as described while others do not provide ability to subscribe with ON_CHANGE as a result and have create issues with their choice of implementation of type of subscription with TARGET_DEFINED. Changing in wording to remove rapidly is fine to cover any counter that should be sample based. |
What do you mean by that? IMO, the current definition of on_change is straightforward and unambiguous: there are no cases where an implementation can switch to another mode implicitly.
In many cases, yes, This is when you should use SAMPLE or TARGET_DEFINED to subscribe :-)
And in that case target_defined works well, if one has a good implementation.
I disagree with that idea as well. Your proposal eliminates the ability to use a true ON_CHANGE mode for counters. There are legitimate use cases for this functionality; even if it might not apply to your use case. In my view, you should be looking to add a new subscription mode if you want to have this implemented properly and have a solid argument as to why TARGET_DEFINED is not sufficient. The current proposal is a non-backward compatible change to the definition of the ON_CHANGE, and that's not great. |
|
Reviewed at May 6, 2025 OC Operators meeting. Some feedbacks: Operational Goal is something like: Observations: Perhaps a solution might be to propose an annotation to yang nodes which identifies the "less important" counter nodes and/or the more important "operational state nodes" and a gnmi extension which allows filtering a subscription on the annotation? Loosely related is this proposal for WHERE clause type filtering: openconfig/gnmi#182. This seems much more complex and impactful to implementations. To be effective, there would still need to be some criteria for filtering that it's not clear the proposal could meet without more extensions. |
|
The operational goal stated above can be easily achieved by using TARGET_DEFINED mode with the exception of "operator specified interval" (currently interval will be chosen by vendor, or by a configuration knob in the vendor cfg). The interval "problem" can be solved as
There's no need to use ON_CHANGE to solve this. |
This looks like a clean solution that is both backwards compatible and does not incur changes to the schemas |
|
The reasons why TARGET_DEFINED as a resolution have issues is two fold. First TARGET_DEFINED is not well defined and varies between vendors as a result and not aligned with a common behavior across vendors. Secondly, this assumes a common collection use case and does not allow for a collector to select if they only wish to receive operational state data or only performance data. |
I'd argue that it is reasonably well defined, but implementation variations are possible (which is not a bad thing necessarily). I don't see how or why a breaking change in the definition of ON_CHANGE is the answer to that problem (even if we assume it is a problem).
Can you please elaborate on this point? How is this related to ON_CHANGE or TARGET_DEFINED subscription modes? |
|
In short, what I would propose is to
This PR started with an incorrect description first and foremost (this is not a clarification, this is a major change of the spec);
|
Provide clarification to On Change for STREAM Subscription in section 3.5.1.5.2 to exclude rapidly changing counter types and only stream updates on the initial subscription and at the heartbeat interval if it has been specified.