sonic-net / sonic-gnmi

SONiC gNMI server and gNOI repo
Other
22 stars 52 forks source link

ERR level syslog with valid gNMI query using wildcard #196

Closed willowhawk-k closed 7 months ago

willowhawk-k commented 8 months ago

We’ve come across what I believe to be a bug in the SONiC handling of gNMI requests using the OpenConfig query standards.

The following confirms wildcards are valid query strings (from https://openconfig.net/docs/gnmi/gnmi-path-conventions/): Wildcards in paths · Wildcards are allowed to indicate all elements at a given subtree in the schema – these are used particularly for telemetry subscriptions or Get requests. A single-level wildcard is indicated by specifying the name of a PathElem to be an asterisk (*). A multi-level wildcard is indicated by specifying the name of a PathElem to be the string ... We issue a subscription request to the following gNMI path, among others:

openconfig-interfaces:interfaces/interface[name=*]/ethernet/state

When this is done, we see syslog ERROR level messages that look like this:

Mar 04 22:19:03.652039+00:00 2024 leaf-11 ERR telemetry#telemetry[46]: [xfmr_intf.go:1811] Extracting Interface type for Interface: PortConfigDone failed!
Mar 04 22:19:03.653925+00:00 2024 leaf-11 ERR telemetry#telemetry[46]: [xfmr_intf.go:1811] Extracting Interface type for Interface: PortConfigDone failed!
Mar 04 22:19:04.889044+00:00 2024 leaf-11 ERR telemetry#telemetry[46]: [xfmr_intf.go:1811] Extracting Interface type for Interface: PortInitDone failed!
Mar 04 22:19:04.890860+00:00 2024 leaf-11 ERR telemetry#telemetry[46]: [xfmr_intf.go:1811] Extracting Interface type for Interface: PortInitDone failed!

A similar query for counters does the same thing:

openconfig-interfaces:interfaces/interface[name=*]/state/counters

When this is done, we see syslog ERROR level messages that look like this:

Mar 04 22:22:46.232490+00:00 2024 leaf-11 ERR telemetry#telemetry[46]: [xfmr_intf.go:1811] Extracting Interface type for Interface: CPU failed!
Mar 04 22:22:46.234588+00:00 2024 leaf-11 ERR telemetry#telemetry[46]: [xfmr_intf.go:1811] Extracting Interface type for Interface: CPU failed!

This is reproducible on multiple versions of SONiC, logs here are from 4.1.0-Enterprise_Base.

jeff-yin commented 7 months ago

logs here are from 4.1.0-Enterprise_Base

Hi @willowhawk-k, this Github organization is for the Community version of SONiC. To get support for Enterprise SONiC, please contact Dell support. Wildcard subscription has not yet been implemented in Community SONiC. Additionally, you may want to try the latest version of Enterprise SONiC, 4.2.0, and see if your issues are addressed in that latest version.

A similar query for counters does the same thing

I'm not sure if you are doing an ON_CHANGE or SAMPLE based subscription, but just FYI, ON_CHANGE functionality is not supported for all objects, counters being one of them. It would be too verbose in an operational setting.

jeff-yin commented 7 months ago

@sneelam20 please close this issue as it's not going to be relevant to the code in the sonic-net Github organization. (I don't have privileges to close issues)

sneelam20 commented 7 months ago

Thanks. Closed.