Hello,
I am encountering an error while trying to issue a gNMI set request.
I built a private SONiC image based of the 202012 branch with TELEMETRY_WRITABLE=y.
I am trying to make the gNMI request to the default telemetry service running inside the telemetry docker on port 8080.
root@sonic:/# ps -eaf | grep telemetry
root 9 1 0 Sep16 pts/0 00:00:00 python3 /usr/bin/supervisor-proc-exit-listener --container-name telemetry
root 18 1 0 Sep16 pts/0 00:00:30 /usr/sbin/telemetry -logtostderr --noTLS --port 8080 --allow_no_client_auth -v=2
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=Ethernet1]/config/mtu:@./mtu.json -xpath_target OC-YANG
/openconfig-interfaces:interfaces/interface[name=Ethernet1]/config/mtu
@./mtu.json
== setRequest:
prefix: <
target: "OC-YANG"
>
update: <
path: <
elem: <
name: "openconfig-interfaces:interfaces"
>
elem: <
name: "interface"
key: <
key: "name"
value: "Ethernet1"
>
>
elem: <
name: "config"
>
elem: <
name: "mtu"
>
>
val: <
json_ietf_val: "{\"mtu\": 9108}"
>
>
F0914 02:52:51.731284 155 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 }
===============================
/var/log/telemetry.log snippet
================================
[...]Sep 16 22:51:43.595548 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595037 19 server.go:383] Update path: path:{elem:{name:"openconfig-interfaces:interfaces"} elem:{name:"interface" key:{key:"name" value:"Ethernet1"}} elem:{name:"config"} elem:{name:"mtu"}} val:{json_ietf_val:"{\"mtu\": 9108}"}·
Sep 16 22:51:43.595548 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595216 19 transl_utils.go:212] Incoming JSON body is{"mtu": 9108}
Sep 16 22:51:43.595663 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595234 19 translib.go:269] Update request received with path =/openconfig-interfaces:interfaces/interface[name=Ethernet1]/config/mtu
Sep 16 22:51:43.595663 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595245 19 translib.go:270] Update request received with payload ={"mtu": 9108}
Sep 16 22:51:43.595693 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595269 19 app_interface.go:129] getAppModule called for path =/openconfig-interfaces:interfaces/interface[name=Ethernet1]/config/mtu
Sep 16 22:51:43.595744 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595282 19 app_interface.go:136] found the entry in the map for path =/openconfig-interfaces:interfaces
Sep 16 22:51:43.595744 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595294 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>}
Sep 16 22:51:43.595949 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595626 19 request_binder.go:338] requestBinder: modified path is: elem:{name:"interfaces"} elem:{name:"interface" key:{key:"name" value:"Ethernet1"}} elem:{name:"config"}
Sep 16 22:51:43.596271 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.595988 19 intf_app.go:111] initialize:if:path =/openconfig-interfaces:interfaces/interface[name=Ethernet1]/config/mtu
Sep 16 22:51:43.596338 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.596078 19 db.go:394] NewDB: Init indication not requested
Sep 16 22:51:43.596338 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.596127 19 intf_app.go:148] translateUpdate:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet1]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet1]}
Sep 16 22:51:43.596375 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.596165 19 intf_app.go:1077] Received UPDATE for path /openconfig-interfaces:interfaces/interface{}/config/mtu; vars=map[name:Ethernet1]
Sep 16 22:51:43.604449 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604244 19 intf_app.go:516] Found 112 INTF table keys
Sep 16 22:51:43.604642 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604323 19 intf_app.go:1084] uripath:=/openconfig-interfaces:interfaces/interface/config/mtu
Sep 16 22:51:43.604642 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604336 19 intf_app.go:1085] err:=<nil>
Sep 16 22:51:43.604642 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604349 19 intf_app.go:1088] len:=1
Sep 16 22:51:43.604681 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604363 19 intf_app.go:1090] Name:=Ethernet1
Sep 16 22:51:43.604864 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604563 19 intf_app.go:1107] mtu:= 9108
Sep 16 22:51:43.604864 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604582 19 intf_app.go:1117] Writing to db for Ethernet1
Sep 16 22:51:43.604864 sonic INFO telemetry#/supervisord: telemetry W0916 22:51:43.604598 19 db.go:1299] performWatch: Empty WatchKeys. Skipping WATCH
Sep 16 22:51:43.604908 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604605 19 intf_app.go:298] Calling processCommon()
Sep 16 22:51:43.604939 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604612 19 intf_app.go:1274] processCommon:intf:path =&{/openconfig-interfaces:interfaces/interface[name=Ethernet1]/config/mtu /openconfig-interfaces:interfaces/interface{}/config/mtu map[name:Ethernet1]}
Sep 16 22:51:43.604939 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604637 19 intf_app.go:1275] ProcessCommon: Target Type is uint16
Sep 16 22:51:43.605202 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604646 19 intf_app.go:1279] Updating entry for Ethernet1
Sep 16 22:51:43.605202 sonic INFO telemetry#/supervisord: telemetry libyang[0]: Failed to find "autoneg" as a sibling to "sonic-port:ifname".
Sep 16 22:51:43.605202 sonic INFO telemetry#/supervisord: telemetry E0916 22:51:43.604967 19 util.go:176] Failed to create leaf nodes, data = [0xc000481f60 0xc000481f80 0xc000481fa0 0xc000432000 0xc000432020 0xc000432080 0xc0004320a0 0xc000432100 0xc000432120]
Sep 16 22:51:43.605406 sonic INFO telemetry#/supervisord: telemetry W0916 22:51:43.604986 19 db.go:650] doCVL: CVL Failure: 1001
Sep 16 22:51:43.605406 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.604999 19 db.go:654] doCVL: 1 1
Sep 16 22:51:43.605439 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.605012 19 db.go:1478] AbortTx: No SET|DEL done, txState: txStateWatch
Sep 16 22:51:43.605631 sonic INFO telemetry#/supervisord: telemetry I0916 22:51:43.605348 19 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 }
Any debug/troubleshooting guidance would be very helpful.
Thanks,
Prashanth