Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:14138] Fix reload_config failed on M0 device because PFCWD feature does not exist #14446

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/common/config_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ def config_reload_minigraph_with_rendered_golden_config_override(
override_config=True, golden_config_path=golden_config_path, is_dut=is_dut)


def pfcwd_feature_enabled(duthost):
device_metadata = duthost.config_facts(host=duthost.hostname, source="running")['ansible_facts']['DEVICE_METADATA']
pfc_status = device_metadata['localhost']["default_pfcwd_status"]
return pfc_status == 'enable'


@ignore_loganalyzer
def config_reload(sonic_host, config_source='config_db', wait=120, start_bgp=True, start_dynamic_buffer=True,
safe_reload=False, wait_before_force_reload=0, wait_for_bgp=False,
Expand Down Expand Up @@ -195,7 +201,8 @@ def _config_reload_cmd_wrapper(cmd, executable):
pytest_assert(wait_until(wait + 300, 20, 0, sonic_host.critical_services_fully_started),
"All critical services should be fully started!")
wait_critical_processes(sonic_host)
if config_source == 'minigraph':
# PFCWD feature does not enable on some topology, for example M0
if config_source == 'minigraph' and pfcwd_feature_enabled(sonic_host):
pytest_assert(wait_until(wait + 300, 20, 0, chk_for_pfc_wd, sonic_host),
"PFC_WD is missing in CONFIG-DB")

Expand Down
Loading