Giter Site home page Giter Site logo

sonic-gnmi's People

Contributors

abdosi avatar anand-kumar-subramanian avatar chaliu avatar dependabot[bot] avatar dzhangalibaba avatar edengri avatar fengpan-frank avatar ganglyu avatar gregshpit avatar jipanyang avatar jleveque avatar lguohan avatar liuh-80 avatar liushilongbuaa avatar macikgozwa avatar maipbui avatar mulinforest avatar pra-moh avatar prabhusreenivasan avatar qiluo-msft avatar ranjinidn avatar renukamanavalan avatar rlhui avatar sachinholla avatar saiarcot895 avatar sallylsy avatar seiferteric avatar tomek-us avatar xumia avatar zbud-msft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonic-gnmi's Issues

go mod support is not working

Example file to illustrate:

`package main

import _ "github.com/Azure/sonic-telemetry"

func main() {}
`

root@c08af7e38ab7:/tmp/foo# go mod init example
go: creating new go.mod: module example

root@c08af7e38ab7:/tmp/foo# go mod tidy
go: finding module for package github.com/Azure/sonic-telemetry
example imports
github.com/Azure/sonic-telemetry: no matching versions for query "latest"

There is also the following line in top level go.mod under sonic-telemetry:
replace github.com/Azure/sonic-mgmt-common => ../sonic-mgmt-common

How is go mod expected to work?

GNMI sonic-db:CONFIG_DB model - some SET operations say that they fail, but in reality they add the data.

I am building my own mainline sonic with these options:

    - sed -i 's/INCLUDE_ICCPD.*\sn/INCLUDE_ICCPD = y/' rules/config
    - sed -i 's/INCLUDE_RESTAPI.*\sn/INCLUDE_RESTAPI = y/' rules/config
    - sed -i 's/.*ENABLE_TRANSLIB_WRITE\s=\s.*/ENABLE_TRANSLIB_WRITE = y/' rules/config
    - sed -i 's/INCLUDE_FIPS.*\sy/INCLUDE_FIPS = n/' rules/config

So I have translib write enabled, which is the most important thing for gnmi I suppose.

I am building the Virtual Switch image to be run in GNS3 sonic-vs.img.gz

I am using nornir for automation with pygnmi and nornir_pygnmi as the interface to communicate with the sonic gnmi endpoint.

Some set operations work, but others don't. For example enabling and disabling features works. But when I try to update or replace SYSLOG_SERVER or NTP_SERVER it fails, but it also doesn't fail.

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = "Error: Failed to apply patch on the following scopes:"
	debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2024-05-14T16:41:39.262722796+03:00", grpc_status:2, grpc_message:"Error: Failed to apply patch on the following scopes:"}"
>

The code itself looks like this:

def sonic_ntp(task: Task) -> MultiResult:
  ntp_servers = {}
  for ntp_server in task.host.get('ntp_servers'):
    ntp_servers[ntp_server] = {
      "association_type": "pool",
      "iburst": "off",
      "admin_state": "disabled",
      "version": 4,
    }

  NTP_SETTINGS = [
      (
        "/sonic-db:CONFIG_DB/localhost/NTP_SERVER",
        ntp_servers
      )
  ]
  result = task.run(name="Configure NTP settings for SONiC appliance", task=gnmi_set, update=NTP_SETTINGS, encoding='json_ietf')
  return result

As you can see the endpoint is /sonic-db:CONFIG_DB/localhost/NTP_SERVER (https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#ntp-servers)

The data is inserted into the model, but the pygnmi connection does not recieve something back that it wants and fails.

Heartbeat interval doesn't seem to work in streaming mode

In streaming mode, when heartbeat interval is enabled, the gnmi server exits after sending data.
Not sure why heartbeat interval is not working. When a value is set for Heartbeat interval, it should all the subscribed statistics after the interval expiry. Currently its not working and is not sending after heartbeat interval expiry.

Below is the subscription log output, where heartbeat interval is set to 30 seconds

Apr 8 17:36:46.307771 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:46.307010 19 client_subscribe.go:96] Client 50.238.98.163:49406 recieved initial query subscribe:<prefix:<target:"COUNTERS_DB" > subscription:<path:<element:"COUNTERS" element:"Ethernet4" element:"Queues" elem:<name:"COUNTERS" > elem:<name:"Ethernet4" > elem:<name:"Queues" > > suppress_redundant:true heartbeat_interval:30000000000 > subscription:<path:<element:"COUNTERS" element:"Ethernet64" element:"Queues" elem:<name:"COUNTERS" > elem:<name:"Ethernet64" > elem:<name:"Queues" > > suppress_redundant:true heartbeat_interval:30000000000 > >
Apr 8 17:36:46.308381 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:46.308072 19 client_subscribe.go:54] prefix : &gnmi.Path{Element:[]string(nil), Origin:"", Elem:[]*gnmi.PathElem(nil), Target:"COUNTERS_DB", XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0} SubscribRequest : &gnmi.SubscriptionList{Prefix:(*gnmi.Path)(0xc000030b60), Subscription:[]*gnmi.Subscription{(*gnmi.Subscription)(0xc0008b08c0), (*gnmi.Subscription)(0xc0008b0c30)}, UseAliases:false, Qos:(*gnmi.QOSMarking)(nil), Mode:0, AllowAggregation:false, UseModels:[]*gnmi.ModelData(nil), Encoding:0, UpdatesOnly:false, XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}
Apr 8 17:36:46.308862 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:46.308636 19 client_subscribe.go:66] gnmi Paths : [element:"COUNTERS" element:"Ethernet4" element:"Queues" elem:<name:"COUNTERS" > elem:<name:"Ethernet4" > elem:<name:"Queues" > element:"COUNTERS" element:"Ethernet64" element:"Queues" elem:<name:"COUNTERS" > elem:<name:"Ethernet64" > elem:<name:"Queues" > ]

And below is the end of the telemetry log output where it doesn't send statistics after heartbeat expiry.

Apr 8 17:36:47.059197 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:47.058069 19 db_client.go:835] pubsub.ReceiveTimeout err read unix @->/var/run/redis/redis.sock: use of closed network connection
Apr 8 17:36:47.059280 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:47.058181 19 db_client.go:892] Stopping dbSingleTableKeySubscribe routine for {dbName:COUNTERS_DB tableName:COUNTERS tableKey:oid:0x15000000000045 delimitor:: field: jsonTableName: jsonTableKey:Ethernet4:12 jsonDelimitor: jsonField:}
Apr 8 17:36:47.352458 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:47.351799 19 db_client.go:197] Exiting StreamRun routine for Client map[element:"COUNTERS" element:"Ethernet4" element:"Queues" elem:<name:"COUNTERS" > elem:<name:"Ethernet4" > elem:<name:"Queues" > :[{COUNTERS_DB COUNTERS oid:0x15000000000048 : Ethernet4:15 } {COUNTERS_DB COUNTERS oid:0x15000000000045 : Ethernet4:12 } {COUNTERS_DB COUNTERS oid:0x1500000000003f : Ethernet4:6 } {COUNTERS_DB COUNTERS oid:0x15000000000040 : Ethernet4:7 } {COUNTERS_DB COUNTERS oid:0x1500000000003e : Ethernet4:5 } {COUNTERS_DB COUNTERS oid:0x1500000000004a : Ethernet4:17 } {COUNTERS_DB COUNTERS oid:0x1500000000003c : Ethernet4:3 } {COUNTERS_DB COUNTERS oid:0x15000000000041 : Ethernet4:8 } {COUNTERS_DB COUNTERS oid:0x15000000000044 : Ethernet4:11 } {COUNTERS_DB COUNTERS oid:0x1500000000004b : Ethernet4:18 } {COUNTERS_DB COUNTERS oid:0x1500000000003b : Ethernet4:2 } {COUNTERS_DB COUNTERS oid:0x15000000000046 : Ethernet4:13 } {COUNTERS_DB COUNTERS oid:0x1500000000003a : Ethernet4:1 } {COUNTERS_DB COUNTERS oid:0x15000000000039 : Ethernet4:0 } {COUNTERS_DB COUNTERS oid:0x15000000000049 : Ethernet4:16 } {COUNTERS_DB COUNTERS oid:0x15000000000043 : Ethernet4:10 } {COUNTERS_DB COUNTERS oid:0x15000000000047 : Ethernet4:14 } {COUNTERS_DB COUNTERS oid:0x15000000000042 : Ethernet4:9 } {COUNTERS_DB COUNTERS oid:0x1500000000004c : Ethernet4:19 } {COUNTERS_DB COUNTERS oid:0x1500000000003d : Ethernet4:4 }] element:"COUNTERS" element:"Ethernet64" element:"Queues" elem:<name:"COUNTERS" > elem:<name:"Ethernet64" > elem:<name:"Queues" > :[{COUNTERS_DB COUNTERS oid:0x15000000000175 : Ethernet64:16 } {COUNTERS_DB COUNTERS oid:0x15000000000170 : Ethernet64:11 } {COUNTERS_DB COUNTERS oid:0x15000000000168 : Ethernet64:3 } {COUNTERS_DB COUNTERS oid:0x1500000000016d : Ethernet64:8 } {COUNTERS_DB COUNTERS oid:0x1500000000016b : Ethernet64:6 } {COUNTERS_DB COUNTERS oid:0x15000000000167 : Ethernet64:2 } {COUNTERS_DB COUNTERS oid:0x15000000000176 : Ethernet64:17 } {COUNTERS_DB COUNTERS oid:0x1500000000016a : Ethernet64:5 } {COUNTERS_DB COUNTERS oid:0x15000000000165 : Ethernet64:0 } {COUNTERS_DB COUNTERS oid:0x15000000000172 : Ethernet64:13 } {COUNTERS_DB COUNTERS oid:0x15000000000173 : Ethernet64:14 } {COUNTERS_DB COUNTERS oid:0x15000000000171 : Ethernet64:12 } {COUNTERS_DB COUNTERS oid:0x15000000000174 : Ethernet64:15 } {COUNTERS_DB COUNTERS oid:0x1500000000016f : Ethernet64:10 } {COUNTERS_DB COUNTERS oid:0x15000000000178 : Ethernet64:19 } {COUNTERS_DB COUNTERS oid:0x15000000000169 : Ethernet64:4 } {COUNTERS_DB COUNTERS oid:0x15000000000166 : Ethernet64:1 } {COUNTERS_DB COUNTERS oid:0x1500000000016c : Ethernet64:7 } {COUNTERS_DB COUNTERS oid:0x15000000000177 : Ethernet64:18 } {COUNTERS_DB COUNTERS oid:0x1500000000016e : Ethernet64:9 }]]
Apr 8 17:36:47.352458 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:47.351993 19 client_subscribe.go:160] Client 50.238.98.163:49406 shutdown
Apr 8 17:36:47.352801 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:47.352091 19 client_subscribe.go:197] Client 50.238.98.163:49406 received error: rpc error: code = Canceled desc = context canceled
Apr 8 17:36:47.352801 sonic-vs-1 INFO telemetry#supervisord: telemetry I0408 17:36:47.352111 19 client_subscribe.go:169] Client 50.238.98.163:49406 Close, sendMsg 3 recvMsg 2 errors 1

OpenConfig API not working with SONIC OS

Description

OpenConfig API not working with SONIC OS.

Steps to reproduce the issue:

  1. We tried using the OpenConfig APIs (openconfig-system) )for pushing banner, NTP, DNS, and logging commands.
  2. When using the swagger API, we got error:
{
        "error-type": "application",
        "error-tag": "operation-failed"
}

banner -> "error-type":"application","error-tag": "operation-failed"
DNS -> "error-type":"application","error-tag": "operation-failed"
NTP -> "error-type":"application","error-tag": "operation-failed"
logging -> TypeError: Failed to fetch error

which means SONIC does not yet support the OpenCOnfig API.

Describe the results you expected:

Expected results should be a successful response that the configs were created or there are specific issues with the payload.

Output of show version:

show version

SONiC Software Version: SONiC.master.288529-40eb97c2f
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-18-2-amd64
Build commit: 40eb97c2f
Build date: Tue Jun  6 14:37:38 UTC 2023
Built by: AzDevOps@vmss-soni0018SE

Platform: x86_64-accton_as7326_56x-r0
HwSKU: Accton-AS7326-56X
ASIC: broadcom
ASIC Count: 1
Serial Number: 732656X2313115
Model Number: FP4ZZ7656005A
Hardware Revision: N/A
Uptime: 17:02:49 up 2 days, 22:49,  1 user,  load average: 2.25, 2.00, 2.02
Date: Fri 22 Sep 2023 17:02:49

Docker images:
REPOSITORY                    TAG                       IMAGE ID       SIZE
docker-gbsyncd-broncos        latest                    f34e05377f70   348MB
docker-gbsyncd-broncos        master.288529-40eb97c2f   f34e05377f70   348MB
docker-gbsyncd-credo          latest                    a540095436b7   321MB
docker-gbsyncd-credo          master.288529-40eb97c2f   a540095436b7   321MB
docker-syncd-brcm             latest                    4e23b9ea009f   672MB
docker-syncd-brcm             master.288529-40eb97c2f   4e23b9ea009f   672MB
docker-orchagent              latest                    eb8f5f6d63c4   328MB
docker-orchagent              master.288529-40eb97c2f   eb8f5f6d63c4   328MB
docker-fpm-frr                latest                    a88f227ff262   346MB
docker-fpm-frr                master.288529-40eb97c2f   a88f227ff262   346MB
docker-nat                    latest                    ab8c4a9882ef   319MB
docker-nat                    master.288529-40eb97c2f   ab8c4a9882ef   319MB
docker-sflow                  latest                    033d052dbbf4   317MB
docker-sflow                  master.288529-40eb97c2f   033d052dbbf4   317MB
docker-teamd                  latest                    f31c6d87d474   316MB
docker-teamd                  master.288529-40eb97c2f   f31c6d87d474   316MB
docker-macsec                 latest                    7de5d1e600d5   318MB
docker-dhcp-relay             latest                    c34f78699d67   306MB
docker-eventd                 latest                    91d4c29afc6d   298MB
docker-eventd                 master.288529-40eb97c2f   91d4c29afc6d   298MB
docker-sonic-p4rt             latest                    95393dbefd33   870MB
docker-sonic-p4rt             master.288529-40eb97c2f   95393dbefd33   870MB
docker-snmp                   latest                    59098e3c3014   338MB
docker-snmp                   master.288529-40eb97c2f   59098e3c3014   338MB
docker-sonic-telemetry        latest                    1bf7203b75c6   597MB
docker-sonic-telemetry        master.288529-40eb97c2f   1bf7203b75c6   597MB
docker-router-advertiser      latest                    fff8e05a8c89   299MB
docker-router-advertiser      master.288529-40eb97c2f   fff8e05a8c89   299MB
docker-platform-monitor       latest                    178db0ee2c96   420MB
docker-platform-monitor       master.288529-40eb97c2f   178db0ee2c96   420MB
docker-lldp                   latest                    8e12d827ec5a   341MB
docker-lldp                   master.288529-40eb97c2f   8e12d827ec5a   341MB
docker-mux                    latest                    e2bd7d1aa56f   347MB
docker-mux                    master.288529-40eb97c2f   e2bd7d1aa56f   347MB
docker-database               latest                    7cfb40aa6712   299MB
docker-database               master.288529-40eb97c2f   7cfb40aa6712   299MB
docker-sonic-mgmt-framework   latest                    2715b226fa6b   414MB
docker-sonic-mgmt-framework   master.288529-40eb97c2f   2715b226fa6b   414MB

