Open sachin-brm opened 5 years ago
Duplicate of issue #86. Without a fix for #86, this will also not work.
Observing the issue even with #86 fixed. Please find the logs below
bserving the issue in build "sonic_2.0_daily_190912_1808_328" too.re-opening this issue.
=======================================================
root@sonic:/#gnmi_get -xpath /openconfig-interfaces:interfaces/interface[name=Ethernet28] -target_addr 127.0.0.1:8080 -insecure == getRequest: prefix: <
path: < elem: < name: "openconfig-interfaces:interfaces"
elem: < name: "interface" key: < key: "name" value: "Ethernet28"
encoding: JSON_IETF
== getResponse: notification: < timestamp: 1568367877877052220 prefix: <
update: < path: < elem: < name: "openconfig-interfaces:interfaces"
elem: < name: "interface" key: < key: "name" value: "Ethernet28"
val: < json_ietf_val: "{\"openconfig-interfaces:interface\":[{\"config\":{\"description\":\"\",\"mtu\":9100,\"name\":\"Ethernet28\"},\"name\":\"Ethernet28\",\"openconfig-if-ethernet:ethernet\":{\"config\":{\"port-speed\":\"openconfig-if-ethernet:SPEED_100GB\"},\"state\":{\"port-speed\":\"openconfig-if-ethernet:SPEED_100GB\"}},\"state\":{\"admin-status\":\"UP\",\"counters\":{\"in-broadcast-pkts\":\"0\",\"in-discards\":\"290\",\"in-errors\":\"0\",\"in-multicast-pkts\":\"341\",\"in-octets\":\"74362\",\"in-pkts\":\"347\",\"in-unicast-pkts\":\"6\",\"out-broadcast-pkts\":\"0\",\"out-discards\":\"0\",\"out-errors\":\"0\",\"out-multicast-pkts\":\"358\",\"out-octets\":\"79512\",\"out-pkts\":\"364\",\"out-unicast-pkts\":\"6\"},\"description\":\"\",\"ifindex\":7,\"mtu\":9100,\"name\":\"Ethernet28\",\"oper-status\":\"UP\"},\"subinterfaces\":{\"subinterface\":[{\"index\":0,\"openconfig-if-ip:ipv4\":{\"addresses\":{\"address\":[{\"config\":{\"ip\":\"192.168.1.1\",\"prefix-length\":24},\"ip\":\"192.168.1.1\",\"state\":{\"ip\":\"192.168.1.1\",\"prefix-length\":24}}]}}}]}}]}"
root@sonic:/# root@sonic:/#gnmi_get -xpath /openconfig-interfaces:interfaces/interface[name=Etthernet28]/subinterfaces/subinterface[index=0]/openconfig-if-ip:ipv4/addresses/adddress -target_addr 127.0.0.1:8080 -insecure == getRequest: prefix: <
path: < elem: < name: "openconfig-interfaces:interfaces"
elem: < name: "interface" key: < key: "name" value: "Etthernet28"
elem: < name: "subinterfaces"
elem: < name: "subinterface" key: < key: "index" value: "0"
elem: < name: "openconfig-if-ip:ipv4"
elem: < name: "addresses"
elem: < name: "adddress"
encoding: JSON_IETF
F0913 09:45:20.588199 246 gnmi_get.go:137] Get failed: rpc error: code = NotFound desc = GET failed for this message root@sonic:/# exit exit
root@sonic:/home/admin# show platform summary Platform: x86_64-accton_as7712_32x-r0 HwSKU: Accton-AS7712-32X ASIC: broadcom
=============================================================
There are two operations done in this defect. One is configuring IPV4/IPv6 address and then getting the IP address through gNMI. Configuration is related to #86, not exact duplicate of it.
CVL fix for configuration is available in master branch (PR #118). Please test configuration and update the result. If gnmi_get is not working as expected, we need to fix them separately (which is not related to CVL).
There is issue seen with gnmi_set for interfaces:
gnmi_set -update /openconfig-interfaces:interfaces/interface[name=Ethernet0]/subinterfaces/subinterface[index=0]/openconfig-if-ip:ipv4/addresses/address[ip=1.2.3.4]/config -target_addr 127.0.0.1:8080 -insecure == setRequest: update: < path: < elem: < name: "openconfig-interfaces:interfaces"
elem: < name: "interface" key: < key: "name" value: "Ethernet0"
elem: < name: "subinterfaces"
elem: < name: "subinterface" key: < key: "index" value: "0"
elem: < name: "openconfig-if-ip"
val: < string_val: "ipv4/addresses/address[ip=1.2.3.4]/config"
F0103 21:41:06.583427 313 gnmi_set.go:164] Set failed: rpc error: code = Unknown desc = UPDATE failed for this message
Logs for the same
oot@sonic:/home/admin# tail -f /var/log/telemetry.log
Jan 3 21:40:58.268150 sonic INFO telemetry#supervisord: telemetry I0103 21:40:58.266335 38 translib.go:726] Error in request binding: rpc error: code = InvalidArgument desc = no match found in ocbinds.OpenconfigInterfaces_Interfaces_Interface_Subinterfaces_Subinterface, for path elem:<name:"openconfig-if-ip" >
Jan 3 21:40:58.268150 sonic INFO telemetry#supervisord: telemetry I0103 21:40:58.266378 38 translib.go:182] Update request received with path =/openconfig-interfaces:interfaces/interface[name=Ethernet0]/subinterfaces/subinterface[index=0]/openconfig-if-ip
Jan 3 21:40:58.268150 sonic INFO telemetry#supervisord: telemetry I0103 21:40:58.266393 38 translib.go:183] Update request received with payload =
Jan 3 21:40:58.268150 sonic INFO telemetry#supervisord: telemetry I0103 21:40:58.266409 38 app_interface.go:116] getAppModule called for path =/openconfig-interfaces:interfaces/interface[name=Ethernet0]/subinterfaces/subinterface[index=0]/openconfig-if-ip
Jan 3 21:40:58.268150 sonic INFO telemetry#supervisord: telemetry I0103 21:40:58.266426 38 app_interface.go:123] found the entry in the map for path =/openconfig-interfaces:interfaces
Jan 3 21:40:58.268150 sonic INFO telemetry#supervisord: telemetry I0103 21:40:58.266442 38 app_interface.go:154] cast to appInterface worked&{
GNMI get for address container or sub interfaces is not supported for this release. Please do a get on Interface list with Interface name as key.
As @asha-behera mentioned, set will work fine. But GET is not supported for subInterfaces level or address level. Still, need to use interfaces/interface[name] for the info.
@sachin-brm @PrabhuSreenivasan @dutta-partha @asha-behera -- I will leave it up to you to evaluate Justin's response and close the issue if you agree. From the repro logs, it looks like you're doing a GET/SET on the sub-interface, whereas the operation should be performed on the interface itself.
@justinejose91 , SET for the above case is not working for me, is it working for you? Could you please dump the result?
@asha-behera , I have tried it with the latest build. Its working fine for me. Please have a look at the screenshots attached, which mentions the build as well.
Problem Description/Summary :
OPENCONFIG-gNMI - gnmi_get of IPV4/IPV6 address on interface fails
Expected Behavior :
gnmi_get operation for IPV4/IPV6 address on interface should be successful
Topology :
DUT
Steps to Repro :
docker exec -it telemetry bash
5.Same issue is observed with IPV6 address
Reproducibility ( Ex:- 3 out of 3 attempts ) Please also update "Reproducible" field :
3