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

show linkmgrd status in show mux status #2254

Merged
merged 3 commits into from
Jul 5, 2022

Conversation

zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented Jul 5, 2022

What I did

Replace status in show mux status with APP DB MUX_CABLE_TABLE:<port_name>, which is written by linkmgrd and indicates linkmgrd's state transition.

This change is required for active-active dualtor setup. In active-active setup, we care more about whether state transition happens on ToR side. In tests, we want to see if linkmgrd makes immediate reaction on link state changes. If we continue to use STATE DB entries, when gRPC is not available, we will get unknow in show mux status, which is not informatic and not the actual value we want to check.

sign-off: Jing Zhang [email protected]

How I did it

Use APP DB entries instead of STATE DB.

Move STATE DB to column SERVER_STATUS.

How to verify it

Unit tests with mock DB values.
Tests on dual testbeds.

Previous command output (if the output of a command-line utility has changed)

PORT         STATUS    HEALTH     HWSTATUS    LAST_SWITCHOVER_TIME
-----------  --------  ---------  ----------  ---------------------------
Ethernet0    active    unhealthy  consistent  2022-Jul-05 18:04:14.994631
Ethernet4    active    unhealthy  consistent  2022-Jul-05 18:04:14.762461
Ethernet8    active    unhealthy  consistent  2022-Jul-05 18:04:15.122499
Ethernet12   active    unhealthy  consistent  2022-Jul-05 18:04:15.289365
Ethernet16   active    unhealthy  consistent  2022-Jul-05 18:04:15.329785
Ethernet20   active    unhealthy  consistent  2022-Jul-05 18:04:13.423934
Ethernet24   active    unhealthy  consistent  2022-Jul-05 18:04:13.163920
Ethernet28   active    unhealthy  consistent  2022-Jul-05 18:04:14.146729
...

New command output (if the output of a command-line utility has changed)

PORT         STATUS    SERVER_STATUS    HEALTH     HWSTATUS    LAST_SWITCHOVER_TIME
-----------  --------  ---------------  ---------  ----------  ---------------------------
Ethernet0    standby   standby          unhealthy  consistent  2022-Jul-05 18:01:44.211843
Ethernet4    standby   standby          unhealthy  consistent  2022-Jul-05 18:01:47.041878
Ethernet8    standby   standby          unhealthy  consistent  2022-Jul-05 18:01:47.146947
Ethernet12   standby   standby          unhealthy  consistent  2022-Jul-05 18:01:42.727104
Ethernet16   standby   standby          unhealthy  consistent  2022-Jul-05 18:01:43.583465
Ethernet20   standby   standby          unhealthy  consistent  2022-Jul-05 18:01:45.414725
Ethernet24   standby   standby          unhealthy  consistent  2022-Jul-05 18:01:46.283276
Ethernet28   standby   standby          unhealthy  consistent  2022-Jul-05 18:01:46.883513

@zjswhhh zjswhhh requested a review from vdahiya12 July 5, 2022 20:01
@zjswhhh
Copy link
Contributor Author

zjswhhh commented Jul 5, 2022

Per offline discussion with @yxieca, will add a separate CLI for tunnel route, to show both soc ip, server ip tunnel routes.

@zjswhhh zjswhhh merged commit c7389bd into sonic-net:master Jul 5, 2022
@zjswhhh zjswhhh deleted the show_mux_status_tunne branch July 5, 2022 20:41
yxieca pushed a commit that referenced this pull request Jul 5, 2022
What I did
Replace status in show mux status with APP DB MUX_CABLE_TABLE:<port_name>, which is written by linkmgrd and indicates linkmgrd's state transition.

This change is required for active-active dualtor setup. In active-active setup, we care more about whether state transition happens on ToR side. In tests, we want to see if linkmgrd makes immediate reaction on link state changes. If we continue to use STATE DB entries, when gRPC is not available, we will get unknow in show mux status, which is not informatic and not the actual value we want to check.

sign-off: Jing Zhang [email protected]

How I did it
Use APP DB entries instead of STATE DB.

Move STATE DB to column SERVER_STATUS.

How to verify it
Unit tests with mock DB values.
Tests on dual testbeds.
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jul 7, 2022
Update sonic-utilities submodule pointer to include the following:
* [show] add new CLI to show tunnel route objects ([sonic-net#2255](sonic-net/sonic-utilities#2255))
* Add support for IP interface loopback action ([sonic-net#2192](sonic-net/sonic-utilities#2192))
* Update load minigraph to load backend acl ([sonic-net#2236](sonic-net/sonic-utilities#2236))
* show linkmgrd status in  ([sonic-net#2254](sonic-net/sonic-utilities#2254))

Signed-off-by: dprital <[email protected]>
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.

3 participants