Skip to content

Commit

Permalink
Add restart before changes
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Kulachenko <oleg@nspcc.ru>
  • Loading branch information
vvarg229 committed Sep 24, 2023
1 parent 5682a1c commit fc76d6a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions robot/resources/lib/python_keywords/failover_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,16 @@ def enable_metabase_resync_on_start(cluster: Cluster):
file.write(modified_content)
logger.debug(f"Modified file content:\n{modified_content}")

with allure.step("Restart docker compose to apply the changes"):
docker_compose_restart_storage_nodes(cluster)

yield

with open(file_path, 'w') as file:
file.writelines(lines)
logger.debug(f"Restored file content:\n{''.join(lines)}")
# Restart docker compose to apply the changes
with allure.step("Restart docker"):

with allure.step("Restart docker compose to revert the changes"):
docker_compose_restart_storage_nodes(cluster)

with allure.step(f"Waiting {METABASE_RESYNC_TIMEOUT} seconds for the metabase to synchronize"):
Expand Down

0 comments on commit fc76d6a

Please sign in to comment.