can't really show tech-support as it might maintain some confidential info.

ERR level syslog with valid gNMI query using wildcard

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.

Unordered map serialization, cause different results of the same operation

When I use gnmi_get to get data, if the path contains 2 or more keys, the result of the same operation is different.

As I know, it is caused by the unordered map of proto serialization. For example, the path "/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]" convert to [sonic-acl:sonic-aclACL_RULE ACL_RULE_LIST map[aclname:1 rulename:2]],but the map is not ordered, so the result of proto serialization cannot be accurate.

Operation record:

root@sonic:/# gnmi_get -xpath_target SONiC-YANG -xpath /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2] -target_addr 127.0.0.1:8090 -insecure true
== getRequest:
prefix: <
  target: "SONiC-YANG"
>
path: <
  elem: <
    name: "sonic-acl:sonic-acl"
  >
  elem: <
    name: "ACL_RULE"
  >
  elem: <
    name: "ACL_RULE_LIST"
    key: <
      key: "aclname"
      value: "1"
    >
    key: <
      key: "rulename"
      value: "2"
    >
  >
>
encoding: JSON_IETF

== getResponse:
notification: <
  timestamp: 1663901622269512774
  prefix: <
    target: "SONiC-YANG"
  >
  update: <
    path: <
      elem: <
        name: "sonic-acl:sonic-acl"
      >
      elem: <
        name: "ACL_RULE"
      >
      elem: <
        name: "ACL_RULE_LIST"
        key: <
          key: "aclname"
          value: "1"
        >
        key: <
          key: "rulename"
          value: "2"
        >
      >
    >
    val: <
      json_ietf_val: "{\"sonic-acl:ACL_RULE_LIST\":[{\"DST_IP\":\"192.168.110.5\",\"IP_TYPE\":\"IP\",\"PACKET_ACTION\":\"REDIRECT\",\"SRC_IP\":\"192.168.110.4\",\"aclname\":\"1\",\"rulename\":\"2\"}]}"
    >
  >
>

root@sonic:/# gnmi_get -xpath_target SONiC-YANG -xpath /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2] -target_addr 127.0.0.1:8090 -insecure true
== getRequest:
prefix: <
  target: "SONiC-YANG"
>
path: <
  elem: <
    name: "sonic-acl:sonic-acl"
  >
  elem: <
    name: "ACL_RULE"
  >
  elem: <
    name: "ACL_RULE_LIST"
    key: <
      key: "aclname"
      value: "1"
    >
    key: <
      key: "rulename"
      value: "2"
    >
  >
>
encoding: JSON_IETF

F0923 02:53:45.447613     195 gnmi_get.go:142] Get failed: rpc error: code = NotFound desc = Resource not found
root@sonic:/# 

server log:

I0923 02:53:42.269340      73 server.go:299] GetRequest paths: [elem:{name:"sonic-acl:sonic-acl"}  elem:{name:"ACL_RULE"}  elem:{name:"ACL_RULE_LIST"  key:{key:"aclname"  value:"1"}  key:{key:"rulename"  value:"2"}}]
I0923 02:53:42.269426      73 transl_utils.go:86] index 0 elem : "sonic-acl:sonic-acl" map[string]string(nil)
I0923 02:53:42.269450      73 transl_utils.go:86] index 1 elem : "ACL_RULE" map[string]string(nil)
I0923 02:53:42.269459      73 transl_utils.go:86] index 2 elem : "ACL_RULE_LIST" map[string]string{"aclname":"1", "rulename":"2"}
I0923 02:53:42.269483      73 transl_utils.go:97] elem : "aclname" "1"
I0923 02:53:42.269500      73 transl_utils.go:97] elem : "rulename" "2"
I0923 02:53:42.269519      73 translib.go:491] Received Get request for path = /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.269535      73 app_interface.go:129] getAppModule called for path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.269549      73 app_interface.go:136] found the entry in the map for path =/sonic-
I0923 02:53:42.269563      73 app_interface.go:164] cast to appInterface worked&{<nil> [] <nil> <nil> false map[] map[] map[] {0 false}}
W0923 02:53:42.269774      73 request_binder.go:128] Translib: RequestBinder: Skipping the vaidatiion of the given sonic yang model request..
I0923 02:53:42.269789      73 common_app.go:80] initialize:path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.269817      73 db.go:334] NewDB: Begin: opt: { DBNo: 0, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }
I0923 02:53:42.269875      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:42.269889      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:0>, Opts: { DBNo: 0, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.269930      73 db.go:334] NewDB: Begin: opt: { DBNo: 1, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }
I0923 02:53:42.269964      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:42.269979      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:1>, Opts: { DBNo: 1, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.270020      73 db.go:334] NewDB: Begin: opt: { DBNo: 2, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }
I0923 02:53:42.270060      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:42.270072      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:2>, Opts: { DBNo: 2, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.270107      73 db.go:334] NewDB: Begin: opt: { DBNo: 3, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
W0923 02:53:42.270135      73 db.go:346] TableNameSeparator '|' in the Options is different from the one configured in the Db config. file for the Db name LOGLEVEL_DB
I0923 02:53:42.270157      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:42.270167      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:3>, Opts: { DBNo: 3, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.270201      73 db.go:334] NewDB: Begin: opt: { DBNo: 4, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
I0923 02:53:42.270236      73 db.go:394] NewDB: Init indication not requested
I0923 02:53:42.270251      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:4>, Opts: { DBNo: 4, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.270275      73 db.go:334] NewDB: Begin: opt: { DBNo: 5, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
W0923 02:53:42.270294      73 db.go:346] TableNameSeparator '|' in the Options is different from the one configured in the Db config. file for the Db name FLEX_COUNTER_DB
I0923 02:53:42.270313      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:42.270325      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:5>, Opts: { DBNo: 5, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.270345      73 db.go:334] NewDB: Begin: opt: { DBNo: 6, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
I0923 02:53:42.270369      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:42.270398      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:6>, Opts: { DBNo: 6, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:42.270424      73 common_app.go:128] translateGet:path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.270439      73 common_app.go:249] processGet:path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.270498      73 xlate_utils.go:976] [xlate.go:380]received xpath = /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.270549      73 xlate_utils.go:982] [xlate_utils.go:832]In uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2])
I0923 02:53:42.270668      73 xlate_utils.go:982] [xlate_utils.go:883]Return uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]), xpath(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST), key(1|2), tableName(ACL_RULE)
I0923 02:53:42.270736      73 db.go:474] GetEntry: Begin: ts: &{ACL_RULE 0 false} key: { Comp: [1|2] }
I0923 02:53:42.270782      73 db.go:431] key2redis: Begin: ACL_RULE|1|2
I0923 02:53:42.271294      73 db.go:500] GetEntry: End: value: "IP_TYPE": "IP"
"PACKET_ACTION": "REDIRECT"
"SRC_IP": "192.168.110.4"
"DST_IP": "192.168.110.5"
 e: <nil>
