Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[StreamingTelemetry] add noTLS support for debug purpose #6704

Merged
merged 2 commits into from
Feb 18, 2021

Conversation

pra-moh
Copy link
Contributor

@pra-moh pra-moh commented Feb 6, 2021

- Why I did it
adding noTLS mode for debugging purpose
Removing config-set for port 8080. It fails to start telemetry if docker restarts in case on noTLS mode because it expects log_level config to be present as well.
- How I did it
Built telemetry standalone with noTLS support.
Replaced binaries on device.
Updated telemetry.sh script inside docket and ran it

Test results:
Server on noTLS:
root@str-s6000-acs-10:/usr/sbin# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.2 58964 21304 pts/0 Ss+ Feb05 0:18 /usr/bin/python /usr/bin/supervisord
root 9 0.0 0.1 51908 16088 pts/0 S Feb05 0:00 python /usr/bin/supervisor-proc-exit-listener --container-name telemetry
root 13 0.0 0.0 262984 3588 pts/0 Sl Feb05 0:00 /usr/sbin/rsyslogd -n -iNONE
root 53 1.2 0.4 1090896 40228 pts/0 Sl Feb05 3:25 /usr/sbin/dialout_client_cli -insecure -logtostderr -v 2
root 388 0.0 0.0 18188 3388 pts/1 Ss+ 00:40 0:00 bash
root 609 0.0 0.0 18192 3304 pts/2 Ss+ 01:06 0:00 bash
root 662 0.0 0.0 18188 3352 pts/3 Ss 04:03 0:00 bash
root 701 0.0 0.0 18192 3412 pts/4 Ss 04:10 0:00 bash
root 762 6.0 0.4 1095332 38300 pts/3 Sl+ 04:20 0:01 /usr/sbin/telemetry -logtostderr --noTLS --port 8080 --allow_no_client_auth -v=2
root 797 0.0 0.0 36632 2808 pts/4 R+ 04:21 0:00 ps aux

go Client on noTLS mode:
root@str-s6000-acs-10:/usr/sbin# ./gnmi_get -xpath_target COUNTERS_DB -xpath COUNTERS/Ethernet0 -target_addr localhost:8080 -notls
== getRequest:
prefix: <
target: "COUNTERS_DB"

path: <
elem: <
name: "COUNTERS"

elem: <
name: "Ethernet0"

encoding: JSON_IETF

== getResponse:
notification: <
timestamp: 1612585256888042017
prefix: <
target: "COUNTERS_DB"

update: <
path: <
elem: <
name: "COUNTERS"
>
elem: <
name: "Ethernet0"
>
>
val: <
json_ietf_val: "{"SAI_PORT_STAT_ETHER_IN_PKTS_128_TO_255_OCTETS":"0","SAI_PORT_STAT_ETHER_RX_OVERSIZE_PKTS":"0","SAI_PORT_STAT_ETHER_STATS_TX_NO_ERRORS":"0","SAI_PORT_STAT_ETHER_TX_OVERSIZE_PKTS":"0","SAI_PORT_STAT_IF_IN_BROADCAST_PKTS":"0","SAI_PORT_STAT_IF_IN_DISCARDS":"0","SAI_PORT_STAT_IF_IN_ERRORS":"0","SAI_PORT_STAT_IF_IN_MULTICAST_PKTS":"0","SAI_PORT_STAT_IF_IN_NON_UCAST_PKTS":"0","SAI_PORT_STAT_IF_IN_OCTETS":"0","SAI_PORT_STAT_IF_IN_UCAST_PKTS":"0","SAI_PORT_STAT_IF_IN_UNKNOWN_PROTOS":"0","SAI_PORT_STAT_IF_OUT_BROADCAST_PKTS":"0","SAI_PORT_STAT_IF_OUT_DISCARDS":"0","SAI_PORT_STAT_IF_OUT_ERRORS":"0","SAI_PORT_STAT_IF_OUT_MULTICAST_PKTS":"0","SAI_PORT_STAT_IF_OUT_NON_UCAST_PKTS":"0","SAI_PORT_STAT_IF_OUT_OCTETS":"0","SAI_PORT_STAT_IF_OUT_QLEN":"0","SAI_PORT_STAT_IF_OUT_UCAST_PKTS":"0","SAI_PORT_STAT_IN_DROPPED_PKTS":"0","SAI_PORT_STAT_IP_IN_UCAST_PKTS":"0","SAI_PORT_STAT_OUT_DROPPED_PKTS":"0","SAI_PORT_STAT_PAUSE_RX_PKTS":"0","SAI_PORT_STAT_PAUSE_TX_PKTS":"0","SAI_PORT_STAT_PFC_0_RX_PKTS":"0","SAI_PORT_STAT_PFC_0_TX_PKTS":"0","SAI_PORT_STAT_PFC_1_RX_PKTS":"0","SAI_PORT_STAT_PFC_1_TX_PKTS":"0","SAI_PORT_STAT_PFC_2_RX_PKTS":"0","SAI_PORT_STAT_PFC_2_TX_PKTS":"0","SAI_PORT_STAT_PFC_3_RX_PKTS":"0","SAI_PORT_STAT_PFC_3_TX_PKTS":"0","SAI_PORT_STAT_PFC_4_RX_PKTS":"0","SAI_PORT_STAT_PFC_4_TX_PKTS":"0","SAI_PORT_STAT_PFC_5_RX_PKTS":"0","SAI_PORT_STAT_PFC_5_TX_PKTS":"0","SAI_PORT_STAT_PFC_6_RX_PKTS":"0","SAI_PORT_STAT_PFC_6_TX_PKTS":"0","SAI_PORT_STAT_PFC_7_RX_PKTS":"0","SAI_PORT_STAT_PFC_7_TX_PKTS":"0"}"
>

