Skip to content

[BUG] gNMI SET failure for SONIC PFCWD, SONIC SFLOW, and SONIC QUEUE due to incorrect validation of union types containing leafref and string literals #669

@rakshitha-marvell

Description

@rakshitha-marvell

BUG SUMMARY :

In SONiC YANG models such as sonic-sflow.yang, sonic-pfcwd.yang, and sonic-queue.yang, certain configuration leaves are defined using a union type that combines a leafref with a string type constrained by a specific pattern. A common example is the port leaf in sonic-sflow.yang, where the type is defined as a union of a leafref pointing to valid port names and a string that matches a special literal value such as all.
This design allows the configuration to accept either a specific port name from the PORT table or a special keyword such as ‘all’ or ‘global’ or aggregated configuration. However, when performing a gNMI SET operation using such special literal values, for example setting port to all in sflow or using GLOBAL in pfcwd, the operation fails at runtime with a CVL error indicating semantic dependent data is missing. The error message typically states that no instance is found for the provided value, such as no instance found for all or no instance found for GLOBAL.

Client side :


CVL error 1014: CVL_SEMANTIC_DEPENDENT_DATA_MISSING
"No instance found for 'all'"
"No instance found for 'GLOBAL'

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions