Skip to content

Commit

Permalink
Use safe reload to restart key process
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh-80 committed Jul 25, 2022
1 parent 4fcd0f7 commit 4403947
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/platform_tests/cli/test_sonic_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
def stop_database_docker(duthosts, enum_rand_one_per_hwsku_hostname):
duthost = duthosts[enum_rand_one_per_hwsku_hostname]

# save config for reload later
duthost.shell('sudo config save -y')

# shutdown database docker before test
duthost.command("sudo docker stop database", module_ignore_errors=True)
time.sleep(DOCKER_WAIT_TIME)
Expand All @@ -34,9 +37,7 @@ def stop_database_docker(duthosts, enum_rand_one_per_hwsku_hostname):
time.sleep(DOCKER_WAIT_TIME)

# reload config, because some critical process not work after database docker restart
duthost.shell('sudo config save -y')
config_reload(duthost)
wait_critical_processes(duthost)
config_reload(duthost, config_source='config_db', safe_reload=True)

def test_sonic_installer_not_depends_on_database_docker(duthosts, enum_rand_one_per_hwsku_hostname, stop_database_docker):
"""
Expand Down

0 comments on commit 4403947

Please sign in to comment.