Skip to content

Improved error handling when not all Interfaces are up#815

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
romankachur-mlnx:testbed_interfaces
Mar 31, 2019
Merged

Improved error handling when not all Interfaces are up#815
liat-grozovik merged 1 commit intosonic-net:masterfrom
romankachur-mlnx:testbed_interfaces

Conversation

@romankachur-mlnx
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Any test, that calls interface.yml, if encountered that some Interfaces/PortChannels are not up, will not just fail but will try to gather interfaces status from Fanout/VMs as well.

Type of change

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

Approach

How did you do it?

  1. Modified interface.yml to include check_testbed_interfaces.yml,
    when 'Verify interfaces are up' step fails.
  2. check_testbed_interfaces.yml will gather interfaces status on:
  • DUT
  • Fanout (for MLNX only, filtered by check_interfaces_status tag)
  • Testbed server (by calling testbed_vm_status.yml playbook)
  • relevant VMs
  1. testbed_vm_status.yml palybook will connect to Testbed server and gather VMs status.
  2. show_int_portchannel_status.j2 will connect to each relevant VM and gather Port-Channel status.

How did you verify/test it?

Any test that call interface.yml, in two cases:

  1. Normal flow, when all interfaces are up.
    In this case nothing is changed.
  2. When Fanout has deliberately its ports down,
    In that cases, the test fails as usual, but gathers Interfaces status from Fanout.
  3. When some relevant VM has its Port-Channel deliberately down.
    In that cases, the test fails as usual, but gathers VMs status from Testbed server, and PortChannel status from VMs.

Any platform specific information?

Current implementation can enter Fanout switch, only if Fanout is MLNX type.
The 'Check Fanout interfaces' step in check_testbed_interfaces.yml calls fanout.yml (actually fanout role) with tag 'check_interfaces_status'
In this case anyone can modify roles/fanout/tasks/main.yml to execute Fanout specific step with
when: peer_hwsku == "<specific_fanout_type>" tags: check_interfaces_status

Example:

 ###################################################################
 # Check Fanout interfaces status                                  #
 ###################################################################
- block:
  - name: Check Fanout interfaces status
    action: apswitch template=roles/fanout/templates/mlnx_interfaces_status.j2
    connection: switch
    register: fanout_interfaces
    args:
      login: "{{ switch_login['MLNX-OS'] }}"

  - debug:
      msg: "{{ fanout_interfaces.stdout.split('\n') }}"

  when: peer_hwsku == "MLNX-OS"
  tags: check_interfaces_status

Supported testbed topology if it's a new test case?

Documentation

@chimbersaw
Copy link
Copy Markdown

@romankachur-mlnx хуйня pr переделывай

deerao02 pushed a commit to deerao02/sonic-mgmt that referenced this pull request Dec 18, 2025
sonic-net#815)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
ipv6 topo-only skips are recently introduced to various test cases. Within those cases are various sub-cases of `fib/test_fib.py::test_nvgre_hash`.

New skip entries are added for the specific sub-cases, which overrides the umbrella skip condition for fib/test_fib.py::test_nvgre_hash, causing the cases to be unintentionally unskipped.

Fix by adding the needed skip conditions to the sub-case entries.
Also fixing some entries that were not in alphabetical order.

Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [x] 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
- [x] msft-202412
- [x] msft-202503
- [x] 202505

### Approach
#### What is the motivation for this PR?
Tests are unintentionally unskipped, and there are commit checks that failed when attempting to commit the fix.

#### How did you do it?
Added the missing skip conditions and rearranged the order of skip conditions to match the alphabetical order.

#### How did you verify/test it?
`fib/test_fib.py::test_nvgre_hash` is skipped properly on Broadcom platforms after the fix.

#### Any platform specific information?
Broadcom specific

#### Supported testbed topology if it's a new test case?

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…et#2809)

Submodule src/sonic-swss ae74a27..6e8f991:
  > Create ingress table group during the PFCWD stats list installment (sonic-net#815)

Submodule src/sonic-utilities 6ba6d27..0f7e75c:
  > If fast-reboot-dump gives an error, don't continue with fast-reboot (sonic-net#515)

Signed-off-by: Ying Xie <[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.

3 participants