Exclude the DPU ports from the probed active ports in ipfwd/test_nhop_group.py tests#20668
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@wangxin @xwjiang-ms @roy-sror would you please review and merge if possilbe? |
tests/common/devices/sonic.py
Outdated
| # Ping for some time to get ARP Re-learnt. | ||
| # We might have to tune it further if needed. | ||
| if (v["admin"] == "up" and v["oper_state"] == "up" and | ||
| v["peer_ipv4"] != "N/A" and |
There was a problem hiding this comment.
@nikamirrr can we do this based on port "role" and skip if it is "Dpc"?
There was a problem hiding this comment.
This function selects active ip interfaces
def active_ip_interfaces(self, ip_ifs, tbinfo, ns_arg=DEFAULT_NAMESPACE, intf_num="all"):
And the ip_ifs argument is supplied by ip_ifs = self.show_ip_interface()["ansible_facts"]["ip_interfaces"]
That function just parses the output of show ip interfaces and there is no role information for the port
I tried looking at mg_facts = self.get_extended_minigraph_facts(tbinfo, ns_arg) data, but there is no role information either.
Would you please hint where I can find the port role or what would be the best way to refactor?
I have been looking for the least intrusive way to fix the test.
There was a problem hiding this comment.
@nikamirrr role is part of config_facts I believe.
Alternatively, once this change from cisco is merged, you can use mg_facts to get role as well.
…est_nhop_group.py tests
c38e655 to
3c106e4
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@bingwang-ms could you please sign off as well as this is generic sonic code? |
…est_nhop_group.py tests (sonic-net#20668)
|
Cherry-pick PR to msft-202506: Azure/sonic-mgmt.msft#886 |
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
…est_nhop_group.py tests (sonic-net#20668)
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: YiFan Wang <yifan@nexthop.ai>
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
…est_nhop_group.py tests (sonic-net#20668) Signed-off-by: Yael Tzur <ytzur@nvidia.com>
…est_nhop_group.py tests (sonic-net#20668)
…est_nhop_group.py tests (sonic-net#20668)
Description of PR
Smart switch with the DPUs in the light mode has extra ports that have N/A peer IPs.
Setting the test to ignore those ports when looking for the active switch port.
Port and IP output, DPU ports have N/A as peer IP
Summary:
Fixes # (issue): N/A
Type of change
Back port request
Approach
What is the motivation for this PR?
Failing switch tests for the smart switch in the light mode
How did you do it?
Introduced the check to skip ports without a peer IP.
How did you verify/test it?
Re-ran the tests with the updated code. Tests passed
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
N/A
Documentation
N/A