Skip to content
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

Poll implementation might be non-compliant with the gNMI specification #456

Open
jvijtiuk opened this issue Jun 5, 2024 · 1 comment
Open

Comments

@jvijtiuk
Copy link

jvijtiuk commented Jun 5, 2024

Hello,

I am working on a gNMI server implementation, and while testing the POLL subscription mode, I noticed that the gnmic client hangs after establishing the subscription.

The reason for that seems to be that it requires subscription data to be sent after the initial SubscribeRequest, which I don't think complies with the specification. This seems to happen for versions above 0.34.3 or more specifically after the poll subscriptions were refactored in #331 and #332. I think the specification clearly states that data for POLL subscriptions is to be returned only when the SubscribeRequest with an empty Poll field is sent. The first message can not have a Poll field since a SubscriptionRequest contains a union/oneof of either Poll or SubscriptionList. Since SubscriptionList is used to configure the subscription, the first message will never be a Poll. I managed to work around this by updating the server to return poll data even for the first SubscriptionRequest, but as I said, I don't think this is compliant with the spec. The relevant part of the specification is here in the second paragraph which states the following:

To retrieve data from the target, a client sends a SubscribeRequest message to the target,
containing a poll field, specified to be an empty Poll message. 
On reception of such a message, the target MUST generate updates for
all the corresponding paths within the SubscriptionList. 
Updates MUST be generated according to Section 3.5.2.3.

If there's any additional information I can provide, please let me know.

@karimra
Copy link
Collaborator

karimra commented Jun 20, 2024

The implementation is based on this comment: openconfig/reference#89 (comment)

If you think this is not right or needs to be clarified I suggest starting a discussion in openconfig/reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants