redo how we check if salt-master is ready and accessible

This commit is contained in:
m0duspwnens
2023-10-16 16:31:43 -04:00
parent 9f3a9dfab0
commit 53fcafea50
4 changed files with 25 additions and 19 deletions

View File

@@ -2111,11 +2111,6 @@ saltify() {
}
# Run a salt command to generate the minion key
salt_firstcheckin() {
salt-call state.show_top >> /dev/null 2>&1 # send output to /dev/null because we don't actually care about the ouput
}
salt_install_module_deps() {
logCmd "salt-pip install docker --no-index --only-binary=:all: --find-links files/salt_module_deps/docker/"
logCmd "salt-pip install pymysql --no-index --only-binary=:all: --find-links files/salt_module_deps/pymysql/"

View File

@@ -715,6 +715,11 @@ if ! [[ -f $install_opt_file ]]; then
logCmd "salt-call state.apply common.packages"
logCmd "salt-call state.apply common"
logCmd "salt-call state.apply salt.master"
# wait here until we get a response from the salt-master since it may have just restarted
# exit setup after 5-6 minutes of trying
check_salt_master_status || fail "Can't access salt master or it is not ready"
logCmd "salt-call state.apply docker"
firewall_generate_templates
set_initial_firewall_policy