I0923 02:53:42.271329      73 xlate_utils.go:982] [xlate_utils.go:1059]Received  resultMap(map[1:map[0:map[] 1:map[] 2:map[] 3:map[] 4:map[ACL_RULE:map[1|2:"IP_TYPE": "IP"
"PACKET_ACTION": "REDIRECT"
"SRC_IP": "192.168.110.4"
"DST_IP": "192.168.110.5"
]] 5:map[] 6:map[] 7:map[] 8:map[] 9:map[]]])
I0923 02:53:42.271379      73 xlate_utils.go:982] [xlate_utils.go:1105]Transformed resultMap(map[1:map[0:map[] 1:map[] 2:map[] 3:map[] 4:map[ACL_RULE:map[1|2:"SRC_IP": "192.168.110.4"
"DST_IP": "192.168.110.5"
"IP_TYPE": "IP"
"PACKET_ACTION": "REDIRECT"
]] 5:map[] 6:map[] 7:map[] 8:map[] 9:map[]]])
I0923 02:53:42.271433      73 xlate_utils.go:982] [xlate_to_db.go:983]Checking for Parent table existence for uri: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]
I0923 02:53:42.271449      73 xlate_utils.go:982] [xlate_utils.go:1185]uri: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2] 
I0923 02:53:42.271459      73 xlate_utils.go:982] [xlate_utils.go:1186]uri path elems: [sonic-acl:sonic-acl ACL_RULE ACL_RULE_LIST[aclname=1][rulename=2]]
I0923 02:53:42.271469      73 xlate_utils.go:982] [xlate_utils.go:832]In uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2])
I0923 02:53:42.271500      73 xlate_utils.go:982] [xlate_utils.go:883]Return uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]), xpath(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST), key(1|2), tableName(ACL_RULE)
I0923 02:53:42.271513      73 xlate_utils.go:982] [xlate_to_db.go:932]uri: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2] xpath: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST table: ACL_RULE, key: 1|2
I0923 02:53:42.271526      73 xlate_utils.go:982] [xlate_utils.go:1240]received Db no - 4, table - ACL_RULE, dbkey - 1|2
I0923 02:53:42.271540      73 xlate_utils.go:982] [xlate.go:420]verifyParentTable() returned - exists - true, err - <nil>
I0923 02:53:42.271554      73 xlate_utils.go:982] [xlate_utils.go:832]In uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2])
I0923 02:53:42.271573      73 xlate_utils.go:982] [xlate_utils.go:883]Return uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]), xpath(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST), key(1|2), tableName(ACL_RULE)
I0923 02:53:42.271587      73 xlate_utils.go:982] [xlate_utils.go:832]In uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2])
I0923 02:53:42.271604      73 xlate_utils.go:982] [xlate_utils.go:883]Return uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[aclname=1][rulename=2]), xpath(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST), key(1|2), tableName(ACL_RULE)
I0923 02:53:42.271664      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(rulename)
I0923 02:53:42.271687      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(IP_TYPE)
I0923 02:53:42.271700      73 xlate_utils.go:982] [xlate_from_db.go:126]Received FieldXpath ACL_RULE/IP_TYPE, yngTerminalNdDtType enumeration and Db field value IP to be converted to yang data-type.
I0923 02:53:42.271713      73 xlate_utils.go:982] [xlate_from_db.go:174]Yenum/Ystring/Yunion(having all members as strings) type for yangXpath ACL_RULE/IP_TYPE
I0923 02:53:42.271724      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(IP_PROTOCOL)
I0923 02:53:42.271733      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(ETHER_TYPE)
I0923 02:53:42.271744      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(DSCP)
I0923 02:53:42.271757      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(SRC_IP)
I0923 02:53:42.271766      73 xlate_utils.go:982] [xlate_from_db.go:126]Received FieldXpath ACL_RULE/SRC_IP, yngTerminalNdDtType string and Db field value 192.168.110.4 to be converted to yang data-type.
I0923 02:53:42.271776      73 xlate_utils.go:982] [xlate_from_db.go:174]Yenum/Ystring/Yunion(having all members as strings) type for yangXpath ACL_RULE/SRC_IP
I0923 02:53:42.271786      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(DST_IP)
I0923 02:53:42.271795      73 xlate_utils.go:982] [xlate_from_db.go:126]Received FieldXpath ACL_RULE/DST_IP, yngTerminalNdDtType string and Db field value 192.168.110.5 to be converted to yang data-type.
I0923 02:53:42.271805      73 xlate_utils.go:982] [xlate_from_db.go:174]Yenum/Ystring/Yunion(having all members as strings) type for yangXpath ACL_RULE/DST_IP
I0923 02:53:42.271817      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(SRC_IPV6)
I0923 02:53:42.271831      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(DST_IPV6)
I0923 02:53:42.271843      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(L4_DST_PORT)
I0923 02:53:42.271857      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(L4_DST_PORT_RANGE)
I0923 02:53:42.271870      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(aclname)
I0923 02:53:42.271885      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(RULE_DESCRIPTION)
I0923 02:53:42.271897      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(PACKET_ACTION)
I0923 02:53:42.271912      73 xlate_utils.go:982] [xlate_from_db.go:126]Received FieldXpath ACL_RULE/PACKET_ACTION, yngTerminalNdDtType enumeration and Db field value REDIRECT to be converted to yang data-type.
I0923 02:53:42.271922      73 xlate_utils.go:982] [xlate_from_db.go:174]Yenum/Ystring/Yunion(having all members as strings) type for yangXpath ACL_RULE/PACKET_ACTION
I0923 02:53:42.271931      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(TCP_FLAGS)
I0923 02:53:42.271942      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(L4_SRC_PORT)
I0923 02:53:42.271956      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(L4_SRC_PORT_RANGE)
I0923 02:53:42.271971      73 xlate_utils.go:982] [xlate_from_db.go:314]tbl(ACL_RULE), k(1|2), yc(PRIORITY)
I0923 02:53:42.271982      73 xlate_utils.go:982] [xlate_utils.go:326]sonicKeyDataAdd keyNameList:[aclname rulename], keyStr:1|2
I0923 02:53:42.271999      73 xlate_utils.go:982] [xlate_utils.go:373]yang keys list - [aclname rulename], xpathprefix - ACL_RULE, DB-key string - 1|2, DB-key list after db key separator split - [1 2], dbIndex - 4
I0923 02:53:42.272014      73 xlate_utils.go:982] [xlate_from_db.go:126]Received FieldXpath ACL_RULE/aclname, yngTerminalNdDtType leafref and Db field value 1 to be converted to yang data-type.
I0923 02:53:42.272028      73 xlate_utils.go:982] [xlate_from_db.go:67]Received path ../../../ACL_TABLE/ACL_TABLE_LIST/aclname for FieldXpath ACL_RULE/aclname
I0923 02:53:42.272047      73 xlate_utils.go:982] [xlate_from_db.go:89]yangLeaf datatype string
I0923 02:53:42.272059      73 xlate_utils.go:982] [xlate_from_db.go:120]yangLeaf datatype string
I0923 02:53:42.272072      73 xlate_utils.go:982] [xlate_from_db.go:174]Yenum/Ystring/Yunion(having all members as strings) type for yangXpath ACL_RULE/aclname
I0923 02:53:42.272084      73 xlate_utils.go:982] [xlate_from_db.go:126]Received FieldXpath ACL_RULE/rulename, yngTerminalNdDtType string and Db field value 2 to be converted to yang data-type.
I0923 02:53:42.272096      73 xlate_utils.go:982] [xlate_from_db.go:174]Yenum/Ystring/Yunion(having all members as strings) type for yangXpath ACL_RULE/rulename
I0923 02:53:42.272132      73 xlate_utils.go:982] [xlate.go:503]Payload generated : {"DST_IP":"192.168.110.5","IP_TYPE":"IP","PACKET_ACTION":"REDIRECT","SRC_IP":"192.168.110.4","aclname":"1","rulename":"2"}
I0923 02:53:42.272144      73 xlate_utils.go:976] [xlate.go:509]Created json response from DB data.
I0923 02:53:42.272720      73 app_utils.go:87] pathList[0]: name:"sonic-acl:sonic-acl"
I0923 02:53:42.272746      73 app_utils.go:87] pathList[1]: name:"ACL_RULE"
I0923 02:53:42.272757      73 app_utils.go:87] pathList[2]: name:"ACL_RULE_LIST"  key:{key:"aclname"  value:"1"}  key:{key:"rulename"  value:"2"}
I0923 02:53:42.272831      73 app_utils.go:136] Target yang name: ACL_RULE_LIST  OC Field name: ACL_RULE_LIST
I0923 02:53:42.272884      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:0>, Opts: { DBNo: 0, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.272902      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:1>, Opts: { DBNo: 1, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.272913      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:2>, Opts: { DBNo: 2, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.272925      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:3>, Opts: { DBNo: 3, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.272936      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:4>, Opts: { DBNo: 4, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.272988      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:5>, Opts: { DBNo: 5, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.273010      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:6>, Opts: { DBNo: 6, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:42.273042      73 transl_data_client.go:93] TranslClient : Getting #[prefix:<target:"SONiC-YANG" > path:<elem:<name:"sonic-acl:sonic-acl" > elem:<name:"ACL_RULE" > elem:<name:"ACL_RULE_LIST" key:<key:"aclname" value:"1" > key:<key:"rulename" value:"2" > > > timestamp:1663901622269512774 val:<json_ietf_val:"{\"sonic-acl:ACL_RULE_LIST\":[{\"DST_IP\":\"192.168.110.5\",\"IP_TYPE\":\"IP\",\"PACKET_ACTION\":\"REDIRECT\",\"SRC_IP\":\"192.168.110.4\",\"aclname\":\"1\",\"rulename\":\"2\"}]}" > ]
I0923 02:53:42.273108      73 transl_data_client.go:94] TranslClient :Get done, total time taken: 3 ms













I0923 02:53:45.445492      73 server.go:299] GetRequest paths: [elem:{name:"sonic-acl:sonic-acl"}  elem:{name:"ACL_RULE"}  elem:{name:"ACL_RULE_LIST"  key:{key:"aclname"  value:"1"}  key:{key:"rulename"  value:"2"}}]
I0923 02:53:45.445561      73 transl_utils.go:86] index 0 elem : "sonic-acl:sonic-acl" map[string]string(nil)
I0923 02:53:45.445577      73 transl_utils.go:86] index 1 elem : "ACL_RULE" map[string]string(nil)
I0923 02:53:45.445589      73 transl_utils.go:86] index 2 elem : "ACL_RULE_LIST" map[string]string{"aclname":"1", "rulename":"2"}
I0923 02:53:45.445610      73 transl_utils.go:97] elem : "rulename" "2"
I0923 02:53:45.445621      73 transl_utils.go:97] elem : "aclname" "1"
I0923 02:53:45.445636      73 translib.go:491] Received Get request for path = /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.445646      73 app_interface.go:129] getAppModule called for path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.445655      73 app_interface.go:136] found the entry in the map for path =/sonic-
I0923 02:53:45.445665      73 app_interface.go:164] cast to appInterface worked&{<nil> [] <nil> <nil> false map[] map[] map[] {0 false}}
W0923 02:53:45.445813      73 request_binder.go:128] Translib: RequestBinder: Skipping the vaidatiion of the given sonic yang model request..
I0923 02:53:45.445829      73 common_app.go:80] initialize:path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.445852      73 db.go:334] NewDB: Begin: opt: { DBNo: 0, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }
I0923 02:53:45.445891      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:45.445903      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:0>, Opts: { DBNo: 0, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.445926      73 db.go:334] NewDB: Begin: opt: { DBNo: 1, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }
I0923 02:53:45.445943      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:45.445951      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:1>, Opts: { DBNo: 1, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.445972      73 db.go:334] NewDB: Begin: opt: { DBNo: 2, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }
I0923 02:53:45.445996      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:45.446004      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:2>, Opts: { DBNo: 2, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.446026      73 db.go:334] NewDB: Begin: opt: { DBNo: 3, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
W0923 02:53:45.446043      73 db.go:346] TableNameSeparator '|' in the Options is different from the one configured in the Db config. file for the Db name LOGLEVEL_DB
I0923 02:53:45.446065      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:45.446072      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:3>, Opts: { DBNo: 3, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.446086      73 db.go:334] NewDB: Begin: opt: { DBNo: 4, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
I0923 02:53:45.446106      73 db.go:394] NewDB: Init indication not requested
I0923 02:53:45.446118      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:4>, Opts: { DBNo: 4, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.446142      73 db.go:334] NewDB: Begin: opt: { DBNo: 5, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
W0923 02:53:45.446164      73 db.go:346] TableNameSeparator '|' in the Options is different from the one configured in the Db config. file for the Db name FLEX_COUNTER_DB
I0923 02:53:45.446182      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:45.446194      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:5>, Opts: { DBNo: 5, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.446219      73 db.go:334] NewDB: Begin: opt: { DBNo: 6, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }
I0923 02:53:45.446246      73 db.go:387] NewDB: ! ConfigDB. Skip init. check.
I0923 02:53:45.446257      73 db.go:408] NewDB: End: d: { client: Redis<127.0.0.1:6379 db:6>, Opts: { DBNo: 6, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] } e: <nil>
I0923 02:53:45.446275      73 common_app.go:128] translateGet:path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.446285      73 common_app.go:249] processGet:path =/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.446316      73 xlate_utils.go:976] [xlate.go:380]received xpath = /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.446332      73 xlate_utils.go:982] [xlate_utils.go:832]In uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1])
I0923 02:53:45.446368      73 xlate_utils.go:982] [xlate_utils.go:883]Return uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]), xpath(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST), key(2|1), tableName(ACL_RULE)
I0923 02:53:45.446407      73 db.go:474] GetEntry: Begin: ts: &{ACL_RULE 0 false} key: { Comp: [2|1] }
I0923 02:53:45.446424      73 db.go:431] key2redis: Begin: ACL_RULE|2|1
I0923 02:53:45.446748      73 db.go:493] GetEntry: HGetAll(): empty map
I0923 02:53:45.446764      73 db.go:431] key2redis: Begin: ACL_RULE|2|1
I0923 02:53:45.446773      73 db.go:500] GetEntry: End: value:  e: Translib Redis Error: Entry does not exist: ACL_RULE|2|1
W0923 02:53:45.446813      73 xlate.go:140] Couldn't get data for tbl(ACL_RULE), key({ Comp: [2|1] }) in traverseDbHelper
W0923 02:53:45.446830      73 xlate.go:99] Couldn't get data from traverseDbHelper
W0923 02:53:45.446848      73 xlate.go:393] TraverseDb() didn't fetch data.
I0923 02:53:45.446865      73 xlate_utils.go:982] [xlate_to_db.go:983]Checking for Parent table existence for uri: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]
I0923 02:53:45.446879      73 xlate_utils.go:982] [xlate_utils.go:1185]uri: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1] 
I0923 02:53:45.446890      73 xlate_utils.go:982] [xlate_utils.go:1186]uri path elems: [sonic-acl:sonic-acl ACL_RULE ACL_RULE_LIST[rulename=2][aclname=1]]
I0923 02:53:45.446903      73 xlate_utils.go:982] [xlate_utils.go:832]In uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1])
I0923 02:53:45.446942      73 xlate_utils.go:982] [xlate_utils.go:883]Return uri(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1]), xpath(/sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST), key(2|1), tableName(ACL_RULE)
I0923 02:53:45.446953      73 xlate_utils.go:982] [xlate_to_db.go:932]uri: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1] xpath: /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST table: ACL_RULE, key: 2|1
I0923 02:53:45.446961      73 xlate_utils.go:982] [xlate_utils.go:1240]received Db no - 4, table - ACL_RULE, dbkey - 2|1
W0923 02:53:45.446971      73 xlate_to_db.go:960] Parent table ACL_RULE with key 2|1 does not exist for oper 1 in DB
I0923 02:53:45.446986      73 xlate_utils.go:982] [xlate.go:420]verifyParentTable() returned - exists - false, err - Resource not found
W0923 02:53:45.447005      73 xlate.go:422] Cannot perform GET Operation on uri /sonic-acl:sonic-acl/ACL_RULE/ACL_RULE_LIST[rulename=2][aclname=1] due to - Resource not found
W0923 02:53:45.447017      73 common_app.go:259] transformer.GetAndXlateFromDB() returned : Resource not found
I0923 02:53:45.447030      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:0>, Opts: { DBNo: 0, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447056      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:1>, Opts: { DBNo: 1, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447074      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:2>, Opts: { DBNo: 2, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447090      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:3>, Opts: { DBNo: 3, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447101      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:4>, Opts: { DBNo: 4, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447157      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:5>, Opts: { DBNo: 5, InitIndicator: , TableNameSeparator: :, KeySeparator: : , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447177      73 db.go:418] DeleteDB: Begin: d: { client: Redis<127.0.0.1:6379 db:6>, Opts: { DBNo: 6, InitIndicator: , TableNameSeparator: |, KeySeparator: | , DisableCVLCheck: false }, txState: txStateNone, tsCmds: [] }
I0923 02:53:45.447200      73 transl_utils.go:135] GET operation failed with error =0, Resource not found

I wonder if this situation is correct. If so, what is the reason for this design, and what needs to be paid attention to. If not, is there a solution plan?

go mod: failure due to ":" in filenames

go mod tidy
....

service/sonic imports
github.com/Azure/sonic-telemetry/proto: create zip: malformed file path "testdata/COUNTERS:Ethernet1.txt": invalid char ':'

gnmi set request error

Hello,

I am trying to understand the gNMI interface implementation in SONiC.
I built a private SONiC image based of the 202012 branch with TELEMETRY_WRITABLE=y.

Noticed the following error seen in the logs when the telemetry docker is started.
libyang[0]: Failed to find "autoneg" as a sibling to "sonic-port:ifname".

Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry Traceback (most recent call last):
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry   File "/usr/local/bin/sonic-cfggen", line 431, in <module>
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry     main()
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry   File "/usr/local/bin/sonic-cfggen", line 396, in main
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry     template_data = template.render(data)
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry   File "/usr/local/lib/python3.7/dist-packages/jinja2/environment.py", line 1304, in render
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry     self.environment.handle_exception()
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry   File "/usr/local/lib/python3.7/dist-packages/jinja2/environment.py", line 925, in handle_exception
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry     raise rewrite_traceback_stack(source=source)
Oct 11 20:34:15.272884 sonic INFO telemetry#/supervisord: telemetry   File "/usr/share/sonic/templates/telemetry_vars.j2", line 2, in top-level template code
Oct 11 20:34:15.272957 sonic INFO telemetry#/supervisord: telemetry     "certs": {% if "certs" in TELEMETRY.keys() %}{{ TELEMETRY["certs"] }}{% else %}""{% endif %},
Oct 11 20:34:15.272957 sonic INFO telemetry#/supervisord: telemetry   File "/usr/local/lib/python3.7/dist-packages/jinja2/environment.py", line 474, in getattr
Oct 11 20:34:15.272957 sonic INFO telemetry#/supervisord: telemetry     return getattr(obj, attribute)
Oct 11 20:34:15.272974 sonic INFO telemetry#/supervisord: telemetry jinja2.exceptions.UndefinedError: 'TELEMETRY' is undefined
Oct 11 20:34:15.338110 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.337695      18 util.go:172] Current Values of CVL Configuration File map[LOGTOSTDERR:false SKIP_SEMANTIC_VALIDATION:false SKIP_VALIDATION:false STDERRTHRESHOLD:ERROR TRACE_CACHE:false TRACE_CREATE:false TRACE_DELETE:false TRACE_LIBYANG:false TRACE_ONERROR:true TRACE_SEMANTIC:false TRACE_SYNTAX:false TRACE_UPDATE:false TRACE_YPARSER:false VERBOSITY:0 __comment1__:Log trace data when error occurs __comment2__:Set LOGTOSTDER to 'true' to log on standard error __comment3__:Display log upto INFO level __comment4__:Display log upto INFO level 8]
Oct 11 20:34:15.338110 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.337763      18 util.go:172] Current Values of CVL Configuration File map[LOGTOSTDERR:false SKIP_SEMANTIC_VALIDATION:false SKIP_VALIDATION:false STDERRTHRESHOLD:ERROR TRACE_CACHE:false TRACE_CREATE:false TRACE_DELETE:false TRACE_LIBYANG:false TRACE_ONERROR:true TRACE_SEMANTIC:false TRACE_SYNTAX:false TRACE_UPDATE:false TRACE_YPARSER:false VERBOSITY:0 __comment1__:Log trace data when error occurs __comment2__:Set LOGTOSTDER to 'true' to log on standard error __comment3__:Display log upto INFO level __comment4__:Display log upto INFO level 8]
Oct 11 20:34:15.348938 sonic INFO telemetry#/supervisord: telemetry libyang[0]: Failed to find "autoneg" as a sibling to "sonic-port:ifname".
Oct 11 20:34:15.348938 sonic INFO telemetry#/supervisord: telemetry E1011 20:34:15.348653      18 util.go:176] Failed to create leaf nodes, data = [0xc000388320 0xc000388340 0xc000388380 0xc0003883c0 0xc0003883e0 0xc000388400 0xc000388420 0xc000388440 0xc000388460]
Oct 11 20:34:15.473184 sonic INFO telemetry#/supervisord: telemetry Yang modles path: /usr/models/yang/
Oct 11 20:34:15.473535 sonic INFO telemetry#/supervisord: telemetry Yang model List: [sonic-acl.yang sonic-common.yang sonic-extension.yang sonic-extensions.yang sonic-interface.yang sonic-port.yang openconfig-acl.yang openconfig-acl-annot.yang]
Oct 11 20:34:15.494853 sonic INFO telemetry#/supervisord: telemetry Found version 1.0.2 for yang module openconfig-acl
Oct 11 20:34:15.519103 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518715      18 app_interface.go:99] Registering for path =/openconfig-acl:acl
Oct 11 20:34:15.519103 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518729      18 app_interface.go:99] Registering for path =/sonic-
Oct 11 20:34:15.519103 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518734      18 app_interface.go:99] Registering for path =*
Oct 11 20:34:15.519138 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518742      18 intf_app.go:93] Init called for INTF module
Oct 11 20:34:15.519138 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518747      18 app_interface.go:99] Registering for path =/openconfig-interfaces:interfaces
Oct 11 20:34:15.519164 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518754      18 lldp_app.go:61] Init called for LLDP modules module
Oct 11 20:34:15.519164 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518758      18 app_interface.go:99] Registering for path =/openconfig-lldp:lldp
Oct 11 20:34:15.519164 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518765      18 pfm_app.go:42] Init called for Platform module
Oct 11 20:34:15.519164 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.518769      18 app_interface.go:99] Registering for path =/openconfig-platform:components
Oct 11 20:34:15.580043 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.579564      18 sys_app.go:45] SysApp: Init called for System module
Oct 11 20:34:15.580043 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.579599      18 app_interface.go:99] Registering for path =/openconfig-system:system
Oct 11 20:34:15.580449 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.579762      18 version.go:144] *** Yang bundle version = 1.0.0
Oct 11 20:34:15.580449 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.579786      18 version.go:145] *** Yang base version   = 1.0.0
Oct 11 20:34:15.580494 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.579795      18 app_interface.go:99] Registering for path =/ietf-yang-library:modules-state
Oct 11 20:34:15.582834 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.582553      18 telemetry.go:47] client_auth not provided, using defaults.
Oct 11 20:34:15.583207 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.582803      18 server.go:147] Created Server on localhost:8080, read-only: false
Oct 11 20:34:15.583207 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.582815      18 telemetry.go:140] Auth Modes: %!(EXTRA gnmi.AuthTypes=password jwt )
Oct 11 20:34:15.583225 sonic INFO telemetry#/supervisord: telemetry I1011 20:34:15.582832      18 telemetry.go:141] Starting RPC server on address: localhost:8080
Oct 11 20:34:17.620573 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.620185      48 util.go:172] Current Values of CVL Configuration File map[LOGTOSTDERR:false SKIP_SEMANTIC_VALIDATION:false SKIP_VALIDATION:false STDERRTHRESHOLD:ERROR TRACE_CACHE:false TRACE_CREATE:false TRACE_DELETE:false TRACE_LIBYANG:false TRACE_ONERROR:true TRACE_SEMANTIC:false TRACE_SYNTAX:false TRACE_UPDATE:false TRACE_YPARSER:false VERBOSITY:0 __comment1__:Log trace data when error occurs __comment2__:Set LOGTOSTDER to 'true' to log on standard error __comment3__:Display log upto INFO level __comment4__:Display log upto INFO level 8]
Oct 11 20:34:17.620573 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.620278      48 util.go:172] Current Values of CVL Configuration File map[LOGTOSTDERR:false SKIP_SEMANTIC_VALIDATION:false SKIP_VALIDATION:false STDERRTHRESHOLD:ERROR TRACE_CACHE:false TRACE_CREATE:false TRACE_DELETE:false TRACE_LIBYANG:false TRACE_ONERROR:true TRACE_SEMANTIC:false TRACE_SYNTAX:false TRACE_UPDATE:false TRACE_YPARSER:false VERBOSITY:0 __comment1__:Log trace data when error occurs __comment2__:Set LOGTOSTDER to 'true' to log on standard error __comment3__:Display log upto INFO level __comment4__:Display log upto INFO level 8]
Oct 11 20:34:17.630024 sonic INFO telemetry#/supervisord: dialout libyang[0]: Failed to find "autoneg" as a sibling to "sonic-port:ifname".
Oct 11 20:34:17.630024 sonic INFO telemetry#/supervisord: dialout E1011 20:34:17.629819      48 util.go:176] Failed to create leaf nodes, data = [0xc00031a320 0xc00031a340 0xc00031a380 0xc00031a3c0 0xc00031a3e0 0xc00031a400 0xc00031a420 0xc00031a440 0xc00031a460]
Oct 11 20:34:17.652059 sonic INFO systemd[1]: telemetry.service: Scheduled restart job, restart counter is at 1.
Oct 11 20:34:17.652392 sonic INFO systemd[1]: telemetry.timer: Succeeded.
Oct 11 20:34:17.785109 sonic INFO telemetry#/supervisord: dialout Yang modles path: /usr/models/yang/
Oct 11 20:34:17.785518 sonic INFO telemetry#/supervisord: dialout Yang model List: [sonic-acl.yang sonic-common.yang sonic-extension.yang sonic-extensions.yang sonic-interface.yang sonic-port.yang openconfig-acl.yang openconfig-acl-annot.yang]
Oct 11 20:34:17.806767 sonic INFO telemetry#/supervisord: dialout Found version 1.0.2 for yang module openconfig-acl
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826806      48 app_interface.go:99] Registering for path =/openconfig-acl:acl
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826825      48 app_interface.go:99] Registering for path =/sonic-
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826831      48 app_interface.go:99] Registering for path =*
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826842      48 intf_app.go:93] Init called for INTF module
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826847      48 app_interface.go:99] Registering for path =/openconfig-interfaces:interfaces
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826857      48 lldp_app.go:61] Init called for LLDP modules module
Oct 11 20:34:17.827176 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826864      48 app_interface.go:99] Registering for path =/openconfig-lldp:lldp
Oct 11 20:34:17.827267 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826869      48 pfm_app.go:42] Init called for Platform module
Oct 11 20:34:17.827267 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.826874      48 app_interface.go:99] Registering for path =/openconfig-platform:components
Oct 11 20:34:17.886363 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.885943      48 sys_app.go:45] SysApp: Init called for System module
Oct 11 20:34:17.886363 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.885967      48 app_interface.go:99] Registering for path =/openconfig-system:system
Oct 11 20:34:17.886523 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.886120      48 version.go:144] *** Yang bundle version = 1.0.0
Oct 11 20:34:17.886570 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.886141      48 version.go:145] *** Yang base version   = 1.0.0
Oct 11 20:34:17.886935 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.886149      48 app_interface.go:99] Registering for path =/ietf-yang-library:modules-state
Oct 11 20:34:17.887173 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.886936      48 dialout_client_cli.go:43] Starting telemetry publish client
Oct 11 20:34:17.887885 sonic INFO telemetry#/supervisord: dialout I1011 20:34:17.887701      48 dialout_client.go:684] Psubscribe succeeded: psubscribe: __keyspace@4__:TELEMETRY_CLIENT|*
root@sonic:/# ps -eaf
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 20:34 pts/0    00:00:00 /usr/bin/python3 /usr/local/bin/supervisord
root           9       1  0 20:34 pts/0    00:00:00 python3 /usr/bin/supervisor-proc-exit-listener --container-name telemetry
root          12       1  0 20:34 pts/0    00:00:00 /usr/sbin/rsyslogd -n -iNONE
root          18       1  1 20:34 pts/0    00:00:00 /usr/sbin/telemetry -logtostderr --noTLS --port 8080 --allow_no_client_auth -v=2
root          48       1  1 20:34 pts/0    00:00:00 /usr/sbin/dialout_client_cli -insecure -logtostderr -v 2
root          62       0  0 20:35 pts/1    00:00:00 /bin/bash
root          67      62  0 20:35 pts/1    00:00:00 ps -eaf

