-
Notifications
You must be signed in to change notification settings - Fork 26
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
Collect ICMP packet loss information #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a method to reset the packet loss ratio other than restarting the linkmgrd?
Good question. I think we do? Once the ping is back working, we can simply reset so that the ratio number is more meaningful. |
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Summary: Fixes # (issue) This PR is to make linkmgrd subscribe events from ROUTE_TABLE in State DB, and react accordingly: - If any of the two default route state appears to be 'na', linkmgrd should switch to standby. - If both are 'ok', there will be a mux state probing and what happens next depends on linkmgrd state machine and the probing response. Type of change: New feature Motivation for this PR: To make linkmgrd subscribe state DB route event, and handle the switchovers. Documentation: Related PR: sonic-net/sonic-swss#2009
4a2405c
to
f3b5966
Compare
2121f60
to
bd885ee
Compare
…c-linkmgrd into collectIcmpLossInfo
1559298
to
14aea6a
Compare
… ICMP packet loss data (#2046) Stemming from sonic-net/sonic-linkmgrd#14 sign-off: Jing Zhang zhangjing@microsoft.com #### What I did Added support to retrieve and reset ICMP packet loss data in state db for muxcable. #### How I did it Changes made in show/muxcable.py and config/muxcable.py #### How to verify it - Added unit tests. - Tested the command lines on testbeds. - Ran dualtor_io/test_link_failure.py. #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed) ``` show muxcable pckloss <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_loss_count 10439 Ethernet96 pck_expected_count 11406 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset Ethernet96 admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_expected_count 0 Ethernet96 pck_loss_count 0 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset all``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset all admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet68 PORT COUNT VALUE ---------- ------------------ ------- Ethernet68 pck_loss_count 0 Ethernet68 pck_expected_count 3 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet68 link_prober_unknown_start 2022-Jan-27 19:47:17.702760 Ethernet68 link_prober_unknown_end 2022-Jan-27 22:28:36.756113 ```
… ICMP packet loss data (sonic-net#2046) Stemming from sonic-net/sonic-linkmgrd#14 sign-off: Jing Zhang zhangjing@microsoft.com Added support to retrieve and reset ICMP packet loss data in state db for muxcable. Changes made in show/muxcable.py and config/muxcable.py - Added unit tests. - Tested the command lines on testbeds. - Ran dualtor_io/test_link_failure.py. ``` show muxcable pckloss <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_loss_count 10439 Ethernet96 pck_expected_count 11406 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset Ethernet96 admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_expected_count 0 Ethernet96 pck_loss_count 0 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset all``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset all admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet68 PORT COUNT VALUE ---------- ------------------ ------- Ethernet68 pck_loss_count 0 Ethernet68 pck_expected_count 3 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet68 link_prober_unknown_start 2022-Jan-27 19:47:17.702760 Ethernet68 link_prober_unknown_end 2022-Jan-27 22:28:36.756113 ```
… ICMP packet loss data (#2046) (#2094) Stemming from sonic-net/sonic-linkmgrd#14 sign-off: Jing Zhang zhangjing@microsoft.com Added support to retrieve and reset ICMP packet loss data in state db for muxcable. Changes made in show/muxcable.py and config/muxcable.py - Added unit tests. - Tested the command lines on testbeds. - Ran dualtor_io/test_link_failure.py. ``` show muxcable pckloss <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_loss_count 10439 Ethernet96 pck_expected_count 11406 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset Ethernet96 admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_expected_count 0 Ethernet96 pck_loss_count 0 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset all``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset all admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet68 PORT COUNT VALUE ---------- ------------------ ------- Ethernet68 pck_loss_count 0 Ethernet68 pck_expected_count 3 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet68 link_prober_unknown_start 2022-Jan-27 19:47:17.702760 Ethernet68 link_prober_unknown_end 2022-Jan-27 22:28:36.756113 ```
… ICMP packet loss data (#2046) Stemming from sonic-net/sonic-linkmgrd#14 sign-off: Jing Zhang zhangjing@microsoft.com #### What I did Added support to retrieve and reset ICMP packet loss data in state db for muxcable. #### How I did it Changes made in show/muxcable.py and config/muxcable.py #### How to verify it - Added unit tests. - Tested the command lines on testbeds. - Ran dualtor_io/test_link_failure.py. #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed) ``` show muxcable pckloss <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_loss_count 10439 Ethernet96 pck_expected_count 11406 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset <port_name>``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset Ethernet96 admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 PORT COUNT VALUE ---------- ------------------ ------- Ethernet96 pck_expected_count 0 Ethernet96 pck_loss_count 0 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet96 link_prober_unknown_start 2022-Jan-27 19:47:17.819699 Ethernet96 link_prober_unknown_end 2022-Jan-27 22:28:36.736928 ``` ```config muxcable pckloss reset all``` ``` admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset all admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet68 PORT COUNT VALUE ---------- ------------------ ------- Ethernet68 pck_loss_count 0 Ethernet68 pck_expected_count 3 PORT EVENT TIME ---------- ------------------------- --------------------------- Ethernet68 link_prober_unknown_start 2022-Jan-27 19:47:17.702760 Ethernet68 link_prober_unknown_end 2022-Jan-27 22:28:36.756113 ```
Description of PR
Summary:
Fixes # (issue)
This PR is to collect ICMP packet loss information.
sign-off: Jing Zhang zhangjing@microsoft.com
Type of change
Approach
What is the motivation for this PR?
When ICMP heartbeat loss happens, we want to know how long it lasts. We also want to collect the packet loss ratio information.
How did you do it?
How did you verify/test it?
Tested on dual testbed.
Table entries created as expected:
Before ICMP responder was turned on:
After running a link_failure test case, link_prober_unknown_start and link_prober_unknown_end are updated:
After resetting the packet loss counts:
Any platform specific information?
Documentation