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] add support for hwstatus in show muxcable status #1961

Merged
merged 9 commits into from
Mar 14, 2022

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Dec 6, 2021

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com

What I did

This PR supports for muxcable status command to support HWSTATUS as well.
the HWSTATUS could be either of these values
consistent/inconsistent/absent/Not-Y-Cable-Port/unknown

How I did it

Made the changes in both sonic-platform-daemons as well as sonic-utilities.
This PR is dependent on sonic-net/sonic-platform-daemons#219

How to verify it

Ran the changes on Arista7260cx3 platform as well as unit-tests

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)

admin@sonic:~$ show mux status
PORT         STATUS    HEALTH     HWSTATUS    LAST_SWITCHOVER_TIME
-----------  --------  ---------  ----------  ---------------------------
Ethernet0    active    unhealthy  consistent  2022-Mar-14 19:40:06.851394
Ethernet4    active    unhealthy  consistent  2022-Mar-14 19:40:06.863977
Ethernet8    active    unhealthy  consistent  2022-Mar-14 19:40:06.867504
Ethernet12   active    unhealthy  consistent  2022-Mar-14 19:40:07.149011
Ethernet16   active    unhealthy  consistent  2022-Mar-14 19:40:07.179085
Ethernet20   active    unhealthy  consistent  2022-Mar-14 19:40:07.174677
Ethernet40   active    healthy    consistent  2022-Mar-14 19:40:07.264452
Ethernet44   active    healthy    consistent  2022-Mar-14 19:40:07.452626
Ethernet48   active    unhealthy  consistent  2022-Mar-14 19:40:07.511005
Ethernet52   active    unhealthy  consistent  2022-Mar-14 19:40:07.644608
Ethernet56   active    unhealthy  consistent  2022-Mar-14 19:40:07.630628
Ethernet60   active    unhealthy  consistent  2022-Mar-14 19:40:07.739968
Ethernet64   active    unhealthy  consistent  2022-Mar-14 19:40:07.784666
Ethernet68   active    healthy    consistent  2022-Mar-14 19:40:07.728138
Ethernet72   active    healthy    consistent  2022-Mar-14 19:40:07.901363
Ethernet76   active    healthy    consistent  2022-Mar-14 19:40:07.957279
Ethernet80   active    healthy    consistent  2022-Mar-14 19:40:08.011392
Ethernet84   active    healthy    consistent  2022-Mar-14 19:40:08.149346
Ethernet104  active    healthy    consistent  2022-Mar-14 19:40:09.312243
Ethernet108  active    healthy    consistent  2022-Mar-14 19:40:09.312293
Ethernet112  active    healthy    consistent  2022-Mar-14 19:40:09.313652
Ethernet116  active    healthy    consistent  2022-Mar-14 19:40:09.313820
Ethernet120  active    healthy    consistent  2022-Mar-14 19:40:09.318580
Ethernet124  standby   unhealthy  consistent  2022-Mar-14 19:43:57.893061

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Dec 6, 2021

This pull request introduces 1 alert when merging da6b86e into 3714f63 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Dec 8, 2021

This pull request introduces 1 alert when merging 399f432 into 2e462ef - view on LGTM.com

new alerts:

  • 1 for Unused local variable

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 requested a review from prgeor January 31, 2022 02:14
prgeor
prgeor previously approved these changes Feb 2, 2022
Copy link
Contributor

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@vdahiya12 do we have any design document for these muxcable related configuration and CLI?

@prgeor prgeor self-assigned this Feb 10, 2022
wangxin pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Feb 24, 2022
What is the motivation for this PR?
Stemming from
sonic-net/sonic-utilities#1961
sonic-net/sonic-utilities#2067

New columns are added to show muxcable status outputp. Update show_cable_status to use --json to avoid parsing error.

Checked other usage of show muxcable status in sonic-mgmt, it's either using --json already, or for logging, or the current parse approach is compatible.

How did you do it?
Update show_cable_status to use --json to avoid parsing error.
…o hw_support

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Mar 3, 2022

This pull request introduces 1 alert when merging d8b71be into f872516 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Mar 4, 2022

This pull request introduces 1 alert when merging d39c243 into f872516 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vdahiya12
Copy link
Contributor Author

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vdahiya12
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vdahiya12
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vdahiya12 vdahiya12 requested a review from zjswhhh March 14, 2022 19:42
Copy link
Contributor

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@vdahiya12 vdahiya12 merged commit 45e6ac1 into sonic-net:master Mar 14, 2022
@qiluo-msft
Copy link
Contributor

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