Next, an attempt to issue a gnmi set request to update mtu value failed with the same error - libyang[0]: Failed to find "autoneg" as a sibling to "sonic-port:ifname".

root@sonic:~# cat mtu.json
{"mtu": 9108}

root@sonic:~# gnmi_set -alsologtostderr -insecure -notls -target_addr 127.0.0.1:8080 -target_name sonic -update /openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu:@./mtu.json -xpath_target OC-YANG   
/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
@./mtu.json
== setRequest:
prefix: <
  target: "OC-YANG"
>
update: <
  path: <
    elem: <
      name: "openconfig-interfaces:interfaces"
    >
    elem: <
      name: "interface"
      key: <
        key: "name"
        value: "Ethernet11"
      >
    >
    elem: <
      name: "config"
    >
    elem: <
      name: "mtu"
    >
  >
  val: <
    json_ietf_val: "{\"mtu\": 9108}"
  >
>

F1011 20:40:52.009319      70 gnmi_set.go:190] Set failed: rpc error: code = Unknown desc = Translib Redis Error: CVL Failure: 1,001: { 1,001  []    with keys[] has field  with invalid value  Invalid value }

===============================
Oct 11 20:40:52.000032 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999526      18 server.go:383] Update path: path:{elem:{name:"openconfig-interfaces:interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"Ethernet11"}}  elem:{name:"config"}  elem:{name:"mtu"}}  val:{json_ietf_val:"{\"mtu\": 9108}"} 
Oct 11 20:40:52.000032 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999713      18 transl_utils.go:212] Incoming JSON body is{"mtu": 9108}
Oct 11 20:40:52.000032 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999738      18 translib.go:269] Update request received with path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:40:52.000200 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999752      18 translib.go:270] Update request received with payload ={"mtu": 9108}
Oct 11 20:40:52.000200 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999764      18 app_interface.go:129] getAppModule called for path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:40:52.000200 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999777      18 app_interface.go:136] found the entry in the map for path =/openconfig-interfaces:interfaces
Oct 11 20:40:52.000200 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:51.999796      18 app_interface.go:164] cast to appInterface worked&{<nil> [] <nil> <nil> <nil> [] <nil> <nil> map[] map[] {0 {map[]}} map[] <nil> <nil> <nil> <nil> <nil> <nil>}
Oct 11 20:40:52.000428 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.000174      18 request_binder.go:338] requestBinder: modified path is: elem:{name:"interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"Ethernet11"}}  elem:{name:"config"}
Oct 11 20:40:52.000779 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.000578      18 intf_app.go:111] initialize:if:path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:40:52.000882 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.000695      18 db.go:394] NewDB: Init indication not requested
Oct 11 20:40:52.000901 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.000708      18 intf_app.go:148] translateUpdate:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet11]}
Oct 11 20:40:52.001037 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.000757      18 intf_app.go:1077] Received UPDATE for path /openconfig-interfaces:interfaces/interface{}/config/mtu; vars=map[name:Ethernet11]
Oct 11 20:40:52.008180 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.007948      18 intf_app.go:516] Found 112 INTF table keys
Oct 11 20:40:52.008341 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.007996      18 intf_app.go:1084] uripath:=/openconfig-interfaces:interfaces/interface/config/mtu
Oct 11 20:40:52.008341 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008004      18 intf_app.go:1085] err:=<nil>
Oct 11 20:40:52.008341 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008011      18 intf_app.go:1088] len:=1
Oct 11 20:40:52.008412 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008019      18 intf_app.go:1090] Name:=Ethernet11
Oct 11 20:40:52.008412 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008108      18 intf_app.go:1107] mtu:= 9108
Oct 11 20:40:52.008412 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008120      18 intf_app.go:1117] Writing to db for Ethernet11
Oct 11 20:40:52.008445 sonic INFO telemetry#/supervisord: telemetry W1011 20:40:52.008137      18 db.go:1299] performWatch: Empty WatchKeys. Skipping WATCH
Oct 11 20:40:52.008445 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008143      18 intf_app.go:298] Calling processCommon()
Oct 11 20:40:52.008491 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008149      18 intf_app.go:1274] processCommon:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet11]}
Oct 11 20:40:52.008491 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008165      18 intf_app.go:1275] ProcessCommon: Target Type is uint16
Oct 11 20:40:52.008515 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008171      18 intf_app.go:1279] Updating entry for Ethernet11
Oct 11 20:40:52.008725 sonic INFO telemetry#/supervisord: telemetry libyang[0]: Failed to find "autoneg" as a sibling to "sonic-port:ifname".
Oct 11 20:40:52.008725 sonic INFO telemetry#/supervisord: telemetry E1011 20:40:52.008415      18 util.go:176] Failed to create leaf nodes, data = [0xc00054f4e0 0xc00054f520 0xc00054f560 0xc00054f5a0 0xc00054f5c0 0xc00054f5e0 0xc00054f600 0xc00054f620 0xc00054f640]
Oct 11 20:40:52.008725 sonic INFO telemetry#/supervisord: telemetry W1011 20:40:52.008431      18 db.go:650] doCVL: CVL Failure: 1001
Oct 11 20:40:52.008725 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008446      18 db.go:654] doCVL: 1 1
Oct 11 20:40:52.008725 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008456      18 db.go:1478] AbortTx: No SET|DEL done, txState: txStateWatch
Oct 11 20:40:52.008955 sonic INFO telemetry#/supervisord: telemetry I1011 20:40:52.008627      18 transl_utils.go:235] UPDATE operation failed with error =1, Translib Redis Error: CVL Failure: 1,001: { 1,001  []    with keys[] has field  with invalid value  Invalid value }

Just as an experiment, I removed "autoneg" attribute for Ethernet11 from the config_sb.json file, reloaded the config, and attempted to issue the gnmi set request again. The set request failed with the error - libyang[0]: Failed to find "fec" as a sibling to "sonic-port:ifname"

admin@sonic:~$ show interface status Ethernet11
  Interface    Lanes    Speed    MTU    FEC       Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  -------  -------  -----  -----  ----------  ------  ------  -------  ------  ----------
 Ethernet11       10      25G   9100     rs  Ethernet11  routed    down       up     N/A         N/A
 
root@sonic:~# gnmi_set -alsologtostderr -insecure -notls -target_addr 127.0.0.1:8080 -target_name sonic -update /openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu:@./mtu.json -xpath_target OC-YANG
/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
@./mtu.json
== setRequest:
prefix: <
  target: "OC-YANG"
>
update: <
  path: <
    elem: <
      name: "openconfig-interfaces:interfaces"
    >
    elem: <
      name: "interface"
      key: <
        key: "name"
        value: "Ethernet11"
      >
    >
    elem: <
      name: "config"
    >
    elem: <
      name: "mtu"
    >
  >
  val: <
    json_ietf_val: "{\"mtu\": 9108}"
  >
>

F1011 20:49:37.605226      67 gnmi_set.go:190] Set failed: rpc error: code = Unknown desc = Translib Redis Error: CVL Failure: 1,001: { 1,001  []    with keys[] has field  with invalid value  Invalid value }

================================
Oct 11 20:49:37.592969 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592344      18 server.go:383] Update path: path:{elem:{name:"openconfig-interfaces:interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"Ethernet11"}}  elem:{name:"config"}  elem:{name:"mtu"}}  val:{json_ietf_val:"{\"mtu\": 9108}"} 
Oct 11 20:49:37.593114 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592454      18 transl_utils.go:212] Incoming JSON body is{"mtu": 9108}
Oct 11 20:49:37.593114 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592466      18 translib.go:269] Update request received with path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:49:37.593114 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592471      18 translib.go:270] Update request received with payload ={"mtu": 9108}
Oct 11 20:49:37.593161 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592478      18 app_interface.go:129] getAppModule called for path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:49:37.593161 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592484      18 app_interface.go:136] found the entry in the map for path =/openconfig-interfaces:interfaces
Oct 11 20:49:37.593186 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592495      18 app_interface.go:164] cast to appInterface worked&{<nil> [] <nil> <nil> <nil> [] <nil> <nil> map[] map[] {0 {map[]}} map[] <nil> <nil> <nil> <nil> <nil> <nil>}
Oct 11 20:49:37.593461 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592693      18 request_binder.go:338] requestBinder: modified path is: elem:{name:"interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"Ethernet11"}}  elem:{name:"config"}
Oct 11 20:49:37.593461 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592890      18 intf_app.go:111] initialize:if:path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:49:37.593532 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592939      18 db.go:394] NewDB: Init indication not requested
Oct 11 20:49:37.593532 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592948      18 intf_app.go:148] translateUpdate:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet11]}
Oct 11 20:49:37.593532 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.592968      18 intf_app.go:1077] Received UPDATE for path /openconfig-interfaces:interfaces/interface{}/config/mtu; vars=map[name:Ethernet11]
Oct 11 20:49:37.603400 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603038      18 intf_app.go:516] Found 112 INTF table keys
Oct 11 20:49:37.603400 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603104      18 intf_app.go:1084] uripath:=/openconfig-interfaces:interfaces/interface/config/mtu
Oct 11 20:49:37.603768 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603115      18 intf_app.go:1085] err:=<nil>
Oct 11 20:49:37.603810 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603125      18 intf_app.go:1088] len:=1
Oct 11 20:49:37.603829 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603135      18 intf_app.go:1090] Name:=Ethernet11
Oct 11 20:49:37.603850 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603288      18 intf_app.go:1107] mtu:= 9108
Oct 11 20:49:37.603926 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603304      18 intf_app.go:1117] Writing to db for Ethernet11
Oct 11 20:49:37.603926 sonic INFO telemetry#/supervisord: telemetry W1011 20:49:37.603328      18 db.go:1299] performWatch: Empty WatchKeys. Skipping WATCH
Oct 11 20:49:37.603926 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603336      18 intf_app.go:298] Calling processCommon()
Oct 11 20:49:37.603926 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603346      18 intf_app.go:1274] processCommon:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet11]}
Oct 11 20:49:37.603926 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603368      18 intf_app.go:1275] ProcessCommon: Target Type is uint16
Oct 11 20:49:37.603972 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603381      18 intf_app.go:1279] Updating entry for Ethernet11
Oct 11 20:49:37.604244 sonic INFO telemetry#/supervisord: telemetry libyang[0]: Failed to find "fec" as a sibling to "sonic-port:ifname".
Oct 11 20:49:37.604244 sonic INFO telemetry#/supervisord: telemetry E1011 20:49:37.603751      18 util.go:176] Failed to create leaf nodes, data = [0xc0004974e0 0xc000497500 0xc000497520 0xc000497580 0xc0004975c0 0xc0004975e0 0xc000497600 0xc000497640]
Oct 11 20:49:37.604270 sonic INFO telemetry#/supervisord: telemetry W1011 20:49:37.603772      18 db.go:650] doCVL: CVL Failure: 1001
Oct 11 20:49:37.604287 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603790      18 db.go:654] doCVL: 1 1
Oct 11 20:49:37.604287 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.603811      18 db.go:1478] AbortTx: No SET|DEL done, txState: txStateWatch
Oct 11 20:49:37.604711 sonic INFO telemetry#/supervisord: telemetry I1011 20:49:37.604045      18 transl_utils.go:235] UPDATE operation failed with error =1, Translib Redis Error: CVL Failure: 1,001: { 1,001  []    with keys[] has field  with invalid value  Invalid value }

Then I removed, "fec" parameter for Ethernet11, reloaded the config, and issue the set request again. This time the set request succeeded.

admin@sonic:~$ show interface status Ethernet11
  Interface    Lanes    Speed    MTU    FEC       Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  -------  -------  -----  -----  ----------  ------  ------  -------  ------  ----------
 Ethernet11       10      25G   9100    N/A  Ethernet11  routed    down       up     N/A         N/A

root@sonic:~# gnmi_set -alsologtostderr -insecure -notls -target_addr 127.0.0.1:8080 -target_name sonic -update /openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu:@./mtu.json -xpath_target OC-YANG
/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
@./mtu.json
== setRequest:
prefix: <
  target: "OC-YANG"
>
update: <
  path: <
    elem: <
      name: "openconfig-interfaces:interfaces"
    >
    elem: <
      name: "interface"
      key: <
        key: "name"
        value: "Ethernet11"
      >
    >
    elem: <
      name: "config"
    >
    elem: <
      name: "mtu"
    >
  >
  val: <
    json_ietf_val: "{\"mtu\": 9108}"
  >
>

== setResponse:
prefix: <
  target: "OC-YANG"
>
response: <
  path: <
    elem: <
      name: "openconfig-interfaces:interfaces"
    >
    elem: <
      name: "interface"
      key: <
        key: "name"
        value: "Ethernet11"
      >
    >
    elem: <
      name: "config"
    >
    elem: <
      name: "mtu"
    >
  >
  op: UPDATE
>

admin@sonic:~$ show interface status Ethernet11
  Interface    Lanes    Speed    MTU    FEC       Alias    Vlan    Oper    Admin    Type    Asym PFC
-----------  -------  -------  -----  -----  ----------  ------  ------  -------  ------  ----------
 Ethernet11       10      25G   9108    N/A  Ethernet11  routed    down       up     N/A         N/A

================================

Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113288      19 server.go:383] Update path: path:{elem:{name:"openconfig-interfaces:interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"Ethernet11"}}  elem:{name:"config"}  elem:{name:"mtu"}}  val:{json_ietf_val:"{\"mtu\": 9108}"} 
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113448      19 transl_utils.go:212] Incoming JSON body is{"mtu": 9108}
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113464      19 translib.go:269] Update request received with path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113472      19 translib.go:270] Update request received with payload ={"mtu": 9108}
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113481      19 app_interface.go:129] getAppModule called for path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113503      19 app_interface.go:136] found the entry in the map for path =/openconfig-interfaces:interfaces
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113518      19 app_interface.go:164] cast to appInterface worked&{<nil> [] <nil> <nil> <nil> [] <nil> <nil> map[] map[] {0 {map[]}} map[] <nil> <nil> <nil> <nil> <nil> <nil>}
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.113843      19 request_binder.go:338] requestBinder: modified path is: elem:{name:"interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"Ethernet11"}}  elem:{name:"config"}
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.114163      19 intf_app.go:111] initialize:if:path =/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.114233      19 db.go:394] NewDB: Init indication not requested
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.114244      19 intf_app.go:148] translateUpdate:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet11]}
Oct 11 20:55:44.117293 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.114294      19 intf_app.go:1077] Received UPDATE for path /openconfig-interfaces:interfaces/interface{}/config/mtu; vars=map[name:Ethernet11]
Oct 11 20:55:44.122024 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121791      19 intf_app.go:516] Found 112 INTF table keys
Oct 11 20:55:44.122024 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121841      19 intf_app.go:1084] uripath:=/openconfig-interfaces:interfaces/interface/config/mtu
Oct 11 20:55:44.122024 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121848      19 intf_app.go:1085] err:=<nil>
Oct 11 20:55:44.122209 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121854      19 intf_app.go:1088] len:=1
Oct 11 20:55:44.122209 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121861      19 intf_app.go:1090] Name:=Ethernet11
Oct 11 20:55:44.122209 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121935      19 intf_app.go:1107] mtu:= 9108
Oct 11 20:55:44.122209 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121945      19 intf_app.go:1117] Writing to db for Ethernet11
Oct 11 20:55:44.122209 sonic INFO telemetry#/supervisord: telemetry W1011 20:55:44.121964      19 db.go:1299] performWatch: Empty WatchKeys. Skipping WATCH
Oct 11 20:55:44.122235 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121969      19 intf_app.go:298] Calling processCommon()
Oct 11 20:55:44.122235 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121973      19 intf_app.go:1274] processCommon:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet11]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet11]}
Oct 11 20:55:44.122281 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121993      19 intf_app.go:1275] ProcessCommon: Target Type is uint16
Oct 11 20:55:44.122281 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.121998      19 intf_app.go:1279] Updating entry for Ethernet11
Oct 11 20:55:44.122793 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.122644      19 db.go:686] doWrite: Change to txStateSet, txState: txStateWatch
Oct 11 20:55:44.122793 sonic INFO telemetry#/supervisord: telemetry I1011 20:55:44.122675      19 db.go:750] doWrite: op: 1  PORT|Ethernet11 : 

Any advice on how to further debug or fix this issue would be really helpful.

Thanks,
Prashanth

Unit test for GNOI is disabled

TestGNOI can't pass unit test. I have to skip this case to support unit test for PR.

I tried to enable READ_WRITE_MODE for unit test, test case for SystemTime can pass, but SonicShowTechsupport and SonicCopyConfig still does not work.
I think we need to fix the test cases for SonicShowTechsupport and SonicCopyConfig, and these test cases are introduced by management framework.

Updated installation instructions?

I'm trying to install following the directions in the README but get this message:

go get github.com/Azure/sonic-telemetry/telemetry: no matching versions for query "upgrade"

Is there a different process I should be following?

help: I couldn't find a suitable libyang version for compile

From README.md, we can see the follow description:
README.md
Install latest version of pyang tool.
Install libyang from https://github.com/CESNET/libyang along with its dependency.

But Unfortunately, I compile sonic-gnmi (https://github.com/sonic-net/sonic-gnmi) failed.

From the https://github.com/CESNET/libyang, we can see many version:
image

######################

  1. I try libyang Version 2.0.231
    ① install libyang
    ubuntu@VM-40-95-ubuntu:/sonic-community/libyang-2.0.231 $ mkdir build; cd build
    mkdir: cannot create directory ‘build’: File exists
    ubuntu@VM-40-95-ubuntu:/sonic-community/libyang-2.0.231/build $ cmake ..
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/ubuntu/sonic-community/libyang-2.0.231/build
    ubuntu@VM-40-95-ubuntu:/sonic-community/libyang-2.0.231/build $ make
    [ 31%] Built target yangobj
    .......
    [100%] Built target yangre
    ubuntu@VM-40-95-ubuntu:/sonic-community/libyang-2.0.231/build $ sudo make install
    [ 31%] Built target yangobj
    .......
    [100%] Built target yangre
    Install the project...
    -- Install configuration: "Debug"
    -- Up-to-date: /usr/local/share/yang/modules/libyang
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/share/yang/modules/libyang/[email protected]
    -- Up-to-date: /usr/local/lib/libyang.so.2.22.4
    -- Up-to-date: /usr/local/lib/libyang.so.2
    -- Installing: /usr/local/lib/libyang.so
    -- Installing: /usr/local/include/libyang/context.h
    -- Installing: /usr/local/include/libyang/dict.h
    -- Installing: /usr/local/include/libyang/in.h
    -- Installing: /usr/local/include/libyang/libyang.h
    -- Installing: /usr/local/include/libyang/log.h
    -- Installing: /usr/local/include/libyang/out.h
    -- Installing: /usr/local/include/libyang/parser_data.h
    -- Installing: /usr/local/include/libyang/parser_schema.h
    -- Installing: /usr/local/include/libyang/plugins.h
    -- Installing: /usr/local/include/libyang/plugins_exts.h
    -- Installing: /usr/local/include/libyang/plugins_exts_compile.h
    -- Installing: /usr/local/include/libyang/plugins_exts_print.h
    -- Installing: /usr/local/include/libyang/plugins_types.h
    -- Installing: /usr/local/include/libyang/printer_data.h
    -- Installing: /usr/local/include/libyang/printer_schema.h
    -- Installing: /usr/local/include/libyang/set.h
    -- Installing: /usr/local/include/libyang/tree.h
    -- Installing: /usr/local/include/libyang/tree_data.h
    -- Installing: /usr/local/include/libyang/tree_edit.h
    -- Installing: /usr/local/include/libyang/tree_schema.h
    -- Installing: /usr/local/include/libyang/version.h
    -- Installing: /usr/local/include/libyang/config.h
    -- Installing: /usr/local/lib/pkgconfig/libyang.pc
    -- Installing: /usr/local/bin/yanglint
    -- Set runtime path of "/usr/local/bin/yanglint" to ""
    -- Installing: /usr/local/share/man/man1/yanglint.1
    -- Installing: /usr/local/bin/yangre
    -- Set runtime path of "/usr/local/bin/yangre" to ""
    -- Installing: /usr/local/share/man/man1/yangre.1
    ② complie sonic-gnmi, it failed
    ubuntu@VM-40-95-ubuntu:~/sonic-community/sonic-gnmi (master)$ dpkg-buildpackage -rfakeroot -b -us -uc
    ......
    ome/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:93: undefined reference to lyd_new_leaf' /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:109: undefined reference to lyd_validate_value'
    /tmp/go-link-1722060546/000028.o: In function lyd_node_leafref_match_in_union': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:174: undefined reference to lyd_validate_value'
    /tmp/go-link-1722060546/000028.o: In function _cgo_b9cfa1c2d0dc_Cmacro_ly_errno': /tmp/go-build/cgo-gcc-prolog:115: undefined reference to ly_errno_glob_address'
    /tmp/go-link-1722060546/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_ly_verb': /tmp/go-build/cgo-gcc-prolog:135: undefined reference to ly_verb'
    /tmp/go-link-1722060546/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_merge_to_ctx': /tmp/go-build/cgo-gcc-prolog:231: undefined reference to lyd_merge_to_ctx'
    /tmp/go-link-1722060546/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_new': /tmp/go-build/cgo-gcc-prolog:274: undefined reference to lyd_new'
    /tmp/go-link-1722060546/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_new_leaf': /tmp/go-build/cgo-gcc-prolog:295: undefined reference to lyd_new_leaf'
    /tmp/go-link-1722060546/000028.o: In function lyd_parse_data_path': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:46: undefined reference to lyd_parse_path'
    /tmp/go-link-1722060546/000028.o: In function lyd_parse_data_mem': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:51: undefined reference to lyd_parse_mem'
    /tmp/go-link-1722060546/000028.o: In function lyd_data_validate': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:66: undefined reference to lyd_validate'
    /tmp/go-link-1722060546/000028.o: In function lyd_change_leaf_data': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:193: undefined reference to lyd_change_leaf'
    /tmp/go-link-1722060546/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_free_withsiblings': /tmp/go-build/cgo-gcc-prolog:211: undefined reference to lyd_free_withsiblings'
    /tmp/go-link-1722060546/000030.o: In function ly_set_log_callback': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/util/util.go:37: undefined reference to ly_verb'
    /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/util/util.go:35: undefined reference to `ly_verb'
    collect2: error: ld returned 1 exit status

######################
2. I try libyang-2.0.194, it failed to compile sonic-gnmi too.
buntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:93: undefined reference to lyd_new_leaf' /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:109: undefined reference to lyd_validate_value'
/tmp/go-link-3776435132/000028.o: In function lyd_node_leafref_match_in_union': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:174: undefined reference to lyd_validate_value'
/tmp/go-link-3776435132/000028.o: In function _cgo_b9cfa1c2d0dc_Cmacro_ly_errno': /tmp/go-build/cgo-gcc-prolog:115: undefined reference to ly_errno_glob_address'
/tmp/go-link-3776435132/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_ly_verb': /tmp/go-build/cgo-gcc-prolog:135: undefined reference to ly_verb'
/tmp/go-link-3776435132/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_merge_to_ctx': /tmp/go-build/cgo-gcc-prolog:231: undefined reference to lyd_merge_to_ctx'
/tmp/go-link-3776435132/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_new': /tmp/go-build/cgo-gcc-prolog:274: undefined reference to lyd_new'
/tmp/go-link-3776435132/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_new_leaf': /tmp/go-build/cgo-gcc-prolog:295: undefined reference to lyd_new_leaf'
/tmp/go-link-3776435132/000028.o: In function lyd_parse_data_path': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:46: undefined reference to lyd_parse_path'
/tmp/go-link-3776435132/000028.o: In function lyd_parse_data_mem': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:51: undefined reference to lyd_parse_mem'
/tmp/go-link-3776435132/000028.o: In function lyd_data_validate': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:66: undefined reference to lyd_validate'
/tmp/go-link-3776435132/000028.o: In function lyd_change_leaf_data': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/yparser/yparser.go:193: undefined reference to lyd_change_leaf'
/tmp/go-link-3776435132/000028.o: In function _cgo_b9cfa1c2d0dc_Cfunc_lyd_free_withsiblings': /tmp/go-build/cgo-gcc-prolog:211: undefined reference to lyd_free_withsiblings'
/tmp/go-link-3776435132/000030.o: In function ly_set_log_callback': /home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/util/util.go:37: undefined reference to ly_verb'
/home/ubuntu/sonic-community/sonic-gnmi/vendor/github.com/Azure/sonic-mgmt-common/cvl/internal/util/util.go:35: undefined reference to `ly_verb'

######################
3. I try libyang-1.0.225 it failed to compile sonic-gnmi too.

dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libyang.so.1 (used by debian/sonic-gnmi/usr/sbin/dialout_client_cli)
Hint: check if the library actually comes from a package.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/sonic-gnmi.substvars debian/sonic-gnmi/usr/sbin/gnmi_cli debian/sonic-gnmi/usr/sbin/gnmi_get debian/sonic-gnmi/usr/sbin/gnmi_set debian/sonic-gnmi/usr/sbin/gnoi_client debian/sonic-gnmi/usr/sbin/dialout_client_cli returned exit code 255
dh_shlibdeps: Aborting due to earlier error
debian/rules:7: recipe for target 'binary' failed
make: *** [binary] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
ubuntu@VM-40-95-ubuntu:~/sonic-community/sonic-gnmi (master)$ ls -l /usr/local/lib/libyang.so.1
lrwxrwxrwx 1 root root 18 Nov 8 21:15 /usr/local/lib/libyang.so.1 -> libyang.so.1.10.17

######################
I don't know how to install libyang for sonic-gnmi

Gnmi get cause Redis to stop working

Hey,
I'm using the go "gnmi_get.go" of Jipan Yang to retrieve data from Redis.
(Other clients aren't working, even his Python client)
In the scenario of repeated requests after a while I get "ERR max number of clients reached".
In this situation I will also get the error from the redis-cli inside Sonic.

I would really appreciate any help with solving this.

Thankfully,

Jonathan

Restconf Authorization Failed when trying to POST, PUT, PATCH, DELETE

Description:

Authorization Error in SONIC Restconf while trying to POST, PUT, PATCH, DELETE with user in admin group.
To do GET there is no need of admin permissions but for POST, PUT, PATCH, DELETE user must be in admin group.
But with current code admin group user also getting Not an admin Error.

Steps to reproduce the issue:

  1. In swagger ui or curl and try POST/PUT/PATCH/DELETE with default user.
  2. Create new user add that user in admin group and try with that user.
    E.g.,
    To Try with default user,
    curl -X POST https://192.168.86.43/restconf/data/openconfig-system:system/ntp -H "accept: application/yang-data+json" --user admin:admin123 -H "Content-Type: application/yang-data+json" -d "{ "openconfig-system:servers": { "server": [ { "address": "1.1.1.1", "config": { "address": "1.1.1.1" } } ] }}" -v -k
    To Try with new user,
    Create user test - sudo useradd test
    Set password - sudo passwd test
    Add to admin group - sudo usermod -a -G admin test
    curl -X POST https://192.168.86.43/restconf/data/openconfig-system:system/ntp -H "accept: application/yang-data+json" --user test:admin123 -H "Content-Type: application/yang-data+json" -d "{ "openconfig-system:servers": { "server": [ { "address": "1.1.1.1", "config": { "address": "1.1.1.1" } } ] }}" -v -k
    (If needed) Delete from admin group - sudo deluser test admin

Describe the results you received:

Unable to do any POST, PUT, PATCH, DELETE.
"ietf-restconf:errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "access-denied",
"error-message": "Not an admin user"
}
]
}