c# client test with Channel.Insecure
D:\app\GnmiClientTool>GnmiClientTool.exe -d 10.3.147.237 -p 8080 -m false -h 60 -l Paths.txt -r sonic -b COUNTERS_DB -o false -t get
Destination IP: 10.3.147.237
Destination port: 8080
Secure mode: false
File containing list of paths: Paths.txt
Destination host is V4 address
Successfully created GRPC client
Adding path COUNTERS/Ethernet0 to request.
Notification count: 1

Notification no: 1
Notification at 02/06/2021 04:55:39.605 AM
Total updates: 1
COUNTERS/Ethernet0/:
{"SAI_PORT_STAT_ETHER_IN_PKTS_128_TO_255_OCTETS":"0","SAI_PORT_STAT_ETHER_RX_OVERSIZE_PKTS":"0","SAI_PORT_STAT_ETHER_STATS_TX_NO_ERRORS":"0","SAI_PORT_STAT_ETHER_TX_OVERSIZE_PKTS":"0","SAI_PORT_STAT_IF_IN_BROADCAST_PKTS":"0","SAI_PORT_STAT_IF_IN_DISCARDS":"0","SAI_PORT_STAT_IF_IN_ERRORS":"0","SAI_PORT_STAT_IF_IN_MULTICAST_PKTS":"0","SAI_PORT_STAT_IF_IN_NON_UCAST_PKTS":"0","SAI_PORT_STAT_IF_IN_OCTETS":"0","SAI_PORT_STAT_IF_IN_UCAST_PKTS":"0","SAI_PORT_STAT_IF_IN_UNKNOWN_PROTOS":"0","SAI_PORT_STAT_IF_OUT_BROADCAST_PKTS":"0","SAI_PORT_STAT_IF_OUT_DISCARDS":"0","SAI_PORT_STAT_IF_OUT_ERRORS":"0","SAI_PORT_STAT_IF_OUT_MULTICAST_PKTS":"0","SAI_PORT_STAT_IF_OUT_NON_UCAST_PKTS":"0","SAI_PORT_STAT_IF_OUT_OCTETS":"0","SAI_PORT_STAT_IF_OUT_QLEN":"0","SAI_PORT_STAT_IF_OUT_UCAST_PKTS":"0","SAI_PORT_STAT_IN_DROPPED_PKTS":"0","SAI_PORT_STAT_IP_IN_UCAST_PKTS":"0","SAI_PORT_STAT_OUT_DROPPED_PKTS":"0","SAI_PORT_STAT_PAUSE_RX_PKTS":"0","SAI_PORT_STAT_PAUSE_TX_PKTS":"0","SAI_PORT_STAT_PFC_0_RX_PKTS":"0","SAI_PORT_STAT_PFC_0_TX_PKTS":"0","SAI_PORT_STAT_PFC_1_RX_PKTS":"0","SAI_PORT_STAT_PFC_1_TX_PKTS":"0","SAI_PORT_STAT_PFC_2_RX_PKTS":"0","SAI_PORT_STAT_PFC_2_TX_PKTS":"0","SAI_PORT_STAT_PFC_3_RX_PKTS":"0","SAI_PORT_STAT_PFC_3_TX_PKTS":"0","SAI_PORT_STAT_PFC_4_RX_PKTS":"0","SAI_PORT_STAT_PFC_4_TX_PKTS":"0","SAI_PORT_STAT_PFC_5_RX_PKTS":"0","SAI_PORT_STAT_PFC_5_TX_PKTS":"0","SAI_PORT_STAT_PFC_6_RX_PKTS":"0","SAI_PORT_STAT_PFC_6_TX_PKTS":"0","SAI_PORT_STAT_PFC_7_RX_PKTS":"0","SAI_PORT_STAT_PFC_7_TX_PKTS":"0"}
[JsonIetfVal]

- How to verify it

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • [- ] 202012

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@pra-moh pra-moh requested a review from lguohan as a code owner February 6, 2021 04:36
@pra-moh pra-moh requested a review from hui-ma February 6, 2021 04:37
Copy link
Contributor

@hui-ma hui-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove BSL, NetStreamProxy and ANPLean term from this PR.

dockers/docker-sonic-telemetry/telemetry.sh Outdated Show resolved Hide resolved
@pra-moh pra-moh changed the title [StreamingTelemetry] add noTLS support for BSL scenario [StreamingTelemetry] add noTLS support for debug purpose Feb 8, 2021
@pra-moh
Copy link
Contributor Author

pra-moh commented Feb 16, 2021

retest this please

@pra-moh
Copy link
Contributor Author

pra-moh commented Feb 17, 2021

/azurepipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan lguohan merged commit 2e42ecb into sonic-net:master Feb 18, 2021
lguohan pushed a commit that referenced this pull request Feb 23, 2021
adding noTLS mode for debugging purpose
Removing config-set for port 8080. It fails to start telemetry if docker restarts in case on noTLS mode because it expects log_level config to be present as well.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
)

adding noTLS mode for debugging purpose
Removing config-set for port 8080. It fails to start telemetry if docker restarts in case on noTLS mode because it expects log_level config to be present as well.
AidanCopeland pushed a commit to Metaswitch/sonic-buildimage that referenced this pull request Apr 14, 2022
AidanCopeland pushed a commit to Metaswitch/sonic-buildimage that referenced this pull request Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants