Skip to content

Example branch#1

Closed
AharonMalkin wants to merge 853 commits intomasterfrom
example_branch
Closed

Example branch#1
AharonMalkin wants to merge 853 commits intomasterfrom
example_branch

Conversation

@AharonMalkin
Copy link
Copy Markdown
Owner

Description of PR

Summary:
BLA BLA BLA

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

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

wangxin and others added 30 commits January 25, 2024 14:28
…#9452)

Approach
What is the motivation for this PR?
The upgrade_image.py script defined some bool type arguments. However, "action" is not specified while defining these arguments.

The result is that if user pass in arguments like below, the argument will be still be evaluated to True as python by default casting string "False" to bool value True.

./upgrade_image.py --enable-fips Flase
How did you do it?
The fix is to take advantage of setuptools.distutils.util.strtobool.

With tool, any values like below passed in to this type of arguments would be evaluated to integer 0:

"n", "no", "No", "NO", "False", "false", "FALSE", "FaLsE", ...
Any argument value like below would be evaluated to integer 1:

"y", "yes", "Yes", "YES", "True", "true", "TRUE", "TrUe", ...

Signed-off-by: Xin Wang <[email protected]>

co-authorized by: [email protected]
What is the motivation for this PR?
Fix bug update timer issue on dual tor, when set up bgp speaker session with dual tor.
Interface selection on PTF has wrong behavior, config IP addresses within same subnet on different interfaces would case connection error. Refer to analysis of sonic-net#8487.

How did you do it?
Config primary /secondary ip addresses on same physical interface.

How did you verify/test it?
re-run test on dual-tor env
* refactor hooks as sonic hooks to support additional types

* spytest base config update for sonic-vs

* spytest feature api hooks for linux servers

* spytest feature api hooks for poe devices

* support collect tech-support at various phases

---------

Co-authored-by: Rama Sasthri, Kristipati <[email protected]>
What is the motivation for this PR?
In SONiC, a new peer-group (BGPSentinel) is added in BGP configuration. This testcase is to verify that IBGP session would be established between DUT and BGPSentinel host (simulated by exabgp in ptf). And to verify exabgp in BGPSentinel host would advertise and withdraw route to DUT.

How did you do it?
Using t1-lag topology, and configure route in ptf to ensure that ptf and dut would ping each other.
Add BGPSentinel configuration in DUT and start exabgp in ptf to setup IBGP connection.
Advertise route from ptf with higher local-preference and no-export community to DUT, check route in DUT would be suppressed.
Withdraw route from ptf, check route in DUT would be advertised to EBGP peers.
How did you verify/test it?
Setup t1-lag topology. Using command "./run_tests.sh -m individual -a False -n vms-kvm-t1-lag -u -c bgp/test_bgp_sentinel.py -f vtestbed.yaml -i veos_vtb -e "--neighbor_type=eos"" to run testcase. Testcase would pass.
* fix tcpdump issue in bgp update timer testing
…global env (sonic-net#9440)

Description of PR
Summary:
In setup-container stage, all packages under the user, AzpDevOps, will be reinstalled to the virtual environment of host user. But there are a few incompatible packages that cannot be installed by pip command of the virtual environment.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 Test case(new/improvement)
Back port request
 201911
 202012
 202205
Approach
What is the motivation for this PR?
In setup-container stage, all packages under the user, AzpDevOps, will be reinstalled to the virtual environment of host user. But there are a few incompatible packages that cannot be installed by pip command of the virtual environment.

How did you do it?
Filter out these incompatible packages at the re-installing step.

How did you verify/test it?
Check setup-container command in the locally.

$ ./setup-container.sh -n sonic-mgmt  -d /data
'/home/zegan/.ssh/id_rsa_docker_sonic_mgmt' -> '/tmp/tmp.Ssj2kL0x43/id_rsa'
'/home/zegan/.ssh/id_rsa_docker_sonic_mgmt.pub' -> '/tmp/tmp.Ssj2kL0x43/id_rsa.pub'
[+] Building 66.9s (27/27) FINISHED                                                                                                                                                                                                                                               docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                        0.1s
 => => transferring dockerfile: 2.31kB                                                                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                           0.1s
 => => transferring context: 2B                                                                                                                                                                                                                                                             0.0s
 => [internal] load metadata for sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt:latest                                                                                                                                                                                                 0.0s
 => [ 1/22] FROM sonicdev-microsoft.azurecr.io:443/docker-sonic-mgmt                                                                                                                                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                                                                                           0.1s
 => => transferring context: 3.25kB                                                                                                                                                                                                                                                         0.0s
 => CACHED [ 2/22] RUN if getent group zegan; then groupmod -o -g 1000 zegan; else groupadd -o -g 1000 zegan; fi                                                                                                                                                                            0.0s
 => CACHED [ 3/22] RUN if getent passwd zegan; then userdel zegan; fi                                                                                                                                                                                                                       0.0s
 => CACHED [ 4/22] RUN useradd -o -l -g 1000 -u 1000 -m -d /home/zegan -s /bin/bash zegan;                                                                                                                                                                                                  0.0s
 => CACHED [ 5/22] RUN if getent group docker; then groupmod -o -g 998 docker; else groupadd -o -g 998 docker; fi                                                                                                                                                                           0.0s
 => CACHED [ 6/22] RUN if [ 'zegan' != 'AzDevOps' ]; then /bin/bash -O extglob -c 'cp -a -f /var/AzDevOps/!(env-*) /home/zegan/'; for hidden_stuff in '.profile .local .ssh'; do /bin/bash -c 'cp -a -f /var/AzDevOps/$hidden_stuff /home/zegan/ || true'; done fi                          0.0s
 => CACHED [ 7/22] RUN usermod -a -G sudo zegan                                                                                                                                                                                                                                             0.0s
 => CACHED [ 8/22] RUN usermod -a -G docker zegan                                                                                                                                                                                                                                           0.0s
 => CACHED [ 9/22] RUN echo 'zegan ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/zegan                                                                                                                                                                                                           0.0s
 => CACHED [10/22] RUN chmod 0440 /etc/sudoers.d/zegan                                                                                                                                                                                                                                      0.0s
 => CACHED [11/22] RUN chown -R '1000:1000' /home/zegan                                                                                                                                                                                                                                     0.0s
 => CACHED [12/22] RUN sed -i -E 's/^#?PermitRootLogin.*$/PermitRootLogin yes/g' /etc/ssh/sshd_config                                                                                                                                                                                       0.0s
 => CACHED [13/22] RUN echo 'root:root' | chpasswd                                                                                                                                                                                                                                          0.0s
 => CACHED [14/22] RUN echo 'zegan:12345' | chpasswd                                                                                                                                                                                                                                        0.0s
 => CACHED [15/22] COPY --chown=1000:1000 id_rsa id_rsa.pub /home/zegan/.ssh/                                                                                                                                                                                                               0.0s
 => CACHED [16/22] RUN chmod 0700 /home/zegan/.ssh                                                                                                                                                                                                                                          0.0s
 => CACHED [17/22] RUN chmod 0600 /home/zegan/.ssh/id_rsa                                                                                                                                                                                                                                   0.0s
 => CACHED [18/22] RUN chmod 0644 /home/zegan/.ssh/id_rsa.pub                                                                                                                                                                                                                               0.0s
 => CACHED [19/22] RUN cat /home/zegan/.ssh/id_rsa.pub >> /home/zegan/.ssh/authorized_keys                                                                                                                                                                                                  0.0s
 => CACHED [20/22] RUN chmod 0600 /home/zegan/.ssh/authorized_keys                                                                                                                                                                                                                          0.0s
 => CACHED [21/22] WORKDIR /home/zegan                                                                                                                                                                                                                                                      0.0s
 => [22/22] RUN if [ 'zegan' != 'AzDevOps' ] && [ -d /var/AzDevOps/env-python3 ]; then /bin/bash -c 'python3 -m venv ${HOME}/env-python3'; /bin/bash -c '${HOME}/env-python3/bin/pip install pip --upgrade'; /bin/bash -c '${HOME}/env-python3/bin/pip install wheel'; /bin/bash -c '${HO  61.1s
 => exporting to image                                                                                                                                                                                                                                                                      5.6s
 => => exporting layers                                                                                                                                                                                                                                                                     5.6s
 => => writing image sha256:fd47f5fa0ac90e0f2084037cb9f7fe85e48577c3854031578e585fbcb6630c03                                                                                                                                                                                                0.0s
 => => naming to docker.io/library/docker-sonic-mgmt-zegan:master                                                                                                                                                                                                                           0.0s
b419771c024f1b8dc5e59270f24bf55df86e695e62da7fdb4c3d09d62417bc06
 * Restarting OpenBSD Secure Shell server sshd
   ...done.
******************************************************************************
EXEC: docker exec --user zegan -ti sonic-mgmt bash
SSH:  ssh -i ~/.ssh/id_rsa_docker_sonic_mgmt [email protected]
******************************************************************************


Signed-off-by: Ze Gan <[email protected]>
…multi-asic. (sonic-net#8884)" (sonic-net#9470)

Reverts sonic-net#8884

In PR sonic-net#8884, in multi-asic scenrio
```
node.copy(content=json.dumps(duts_data[node.hostname]["pre_running_config"]["asic0"], indent=4),
              dest='/etc/sonic/config_db.json', verbose=False)
```
This code will overwrite the global config with asic0 config, which will cause failure. So revert this PR first. And then we will set a more exactly key name.

Signed-off-by: Yutong Zhang <[email protected]>
The `platform_tests/test_sensors.py` rely on the information provided
in this config file to check for the existance of sysfs paths.

This test was introduced before the Platform API existed and did have
some purpose then. However all SONiC platform daemons now rely on the
Platform API which is tested by numerous tests under `platform_tests`.

There is no longer a need to hardcode sysfs paths for products.
Keeping this data there is bound to generate recurring issues in the
future and translate directly into maintenance burden.

Some sysfs paths are just not deterministic. They will depend on which
driver is loaded first and whatnot which is inherently flaky for a test
to rely on.
Description of PR
In the recover of sanity check, for config_reload, we simply sleep 120s.
In some topology, like multi-asic scenario, it's not enough.
lldp services get a big chance that not ready after 120s, then sanity failed.

Use config_reload with safe_reload to better handle this flaky issue.

Approach
What is the motivation for this PR?
Fix multi-asic lldp flaky issue.

How did you do it?
Use config_reload with safe_reload to better handle this flaky issue.

co-authorized by: [email protected]
Approach
What is the motivation for this PR?
Fix the error:

inv_files = request.config.option.ansible_inventory
> ip = utilities.get_test_server_vars(inv_files, server).get('ansible_host')
E AttributeError: 'NoneType' object has no attribute 'get'
Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
The reason is that request.config.option.ansible_inventory returns a string, which could be a string of multiple inventory files like "inv_file0,inv_file1"

But InventoryManager takes inventory files as a list(https://github.com/ansible/ansible/blob/ca08261f08a5071cc5f8c73e61342f5a9581b9cd/lib/ansible/inventory/manager.py#L157-L163), so we should split the string if it contains multiple inventory files(from "inv_file0,inv_file1" to ["inv_file0", "inv_file1"]

How did you verify/test it?
Run pretests.
qos.yml update for gb topo-t2 and longlink

Signed-off-by: Zhixin Zhu <[email protected]>
Summary:
Migrate test_vxlan_decap PTF script to Python3

What is the motivation for this PR?
This is part of Python3 migration project.
This PR migrate test_vxlan_decap PTF script to Python3.

How did you do it?
2to3 and manually code change

How did you verify/test it?
Run with physical testbed
…9487)

Signed-off-by: Neetha John <[email protected]>

What is the motivation for this PR?
On certain platforms with low disk space, failures are seen occassionally on running the test_fdb_mac_move case. This testcase runs in a loop and the number of times the loop is executed is dependent on the completeness_level setting. Lot of syslog messages are generated per loop and for completeness_level settings of 'confident' and above, it can lead to disk full case for certain platforms. This PR resets the completeness_level to basic for td2 platforms so as to reduce the number of iterations of test run.

How did you verify/test it?
Ran the testcase multiple times against t0-backend topology and no longer see failures
What is the motivation for this PR?
Seeing failures on testbed with different hwsku's with different asic count.
In Chassis testbed, with different LC hwSKU , if one of the selected LCs have 3 asics and another LC has 2 asics, we see the below failure:

drop_packets/test_drop_counters.py::test_src_ip_is_loopback_addr[rif_members] 
-------------------------------- live log call ---------------------------------
02:08:08 utilities.wait_until                     L0118 ERROR  | Exception caught while checking <lambda>:Traceback (most recent call last):
  File "/./tests/common/utilities.py", line 112, in wait_until
    check_result = condition(*args, **kwargs)
  File "/./tests/common/helpers/drop_counters/drop_counters.py", line 101, in <lambda>
    check_drops_on_dut = lambda: packets_count in get_drops_across_all_duthosts()
  File "/./tests/common/helpers/drop_counters/drop_counters.py", line 94, in get_drops_across_all_duthosts
    pkt_drops = get_pkt_drops(duthost, get_cnt_cli_cmd, asic_index)
  File "/./tests/common/helpers/drop_counters/drop_counters.py", line 34, in get_pkt_drops
    namespace = duthost.get_namespace_from_asic_id(asic_index)
  File "/./tests/common/devices/multi_asic.py", line 230, in get_namespace_from_asic_id
    raise ValueError("Invalid asic_id '{}' passed as input".format(asic_id))
ValueError: Invalid asic_id '2' passed as input
, error:Invalid asic_id '2' passed as input
Issue is because the get_pkt_drop function takes the asic_index of the selected HwSKU or selected LC.
If the random asic_index selected is 2, and if get_pkt_drops() is called with asic_index 2 for a different LC in the testbed with 2 asics, the test fails as asic_index 2 is not present in the different LC.

How did you do it?
Fixed get_pkt_drops to go through all asic namespaces and get drop count.
This way get_pkt_drops will return packet drops for all interfaces from all namespaces.

How did you verify/test it?
Verified on packet chassis, voq chassis and single asic DUT testbed.
…onic-net#9530)

What is the motivation for this PR?
This is to workaround pytest-ansible plugin issue:
Even no extra-inventory is specified, extra_inventory_manager will still be initialized.
ansible/pytest-ansible#135

As of today, pytest-ansible supports host manager and module dispatcher v29, v212, v213. While initializing the pytest-ansible plugin, it tries to collect default ansible configurations and command line options. These options are used for creating host manager. When no extra_inventory is specified, the options passed to host manager will include extra_inventory=None. However, the host manager will still try to create extra_inventory_manager with None as the inventory source. This will cause the module dispatcher to run the module on hosts matching host pattern in both inventory and extra inventory. This would cause an ansible module executed twice on the same host. In case we wish to use the shell module to run command like "rm <some_file>" to delete a file. The second run would fail because the file has been deleted in the first run. For more details, please refer to the Github issue mentioned above.

This change is only required for python3. Currently master and 202305 branch are using python3. For older branches, they are still using python2 and an older version of pytest-ansible which does not have the bug.

How did you do it?
The fix is to overwrite the pytest-ansible plugin's initialize method and remove the extra_inventory option if it is None. This will prevent the host manager from creating extra_inventory_manager with None as the inventory source.

How did you verify/test it?
Tried run a few tests with pytest-ansible 3.2.1 and 4.0.0.

Signed-off-by: Xin Wang <[email protected]>
Description of PR
In PR sonic-net#9054, it will try to get duthost.facts["platform_asic"] in test_crm.py, but in file tests/common/devices/sonic.py, which define the duthost.facts, platform_asic may not exist in duthost.facts. And this will cause KeyError in test_crm.py. In this PR, if platform_asic doesn't exist in duthost.facts, we set it None.

What is the motivation for this PR?
In PR sonic-net#9054, it will try to get duthost.facts["platform_asic"] in test_crm.py, but in file tests/common/devices/sonic.py, which define the duthost.facts, platform_asic may not exist in duthost.facts. And this will cause KeyError in test_crm.py. In this PR, if platform_asic doesn't exist in duthost.facts, we set it None.

Signed-off-by: Yutong Zhang <[email protected]>
Approach
What is the motivation for this PR?
As the probes received from one port are the same basically(except those with TLVs), we could simply cache the replies instead of generating them in each reply cycle.

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Use functools.lru_cache to cache the calls to icmp_reply.

How did you verify/test it?
With the lru_cache, the execution time of 1000 repeated calls to icmp_reply is reduced from 0.6184256076812744s to 0.0006690025329589844s.

Any platform specific information?
* test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to
update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
…net#9480)

What is the motivation for this PR?
Priority use args.scripts to get test modules if this param is not None for KVM platform. Because pr_test_scripts.yaml is the default file to get test modules, If we don't pass args.scripts, it will get test module from pr_test_scripts.yaml.

How did you do it?
Modify test_plan.py.

How did you verify/test it?
Manually trigger two test plans, one pass args.scrips, it will get test module from it, another don't pass args.scripts, it will get test module from pr_test_scripts.yaml. All as expected.

Signed-off-by: Chun'ang Li <[email protected]>
Description of PR
PR sonic-net#9312 will try to get DATAACL in running config in fixture recover_acl_rule. But if param enable_data_acl is set false when deploying minigraph, DATAACL will not appear in running config. Which may cause key error in fixture recover_acl_rule. In this PR, we fix this issue.

What is the motivation for this PR?
PR sonic-net#9312 will try to get DATAACL in running config in fixture recover_acl_rule. But if param enable_data_acl is set false when deploying minigraph, DATAACL will not appear in running config. Which may cause key error in fixture recover_acl_rule. In this PR, we fix this issue.

How did you do it?
Run TC on testbed which enable_data_acl is false when deploying minigraph.

Signed-off-by: Yutong Zhang <[email protected]>
Summary:
Migrate test_arpall PTF script to Python3

What is the motivation for this PR?
This is part of Python3 migration project.
This PR migrate test_arpall PTF script to Python3.

How did you do it?
2to3 and manually code change

How did you verify/test it?
Run with physical testbed
ansrajpu-git and others added 18 commits January 25, 2024 14:28
…et#9896)

* Qos_LossyQueueTest fix_adding COUNTER MARGIN

* Adding COUNTER_MARGIN to qos PFCXonTest

* Adding COUNTER_MARGIN to qos PFCTest

* Flake8 fixes

* testQosSaiPFCXoffLimit updated with correct check

* Conditional check corrected for LossyQueueTest

* flake8 fix
## Approach
#### What is the motivation for this PR?
"show interface status" is wrong after gnmi incremental config, this command reads from APPL_DB, and we should read from CONFIG_DB.

Microsoft ADO: 25136266

#### How did you do it?
Read CONFIG_DB to get admin_status.

#### How did you verify/test it?
Run gnmi end2end test.
Description of PR
This PR is created to resolve issues in KVM test which are failing in advance utilities HEAD PR. KVM Elastic test are failing in generic_config_updater/test_dhcp_relay.py file due to missing mode attribute.

What is the motivation for this PR?
Modified GCU fixtures/duthost_utilities.py to make it compatible for HEAD PR . We have added "switchport mode command" in duthost_utilites to add mode trunk on Ethernet4 so that it will allow addition of vlan membership on ports. Added a function to check "switchport mode explicitly". The check was missing in earlier case due to which all port are running "switchport" command twice and change mode everytime.

co-authorized by: [email protected]
## Description of PR

Summary:
Fixes # (issue)

### Type of change

- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] Test case(new/improvement)


## Approach
#### What is the motivation for this PR?

event-down-ctr test is flaky because we run the test before monit changes are in place which means start delay for monit is at 5 minutes, so container_checker will not catch event.

#### How did you do it?

Move test after monit config is changed

#### How did you verify/test it?

Manual/pipeline
Approach
What is the motivation for this PR?
Add server to server normal testcase to cover the east-to-west traffic verification for dualtor.

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Select two mux ports, one as source port, one as dest port.
Send traffic from source port and verify traffic delivery at the dest port.

How did you verify/test it?
* Macsec profiles to accept type 7 encoded keys
* Add type 7 even to eos configs as macsec profilejson now has type 7 keys
If ntp server changes, local time stamp may jump and will cause the age value in lldpctl json output turns to negative time such as '00:-54:-15'. During lldp-syncd deamon process, it will fail and print an error log when parsing age. Add this unharmful syslog into ignore list.

Signed-off-by: Zhaohui Sun <[email protected]>
Use gre type 0x8949 when it is Nvidia platform.
* Fix sub_port_interfaces issue

Co-authored-by: Chuan Wu <[email protected]>
…t#10074)

For Nvidia, we use the RPC image instead of swapping syncd in the qos sai test. We need an option to control if the swap_syncd should be executed.

Change-Id: Ideb8bd1054604d77bf26c5c44624f7d493d9eb41
…sonic-net#10052)

What I did:

Fix the QOS test failure when packet sent are greater than 4K in size
Why I did:

    Increased socket buffer for PTF while running QoS test
    as we are sending packet > 4k in some cases where there is HBM involved
    to fill the buffer faster.

How I verify:
Test passing after making this change.

Signed-off-by: Abhishek Dosi <[email protected]>
What is the motivation for this PR?
Add step in bgp holdtimer repro to list iptables rules.

The default chain policy is to accept all packets. When I add the rule to drop all packets (including bgp packets), when we list the iptable rules, the rules are reevaluated such that they take place into effect.

How did you do it?
code change

How did you verify/test it?
manual/pipeline
In the dualtor scenario, when dscp remapping is enabled and packet with dscp 2 or 6 is received by the standby tor, the mapping behavior is different between Nvidia and other vendors, so the test cases fail on Nvidia platforms.
Actually, this is not considered as a valid use case, the dscp 2 and 6 should be reserved for the remapped packets. And this has been confirmed with MSFT, so skip the cases for dscp 2 and 6 on Nvidia platforms when dscp remapping is enabled.

Change-Id: Icdf19a7191d25c36bdd4cdc659e96297f924abf7
For Nvidia SN5600 the formula to calculate the shared buffer size for pg and queue differs from other Spectrum. So, update the corresponding code for it.
What is the motivation for this PR?
Add new topology DPU to Azp
Port exiting DASH test cases to support GNMI and protobuf changes
How did you do it?
Enable a new job for DPU
Replace the original interface ,swssconfig, to 'gnmi client'
Convert json format to protobuf
How did you verify/test it?
Check Azp
---------

Signed-off-by: Ze Gan <[email protected]>
Co-authored-by: ganglyu <[email protected]>
Summary:

Revert the PRs, to get the macsec tests run
sonic-net#10101
sonic-net#10088

co-authorized by: [email protected]
AharonMalkin pushed a commit that referenced this pull request Jun 13, 2024
From the ovs doc, if mod-flow is used without --strict, priority is not
used in matching.
This will cause problem for downstream set_drop when
duplicate_nic_upstream is disabled.

For example:

When set_drop is applied to upstream_nic_flow(#1), mod-flow will match both
flow sonic-net#2 and flow  sonic-net#3 as priority is not used in flow match.

So let's enforce strict match for mod-flow.

Signed-off-by: Longxiang Lyu <[email protected]>
AharonMalkin pushed a commit that referenced this pull request Jun 13, 2024
…y cases (sonic-net#12825)

Description of PR
This PR is to address the fixture setup sequence issue, and teardown out of sequence issue.

In convert_and_restore_config_db_to_ipv6_only, it will do a "config reload -y" during fixture setup or teardown.

For feature test cases where config is not saved into config_db.json, this reload needs to be done before feature fixture setup and after feature teardown, such as: tacacs_v6, setup_streaming_telemetry, or setup_ntp.

According to https://docs.pytest.org/en/latest/reference/fixtures.html#reference-fixtures, it only considers the following when deciding the fixture orders:

scope
dependencies
autouse
We shouldn't use autouse in this test module. So only two options to let convert_and_restore_config_db_to_ipv6_only runs before other fixtures:

define other fixtures in 'function' scope.
define the feature fixture to request convert_and_restore_config_db_to_ipv6_only explicit.
Using option #1 in this PR as the new 'function' scope fixture can be reused by other cases. Option sonic-net#2 has good readability, but will limit the new fixture to be used by ipv6_only cases.

Summary:
Fixes sonic-net#12705


Approach
What is the motivation for this PR?
Multiple errors were observed in mgmt_ipv6 are related to fixture setup/teardown sequence.

How did you do it?
Added two 'function' scope fixture: check_tacacs_v6_func and setup_streaming_telemetry_func.
And modified 3 tests cases to use 'function' scope fixture.

test_ro_user_ipv6_only
test_rw_user_ipv6_only
test_telemetry_output_ipv6_only

co-authorized by: [email protected]
AharonMalkin pushed a commit that referenced this pull request Nov 11, 2024
Description of PR
Summary: Fixing ecnconfig command where -q was missing
Fixes # (issue)
sonic-net#14126

Approach
What is the motivation for this PR?
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
###OUTPUT
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.3.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.8.10', 'Platform': 'Linux-5.4.0-150-generic-x86_64-with-glibc2.29', 'Packages': {'pytest': '7.4.0', 'pluggy': '1.3.0'}, 'Plugins': {'allure-pytest': '2.8.22', 'ansible': '4.0.0', 'forked': '1.6.0', 'html': '4.1.0', 'metadata': '3.0.0', 'repeat': '0.9.3', 'xdist': '1.28.0'}}
ansible: 2.13.13
rootdir: /var/AzDevOps/sonic-mgmt/tests
configfile: pytest.ini
plugins: allure-pytest-2.8.22, ansible-4.0.0, forked-1.6.0, html-4.1.0, metadata-3.0.0, repeat-0.9.3, xdist-1.28.0
collecting ...
----------------------------- live log collection ------------------------------
22:57:46 conftest.generate_params_dut_hostname L1210 INFO | Using DUTs ['sonic-s6100-dut1'] in testbed 'vms-snappi-sonic'
22:57:46 conftest.set_rand_one_dut_hostname L0418 INFO | Randomly select dut sonic-s6100-dut1 for testing
22:57:46 init.pytest_collection_modifyitems L0581 INFO | Available basic facts that can be used in conditional skip:
{
"topo_type": "ptf",
"topo_name": "ptf64",
"testbed": "vms-snappi-sonic"
}
collected 1 item

snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
-------------------------------- live log setup --------------------------------
22:57:46 init.set_default L0053 INFO | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
22:57:46 init.check_test_completeness L0151 INFO | Test has no defined levels. Continue without test completeness checks
22:57:46 conftest.enhance_inventory L0245 INFO | Inventory file: ['../ansible/snappi-sonic']
22:57:52 ptfhost_utils.run_icmp_responder_session L0239 INFO | Skip running icmp_responder at session level, it is only for dualtor testbed with active-active mux ports.
22:57:52 conftest.core_dump_and_config_check L2154 INFO | Dumping Disk and Memory Space informataion before test on sonic-s6100-dut1
22:57:52 conftest.core_dump_and_config_check L2158 INFO | Collecting core dumps before test on sonic-s6100-dut1
22:57:53 conftest.core_dump_and_config_check L2167 INFO | Collecting running config before test on sonic-s6100-dut1
22:57:55 init.sanity_check L0306 INFO | Skip sanity check according to command line argument
22:57:55 init._fixture_generator_decorator L0081 INFO | -------------------- fixture enable_packet_aging_after_test setup starts --------------------
22:57:55 init._fixture_generator_decorator L0085 INFO | -------------------- fixture enable_packet_aging_after_test setup ends --------------------
22:57:55 init._fixture_generator_decorator L0081 INFO | -------------------- fixture rand_lossless_prio setup starts --------------------
22:57:55 init._fixture_generator_decorator L0085 INFO | -------------------- fixture rand_lossless_prio setup ends --------------------
22:57:55 init._fixture_generator_decorator L0081 INFO | -------------------- fixture rand_lossy_prio setup starts --------------------
22:57:55 init._fixture_generator_decorator L0085 INFO | -------------------- fixture rand_lossy_prio setup ends --------------------
22:57:55 init._fixture_generator_decorator L0081 INFO | -------------------- fixture start_pfcwd_after_test setup starts --------------------
22:57:55 init._fixture_generator_decorator L0085 INFO | -------------------- fixture start_pfcwd_after_test setup ends --------------------
22:57:55 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_api_serv_ip setup starts --------------------
22:57:55 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_api_serv_ip setup ends --------------------
22:57:55 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_api_serv_port setup starts --------------------
22:57:55 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_api_serv_port setup ends --------------------
22:57:55 init._fixture_generator_decorator L0081 INFO | -------------------- fixture snappi_api setup starts --------------------
22:57:55 init._fixture_generator_decorator L0085 INFO | -------------------- fixture snappi_api setup ends --------------------
22:57:55 conftest.rand_one_dut_front_end_hostname L0450 INFO | Randomly select dut sonic-s6100-dut1 for testing
22:57:56 conftest.generate_port_lists L1279 INFO | Generate dut_port_map: {'sonic-s6100-dut1': ['sonic-s6100-dut1|Ethernet0', 'sonic-s6100-dut1|Ethernet4']}
22:57:56 conftest.generate_port_lists L1302 INFO | Generate port_list: ['sonic-s6100-dut1|Ethernet0', 'sonic-s6100-dut1|Ethernet4']
22:57:56 init._fixture_func_decorator L0069 INFO | -------------------- fixture prio_dscp_map setup starts --------------------
22:57:56 init._fixture_func_decorator L0076 INFO | -------------------- fixture prio_dscp_map setup ends --------------------
22:57:56 init.loganalyzer L0051 INFO | Log analyzer is disabled
22:57:56 init.memory_utilization L0091 INFO | Hostname: sonic-s6100-dut1, Hwsku: Accton-AS7726-32X, Platform: x86_64-accton_as7726_32x-r0
22:57:56 init.store_fixture_values L0017 INFO | store memory_utilization test_dequeue_ecn
22:57:56 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_testbed_config setup starts --------------------
22:57:57 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_testbed_config setup ends --------------------
22:57:57 init.pytest_runtest_setup L0024 INFO | collect memory before test test_dequeue_ecn
22:57:58 init.pytest_runtest_setup L0044 INFO | Before test: collected memory_values {'before_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 15.3}}}, 'after_test': {'sonic-s6100-dut1': {}}}
-------------------------------- live log call ---------------------------------
22:57:58 test_dequeue_ecn_with_snappi.test_dequeu L0066 INFO | Running ECN dequeue test with params: {'kmin': 50000, 'kmax': 51000, 'pmax': 100}
22:57:58 helper.run_ecn_test L0058 INFO | Stopping PFC watchdog
22:57:58 helper.run_ecn_test L0060 INFO | Disabling packet aging if necessary
22:57:58 helper.run_ecn_test L0064 INFO | Configuring WRED and ECN thresholds
22:58:00 helper.run_ecn_test L0072 INFO | Enabling ECN markings
22:58:03 helper.run_ecn_test L0081 INFO | Waiting on ECN and dynamic buffer configuration to take effect. Sleeping for 10 seconds.
22:58:13 helper.run_ecn_test L0097 INFO | Generating base flow config
22:58:13 helper.run_ecn_test L0102 INFO | Setting test flow config params
22:58:13 helper.run_ecn_test L0110 INFO | Setting pause flow config params
22:58:13 helper.run_ecn_test L0124 INFO | Generating test flows
22:58:13 helper.run_ecn_test L0130 INFO | Generating pause flows
22:58:13 helper.run_ecn_test L0141 INFO | Setting packet capture port to Port 1
22:58:13 helper.run_ecn_test L0145 INFO | Running 1 iteration(s)
22:58:13 helper.run_ecn_test L0147 INFO | Running iteration 0
22:58:13 helper.run_ecn_test L0149 INFO | Packet capture file: ECN_cap-0.pcapng
22:58:13 helper.run_ecn_test L0156 INFO | Running traffic
22:58:13 connection._warn L0246 WARNING| Verification of certificates is disabled
22:58:13 connection._info L0243 INFO | Determining the platform and rest_port using the 10.36.78.59 address...
22:58:13 connection._warn L0246 WARNING| Unable to connect to http://10.36.78.59:443.
22:58:13 connection._info L0243 INFO | Connection established to https://10.36.78.59:443 on linux
22:58:36 connection._info L0243 INFO | Using IxNetwork api server version 10.20.2403.2
22:58:36 connection._info L0243 INFO | User info IxNetwork/ixnetworkweb/admin-62-23797
22:58:37 snappi_api.info L1132 INFO | snappi-0.9.1
22:58:37 snappi_api.info L1132 INFO | snappi_ixnetwork-0.8.2
22:58:37 snappi_api.info L1132 INFO | ixnetwork_restpy-1.0.64
22:58:38 snappi_api.info L1132 INFO | Config validation 0.013s
22:58:41 snappi_api.info L1132 INFO | Ports configuration 2.098s
22:58:41 snappi_api.info L1132 INFO | Captures configuration 0.631s
22:58:44 snappi_api.info L1132 INFO | Add location hosts [10.36.78.96] 2.458s
22:58:49 snappi_api.info L1132 INFO | Location hosts ready [10.36.78.96] 4.298s
22:58:49 snappi_api.info L1132 INFO | Speed conversion is not require for (port.name, speed) : [('Port 0', 'novusHundredGigNonFanOut'), ('Port 1', 'novusHundredGigNonFanOut')]
22:58:49 snappi_api.info L1132 INFO | Aggregation mode speed change 0.549s
22:58:54 snappi_api.info L1132 INFO | Location preemption [10.36.78.96;1;5, 10.36.78.96;1;6] 0.241s
22:59:17 snappi_api.info L1132 INFO | Location connect [Port 0, Port 1] 22.595s
22:59:17 snappi_api.warning L1138 WARNING| Port 0 connectedLinkDown
22:59:17 snappi_api.warning L1138 WARNING| Port 1 connectedLinkDown
22:59:17 snappi_api.info L1132 INFO | Location state check [Port 0, Port 1] 0.455s
22:59:17 snappi_api.info L1132 INFO | Location configuration 35.939s
22:59:27 snappi_api.info L1132 INFO | Layer1 configuration 9.982s
22:59:28 snappi_api.info L1132 INFO | Lag Configuration 0.160s
22:59:28 snappi_api.info L1132 INFO | Convert device config : 0.412s
22:59:28 snappi_api.info L1132 INFO | Create IxNetwork device config : 0.000s
22:59:29 snappi_api.info L1132 INFO | Push IxNetwork device config : 0.849s
22:59:29 snappi_api.info L1132 INFO | Devices configuration 1.397s
22:59:33 snappi_api.info L1132 INFO | Flows configuration 4.227s
22:59:44 snappi_api.info L1132 INFO | Start interfaces 10.798s
22:59:45 snappi_api.info L1132 INFO | IxNet - The Traffic Item was modified. Please perform a Traffic Generate to update the associated traffic Flow Groups
22:59:45 traffic_generation.run_traffic L0322 INFO | Wait for Arp to Resolve ...
22:59:47 traffic_generation.run_traffic L0333 INFO | Starting packet capture ...
22:59:49 snappi_api.info L1132 INFO | Captures start 1.911s
22:59:53 traffic_generation.run_traffic L0343 INFO | Starting transmit on all flows ...
22:59:58 snappi_api.info L1132 INFO | Flows generate/apply 4.230s
23:00:10 snappi_api.info L1132 INFO | Flows clear statistics 11.831s
23:00:11 snappi_api.info L1132 INFO | Captures start 1.086s
23:00:15 snappi_api.info L1132 INFO | Flows start 3.528s
23:00:16 traffic_generation.run_traffic L0380 INFO | Polling TGEN for in-flight traffic statistics...
23:00:20 traffic_generation.run_traffic L0388 INFO | Checking if all flows have stopped. Attempt #1
23:00:22 traffic_generation.run_traffic L0395 INFO | All test and background traffic flows stopped
23:00:24 traffic_generation.run_traffic L0406 INFO | Stopping packet capture ...
23:00:26 snappi_api.info L1132 INFO | Captures stop 1.348s
23:00:26 traffic_generation.run_traffic L0412 INFO | Retrieving and saving packet capture to ECN_cap-0.pcapng
23:03:05 snappi_api.warning L1138 WARNING| Capture was not stopped for this port Port 1
23:03:05 snappi_api.info L1132 INFO | Captures stop 158.173s
23:03:08 traffic_generation.run_traffic L0418 INFO | Dumping per-flow statistics
23:03:10 traffic_generation.run_traffic L0420 INFO | Stopping transmit on all remaining flows
23:03:11 read_pcap.get_ipv4_pkts L0080 INFO | Reading packets from pcap file -> ECN_cap-0.pcapng
23:03:11 read_pcap.get_ipv4_pkts L0081 INFO | Extracting ethernet frames from pcap file
23:03:11 test_dequeue_ecn_with_snappi.test_dequeu L0085 INFO | Running verification for ECN dequeue test
23:03:11 read_pcap.is_ecn_marked L0103 INFO | Checking if the packet is ECN congestion marked
23:03:11 read_pcap.is_ecn_marked L0103 INFO | Checking if the packet is ECN congestion marked
23:03:11 test_dequeue_ecn_with_snappi.test_dequeu L0098 INFO | Reloading config to teardown ECN config
23:03:11 config_reload.config_reload L0138 INFO | reloading config_db
23:04:52 processes_utils.wait_critical_processes L0076 INFO | Wait until all critical processes are healthy in 300 sec
23:04:52 processes_utils.all_critical_processes L0045 INFO | Check critical processes status
PASSED [100%]
------------------------------ live log teardown -------------------------------
23:04:56 init.pytest_runtest_teardown L0049 INFO | collect memory after test test_dequeue_ecn
23:04:57 init.pytest_runtest_teardown L0072 INFO | After test: collected memory_values {'before_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 15.3}}}, 'after_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 5.6}}}}
23:04:57 init._fixture_generator_decorator L0093 INFO | -------------------- fixture snappi_api teardown starts --------------------
23:05:20 init._fixture_generator_decorator L0102 INFO | -------------------- fixture snappi_api teardown ends --------------------
23:05:20 init._fixture_generator_decorator L0093 INFO | -------------------- fixture start_pfcwd_after_test teardown starts --------------------
23:05:21 init._fixture_generator_decorator L0102 INFO | -------------------- fixture start_pfcwd_after_test teardown ends --------------------
23:05:21 init._fixture_generator_decorator L0093 INFO | -------------------- fixture rand_lossy_prio teardown starts --------------------
23:05:21 init._fixture_generator_decorator L0102 INFO | -------------------- fixture rand_lossy_prio teardown ends --------------------
23:05:21 init._fixture_generator_decorator L0093 INFO | -------------------- fixture rand_lossless_prio teardown starts --------------------
23:05:21 init._fixture_generator_decorator L0102 INFO | -------------------- fixture rand_lossless_prio teardown ends --------------------
23:05:21 init._fixture_generator_decorator L0093 INFO | -------------------- fixture enable_packet_aging_after_test teardown starts --------------------
23:05:21 init._fixture_generator_decorator L0102 INFO | -------------------- fixture enable_packet_aging_after_test teardown ends --------------------
23:05:21 conftest.core_dump_and_config_check L2195 INFO | Dumping Disk and Memory Space informataion after test on sonic-s6100-dut1
23:05:22 conftest.core_dump_and_config_check L2199 INFO | Collecting core dumps after test on sonic-s6100-dut1
23:05:22 conftest.core_dump_and_config_check L2216 INFO | Collecting running config after test on sonic-s6100-dut1
23:05:23 conftest.core_dump_and_config_check L2344 WARNING| Core dump or config check failed for test_dequeue_ecn_with_snappi.py, results: {"core_dump_check": {"pass": true, "new_core_dumps": {"sonic-s6100-dut1": []}}, "config_db_check": {"pass": false, "pre_only_config": {"sonic-s6100-dut1": {"null": {}}}, "cur_only_config": {"sonic-s6100-dut1": {"null": {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": "200"}}}}}, "inconsistent_config": {"sonic-s6100-dut1": {"null": {}}}}}
23:05:23 conftest.__dut_reload L2086 INFO | dut reload called on sonic-s6100-dut1
23:05:23 config_reload.config_reload L0138 INFO | reloading config_db
23:08:45 parallel.on_terminate L0085 INFO | process __dut_reload-- terminated with exit code None
23:08:45 parallel.parallel_run L0221 INFO | Completed running processes for target "__dut_reload" in 0:03:22.578938 seconds

=============================== warnings summary ===============================
../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.plugins.loganalyzer
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.plugins.sanity_check
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.plugins.test_completeness
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.dualtor
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/paramiko/transport.py:236
/usr/local/lib/python3.8/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,

../../../../usr/local/lib/python3.8/dist-packages/scapy/layers/ipsec.py:471
/usr/local/lib/python3.8/dist-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated
cipher=algorithms.Blowfish,

../../../../usr/local/lib/python3.8/dist-packages/scapy/layers/ipsec.py:485
/usr/local/lib/python3.8/dist-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated
cipher=algorithms.CAST5,

snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
/usr/local/lib/python3.8/dist-packages/pytest_ansible/module_dispatcher/v213.py:100: UserWarning: provided hosts list is empty, only localhost is available
warnings.warn("provided hosts list is empty, only localhost is available")

snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
/var/AzDevOps/.local/lib/python3.8/site-packages/snappi_ixnetwork/device/utils.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import namedtuple, Mapping

snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
snappi_tests/ecn/test_dequeue_ecn_with_snappi.py::test_dequeue_ecn
/usr/local/lib/python3.8/dist-packages/ixnetwork_restpy/testplatform/sessions/sessions.py:59: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
elif LooseVersion(build_number) < LooseVersion('8.52'):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------------------------- live log sessionfinish ----------------------------
23:08:45 init.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs
================== 1 passed, 14 warnings in 659.38s (0:10:59) ==================

co-authorized by: [email protected]
AharonMalkin pushed a commit that referenced this pull request Nov 11, 2024
…onic-net#14416)

Description of PR
Summary: Adding dut counter verification for PFC Oversubscription cases
Fixes # (issue)
sonic-net#13596

Approach
Dependency
sonic-net#13848

What is the motivation for this PR?
Verifies the packet drops from the dut interface counters

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
Output
18:43:03 test_m2o_oversubscribe_lossless.test_m2o L0077 INFO | Running test for testbed subtype: single-dut-single-asic
18:43:03 snappi_fixtures.__intf_config_multidut L0796 INFO | Configuring Dut: sonic-s6100-dut1 with port Ethernet0 with IP 20.1.1.1/24
18:43:05 snappi_fixtures.__intf_config_multidut L0796 INFO | Configuring Dut: sonic-s6100-dut1 with port Ethernet4 with IP 20.1.2.1/24
18:43:07 snappi_fixtures.__intf_config_multidut L0796 INFO | Configuring Dut: sonic-s6100-dut1 with port Ethernet8 with IP 20.1.3.1/24
18:43:10 connection._warn L0246 WARNING| Verification of certificates is disabled
18:43:10 connection._info L0243 INFO | Determining the platform and rest_port using the 10.36.78.59 address...
18:43:10 connection._warn L0246 WARNING| Unable to connect to http://10.36.78.59:443.
18:43:10 connection._info L0243 INFO | Connection established to https://10.36.78.59:443 on linux
18:43:24 connection._info L0243 INFO | Using IxNetwork api server version 10.20.2403.2
18:43:24 connection._info L0243 INFO | User info IxNetwork/ixnetworkweb/admin-68-20480
18:43:25 snappi_api.info L1132 INFO | snappi-0.9.1
18:43:25 snappi_api.info L1132 INFO | snappi_ixnetwork-0.8.2
18:43:25 snappi_api.info L1132 INFO | ixnetwork_restpy-1.0.64
18:43:25 snappi_api.info L1132 INFO | Config validation 0.020s
18:43:27 snappi_api.info L1132 INFO | Ports configuration 1.544s
18:43:27 snappi_api.info L1132 INFO | Captures configuration 0.161s
18:43:30 snappi_api.info L1132 INFO | Add location hosts [10.36.78.53] 2.285s
18:43:34 snappi_api.info L1132 INFO | Location hosts ready [10.36.78.53] 4.212s
18:43:35 snappi_api.info L1132 INFO | Speed conversion is not require for (port.name, speed) : [('Port 0', 'novusHundredGigNonFanOut'), ('Port 1', 'novusHundredGigNonFanOut'), ('Port 2', 'novusHundredGigNonFanOut')]
18:43:35 snappi_api.info L1132 INFO | Aggregation mode speed change 0.479s
18:43:42 snappi_api.info L1132 INFO | Location preemption [10.36.78.53;6;1, 10.36.78.53;6;2, 10.36.78.53;6;3] 0.111s
18:44:07 snappi_api.info L1132 INFO | Location connect [Port 0, Port 1, Port 2] 25.066s
18:44:07 snappi_api.warning L1138 WARNING| Port 0 connectedLinkDown
18:44:07 snappi_api.warning L1138 WARNING| Port 1 connectedLinkDown
18:44:07 snappi_api.warning L1138 WARNING| Port 2 connectedLinkDown
18:44:07 snappi_api.info L1132 INFO | Location state check [Port 0, Port 1, Port 2] 0.245s
18:44:07 snappi_api.info L1132 INFO | Location configuration 39.389s
18:44:19 snappi_api.info L1132 INFO | Layer1 configuration 12.161s
18:44:19 snappi_api.info L1132 INFO | Lag Configuration 0.082s
18:44:19 snappi_api.info L1132 INFO | Convert device config : 0.224s
18:44:19 snappi_api.info L1132 INFO | Create IxNetwork device config : 0.000s
18:44:20 snappi_api.info L1132 INFO | Push IxNetwork device config : 0.641s
18:44:20 snappi_api.info L1132 INFO | Devices configuration 0.940s
18:44:25 snappi_api.info L1132 INFO | Flows configuration 5.128s
18:45:25 snappi_api.info L1132 INFO | Start interfaces 59.556s
18:45:25 snappi_api.info L1132 INFO | IxNet - The Traffic Item was modified. Please perform a Traffic Generate to update the associated traffic Flow Groups
18:45:30 traffic_generation.run_traffic L0322 INFO | Wait for Arp to Resolve ...
18:45:36 traffic_generation.run_traffic L0322 INFO | Starting transmit on all flows ...
18:48:41 snappi_api.info L1132 INFO | Flows generate/apply 184.474s
18:48:54 snappi_api.info L1132 INFO | Flows clear statistics 12.396s
18:48:54 snappi_api.info L1132 INFO | Captures start 0.000s
18:49:17 snappi_api.info L1132 INFO | Flows start 22.926s
18:49:17 traffic_generation.run_traffic L0322 INFO | Polling DUT for traffic statistics for 15 seconds ...
18:49:23 traffic_generation.run_traffic L0322 INFO | Polling TGEN for in-flight traffic statistics...
18:49:25 traffic_generation.run_traffic L0322 INFO | In-flight traffic statistics for flows: ['Test Flow 1 -> 0', 'Test Flow 2 -> 0', 'Background Flow 1 -> 0', 'Background Flow 2 -> 0']
18:49:25 traffic_generation.run_traffic L0322 INFO | In-flight TX frames: [6312174, 6312175, 6310775, 6310775]
18:49:25 traffic_generation.run_traffic L0322 INFO | In-flight RX frames: [6311444, 6311444, 6310765, 6310766]
18:49:29 traffic_generation.run_traffic L0322 INFO | DUT polling complete
18:49:29 traffic_generation.run_traffic L0322 INFO | Checking if all flows have stopped. Attempt #1
18:49:30 traffic_generation.run_traffic L0322 INFO | ['started', 'started', 'started', 'started']
18:49:31 traffic_generation.run_traffic L0322 INFO | Checking if all flows have stopped. Attempt sonic-net#2
18:49:32 traffic_generation.run_traffic L0322 INFO | ['started', 'started', 'started', 'started']
18:49:33 traffic_generation.run_traffic L0322 INFO | Checking if all flows have stopped. Attempt sonic-net#3
18:49:35 traffic_generation.run_traffic L0322 INFO | ['started', 'started', 'stopped', 'stopped']
18:49:36 traffic_generation.run_traffic L0322 INFO | Checking if all flows have stopped. Attempt sonic-net#4
18:49:37 traffic_generation.run_traffic L0322 INFO | ['stopped', 'stopped', 'stopped', 'stopped']
18:49:37 traffic_generation.run_traffic L0322 INFO | All test and background traffic flows stopped
18:49:39 traffic_generation.run_traffic L0322 INFO | Dumping per-flow statistics
18:49:40 traffic_generation.run_traffic L0322 INFO | Stopping transmit on all remaining flows
18:49:41 snappi_fixtures.cleanup_config L0952 INFO | Removing Configuration on Dut: sonic-s6100-dut1 with port Ethernet0 with ip :20.1.1.1/24
18:49:43 snappi_fixtures.cleanup_config L0952 INFO | Removing Configuration on Dut: sonic-s6100-dut1 with port Ethernet4 with ip :20.1.2.1/24
18:49:45 snappi_fixtures.cleanup_config L0952 INFO | Removing Configuration on Dut: sonic-s6100-dut1 with port Ethernet8 with ip :20.1.3.1/24
PASSED [100%]
------------------------------------------------------------ live log teardown -------------------------------------------------------------
18:49:47 init.pytest_runtest_teardown L0049 INFO | collect memory after test test_m2o_oversubscribe_lossless[multidut_port_info0]
18:49:48 init.pytest_runtest_teardown L0072 INFO | After test: collected memory_values {'before_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 13.9}}}, 'after_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 31.3}}}}
18:49:48 init._fixture_generator_decorator L0093 INFO | -------------------- fixture snappi_api teardown starts --------------------
18:50:03 init._fixture_generator_decorator L0102 INFO | -------------------- fixture snappi_api teardown ends --------------------
18:50:03 init._fixture_generator_decorator L0093 INFO | -------------------- fixture start_pfcwd_after_test teardown starts --------------------
18:50:05 init._fixture_generator_decorator L0102 INFO | -------------------- fixture start_pfcwd_after_test teardown ends --------------------
18:50:05 init._fixture_generator_decorator L0093 INFO | -------------------- fixture rand_lossy_prio teardown starts --------------------
18:50:05 init._fixture_generator_decorator L0102 INFO | -------------------- fixture rand_lossy_prio teardown ends --------------------
18:50:05 init._fixture_generator_decorator L0093 INFO | -------------------- fixture rand_lossless_prio teardown starts --------------------
18:50:05 init._fixture_generator_decorator L0102 INFO | -------------------- fixture rand_lossless_prio teardown ends --------------------
18:50:05 init._fixture_generator_decorator L0093 INFO | -------------------- fixture enable_packet_aging_after_test teardown starts --------------------
18:50:05 init._fixture_generator_decorator L0102 INFO | -------------------- fixture enable_packet_aging_after_test teardown ends --------------------
18:50:05 conftest.core_dump_and_config_check L2203 INFO | Dumping Disk and Memory Space informataion after test on sonic-s6100-dut1
18:50:06 conftest.core_dump_and_config_check L2207 INFO | Collecting core dumps after test on sonic-s6100-dut1
18:50:07 conftest.core_dump_and_config_check L2224 INFO | Collecting running config after test on sonic-s6100-dut1
18:50:08 conftest.core_dump_and_config_check L2352 WARNING| Core dump or config check failed for test_m2o_oversubscribe_lossless.py, results: {"core_dump_check": {"pass": true, "new_core_dumps": {"sonic-s6100-dut1": []}}, "config_db_check": {"pass": false, "pre_only_config": {"sonic-s6100-dut1": {"null": {"INTERFACE": {"Ethernet0": {}, "Ethernet12": {}, "Ethernet4": {}, "Ethernet8": {}, "Ethernet0|21.1.1.1/24": {}, "Ethernet12|24.1.1.1/24": {}, "Ethernet4|22.1.1.1/24": {}, "Ethernet8|23.1.1.1/24": {}}}}}, "cur_only_config": {"sonic-s6100-dut1": {"null": {}}}, "inconsistent_config": {"sonic-s6100-dut1": {"null": {"PFC_WD": {"pre_value": {"GLOBAL": {"POLL_INTERVAL": "200"}}, "cur_value": {"Ethernet0": {"action": "drop", "detection_time": "200", "restoration_time": "200"}, "Ethernet12": {"action": "drop", "detection_time": "200", "restoration_time": "200"}, "Ethernet4": {"action": "drop", "detection_time": "200", "restoration_time": "200"}, "Ethernet8": {"action": "drop", "detection_time": "200", "restoration_time": "200"}, "GLOBAL": {"POLL_INTERVAL": "200"}}}}}}}}
18:50:08 conftest.__dut_reload L2091 INFO | dut reload called on sonic-s6100-dut1
18:50:10 parallel.on_terminate L0085 INFO | process __dut_reload-- terminated with exit code None
18:50:10 parallel.parallel_run L0221 INFO | Completed running processes for target "__dut_reload" in 0:00:01.443244 seconds
18:50:10 conftest.core_dump_and_config_check L2362 INFO | -----$$$$$$$$$$--------------- Executing config reload of config_db_bgp.json -------------$$$$$$$$$$$$$$

============================================================= warnings summary =============================================================
../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.plugins.loganalyzer
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.plugins.sanity_check
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.plugins.test_completeness
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755
/usr/local/lib/python3.8/dist-packages/_pytest/config/init.py:755: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.dualtor
self.import_plugin(import_spec)

../../../../usr/local/lib/python3.8/dist-packages/paramiko/transport.py:236
/usr/local/lib/python3.8/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,

snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
/usr/local/lib/python3.8/dist-packages/pytest_ansible/module_dispatcher/v213.py:100: UserWarning: provided hosts list is empty, only localhost is available
warnings.warn("provided hosts list is empty, only localhost is available")

snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
/var/AzDevOps/.local/lib/python3.8/site-packages/snappi_ixnetwork/device/utils.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import namedtuple, Mapping

snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
snappi_tests/multidut/pfc/test_m2o_oversubscribe_lossless.py::test_m2o_oversubscribe_lossless[multidut_port_info0]
/usr/local/lib/python3.8/dist-packages/ixnetwork_restpy/testplatform/sessions/sessions.py:59: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
elif LooseVersion(build_number) < LooseVersion('8.52'):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------------------------------------------------------- live log sessionfinish ----------------------------------------------------------
18:50:41 init.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs
================================================ 1 passed, 13 warnings in 473.16s (0:07:53) ================================================

co-authorized by: [email protected]
AharonMalkin pushed a commit that referenced this pull request May 22, 2025
…in pfc_pause_lossless test (sonic-net#18105)

Description of PR
In tests/snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py, we have reboot testcases.

We disable the PFCWD and Credit-WD in the testcase and reboot the the DUT depending upon type of reboot. However, on cold-reboot, the Credit-WD is getting reset back.

This causes the lossless test flows on IXIA to continuously send traffic despite of the pause-storm. The run_traffic in traffic_generation.py is trying to determine if the test stops within a stipulated duration, which it does not and throws an assert that flows have not stopped within the given time duration and attempts.

Summary:
Fixes # (issue)
sonic-net#18082

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?
The reboot_dut was called after the PFCWD and Credit-WD disable. The reboot caused the Credit-WD to reset back and hence test failed.

How did you do it?
Created a single fixture called reboot_duts_and_disable_wd to reboot the DUTs and disable Credit and PFC watch-dogs.

This fixture is added in snappi_tests/files/helper.py.

Modified the testcase - snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py to incorporate the above fixture.

How did you verify/test it?
T0/T1 setup verification:

AzDevOps@sonic_mgmt_nokia_202411:/data/sonic-mgmt/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixr-x3b-14 --testbed ixr-aaa-14-t2 --testbed_file ../ansible/testbed.csv --log-cli-level info --log-file-level info --kube_master unset --showlocals -ra --show-capture stdout --junit-xml=/tmp/p.xml --skip_sanity --log-file=/tmp/p.log --cache-clear --topology tgen snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py -k reboot
Thu May  1 13:45:24 UTC 2025

-------------------------- curtailed output -----------------------

snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-ixr-aaa-14|3] 
--------------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------------
13:46:03 __init__.set_default                     L0053 INFO   | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
13:46:03 __init__.check_test_completeness         L0151 INFO   | Test has no defined levels. Continue without test completeness checks
13:46:03 __init__.loganalyzer                     L0067 INFO   | Log analyzer is disabled
13:46:03 __init__.store_fixture_values            L0020 INFO   | store memory_utilization test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-ixr-aaa-14|3]
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup starts --------------------
13:46:03 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup ends --------------------
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture multidut_port_info setup starts --------------------
13:46:03 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture multidut_port_info setup ends --------------------
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
13:46:03 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture setup_ports_and_dut setup starts --------------------
13:46:03 helper.setup_ports_and_dut               L0111 INFO   | Running test for testbed subtype: single-dut-multi-asic-aaa
13:46:04 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture setup_ports_and_dut setup ends --------------------
13:46:04 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup starts --------------------
13:46:05 sonic.get_asic_name                      L1797 INFO   | asic: unknown
13:46:05 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
13:46:05 sonic.get_asic_name                      L1797 INFO   | asic: unknown
13:46:05 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
13:46:08 helper.save_config_and_reboot            L0210 INFO   | Issuing a cold reboot on the dut ixr-aaa-14
13:46:11 reboot.reboot                            L0271 INFO   | Reboot ixr-aaa-14: wait[120], timeout[300]
13:46:11 reboot.reboot                            L0273 INFO   | DUT ixr-aaa-14 create a file /dev/shm/test_reboot before rebooting
13:46:12 reboot.collect_console_log               L0566 INFO   | start: collect console log
13:46:12 dut_utils.creds_on_dut                   L0471 INFO   | dut ixr-aaa-14 belongs to groups ['ixia-sonic', 'sonic', 'sonic_aaa', 'fanout']
13:46:12 dut_utils.creds_on_dut                   L0496 INFO   | skip empty var file /data/sonic-mgmt/tests/common/helpers/../../../ansible/group_vars/all/corefile_uploader.yml
13:46:12 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
13:46:16 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
13:46:16 transport._log                           L1873 INFO   | Authentication (password) failed.
13:46:16 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
13:46:16 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
13:46:16 transport._log                           L1873 INFO   | Authentication (password) successful!
13:46:17 reboot.try_create_dut_console            L0559 WARNING| Fail to create dut console. Please check console config or if console works ro not. 'ManagementIp'
13:46:17 reboot.collect_console_log               L0576 WARNING| dut console is not ready, we cannot get log by console
13:46:17 reboot.wait_for_shutdown                 L0164 INFO   | waiting for ssh to drop on ixr-aaa-14
13:46:17 reboot.execute_reboot_command            L0205 INFO   | rebooting ixr-aaa-14 with command "reboot"
13:46:35 reboot.wait_for_startup                  L0185 INFO   | waiting for ssh to startup on ixr-aaa-14
13:48:05 reboot.wait_for_startup                  L0197 INFO   | ssh has started up on ixr-aaa-14
13:48:05 reboot.reboot                            L0300 INFO   | waiting for switch ixr-aaa-14 to initialize
13:52:31 processes_utils.wait_critical_processes  L0078 INFO   | Wait until all critical processes are healthy in 600 sec
13:52:31 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
13:52:40 reboot.reboot                            L0330 INFO   | cold reboot finished on ixr-aaa-14
13:52:41 reboot.reboot                            L0333 INFO   | DUT ixr-aaa-14 up since 2025-05-01 13:47:31.410000
13:52:41 helper.save_config_and_reboot            L0214 INFO   | Wait until the system is stable
13:52:47 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.2', '3333::3:2'] on namespace asic0
13:52:47 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
13:52:48 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3333::3:1'] on namespace asic1
13:52:48 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
13:52:48 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost ixr-aaa-14> terminated with exit code None
13:52:48 parallel.parallel_run                    L0221 INFO   | Completed running processes for target "save_config_and_reboot" in 0:06:43.000484 seconds
13:52:54 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup ends --------------------
13:52:54 __init__.pytest_runtest_setup            L0034 INFO   | collect memory before test test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-ixr-aaa-14|3]
13:52:54 __init__.pytest_runtest_setup            L0054 INFO   | Before test: collected memory_values {'before_test': {}, 'after_test': {}}

-------------------------- curtailed output -----------------------

13:57:03 traffic_generation.run_traffic           L0465 INFO   | In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Background Flow Prio 1', 'Background Flow Prio 4', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
13:57:03 traffic_generation.run_traffic           L0466 INFO   | In-flight TX frames: [70428, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
13:57:03 traffic_generation.run_traffic           L0467 INFO   | In-flight RX frames: [0, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
13:57:21 traffic_generation.run_traffic           L0468 INFO   | DUT polling complete
13:57:21 traffic_generation.run_traffic           L0479 INFO   | Checking if all flows have stopped. Attempt #1
13:57:22 traffic_generation.run_traffic           L0486 INFO   | All test and background traffic flows stopped
13:57:24 traffic_generation.run_traffic           L0514 INFO   | Dumping per-flow statistics
13:57:25 traffic_generation.run_traffic           L0516 INFO   | Stopping transmit on all remaining flows
13:57:32 snappi_api.info                          L1132 INFO   | Flows stop 6.258s
PASSED        

-------------------------- curtailed output -----------------------

snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py::test_pfc_pause_multi_lossless_prio_reboot[multidut_port_info0-cold] 
--------------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------------
14:17:56 __init__.set_default                     L0053 INFO   | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
14:17:56 __init__.check_test_completeness         L0151 INFO   | Test has no defined levels. Continue without test completeness checks
14:17:56 __init__.loganalyzer                     L0067 INFO   | Log analyzer is disabled
14:17:56 __init__.store_fixture_values            L0020 INFO   | store memory_utilization test_pfc_pause_multi_lossless_prio_reboot[multidut_port_info0-cold]
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup starts --------------------
14:17:56 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup ends --------------------
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture multidut_port_info setup starts --------------------
14:17:56 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture multidut_port_info setup ends --------------------
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
14:17:56 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture setup_ports_and_dut setup starts --------------------
14:17:56 helper.setup_ports_and_dut               L0111 INFO   | Running test for testbed subtype: single-dut-multi-asic-aaa
14:17:57 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture setup_ports_and_dut setup ends --------------------
14:17:57 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup starts --------------------
14:17:58 sonic.get_asic_name                      L1797 INFO   | asic: unknown
14:17:58 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
14:17:58 sonic.get_asic_name                      L1797 INFO   | asic: unknown
14:17:58 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
14:18:01 helper.save_config_and_reboot            L0210 INFO   | Issuing a cold reboot on the dut ixr-aaa-14
14:18:04 reboot.reboot                            L0271 INFO   | Reboot ixr-aaa-14: wait[120], timeout[300]
14:18:04 reboot.reboot                            L0273 INFO   | DUT ixr-aaa-14 create a file /dev/shm/test_reboot before rebooting
14:18:05 reboot.collect_console_log               L0566 INFO   | start: collect console log
14:18:05 dut_utils.creds_on_dut                   L0471 INFO   | dut ixr-aaa-14 belongs to groups ['ixia-sonic', 'sonic', 'sonic_aaa', 'fanout']
14:18:05 dut_utils.creds_on_dut                   L0496 INFO   | skip empty var file /data/sonic-mgmt/tests/common/helpers/../../../ansible/group_vars/all/corefile_uploader.yml
14:18:05 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
14:18:07 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
14:18:07 transport._log                           L1873 INFO   | Authentication (password) failed.
14:18:07 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
14:18:07 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
14:18:07 transport._log                           L1873 INFO   | Authentication (password) successful!
14:18:08 reboot.try_create_dut_console            L0559 WARNING| Fail to create dut console. Please check console config or if console works ro not. 'ManagementIp'
14:18:08 reboot.collect_console_log               L0576 WARNING| dut console is not ready, we cannot get log by console
14:18:10 reboot.wait_for_shutdown                 L0164 INFO   | waiting for ssh to drop on ixr-aaa-14
14:18:10 reboot.execute_reboot_command            L0205 INFO   | rebooting ixr-aaa-14 with command "reboot"
14:18:28 reboot.wait_for_startup                  L0185 INFO   | waiting for ssh to startup on ixr-aaa-14
14:19:56 reboot.wait_for_startup                  L0197 INFO   | ssh has started up on ixr-aaa-14
14:19:56 reboot.reboot                            L0300 INFO   | waiting for switch ixr-aaa-14 to initialize
14:24:22 processes_utils.wait_critical_processes  L0078 INFO   | Wait until all critical processes are healthy in 600 sec
14:24:22 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
14:24:30 reboot.reboot                            L0330 INFO   | cold reboot finished on ixr-aaa-14
14:24:31 reboot.reboot                            L0333 INFO   | DUT ixr-aaa-14 up since 2025-05-01 14:19:23.320000
14:24:31 helper.save_config_and_reboot            L0214 INFO   | Wait until the system is stable
14:24:37 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.2', '3333::3:2'] on namespace asic0
14:24:37 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
14:24:38 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3333::3:1'] on namespace asic1
14:24:38 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
14:24:38 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost ixr-aaa-14> terminated with exit code None
14:24:38 parallel.parallel_run                    L0221 INFO   | Completed running processes for target "save_config_and_reboot" in 0:06:39.645613 seconds
14:24:44 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup ends --------------------
14:24:44 __init__.pytest_runtest_setup            L0034 INFO   | collect memory before test test_pfc_pause_multi_lossless_prio_reboot[multidut_port_info0-cold]
14:24:44 __init__.pytest_runtest_setup            L0054 INFO   | Before test: collected memory_values {'before_test': {}, 'after_test': {}}
-------------------------- curtailed output -----------------------
14:28:16 traffic_generation.run_traffic           L0465 INFO   | In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4', 'Background Flow Prio 1', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
14:28:16 traffic_generation.run_traffic           L0466 INFO   | In-flight TX frames: [68215, 68215, 116379310, 116379310, 116379310, 116379310, 116379310]
14:28:16 traffic_generation.run_traffic           L0467 INFO   | In-flight RX frames: [0, 0, 116379310, 116379310, 116379310, 116379310, 116379310]
14:28:49 traffic_generation.run_traffic           L0468 INFO   | DUT polling complete
14:28:49 traffic_generation.run_traffic           L0479 INFO   | Checking if all flows have stopped. Attempt #1
14:28:50 traffic_generation.run_traffic           L0486 INFO   | All test and background traffic flows stopped
14:28:52 traffic_generation.run_traffic           L0514 INFO   | Dumping per-flow statistics
14:28:53 traffic_generation.run_traffic           L0516 INFO   | Stopping transmit on all remaining flows
14:29:00 snappi_api.info                          L1132 INFO   | Flows stop 6.248s
PASSED           
T2 Verification:

AzDevOps@7c3002ea4994:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern board73,board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/pfc/p.xml --skip_sanity --log-file=/tmp/pfc/p.log snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py -k reboot --pdb        
Wed Apr 30 20:44:41 UTC 2025

--------------- curtailed output ----------------

snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-board71|3] 
--------------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------------
20:45:40 __init__.set_default                     L0053 INFO   | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
20:45:40 __init__.check_test_completeness         L0151 INFO   | Test has no defined levels. Continue without test completeness checks
20:45:40 __init__.loganalyzer                     L0067 INFO   | Log analyzer is disabled
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup starts --------------------
20:45:40 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup ends --------------------
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture multidut_port_info setup starts --------------------
20:45:40 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture multidut_port_info setup ends --------------------
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
20:45:40 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture setup_ports_and_dut setup starts --------------------
20:45:40 helper.setup_ports_and_dut               L0115 INFO   | Running test for testbed subtype: multi-dut-long-to-short-link
20:45:43 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board73 with port Ethernet16 with IP 20.1.1.2/31
20:45:43 snappi_fixtures.__intf_config_multidut   L0878 INFO   | Adding ip:20.1.1.2 on port:Ethernet16 on DUT:board73
20:45:44 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board74 with port Ethernet0 with IP 20.1.1.0/31
20:45:44 snappi_fixtures.__intf_config_multidut   L0878 INFO   | Adding ip:20.1.1.0 on port:Ethernet0 on DUT:board74
20:45:45 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture setup_ports_and_dut setup ends --------------------
20:45:45 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup starts --------------------
20:45:46 sonic.get_asic_name                      L1778 INFO   | asic: unknown
20:45:46 helper.skip_warm_reboot                  L0049 INFO   | Reboot type cold is  supported on broadcom switches
20:45:46 sonic.get_asic_name                      L1778 INFO   | asic: unknown
20:45:46 helper.skip_warm_reboot                  L0049 INFO   | Reboot type cold is  supported on broadcom switches
20:45:49 helper.save_config_and_reboot            L0408 INFO   | Issuing a cold reboot on the dut board74
20:45:49 helper.save_config_and_reboot            L0408 INFO   | Issuing a cold reboot on the dut board73
20:45:52 reboot.reboot                            L0269 INFO   | Reboot board74: wait[900], timeout[600]
20:45:52 reboot.reboot                            L0271 INFO   | DUT board74 create a file /dev/shm/test_reboot before rebooting
20:45:52 reboot.reboot                            L0269 INFO   | Reboot board73: wait[900], timeout[600]
20:45:52 reboot.reboot                            L0271 INFO   | DUT board73 create a file /dev/shm/test_reboot before rebooting
20:45:54 reboot.wait_for_shutdown                 L0162 INFO   | waiting for ssh to drop on board74
20:45:54 reboot.execute_reboot_command            L0202 INFO   | rebooting board74 with command "reboot"
20:45:54 reboot.wait_for_shutdown                 L0162 INFO   | waiting for ssh to drop on board73
20:45:54 reboot.execute_reboot_command            L0202 INFO   | rebooting board73 with command "reboot"
20:46:15 reboot.wait_for_startup                  L0183 INFO   | waiting for ssh to startup on board74
20:46:16 reboot.wait_for_startup                  L0183 INFO   | waiting for ssh to startup on board73
20:48:38 reboot.wait_for_startup                  L0194 INFO   | ssh has started up on board73
20:48:38 reboot.reboot                            L0288 INFO   | waiting for switch board73 to initialize
20:48:40 reboot.wait_for_startup                  L0194 INFO   | ssh has started up on board74
20:48:40 reboot.reboot                            L0288 INFO   | waiting for switch board74 to initialize
20:52:24 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
20:52:24 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:25 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
20:52:25 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:32 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:52:32 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:52:32 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:52:32 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:52:52 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:52 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:59 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:52:59 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:53:00 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:53:00 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:53:20 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:53:20 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:53:27 reboot.reboot                            L0318 INFO   | cold reboot finished on board73
20:53:28 reboot.reboot                            L0318 INFO   | cold reboot finished on board74
20:53:28 reboot.reboot                            L0321 INFO   | DUT board73 up since 2025-04-30 20:47:22.580000
20:53:28 reboot.reboot                            L0321 INFO   | DUT board74 up since 2025-04-30 20:47:19.270000
20:53:29 helper.save_config_and_reboot            L0412 INFO   | Wait until the system is stable
20:53:29 helper.save_config_and_reboot            L0412 INFO   | Wait until the system is stable
20:53:35 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.12', '3.3.3.14', '3.3.3.20', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:12', '3333::3:14', '3333::3:20'] on namespace asic0
20:53:35 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
20:53:35 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.14', '3.3.3.18', '3.3.3.20', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:14', '3333::3:18', '3333::3:20'] on namespace asic0
20:53:35 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
20:53:36 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.12', '3.3.3.14', '3.3.3.18', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:12', '3333::3:14', '3333::3:18'] on namespace asic1
20:53:36 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
20:53:36 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost board74> terminated with exit code None
20:53:36 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.12', '3.3.3.18', '3.3.3.20', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:12', '3333::3:18', '3333::3:20'] on namespace asic1
20:53:36 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
20:53:36 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost board73> terminated with exit code None
20:53:36 parallel.parallel_run                    L0221 INFO   | Completed running processes for target "save_config_and_reboot" in 0:07:49.938416 seconds
20:53:50 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup ends --------------------

--------------- curtailed output ----------------

PASSED                                                                                                                                                                                                          [  8%]
-------------------------------------------------------------------------------------------------- live log teardown --------------------------------------------------------------------------------------------------
20:57:53 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture reboot_duts_and_disable_wd teardown starts --------------------
20:58:06 config_reload.config_reload              L0145 INFO   | reloading config_db
21:02:39 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
21:02:39 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:02:46 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
21:02:46 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
21:03:06 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:03:14 config_reload.config_reload              L0145 INFO   | reloading config_db
21:07:44 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
21:07:44 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:07:52 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
21:07:52 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
21:08:12 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:08:19 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture reboot_duts_and_disable_wd teardown ends --------------------
21:08:19 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture setup_ports_and_dut teardown starts --------------------
21:08:22 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board73 with port Ethernet16 with IP 20.1.1.2/31
21:08:22 snappi_fixtures.__intf_config_multidut   L0880 INFO   | Removing ip:20.1.1.2 on port:Ethernet16 on DUT:board73
21:08:23 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board74 with port Ethernet0 with IP 20.1.1.0/31
21:08:23 snappi_fixtures.__intf_config_multidut   L0880 INFO   | Removing ip:20.1.1.0 on port:Ethernet0 on DUT:board74
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture setup_ports_and_dut teardown ends --------------------
21:08:24 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture number_of_tx_rx_ports teardown starts --------------------
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture number_of_tx_rx_ports teardown ends --------------------
21:08:24 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture multidut_port_info teardown starts --------------------
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture multidut_port_info teardown ends --------------------
21:08:24 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 teardown starts --------------------
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 teardown ends --------------------

--------------- curtailed output ----------------

======================================================================= 8 passed, 16 skipped, 20 deselected, 71 warnings in 10116.17s (2:48:36) =======================================================================
INFO:root:Can not get Allure report URL. Please check logs

co-authorized by: [email protected]
AharonMalkin pushed a commit that referenced this pull request Jun 18, 2025
sonic-net#18886)

Description of PR
Summary:
Fixes # (issue)sonic-net#13769

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202205
 202305
 202311
 202405
 202411
 202505
Approach
What is the motivation for this PR?
To support infra changes in snappi tests introduced by this Pull Request - sonic-net#15069

How did you do it?
We don't need the setup_ports_and_dut now and we can simply call the snappi_testbed_config in the test itself and iterate through the available ports.

How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
OUTPUT
snappi_tests/pfc/test_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-sonic-s6100-dut1|0-400.0-single_linecard_single_asic]
----------------------------------------------------------------------------------------------------------------------------------------- live log setup ------------------------------------------------------------------------------------------------------------------------------------------
16:01:24 init.set_default L0053 INFO | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
16:01:24 init.check_test_completeness L0151 INFO | Test has no defined levels. Continue without test completeness checks
16:01:24 conftest.enhance_inventory L0313 INFO | Inventory file: ['../ansible/snappi-sonic']
16:01:27 ptfhost_utils.run_icmp_responder_session L0310 INFO | Skip running icmp_responder at session level, it is only for dualtor testbed with active-active mux ports.
16:01:27 init._sanity_check L0431 INFO | Skip sanity check according to command line argument
16:01:27 conftest.collect_before_test L2695 INFO | Dumping Disk and Memory Space information before test on sonic-s6100-dut1
16:01:28 conftest.collect_before_test L2699 INFO | Collecting core dumps before test on sonic-s6100-dut1
16:01:28 conftest.collect_before_test L2708 INFO | Collecting running config before test on sonic-s6100-dut1
16:01:30 conftest.temporarily_disable_route_check L2974 INFO | Skipping temporarily_disable_route_check fixture
16:01:30 conftest.generate_params_dut_hostname L1498 INFO | Using DUTs ['sonic-s6100-dut1'] in testbed 'vms-snappi-sonic'
16:01:30 conftest.set_rand_one_dut_hostname L0647 INFO | Randomly select dut sonic-s6100-dut1 for testing
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture enable_packet_aging_after_test setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture enable_packet_aging_after_test setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture rand_lossless_prio setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture rand_lossless_prio setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture rand_lossy_prio setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture rand_lossy_prio setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture start_pfcwd_after_test setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture start_pfcwd_after_test setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture disable_voq_watchdog setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture disable_voq_watchdog setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
16:01:30 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_api_serv_ip setup starts --------------------
16:01:30 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_api_serv_ip setup ends --------------------
16:01:30 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_api_serv_port setup starts --------------------
16:01:30 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_api_serv_port setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture snappi_api setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture snappi_api setup ends --------------------
16:01:31 conftest.rand_one_dut_front_end_hostname L0683 INFO | Randomly select dut sonic-s6100-dut1 for testing
16:01:31 init._fixture_func_decorator L0069 INFO | -------------------- fixture prio_dscp_map setup starts --------------------
16:01:32 init._fixture_func_decorator L0076 INFO | -------------------- fixture prio_dscp_map setup ends --------------------
16:01:32 init._fixture_func_decorator L0069 INFO | -------------------- fixture all_prio_list setup starts --------------------
16:01:32 init._fixture_func_decorator L0076 INFO | -------------------- fixture all_prio_list setup ends --------------------
16:01:32 init._fixture_func_decorator L0069 INFO | -------------------- fixture lossless_prio_list setup starts --------------------
16:01:33 init._fixture_func_decorator L0076 INFO | -------------------- fixture lossless_prio_list setup ends --------------------
16:01:33 init._fixture_func_decorator L0069 INFO | -------------------- fixture lossy_prio_list setup starts --------------------
16:01:33 init._fixture_func_decorator L0076 INFO | -------------------- fixture lossy_prio_list setup ends --------------------
16:01:33 init._fixture_func_decorator L0069 INFO | -------------------- fixture get_snappi_ports setup starts --------------------
16:01:34 conftest.generate_port_lists L1590 INFO | Generate dut_port_map: {'sonic-s6100-dut1': ['sonic-s6100-dut1|Ethernet0', 'sonic-s6100-dut1|Ethernet8', 'sonic-s6100-dut1|Ethernet16', 'sonic-s6100-dut1|Ethernet24']}
16:01:34 conftest.generate_port_lists L1613 INFO | Generate port_list: ['sonic-s6100-dut1|Ethernet0', 'sonic-s6100-dut1|Ethernet8', 'sonic-s6100-dut1|Ethernet16', 'sonic-s6100-dut1|Ethernet24']
16:01:34 init._fixture_func_decorator L0069 INFO | -------------------- fixture get_snappi_ports_single_dut setup starts --------------------
16:01:34 init._fixture_func_decorator L0076 INFO | -------------------- fixture get_snappi_ports_single_dut setup ends --------------------
16:01:34 init._fixture_func_decorator L0076 INFO | -------------------- fixture get_snappi_ports setup ends --------------------
16:01:34 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_port_selection setup starts --------------------
16:01:34 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_port_selection setup ends --------------------
16:01:34 init.loganalyzer L0074 INFO | Log analyzer is disabled
16:01:34 init.memory_utilization L0125 INFO | Hostname: sonic-s6100-dut1, Hwsku: Accton-AS9716-32D, Platform: x86_64-accton_as9716_32d-r0
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=monit, cmd=sudo monit status, memory_params={'memory_usage': {'memory_increase_threshold': {'type': 'value', 'value': 10}, 'memory_high_threshold': {'type': 'value', 'value': 70}}}, memory_check=<function parse_monit_status_output at 0x7f9baa8983a0>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=top, cmd=top -b -n 1, memory_params={'bgpd': {'memory_increase_threshold': {'type': 'value', 'value': 128}, 'memory_high_threshold': None}, 'zebra': {'memory_increase_threshold': {'type': 'value', 'value': 64}, 'memory_high_threshold': None}}, memory_check=<function parse_top_output at 0x7f9baa88cd30>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=free, cmd=free -m, memory_params={'used': {'memory_increase_threshold': {'type': 'percentage', 'value': '20%'}, 'memory_high_threshold': None}}, memory_check=<function parse_free_output at 0x7f9baa898310>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=docker, cmd=docker stats --no-stream, memory_params={'snmp': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 4}}, 'pmon': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 8}}, 'lldp': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 4}}, 'gnmi': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 6}}, 'radv': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 3}}, 'syncd': {'memory_increase_threshold': {'type': 'value', 'value': 5}, 'memory_high_threshold': {'type': 'value', 'value': 18}}, 'bgp': {'memory_increase_threshold': {'type': 'value', 'value': 4}, 'memory_high_threshold': {'type': 'value', 'value': 14}}, 'teamd': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 5}}, 'swss': {'memory_increase_threshold': {'type': 'value', 'value': 3}, 'memory_high_threshold': {'type': 'value', 'value': 8}}, 'database': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 6}}}, memory_check=<function parse_docker_stats_output at 0x7f9baa898430>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=frr_bgp, cmd=vtysh -c "show memory bgp", memory_params={'used': {'memory_increase_threshold': [{'type': 'percentage', 'value': '50%'}, {'type': 'value', 'value': 32}], 'memory_high_threshold': {'type': 'value', 'value': 128}}}, memory_check=<function parse_frr_memory_output at 0x7f9baa8984c0>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=frr_zebra, cmd=vtysh -c "show memory zebra", memory_params={'used': {'memory_increase_threshold': [{'type': 'percentage', 'value': '50%'}, {'type': 'value', 'value': 16}], 'memory_high_threshold': {'type': 'value', 'value': 128}}}, memory_check=<function parse_frr_memory_output at 0x7f9baa8984c0>
16:01:34 init._fixture_generator_decorator L0081 INFO | -------------------- fixture multidut_port_info setup starts --------------------
16:01:34 init._fixture_generator_decorator L0085 INFO | -------------------- fixture multidut_port_info setup ends --------------------
16:01:34 init._fixture_generator_decorator L0081 INFO | -------------------- fixture setup_ports_and_dut setup starts --------------------
16:01:34 helper.setup_ports_and_dut L0152 INFO | Running test for testbed subtype: single-dut-single-asic
16:01:34 init._fixture_generator_decorator L0085 INFO | -------------------- fixture setup_ports_and_dut setup ends --------------------
16:01:34 init._fixture_func_decorator L0069 INFO | -------------------- fixture tgen_port_info setup starts --------------------
16:01:35 init._fixture_func_decorator L0076 INFO | -------------------- fixture tgen_port_info setup ends --------------------
16:01:40 memory_utilization.execute_command L0039 WARNING| Command 'vtysh -c "show memory bgp"' returned no output
16:01:40 memory_utilization.parse_frr_memory_outp L0481 WARNING| Empty output for FRR memory command, returning empty values
16:01:41 memory_utilization.execute_command L0039 WARNING| Command 'vtysh -c "show memory zebra"' returned no output
16:01:41 memory_utilization.parse_frr_memory_outp L0481 WARNING| Empty output for FRR memory command, returning empty values
16:01:41 init.pytest_runtest_setup L0061 INFO | Before test: collected memory_values {'before_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 7.8}, 'top': {}, 'free': {'used': 1988}, 'docker': {'radv': '0.24', 'syncd': '3.76', 'teamd': '0.26', 'swss': '0.60', 'pmon': '0.76', 'database': '0.88', 'bgp': '0.03', 'lldp': '0.10'}, 'frr_bgp': {}, 'frr_zebra': {}}}, 'after_test': {'sonic-s6100-dut1': {}}}
------------------------------------------------------------------------------------------------------------------------------------------ live log call ------------------------------------------------------------------------------------------------------------------------------------------
16:01:54 connection._warn L0336 WARNING| Verification of certificates is disabled
16:01:54 connection._info L0333 INFO | Determining the platform and rest_port using the 10.36.79.8 address...
16:01:54 connection._warn L0336 WARNING| Unable to connect to http://10.36.79.8:443.
16:01:55 connection._info L0333 INFO | Connection established to https://10.36.79.8:443 on linux
16:02:14 connection._info L0333 INFO | Using IxNetwork api server version 10.25.2406.6
16:02:14 connection._info L0333 INFO | User info IxNetwork/ixnetworkweb/admin-162-10063
16:02:16 snappi_api.info L1488 INFO | snappi-1.31.1
16:02:16 snappi_api.info L1488 INFO | snappi_ixnetwork-1.31.2
16:02:16 snappi_api.info L1488 INFO | ixnetwork_restpy-1.7.0
16:02:16 snappi_api.info L1488 INFO | Config validation 0.020s
16:02:19 snappi_api.info L1488 INFO | Ports configuration 1.715s
16:02:19 snappi_api.info L1488 INFO | Captures configuration 0.200s
16:02:22 snappi_api.info L1488 INFO | Add location hosts [10.36.79.8] 2.336s
16:02:24 snappi_api.info L1488 INFO | Location hosts ready [10.36.79.8] 2.482s
16:02:25 snappi_api.info L1488 INFO | Speed conversion is not require for (port.name, speed) : [('Port 0', 'aresOneOneByFourHundredGigNonFanOut'), ('Port 1', 'aresOneOneByFourHundredGigNonFanOut')]
16:02:25 snappi_api.info L1488 INFO | Aggregation mode speed change 0.412s
16:02:25 snappi_api.info L1488 INFO | Location preemption [10.36.79.8/3, 10.36.79.8/1] 0.143s
16:02:42 snappi_api.info L1488 INFO | Location connect [Port 0, Port 1] 16.540s
16:02:42 snappi_api.info L1488 INFO | Location state check [Port 0, Port 1] 0.363s
16:02:42 snappi_api.info L1488 INFO | Location configuration 23.254s
16:02:46 snappi_api.info L1488 INFO | Layer1 configuration 3.795s
16:02:46 snappi_api.info L1488 INFO | Lag Configuration 0.157s
16:02:47 snappi_api.info L1488 INFO | Convert device config : 0.325s
16:02:47 snappi_api.info L1488 INFO | Create IxNetwork device config : 0.000s
16:02:48 snappi_api.info L1488 INFO | Push IxNetwork device config : 0.963s
16:02:48 snappi_api.info L1488 INFO | Devices configuration 1.391s
16:02:56 snappi_api.info L1488 INFO | Flows configuration 8.034s
16:03:03 snappi_api.info L1488 INFO | Start interfaces 7.636s
16:03:04 snappi_api.info L1488 INFO | IxNet - The Traffic Item was modified. Please perform a Traffic Generate to update the associated traffic Flow Groups
16:03:04 traffic_generation.run_traffic L0433 INFO | Wait for Arp to Resolve ...
16:03:10 traffic_generation.run_traffic L0456 INFO | Starting transmit on all flows ...
16:03:14 snappi_api.info L1488 INFO | Flows generate/apply 3.528s
16:03:27 snappi_api.info L1488 INFO | Flows clear statistics 12.289s
16:03:27 snappi_api.info L1488 INFO | Captures start 0.000s
16:03:30 snappi_api.info L1488 INFO | Flows start 2.733s
16:03:30 traffic_generation.run_traffic L0472 INFO | Polling DUT for traffic statistics for 23 seconds ...
16:03:57 traffic_generation.run_traffic L0491 INFO | Polling TGEN for in-flight traffic statistics...
16:03:59 traffic_generation.run_traffic L0496 INFO | In-flight traffic statistics for flows: ['Test Flow Prio 0', 'Background Flow Prio 1', 'Background Flow Prio 3', 'Background Flow Prio 4', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2']
16:03:59 traffic_generation.run_traffic L0497 INFO | In-flight TX frames: [409482758, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
16:03:59 traffic_generation.run_traffic L0498 INFO | In-flight RX frames: [409482758, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
16:04:16 traffic_generation.run_traffic L0499 INFO | DUT polling complete
16:04:16 traffic_generation.run_traffic L0510 INFO | Checking if all flows have stopped. Attempt #1
16:04:18 traffic_generation.run_traffic L0517 INFO | All test and background traffic flows stopped
16:04:20 traffic_generation.run_traffic L0540 INFO | Dumping per-flow statistics
16:04:21 traffic_generation.run_traffic L0542 INFO | Stopping transmit on all remaining flows
16:04:26 snappi_api.info L1488 INFO | Flows stop 5.387s
PASSED
AharonMalkin pushed a commit that referenced this pull request Dec 8, 2025
What is the motivation for this PR?
The current telemetry framework has many serious problems:

Hard to import, because it is outside of the tests folder
No implementation, hard to try out
Hard to use and extend, because the interface is too primitive
No tests and can break easily
How did you do it?
This PR add a few things to improve the current telemetry framework:

Add new design doc with example code provided in the doc.
Implement both TS (timeseries) and DB (database) reporter, so we can try the feature easily.
How did you verify/test it?
Run all tests locally and passed.

Any platform specific information?
N/A.

Fix TS reporters.

Fix TSRepoter.

Fix TS reporter.

minor fix.

Fix example.

Reverse relationship of metrics and reporter to support more types of metrics in future.

Remove bydesign not working test.

Fix example.

Update tests.

Update TS reporter and DB repoter.

Update minor things.

Remove no required code.

Revert unexpected change.

Rename and update doc.

* Get os version and job id (#1)

Get os version and elastictest job id from correct place.

* Revert OS version change.

* Remove duplicated mock reporter fixture.

---------

Co-authored-by: Yutong Zhang <[email protected]>
AharonMalkin pushed a commit that referenced this pull request Dec 16, 2025
…in pfc_pause_lossless test (sonic-net#18105)

Description of PR
In tests/snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py, we have reboot testcases.

We disable the PFCWD and Credit-WD in the testcase and reboot the the DUT depending upon type of reboot. However, on cold-reboot, the Credit-WD is getting reset back.

This causes the lossless test flows on IXIA to continuously send traffic despite of the pause-storm. The run_traffic in traffic_generation.py is trying to determine if the test stops within a stipulated duration, which it does not and throws an assert that flows have not stopped within the given time duration and attempts.

Summary:
Fixes # (issue)
sonic-net#18082

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?
The reboot_dut was called after the PFCWD and Credit-WD disable. The reboot caused the Credit-WD to reset back and hence test failed.

How did you do it?
Created a single fixture called reboot_duts_and_disable_wd to reboot the DUTs and disable Credit and PFC watch-dogs.

This fixture is added in snappi_tests/files/helper.py.

Modified the testcase - snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py to incorporate the above fixture.

How did you verify/test it?
T0/T1 setup verification:

AzDevOps@sonic_mgmt_nokia_202411:/data/sonic-mgmt/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixr-x3b-14 --testbed ixr-aaa-14-t2 --testbed_file ../ansible/testbed.csv --log-cli-level info --log-file-level info --kube_master unset --showlocals -ra --show-capture stdout --junit-xml=/tmp/p.xml --skip_sanity --log-file=/tmp/p.log --cache-clear --topology tgen snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py -k reboot
Thu May  1 13:45:24 UTC 2025

-------------------------- curtailed output -----------------------

snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-ixr-aaa-14|3]
--------------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------------
13:46:03 __init__.set_default                     L0053 INFO   | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
13:46:03 __init__.check_test_completeness         L0151 INFO   | Test has no defined levels. Continue without test completeness checks
13:46:03 __init__.loganalyzer                     L0067 INFO   | Log analyzer is disabled
13:46:03 __init__.store_fixture_values            L0020 INFO   | store memory_utilization test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-ixr-aaa-14|3]
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup starts --------------------
13:46:03 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup ends --------------------
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture multidut_port_info setup starts --------------------
13:46:03 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture multidut_port_info setup ends --------------------
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
13:46:03 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
13:46:03 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture setup_ports_and_dut setup starts --------------------
13:46:03 helper.setup_ports_and_dut               L0111 INFO   | Running test for testbed subtype: single-dut-multi-asic-aaa
13:46:04 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture setup_ports_and_dut setup ends --------------------
13:46:04 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup starts --------------------
13:46:05 sonic.get_asic_name                      L1797 INFO   | asic: unknown
13:46:05 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
13:46:05 sonic.get_asic_name                      L1797 INFO   | asic: unknown
13:46:05 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
13:46:08 helper.save_config_and_reboot            L0210 INFO   | Issuing a cold reboot on the dut ixr-aaa-14
13:46:11 reboot.reboot                            L0271 INFO   | Reboot ixr-aaa-14: wait[120], timeout[300]
13:46:11 reboot.reboot                            L0273 INFO   | DUT ixr-aaa-14 create a file /dev/shm/test_reboot before rebooting
13:46:12 reboot.collect_console_log               L0566 INFO   | start: collect console log
13:46:12 dut_utils.creds_on_dut                   L0471 INFO   | dut ixr-aaa-14 belongs to groups ['ixia-sonic', 'sonic', 'sonic_aaa', 'fanout']
13:46:12 dut_utils.creds_on_dut                   L0496 INFO   | skip empty var file /data/sonic-mgmt/tests/common/helpers/../../../ansible/group_vars/all/corefile_uploader.yml
13:46:12 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
13:46:16 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
13:46:16 transport._log                           L1873 INFO   | Authentication (password) failed.
13:46:16 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
13:46:16 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
13:46:16 transport._log                           L1873 INFO   | Authentication (password) successful!
13:46:17 reboot.try_create_dut_console            L0559 WARNING| Fail to create dut console. Please check console config or if console works ro not. 'ManagementIp'
13:46:17 reboot.collect_console_log               L0576 WARNING| dut console is not ready, we cannot get log by console
13:46:17 reboot.wait_for_shutdown                 L0164 INFO   | waiting for ssh to drop on ixr-aaa-14
13:46:17 reboot.execute_reboot_command            L0205 INFO   | rebooting ixr-aaa-14 with command "reboot"
13:46:35 reboot.wait_for_startup                  L0185 INFO   | waiting for ssh to startup on ixr-aaa-14
13:48:05 reboot.wait_for_startup                  L0197 INFO   | ssh has started up on ixr-aaa-14
13:48:05 reboot.reboot                            L0300 INFO   | waiting for switch ixr-aaa-14 to initialize
13:52:31 processes_utils.wait_critical_processes  L0078 INFO   | Wait until all critical processes are healthy in 600 sec
13:52:31 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
13:52:40 reboot.reboot                            L0330 INFO   | cold reboot finished on ixr-aaa-14
13:52:41 reboot.reboot                            L0333 INFO   | DUT ixr-aaa-14 up since 2025-05-01 13:47:31.410000
13:52:41 helper.save_config_and_reboot            L0214 INFO   | Wait until the system is stable
13:52:47 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.2', '3333::3:2'] on namespace asic0
13:52:47 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
13:52:48 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3333::3:1'] on namespace asic1
13:52:48 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
13:52:48 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost ixr-aaa-14> terminated with exit code None
13:52:48 parallel.parallel_run                    L0221 INFO   | Completed running processes for target "save_config_and_reboot" in 0:06:43.000484 seconds
13:52:54 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup ends --------------------
13:52:54 __init__.pytest_runtest_setup            L0034 INFO   | collect memory before test test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-ixr-aaa-14|3]
13:52:54 __init__.pytest_runtest_setup            L0054 INFO   | Before test: collected memory_values {'before_test': {}, 'after_test': {}}

-------------------------- curtailed output -----------------------

13:57:03 traffic_generation.run_traffic           L0465 INFO   | In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Background Flow Prio 1', 'Background Flow Prio 4', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
13:57:03 traffic_generation.run_traffic           L0466 INFO   | In-flight TX frames: [70428, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
13:57:03 traffic_generation.run_traffic           L0467 INFO   | In-flight RX frames: [0, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
13:57:21 traffic_generation.run_traffic           L0468 INFO   | DUT polling complete
13:57:21 traffic_generation.run_traffic           L0479 INFO   | Checking if all flows have stopped. Attempt #1
13:57:22 traffic_generation.run_traffic           L0486 INFO   | All test and background traffic flows stopped
13:57:24 traffic_generation.run_traffic           L0514 INFO   | Dumping per-flow statistics
13:57:25 traffic_generation.run_traffic           L0516 INFO   | Stopping transmit on all remaining flows
13:57:32 snappi_api.info                          L1132 INFO   | Flows stop 6.258s
PASSED

-------------------------- curtailed output -----------------------

snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py::test_pfc_pause_multi_lossless_prio_reboot[multidut_port_info0-cold]
--------------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------------
14:17:56 __init__.set_default                     L0053 INFO   | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
14:17:56 __init__.check_test_completeness         L0151 INFO   | Test has no defined levels. Continue without test completeness checks
14:17:56 __init__.loganalyzer                     L0067 INFO   | Log analyzer is disabled
14:17:56 __init__.store_fixture_values            L0020 INFO   | store memory_utilization test_pfc_pause_multi_lossless_prio_reboot[multidut_port_info0-cold]
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup starts --------------------
14:17:56 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup ends --------------------
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture multidut_port_info setup starts --------------------
14:17:56 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture multidut_port_info setup ends --------------------
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
14:17:56 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
14:17:56 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture setup_ports_and_dut setup starts --------------------
14:17:56 helper.setup_ports_and_dut               L0111 INFO   | Running test for testbed subtype: single-dut-multi-asic-aaa
14:17:57 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture setup_ports_and_dut setup ends --------------------
14:17:57 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup starts --------------------
14:17:58 sonic.get_asic_name                      L1797 INFO   | asic: unknown
14:17:58 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
14:17:58 sonic.get_asic_name                      L1797 INFO   | asic: unknown
14:17:58 helper.skip_warm_reboot                  L0045 INFO   | Reboot type cold is  supported on broadcom switches
14:18:01 helper.save_config_and_reboot            L0210 INFO   | Issuing a cold reboot on the dut ixr-aaa-14
14:18:04 reboot.reboot                            L0271 INFO   | Reboot ixr-aaa-14: wait[120], timeout[300]
14:18:04 reboot.reboot                            L0273 INFO   | DUT ixr-aaa-14 create a file /dev/shm/test_reboot before rebooting
14:18:05 reboot.collect_console_log               L0566 INFO   | start: collect console log
14:18:05 dut_utils.creds_on_dut                   L0471 INFO   | dut ixr-aaa-14 belongs to groups ['ixia-sonic', 'sonic', 'sonic_aaa', 'fanout']
14:18:05 dut_utils.creds_on_dut                   L0496 INFO   | skip empty var file /data/sonic-mgmt/tests/common/helpers/../../../ansible/group_vars/all/corefile_uploader.yml
14:18:05 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
14:18:07 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
14:18:07 transport._log                           L1873 INFO   | Authentication (password) failed.
14:18:07 transport._log                           L1873 INFO   | Connected (version 2.0, client OpenSSH_9.2p1)
14:18:07 transport._log                           L1873 INFO   | Auth banner: b'Debian GNU/Linux 12 \\n \\l\n\n'
14:18:07 transport._log                           L1873 INFO   | Authentication (password) successful!
14:18:08 reboot.try_create_dut_console            L0559 WARNING| Fail to create dut console. Please check console config or if console works ro not. 'ManagementIp'
14:18:08 reboot.collect_console_log               L0576 WARNING| dut console is not ready, we cannot get log by console
14:18:10 reboot.wait_for_shutdown                 L0164 INFO   | waiting for ssh to drop on ixr-aaa-14
14:18:10 reboot.execute_reboot_command            L0205 INFO   | rebooting ixr-aaa-14 with command "reboot"
14:18:28 reboot.wait_for_startup                  L0185 INFO   | waiting for ssh to startup on ixr-aaa-14
14:19:56 reboot.wait_for_startup                  L0197 INFO   | ssh has started up on ixr-aaa-14
14:19:56 reboot.reboot                            L0300 INFO   | waiting for switch ixr-aaa-14 to initialize
14:24:22 processes_utils.wait_critical_processes  L0078 INFO   | Wait until all critical processes are healthy in 600 sec
14:24:22 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
14:24:30 reboot.reboot                            L0330 INFO   | cold reboot finished on ixr-aaa-14
14:24:31 reboot.reboot                            L0333 INFO   | DUT ixr-aaa-14 up since 2025-05-01 14:19:23.320000
14:24:31 helper.save_config_and_reboot            L0214 INFO   | Wait until the system is stable
14:24:37 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.2', '3333::3:2'] on namespace asic0
14:24:37 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
14:24:38 sonic_asic.check_bgp_session_state       L0714 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3333::3:1'] on namespace asic1
14:24:38 sonic_asic.check_bgp_session_state       L0715 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
14:24:38 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost ixr-aaa-14> terminated with exit code None
14:24:38 parallel.parallel_run                    L0221 INFO   | Completed running processes for target "save_config_and_reboot" in 0:06:39.645613 seconds
14:24:44 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup ends --------------------
14:24:44 __init__.pytest_runtest_setup            L0034 INFO   | collect memory before test test_pfc_pause_multi_lossless_prio_reboot[multidut_port_info0-cold]
14:24:44 __init__.pytest_runtest_setup            L0054 INFO   | Before test: collected memory_values {'before_test': {}, 'after_test': {}}
-------------------------- curtailed output -----------------------
14:28:16 traffic_generation.run_traffic           L0465 INFO   | In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4', 'Background Flow Prio 1', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
14:28:16 traffic_generation.run_traffic           L0466 INFO   | In-flight TX frames: [68215, 68215, 116379310, 116379310, 116379310, 116379310, 116379310]
14:28:16 traffic_generation.run_traffic           L0467 INFO   | In-flight RX frames: [0, 0, 116379310, 116379310, 116379310, 116379310, 116379310]
14:28:49 traffic_generation.run_traffic           L0468 INFO   | DUT polling complete
14:28:49 traffic_generation.run_traffic           L0479 INFO   | Checking if all flows have stopped. Attempt #1
14:28:50 traffic_generation.run_traffic           L0486 INFO   | All test and background traffic flows stopped
14:28:52 traffic_generation.run_traffic           L0514 INFO   | Dumping per-flow statistics
14:28:53 traffic_generation.run_traffic           L0516 INFO   | Stopping transmit on all remaining flows
14:29:00 snappi_api.info                          L1132 INFO   | Flows stop 6.248s
PASSED
T2 Verification:

AzDevOps@7c3002ea4994:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern board73,board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/pfc/p.xml --skip_sanity --log-file=/tmp/pfc/p.log snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py -k reboot --pdb
Wed Apr 30 20:44:41 UTC 2025

--------------- curtailed output ----------------

snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio_reboot[multidut_port_info0-cold-board71|3]
--------------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------------
20:45:40 __init__.set_default                     L0053 INFO   | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
20:45:40 __init__.check_test_completeness         L0151 INFO   | Test has no defined levels. Continue without test completeness checks
20:45:40 __init__.loganalyzer                     L0067 INFO   | Log analyzer is disabled
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup starts --------------------
20:45:40 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 setup ends --------------------
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture multidut_port_info setup starts --------------------
20:45:40 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture multidut_port_info setup ends --------------------
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
20:45:40 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
20:45:40 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture setup_ports_and_dut setup starts --------------------
20:45:40 helper.setup_ports_and_dut               L0115 INFO   | Running test for testbed subtype: multi-dut-long-to-short-link
20:45:43 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board73 with port Ethernet16 with IP 20.1.1.2/31
20:45:43 snappi_fixtures.__intf_config_multidut   L0878 INFO   | Adding ip:20.1.1.2 on port:Ethernet16 on DUT:board73
20:45:44 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board74 with port Ethernet0 with IP 20.1.1.0/31
20:45:44 snappi_fixtures.__intf_config_multidut   L0878 INFO   | Adding ip:20.1.1.0 on port:Ethernet0 on DUT:board74
20:45:45 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture setup_ports_and_dut setup ends --------------------
20:45:45 __init__._fixture_generator_decorator    L0081 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup starts --------------------
20:45:46 sonic.get_asic_name                      L1778 INFO   | asic: unknown
20:45:46 helper.skip_warm_reboot                  L0049 INFO   | Reboot type cold is  supported on broadcom switches
20:45:46 sonic.get_asic_name                      L1778 INFO   | asic: unknown
20:45:46 helper.skip_warm_reboot                  L0049 INFO   | Reboot type cold is  supported on broadcom switches
20:45:49 helper.save_config_and_reboot            L0408 INFO   | Issuing a cold reboot on the dut board74
20:45:49 helper.save_config_and_reboot            L0408 INFO   | Issuing a cold reboot on the dut board73
20:45:52 reboot.reboot                            L0269 INFO   | Reboot board74: wait[900], timeout[600]
20:45:52 reboot.reboot                            L0271 INFO   | DUT board74 create a file /dev/shm/test_reboot before rebooting
20:45:52 reboot.reboot                            L0269 INFO   | Reboot board73: wait[900], timeout[600]
20:45:52 reboot.reboot                            L0271 INFO   | DUT board73 create a file /dev/shm/test_reboot before rebooting
20:45:54 reboot.wait_for_shutdown                 L0162 INFO   | waiting for ssh to drop on board74
20:45:54 reboot.execute_reboot_command            L0202 INFO   | rebooting board74 with command "reboot"
20:45:54 reboot.wait_for_shutdown                 L0162 INFO   | waiting for ssh to drop on board73
20:45:54 reboot.execute_reboot_command            L0202 INFO   | rebooting board73 with command "reboot"
20:46:15 reboot.wait_for_startup                  L0183 INFO   | waiting for ssh to startup on board74
20:46:16 reboot.wait_for_startup                  L0183 INFO   | waiting for ssh to startup on board73
20:48:38 reboot.wait_for_startup                  L0194 INFO   | ssh has started up on board73
20:48:38 reboot.reboot                            L0288 INFO   | waiting for switch board73 to initialize
20:48:40 reboot.wait_for_startup                  L0194 INFO   | ssh has started up on board74
20:48:40 reboot.reboot                            L0288 INFO   | waiting for switch board74 to initialize
20:52:24 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
20:52:24 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:25 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
20:52:25 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:32 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:52:32 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:52:32 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:52:32 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:52:52 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:52 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:52:59 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:52:59 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:53:00 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
20:53:00 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
20:53:20 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:53:20 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
20:53:27 reboot.reboot                            L0318 INFO   | cold reboot finished on board73
20:53:28 reboot.reboot                            L0318 INFO   | cold reboot finished on board74
20:53:28 reboot.reboot                            L0321 INFO   | DUT board73 up since 2025-04-30 20:47:22.580000
20:53:28 reboot.reboot                            L0321 INFO   | DUT board74 up since 2025-04-30 20:47:19.270000
20:53:29 helper.save_config_and_reboot            L0412 INFO   | Wait until the system is stable
20:53:29 helper.save_config_and_reboot            L0412 INFO   | Wait until the system is stable
20:53:35 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.12', '3.3.3.14', '3.3.3.20', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:12', '3333::3:14', '3333::3:20'] on namespace asic0
20:53:35 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
20:53:35 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.14', '3.3.3.18', '3.3.3.20', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:14', '3333::3:18', '3333::3:20'] on namespace asic0
20:53:35 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic0
20:53:36 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.12', '3.3.3.14', '3.3.3.18', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:12', '3333::3:14', '3333::3:18'] on namespace asic1
20:53:36 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
20:53:36 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost board74> terminated with exit code None
20:53:36 sonic_asic.check_bgp_session_state       L0692 INFO   | bgp neighbors that match the state: ['3.3.3.1', '3.3.3.2', '3.3.3.6', '3.3.3.8', '3.3.3.12', '3.3.3.18', '3.3.3.20', '3333::3:1', '3333::3:2', '3333::3:6', '3333::3:8', '3333::3:12', '3333::3:18', '3333::3:20'] on namespace asic1
20:53:36 sonic_asic.check_bgp_session_state       L0693 INFO   | bgp neighbors to be checked on the state: [] on namespace asic1
20:53:36 parallel.on_terminate                    L0085 INFO   | process save_config_and_reboot--<MultiAsicSonicHost board73> terminated with exit code None
20:53:36 parallel.parallel_run                    L0221 INFO   | Completed running processes for target "save_config_and_reboot" in 0:07:49.938416 seconds
20:53:50 __init__._fixture_generator_decorator    L0085 INFO   | -------------------- fixture reboot_duts_and_disable_wd setup ends --------------------

--------------- curtailed output ----------------

PASSED                                                                                                                                                                                                          [  8%]
-------------------------------------------------------------------------------------------------- live log teardown --------------------------------------------------------------------------------------------------
20:57:53 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture reboot_duts_and_disable_wd teardown starts --------------------
20:58:06 config_reload.config_reload              L0145 INFO   | reloading config_db
21:02:39 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
21:02:39 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:02:46 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
21:02:46 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
21:03:06 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:03:14 config_reload.config_reload              L0145 INFO   | reloading config_db
21:07:44 processes_utils.wait_critical_processes  L0079 INFO   | Wait until all critical processes are healthy in 600 sec
21:07:44 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:07:52 processes_utils.get_critical_processes_s L0035 INFO   | The status of checking process in container 'lldp0' is: False
21:07:52 processes_utils.get_critical_processes_s L0037 INFO   | The processes not running in container 'lldp0' are: '['lldp-syncd', 'lldpmgrd']'
21:08:12 processes_utils._all_critical_processes_ L0045 INFO   | Check critical processes status
21:08:19 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture reboot_duts_and_disable_wd teardown ends --------------------
21:08:19 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture setup_ports_and_dut teardown starts --------------------
21:08:22 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board73 with port Ethernet16 with IP 20.1.1.2/31
21:08:22 snappi_fixtures.__intf_config_multidut   L0880 INFO   | Removing ip:20.1.1.2 on port:Ethernet16 on DUT:board73
21:08:23 snappi_fixtures.__intf_config_multidut   L0858 INFO   | Configuring Dut: board74 with port Ethernet0 with IP 20.1.1.0/31
21:08:23 snappi_fixtures.__intf_config_multidut   L0880 INFO   | Removing ip:20.1.1.0 on port:Ethernet0 on DUT:board74
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture setup_ports_and_dut teardown ends --------------------
21:08:24 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture number_of_tx_rx_ports teardown starts --------------------
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture number_of_tx_rx_ports teardown ends --------------------
21:08:24 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture multidut_port_info teardown starts --------------------
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture multidut_port_info teardown ends --------------------
21:08:24 __init__._fixture_generator_decorator    L0093 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 teardown starts --------------------
21:08:24 __init__._fixture_generator_decorator    L0102 INFO   | -------------------- fixture ignore_route_check_for_cisco_8000 teardown ends --------------------

--------------- curtailed output ----------------

======================================================================= 8 passed, 16 skipped, 20 deselected, 71 warnings in 10116.17s (2:48:36) =======================================================================
INFO:root:Can not get Allure report URL. Please check logs

co-authorized by: [email protected]

Signed-off-by: Aharon Malkin <[email protected]>
AharonMalkin pushed a commit that referenced this pull request Dec 16, 2025
sonic-net#18886)

Description of PR
Summary:
Fixes # (issue)sonic-net#13769

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202205
 202305
 202311
 202405
 202411
 202505
Approach
What is the motivation for this PR?
To support infra changes in snappi tests introduced by this Pull Request - sonic-net#15069

How did you do it?
We don't need the setup_ports_and_dut now and we can simply call the snappi_testbed_config in the test itself and iterate through the available ports.

How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
OUTPUT
snappi_tests/pfc/test_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-sonic-s6100-dut1|0-400.0-single_linecard_single_asic]
----------------------------------------------------------------------------------------------------------------------------------------- live log setup ------------------------------------------------------------------------------------------------------------------------------------------
16:01:24 init.set_default L0053 INFO | Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
16:01:24 init.check_test_completeness L0151 INFO | Test has no defined levels. Continue without test completeness checks
16:01:24 conftest.enhance_inventory L0313 INFO | Inventory file: ['../ansible/snappi-sonic']
16:01:27 ptfhost_utils.run_icmp_responder_session L0310 INFO | Skip running icmp_responder at session level, it is only for dualtor testbed with active-active mux ports.
16:01:27 init._sanity_check L0431 INFO | Skip sanity check according to command line argument
16:01:27 conftest.collect_before_test L2695 INFO | Dumping Disk and Memory Space information before test on sonic-s6100-dut1
16:01:28 conftest.collect_before_test L2699 INFO | Collecting core dumps before test on sonic-s6100-dut1
16:01:28 conftest.collect_before_test L2708 INFO | Collecting running config before test on sonic-s6100-dut1
16:01:30 conftest.temporarily_disable_route_check L2974 INFO | Skipping temporarily_disable_route_check fixture
16:01:30 conftest.generate_params_dut_hostname L1498 INFO | Using DUTs ['sonic-s6100-dut1'] in testbed 'vms-snappi-sonic'
16:01:30 conftest.set_rand_one_dut_hostname L0647 INFO | Randomly select dut sonic-s6100-dut1 for testing
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture enable_packet_aging_after_test setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture enable_packet_aging_after_test setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture rand_lossless_prio setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture rand_lossless_prio setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture rand_lossy_prio setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture rand_lossy_prio setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture start_pfcwd_after_test setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture start_pfcwd_after_test setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture disable_voq_watchdog setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture disable_voq_watchdog setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture number_of_tx_rx_ports setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture number_of_tx_rx_ports setup ends --------------------
16:01:30 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_api_serv_ip setup starts --------------------
16:01:30 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_api_serv_ip setup ends --------------------
16:01:30 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_api_serv_port setup starts --------------------
16:01:30 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_api_serv_port setup ends --------------------
16:01:30 init._fixture_generator_decorator L0081 INFO | -------------------- fixture snappi_api setup starts --------------------
16:01:30 init._fixture_generator_decorator L0085 INFO | -------------------- fixture snappi_api setup ends --------------------
16:01:31 conftest.rand_one_dut_front_end_hostname L0683 INFO | Randomly select dut sonic-s6100-dut1 for testing
16:01:31 init._fixture_func_decorator L0069 INFO | -------------------- fixture prio_dscp_map setup starts --------------------
16:01:32 init._fixture_func_decorator L0076 INFO | -------------------- fixture prio_dscp_map setup ends --------------------
16:01:32 init._fixture_func_decorator L0069 INFO | -------------------- fixture all_prio_list setup starts --------------------
16:01:32 init._fixture_func_decorator L0076 INFO | -------------------- fixture all_prio_list setup ends --------------------
16:01:32 init._fixture_func_decorator L0069 INFO | -------------------- fixture lossless_prio_list setup starts --------------------
16:01:33 init._fixture_func_decorator L0076 INFO | -------------------- fixture lossless_prio_list setup ends --------------------
16:01:33 init._fixture_func_decorator L0069 INFO | -------------------- fixture lossy_prio_list setup starts --------------------
16:01:33 init._fixture_func_decorator L0076 INFO | -------------------- fixture lossy_prio_list setup ends --------------------
16:01:33 init._fixture_func_decorator L0069 INFO | -------------------- fixture get_snappi_ports setup starts --------------------
16:01:34 conftest.generate_port_lists L1590 INFO | Generate dut_port_map: {'sonic-s6100-dut1': ['sonic-s6100-dut1|Ethernet0', 'sonic-s6100-dut1|Ethernet8', 'sonic-s6100-dut1|Ethernet16', 'sonic-s6100-dut1|Ethernet24']}
16:01:34 conftest.generate_port_lists L1613 INFO | Generate port_list: ['sonic-s6100-dut1|Ethernet0', 'sonic-s6100-dut1|Ethernet8', 'sonic-s6100-dut1|Ethernet16', 'sonic-s6100-dut1|Ethernet24']
16:01:34 init._fixture_func_decorator L0069 INFO | -------------------- fixture get_snappi_ports_single_dut setup starts --------------------
16:01:34 init._fixture_func_decorator L0076 INFO | -------------------- fixture get_snappi_ports_single_dut setup ends --------------------
16:01:34 init._fixture_func_decorator L0076 INFO | -------------------- fixture get_snappi_ports setup ends --------------------
16:01:34 init._fixture_func_decorator L0069 INFO | -------------------- fixture snappi_port_selection setup starts --------------------
16:01:34 init._fixture_func_decorator L0076 INFO | -------------------- fixture snappi_port_selection setup ends --------------------
16:01:34 init.loganalyzer L0074 INFO | Log analyzer is disabled
16:01:34 init.memory_utilization L0125 INFO | Hostname: sonic-s6100-dut1, Hwsku: Accton-AS9716-32D, Platform: x86_64-accton_as9716_32d-r0
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=monit, cmd=sudo monit status, memory_params={'memory_usage': {'memory_increase_threshold': {'type': 'value', 'value': 10}, 'memory_high_threshold': {'type': 'value', 'value': 70}}}, memory_check=<function parse_monit_status_output at 0x7f9baa8983a0>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=top, cmd=top -b -n 1, memory_params={'bgpd': {'memory_increase_threshold': {'type': 'value', 'value': 128}, 'memory_high_threshold': None}, 'zebra': {'memory_increase_threshold': {'type': 'value', 'value': 64}, 'memory_high_threshold': None}}, memory_check=<function parse_top_output at 0x7f9baa88cd30>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=free, cmd=free -m, memory_params={'used': {'memory_increase_threshold': {'type': 'percentage', 'value': '20%'}, 'memory_high_threshold': None}}, memory_check=<function parse_free_output at 0x7f9baa898310>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=docker, cmd=docker stats --no-stream, memory_params={'snmp': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 4}}, 'pmon': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 8}}, 'lldp': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 4}}, 'gnmi': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 6}}, 'radv': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 3}}, 'syncd': {'memory_increase_threshold': {'type': 'value', 'value': 5}, 'memory_high_threshold': {'type': 'value', 'value': 18}}, 'bgp': {'memory_increase_threshold': {'type': 'value', 'value': 4}, 'memory_high_threshold': {'type': 'value', 'value': 14}}, 'teamd': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 5}}, 'swss': {'memory_increase_threshold': {'type': 'value', 'value': 3}, 'memory_high_threshold': {'type': 'value', 'value': 8}}, 'database': {'memory_increase_threshold': {'type': 'value', 'value': 2}, 'memory_high_threshold': {'type': 'value', 'value': 6}}}, memory_check=<function parse_docker_stats_output at 0x7f9baa898430>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=frr_bgp, cmd=vtysh -c "show memory bgp", memory_params={'used': {'memory_increase_threshold': [{'type': 'percentage', 'value': '50%'}, {'type': 'value', 'value': 32}], 'memory_high_threshold': {'type': 'value', 'value': 128}}}, memory_check=<function parse_frr_memory_output at 0x7f9baa8984c0>
16:01:34 memory_utilization.register_command L0023 INFO | Registering command: name=frr_zebra, cmd=vtysh -c "show memory zebra", memory_params={'used': {'memory_increase_threshold': [{'type': 'percentage', 'value': '50%'}, {'type': 'value', 'value': 16}], 'memory_high_threshold': {'type': 'value', 'value': 128}}}, memory_check=<function parse_frr_memory_output at 0x7f9baa8984c0>
16:01:34 init._fixture_generator_decorator L0081 INFO | -------------------- fixture multidut_port_info setup starts --------------------
16:01:34 init._fixture_generator_decorator L0085 INFO | -------------------- fixture multidut_port_info setup ends --------------------
16:01:34 init._fixture_generator_decorator L0081 INFO | -------------------- fixture setup_ports_and_dut setup starts --------------------
16:01:34 helper.setup_ports_and_dut L0152 INFO | Running test for testbed subtype: single-dut-single-asic
16:01:34 init._fixture_generator_decorator L0085 INFO | -------------------- fixture setup_ports_and_dut setup ends --------------------
16:01:34 init._fixture_func_decorator L0069 INFO | -------------------- fixture tgen_port_info setup starts --------------------
16:01:35 init._fixture_func_decorator L0076 INFO | -------------------- fixture tgen_port_info setup ends --------------------
16:01:40 memory_utilization.execute_command L0039 WARNING| Command 'vtysh -c "show memory bgp"' returned no output
16:01:40 memory_utilization.parse_frr_memory_outp L0481 WARNING| Empty output for FRR memory command, returning empty values
16:01:41 memory_utilization.execute_command L0039 WARNING| Command 'vtysh -c "show memory zebra"' returned no output
16:01:41 memory_utilization.parse_frr_memory_outp L0481 WARNING| Empty output for FRR memory command, returning empty values
16:01:41 init.pytest_runtest_setup L0061 INFO | Before test: collected memory_values {'before_test': {'sonic-s6100-dut1': {'monit': {'memory_usage': 7.8}, 'top': {}, 'free': {'used': 1988}, 'docker': {'radv': '0.24', 'syncd': '3.76', 'teamd': '0.26', 'swss': '0.60', 'pmon': '0.76', 'database': '0.88', 'bgp': '0.03', 'lldp': '0.10'}, 'frr_bgp': {}, 'frr_zebra': {}}}, 'after_test': {'sonic-s6100-dut1': {}}}
------------------------------------------------------------------------------------------------------------------------------------------ live log call ------------------------------------------------------------------------------------------------------------------------------------------
16:01:54 connection._warn L0336 WARNING| Verification of certificates is disabled
16:01:54 connection._info L0333 INFO | Determining the platform and rest_port using the 10.36.79.8 address...
16:01:54 connection._warn L0336 WARNING| Unable to connect to http://10.36.79.8:443.
16:01:55 connection._info L0333 INFO | Connection established to https://10.36.79.8:443 on linux
16:02:14 connection._info L0333 INFO | Using IxNetwork api server version 10.25.2406.6
16:02:14 connection._info L0333 INFO | User info IxNetwork/ixnetworkweb/admin-162-10063
16:02:16 snappi_api.info L1488 INFO | snappi-1.31.1
16:02:16 snappi_api.info L1488 INFO | snappi_ixnetwork-1.31.2
16:02:16 snappi_api.info L1488 INFO | ixnetwork_restpy-1.7.0
16:02:16 snappi_api.info L1488 INFO | Config validation 0.020s
16:02:19 snappi_api.info L1488 INFO | Ports configuration 1.715s
16:02:19 snappi_api.info L1488 INFO | Captures configuration 0.200s
16:02:22 snappi_api.info L1488 INFO | Add location hosts [10.36.79.8] 2.336s
16:02:24 snappi_api.info L1488 INFO | Location hosts ready [10.36.79.8] 2.482s
16:02:25 snappi_api.info L1488 INFO | Speed conversion is not require for (port.name, speed) : [('Port 0', 'aresOneOneByFourHundredGigNonFanOut'), ('Port 1', 'aresOneOneByFourHundredGigNonFanOut')]
16:02:25 snappi_api.info L1488 INFO | Aggregation mode speed change 0.412s
16:02:25 snappi_api.info L1488 INFO | Location preemption [10.36.79.8/3, 10.36.79.8/1] 0.143s
16:02:42 snappi_api.info L1488 INFO | Location connect [Port 0, Port 1] 16.540s
16:02:42 snappi_api.info L1488 INFO | Location state check [Port 0, Port 1] 0.363s
16:02:42 snappi_api.info L1488 INFO | Location configuration 23.254s
16:02:46 snappi_api.info L1488 INFO | Layer1 configuration 3.795s
16:02:46 snappi_api.info L1488 INFO | Lag Configuration 0.157s
16:02:47 snappi_api.info L1488 INFO | Convert device config : 0.325s
16:02:47 snappi_api.info L1488 INFO | Create IxNetwork device config : 0.000s
16:02:48 snappi_api.info L1488 INFO | Push IxNetwork device config : 0.963s
16:02:48 snappi_api.info L1488 INFO | Devices configuration 1.391s
16:02:56 snappi_api.info L1488 INFO | Flows configuration 8.034s
16:03:03 snappi_api.info L1488 INFO | Start interfaces 7.636s
16:03:04 snappi_api.info L1488 INFO | IxNet - The Traffic Item was modified. Please perform a Traffic Generate to update the associated traffic Flow Groups
16:03:04 traffic_generation.run_traffic L0433 INFO | Wait for Arp to Resolve ...
16:03:10 traffic_generation.run_traffic L0456 INFO | Starting transmit on all flows ...
16:03:14 snappi_api.info L1488 INFO | Flows generate/apply 3.528s
16:03:27 snappi_api.info L1488 INFO | Flows clear statistics 12.289s
16:03:27 snappi_api.info L1488 INFO | Captures start 0.000s
16:03:30 snappi_api.info L1488 INFO | Flows start 2.733s
16:03:30 traffic_generation.run_traffic L0472 INFO | Polling DUT for traffic statistics for 23 seconds ...
16:03:57 traffic_generation.run_traffic L0491 INFO | Polling TGEN for in-flight traffic statistics...
16:03:59 traffic_generation.run_traffic L0496 INFO | In-flight traffic statistics for flows: ['Test Flow Prio 0', 'Background Flow Prio 1', 'Background Flow Prio 3', 'Background Flow Prio 4', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2']
16:03:59 traffic_generation.run_traffic L0497 INFO | In-flight TX frames: [409482758, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
16:03:59 traffic_generation.run_traffic L0498 INFO | In-flight RX frames: [409482758, 63697318, 63697318, 63697318, 63697318, 63697318, 63697318]
16:04:16 traffic_generation.run_traffic L0499 INFO | DUT polling complete
16:04:16 traffic_generation.run_traffic L0510 INFO | Checking if all flows have stopped. Attempt #1
16:04:18 traffic_generation.run_traffic L0517 INFO | All test and background traffic flows stopped
16:04:20 traffic_generation.run_traffic L0540 INFO | Dumping per-flow statistics
16:04:21 traffic_generation.run_traffic L0542 INFO | Stopping transmit on all remaining flows
16:04:26 snappi_api.info L1488 INFO | Flows stop 5.387s
PASSED

Signed-off-by: Aharon Malkin <[email protected]>
AharonMalkin pushed a commit that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
The current telemetry framework has many serious problems:

Hard to import, because it is outside of the tests folder
No implementation, hard to try out
Hard to use and extend, because the interface is too primitive
No tests and can break easily
How did you do it?
This PR add a few things to improve the current telemetry framework:

Add new design doc with example code provided in the doc.
Implement both TS (timeseries) and DB (database) reporter, so we can try the feature easily.
How did you verify/test it?
Run all tests locally and passed.

Any platform specific information?
N/A.

Fix TS reporters.

Fix TSRepoter.

Fix TS reporter.

minor fix.

Fix example.

Reverse relationship of metrics and reporter to support more types of metrics in future.

Remove bydesign not working test.

Fix example.

Update tests.

Update TS reporter and DB repoter.

Update minor things.

Remove no required code.

Revert unexpected change.

Rename and update doc.

* Get os version and job id (#1)

Get os version and elastictest job id from correct place.

* Revert OS version change.

* Remove duplicated mock reporter fixture.

---------

Co-authored-by: Yutong Zhang <[email protected]>
Signed-off-by: Aharon Malkin <[email protected]>
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.