Logs:
Jan 11 12:44:19.310522 sonic INFO mgmt-framework#/supervisord: rest-server I1218 12:44:19.307388 2171 pamAuth.go:107] [REST-3] Received user=admin
Jan 11 12:44:20.008721 sonic INFO mgmt-framework#/supervisord: rest-server I1218 12:44:20.006653 2171 pamAuth.go:135] [REST-3] Authentication passed. user=admin
Jan 11 12:44:20.014797 sonic INFO mgmt-framework#/supervisord: rest-server I1218 12:44:20.010018 2171 pamAuth.go:74] IsAdminGroup username = admin
Jan 11 12:44:20.015757 sonic INFO mgmt-framework#/supervisord: rest-server I1218 12:44:20.010572 2171 pamAuth.go:76] IsAdminGroup err = user: unknown user admin
Jan 11 12:44:20.015757 sonic INFO mgmt-framework#/supervisord: rest-server I1218 12:44:20.010668 2171 pamAuth.go:78] IsAdminGroup 1st IF Check
Jan 11 12:44:20.015757 sonic INFO mgmt-framework#/supervisord: rest-server W1218 12:44:20.010697 2171 pamAuth.go:139] [REST-3] Not an admin; cannot allow POST
Describe the results you expected:
POST, PUT, PATCH, DELETE should work fine.

Reason for the issue:

https://github.com/sonic-net/sonic-mgmt-framework/blob/master/rest/server/pamAuth.go file contains IsAdminGroup Function.
func IsAdminGroup(username string) bool {
usr, err := user.Lookup(username)
if err != nil {
return false
}
gids, err := usr.GroupIds()
if err != nil {
return false
}
glog.V(2).Infof("User:%s, groups=%s", username, gids)
admin, err := user.Lookup("admin")
if err != nil {
return false
}
for _, x := range gids {
if x == admin.Gid {
return true
}
}
return false
}
In which they are checking if the user present in /etc/passwd.
This is the Lookup function that used in isAdminGroup function - https://cs.opensource.google/go/go/+/refs/tags/go1.21.5:src/os/user/lookup.go;l=39
// Lookup looks up a user by username. If the user cannot be found, the
// returned error is of type UnknownUserError.
func Lookup(username string) (*User, error) {
if u, err := Current(); err == nil && u.Username == username {
return u, err
}
return lookupUser(username)
}

const (
userFile = "/etc/passwd"
groupFile = "/etc/group"
)

func lookupUser(username string) (*User, error) {
f, err := os.Open(userFile)
if err != nil {
return nil, err
}
defer f.Close()
return findUsername(username, f)
}
Rest server running in docker-sonic-mgmt-framework. Docker and Host having separate /etc/passwd. When checking by adding logs we found that user is not available inside Docker’s /etc/passwd, it’s available only on Host’s /etc/passwd.
But in this Authorization code they are using Docker's /etc/passwd file to validation, Because of that for valid user also getting "Not an admin user" error for POST, PUT, PATCH, DELETE.

Solution we have tried:

We have tried by taking dockers/docker-sonic-mgmt-framework/Dockerfile.j2 from sonic-net/sonic-buildimage#6148 , which is working.
But it’s not available in Master as the changes are reverted in sonic-net/sonic-buildimage#9375
There is already SSH dial is added for Authentication in PAMAuthenAndAuthor function.
We have used same session and running ‘id -Gn’ command to check whether the user is from admin group because POST, PUT, PATCH, DELETE should be allowed only for users in admin group.

Fresh installation of dial-in and dial-out clients is broken due to lack of translib

Using the installation methods in the Readme causes "go get" to fail because translib can't be found.

sagoodma@str-samg-01:~$ sudo go get -u github.com/Azure/sonic-telemetry/dialout/dialout_client_cli
package github.com/Azure/sonic-telemetry/translib: cannot find package "github.com/Azure/sonic-telemetry/translib" in any of:
        /usr/lib/go-1.14/src/github.com/Azure/sonic-telemetry/translib (from $GOROOT)
        /home/sagoodma/go/src/github.com/Azure/sonic-telemetry/translib (from $GOPATH)
sagoodma@str-samg-01:~$ sudo go get -u github.com/Azure/sonic-telemetry/telemetry
package github.com/Azure/sonic-telemetry/translib: cannot find package "github.com/Azure/sonic-telemetry/translib" in any of:
        /usr/lib/go-1.14/src/github.com/Azure/sonic-telemetry/translib (from $GOROOT)
        /home/sagoodma/go/src/github.com/Azure/sonic-telemetry/translib (from $GOPATH)

Another user with the same issue: sonic-net/sonic-buildimage#3976

This is with a fresh go install running the latest 1.14 version on a brand new Ubuntu VM.

sagoodma@str-samg-01:~$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/bin"
GOCACHE="/home/sagoodma/.cache/go-build"
GOENV="/home/sagoodma/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/sagoodma/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.14"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.14/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build680622005=/tmp/go-build -gno-record-gcc-switches"

GNMI has no authentication enforced for telemetry container

When I'm trying to use 'gnmic get' to pull the telemetry data, any passwords can be accepted. This would be security issue for this when deploying the service. Please check, thanks!

Below is the output from the server to do the 'gnmic get',

gnmic   -a  x.x.x.x:8080  --insecure get  --path /openconfig-interfaces:interfaces/interface[name=Ethernet0]/state/counters --target OC-YANG --username admin
password: <any passwords>
[
  {
    "timestamp": 1687156144574200730,
    "time": "2023-06-19T02:29:04.57420073-04:00",
    "target": "OC-YANG",
    "updates": [
      {
        "Path": "openconfig-interfaces:interfaces/interface[name=Ethernet0]/state/counters",
        "values": {
          "openconfig-interfaces:interfaces/interface/state/counters": {
            "openconfig-interfaces:counters": {
              "in-broadcast-pkts": "52",
              "in-discards": "26128",
              "in-errors": "0",
              "in-multicast-pkts": "26128",
              "in-octets": "14135546",
              "in-pkts": "40611",
              "in-unicast-pkts": "14431",
              "out-broadcast-pkts": "64353",
              "out-discards": "6",
              "out-errors": "0",
              "out-multicast-pkts": "152685",
              "out-octets": "29935321",
              "out-pkts": "221167",
              "out-unicast-pkts": "4129"
            }
          }
        }
      }
    ]
  }
]

There is no parameter "-xpath_target" for gnmi_set

Hi all

I try to test gnmi_set according to https://github.com/Azure/sonic-telemetry/blob/master/doc/gNMI_usage_examples.md

gnmi_set -insecure -username admin -password sonicadmin -update /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config/mtu:@./mtu.json -target_addr localhost:8080 -xpath_target OC-YANG

Actually there is no parameter "-xpath_target" for gnmi_set. And I failed to set mtu.

Can anyone give me some advice?

What's the roadmap of sonic-telemetry

Hi folks,

sonic-telemetry hasn't been updated since Mar 25. Telemetry is a very important feature. So I wanna known:

  • What's the roadmap of sonic-telemetry?
  • Will sonic-telemetry support more features other than CPU/MEM/Counter?
  • Will sonic-telemetry support a simple front-end to display data in browser?

COUNTERS_DB numeric counters are treated as string_val

SONiC's gNMI telemetry treats numerical data in COUNTERS_DB as string_val, but shouldn't it be treated as int_val?
SONiC's Redis may treat the number as a String type, but shouldn't the gNMI target treat it as an int_val and return it to the gNMI client?

This is why I am facing problems with interoperability with gNMI client (gnmi-gateway).

Can I create ip address by gnmi set?

Hi Sirs,

I can get IP address from CONFIG_DB/INTERFACE.

root@sonic:/# gnmi_get -insecure -target_addr 127.0.0.1:50051 \
 -xpath /sonic-db:CONFIG_DB/INTERFACE
== getRequest:
prefix: <
>
path: <
  origin: "sonic-db"
  elem: <
    name: "CONFIG_DB"
  >
  elem: <
    name: "INTERFACE"
  >
>
encoding: JSON_IETF

