From a44158261a44bc7faff1fbcb481077f1bf529eba Mon Sep 17 00:00:00 2001 From: William Wernert Date: Thu, 30 Apr 2020 12:08:31 -0400 Subject: [PATCH] [fix] Run salt command to check in to master before accepting salt key --- setup/so-functions | 5 ++++- setup/so-setup | 13 ++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 3c1f8b6ac..19c988548 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -654,7 +654,6 @@ docker_seed_registry() { } - fireeye_pillar() { local fireeye_pillar_path=/opt/so/saltstack/pillar/fireeye @@ -668,6 +667,10 @@ fireeye_pillar() { } +salt_firstcheckin() { + salt-call state.show_top >> "$setup_log" 2>&1 +} + fleet_pillar() { local pillar_file="$temp_install_dir"/pillar/minions/"$MINION_ID".sls diff --git a/setup/so-setup b/setup/so-setup index 73ebdd731..64de94b58 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -299,6 +299,9 @@ export percentage=0 master_pillar 2>> "$setup_log" fi + set_progress_str 14 'Running first Salt checkin' + salt_firstcheckin 2>> "$setup_log" + if [[ $is_helix ]]; then set_progress_str 15 'Generating the FireEye pillar' fireeye_pillar 2>> "$setup_log" @@ -315,19 +318,19 @@ export percentage=0 node_pillar 2>> "$setup_log" fi - set_progress_str 19 'Generating CA and checking in' - salt_checkin 2>> "$setup_log" - if [[ $is_minion ]]; then - set_progress_str 20 'Accepting Salt key on master' + set_progress_str 19 'Accepting Salt key on master' accept_salt_key_remote 2>> "$setup_log" fi if [[ $is_master ]]; then - set_progress_str 20 'Accepting Salt key' + set_progress_str 19 'Accepting Salt key' salt-key -ya "$MINION_ID" >> "$setup_log" 2>&1 fi + set_progress_str 20 'Generating CA and checking in' + salt_checkin 2>> "$setup_log" + if [[ $is_master || $is_helix ]]; then set_progress_str 25 'Downloading containers from the internet' salt-call state.apply -l info registry >> "$setup_log" 2>&1