openconfig / gnmi

gRPC Network Management Interface
Apache License 2.0
463 stars 196 forks source link

gnmi collector is sending no data, close field = true and tag = 0 #120

Open shivamganwani opened 2 years ago

shivamganwani commented 2 years ago

Hi,

Objective - Gnmi collector to send proper x-path data to tunnelclient. Issue - Currently Gnmi collector is sending nothing. ( Flow is better explained in the points below )

On host machine Gnmi Collector is running with this command : ./gnmi_collector -port 50053 -v 1 -tunnel_request "true" -config_file ./testdata/iqnos.cfg -cert_file ./testdata/selfsigned.crt -key_file ./testdata/selfsigned.key -stderrthreshold 6 -v 6 -logtostderr

This config_file is where the x-path data is defined.

Just consider the architecture where a tunnelclient (running on NE) is talking to gnmi collector (running on host). TC - tunnelclient GC - GNMI Collector I'll mention the steps which are working below :

  1. TC send registerOp ADD TARGET to GC.
  2. GC replies which accept = true.
  3. Surprisingly GC sent me session with tag = 1. I thought we had to send a subscribeOp after receiving register ACK. But anyways lets move on.
  4. Now that I know my session is established I will start tunnel.
  5. Now TC will send the Data message which has ( tag, data, close ).
  6. Here TC sends tag = 1 and the rest are empty.
  7. Now the problem comes.
  8. Now after point 6 ( sending Data ) TC is waiting for response from GC.
  9. TC gets response but the response is ( tag = 0, data = NULL, close = true ) and session gets closed.
  10. Expected behavior is that GC should send data related to x-path subscribed in the config file.
  11. Response should be (tag = 1, data = encrypted x-path, close = false)

My question is why am I getting this kind of response from GC. Can someone help and see if I'm missing anything and how to make this work ?