== getResponse:
notification: <
  timestamp: 1698638295759206190
  prefix: <
  >
  update: <
    path: <
      origin: "sonic-db"
      elem: <
        name: "CONFIG_DB"
      >
      elem: <
        name: "INTERFACE"
      >
    >
    val: <
      json_ietf_val: "{\"Ethernet0\":{\"NULL\":\"NULL\"},\"Ethernet0|1.1.2.1/24\":{\"\":\"\",\"NULL\":\"NULL\"},\"Ethernet0|1.1.3.1/24\":{\"NULL\":\"NULL\"},\"Ethernet0|10.0.0.0/31\":{\"NULL\":\"NULL\"},\"Ethernet1\":{\"NULL\":\"NULL\"},\"Ethernet10\":{\"NULL\":\"NULL\"},\"Ethernet10|10.0.0.20/31\":{\"NULL\":\"NULL\"},\"Ethernet11\":{\"NULL\":\"NULL\"},\"Ethernet11|10.0.0.22/31\":{\"NULL\":\"NULL\"},\"Ethernet12\":{\"NULL\":\"NULL\"},\"Ethernet12|10.0.0.24/31\":{\"NULL\":\"NULL\"},\"Ethernet13\":{\"NULL\":\"NULL\"},\"Ethernet13|10.0.0.26/31\":{\"NULL\":\"NULL\"},\"Ethernet14\":{\"NULL\":\"NULL\"},\"Ethernet14|10.0.0.28/31\":{\"NULL\":\"NULL\"},\"Ethernet15\":{\"NULL\":\"NULL\"},\"Ethernet15|10.0.0.30/31\":{\"NULL\":\"NULL\"},\"Ethernet16\":{\"NULL\":\"NULL\"},\"Ethernet16|10.0.0.32/31\":{\"NULL\":\"NULL\"},\"Ethernet17\":{\"NULL\":\"NULL\"},\"Ethernet17|10.0.0.34/31\":{\"NULL\":\"NULL\"},\"Ethernet18\":{\"NULL\":\"NULL\"},\"Ethernet18|10.0.0.36/31\":{\"NULL\":\"NULL\"},\"Ethernet19\":{\"NULL\":\"NULL\"},\"Ethernet19|10.0.0.38/31\":{\"NULL\":\"NULL\"},\"Ethernet1|10.0.0.2/31\":{\"NULL\":\"NULL\"},\"Ethernet2\":{\"NULL\":\"NULL\"},\"Ethernet20\":{\"NULL\":\"NULL\"},\"Ethernet20|10.0.0.40/31\":{\"NULL\":\"NULL\"},\"Ethernet21\":{\"NULL\":\"NULL\"},\"Ethernet21|10.0.0.42/31\":{\"NULL\":\"NULL\"},\"Ethernet22\":{\"NULL\":\"NULL\"},\"Ethernet22|10.0.0.44/31\":{\"NULL\":\"NULL\"},\"Ethernet23\":{\"NULL\":\"NULL\"},\"Ethernet23|10.0.0.46/31\":{\"NULL\":\"NULL\"},\"Ethernet24\":{\"NULL\":\"NULL\"},\"Ethernet24|10.0.0.48/31\":{\"NULL\":\"NULL\"},\"Ethernet25\":{\"NULL\":\"NULL\"},\"Ethernet25|10.0.0.50/31\":{\"NULL\":\"NULL\"},\"Ethernet26\":{\"NULL\":\"NULL\"},\"Ethernet26|10.0.0.52/31\":{\"NULL\":\"NULL\"},\"Ethernet27\":{\"NULL\":\"NULL\"},\"Ethernet27|10.0.0.54/31\":{\"NULL\":\"NULL\"},\"Ethernet28\":{\"NULL\":\"NULL\"},\"Ethernet28|10.0.0.56/31\":{\"NULL\":\"NULL\"},\"Ethernet29\":{\"NULL\":\"NULL\"},\"Ethernet29|10.0.0.58/31\":{\"NULL\":\"NULL\"},\"Ethernet2|10.0.0.4/31\":{\"NULL\":\"NULL\"},\"Ethernet3\":{\"NULL\":\"NULL\"},\"Ethernet30\":{\"NULL\":\"NULL\"},\"Ethernet30|10.0.0.60/31\":{\"NULL\":\"NULL\"},\"Ethernet31\":{\"NULL\":\"NULL\"},\"Ethernet31|10.0.0.62/31\":{\"NULL\":\"NULL\"},\"Ethernet32\":{\"NULL\":\"NULL\"},\"Ethernet32|10.0.0.64/31\":{\"NULL\":\"NULL\"},\"Ethernet33\":{\"NULL\":\"NULL\"},\"Ethernet33|10.0.0.66/31\":{\"NULL\":\"NULL\"},\"Ethernet34\":{\"NULL\":\"NULL\"},\"Ethernet34|10.0.0.68/31\":{\"NULL\":\"NULL\"},\"Ethernet35\":{\"NULL\":\"NULL\"},\"Ethernet35|10.0.0.70/31\":{\"NULL\":\"NULL\"},\"Ethernet36\":{\"NULL\":\"NULL\"},\"Ethernet36|10.0.0.72/31\":{\"NULL\":\"NULL\"},\"Ethernet37\":{\"NULL\":\"NULL\"},\"Ethernet37|10.0.0.74/31\":{\"NULL\":\"NULL\"},\"Ethernet38\":{\"NULL\":\"NULL\"},\"Ethernet38|10.0.0.76/31\":{\"NULL\":\"NULL\"},\"Ethernet39\":{\"NULL\":\"NULL\"},\"Ethernet39|10.0.0.78/31\":{\"NULL\":\"NULL\"},\"Ethernet3|10.0.0.6/31\":{\"NULL\":\"NULL\"},\"Ethernet4\":{\"NULL\":\"NULL\"},\"Ethernet40\":{\"NULL\":\"NULL\"},\"Ethernet40|10.0.0.80/31\":{\"NULL\":\"NULL\"},\"Ethernet41\":{\"NULL\":\"NULL\"},\"Ethernet41|10.0.0.82/31\":{\"NULL\":\"NULL\"},\"Ethernet42\":{\"NULL\":\"NULL\"},\"Ethernet42|10.0.0.84/31\":{\"NULL\":\"NULL\"},\"Ethernet43\":{\"NULL\":\"NULL\"},\"Ethernet43|10.0.0.86/31\":{\"NULL\":\"NULL\"},\"Ethernet44\":{\"NULL\":\"NULL\"},\"Ethernet44|10.0.0.88/31\":{\"NULL\":\"NULL\"},\"Ethernet45\":{\"NULL\":\"NULL\"},\"Ethernet45|10.0.0.90/31\":{\"NULL\":\"NULL\"},\"Ethernet46\":{\"NULL\":\"NULL\"},\"Ethernet46|10.0.0.92/31\":{\"NULL\":\"NULL\"},\"Ethernet47\":{\"NULL\":\"NULL\"},\"Ethernet47|10.0.0.94/31\":{\"NULL\":\"NULL\"},\"Ethernet48\":{\"NULL\":\"NULL\"},\"Ethernet48|10.0.0.96/31\":{\"NULL\":\"NULL\"},\"Ethernet49\":{\"NULL\":\"NULL\"},\"Ethernet49|10.0.0.98/31\":{\"NULL\":\"NULL\"},\"Ethernet4|10.0.0.8/31\":{\"NULL\":\"NULL\"},\"Ethernet5\":{\"NULL\":\"NULL\"},\"Ethernet50\":{\"NULL\":\"NULL\"},\"Ethernet50|10.0.0.100/31\":{\"NULL\":\"NULL\"},\"Ethernet51\":{\"NULL\":\"NULL\"},\"Ethernet51|10.0.0.102/31\":{\"NULL\":\"NULL\"},\"Ethernet52\":{\"NULL\":\"NULL\"},\"Ethernet52|10.0.0.104/31\":{\"NULL\":\"NULL\"},\"Ethernet53\":{\"NULL\":\"NULL\"},\"Ethernet53|10.0.0.106/31\":{\"NULL\":\"NULL\"},\"Ethernet54\":{\"NULL\":\"NULL\"},\"Ethernet54|10.0.0.108/31\":{\"NULL\":\"NULL\"},\"Ethernet55\":{\"NULL\":\"NULL\"},\"Ethernet55|10.0.0.110/31\":{\"NULL\":\"NULL\"},\"Ethernet5|10.0.0.10/31\":{\"NULL\":\"NULL\"},\"Ethernet6\":{\"NULL\":\"NULL\"},\"Ethernet6|10.0.0.12/31\":{\"NULL\":\"NULL\"},\"Ethernet7\":{\"NULL\":\"NULL\"},\"Ethernet7|10.0.0.14/31\":{\"NULL\":\"NULL\"},\"Ethernet8\":{\"NULL\":\"NULL\"},\"Ethernet8|10.0.0.16/31\":{\"NULL\":\"NULL\"},\"Ethernet9\":{\"NULL\":\"NULL\"},\"Ethernet9|10.0.0.18/31\":{\"NULL\":\"NULL\"}}"
    >
  >
>

Can I create a new IP address into CONFIG_DB/INTERFACE?
For example: Ethernet0|2.2.2.2/24

gnmi_set -insecure -target_addr 127.0.0.1:50051 \
 -update /sonic-db:CONFIG_DB/INTERFACE:@./2.2.2.2.txt

Thanks.

support for Red hat Linux

Hi,
How to compile this on Red Hat Enterprise Linux Server.

Also am able to run dialout_server_cli but its listening on localhost but i could not see any option to run an any specific IP.dialout_server_cli -help
Usage of dialout_server_cli:
-allow_no_client_auth
When set, telemetry server will request but not require a client certificate.
-alsologtostderr
log to standard error as well as files
-ca_crt string
CA certificate for client certificate validation. Optional.
-insecure
Skip providing TLS cert and key, for testing only!
-log_backtrace_at value
when logging hits line file:N, emit a stack trace
-log_dir string
If non-empty, write log files in this directory
-logtostderr
log to standard error instead of files
-port int
port to listen on (default -1)
-server_crt string
TLS server certificate
-server_key string
TLS server private key
-stderrthreshold value
logs at or above this threshold go to stderr
-v value
log level for V logs
-vmodule value
comma-separated list of pattern=N settings for file-filtered logging

Is any way to run this binary with specific IP ?

CLI execution failed when enable authentication mode on REST server

Description

Steps to reproduce the issue:

  1. Enable basic authentication mode in REST server by adding option dockers/docker-sonic-mgmt-framework/rest-server.sh
    Change
    from:
    REST_SERVER_ARGS="-ui /rest_ui -logtostderr"
    to
    REST_SERVER_ARGS="-ui /rest_ui -logtostderr -client_auth user"
  2. Restart REST server
  3. Configure VLAN
    admin@sonic:~$ sonic-cli
    sonic# configure terminal
    sonic(config)# vlan 4
    sonic(config-vlan-4)# admin-state enable
    Exception when calling ->put_ale_vlan_ale_vlan_vlan_vlan_list_admin_status : (401)
    Reason: Unauthorized
    HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Content-Type, Content-Length, Accept-Encod)
    HTTP response body: {"ietf-restconf:errors":{"error":[{"error-type":"protocol","error-tag":"access-denied"}]}}

Describe the results you received:

admin@sonic:~$ sonic-cli
sonic# configure terminal
sonic(config)# vlan 4
sonic(config-vlan-4)# admin-state enable
Exception when calling ->put_ale_vlan_ale_vlan_vlan_vlan_list_admin_status : (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Content-Type, Content-Length, Accept-Encod)
HTTP response body: {"ietf-restconf:errors":{"error":[{"error-type":"protocol","error-tag":"access-denied"}]}}

Describe the results you expected:

admin@sonic:~$ sonic-cli
sonic# configure terminal
sonic(config)# vlan 4
sonic(config-vlan-4)# admin-state enable
sonic(config-vlan-4)#

**Output of `show version`:**