vdahiya12 added a commit to vdahiya12/sonic-utilities that referenced this pull request Mar 16, 2022
PORT         STATUS    HEALTH     HWSTATUS    LAST_SWITCHOVER_TIME
-----------  --------  ---------  ----------  ---------------------------
Ethernet0    active    unhealthy  consistent  2022-Mar-14 19:40:06.851394
Ethernet4    active    unhealthy  consistent  2022-Mar-14 19:40:06.863977
Ethernet8    active    unhealthy  consistent  2022-Mar-14 19:40:06.867504
Ethernet12   active    unhealthy  consistent  2022-Mar-14 19:40:07.149011
Ethernet16   active    unhealthy  consistent  2022-Mar-14 19:40:07.179085
Ethernet20   active    unhealthy  consistent  2022-Mar-14 19:40:07.174677
Ethernet40   active    healthy    consistent  2022-Mar-14 19:40:07.264452
Ethernet44   active    healthy    consistent  2022-Mar-14 19:40:07.452626
Ethernet48   active    unhealthy  consistent  2022-Mar-14 19:40:07.511005
Ethernet52   active    unhealthy  consistent  2022-Mar-14 19:40:07.644608
Ethernet56   active    unhealthy  consistent  2022-Mar-14 19:40:07.630628
Ethernet60   active    unhealthy  consistent  2022-Mar-14 19:40:07.739968
Ethernet64   active    unhealthy  consistent  2022-Mar-14 19:40:07.784666
Ethernet68   active    healthy    consistent  2022-Mar-14 19:40:07.728138
Ethernet72   active    healthy    consistent  2022-Mar-14 19:40:07.901363
Ethernet76   active    healthy    consistent  2022-Mar-14 19:40:07.957279
Ethernet80   active    healthy    consistent  2022-Mar-14 19:40:08.011392
Ethernet84   active    healthy    consistent  2022-Mar-14 19:40:08.149346
Ethernet104  active    healthy    consistent  2022-Mar-14 19:40:09.312243
Ethernet108  active    healthy    consistent  2022-Mar-14 19:40:09.312293
Ethernet112  active    healthy    consistent  2022-Mar-14 19:40:09.313652
Ethernet116  active    healthy    consistent  2022-Mar-14 19:40:09.313820
Ethernet120  active    healthy    consistent  2022-Mar-14 19:40:09.318580
Ethernet124  standby   unhealthy  consistent  2022-Mar-14 19:43:57.893061

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
vdahiya12 added a commit that referenced this pull request Mar 21, 2022
Creating this PR because there was a conflict in #1961 and cherry-pick did not work

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com

What I did
This PR supports for muxcable status command to support HWSTATUS as well.
the HWSTATUS could be either of these values
consistent/inconsistent/absent/Not-Y-Cable-Port/unknown

How I did it
Made the changes in both sonic-platform-daemons as well as sonic-utilities.
This PR is dependent on sonic-net/sonic-platform-daemons#219

How to verify it
Ran the changes on Arista7260cx3 platform as well as unit-tests

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-Mar-14 19:40:06.851394
Ethernet4    active    unhealthy  consistent  2022-Mar-14 19:40:06.863977
Ethernet8    active    unhealthy  consistent  2022-Mar-14 19:40:06.867504
Ethernet12   active    unhealthy  consistent  2022-Mar-14 19:40:07.149011
Ethernet16   active    unhealthy  consistent  2022-Mar-14 19:40:07.179085
Ethernet20   active    unhealthy  consistent  2022-Mar-14 19:40:07.174677
Ethernet40   active    healthy    consistent  2022-Mar-14 19:40:07.264452
Ethernet44   active    healthy    consistent  2022-Mar-14 19:40:07.452626
Ethernet48   active    unhealthy  consistent  2022-Mar-14 19:40:07.511005
Ethernet52   active    unhealthy  consistent  2022-Mar-14 19:40:07.644608
Ethernet56   active    unhealthy  consistent  2022-Mar-14 19:40:07.630628
Ethernet60   active    unhealthy  consistent  2022-Mar-14 19:40:07.739968
Ethernet64   active    unhealthy  consistent  2022-Mar-14 19:40:07.784666
Ethernet68   active    healthy    consistent  2022-Mar-14 19:40:07.728138
Ethernet72   active    healthy    consistent  2022-Mar-14 19:40:07.901363
Ethernet76   active    healthy    consistent  2022-Mar-14 19:40:07.957279
Ethernet80   active    healthy    consistent  2022-Mar-14 19:40:08.011392
Ethernet84   active    healthy    consistent  2022-Mar-14 19:40:08.149346
Ethernet104  active    healthy    consistent  2022-Mar-14 19:40:09.312243
Ethernet108  active    healthy    consistent  2022-Mar-14 19:40:09.312293
Ethernet112  active    healthy    consistent  2022-Mar-14 19:40:09.313652
Ethernet116  active    healthy    consistent  2022-Mar-14 19:40:09.313820
Ethernet120  active    healthy    consistent  2022-Mar-14 19:40:09.318580
Ethernet124  standby   unhealthy  consistent  2022-Mar-14 19:43:57.893061

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
This PR updates the following commits in sonic-utilities

582d740 (HEAD -> 202012, origin/202012) [show] add support for hwstatus in show muxcable status (sonic-net#1961) (sonic-net#2105)


Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants