From 49af35b44010ec732340560c9bec9f16b778bb05 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Wed, 4 Nov 2020 10:38:48 -0500 Subject: [PATCH] [fix][wip] Add reinstall_init function (part 3) Create a function that, if the setup log exists, puts the system into a state where the installer can run again without issue. This is WIP, there are most likely still issues. --- setup/so-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index 9adc8e038..24bf8a5aa 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1424,9 +1424,12 @@ reinstall_init() { # Disable schedule so highstate doesn't start running during the install salt-call -l info schedule.disable + # Kill any currently running salt jobs, also to prevent issues with highstate. + salt-call -l info saltutil.kill_all_jobs + # Stop and remove all so-* containers so files can be changed with more safety docker stop $(docker ps -a -q --filter "name=so-") - docker rm $(docker ps -a -q --filter "name=so-") + docker rm -f $(docker ps -a -q --filter "name=so-") # Backup /opt/so since we'll be rebuilding this directory during setup mv /opt/so /opt/so_old