Add retry logic around salt key acceptance during setup

This commit is contained in:
Jason Ertel
2021-01-10 00:56:10 -05:00
parent 95a9d14832
commit 63047b4b85
3 changed files with 22 additions and 3 deletions

View File

@@ -1972,7 +1972,7 @@ set_progress_str() {
printf '%s\n' \
'----'\
"$percentage% - ${progress_bar_text^^}"\
info "$percentage% - ${progress_bar_text^^}"\
"----" >> "$setup_log" 2>&1
}

View File

@@ -637,12 +637,12 @@ set_redirect >> $setup_log 2>&1
if [[ $is_minion ]]; then
set_progress_str 20 'Accepting Salt key on manager'
accept_salt_key_remote >> $setup_log 2>&1
retry 20 10 accept_salt_key_remote
fi
if [[ $is_manager || $is_import || $is_helix ]]; then
set_progress_str 20 'Accepting Salt key'
salt-key -ya "$MINION_ID" >> $setup_log 2>&1
retry 20 10 "salt-key -ya $MINION_ID"
fi
set_progress_str 21 'Copying minion pillars to manager'