Skip to content

Addition of prober_type in config and show commands for muxcable#3884

Merged
qiluo-msft merged 5 commits intosonic-net:masterfrom
harjotsinghpawra:harjosin_icmp
May 22, 2025
Merged

Addition of prober_type in config and show commands for muxcable#3884
qiluo-msft merged 5 commits intosonic-net:masterfrom
harjotsinghpawra:harjosin_icmp

Conversation

@harjotsinghpawra
Copy link
Contributor

  • New prober_type harware is being added to linkmgrd. This is config knob addition for the specific field in mUX_CABLE
  • show command show muxcable config edited to add prober_type field

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)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 15, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@harjotsinghpawra
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3884 in repo sonic-net/sonic-utilities

@harjotsinghpawra
Copy link
Contributor Author

Hi can someone help azure runs are cancelled because of no apparent reason , no reviewer is assigned so not sure whom to reach out

@zjswhhh zjswhhh requested review from Copilot and zjswhhh May 21, 2025 04:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new "prober_type" field to muxcable commands so that both configuration and output (table and JSON) include the prober type setting.

  • Added "prober_type" to muxcable configuration and show commands
  • Updated tests and mock configuration to validate the new field

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/muxcable_test.py Updated test outputs and added tests for the prober_type command
tests/mock_tables/config_db.json Included prober_type entries for specific ports
show/muxcable.py Updated table and JSON dump to display the prober_type field
config/muxcable.py Added a new command and helper to update prober_type in configdb
Comments suppressed due to low confidence (1)

config/muxcable.py:439

  • [nitpick] For consistency and clarity with other parts of the code, consider renaming the variable 'asic_index' to 'asic_id' within this logical block.
if port is not None and port != "all":

click.echo(tabulate(print_peer_tor, headers=headers))
if is_dualtor_active_active[0]:
headers = ['port', 'state', 'ipv4', 'ipv6', 'cable_type', 'soc_ipv4', 'soc_ipv6']
headers = ['port', 'state', 'ipv4', 'ipv6', 'cable_type', 'soc_ipv4', 'soc_ipv6', 'prober_type']
Copy link

Copilot AI May 21, 2025

Choose a reason for hiding this comment

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

Consider refactoring the header definitions into a shared constant to reduce duplication across similar code blocks.

Copilot uses AI. Check for mistakes.
@zjswhhh
Copy link
Contributor

zjswhhh commented May 21, 2025

Hi can someone help azure runs are cancelled because of no apparent reason , no reviewer is assigned so not sure whom to reach out

@harjotsinghpawra - I tried triggering the pipeline, but it was cancelled for same reason. Can you do a rebase and push for a rerun?

ctx.fail("Invalid ConfigDB. Error: {}".format(e))


def update_configdb_prober_type(config_db, port, val):
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to carry over prober type in update_configdb_pck_loss_data as well?

Copy link
Contributor Author

@harjotsinghpawra harjotsinghpawra May 22, 2025

Choose a reason for hiding this comment

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

yes , we need to carry soc_ipv4 field also over to update_configdb_pck_loss_data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed , updated the diff

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

lgtm

@zjswhhh
Copy link
Contributor

zjswhhh commented May 22, 2025

Hi @qiluo-msft - please help merge.

@qiluo-msft qiluo-msft merged commit b106a82 into sonic-net:master May 22, 2025
7 checks passed
nmoray pushed a commit to nmoray/sonic-utilities that referenced this pull request Jun 25, 2025
…ic-net#3884)

New prober_type harware is being added to linkmgrd. This is config knob addition for the specific field in mUX_CABLE
show command show muxcable config edited to add prober_type field
wangxin added a commit that referenced this pull request Jul 17, 2025
wangxin added a commit that referenced this pull request Jul 22, 2025
…ble (#3884)" (#3979)

This reverts commit b106a82.

This PR caused issue: #3978

Need to revert it to unblock submodule advance for sonic-utilities.
qiluo-msft pushed a commit that referenced this pull request Sep 9, 2025
…4013)

Orignal PR was reverted because of pre-test failure as part of following issue
#3978

orignal PR #3884

What I did
How I did it
Fixed show mux config to one format no matter if soc_ipv4 is given or not

How to verify it
Ran the test_pretest as part of sonic_mgmt

Previous command output (if the output of a command-line utility has changed)
port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6

Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32
Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32

New command output (if the output of a command-line utility has changed)
port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6 prober_type

Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 software
Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 software
YairRaviv pushed a commit to YairRaviv/sonic-utilities that referenced this pull request Jan 12, 2026
…ble (sonic-net#3884)" (sonic-net#3979)

This reverts commit b106a82.

This PR caused issue: sonic-net#3978

Need to revert it to unblock submodule advance for sonic-utilities.
YairRaviv pushed a commit to YairRaviv/sonic-utilities that referenced this pull request Jan 12, 2026
…onic-net#4013)

Orignal PR was reverted because of pre-test failure as part of following issue
sonic-net#3978

orignal PR sonic-net#3884

What I did
How I did it
Fixed show mux config to one format no matter if soc_ipv4 is given or not

How to verify it
Ran the test_pretest as part of sonic_mgmt

Previous command output (if the output of a command-line utility has changed)
port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6

Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32
Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32

New command output (if the output of a command-line utility has changed)
port state ipv4 ipv6 cable_type soc_ipv4 soc_ipv6 prober_type

Ethernet8 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 software
Ethernet16 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 software
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.

5 participants