Hello,
I'm trying to test gNMI functionality on SONiC device. Currently, I'm stuck, and I will be glad if someone could help me.
I have downloaded SONiC VS image
https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-202012/56/ and start it in GNS3.
2) SONiC gNMI server is in read-only mode.
When I start inside telemetry container telemetry in binary mode:
"telemetry --port 3003 --insecure --allow_no_client_auth --logtostderr"
I'm able to sent get/subscribe/capabilities request. But when I tried to update interface mtu with "gnmi_set" client I will receive an error message:
"gnmi_set.go:190] Set failed: rpc error: code = Unimplemented desc = Telemetry is in read-only mode"
Request with response I'm attaching in file "gnmi_set.txt". Is there any option how to start telemetry without read-only state?
Thanks.
Best regards
--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/78756971dce54763b9ba766a554bb0cc%40pantheon.tech.
<gnmi_set.txt><telemetry_8080.txt>
Hello Eric,
1) gNMI server on port 8080 response with "authentication handshake failed".
Yes
the telemetry server is running. I can see the running process inside the telemetry container. (attaching in file "telemetry_server.txt").
I tried java gnmi client, and it gave me this response when I tried to send a request on telemetry at port 8080:
Caused by: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 000006040000000000000500004000
I'm using port 3003 at second example because I start another telemetry server on that custom port.
2)
SONiC gNMI server is in read-only mode.
I have tried to rebuild the telemetry image in sonic-buildimage repository. I have uncommented
TELEMETRY_WRITABLE in file:
https://github.com/Azure/sonic-buildimage/blob/master/rules/config#L144
Then I run inside this repo:
git checkout 202012
make init
make configure PLATFORM=vs
make target/docker-sonic-telemetry.gz
Then I copy target/docker-sonic-telemetry.gz to running SONiC device. I have load this image and start it as telemetry container.
But it doesn't look like its running properly, when I start telemetry inside this container I will get errors (attaching in file "telemetry.txt").
Can you please point me how to do it in the correct way?
Thanks & regards
Peter
./gnmi_get -insecure -username admin -password broadcom -xpath /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config -target_addr 127.0.0.1:8080
-Anand
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/e97e549b8f1e48a8b14bb9ad85e77544%40pantheon.tech.
Hi Anand,
here is that request. In first mail in this thread I sent in attachment (telemetry_8080.txt) similar request also with "gnmi_cli" client request. These requests were executed in a telemetry container inside SONiC device.
root@sonic:/# gnmi_get -insecure -username admin -password broadcom -xpath /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config -target_addr 127.0.0.1:8080
== getRequest:
prefix: <
>
path: <
elem: <
name: "openconfig-interfaces:interfaces"
>
elem: <
name: "interface"
key: <
key: "name"
value: "Ethernet0"
>
>
elem: <
name: "config"
>
>
encoding: JSON_IETF
F0421 07:13:19.065002 69 gnmi_get.go:142] Get failed: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"
root@sonic:/#
I have noticed that default telemetry is started with parameter "--noTLS". When I start another telemetry with custom port and "--noTLS" parameter, I will have same issue. When I remove "--noTLS" and use "-insecure" or custom certificates I'm able to send a request to this custom telemetry. Except any modification at configuration, but this is related to part 2 of my first message in this thread "2) SONiC gNMI server is in read-only mode.".
root@sonic:/# ps -aux | grep telemetry
root 10 0.0 0.4 27640 18796 pts/0 S 07:06 0:00 python3 /usr/bin/supervisor-proc-exit-listener --container-name telemetry
root 19 0.4 1.4 1247940 59208 pts/0 Sl 07:06 0:12 /usr/sbin/telemetry -logtostderr --noTLS --port 8080 --allow_no_client_auth -v=2
root 130 0.0 0.0 3084 888 pts/1 S+ 07:58 0:00 grep telemetry
root@sonic:/#
Thanks & regards
Peter
From: Anand Kumar Subramanian <anand.su...@broadcom.com>
Sent: Tuesday, 20 April 2021 10:17:21 PM
To: Peter Šuňa
Cc: Eric Seifert; sonicproject
Hi Anand, Peter,
Regarding the NoTLS setting, we came across this PR/commit:
https://github.com/Azure/sonic-buildimage/pull/6704
https://github.com/Azure/sonic-buildimage/commit/2e42ecb5e7623f13df94b637e485510534b3280b
Does anyone know pra-moh? Can they help support this?
Thanks,
Jeff
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/CADfq%3DU2K7LR8mDDfrQP3X0HK31Ksk2MFfgiU_pTwy-upgq8QCQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/BY5PR19MB3301ECE0A416D7C78CED8A6C9A419%40BY5PR19MB3301.namprd19.prod.outlook.com.
We dont have any plan to add support for gnmi_set in noTLs mode. For --inseure mode @Seifert, Eric E can comment?