From b287e764a0490b5231802396a8b99ea7dea5c250 Mon Sep 17 00:00:00 2001 From: Jibin Bao Date: Mon, 4 Mar 2024 14:22:10 +0800 Subject: [PATCH] Fix test_reload_config issue: https://github.com/sonic-net/sonic-mgmt/issues/11654 (#11674) 1. Revert PR: https://github.com/sonic-net/sonic-mgmt/pull/7289/, because the relevant issue has been fixed by PR:https://github.com/sonic-net/sonic-buildimage/pull/15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: https://github.com/sonic-net/sonic-mgmt/pull/7953 due to the above same reason --- tests/platform_tests/test_reload_config.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tests/platform_tests/test_reload_config.py b/tests/platform_tests/test_reload_config.py index 8775090939c..9b652de66a2 100644 --- a/tests/platform_tests/test_reload_config.py +++ b/tests/platform_tests/test_reload_config.py @@ -7,7 +7,6 @@ import logging import pytest -import re from tests.common.fixtures.conn_graph_facts import conn_graph_facts # noqa F401 from tests.common.utilities import wait_until @@ -125,9 +124,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname, # we must give it a little longer or else it may falsely fail the test. wait_until(360, 1, 0, check_database_status, duthost) - # Check if interfaces-config.service is exited - wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) - logging.info("Reload configuration check") out = duthost.shell("sudo config reload -y", executable="/bin/bash", module_ignore_errors=True) @@ -145,8 +141,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname, logging.info("Checking config reload after system is up") # Check if all database containers have started wait_until(60, 1, 0, check_database_status, duthost) - # Check if interfaces-config.service is exited - wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) out = duthost.shell("sudo config reload -y", executable="/bin/bash", module_ignore_errors=True) assert "Retry later" in out['stdout'] @@ -170,11 +164,3 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname, assert "Retry later" not in out['stdout'] assert wait_until(300, 20, 0, config_system_checks_passed, duthost, delayed_services) - - -def check_interfaces_config_service_status(duthost): - # check interfaces-config.service status - regx_interface_config_service_exit = r'.*Main PID: \d+ \(code=exited, status=0\/SUCCESS\).*' - interface_config_server_status = duthost.command( - 'systemctl status interfaces-config.service', module_ignore_errors=True)['stdout'] - return re.search(regx_interface_config_service_exit, interface_config_server_status)