```

admin@sonic:~$ show version
SONiC Software Version: SONiC.master.376100-0299ab8de
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-23-2-amd64
Build commit: 0299ab8de
Build date: Sun Oct 1 11:58:10 UTC 2023
Built by: AzDevOps@vmss-soni0024LO

Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 07:38:35 up 0 min, 1 user, load average: 1.93, 0.48, 0.16
Date: Mon 02 Oct 2023 07:38:35
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

[SONiC-gRPC telemetry] - Facing issue while performing "gnmi_get" operation in the telemetry container.

  1. First like mentioned in the link https://karneliuk.com/2023/01/automation-19-enabling-ocp-sonic-to-be-managed-via-gnmi-with-pygnmi/ we have made a connection between Linux machine and SONiC switch.

  2. Configured all the things like hostname, ip-address, up and running the telemetry container.

  3. Performed the set of commands to create a certification:

admin@sonic:~$ sudo openssl req -x509 -newkey rsa:4096 -keyout /etc/sonic/telemetry/dsmsroot.key
-out /etc/sonic/telemetry/dsmsroot.cer -sha256 -days 365 -nodes -subj '/CN=lab-ca'

admin@sonic:~$ sudo openssl req -new -newkey rsa:4096 -nodes
-keyout /etc/sonic/telemetry/streamingtelemetryserver.key -out /etc/sonic/telemetry/streamingtelemetryserver.csr
-subj "/CN=dev-pygnmi-sonic-003" --> Here is used hostname and CN as "sonic".

admin@sonic:~$ sudo openssl x509 -req -in /etc/sonic/telemetry/streamingtelemetryserver.csr
-CA /etc/sonic/telemetry/dsmsroot.cer -CAkey /etc/sonic/telemetry/dsmsroot.key
-CAcreateserial -out /etc/sonic/telemetry/streamingtelemetryserver.cer
-days 365 -sha512

  1. Then conformed the port is listening to the "50051"
image
  1. While testing with pygnmi using the script :

$ cat test.py

from pygnmi.client import gNMIclient

import json

host = {
"ip_address": "50.0.0.20",
"port": 50051,
"username": "admin",
"password": "YourPaSsWoRd",
}

if name == "main":
with gNMIclient(
target=(host["ip_address"], host["port"]),
username=host["username"],
password=host["password"],
path_root="/etc/sonic/telemetry/certs/ca.pem",
path_cert="/etc/sonic/telemetry/certs/server.pem",
path_key="/etc/sonic/telemetry/certs/server.key",
override="sonic",
#override="dev-pygnmi-sonic-003",
) as gc:
result = gc.capabilities()
print(json.dumps(result, indent=4))

  1. Iam getting a proper output of the capabilities: $ python3 test.py
    {
    "supported_models": [
    {
    "name": "openconfig-acl",
    "organization": "OpenConfig working group",
    "version": "1.0.2"
    },
    {
    "name": "openconfig-acl",
    "organization": "OpenConfig working group",
    "version": "1.0.2"
    },
    {
    "name": "openconfig-interfaces",
    "organization": "OpenConfig working group",
    "version": "1.0.2"
    },
    {
    "name": "openconfig-lldp",
    "organization": "OpenConfig working group",
    "version": "1.0.2"
    },
    {
    "name": "openconfig-platform",
    "organization": "OpenConfig working group",
    "version": "1.0.2"
    },
    {
    "name": "openconfig-system",
    "organization": "OpenConfig working group",
    "version": "1.0.2"
    },
    {
    "name": "ietf-yang-library",
    "organization": "IETF NETCONF (Network Configuration) Working Group",
    "version": "2016-06-21"
    },
    {
    "name": "sonic-db",
    "organization": "SONiC",
    "version": "0.1.0"
    }
    ],
    "supported_encodings": [
    "json",
    "json_ietf"
    ],
    "gnmi_version": "0.7.0"
    }

  2. Like this if i try to perform the get/set operation iam facing issue.

$ python3 get.py
Traceback (most recent call last):
File "get.py", line 15, in
password=host["password"], insecure=True) as gc:
File "/usr/local/lib/python3.6/dist-packages/pygnmi/client.py", line 136, in enter
return self.connect()
File "/usr/local/lib/python3.6/dist-packages/pygnmi/client.py", line 259, in connect
self.wait_for_connect(timeout)
File "/usr/local/lib/python3.6/dist-packages/pygnmi/client.py", line 281, in wait_for_connect
grpc.channel_ready_future(self.__channel).result(timeout=timeout)
File "/usr/local/lib/python3.6/dist-packages/grpc/_utilities.py", line 139, in result
self._block(timeout)
File "/usr/local/lib/python3.6/dist-packages/grpc/_utilities.py", line 85, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError

--> script to run the get operation:

image
  1. Next i tried directly in the SONiC switch the steps which is mentioned in the this link: https://github.com/sonic-net/sonic-gnmi/blob/master/doc/grpc_telemetry.md

gnmi_get -xpath_target COUNTERS_DB -xpath COUNTERS_PORT_NAME_MAP -target_addr 50.0.0.20:50051 -alsologtostderr -insecure true

gnmi_get -xpath_target COUNTERS_DB -xpath COUNTERS/eth0 -target_addr 50.0.0.20:50051 -alsologtostderr -insecure true

Both command troughed the same issue:
issue

  1. When i checked in the telemetry container their is no dail-in client.:
image
  1. Output for : $ show platform summary
image

Memory grows until OOM with slow telemetry collector and lots of data.

I am opening this issue to get an opinion on how to handle an issue I have observed. We had a telemetry collector (telegraf with custom gNMI plugin) that was running with limited CPU quota (I think limited to ~20% CPU time). The collector was using SAMPLE mode to get a large BGP table. Over time we noticed that the memory of the telemetry process was increasing until we hit OOM and the process was killed.

I identified the issue in that when in client_subscribe.go send() function we call err = stream.Send(resp). This call will actually block in the case I described above when the collector is not processing data quickly enough. The problem then is that the telemetry process will keep adding data to the PriorityQueue which causes the memory to grow. To rectify this issue, I introduced a new "LimitedQueue" instead of the current PriorityQueue in our (Dell) sonic-telemetry. The LimitedQueue will check the size of the Queue and reject adding newitems if the size is greater than the predefined maximum size (default I set to 100MB).

This is working, however it means that the collector will start to miss telemetry updates. Recently Broadcom recommended instead I close the connection with gRCP code RESOURCE_EXHAUSTED instead of silently dropping updates.

Wanting to know what is the community preferred way to do this before opening a PR.

Telemetry application doesn't restart when the application crashes.

Below is the list of process running inside telemetry docker app.

$ docker ps
14b6bff4a843 docker-sonic-telemetry:latest "/usr/bin/supervisord" 5 weeks ago Up 6 hours telemetry

$ docker exec -it telemetry sh

ps -eaf

UID PID PPID C STIME TTY TIME CMD
root 1 0 0 09:03 pts/0 00:00:06 /usr/bin/python /usr/bin/supervisord
root 8 1 0 09:03 pts/0 00:00:00 python /usr/bin/supervisor-proc-exit-listener --container-name telemetry
root 14 1 0 09:03 pts/0 00:00:00 /usr/sbin/rsyslogd -n
root 19 1 0 09:03 pts/0 00:01:35 /usr/sbin/telemetry -logtostderr --insecure --port 8080 --allow_no_client_aut
root 40 1 0 09:03 pts/0 00:01:35 /usr/sbin/dialout_client_cli -insecure -logtostderr -v 2
root 60 0 0 15:14 pts/1 00:00:00 sh
root 65 60 0 15:14 pts/1 00:00:00 ps -eaf

When the app crashes, the telemetry application doesn't restart.The supervisor-proc-exit-listener application running inside should restart as telemetry application is a critical. process

Also, the database has enabled the support for autorestart on telemetry app.

redis /var/run/redis/redis.sock[4]> hgetall "CONTAINER_FEATURE|telemetry"

  1. "auto_restart"
  2. "enable"
  3. "high_mem_alert"
  4. "disabled"

[SONiC]- gnmi/telemetry -- Facing issue while performing the SET & SUBSCRIBE with pygnmi.

Hi all,

When iam try to run the SET & SUBSCRIBE script getting an error. But for the CAPABILITIES & GET operation i didn't seeing any issue. "For this iam using the latest communtiy (Master branch - sonic broadcom image)".

Capabilities.py

# Modules
from pygnmi.client import gNMIclient
import json

# Variables
host = {
    "ip_address": "50.0.0.20",
    "port": 50051,
    "username": "admin",
    "password": "YourPaSsWoRd",
}

# Body
if __name__ == "__main__":
    with gNMIclient(
        target=(host["ip_address"], host["port"]),
        username=host["username"],
        password=host["password"],
        path_root="/etc/sonic/telemetry/certs/ca.pem",
        path_cert="/etc/sonic/telemetry/certs/server.pem",
        path_key="/etc/sonic/telemetry/certs/server.key",
        override="sonic",
        #override="dev-pygnmi-sonic-003",
    ) as gc:
        result = gc.capabilities()
        print(json.dumps(result, indent=4))


output of the capabilities:
{
"supported_models": [
{
"name": "openconfig-acl",
"organization": "OpenConfig working group",
"version": "1.0.2"
},
{
"name": "openconfig-acl",
"organization": "OpenConfig working group",
"version": ""
},
{
"name": "openconfig-interfaces",
"organization": "OpenConfig working group",
"version": "1.0.2"
},
{
"name": "openconfig-lldp",
"organization": "OpenConfig working group",
"version": "1.0.2"
},
{
"name": "openconfig-platform",
"organization": "OpenConfig working group",
"version": "1.0.2"
},
{
"name": "openconfig-system",
"organization": "OpenConfig working group",
"version": "1.0.2"
},
{
"name": "ietf-yang-library",
"organization": "IETF NETCONF (Network Configuration) Working Group",
"version": "2016-06-21"
},
{
"name": "sonic-db",
"organization": "SONiC",
"version": "0.1.0"
}
],
"supported_encodings": [
"json",
"json_ietf"
],
"gnmi_version": "0.7.0"
}

GET operation script:
Get.py --> Here iam getting the "openconfig-acl:acl"

# Modules
from pygnmi.client import gNMIclient
import json

# Variables
host = {
    "ip_address": "50.0.0.20",
    "port": 50051,
    "username": "admin",
    "password": "YourPaSsWoRd",
}


# Body
if __name__ == "__main__":

     # paths = ['openconfig-interfaces:interfaces/interface[name=Ethernet0]']
     paths = ['/openconfig-acl:acl']
     #paths = ['/openconfig-interfaces:interfaces']
     #paths = ['/openconfig-lldp:lldp']
     #paths = ['/openconfig-platform:components']
     #paths = ['/ietf-yang-library:modules-state']

     with gNMIclient(
        target=(host["ip_address"], host["port"]),
        username=host["username"],
        password=host["password"],
        path_root="/home/sonic/bharath/certs/ca.pem",
        path_cert="/home/sonic/bharath/certs/server.pem",
        path_key="/home/sonic/bharath/certs/server.key",
        override="sonic",
    ) as gc:
        result = gc.get(path=paths, encoding='json')
        print(json.dumps(result, indent=4))

output of GET:
{
"notification": [
{
"timestamp": 1688309679309160550,
"prefix": null,
"alias": null,
"atomic": false,
"update": [
{
"path": "openconfig-acl:acl",
"val": {}
}
]
}
]
}

subscribe.py

#!/usr/bin/env python

# Modules
import json  # Added missing import statement
from pygnmi.client import gNMIclient, telemetryParser

# Variables
host = {
    "ip_address": "50.0.0.20",
    "port": 50051,
    "username": "admin",
    "password": "YourPaSsWoRd",
}

subscribe = {
    'subscription': [
        {
            'path': 'openconfig-interfaces:interfaces/interface[name=Ethernet0]',
            #path: ['openconfig-interfaces:interfaces/interface[name=Ethernet0]'],
            #'path' : 'openconfig-acl:acl',
            #'path' : 'openconfig-interfaces:interfaces',
            #'path' : 'openconfig-lldp:lldp',
            #'path' : 'openconfig-platform:components',
            #'path' : 'ietf-yang-library:modules-state',
            'mode': 'sample',
            'sample_interval': 10000000000
        }
    ],
    #'use_aliases': False,
    'mode': 'stream',
    'encoding': 'proto'
}

# Body
if __name__ == "__main__":
    with gNMIclient(
            target=(host["ip_address"], host["port"]),
            username=host["username"],
            password=host["password"],
            path_root="/etc/sonic/telemetry/certs/ca.pem",
            path_cert="/etc/sonic/telemetry/certs/server.pem",
            path_key="/etc/sonic/telemetry/certs/server.key",
            #path_root="/home/sonic/bharath/certs/ca.pem",
            #path_cert="/home/sonic/bharath/certs/server.pem",
            #path_key="/home/sonic/bharath/certs/server.key",
            override="sonic",
    ) as gc:
        telemetry_stream = gc.subscribe(subscribe=subscribe)
       
       for parsed_data in telemetry_stream:
            print(json.dumps(parsed_data, indent=4))

output:
Traceback (most recent call last):
File "subscribe-test.py", line 50, in
for parsed_data in telemetry_stream:
File "/usr/local/lib/python3.6/dist-packages/grpc/_channel.py", line 426, in next
return self._next()
File "/usr/local/lib/python3.6/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNIMPLEMENTED
details = "Empty target data not supported yet"
debug_error_string = "UNKNOWN:Error received from peer ipv4:50.0.0.20:50051 {created_time:"2023-09-13T15:12:21.086493292+05:30", grpc_status:12, grpc_message:"Empty target data not supported yet"}"

Same error facing for the SET aswell. Is the SET & SUBSCRIBE have the support in the image?

TX and RX BPS and PPS rates in telemetry gnmi

Why I did it
We need in telemetry TX and RX BPS (Bits per second) and PPS (Packets per second)

How I did it
Added in telemetry new options for mapping the RATES table in REDIS COUNTERS_DB

How to verify it
manual test using gnmi client to the new virtual paths

Description for the changelog
Added new virtual paths for TX and RX BPS and PPS in telemetry gnmi
examples:
RATES/Ethernet1/RX_BPS
RATES/Ethernet1/RX_PPS
RATES/Ethernet1/TX_BPS
RATES/Ethernet1/TX_PPS

Need updated version of sonic_gnoi.proto

During our driver update we found some discrepancy. When we send requests to the devices, we utilize .proto files to implement our RPC calls. One of these files is sourced from the GitHub repository:
[https://github.com/sonic-net/sonic-gnmi/blob/master/proto/gnoi/sonic_gnoi.proto [github.com]].

The mentioned file, sonic_gnoi.proto, corresponds to multiple YANG files within the SONiC driver. A Yang module named openconfig-file-mgmt-private.yang (as well as other related modules) underwent changes to its API, rendering sonic_gnoi.proto incompatible with the latest driver version. Updated proto file is attached.

sonic_gnoi.proto.txt

telemetry connection refused

Hi guys

when i use the telemetry in real switch the telemtery connction was refused. but in the vs I can get data without any configuration . do you know what I am to do ?

root@sonic:/# gnmi_get -xpath_target COUNTERS_DB -xpath COUNTERS_PORT_NAME_MAP -target_addr 127.0.0.1:8080 -insecure true
== getRequest:
prefix: <
  target: "COUNTERS_DB"
>
path: <
  elem: <
    name: "COUNTERS_PORT_NAME_MAP"
  >
>
encoding: JSON_IETF

F0201 09:38:25.407921     328 gnmi_get.go:137] Get failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:8080: connect: connection refused"

in the vs :

admin@sonic:~$ docker exec -it telemetry bash
root@sonic:/# gnmi_get -xpath_target COUNTERS_DB -xpath COUNTERS_PORT_NAME_MAP -target_addr 127.0.0.1:8080  -insecure true
== getRequest:
prefix: <
  target: "COUNTERS_DB"
>
path: <
  elem: <
    name: "COUNTERS_PORT_NAME_MAP"
  >
>
encoding: JSON_IETF

== getResponse:
notification: <
  timestamp: 1612172008754845246
  prefix: <
    target: "COUNTERS_DB"
  >
  update: <
    path: <
      elem: <
        name: "COUNTERS_PORT_NAME_MAP"
      >
    >
    val: <
      json_ietf_val: "{\"Ethernet0\":\"oid:0x1000000000002\",\"Ethernet100\":\"oid:0x100000000001b\",\"Ethernet104\":\"oid:0x100000000001c\",\"Ethernet108\":\"oid:0x100000000001d\",\"Ethernet112\":\"oid:0x100000000001e\",\"Ethernet116\":\"oid:0x100000000001f\",\"Ethernet12\":\"oid:0x1000000000005\",\"Ethernet120\":\"oid:0x1000000000020\",\"Ethernet124\":\"oid:0x1000000000021\",\"Ethernet16\":\"oid:0x1000000000006\",\"Ethernet20\":\"oid:0x1000000000007\",\"Ethernet24\":\"oid:0x1000000000008\",\"Ethernet28\":\"oid:0x1000000000009\",\"Ethernet32\":\"oid:0x100000000000a\",\"Ethernet36\":\"oid:0x100000000000b\",\"Ethernet4\":\"oid:0x1000000000003\",\"Ethernet40\":\"oid:0x100000000000c\",\"Ethernet44\":\"oid:0x100000000000d\",\"Ethernet48\":\"oid:0x100000000000e\",\"Ethernet52\":\"oid:0x100000000000f\",\"Ethernet56\":\"oid:0x1000000000010\",\"Ethernet60\":\"oid:0x1000000000011\",\"Ethernet64\":\"oid:0x1000000000012\",\"Ethernet68\":\"oid:0x1000000000013\",\"Ethernet72\":\"oid:0x1000000000014\",\"Ethernet76\":\"oid:0x1000000000015\",\"Ethernet8\":\"oid:0x1000000000004\",\"Ethernet80\":\"oid:0x1000000000016\",\"Ethernet84\":\"oid:0x1000000000017\",\"Ethernet88\":\"oid:0x1000000000018\",\"Ethernet92\":\"oid:0x1000000000019\",\"Ethernet96\":\"oid:0x100000000001a\"}"
    >
  >
>

root@sonic:/# 

Telemetry Throws Redis DB Error When Run

Running sonic-telemetry on a local VM throws the following error when trying to call telemetry. Even simple commands like ./telemetry --help throw this error.

sudo sonic-telemetry/build/bin/telemetry --port 8080 -insecure --allow_no_client_auth --logtostderr -v 10
libyang[0]: Unable to use search directory "schema/" (No such file or directory)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x97faae]

goroutine 1 [running]:
github.com/Azure/sonic-mgmt-common/cvl.dbCacheSet(0xc000075000, 0xd005a7, 0x4, 0xcf0000, 0x3)
	/home/tilden/Desktop/sonic/sonic-telemetry/vendor/github.com/Azure/sonic-mgmt-common/cvl/cvl.go:1731 +0x9e
github.com/Azure/sonic-mgmt-common/cvl.init.0()
	/home/tilden/Desktop/sonic/sonic-telemetry/vendor/github.com/Azure/sonic-mgmt-common/cvl/cvl.go:205 +0x346

Going through the code, it seems that the issue is in line 1731, specifically modelInfo.tableInfo[tableName].

Environment:
Ubuntu 18.04
Locally Hosted Redis DB

gNOI System Reboot RPC calling Config Reload instead of Reboot

The gNOI System Reboot RPC is defined as causes the target to reboot, possibly at some point in the future...the command will block until the subcomponents have restarted. Reference: https://github.com/openconfig/gnoi/blob/main/system/system.proto#L70

However, the sonic-gnmi implementation of the gNOI Reboot service does a Config reload and not a System Reboot. Reference: https://github.com/sonic-net/sonic-gnmi/blob/master/gnmi_server/gnoi.go#L29 This does not align with the intended System Reboot command and needs to be updated to trigger a system reboot instead.

help/bug: The way to read full config (CONFIG_DB)

Tried to read full config after #143 and #145 pull requests.

How to reproduce:
Build new image-vs with this repo https://github.com/sonic-net/sonic-buildimage (took 202305 branch version) and patch with #143 and #145 commits. Added it to GNS3 and started testing.

the command that was run (after deploy):
gnmi_get -target_name "$(hostname)" -ca dsmsroot.cer -cert streamingtelemetryserver.cer -key streamingtelemetryserver.key -target_addr 127.0.0.1:50051 -xpath "/sonic-db:CONFIG_DB/"

issue that was occurred:

[gnmi_get.go:142] Get failed: rpc error: code = Unavailable desc = transport is closing

Am I doing this correctly or there is another way to read full config (CONFIG_DB table)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.