Skip to content

Bug: Handle fanless liquid-cooled systems in the platform fan test #27546

Description

@norimeher-arista

Is it platform specific

generic

Importance or Severity

Medium

Description of the bug

tests/platform_tests/cli/test_show_platform.py::test_show_platform_fan test incorrectly fails on fanless, liquid-cooled BMCs.

On these systems, show platform fan correctly returns Fan Not detected.

The test accepts this output format but then still requires at least one fan with status OK. After retrying for 90 seconds, it fails with:

No Fans are displayed with OK status

Fanless liquid-cooled systems have no physical fans to report, so this is valid platform behavior rather than a hardware failure.

Systems expected to contain fans should continue requiring at least one fan with an OK status.

Proposed Fix

Query Chassis().is_liquid_cooled() through the platform API. When show platform fan reports no fans, accept the result if the DUT is either:

  • a DPU, preserving the existing behavior; or
  • a liquid-cooled chassis.

This allows fanless liquid-cooled BMCs to pass while retaining the existing
fan-health validation for platforms that are expected to have fans.

Steps to Reproduce

  1. Run the platform CLI test on a fanless, liquid-cooled BMC: tests/platform_tests/cli/test_show_platform.py::test_show_platform_fan

  2. Observe that show platform fan returns:
    Fan Not detected

  3. The test retries for 90 seconds and then fails.

Actual Behavior and Expected Behavior

Actual Behaviour

The test fails with:

No Fans are displayed with OK status

Expected Behaviour

For a chassis that reports itself as liquid-cooled and has no fans, Fan Not detected should be considered valid output. The test should still validate the CLI response, but it should not require an OK fan that cannot
exist.

Relevant log output

Output of show version

Attach files (if any)

https://github.com/sonic-net/sonic-mgmt/blob/master/tests/platform_tests/cli/test_show_platform.py#L457-L474

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions