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

Handle non-front-panel ports in is_rj45_port #2327

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

stephenxs
Copy link
Collaborator

Handle the cases that a port is not a front-panel port in is_rj45_port
Add mock test to cover the logic

Signed-off-by: Stephen Sun stephens@nvidia.com

What I did

How I did it

How to verify it

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)

Handle the cases that a port is not a front-panel port in is_rj45_port
Add mock test to cover the logic

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs marked this pull request as ready for review August 23, 2022 08:38
@anamehra
Copy link
Contributor

@abdosi , @judyjoseph please add this to 202205. Thanks

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@liat-grozovik liat-grozovik requested a review from prgeor August 24, 2022 08:59
@@ -133,7 +133,7 @@ def is_rj45_port(port_name):

Copy link
Contributor

Choose a reason for hiding this comment

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

Did a bit of debugging and see that the below code section

        if not platform_porttab_mapping_read:
            platform_sfputil_read_porttab_mappings()

is actually creating this logs which @mlok-nokia was pointing out

Aug 25 05:50:23.693785 str2--lc1-1 ERR Chassis: :- initializeGlobalConfig: SonicDBConfig Global config is already initialized

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks. I'll check it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@judyjoseph if possible, can you share more details, like call stack? I don't have a multi-chassis testbed, it will be time-consuming for me to find it out. thank you.

@judyjoseph judyjoseph self-requested a review August 25, 2022 06:08
@prgeor prgeor merged commit 52ac8ac into sonic-net:master Aug 25, 2022
yxieca pushed a commit that referenced this pull request Aug 26, 2022
* Handle non-front-panel ports in is_rj45_port

Handle the cases that a port is not a front-panel port in is_rj45_port
Add mock test to cover the logic

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Use APIs in sonic_platform_base

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs deleted the handle-backend-ports branch September 14, 2022 13:59
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Nov 21, 2022
* Handle non-front-panel ports in is_rj45_port

Handle the cases that a port is not a front-panel port in is_rj45_port
Add mock test to cover the logic

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Use APIs in sonic_platform_base

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Signed-off-by: Stephen Sun <stephens@nvidia.com>
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.

5 participants