(fix) Apiserver key rotate job loop

- the apiserver key rotation job would loop forever because
  the 'uniq' pipe operates on lines, but we had a single line
  with space-separated records. Update the pipe with a 'tr'
  command to break spaces into newlines to properly de-deplicate
  the pod list.

Change-Id: I4e690d4456e1f80f1edec9fee3206a3a88d7e8fe
This commit is contained in:
Hussey, Scott (sh8121) 2019-05-06 16:40:20 -05:00
parent 4f7999bd00
commit b6c3decf22
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,8 @@ get_encryption_hash() {
}
apiserver_compare() {
echo "${apiservers[@]}" | sort | uniq > "${TEMP_DIR}/a.txt"
echo "${updated_apiservers[@]}" | sort | uniq > "${TEMP_DIR}/b.txt"
echo "${apiservers[@]}" | tr ' ' '\n' | sort | uniq > "${TEMP_DIR}/a.txt"
echo "${updated_apiservers[@]}" | tr ' ' '\n' | sort | uniq > "${TEMP_DIR}/b.txt"
comm -3 "${TEMP_DIR}/a.txt" "${TEMP_DIR}/b.txt"
}