[interface_facts] improve interface facts comparing performance#326
[interface_facts] improve interface facts comparing performance#326yxieca merged 1 commit intosonic-net:masterfrom
Conversation
ansible/library/interface_facts.py
Outdated
There was a problem hiding this comment.
John Arnold [](start = 8, length = 11)
change to your name.
ansible/library/interface_facts.py
Outdated
There was a problem hiding this comment.
all_ports [](start = 19, length = 9)
up_ports
ansible/library/interface_facts.py
Outdated
There was a problem hiding this comment.
except_port [](start = 49, length = 11)
ignore_ports
There was a problem hiding this comment.
This parameter has been removed.
Thanks,
Ying
ansible/library/interface_facts.py
Outdated
ansible/library/interface_facts.py
Outdated
There was a problem hiding this comment.
except_port [](start = 4, length = 11)
ignore_ports
There was a problem hiding this comment.
This parameter has been removed.
Thanks,
Ying
ansible/library/interface_facts.py
Outdated
There was a problem hiding this comment.
should we also add down_ports to assert if the port is down?
There was a problem hiding this comment.
The check exists in link_flap test instead of in the interface_fact.py.
Did I understand your question correctly?
Thanks,
Ying
There was a problem hiding this comment.
the intfs_to_exclude is the one that is down? then why not change except_port to down_port and then you can verify the down port also using interface_facts?
There was a problem hiding this comment.
I didn't do that for 2 reasons:
- if I include the 'down_port' in the return list, that complicates the test for up ports. If not, then I have to return another list for expected down but up ports.
- testing of intfs_to_exclude in ansible is only one test and it takes the same amount of time of testing if a returned list is empty.
Allow callers of interface_facts to pass in a list of ports of that are expected to be up. The script will check their link status, return list of ports that has link went down unexpectedly. The caller, instead of looping in ansible to check all interface status, can simply check if the link down list is empty.
* msft_github/master: Update README.testbed.Setup.md call test by test case name (sonic-net#362) [testbed] fanout add rootfanout connect when deploying fanout switch (sonic-net#368) [lag_2] enable lag_2 test on t0-116 topology (sonic-net#390) [deployment] add missing quotation marks that breaks (sonic-net#386) Finalize T0-116 topology (sonic-net#381) Directed broadcast Test (sonic-net#377) [change_mac]: Change MAC address formatting (sonic-net#380) add github template helping report issues and submit pull request (sonic-net#378) Fixing logic to identify proper 'port_config.ini' file. (sonic-net#376) [sensors] add sensor definitions for arista 7260/7060 (sonic-net#371) [pfc_wd]: Rework for P2 (sonic-net#363) [test]: Update BGP speaker test (sonic-net#236) Add vm_resument which restore paused VMs (sonic-net#297) Copy acsbase files to ptf before ptf_runner (sonic-net#366) Modify dhcp_servers IPs in order to fix DHCP relay test (sonic-net#364) [templates]: Remove trailing space in t1-lag minigraph template (sonic-net#360) [fastreboot test]: Add "fanout_listener" for MLNX fanout switches (sonic-net#353) patch t0 portchannel name to 15 chars (sonic-net#358) [process_checker]: Add the process_checker playbook (sonic-net#349) fix issue 354 (sonic-net#355) Update build instruction for docker-ptf.gz and docker-sonic-mgmt.gz [upgrade_sonic]: Add upgrade_sonic as a convenience script to upgrade the device with an image (sonic-net#338) [acl test]: Generate switch info file. (sonic-net#346) fix t0 templates for generate minigraph (sonic-net#344) [loganalyzer_end.yml]: Rename expected_matches (sonic-net#345) [minigraph_facts]: Add the missing brace (sonic-net#342) [Arista7260cx3] update topology t0-116 to include port 17 and 19 (sonic-net#340) [fdb test] help switch populate mac table before starting the test (sonic-net#341) [arista7260cx3] include port 18 and 20 as 50G breakout ports (sonic-net#339) Loganalyzer enhancements (sonic-net#321) [plugin]: Adding Dell platform in switch connection plugin (sonic-net#333) modified files to get lag members from minigraph (sonic-net#327) [minigraph] modify script to fit the latest configuration method (sonic-net#331) [minigraph_fact] add port mapping for 5 INGRASYS switches (sonic-net#336) [sensors] add sensor data for 5 INGRASYS switches (sonic-net#335) [minigraph-template]: Add ACL L3 and mirroring tables to minigraph template. (sonic-net#330) [acltb-test]: Addopt ACL test to acl-loader. (sonic-net#299) [everflow test]: Addopt Everflow testbed test to acl-loader. (sonic-net#300) Remove hard-coded bgp speaker asn number, fetch from DUT (sonic-net#329) Port alias mapping added for Arista-7060CX-32S-C32 (sonic-net#328) Adding if case for S6100 platform to get port details (sonic-net#314) [interface_facts] improve interface facts checking performance (sonic-net#326) [fdb] Hard code port layout to enable fdb test on t0-116 topology (sonic-net#322) (sonic-net#320) [fib] Hard code port layout to enable fib test on t0-116 topology (sonic-net#322) [fib, fdb] Allow fib and fdb test info files to contain empty lines and comments (sonic-net#323) [lag_test]: Correct typo error for lag tests (sonic-net#325) [link flap test] improve performance of link flap test (sonic-net#319)
…onic-net#18159 (sonic-net#326) Cherry-pick generate_topo.py changes in sonic-net#18159 only into 202412 to avoid conflict. Removed LT2 part of change as it's not needed in 202412. > ### Description of PR > Summary: Adding LT2 topology and support for generate_topo. We needed to modify the PortChannel name to only use `PortChannel10` for multi-asic only to avoid the interface name more than 15 characters which will violate linux interface name. > > Fixes # (issue) 32099755 > > ### Type of change > * [ ] Bug fix > * [ ] Testbed and Framework(new/improvement) > * [ ] New Test case > > * [ ] Skipped for non-supported platforms > * [ ] Test case improvement > > ### Back port request > * [ ] 202012 > * [ ] 202205 > * [ ] 202305 > * [ ] 202311 > * [ ] 202405 > * [ ] 202411 > > ### Approach > #### What is the motivation for this PR? > Add LT2 minigraph changes and topology > > #### How did you do it? > #### How did you verify/test it? > #### Any platform specific information? > #### Supported testbed topology if it's a new test case? > ### Documentation
…nic-net#12870) platform-daemon: * f057b9a 2022-11-30 | [ycabled] fix minor appl_db retrieving logic for update (sonic-net#319) (HEAD -> 202205) [vdahiya12] * 9983106 2022-11-15 | [chassisd] update chassisd to write fabric and lc asics on sep erate table (sonic-net#311) (HEAD -> 202205) [arlakshm] * 8324c26 2022-11-10 | [ycabled] fix exception-handling logic for ycabled (sonic-net#306) [vdahiya12] * eaf73f8 2022-11-07 | [ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread (sonic-net#303) [vdahiya12] platform-common: * 4b528a0 2022-11-21 | Add missing PM and VDM related EEPROM read (sonic-net#326) (HEAD -> 202205) [mihirpat1] * 8ca6c17 2022-11-14 | Initial commit (sonic-net#323) [mihirpat1] * 47f87d9 2022-11-23 | EEPROM/DOM Info: The Compliance Code will show "unknown" by using FINISAR 10G LR XCVR (sonic-net#319) [ChiouRung Haung] * 6273850 2022-06-01 | [ssd_generic] Fix innodisk health regex (sonic-net#287) [Alexander Allen] Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Ying Xie <ying.xie@microsoft.com>
…tomatically (sonic-net#16331) src/sonic-linux-kernel * db00eb9 - (HEAD -> 202205, origin/202205) PATCH] net: allow user to set metric on default route learned via Router Advertisement (sonic-net#326) (2 days ago) [abdosi]
sonic-net#12791) * Update submodule sonic-utilities 72b9cf9 [psushow & psuutil] Support PSU power threshold checking (sonic-net#2326) dfdc92e Revert "Support the bandit check by GitHub Action (sonic-net#2358)" (sonic-net#2509) 85638b2 YANG Validation for ConfigDB Updates: DEVICE_METADATA, SNMP, SNMP_COMMUNITY tables (sonic-net#2481) da44d71 YANG Validation for ConfigDB Updates: PORT_STORM_CONTROL, PORT_QOS_MAP, BUFFER_PROFILE, BUFFER_PG, BUFFER_QUEUE, BUFFER_POOL, FEATURE, DEFAULT_LOSSLESS_BUFFER_PARAMETER tables (# ba9b628 [sfp] Fix issue: Application Advertisement is not well formatted (sonic-net#2491) Signed-off-by: Stephen Sun <stephens@nvidia.com> * Update submodule sonic-platform-daemons ed818f8 [PSU daemon] Support PSU power threshold checking (sonic-net#288) 707a720 [chassisd] update chassisd to write fabric and lc asics on sep erate table (sonic-net#311) e8c5657 [ycabled] fix exception-handling logic for ycabled (sonic-net#306) 905874d [ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread (sonic-net#303) 510d330 Fix typo in xcvrd (sonic-net#313) 9ae551f [ycabled] add support for detach mode in 'active-active' topology (sonic-net#309) 82fc7a6 Added filtering logic to send filtered fields from DB event (sonic-net#307) 8a2dad9 [ycabled] fix no port/state returned by grpc server (sonic-net#308) 4ea12cf Fix xcvrd to support 400G ZR optic (sonic-net#293) 23b6970 [ycabled] fix naming error for error condition for CLI handling (sonic-net#302) 501abb2 [ycabled] add some exception catching logic to some vendor specific API's (sonic-net#301) 534f839 [ycabled] add support for getting grpc secerts via shared file (sonic-net#298) 3622aac Remove shell=True (sonic-net#300) 143422b add support to execute new ycable API's, add datetime field to mux_info (sonic-net#297) 6522c46 [ycabled] add notification for gRPC connection state transitions to IDLE/TRANSIENT_FAILURE (sonic-net#295) 4b3b238 Install libyang to azure pipeline (sonic-net#292) 8ff5f37 Use get() to fetch default value from dictionary for port admin_status sonic-net#286 b03cc74 [Xcvrd] Soak duplicate events and process only updated interested events (sonic-net#285) 3acb171 [ycable] cleanup logic for creating grpc future ready (sonic-net#289) ce3b6db [ycabled] fix insert events from xcvrd;cleanup some mux toggle logic (sonic-net#287) Signed-off-by: Stephen Sun <stephens@nvidia.com> * Update submodule sonic-platform-common 7c48be2 Add warning/critical thresholds for PSU power (sonic-net#304) f5ba0d0 Add missing PM and VDM related EEPROM read (sonic-net#326) 02dd597 implement CMIS set_laser_freq to support 100GHz grid space (sonic-net#294) Signed-off-by: Stephen Sun <stephens@nvidia.com> * Revert "Update submodule sonic-platform-daemons" This reverts commit aea648b157b5083a5ba59fb2cfc2ae2a61779549. Signed-off-by: Stephen Sun <stephens@nvidia.com>
…onic-net#13693 Why I did it advance sonic-platform-daemons 7219b56 - [Xcvrd]: Fix optics insertion/removal not detected (Add Ingrasys S9100 platform submodule sonic-net#333) (3 days ago) [Prince George] 9b15ccf - add data for telemtery enhancement for 'active-active' cable type ([platform]: add support for Force10-Z9100 32x100G sonic-net#332) (3 days ago) [vdahiya12] 1c7dba6 - Fix bug where transceiver info is missing after port breakout change ([teamd] Fix a bug in sonic-net#305 that will break teamd sonic-net#329) (3 days ago) [Tal Berlowitz] 07b8f3c - Xcvrd should restart if any child thread crashes (Update Mellanox SAI git reference sonic-net#326) (3 days ago) [mihirpat1] How I did it How to verify it
…tomatically (sonic-net#16330) #### Why I did it src/sonic-linux-kernel ``` * 10d7946 - (HEAD -> 202211, origin/202211) PATCH] net: allow user to set metric on default route learned via Router Advertisement (sonic-net#326) (8 hours ago) [abdosi] ``` #### How I did it #### How to verify it #### Description for the changelog
Allow callers of interface_facts to pass in a list of ports of that
are expected to be up. The script will check their link status, return
list of ports that has link went down unexpectedly.
The caller, instead of looping in ansible to check all interface status,
can simply check if the link down list is empty.