openconfig / gnmic

gNMIc is a gNMI CLI client and collector
https://gnmic.openconfig.net
Apache License 2.0
170 stars 55 forks source link

Getting response for single subscription when multiple subscriptions are requested through config file with ONCE mode #382

Closed ruchakulkarni11 closed 1 month ago

ruchakulkarni11 commented 6 months ago

While sending a subscribe request with multiple subscriptions through the config file, only one subscription is sent to the gnmi-server, and when response received, the rpc is closed. Hence, the other subscription from the input config file is never sent to the gnmi-server.

karimra commented 6 months ago

This should be solved in v0.36.1, please give it a try.

ruchakulkarni11 commented 6 months ago

Hi @karimra,

Instead of "continue" in the pkg/app/gnmi_client_subscribe.go (line 292), "continue OUTER" is working.

karimra commented 6 months ago

That tells me the server you are testing this against is not closing the stream after sending a sync_update: true

ruchakulkarni11 commented 6 months ago

I tried closing stream by returning nil, and gnmic is sending next subscription but the gnmi-server is not receiving the next subscribe request (may be because stream is closed).

karimra commented 6 months ago

Each subscription should start its own stream. Are you defining multiple subscriptions or a single one with multiple paths in your config file ?

ruchakulkarni11 commented 6 months ago

I am defining multiple subscriptions.

Gnmic is sending the request but there is nothing happening on server side.

On Sat, Mar 9, 2024 at 2:35 PM Karim Radhouani @.***> wrote:

Each subscription should start its own stream. Are you defining multiple subscriptions or a single one with multiple paths in your config file ?

— Reply to this email directly, view it on GitHub https://github.com/openconfig/gnmic/issues/382#issuecomment-1986998296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZHYG55ABRTZ3AVBNQPV2STYXOFDBAVCNFSM6AAAAABD3DUE4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHE4TQMRZGY . You are receiving this because you authored the thread.Message ID: @.***>

-- .